diff --git a/assets/fbx/bb.fbx b/assets/fbx/bb.fbx new file mode 100644 index 0000000..7469476 Binary files /dev/null and b/assets/fbx/bb.fbx differ diff --git a/dist/himp.platform.angular/3rdpartylicenses.txt b/dist/himp.platform.angular/3rdpartylicenses.txt index cda3613..e8ec08c 100644 --- a/dist/himp.platform.angular/3rdpartylicenses.txt +++ b/dist/himp.platform.angular/3rdpartylicenses.txt @@ -62,6 +62,58 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-------------------------------------------------------------------------------- +Package: three +License: "MIT" + +The MIT License + +Copyright © 2010-2016 three.js authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------------------- +Package: three-orbitcontrols-ts +License: "MIT" + +MIT License + +Copyright (c) 2017 Nicolas Panel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + -------------------------------------------------------------------------------- Package: tslib License: "0BSD" @@ -338,6 +390,32 @@ The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause: `/src/util/number.ts` See `/licenses/LICENSE-d3` for details of the license. +-------------------------------------------------------------------------------- +Package: three +License: "MIT" + +The MIT License + +Copyright © 2010-2024 three.js authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + -------------------------------------------------------------------------------- Package: mqtt-browser License: "MIT" diff --git a/dist/himp.platform.angular/browser/assets/fbx/bb.fbx b/dist/himp.platform.angular/browser/assets/fbx/bb.fbx new file mode 100644 index 0000000..7469476 Binary files /dev/null and b/dist/himp.platform.angular/browser/assets/fbx/bb.fbx differ diff --git a/dist/himp.platform.angular/browser/chunk-4YNSMQCN.js b/dist/himp.platform.angular/browser/chunk-2D265ORJ.js similarity index 99% rename from dist/himp.platform.angular/browser/chunk-4YNSMQCN.js rename to dist/himp.platform.angular/browser/chunk-2D265ORJ.js index 83f0664..f6967df 100644 --- a/dist/himp.platform.angular/browser/chunk-4YNSMQCN.js +++ b/dist/himp.platform.angular/browser/chunk-2D265ORJ.js @@ -1,2 +1,2 @@ -import{A as St,Ba as jt,C as xt,Fa as Wt,Ha as Vt,Ka as qt,O as It,Oa as zt,P as Ct,Ra as Kt,S as At,T as Tt,Ta as Yt,U as Rt,V as Pt,Wa as Qt,_ as Ot,_a as Gt,ab as $t,ca as Bt,cb as Jt,e as yt,eb as Xt,gb as Zt,ib as er,j as _t,ka as Mt,n as wt,oa as kt,qa as Nt,sa as Lt,ta as Ut,u as bt,v as vt,va as Ft,xa as Dt,z as Et}from"./chunk-XXGLJ63T.js";import{Bb as ot,Cb as Fe,Db as De,De as ct,Ee as ft,Fe as pt,G as Qe,H as Ge,Hb as at,I as $e,Ia as _e,Je as dt,Lf as Ht,Ma as ge,Ra as Le,Ta as Ce,V as Je,W as Xe,a as Te,ac as ut,b as Re,bc as lt,c as Ie,e as ir,eb as Ae,fa as Ze,fb as Se,ff as gt,g as Ve,gb as tt,ha as Be,i as Ee,ia as Me,j as qe,jf as mt,k as ze,kb as rt,l as Ke,la as et,lc as ht,m as Oe,n as Ye,ob as it,qa as ke,qb as Ue,ra as Ne,rb as nt,sb as st}from"./chunk-TV7RDLL7.js";var We=ir((tr,je)=>{"use strict";(function(ue){if(typeof tr=="object"&&typeof je<"u")je.exports=ue();else if(typeof define=="function"&&define.amd)define([],ue);else{var he;typeof window<"u"?he=window:typeof global<"u"?he=global:typeof self<"u"?he=self:he=this,he.mqtt=ue()}})(function(){var ue,he,de;return function(){function y(k,x,d){function f(s,i){if(!x[s]){if(!k[s]){var r=typeof Ie=="function"&&Ie;if(!i&&r)return r(s,!0);if(m)return m(s,!0);var e=new Error("Cannot find module '"+s+"'");throw e.code="MODULE_NOT_FOUND",e}var t=x[s]={exports:{}};k[s][0].call(t.exports,function(o){var l=k[s][1][o];return f(l||o)},t,t.exports,y,k,x,d)}return x[s].exports}for(var m=typeof Ie=="function"&&Ie,h=0;h0)throw new Error("Invalid string. Length must be a multiple of 4");var v=_.indexOf("=");v===-1&&(v=c);var R=v===c?0:4-v%4;return[v,R]}function e(_){var c=r(_),v=c[0],R=c[1];return(v+R)*3/4-R}function t(_,c,v){return(c+v)*3/4-v}function o(_){var c,v=r(_),R=v[0],A=v[1],W=new m(t(_,R,A)),j=0,I=A>0?R-4:R,P;for(P=0;P>16&255,W[j++]=c>>8&255,W[j++]=c&255;return A===2&&(c=f[_.charCodeAt(P)]<<2|f[_.charCodeAt(P+1)]>>4,W[j++]=c&255),A===1&&(c=f[_.charCodeAt(P)]<<10|f[_.charCodeAt(P+1)]<<4|f[_.charCodeAt(P+2)]>>2,W[j++]=c>>8&255,W[j++]=c&255),W}function l(_){return d[_>>18&63]+d[_>>12&63]+d[_>>6&63]+d[_&63]}function p(_,c,v){for(var R,A=[],W=c;WI?I:j+W));return R===1?(c=_[v-1],A.push(d[c>>2]+d[c<<4&63]+"==")):R===2&&(c=(_[v-2]<<8)+_[v-1],A.push(d[c>>10]+d[c>>4&63]+d[c<<2&63]+"=")),A.join("")}},{}],2:[function(y,k,x){},{}],3:[function(y,k,x){(function(d){(function(){"use strict";var f=y("base64-js"),m=y("ieee754");x.Buffer=r,x.SlowBuffer=R,x.INSPECT_MAX_BYTES=50;var h=2147483647;x.kMaxLength=h,r.TYPED_ARRAY_SUPPORT=s(),!r.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{var u=new Uint8Array(1);return u.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},u.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function i(u){if(u>h)throw new RangeError('The value "'+u+'" is invalid for option "size"');var n=new Uint8Array(u);return n.__proto__=r.prototype,n}function r(u,n,a){if(typeof u=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(u)}return e(u,n,a)}typeof Symbol<"u"&&Symbol.species!=null&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192;function e(u,n,a){if(typeof u=="string")return p(u,n);if(ArrayBuffer.isView(u))return g(u);if(u==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(Q(u,ArrayBuffer)||u&&Q(u.buffer,ArrayBuffer))return _(u,n,a);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var b=u.valueOf&&u.valueOf();if(b!=null&&b!==u)return r.from(b,n,a);var L=c(u);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return r.from(u[Symbol.toPrimitive]("string"),n,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}r.from=function(u,n,a){return e(u,n,a)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array;function t(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function o(u,n,a){return t(u),u<=0?i(u):n!==void 0?typeof a=="string"?i(u).fill(n,a):i(u).fill(n):i(u)}r.alloc=function(u,n,a){return o(u,n,a)};function l(u){return t(u),i(u<0?0:v(u)|0)}r.allocUnsafe=function(u){return l(u)},r.allocUnsafeSlow=function(u){return l(u)};function p(u,n){if((typeof n!="string"||n==="")&&(n="utf8"),!r.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var a=A(u,n)|0,b=i(a),L=b.write(u,n);return L!==a&&(b=b.slice(0,L)),b}function g(u){for(var n=u.length<0?0:v(u.length)|0,a=i(n),b=0;b=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return u|0}function R(u){return+u!=u&&(u=0),r.alloc(+u)}r.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==r.prototype},r.compare=function(n,a){if(Q(n,Uint8Array)&&(n=r.from(n,n.offset,n.byteLength)),Q(a,Uint8Array)&&(a=r.from(a,a.offset,a.byteLength)),!r.isBuffer(n)||!r.isBuffer(a))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===a)return 0;for(var b=n.length,L=a.length,K=0,J=Math.min(b,L);K2&&arguments[2]===!0;if(!b&&a===0)return 0;for(var L=!1;;)switch(n){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return te(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a*2;case"hex":return a>>>1;case"base64":return N(u).length;default:if(L)return b?-1:te(u).length;n=(""+n).toLowerCase(),L=!0}}r.byteLength=A;function W(u,n,a){var b=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((a===void 0||a>this.length)&&(a=this.length),a<=0)||(a>>>=0,n>>>=0,a<=n))return"";for(u||(u="utf8");;)switch(u){case"hex":return ee(this,n,a);case"utf8":case"utf-8":return E(this,n,a);case"ascii":return q(this,n,a);case"latin1":case"binary":return re(this,n,a);case"base64":return G(this,n,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,n,a);default:if(b)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),b=!0}}r.prototype._isBuffer=!0;function j(u,n,a){var b=u[n];u[n]=u[a],u[a]=b}r.prototype.swap16=function(){var n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var a=0;aa&&(n+=" ... "),""},r.prototype.compare=function(n,a,b,L,K){if(Q(n,Uint8Array)&&(n=r.from(n,n.offset,n.byteLength)),!r.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(a===void 0&&(a=0),b===void 0&&(b=n?n.length:0),L===void 0&&(L=0),K===void 0&&(K=this.length),a<0||b>n.length||L<0||K>this.length)throw new RangeError("out of range index");if(L>=K&&a>=b)return 0;if(L>=K)return-1;if(a>=b)return 1;if(a>>>=0,b>>>=0,L>>>=0,K>>>=0,this===n)return 0;for(var J=K-L,ae=b-a,le=Math.min(J,ae),ce=this.slice(L,K),pe=n.slice(a,b),fe=0;fe2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),a=+a,w(a)&&(a=L?0:u.length-1),a<0&&(a=u.length+a),a>=u.length){if(L)return-1;a=u.length-1}else if(a<0)if(L)a=0;else return-1;if(typeof n=="string"&&(n=r.from(n,b)),r.isBuffer(n))return n.length===0?-1:P(u,n,a,b,L);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(u,n,a):Uint8Array.prototype.lastIndexOf.call(u,n,a):P(u,[n],a,b,L);throw new TypeError("val must be string, number or Buffer")}function P(u,n,a,b,L){var K=1,J=u.length,ae=n.length;if(b!==void 0&&(b=String(b).toLowerCase(),b==="ucs2"||b==="ucs-2"||b==="utf16le"||b==="utf-16le")){if(u.length<2||n.length<2)return-1;K=2,J/=2,ae/=2,a/=2}function le(we,ye){return K===1?we[ye]:we.readUInt16BE(ye*K)}var ce;if(L){var pe=-1;for(ce=a;ceJ&&(a=J-ae),ce=a;ce>=0;ce--){for(var fe=!0,me=0;meL&&(b=L)):b=L;var K=n.length;b>K/2&&(b=K/2);for(var J=0;J>>0,isFinite(b)?(b=b>>>0,L===void 0&&(L="utf8")):(L=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-a;if((b===void 0||b>K)&&(b=K),n.length>0&&(b<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var J=!1;;)switch(L){case"hex":return S(this,n,a,b);case"utf8":case"utf-8":return V(this,n,a,b);case"ascii":return M(this,n,a,b);case"latin1":case"binary":return ne(this,n,a,b);case"base64":return se(this,n,a,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,n,a,b);default:if(J)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),J=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(u,n,a){return n===0&&a===u.length?f.fromByteArray(u):f.fromByteArray(u.slice(n,a))}function E(u,n,a){a=Math.min(u.length,a);for(var b=[],L=n;L239?4:K>223?3:K>191?2:1;if(L+ae<=a){var le,ce,pe,fe;switch(ae){case 1:K<128&&(J=K);break;case 2:le=u[L+1],(le&192)===128&&(fe=(K&31)<<6|le&63,fe>127&&(J=fe));break;case 3:le=u[L+1],ce=u[L+2],(le&192)===128&&(ce&192)===128&&(fe=(K&15)<<12|(le&63)<<6|ce&63,fe>2047&&(fe<55296||fe>57343)&&(J=fe));break;case 4:le=u[L+1],ce=u[L+2],pe=u[L+3],(le&192)===128&&(ce&192)===128&&(pe&192)===128&&(fe=(K&15)<<18|(le&63)<<12|(ce&63)<<6|pe&63,fe>65535&&fe<1114112&&(J=fe))}}J===null?(J=65533,ae=1):J>65535&&(J-=65536,b.push(J>>>10&1023|55296),J=56320|J&1023),b.push(J),L+=ae}return U(b)}var T=4096;function U(u){var n=u.length;if(n<=T)return String.fromCharCode.apply(String,u);for(var a="",b=0;bb)&&(a=b);for(var L="",K=n;Kb&&(n=b),a<0?(a+=b,a<0&&(a=0)):a>b&&(a=b),aa)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUIntLE=function(n,a,b){n=n>>>0,a=a>>>0,b||D(n,a,this.length);for(var L=this[n],K=1,J=0;++J>>0,a=a>>>0,b||D(n,a,this.length);for(var L=this[n+--a],K=1;a>0&&(K*=256);)L+=this[n+--a]*K;return L},r.prototype.readUInt8=function(n,a){return n=n>>>0,a||D(n,1,this.length),this[n]},r.prototype.readUInt16LE=function(n,a){return n=n>>>0,a||D(n,2,this.length),this[n]|this[n+1]<<8},r.prototype.readUInt16BE=function(n,a){return n=n>>>0,a||D(n,2,this.length),this[n]<<8|this[n+1]},r.prototype.readUInt32LE=function(n,a){return n=n>>>0,a||D(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},r.prototype.readUInt32BE=function(n,a){return n=n>>>0,a||D(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},r.prototype.readIntLE=function(n,a,b){n=n>>>0,a=a>>>0,b||D(n,a,this.length);for(var L=this[n],K=1,J=0;++J=K&&(L-=Math.pow(2,8*a)),L},r.prototype.readIntBE=function(n,a,b){n=n>>>0,a=a>>>0,b||D(n,a,this.length);for(var L=a,K=1,J=this[n+--L];L>0&&(K*=256);)J+=this[n+--L]*K;return K*=128,J>=K&&(J-=Math.pow(2,8*a)),J},r.prototype.readInt8=function(n,a){return n=n>>>0,a||D(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},r.prototype.readInt16LE=function(n,a){n=n>>>0,a||D(n,2,this.length);var b=this[n]|this[n+1]<<8;return b&32768?b|4294901760:b},r.prototype.readInt16BE=function(n,a){n=n>>>0,a||D(n,2,this.length);var b=this[n+1]|this[n]<<8;return b&32768?b|4294901760:b},r.prototype.readInt32LE=function(n,a){return n=n>>>0,a||D(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},r.prototype.readInt32BE=function(n,a){return n=n>>>0,a||D(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},r.prototype.readFloatLE=function(n,a){return n=n>>>0,a||D(n,4,this.length),m.read(this,n,!0,23,4)},r.prototype.readFloatBE=function(n,a){return n=n>>>0,a||D(n,4,this.length),m.read(this,n,!1,23,4)},r.prototype.readDoubleLE=function(n,a){return n=n>>>0,a||D(n,8,this.length),m.read(this,n,!0,52,8)},r.prototype.readDoubleBE=function(n,a){return n=n>>>0,a||D(n,8,this.length),m.read(this,n,!1,52,8)};function X(u,n,a,b,L,K){if(!r.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>L||nu.length)throw new RangeError("Index out of range")}r.prototype.writeUIntLE=function(n,a,b,L){if(n=+n,a=a>>>0,b=b>>>0,!L){var K=Math.pow(2,8*b)-1;X(this,n,a,b,K,0)}var J=1,ae=0;for(this[a]=n&255;++ae>>0,b=b>>>0,!L){var K=Math.pow(2,8*b)-1;X(this,n,a,b,K,0)}var J=b-1,ae=1;for(this[a+J]=n&255;--J>=0&&(ae*=256);)this[a+J]=n/ae&255;return a+b},r.prototype.writeUInt8=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,1,255,0),this[a]=n&255,a+1},r.prototype.writeUInt16LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,65535,0),this[a]=n&255,this[a+1]=n>>>8,a+2},r.prototype.writeUInt16BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,65535,0),this[a]=n>>>8,this[a+1]=n&255,a+2},r.prototype.writeUInt32LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,4294967295,0),this[a+3]=n>>>24,this[a+2]=n>>>16,this[a+1]=n>>>8,this[a]=n&255,a+4},r.prototype.writeUInt32BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,4294967295,0),this[a]=n>>>24,this[a+1]=n>>>16,this[a+2]=n>>>8,this[a+3]=n&255,a+4},r.prototype.writeIntLE=function(n,a,b,L){if(n=+n,a=a>>>0,!L){var K=Math.pow(2,8*b-1);X(this,n,a,b,K-1,-K)}var J=0,ae=1,le=0;for(this[a]=n&255;++J>0)-le&255;return a+b},r.prototype.writeIntBE=function(n,a,b,L){if(n=+n,a=a>>>0,!L){var K=Math.pow(2,8*b-1);X(this,n,a,b,K-1,-K)}var J=b-1,ae=1,le=0;for(this[a+J]=n&255;--J>=0&&(ae*=256);)n<0&&le===0&&this[a+J+1]!==0&&(le=1),this[a+J]=(n/ae>>0)-le&255;return a+b},r.prototype.writeInt8=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,1,127,-128),n<0&&(n=255+n+1),this[a]=n&255,a+1},r.prototype.writeInt16LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,32767,-32768),this[a]=n&255,this[a+1]=n>>>8,a+2},r.prototype.writeInt16BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,32767,-32768),this[a]=n>>>8,this[a+1]=n&255,a+2},r.prototype.writeInt32LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,2147483647,-2147483648),this[a]=n&255,this[a+1]=n>>>8,this[a+2]=n>>>16,this[a+3]=n>>>24,a+4},r.prototype.writeInt32BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[a]=n>>>24,this[a+1]=n>>>16,this[a+2]=n>>>8,this[a+3]=n&255,a+4};function $(u,n,a,b,L,K){if(a+b>u.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function oe(u,n,a,b,L){return n=+n,a=a>>>0,L||$(u,n,a,4,34028234663852886e22,-34028234663852886e22),m.write(u,n,a,b,23,4),a+4}r.prototype.writeFloatLE=function(n,a,b){return oe(this,n,a,!0,b)},r.prototype.writeFloatBE=function(n,a,b){return oe(this,n,a,!1,b)};function Z(u,n,a,b,L){return n=+n,a=a>>>0,L||$(u,n,a,8,17976931348623157e292,-17976931348623157e292),m.write(u,n,a,b,52,8),a+8}r.prototype.writeDoubleLE=function(n,a,b){return Z(this,n,a,!0,b)},r.prototype.writeDoubleBE=function(n,a,b){return Z(this,n,a,!1,b)},r.prototype.copy=function(n,a,b,L){if(!r.isBuffer(n))throw new TypeError("argument should be a Buffer");if(b||(b=0),!L&&L!==0&&(L=this.length),a>=n.length&&(a=n.length),a||(a=0),L>0&&L=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),n.length-a=0;--J)n[J+a]=this[J+b];else Uint8Array.prototype.set.call(n,this.subarray(b,L),a);return K},r.prototype.fill=function(n,a,b,L){if(typeof n=="string"){if(typeof a=="string"?(L=a,a=0,b=this.length):typeof b=="string"&&(L=b,b=this.length),L!==void 0&&typeof L!="string")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!r.isEncoding(L))throw new TypeError("Unknown encoding: "+L);if(n.length===1){var K=n.charCodeAt(0);(L==="utf8"&&K<128||L==="latin1")&&(n=K)}}else typeof n=="number"&&(n=n&255);if(a<0||this.length>>0,b=b===void 0?this.length:b>>>0,n||(n=0);var J;if(typeof n=="number")for(J=a;J55295&&a<57344){if(!L){if(a>56319){(n-=3)>-1&&K.push(239,191,189);continue}else if(J+1===b){(n-=3)>-1&&K.push(239,191,189);continue}L=a;continue}if(a<56320){(n-=3)>-1&&K.push(239,191,189),L=a;continue}a=(L-55296<<10|a-56320)+65536}else L&&(n-=3)>-1&&K.push(239,191,189);if(L=null,a<128){if((n-=1)<0)break;K.push(a)}else if(a<2048){if((n-=2)<0)break;K.push(a>>6|192,a&63|128)}else if(a<65536){if((n-=3)<0)break;K.push(a>>12|224,a>>6&63|128,a&63|128)}else if(a<1114112){if((n-=4)<0)break;K.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else throw new Error("Invalid code point")}return K}function O(u){for(var n=[],a=0;a>8,L=a%256,K.push(L),K.push(b);return K}function N(u){return f.toByteArray(B(u))}function z(u,n,a,b){for(var L=0;L=n.length||L>=u.length);++L)n[L+a]=u[L];return L}function Q(u,n){return u instanceof n||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===n.name}function w(u){return u!==u}}).call(this)}).call(this,y("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:5}],4:[function(y,k,x){"use strict";var d=typeof Reflect=="object"?Reflect:null,f=d&&typeof d.apply=="function"?d.apply:function(P,S,V){return Function.prototype.apply.call(P,S,V)},m;d&&typeof d.ownKeys=="function"?m=d.ownKeys:Object.getOwnPropertySymbols?m=function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:m=function(P){return Object.getOwnPropertyNames(P)};function h(I){console&&console.warn&&console.warn(I)}var s=Number.isNaN||function(P){return P!==P};function i(){i.init.call(this)}k.exports=i,k.exports.once=A,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var r=10;function e(I){if(typeof I!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof I)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(I){if(typeof I!="number"||I<0||s(I))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+I+".");r=I}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||s(P))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+P+".");return this._maxListeners=P,this};function t(I){return I._maxListeners===void 0?i.defaultMaxListeners:I._maxListeners}i.prototype.getMaxListeners=function(){return t(this)},i.prototype.emit=function(P){for(var S=[],V=1;V0&&(se=S[0]),se instanceof Error)throw se;var ie=new Error("Unhandled error."+(se?" ("+se.message+")":""));throw ie.context=se,ie}var G=ne[P];if(G===void 0)return!1;if(typeof G=="function")f(G,this,S);else for(var E=G.length,T=c(G,E),V=0;V0&&se.length>M&&!se.warned){se.warned=!0;var ie=new Error("Possible EventEmitter memory leak detected. "+se.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");ie.name="MaxListenersExceededWarning",ie.emitter=I,ie.type=P,ie.count=se.length,h(ie)}return I}i.prototype.addListener=function(P,S){return o(this,P,S,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(P,S){return o(this,P,S,!0)};function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(I,P,S){var V={fired:!1,wrapFn:void 0,target:I,type:P,listener:S},M=l.bind(V);return M.listener=S,V.wrapFn=M,M}i.prototype.once=function(P,S){return e(S),this.on(P,p(this,P,S)),this},i.prototype.prependOnceListener=function(P,S){return e(S),this.prependListener(P,p(this,P,S)),this},i.prototype.removeListener=function(P,S){var V,M,ne,se,ie;if(e(S),M=this._events,M===void 0)return this;if(V=M[P],V===void 0)return this;if(V===S||V.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete M[P],M.removeListener&&this.emit("removeListener",P,V.listener||S));else if(typeof V!="function"){for(ne=-1,se=V.length-1;se>=0;se--)if(V[se]===S||V[se].listener===S){ie=V[se].listener,ne=se;break}if(ne<0)return this;ne===0?V.shift():v(V,ne),V.length===1&&(M[P]=V[0]),M.removeListener!==void 0&&this.emit("removeListener",P,ie||S)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(P){var S,V,M;if(V=this._events,V===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[P]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete V[P]),this;if(arguments.length===0){var ne=Object.keys(V),se;for(M=0;M=0;M--)this.removeListener(P,S[M]);return this};function g(I,P,S){var V=I._events;if(V===void 0)return[];var M=V[P];return M===void 0?[]:typeof M=="function"?S?[M.listener||M]:[M]:S?R(M):c(M,M.length)}i.prototype.listeners=function(P){return g(this,P,!0)},i.prototype.rawListeners=function(P){return g(this,P,!1)},i.listenerCount=function(I,P){return typeof I.listenerCount=="function"?I.listenerCount(P):_.call(I,P)},i.prototype.listenerCount=_;function _(I){var P=this._events;if(P!==void 0){var S=P[I];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?m(this._events):[]};function c(I,P){for(var S=new Array(P),V=0;V>1,l=-7,p=m?s-1:0,g=m?-1:1,_=d[f+p];for(p+=g,i=_&(1<<-l)-1,_>>=-l,l+=e;l>0;i=i*256+d[f+p],p+=g,l-=8);for(r=i&(1<<-l)-1,i>>=-l,l+=h;l>0;r=r*256+d[f+p],p+=g,l-=8);if(i===0)i=1-o;else{if(i===t)return r?NaN:(_?-1:1)*(1/0);r=r+Math.pow(2,h),i=i-o}return(_?-1:1)*r*Math.pow(2,i-h)},x.write=function(d,f,m,h,s,i){var r,e,t,o=i*8-s-1,l=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=h?0:i-1,c=h?1:-1,v=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(e=isNaN(f)?1:0,r=l):(r=Math.floor(Math.log(f)/Math.LN2),f*(t=Math.pow(2,-r))<1&&(r--,t*=2),r+p>=1?f+=g/t:f+=g*Math.pow(2,1-p),f*t>=2&&(r++,t/=2),r+p>=l?(e=0,r=l):r+p>=1?(e=(f*t-1)*Math.pow(2,s),r=r+p):(e=f*Math.pow(2,p-1)*Math.pow(2,s),r=0));s>=8;d[m+_]=e&255,_+=c,e/=256,s-=8);for(r=r<0;d[m+_]=r&255,_+=c,r/=256,o-=8);d[m+_-c]|=v*128}},{}],6:[function(y,k,x){(function(d,f){(function(){"use strict";let m=y("events").EventEmitter,h=y("./store"),s=y("./topic-alias-recv"),i=y("./topic-alias-send"),r=y("mqtt-packet"),e=y("./default-message-id-provider"),t=y("readable-stream").Writable,o=y("inherits"),l=y("reinterval"),p=y("rfdc/default"),g=y("./validations"),_=y("xtend"),c=y("debug")("mqttjs:client"),v=d?d.nextTick:function(E){setTimeout(E,0)},R=f.setImmediate||function(E){v(E)},A={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0},W=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],j={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function I(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function P(E,T){if(E.options.protocolVersion===5&&T.cmd==="publish"){let U;T.properties&&(U=T.properties.topicAlias);let q=T.topic.toString();if(E.topicAliasSend)if(U){if(q.length!==0&&(c("applyTopicAlias :: register topic: %s - alias: %d",q,U),!E.topicAliasSend.put(q,U)))return c("applyTopicAlias :: error out of range. topic: %s - alias: %d",q,U),new Error("Sending Topic Alias out of range")}else q.length!==0&&(E.options.autoAssignTopicAlias?(U=E.topicAliasSend.getAliasByTopic(q),U?(T.topic="",T.properties=Re(Te({},T.properties),{topicAlias:U}),c("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",q,U)):(U=E.topicAliasSend.getLruAlias(),E.topicAliasSend.put(q,U),T.properties=Re(Te({},T.properties),{topicAlias:U}),c("applyTopicAlias :: auto assign topic: %s - alias: %d",q,U))):E.options.autoUseTopicAlias&&(U=E.topicAliasSend.getAliasByTopic(q),U&&(T.topic="",T.properties=Re(Te({},T.properties),{topicAlias:U}),c("applyTopicAlias :: auto use topic: %s - alias: %d",q,U))));else if(U)return c("applyTopicAlias :: error out of range. topic: %s - alias: %d",q,U),new Error("Sending Topic Alias out of range")}}function S(E,T){let U;T.properties&&(U=T.properties.topicAlias);let q=T.topic.toString();if(q.length===0){if(typeof U>"u")return new Error("Unregistered Topic Alias");if(q=E.topicAliasSend.getTopicByAlias(U),typeof q>"u")return new Error("Unregistered Topic Alias");T.topic=q}U&&delete T.properties.topicAlias}function V(E,T,U){c("sendPacket :: packet: %O",T),c("sendPacket :: emitting `packetsend`"),E.emit("packetsend",T),c("sendPacket :: writing to stream");let q=r.writeToStream(T,E.stream,E.options);c("sendPacket :: writeToStream result %s",q),!q&&U&&U!==ie?(c("sendPacket :: handle events on `drain` once through callback."),E.stream.once("drain",U)):U&&(c("sendPacket :: invoking cb"),U())}function M(E){E&&(c("flush: queue exists? %b",!!E),Object.keys(E).forEach(function(T){typeof E[T].cb=="function"&&(E[T].cb(new Error("Connection closed")),delete E[T])}))}function ne(E){E&&(c("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(E).forEach(function(T){E[T].volatile&&typeof E[T].cb=="function"&&(E[T].cb(new Error("Connection closed")),delete E[T])}))}function se(E,T,U,q){c("storeAndSend :: store packet with cmd %s to outgoingStore",T.cmd);let re=T,ee;if(re.cmd==="publish"&&(re=p(T),ee=S(E,re),ee))return U&&U(ee);E.outgoingStore.put(re,function(D){if(D)return U&&U(D);q(),V(E,T,U)})}function ie(E){c("nop ::",E)}function G(E,T){let U,q=this;if(!(this instanceof G))return new G(E,T);this.options=T||{};for(U in A)typeof this.options[U]>"u"?this.options[U]=A[U]:this.options[U]=T[U];c("MqttClient :: options.protocol",T.protocol),c("MqttClient :: options.protocolVersion",T.protocolVersion),c("MqttClient :: options.username",T.username),c("MqttClient :: options.keepalive",T.keepalive),c("MqttClient :: options.reconnectPeriod",T.reconnectPeriod),c("MqttClient :: options.rejectUnauthorized",T.rejectUnauthorized),c("MqttClient :: options.topicAliasMaximum",T.topicAliasMaximum),this.options.clientId=typeof T.clientId=="string"?T.clientId:I(),c("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=T.protocolVersion===5&&T.customHandleAcks?T.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=E,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new e:this.options.messageIdProvider,this.outgoingStore=T.outgoingStore||new h,this.incomingStore=T.incomingStore||new h,this.queueQoSZero=T.queueQoSZero===void 0?!0:T.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,T.topicAliasMaximum>0&&(T.topicAliasMaximum>65535?c("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(T.topicAliasMaximum)),this.on("connect",function(){let re=this.queue;function ee(){let H=re.shift();c("deliver :: entry %o",H);let D=null;if(!H){q._resubscribe();return}D=H.packet,c("deliver :: call _sendPacket for %o",D);let X=!0;D.messageId&&D.messageId!==0&&(q.messageIdProvider.register(D.messageId)||(X=!1)),X?q._sendPacket(D,function($){H.cb&&H.cb($),ee()}):(c("messageId: %d has already used. The message is skipped and removed.",D.messageId),ee())}c("connect :: sending queued packets"),ee()}),this.on("close",function(){c("close :: connected set to `false`"),this.connected=!1,c("close :: clearing connackTimer"),clearTimeout(this.connackTimer),c("close :: clearing ping timer"),q.pingTimer!==null&&(q.pingTimer.clear(),q.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),c("close :: calling _setupReconnect"),this._setupReconnect()}),m.call(this),c("MqttClient :: setting up stream"),this._setupStream()}o(G,m),G.prototype._setupStream=function(){let E=this,T=new t,U=r.parser(this.options),q=null,re=[];c("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),c("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),U.on("packet",function($){c("parser :: on packet push to packets array."),re.push($)});function ee(){if(re.length)v(H);else{let $=q;q=null,$()}}function H(){c("work :: getting next packet in queue");let $=re.shift();if($)c("work :: packet pulled from queue"),E._handlePacket($,ee);else{c("work :: no packets in queue");let oe=q;q=null,c("work :: done flag is %s",!!oe),oe&&oe()}}T._write=function($,oe,Z){q=Z,c("writable stream :: parsing buffer"),U.parse($),H()};function D($){c("streamErrorHandler :: error",$.message),W.includes($.code)?(c("streamErrorHandler :: emitting error"),E.emit("error",$)):ie($)}c("_setupStream :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",D),this.stream.on("close",function(){c("(%s)stream :: on close",E.options.clientId),ne(E.outgoing),c("stream: emit close to MqttClient"),E.emit("close")}),c("_setupStream: sending packet `connect`");let X=Object.create(this.options);if(X.cmd="connect",this.topicAliasRecv&&(X.properties||(X.properties={}),this.topicAliasRecv&&(X.properties.topicAliasMaximum=this.topicAliasRecv.max)),V(this,X),U.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return E.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let $=_({cmd:"auth",reasonCode:0},this.options.authPacket);V(this,$)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){c("!!connectTimeout hit!! Calling _cleanUp with force `true`"),E._cleanUp(!0)},this.options.connectTimeout)},G.prototype._handlePacket=function(E,T){let U=this.options;if(U.protocolVersion===5&&U.properties&&U.properties.maximumPacketSize&&U.properties.maximumPacketSize0||!D())&&this._storeProcessingQueue.push({invoke:D,cbStorePut:U.cbStorePut,callback:q}),this},G.prototype.subscribe=function(){let E=this,T=new Array(arguments.length);for(let Z=0;Z0){let te={qos:Y.qos};D===5&&(te.nl=Y.nl||!1,te.rap=Y.rap||!1,te.rh=Y.rh||0,te.properties=Y.properties),E._resubscribeTopics[Y.topic]=te,B.push(Y.topic)}}),E.messageIdToTopic[F.messageId]=B}return E.outgoing[F.messageId]={volatile:!0,cb:function(B,Y){if(!B){let te=Y.granted;for(let O=0;O0||!oe())&&this._storeProcessingQueue.push({invoke:oe,callback:ee}),this},G.prototype.unsubscribe=function(){let E=this,T=new Array(arguments.length);for(let D=0;D0||!H())&&this._storeProcessingQueue.push({invoke:H,callback:q}),this},G.prototype.end=function(E,T,U){let q=this;c("end :: (%s)",this.options.clientId),(E==null||typeof E!="boolean")&&(U=T||ie,T=E,E=!1,typeof T!="object"&&(U=T,T=null,typeof U!="function"&&(U=ie))),typeof T!="object"&&(U=T,T=null),c("end :: cb? %s",!!U),U=U||ie;function re(){c("end :: closeStores: closing incoming and outgoing stores"),q.disconnected=!0,q.incomingStore.close(function(H){q.outgoingStore.close(function(D){if(c("end :: closeStores: emitting end"),q.emit("end"),U){let X=H||D;c("end :: closeStores: invoking callback with args"),U(X)}})}),q._deferredReconnect&&q._deferredReconnect()}function ee(){c("end :: (%s) :: finish :: calling _cleanUp with force %s",q.options.clientId,E),q._cleanUp(E,()=>{c("end :: finish :: calling process.nextTick on closeStores"),v(re.bind(q))},T)}return this.disconnecting?(U(),this):(this._clearReconnect(),this.disconnecting=!0,!E&&Object.keys(this.outgoing).length>0?(c("end :: (%s) :: calling finish in 10ms once outgoing is empty",q.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,ee,10))):(c("end :: (%s) :: immediately calling finish",q.options.clientId),ee()),this)},G.prototype.removeOutgoingMessage=function(E){let T=this.outgoing[E]?this.outgoing[E].cb:null;return delete this.outgoing[E],this.outgoingStore.del({messageId:E},function(){T(new Error("Message removed"))}),this},G.prototype.reconnect=function(E){c("client reconnect");let T=this,U=function(){E?(T.options.incomingStore=E.incomingStore,T.options.outgoingStore=E.outgoingStore):(T.options.incomingStore=null,T.options.outgoingStore=null),T.incomingStore=T.options.incomingStore||new h,T.outgoingStore=T.options.outgoingStore||new h,T.disconnecting=!1,T.disconnected=!1,T._deferredReconnect=null,T._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=U:U(),this},G.prototype._reconnect=function(){c("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),c("client already connected. disconnecting first.")):(c("_reconnect: calling _setupStream"),this._setupStream())},G.prototype._setupReconnect=function(){let E=this;!E.disconnecting&&!E.reconnectTimer&&E.options.reconnectPeriod>0?(this.reconnecting||(c("_setupReconnect :: emit `offline` state"),this.emit("offline"),c("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),c("_setupReconnect :: setting reconnectTimer for %d ms",E.options.reconnectPeriod),E.reconnectTimer=setInterval(function(){c("reconnectTimer :: reconnect triggered!"),E._reconnect()},E.options.reconnectPeriod)):c("_setupReconnect :: doing nothing...")},G.prototype._clearReconnect=function(){c("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},G.prototype._cleanUp=function(E,T){let U=arguments[2];if(T&&(c("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),c("_cleanUp :: forced? %s",E),E)this.options.reconnectPeriod===0&&this.options.clean&&M(this.outgoing),c("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let q=_({cmd:"disconnect"},U);c("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(q,R.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(c("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(c("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),T&&!this.connected&&(c("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",T),T())},G.prototype._sendPacket=function(E,T,U){c("_sendPacket :: (%s) :: start",this.options.clientId),U=U||ie,T=T||ie;let q=P(this,E);if(q){T(q);return}if(!this.connected){if(E.cmd==="auth"){this._shiftPingInterval(),V(this,E,T);return}c("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(E,T,U);return}switch(this._shiftPingInterval(),E.cmd){case"publish":break;case"pubrel":se(this,E,T,U);return;default:V(this,E,T);return}switch(E.qos){case 2:case 1:se(this,E,T,U);break;case 0:default:V(this,E,T);break}c("_sendPacket :: (%s) :: end",this.options.clientId)},G.prototype._storePacket=function(E,T,U){c("_storePacket :: packet: %o",E),c("_storePacket :: cb? %s",!!T),U=U||ie;let q=E;if(q.cmd==="publish"){q=p(E);let re=S(this,q);if(re)return T&&T(re)}(q.qos||0)===0&&this.queueQoSZero||q.cmd!=="publish"?this.queue.push({packet:q,cb:T}):q.qos>0?(T=this.outgoing[q.messageId]?this.outgoing[q.messageId].cb:null,this.outgoingStore.put(q,function(re){if(re)return T&&T(re);U()})):T&&T(new Error("No connection to broker"))},G.prototype._setupPingTimer=function(){c("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);let E=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=l(function(){E._checkPing()},this.options.keepalive*1e3))},G.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(this.options.keepalive*1e3)},G.prototype._checkPing=function(){c("_checkPing :: checking ping..."),this.pingResp?(c("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(c("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},G.prototype._handlePingresp=function(){this.pingResp=!0},G.prototype._handleConnack=function(E){c("_handleConnack");let T=this.options,q=T.protocolVersion===5?E.reasonCode:E.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,E.properties){if(E.properties.topicAliasMaximum){if(E.properties.topicAliasMaximum>65535){this.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}E.properties.topicAliasMaximum>0&&(this.topicAliasSend=new i(E.properties.topicAliasMaximum))}E.properties.serverKeepAlive&&T.keepalive&&(T.keepalive=E.properties.serverKeepAlive,this._shiftPingInterval()),E.properties.maximumPacketSize&&(T.properties||(T.properties={}),T.properties.maximumPacketSize=E.properties.maximumPacketSize)}if(q===0)this.reconnecting=!1,this._onConnect(E);else if(q>0){let re=new Error("Connection refused: "+j[q]);re.code=q,this.emit("error",re)}},G.prototype._handleAuth=function(E){let U=this.options.protocolVersion,q=U===5?E.reasonCode:E.returnCode;if(U!==5){let ee=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+U);ee.code=q,this.emit("error",ee);return}let re=this;this.handleAuth(E,function(ee,H){if(ee){re.emit("error",ee);return}if(q===24)re.reconnecting=!1,re._sendPacket(H);else{let D=new Error("Connection refused: "+j[q]);ee.code=q,re.emit("error",D)}})},G.prototype.handleAuth=function(E,T){T()},G.prototype._handlePublish=function(E,T){c("_handlePublish: packet %o",E),T=typeof T<"u"?T:ie;let U=E.topic.toString(),q=E.payload,re=E.qos,ee=E.messageId,H=this,D=this.options,X=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let $;if(E.properties&&($=E.properties.topicAlias),typeof $<"u")if(U.length===0)if($>0&&$<=65535){let oe=this.topicAliasRecv.getTopicByAlias($);if(oe)U=oe,c("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",U,$);else{c("_handlePublish :: unregistered topic alias. alias: %d",$),this.emit("error",new Error("Received unregistered Topic Alias"));return}}else{c("_handlePublish :: topic alias out of range. alias: %d",$),this.emit("error",new Error("Received Topic Alias is out of range"));return}else if(this.topicAliasRecv.put(U,$))c("_handlePublish :: registered topic: %s - alias: %d",U,$);else{c("_handlePublish :: topic alias out of range. alias: %d",$),this.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(c("_handlePublish: qos %d",re),re){case 2:{D.customHandleAcks(U,q,E,function($,oe){if($ instanceof Error||(oe=$,$=null),$)return H.emit("error",$);if(X.indexOf(oe)===-1)return H.emit("error",new Error("Wrong reason code for pubrec"));oe?H._sendPacket({cmd:"pubrec",messageId:ee,reasonCode:oe},T):H.incomingStore.put(E,function(){H._sendPacket({cmd:"pubrec",messageId:ee},T)})});break}case 1:{D.customHandleAcks(U,q,E,function($,oe){if($ instanceof Error||(oe=$,$=null),$)return H.emit("error",$);if(X.indexOf(oe)===-1)return H.emit("error",new Error("Wrong reason code for puback"));oe||H.emit("message",U,q,E),H.handleMessage(E,function(Z){if(Z)return T&&T(Z);H._sendPacket({cmd:"puback",messageId:ee,reasonCode:oe},T)})});break}case 0:this.emit("message",U,q,E),this.handleMessage(E,T);break;default:c("_handlePublish: unknown QoS. Doing nothing.");break}},G.prototype.handleMessage=function(E,T){T()},G.prototype._handleAck=function(E){let T=E.messageId,U=E.cmd,q=null,re=this.outgoing[T]?this.outgoing[T].cb:null,ee=this,H;if(!re){c("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(c("_handleAck :: packet type",U),U){case"pubcomp":case"puback":{let D=E.reasonCode;D&&D>0&&D!==16&&(H=new Error("Publish error: "+j[D]),H.code=D,re(H,E)),delete this.outgoing[T],this.outgoingStore.del(E,re),this.messageIdProvider.deallocate(T),this._invokeStoreProcessingQueue();break}case"pubrec":{q={cmd:"pubrel",qos:2,messageId:T};let D=E.reasonCode;D&&D>0&&D!==16?(H=new Error("Publish error: "+j[D]),H.code=D,re(H,E)):this._sendPacket(q);break}case"suback":{delete this.outgoing[T],this.messageIdProvider.deallocate(T);for(let D=0;D0)if(this.options.resubscribe)if(this.options.protocolVersion===5){c("_resubscribe: protocolVersion 5");for(let T=0;T0){let E=this._storeProcessingQueue[0];if(E&&E.invoke())return this._storeProcessingQueue.shift(),!0}return!1},G.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},G.prototype._flushStoreProcessingQueue=function(){for(let E of this._storeProcessingQueue)E.cbStorePut&&E.cbStorePut(new Error("Connection closed")),E.callback&&E.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},k.exports=G}).call(this)}).call(this,y("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-message-id-provider":12,"./store":13,"./topic-alias-recv":14,"./topic-alias-send":15,"./validations":16,_process:85,debug:20,events:4,inherits:24,"mqtt-packet":48,"readable-stream":72,reinterval:73,"rfdc/default":74,xtend:82}],7:[function(y,k,x){"use strict";let{Buffer:d}=y("buffer"),f=y("readable-stream").Transform,m=y("duplexify"),h,s,i,r=!1;function e(){let g=new f;return g._write=function(_,c,v){h.sendSocketMessage({data:_.buffer,success:function(){v()},fail:function(){v(new Error)}})},g._flush=function(c){h.closeSocket({success:function(){c()}})},g}function t(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function o(g,_){let c=g.protocol==="alis"?"wss":"ws",v=c+"://"+g.hostname+g.path;return g.port&&g.port!==80&&g.port!==443&&(v=c+"://"+g.hostname+":"+g.port+g.path),typeof g.transformWsUrl=="function"&&(v=g.transformWsUrl(v,g,_)),v}function l(){r||(r=!0,h.onSocketOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onSocketMessage(function(g){if(typeof g.data=="string"){let _=d.from(g.data,"base64");s.push(_)}else{let _=new FileReader;_.addEventListener("load",function(){let c=_.result;c instanceof ArrayBuffer?c=d.from(c):c=d.from(c,"utf8"),s.push(c)}),_.readAsArrayBuffer(g.data)}}),h.onSocketClose(function(){i.end(),i.destroy()}),h.onSocketError(function(g){i.destroy(g)}))}function p(g,_){if(_.hostname=_.hostname||_.host,!_.hostname)throw new Error("Could not determine host. Specify host manually.");let c=_.protocolId==="MQIsdp"&&_.protocolVersion===3?"mqttv3.1":"mqtt";t(_);let v=o(_,g);return h=_.my,h.connectSocket({url:v,protocols:c}),s=e(),i=m.obj(),l(),i}k.exports=p},{buffer:3,duplexify:22,"readable-stream":72}],8:[function(y,k,x){"use strict";let d=y("net"),f=y("debug")("mqttjs:tcp");function m(h,s){s.port=s.port||1883,s.hostname=s.hostname||s.host||"localhost";let i=s.port,r=s.hostname;return f("port %d and host %s",i,r),d.createConnection(i,r)}k.exports=m},{debug:20,net:2}],9:[function(y,k,x){"use strict";let d=y("tls"),f=y("net"),m=y("debug")("mqttjs:tls");function h(s,i){i.port=i.port||8883,i.host=i.hostname||i.host||"localhost",f.isIP(i.host)===0&&(i.servername=i.host),i.rejectUnauthorized=i.rejectUnauthorized!==!1,delete i.path,m("port %d host %s rejectUnauthorized %b",i.port,i.host,i.rejectUnauthorized);let r=d.connect(i);r.on("secureConnect",function(){i.rejectUnauthorized&&!r.authorized?r.emit("error",new Error("TLS not authorized")):r.removeListener("error",e)});function e(t){i.rejectUnauthorized&&s.emit("error",t),r.end()}return r.on("error",e),r}k.exports=h},{debug:20,net:2,tls:2}],10:[function(y,k,x){(function(d){(function(){"use strict";let{Buffer:f}=y("buffer"),m=y("ws"),h=y("debug")("mqttjs:ws"),s=y("duplexify"),i=y("readable-stream").Transform,r=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],e=typeof d<"u"&&d.title==="browser"||typeof __webpack_require__=="function";function t(v,R){let A=v.protocol+"://"+v.hostname+":"+v.port+v.path;return typeof v.transformWsUrl=="function"&&(A=v.transformWsUrl(A,v,R)),A}function o(v){let R=v;return v.hostname||(R.hostname="localhost"),v.port||(v.protocol==="wss"?R.port=443:R.port=80),v.path||(R.path="/"),v.wsOptions||(R.wsOptions={}),!e&&v.protocol==="wss"&&r.forEach(function(A){Object.prototype.hasOwnProperty.call(v,A)&&!Object.prototype.hasOwnProperty.call(v.wsOptions,A)&&(R.wsOptions[A]=v[A])}),R}function l(v){let R=o(v);if(R.hostname||(R.hostname=R.host),!R.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let A=new URL(document.URL);R.hostname=A.hostname,R.port||(R.port=A.port)}return R.objectMode===void 0&&(R.objectMode=!(R.binary===!0||R.binary===void 0)),R}function p(v,R,A){h("createWebSocket"),h("protocol: "+A.protocolId+" "+A.protocolVersion);let W=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt";return h("creating new Websocket for url: "+R+" and protocol: "+W),new m(R,[W],A.wsOptions)}function g(v,R){let A=R.protocolId==="MQIsdp"&&R.protocolVersion===3?"mqttv3.1":"mqtt",W=t(R,v),j=new WebSocket(W,[A]);return j.binaryType="arraybuffer",j}function _(v,R){h("streamBuilder");let A=o(R),W=t(A,v),j=p(v,W,A),I=m.createWebSocketStream(j,A.wsOptions);return I.url=W,j.on("close",()=>{I.destroy()}),I}function c(v,R){h("browserStreamBuilder");let A,j=l(R).browserBufferSize||1024*512,I=R.browserBufferTimeout||1e3,P=!R.objectMode,S=g(v,R),V=ne(R,U,q);R.objectMode||(V._writev=T),V.on("close",()=>{S.close()});let M=typeof S.addEventListener<"u";S.readyState===S.OPEN?A=V:(A=A=s(void 0,void 0,R),R.objectMode||(A._writev=T),M?S.addEventListener("open",se):S.onopen=se),A.socket=S,M?(S.addEventListener("close",ie),S.addEventListener("error",G),S.addEventListener("message",E)):(S.onclose=ie,S.onerror=G,S.onmessage=E);function ne(re,ee,H){let D=new i({objectModeMode:re.objectMode});return D._write=ee,D._flush=H,D}function se(){A.setReadable(V),A.setWritable(V),A.emit("connect")}function ie(){A.end(),A.destroy()}function G(re){A.destroy(re)}function E(re){let ee=re.data;ee instanceof ArrayBuffer?ee=f.from(ee):ee=f.from(ee,"utf8"),V.push(ee)}function T(re,ee){let H=new Array(re.length);for(let D=0;Dj&&setTimeout(U,I,re,ee,H),P&&typeof re=="string"&&(re=f.from(re,"utf8"));try{S.send(re)}catch(D){return H(D)}H()}function q(re){S.close(),re()}return A}e?k.exports=c:k.exports=_}).call(this)}).call(this,y("_process"))},{_process:85,buffer:3,debug:20,duplexify:22,"readable-stream":72,ws:81}],11:[function(y,k,x){"use strict";let{Buffer:d}=y("buffer"),f=y("readable-stream").Transform,m=y("duplexify"),h,s,i;function r(){let p=new f;return p._write=function(g,_,c){h.send({data:g.buffer,success:function(){c()},fail:function(v){c(new Error(v))}})},p._flush=function(_){h.close({success:function(){_()}})},p}function e(p){p.hostname||(p.hostname="localhost"),p.path||(p.path="/"),p.wsOptions||(p.wsOptions={})}function t(p,g){let _=p.protocol==="wxs"?"wss":"ws",c=_+"://"+p.hostname+p.path;return p.port&&p.port!==80&&p.port!==443&&(c=_+"://"+p.hostname+":"+p.port+p.path),typeof p.transformWsUrl=="function"&&(c=p.transformWsUrl(c,p,g)),c}function o(){h.onOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onMessage(function(p){let g=p.data;g instanceof ArrayBuffer?g=d.from(g):g=d.from(g,"utf8"),s.push(g)}),h.onClose(function(){i.end(),i.destroy()}),h.onError(function(p){i.destroy(new Error(p.errMsg))})}function l(p,g){if(g.hostname=g.hostname||g.host,!g.hostname)throw new Error("Could not determine host. Specify host manually.");let _=g.protocolId==="MQIsdp"&&g.protocolVersion===3?"mqttv3.1":"mqtt";e(g);let c=t(g,p);h=wx.connectSocket({url:c,protocols:[_]}),s=r(),i=m.obj(),i._destroy=function(R,A){h.close({success:function(){A&&A(R)}})};let v=i.destroy;return i.destroy=(function(){i.destroy=v;let R=this;setTimeout(function(){h.close({fail:function(){R._destroy(new Error)}})},0)}).bind(i),o(),i}k.exports=l},{buffer:3,duplexify:22,"readable-stream":72}],12:[function(y,k,x){"use strict";function d(){if(!(this instanceof d))return new d;this.nextId=Math.max(1,Math.floor(Math.random()*65535))}d.prototype.allocate=function(){let f=this.nextId++;return this.nextId===65536&&(this.nextId=1),f},d.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},d.prototype.register=function(f){return!0},d.prototype.deallocate=function(f){},d.prototype.clear=function(){},k.exports=d},{}],13:[function(y,k,x){"use strict";let d=y("xtend"),f=y("readable-stream").Readable,m={objectMode:!0},h={clean:!0};function s(i){if(!(this instanceof s))return new s(i);this.options=i||{},this.options=d(h,i),this._inflights=new Map}s.prototype.put=function(i,r){return this._inflights.set(i.messageId,i),r&&r(),this},s.prototype.createStream=function(){let i=new f(m),r=[],e=!1,t=0;return this._inflights.forEach(function(o,l){r.push(o)}),i._read=function(){!e&&tthis.max?!1:(this.aliasToTopic[m]=f,this.length=Object.keys(this.aliasToTopic).length,!0)},d.prototype.getTopicByAlias=function(f){return this.aliasToTopic[f]},d.prototype.clear=function(){this.aliasToTopic={}},k.exports=d},{}],15:[function(y,k,x){"use strict";let d=y("lru-cache"),f=y("number-allocator").NumberAllocator;function m(h){if(!(this instanceof m))return new m(h);h>0&&(this.aliasToTopic=new d({max:h}),this.topicToAlias={},this.numberAllocator=new f(1,h),this.max=h,this.length=0)}m.prototype.put=function(h,s){if(s===0||s>this.max)return!1;let i=this.aliasToTopic.get(s);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(s,h),this.topicToAlias[h]=s,this.numberAllocator.use(s),this.length=this.aliasToTopic.length,!0},m.prototype.getTopicByAlias=function(h){return this.aliasToTopic.get(h)},m.prototype.getAliasByTopic=function(h){let s=this.topicToAlias[h];return typeof s<"u"&&this.aliasToTopic.get(s),s},m.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},m.prototype.getLruAlias=function(){let h=this.numberAllocator.firstVacant();return h||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},k.exports=m},{"lru-cache":45,"number-allocator":54}],16:[function(y,k,x){"use strict";function d(m){let h=m.split("/");for(let s=0;sthis.length||s<0)return;let i=this._offset(s);return this._bufs[i[0]][i[1]]},m.prototype.slice=function(s,i){return typeof s=="number"&&s<0&&(s+=this.length),typeof i=="number"&&i<0&&(i+=this.length),this.copy(null,0,s,i)},m.prototype.copy=function(s,i,r,e){if((typeof r!="number"||r<0)&&(r=0),(typeof e!="number"||e>this.length)&&(e=this.length),r>=this.length||e<=0)return s||d.alloc(0);let t=!!s,o=this._offset(r),l=e-r,p=l,g=t&&i||0,_=o[1];if(r===0&&e===this.length){if(!t)return this._bufs.length===1?this._bufs[0]:d.concat(this._bufs,this.length);for(let c=0;cv)this._bufs[c].copy(s,g,_),g+=v;else{this._bufs[c].copy(s,g,_,_+p),g+=v;break}p-=v,_&&(_=0)}return s.length>g?s.slice(0,g):s},m.prototype.shallowSlice=function(s,i){if(s=s||0,i=typeof i!="number"?this.length:i,s<0&&(s+=this.length),i<0&&(i+=this.length),s===i)return this._new();let r=this._offset(s),e=this._offset(i),t=this._bufs.slice(r[0],e[0]+1);return e[1]===0?t.pop():t[t.length-1]=t[t.length-1].slice(0,e[1]),r[1]!==0&&(t[0]=t[0].slice(r[1])),this._new(t)},m.prototype.toString=function(s,i,r){return this.slice(i,r).toString(s)},m.prototype.consume=function(s){if(s=Math.trunc(s),Number.isNaN(s)||s<=0)return this;for(;this._bufs.length;)if(s>=this._bufs[0].length)s-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(s),this.length-=s;break}return this},m.prototype.duplicate=function(){let s=this._new();for(let i=0;ithis.length?this.length:s;let r=this._offset(s),e=r[0],t=r[1];for(;e=h.length){let p=o.indexOf(h,t);if(p!==-1)return this._reverseOffset([e,p]);t=o.length-h.length+1}else{let p=this._reverseOffset([e,t]);if(this._match(p,h))return p;t++}t=0}return-1},m.prototype._match=function(h,s){if(this.length-h{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),x.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function f(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function m(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+k.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let o=0,l=0;e[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(o++,p==="%c"&&(l=o))}),e.splice(l,0,t)}x.log=console.debug||console.log||(()=>{});function h(e){try{e?x.storage.setItem("debug",e):x.storage.removeItem("debug")}catch{}}function s(){let e;try{e=x.storage.getItem("debug")}catch{}return!e&&typeof d<"u"&&"env"in d&&(e=d.env.DEBUG),e}function i(){try{return localStorage}catch{}}k.exports=y("./common")(x);let{formatters:r}=k.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this)}).call(this,y("_process"))},{"./common":21,_process:85}],21:[function(y,k,x){function d(f){h.debug=h,h.default=h,h.coerce=o,h.disable=r,h.enable=i,h.enabled=e,h.humanize=y("ms"),h.destroy=l,Object.keys(f).forEach(p=>{h[p]=f[p]}),h.names=[],h.skips=[],h.formatters={};function m(p){let g=0;for(let _=0;_{if(V==="%%")return"%";P++;let ne=h.formatters[M];if(typeof ne=="function"){let se=A[P];V=ne.call(W,se),A.splice(P,1),P--}return V}),h.formatArgs.call(W,A),(W.log||h.log).apply(W,A)}return R.namespace=p,R.useColors=h.useColors(),R.color=h.selectColor(p),R.extend=s,R.destroy=h.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(c!==h.namespaces&&(c=h.namespaces,v=h.enabled(p)),v),set:A=>{_=A}}),typeof h.init=="function"&&h.init(R),R}function s(p,g){let _=h(this.namespace+(typeof g>"u"?":":g)+p);return _.log=this.log,_}function i(p){h.save(p),h.namespaces=p,h.names=[],h.skips=[];let g,_=(typeof p=="string"?p:"").split(/[\s,]+/),c=_.length;for(g=0;g"-"+g)].join(",");return h.enable(""),p}function e(p){if(p[p.length-1]==="*")return!0;let g,_;for(g=0,_=h.skips.length;g<_;g++)if(h.skips[g].test(p))return!1;for(g=0,_=h.names.length;g<_;g++)if(h.names[g].test(p))return!0;return!1}function t(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}function o(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return h.enable(h.load()),h}k.exports=d},{ms:53}],22:[function(y,k,x){(function(d,f){(function(){var m=y("readable-stream"),h=y("end-of-stream"),s=y("inherits"),i=y("stream-shift"),r=f.from&&f.from!==Uint8Array.from?f.from([0]):new f([0]),e=function(c,v){c._corked?c.once("uncork",v):v()},t=function(c,v){c._autoDestroy&&c.destroy(v)},o=function(c,v){return function(R){R?t(c,R.message==="premature close"?null:R):v&&!c._ended&&c.end()}},l=function(c,v){if(!c||c._writableState&&c._writableState.finished)return v();if(c._writableState)return c.end(v);c.end(),v()},p=function(){},g=function(c){return new m.Readable({objectMode:!0,highWaterMark:16}).wrap(c)},_=function(c,v,R){if(!(this instanceof _))return new _(c,v,R);m.Duplex.call(this,R),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!R||R.autoDestroy!==!1,this._forwardDestroy=!R||R.destroy!==!1,this._forwardEnd=!R||R.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,c&&this.setWritable(c),v&&this.setReadable(v)};s(_,m.Duplex),_.obj=function(c,v,R){return R||(R={}),R.objectMode=!0,R.highWaterMark=16,new _(c,v,R)},_.prototype.cork=function(){++this._corked===1&&this.emit("cork")},_.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},_.prototype.setWritable=function(c){if(this._unwrite&&this._unwrite(),this.destroyed){c&&c.destroy&&c.destroy();return}if(c===null||c===!1){this.end();return}var v=this,R=h(c,{writable:!0,readable:!1},o(this,this._forwardEnd)),A=function(){var j=v._ondrain;v._ondrain=null,j&&j()},W=function(){v._writable.removeListener("drain",A),R()};this._unwrite&&d.nextTick(A),this._writable=c,this._writable.on("drain",A),this._unwrite=W,this.uncork()},_.prototype.setReadable=function(c){if(this._unread&&this._unread(),this.destroyed){c&&c.destroy&&c.destroy();return}if(c===null||c===!1){this.push(null),this.resume();return}var v=this,R=h(c,{writable:!1,readable:!0},o(this)),A=function(){v._forward()},W=function(){v.push(null)},j=function(){v._readable2.removeListener("readable",A),v._readable2.removeListener("end",W),R()};this._drained=!0,this._readable=c,this._readable2=c._readableState?c:g(c),this._readable2.on("readable",A),this._readable2.on("end",W),this._unread=j,this._forward()},_.prototype._read=function(){this._drained=!0,this._forward()},_.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var c;this._drained&&(c=i(this._readable2))!==null;)this.destroyed||(this._drained=this.push(c));this._forwarding=!1}},_.prototype.destroy=function(c,v){if(v||(v=p),this.destroyed)return v(null);this.destroyed=!0;var R=this;d.nextTick(function(){R._destroy(c),v(null)})},_.prototype._destroy=function(c){if(c){var v=this._ondrain;this._ondrain=null,v?v(c):this.emit("error",c)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},_.prototype._write=function(c,v,R){if(!this.destroyed){if(this._corked)return e(this,this._write.bind(this,c,v,R));if(c===r)return this._finish(R);if(!this._writable)return R();this._writable.write(c)===!1?this._ondrain=R:this.destroyed||R()}},_.prototype._finish=function(c){var v=this;this.emit("preend"),e(this,function(){l(v._forwardEnd&&v._writable,function(){v._writableState.prefinished===!1&&(v._writableState.prefinished=!0),v.emit("prefinish"),e(v,c)})})},_.prototype.end=function(c,v,R){return typeof c=="function"?this.end(null,null,c):typeof v=="function"?this.end(c,null,v):(this._ended=!0,c&&this.write(c),!this._writableState.ending&&!this._writableState.destroyed&&this.write(r),m.Writable.prototype.end.call(this,R))},k.exports=_}).call(this)}).call(this,y("_process"),y("buffer").Buffer)},{_process:85,buffer:3,"end-of-stream":23,inherits:24,"readable-stream":72,"stream-shift":77}],23:[function(y,k,x){(function(d){(function(){var f=y("once"),m=function(){},h=function(r){return r.setHeader&&typeof r.abort=="function"},s=function(r){return r.stdio&&Array.isArray(r.stdio)&&r.stdio.length===3},i=function(r,e,t){if(typeof e=="function")return i(r,null,e);e||(e={}),t=f(t||m);var o=r._writableState,l=r._readableState,p=e.readable||e.readable!==!1&&r.readable,g=e.writable||e.writable!==!1&&r.writable,_=!1,c=function(){r.writable||v()},v=function(){g=!1,p||t.call(r)},R=function(){p=!1,g||t.call(r)},A=function(S){t.call(r,S?new Error("exited with error code: "+S):null)},W=function(S){t.call(r,S)},j=function(){d.nextTick(I)},I=function(){if(!_){if(p&&!(l&&l.ended&&!l.destroyed))return t.call(r,new Error("premature close"));if(g&&!(o&&o.ended&&!o.destroyed))return t.call(r,new Error("premature close"))}},P=function(){r.req.on("finish",v)};return h(r)?(r.on("complete",v),r.on("abort",j),r.req?P():r.on("request",P)):g&&!o&&(r.on("end",c),r.on("close",c)),s(r)&&r.on("exit",A),r.on("end",R),r.on("finish",v),e.error!==!1&&r.on("error",W),r.on("close",j),function(){_=!0,r.removeListener("complete",v),r.removeListener("abort",j),r.removeListener("request",P),r.req&&r.req.removeListener("finish",v),r.removeListener("end",c),r.removeListener("close",c),r.removeListener("finish",v),r.removeListener("exit",A),r.removeListener("end",R),r.removeListener("error",W),r.removeListener("close",j)}};k.exports=i}).call(this)}).call(this,y("_process"))},{_process:85,once:56}],24:[function(y,k,x){typeof Object.create=="function"?k.exports=function(f,m){m&&(f.super_=m,f.prototype=Object.create(m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(f,m){if(m){f.super_=m;var h=function(){};h.prototype=m.prototype,f.prototype=new h,f.prototype.constructor=f}}},{}],25:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.ContainerIterator=x.Container=x.Base=void 0;class d{constructor(s=0){this.iteratorType=s}equals(s){return this.o===s.o}}x.ContainerIterator=d;class f{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}}x.Base=f;class m extends f{}x.Container=m},{}],26:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.HashContainerIterator=x.HashContainer=void 0;var d=y("../../ContainerBase"),f=h(y("../../../utils/checkObject")),m=y("../../../utils/throwError");function h(r){return r&&r.t?r:{default:r}}class s extends d.ContainerIterator{constructor(e,t,o){super(o),this.o=e,this.h=t,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.L,this})}}x.HashContainerIterator=s;class i extends d.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(e){let{L:t,B:o}=e;t.B=o,o.L=t,e===this.p&&(this.p=o),e===this._&&(this._=t),this.i-=1}M(e,t,o){o===void 0&&(o=(0,f.default)(e));let l;if(o){let p=e[this.HASH_TAG];if(p!==void 0)return this.H[p].l=t,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),l={u:e,l:t,L:this._,B:this.h},this.H.push(l)}else{let p=this.g[e];if(p)return p.l=t,this.i;l={u:e,l:t,L:this._,B:this.h},this.g[e]=l}return this.i===0?(this.p=l,this.h.B=l):this._.B=l,this._=l,this.h.L=l,++this.i}I(e,t){if(t===void 0&&(t=(0,f.default)(e)),t){let o=e[this.HASH_TAG];return o===void 0?this.h:this.H[o]}else return this.g[e]||this.h}clear(){let e=this.HASH_TAG;this.H.forEach(function(t){delete t.u[e]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(e,t){let o;if(t===void 0&&(t=(0,f.default)(e)),t){let l=e[this.HASH_TAG];if(l===void 0)return!1;delete e[this.HASH_TAG],o=this.H[l],delete this.H[l]}else{if(o=this.g[e],o===void 0)return!1;delete this.g[e]}return this.V(o),!0}eraseElementByIterator(e){let t=e.o;return t===this.h&&(0,m.throwIteratorAccessError)(),this.V(t),e.next()}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let t=this.p;for(;e--;)t=t.B;return this.V(t),this.i}}x.HashContainer=i},{"../../../utils/checkObject":43,"../../../utils/throwError":44,"../../ContainerBase":25}],27:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("./Base"),f=h(y("../../utils/checkObject")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends d.HashContainerIterator{constructor(t,o,l,p){super(t,o,p),this.container=l}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,l){if(l==="0")return t.o.u;if(l==="1")return t.o.l},set(o,l,p){if(l!=="1")throw new TypeError("props must be 1");return t.o.l=p,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends d.HashContainer{constructor(t=[]){super();let o=this;t.forEach(function(l){o.setElement(l[0],l[1])})}begin(){return new s(this.p,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this._,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(t,o,l){return this.M(t,o,l)}getElementByKey(t,o){if(o===void 0&&(o=(0,f.default)(t)),o){let p=t[this.HASH_TAG];return p!==void 0?this.H[p].l:void 0}let l=this.g[t];return l?l.l:void 0}getElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return[o.u,o.l]}find(t,o){let l=this.I(t,o);return new s(l,this.h,this)}forEach(t){let o=0,l=this.p;for(;l!==this.h;)t([l.u,l.l],o++,this),l=l.B}[Symbol.iterator](){return(function*(){let t=this.p;for(;t!==this.h;)yield[t.u,t.l],t=t.B}).bind(this)()}}var r=i;x.default=r},{"../../utils/checkObject":43,"../../utils/throwError":44,"./Base":26}],28:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("./Base"),f=y("../../utils/throwError");class m extends d.HashContainerIterator{constructor(r,e,t,o){super(r,e,o),this.container=t}get pointer(){return this.o===this.h&&(0,f.throwIteratorAccessError)(),this.o.u}copy(){return new m(this.o,this.h,this.container,this.iteratorType)}}class h extends d.HashContainer{constructor(r=[]){super();let e=this;r.forEach(function(t){e.insert(t)})}begin(){return new m(this.p,this.h,this)}end(){return new m(this.h,this.h,this)}rBegin(){return new m(this._,this.h,this,1)}rEnd(){return new m(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(r,e){return this.M(r,void 0,e)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e=this.p;for(;r--;)e=e.B;return e.u}find(r,e){let t=this.I(r,e);return new m(t,this.h,this)}forEach(r){let e=0,t=this.p;for(;t!==this.h;)r(t.u,e++,this),t=t.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield r.u,r=r.B}).bind(this)()}}var s=h;x.default=s},{"../../utils/throwError":44,"./Base":26}],29:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("../ContainerBase");class f extends d.Base{constructor(s=[],i=function(e,t){return e>t?-1:e>1;for(let t=this.i-1>>1;t>=0;--t)this.k(t,e)}m(s){let i=this.C[s];for(;s>0;){let r=s-1>>1,e=this.C[r];if(this.v(e,i)<=0)break;this.C[s]=e,s=r}this.C[s]=i}k(s,i){let r=this.C[s];for(;s0&&(e=t,o=this.C[t]),this.v(o,r)>=0)break;this.C[s]=o,s=e}this.C[s]=r}clear(){this.i=0,this.C.length=0}push(s){this.C.push(s),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let s=this.C[0],i=this.C.pop();return this.i-=1,this.i&&(this.C[0]=i,this.k(0,this.i>>1)),s}top(){return this.C[0]}find(s){return this.C.indexOf(s)>=0}remove(s){let i=this.C.indexOf(s);return i<0?!1:(i===0?this.pop():i===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(i,1,this.C.pop()),this.i-=1,this.m(i),this.k(i,this.i>>1)),!0)}updateItem(s){let i=this.C.indexOf(s);return i<0?!1:(this.m(i),this.k(i,this.i>>1),!0)}toArray(){return[...this.C]}}var m=f;x.default=m},{"../ContainerBase":25}],30:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("../ContainerBase");class f extends d.Base{constructor(s=[]){super(),this.j=0,this.q=[];let i=this;s.forEach(function(r){i.push(r)})}clear(){this.q=[],this.i=this.j=0}push(s){let i=this.q.length;if(this.j/i>.5&&this.j+this.i>=i&&i>4096){let r=this.i;for(let e=0;e{if(typeof e.length=="number")return e.length;if(typeof e.size=="number")return e.size;if(typeof e.size=="function")return e.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=t,this.P=Math.max(Math.ceil(o/this.F),1);for(let g=0;g>1)-(l>>1),this.D=this.N=this.F-o%this.F>>1;let p=this;e.forEach(function(g){p.pushBack(g)})}T(){let e=[],t=Math.max(this.P>>1,1);for(let o=0;o>1}begin(){return new h(0,this)}end(){return new h(this.i,this)}rBegin(){return new h(this.i-1,this,1)}rEnd(){return new h(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(e){return this.i&&(this.N0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}pushFront(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}popFront(){if(this.i===0)return;let e=this.A[this.j][this.D];return this.i!==1&&(this.Dthis.i-1)throw new RangeError;let{curNodeBucketIndex:t,curNodePointerIndex:o}=this.O(e);return this.A[t][o]}setElementByPos(e,t){if(e<0||e>this.i-1)throw new RangeError;let{curNodeBucketIndex:o,curNodePointerIndex:l}=this.O(e);this.A[o][l]=t}insert(e,t,o=1){if(e<0||e>this.i)throw new RangeError;if(e===0)for(;o--;)this.pushFront(t);else if(e===this.i)for(;o--;)this.pushBack(t);else{let l=[];for(let p=e;pthis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else{let t=[];for(let l=e+1;le;)this.popBack();return this.i}sort(e){let t=[];for(let o=0;othis.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return o.l}eraseElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return this.V(o),this.i}eraseElementByValue(t){let o=this.p;for(;o!==this.h;)o.l===t&&this.V(o),o=o.B;return this.i}eraseElementByIterator(t){let o=t.o;return o===this.h&&(0,m.throwIteratorAccessError)(),t=t.next(),this.V(o),t}pushBack(t){return this.G(t,this._),this.i}popBack(){if(this.i===0)return;let t=this._.l;return this.V(this._),t}pushFront(t){return this.G(t,this.h),this.i}popFront(){if(this.i===0)return;let t=this.p.l;return this.V(this.p),t}setElementByPos(t,o){if(t<0||t>this.i-1)throw new RangeError;let l=this.p;for(;t--;)l=l.B;l.l=o}insert(t,o,l=1){if(t<0||t>this.i)throw new RangeError;if(l<=0)return this.i;if(t===0)for(;l--;)this.pushFront(o);else if(t===this.i)for(;l--;)this.pushBack(o);else{let p=this.p;for(let _=1;_this.i-1)throw new RangeError;return this.J[e]}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}eraseElementByValue(e){let t=0;for(let o=0;othis.i-1)throw new RangeError;this.J[e]=t}insert(e,t,o=1){if(e<0||e>this.i)throw new RangeError;return this.J.splice(e,0,...new Array(o).fill(t)),this.i+=o,this.i}find(e){for(let t=0;to?1:0},e=!1){super(),this.Y=void 0,this.v=r,e?(this.re=d.TreeNodeEnableIndex,this.M=function(t,o,l){let p=this.ne(t,o,l);if(p){let g=p.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let _=this.he(p);if(_){let{parentNode:c,grandParent:v,curNode:R}=_;c.ie(),v.ie(),R.ie()}}return this.i},this.V=function(t){let o=this.fe(t);for(;o!==this.h;)o.rt-=1,o=o.tt}):(this.re=d.TreeNode,this.M=function(t,o,l){let p=this.ne(t,o,l);return p&&this.he(p),this.i},this.V=this.fe),this.h=new this.re}X(r,e){let t=this.h;for(;r;){let o=this.v(r.u,e);if(o<0)r=r.W;else if(o>0)t=r,r=r.U;else return r}return t}Z(r,e){let t=this.h;for(;r;)this.v(r.u,e)<=0?r=r.W:(t=r,r=r.U);return t}$(r,e){let t=this.h;for(;r;){let o=this.v(r.u,e);if(o<0)t=r,r=r.W;else if(o>0)r=r.U;else return r}return t}rr(r,e){let t=this.h;for(;r;)this.v(r.u,e)<0?(t=r,r=r.W):r=r.U;return t}ue(r){for(;;){let e=r.tt;if(e===this.h)return;if(r.ee===1){r.ee=0;return}if(r===e.U){let t=e.W;if(t.ee===1)t.ee=0,e.ee=1,e===this.Y?this.Y=e.te():e.te();else if(t.W&&t.W.ee===1){t.ee=e.ee,e.ee=0,t.W.ee=0,e===this.Y?this.Y=e.te():e.te();return}else t.U&&t.U.ee===1?(t.ee=1,t.U.ee=0,t.se()):(t.ee=1,r=e)}else{let t=e.U;if(t.ee===1)t.ee=0,e.ee=1,e===this.Y?this.Y=e.se():e.se();else if(t.U&&t.U.ee===1){t.ee=e.ee,e.ee=0,t.U.ee=0,e===this.Y?this.Y=e.se():e.se();return}else t.W&&t.W.ee===1?(t.ee=1,t.W.ee=0,t.te()):(t.ee=1,r=e)}}}fe(r){if(this.i===1)return this.clear(),this.h;let e=r;for(;e.U||e.W;){if(e.W)for(e=e.W;e.U;)e=e.U;else e=e.U;[r.u,e.u]=[e.u,r.u],[r.l,e.l]=[e.l,r.l],r=e}this.h.U===e?this.h.U=e.tt:this.h.W===e&&(this.h.W=e.tt),this.ue(e);let t=e.tt;return e===t.U?t.U=void 0:t.W=void 0,this.i-=1,this.Y.ee=0,t}oe(r,e){return r===void 0?!1:this.oe(r.U,e)||e(r)?!0:this.oe(r.W,e)}he(r){for(;;){let e=r.tt;if(e.ee===0)return;let t=e.tt;if(e===t.U){let o=t.W;if(o&&o.ee===1){if(o.ee=e.ee=0,t===this.Y)return;t.ee=1,r=t;continue}else if(r===e.W){if(r.ee=0,r.U&&(r.U.tt=e),r.W&&(r.W.tt=t),e.W=r.U,t.U=r.W,r.U=e,r.W=t,t===this.Y)this.Y=r,this.h.tt=r;else{let l=t.tt;l.U===t?l.U=r:l.W=r}return r.tt=t.tt,e.tt=r,t.tt=r,t.ee=1,{parentNode:e,grandParent:t,curNode:r}}else e.ee=0,t===this.Y?this.Y=t.se():t.se(),t.ee=1}else{let o=t.U;if(o&&o.ee===1){if(o.ee=e.ee=0,t===this.Y)return;t.ee=1,r=t;continue}else if(r===e.U){if(r.ee=0,r.U&&(r.U.tt=t),r.W&&(r.W.tt=e),t.W=r.U,e.U=r.W,r.U=t,r.W=e,t===this.Y)this.Y=r,this.h.tt=r;else{let l=t.tt;l.U===t?l.U=r:l.W=r}return r.tt=t.tt,e.tt=r,t.tt=r,t.ee=1,{parentNode:e,grandParent:t,curNode:r}}else e.ee=0,t===this.Y?this.Y=t.te():t.te(),t.ee=1}return}}ne(r,e,t){if(this.Y===void 0){this.i+=1,this.Y=new this.re(r,e),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let o,l=this.h.U,p=this.v(l.u,r);if(p===0){l.l=e;return}else if(p>0)l.U=new this.re(r,e),l.U.tt=l,o=l.U,this.h.U=o;else{let g=this.h.W,_=this.v(g.u,r);if(_===0){g.l=e;return}else if(_<0)g.W=new this.re(r,e),g.W.tt=g,o=g.W,this.h.W=o;else{if(t!==void 0){let c=t.o;if(c!==this.h){let v=this.v(c.u,r);if(v===0){c.l=e;return}else if(v>0){let R=c.L(),A=this.v(R.u,r);if(A===0){R.l=e;return}else A<0&&(o=new this.re(r,e),R.W===void 0?(R.W=o,o.tt=R):(c.U=o,o.tt=c))}}}if(o===void 0)for(o=this.Y;;){let c=this.v(o.u,r);if(c>0){if(o.U===void 0){o.U=new this.re(r,e),o.U.tt=o,o=o.U;break}o=o.U}else if(c<0){if(o.W===void 0){o.W=new this.re(r,e),o.W.tt=o,o=o.W;break}o=o.W}else{o.l=e;return}}}}return this.i+=1,o}I(r,e){for(;r;){let t=this.v(r.u,e);if(t<0)r=r.W;else if(t>0)r=r.U;else return r}return r||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(r,e){let t=r.o;if(t===this.h&&(0,m.throwIteratorAccessError)(),this.i===1)return t.u=e,!0;if(t===this.h.U)return this.v(t.B().u,e)>0?(t.u=e,!0):!1;if(t===this.h.W)return this.v(t.L().u,e)<0?(t.u=e,!0):!1;let o=t.L().u;if(this.v(o,e)>=0)return!1;let l=t.B().u;return this.v(l,e)<=0?!1:(t.u=e,!0)}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e=0,t=this;return this.oe(this.Y,function(o){return r===e?(t.V(o),!0):(e+=1,!1)}),this.i}eraseElementByKey(r){if(this.i===0)return!1;let e=this.I(this.Y,r);return e===this.h?!1:(this.V(e),!0)}eraseElementByIterator(r){let e=r.o;e===this.h&&(0,m.throwIteratorAccessError)();let t=e.W===void 0;return r.iteratorType===0?t&&r.next():(!t||e.U===void 0)&&r.next(),this.V(e),r}forEach(r){let e=0;for(let t of this)r(t,e++,this)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e,t=0;for(let o of this){if(t===r){e=o;break}t+=1}return e}getHeight(){if(this.i===0)return 0;let r=function(e){return e?Math.max(r(e.U),r(e.W))+1:0};return r(this.Y)}}var s=h;x.default=s},{"../../../utils/throwError":44,"../../ContainerBase":25,"./TreeNode":38}],40:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=h(y("./Base")),f=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends f.default{constructor(t,o,l,p){super(t,o,p),this.container=l}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,l){if(l==="0")return t.o.u;if(l==="1")return t.o.l},set(o,l,p){if(l!=="1")throw new TypeError("props must be 1");return t.o.l=p,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends d.default{constructor(t=[],o,l){super(o,l);let p=this;t.forEach(function(g){p.setElement(g[0],g[1])})}*K(t){t!==void 0&&(yield*Ee(this.K(t.U)),yield[t.u,t.l],yield*Ee(this.K(t.W)))}begin(){return new s(this.h.U||this.h,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this.h.W||this.h,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){if(this.i===0)return;let t=this.h.U;return[t.u,t.l]}back(){if(this.i===0)return;let t=this.h.W;return[t.u,t.l]}lowerBound(t){let o=this.X(this.Y,t);return new s(o,this.h,this)}upperBound(t){let o=this.Z(this.Y,t);return new s(o,this.h,this)}reverseLowerBound(t){let o=this.$(this.Y,t);return new s(o,this.h,this)}reverseUpperBound(t){let o=this.rr(this.Y,t);return new s(o,this.h,this)}setElement(t,o,l){return this.M(t,o,l)}find(t){let o=this.I(this.Y,t);return new s(o,this.h,this)}getElementByKey(t){return this.I(this.Y,t).l}union(t){let o=this;return t.forEach(function(l){o.setElement(l[0],l[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}}var r=i;x.default=r},{"../../utils/throwError":44,"./Base":39,"./Base/TreeIterator":37}],41:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=h(y("./Base")),f=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends f.default{constructor(t,o,l,p){super(t,o,p),this.container=l}get pointer(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o.u}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends d.default{constructor(t=[],o,l){super(o,l);let p=this;t.forEach(function(g){p.insert(g)})}*K(t){t!==void 0&&(yield*Ee(this.K(t.U)),yield t.u,yield*Ee(this.K(t.W)))}begin(){return new s(this.h.U||this.h,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this.h.W||this.h,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(t,o){return this.M(t,void 0,o)}find(t){let o=this.I(this.Y,t);return new s(o,this.h,this)}lowerBound(t){let o=this.X(this.Y,t);return new s(o,this.h,this)}upperBound(t){let o=this.Z(this.Y,t);return new s(o,this.h,this)}reverseLowerBound(t){let o=this.$(this.Y,t);return new s(o,this.h,this)}reverseUpperBound(t){let o=this.rr(this.Y,t);return new s(o,this.h,this)}union(t){let o=this;return t.forEach(function(l){o.insert(l)}),this.i}[Symbol.iterator](){return this.K(this.Y)}}var r=i;x.default=r},{"../../utils/throwError":44,"./Base":39,"./Base/TreeIterator":37}],42:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),Object.defineProperty(x,"Deque",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(x,"HashMap",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(x,"HashSet",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(x,"LinkList",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(x,"OrderedMap",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(x,"OrderedSet",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(x,"PriorityQueue",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(x,"Queue",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(x,"Stack",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(x,"Vector",{enumerable:!0,get:function(){return h.default}});var d=l(y("./container/OtherContainer/Stack")),f=l(y("./container/OtherContainer/Queue")),m=l(y("./container/OtherContainer/PriorityQueue")),h=l(y("./container/SequentialContainer/Vector")),s=l(y("./container/SequentialContainer/LinkList")),i=l(y("./container/SequentialContainer/Deque")),r=l(y("./container/TreeContainer/OrderedSet")),e=l(y("./container/TreeContainer/OrderedMap")),t=l(y("./container/HashContainer/HashSet")),o=l(y("./container/HashContainer/HashMap"));function l(p){return p&&p.t?p:{default:p}}},{"./container/HashContainer/HashMap":27,"./container/HashContainer/HashSet":28,"./container/OtherContainer/PriorityQueue":29,"./container/OtherContainer/Queue":30,"./container/OtherContainer/Stack":31,"./container/SequentialContainer/Deque":34,"./container/SequentialContainer/LinkList":35,"./container/SequentialContainer/Vector":36,"./container/TreeContainer/OrderedMap":40,"./container/TreeContainer/OrderedSet":41}],43:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=d;function d(f){let m=typeof f;return m==="object"&&f!==null||m==="function"}},{}],44:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.throwIteratorAccessError=d;function d(){throw new RangeError("Iterator access denied!")}},{}],45:[function(y,k,x){"use strict";let d=y("yallist"),f=Symbol("max"),m=Symbol("length"),h=Symbol("lengthCalculator"),s=Symbol("allowStale"),i=Symbol("maxAge"),r=Symbol("dispose"),e=Symbol("noDisposeOnSet"),t=Symbol("lruList"),o=Symbol("cache"),l=Symbol("updateAgeOnGet"),p=()=>1;class g{constructor(I){if(typeof I=="number"&&(I={max:I}),I||(I={}),I.max&&(typeof I.max!="number"||I.max<0))throw new TypeError("max must be a non-negative number");let P=this[f]=I.max||1/0,S=I.length||p;if(this[h]=typeof S!="function"?p:S,this[s]=I.stale||!1,I.maxAge&&typeof I.maxAge!="number")throw new TypeError("maxAge must be a number");this[i]=I.maxAge||0,this[r]=I.dispose,this[e]=I.noDisposeOnSet||!1,this[l]=I.updateAgeOnGet||!1,this.reset()}set max(I){if(typeof I!="number"||I<0)throw new TypeError("max must be a non-negative number");this[f]=I||1/0,v(this)}get max(){return this[f]}set allowStale(I){this[s]=!!I}get allowStale(){return this[s]}set maxAge(I){if(typeof I!="number")throw new TypeError("maxAge must be a non-negative number");this[i]=I,v(this)}get maxAge(){return this[i]}set lengthCalculator(I){typeof I!="function"&&(I=p),I!==this[h]&&(this[h]=I,this[m]=0,this[t].forEach(P=>{P.length=this[h](P.value,P.key),this[m]+=P.length})),v(this)}get lengthCalculator(){return this[h]}get length(){return this[m]}get itemCount(){return this[t].length}rforEach(I,P){P=P||this;for(let S=this[t].tail;S!==null;){let V=S.prev;W(this,I,S,P),S=V}}forEach(I,P){P=P||this;for(let S=this[t].head;S!==null;){let V=S.next;W(this,I,S,P),S=V}}keys(){return this[t].toArray().map(I=>I.key)}values(){return this[t].toArray().map(I=>I.value)}reset(){this[r]&&this[t]&&this[t].length&&this[t].forEach(I=>this[r](I.key,I.value)),this[o]=new Map,this[t]=new d,this[m]=0}dump(){return this[t].map(I=>c(this,I)?!1:{k:I.key,v:I.value,e:I.now+(I.maxAge||0)}).toArray().filter(I=>I)}dumpLru(){return this[t]}set(I,P,S){if(S=S||this[i],S&&typeof S!="number")throw new TypeError("maxAge must be a number");let V=S?Date.now():0,M=this[h](P,I);if(this[o].has(I)){if(M>this[f])return R(this,this[o].get(I)),!1;let ie=this[o].get(I).value;return this[r]&&(this[e]||this[r](I,ie.value)),ie.now=V,ie.maxAge=S,ie.value=P,this[m]+=M-ie.length,ie.length=M,this.get(I),v(this),!0}let ne=new A(I,P,M,V,S);return ne.length>this[f]?(this[r]&&this[r](I,P),!1):(this[m]+=ne.length,this[t].unshift(ne),this[o].set(I,this[t].head),v(this),!0)}has(I){if(!this[o].has(I))return!1;let P=this[o].get(I).value;return!c(this,P)}get(I){return _(this,I,!0)}peek(I){return _(this,I,!1)}pop(){let I=this[t].tail;return I?(R(this,I),I.value):null}del(I){R(this,this[o].get(I))}load(I){this.reset();let P=Date.now();for(let S=I.length-1;S>=0;S--){let V=I[S],M=V.e||0;if(M===0)this.set(V.k,V.v);else{let ne=M-P;ne>0&&this.set(V.k,V.v,ne)}}}prune(){this[o].forEach((I,P)=>_(this,P,!1))}}let _=(j,I,P)=>{let S=j[o].get(I);if(S){let V=S.value;if(c(j,V)){if(R(j,S),!j[s])return}else P&&(j[l]&&(S.value.now=Date.now()),j[t].unshiftNode(S));return V.value}},c=(j,I)=>{if(!I||!I.maxAge&&!j[i])return!1;let P=Date.now()-I.now;return I.maxAge?P>I.maxAge:j[i]&&P>j[i]},v=j=>{if(j[m]>j[f])for(let I=j[t].tail;j[m]>j[f]&&I!==null;){let P=I.prev;R(j,I),I=P}},R=(j,I)=>{if(I){let P=I.value;j[r]&&j[r](P.key,P.value),j[m]-=P.length,j[o].delete(P.key),j[t].removeNode(I)}};class A{constructor(I,P,S,V,M){this.key=I,this.value=P,this.length=S,this.now=V,this.maxAge=M||0}}let W=(j,I,P,S)=>{let V=P.value;c(j,V)&&(R(j,P),j[s]||(V=void 0)),V&&I.call(S,V.value,V.key,j)};k.exports=g},{yallist:84}],46:[function(y,k,x){(function(d){(function(){let f=k.exports;f.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},f.codes={};for(let h in f.types){let s=f.types[h];f.codes[s]=h}f.CMD_SHIFT=4,f.CMD_MASK=240,f.DUP_MASK=8,f.QOS_MASK=3,f.QOS_SHIFT=1,f.RETAIN_MASK=1,f.VARBYTEINT_MASK=127,f.VARBYTEINT_FIN_MASK=128,f.VARBYTEINT_MAX=268435455,f.SESSIONPRESENT_MASK=1,f.SESSIONPRESENT_HEADER=d.from([f.SESSIONPRESENT_MASK]),f.CONNACK_HEADER=d.from([f.codes.connack<[0,1].map(i=>[0,1].map(r=>{let e=d.alloc(1);return e.writeUInt8(f.codes[h]<d.from([h])),f.EMPTY={pingreq:d.from([f.codes.pingreq<<4,0]),pingresp:d.from([f.codes.pingresp<<4,0]),disconnect:d.from([f.codes.disconnect<<4,0])}}).call(this)}).call(this,y("buffer").Buffer)},{buffer:3}],47:[function(y,k,x){(function(d){(function(){let f=y("./writeToStream"),m=y("events");function h(i,r){let e=new s;return f(i,e,r),e.concat()}class s extends m{constructor(){super(),this._array=new Array(20),this._i=0}write(r){return this._array[this._i++]=r,!0}concat(){let r=0,e=new Array(this._array.length),t=this._array,o=0,l;for(l=0;l>8,0),o.writeUInt8(t&255,1),o}function i(){for(let t=0;t<65536;t++)m[t]=s(t)}function r(t){let l=0,p=0,g=d.allocUnsafe(4);do l=t%128|0,t=t/128|0,t>0&&(l=l|128),g.writeUInt8(l,p++);while(t>0&&p<4);return t>0&&(p=0),h?g.subarray(0,p):g.slice(0,p)}function e(t){let o=d.allocUnsafe(4);return o.writeUInt32BE(t,0),o}k.exports={cache:m,generateCache:i,generateNumber:s,genBufVariableByteInt:r,generate4ByteBuffer:e}}).call(this)}).call(this,y("buffer").Buffer)},{buffer:3}],50:[function(y,k,x){class d{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}k.exports=d},{}],51:[function(y,k,x){let d=y("bl"),f=y("events"),m=y("./packet"),h=y("./constants"),s=y("debug")("mqtt-packet:parser");class i extends f{constructor(){super(),this.parser=this.constructor.parser}static parser(e){return this instanceof i?(this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new i().parser(e)}_resetState(){s("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new m,this.error=null,this._list=d(),this._stateCounter=0}parse(e){for(this.error&&this._resetState(),this._list.append(e),s("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,s("parse: state complete. _stateCounter is now: %d",this._stateCounter),s("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return s("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let e=this._list.readUInt8(0);return this.packet.cmd=h.types[e>>h.CMD_SHIFT],this.packet.retain=(e&h.RETAIN_MASK)!==0,this.packet.qos=e>>h.QOS_SHIFT&h.QOS_MASK,this.packet.dup=(e&h.DUP_MASK)!==0,s("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){let e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),s("_parseLength %d",e.value),!!e}_parsePayload(){s("_parsePayload: payload %O",this._list);let e=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return s("_parsePayload complete result: %s",e),e}_parseConnect(){s("_parseConnect");let e,t,o,l,p={},g=this.packet,_=this._parseString();if(_===null)return this._emitError(new Error("Cannot parse protocolId"));if(_!=="MQTT"&&_!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(g.protocolId=_,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(g.protocolVersion=this._list.readUInt8(this._pos),g.protocolVersion>=128&&(g.bridgeMode=!0,g.protocolVersion=g.protocolVersion-128),g.protocolVersion!==3&&g.protocolVersion!==4&&g.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(p.username=this._list.readUInt8(this._pos)&h.USERNAME_MASK,p.password=this._list.readUInt8(this._pos)&h.PASSWORD_MASK,p.will=this._list.readUInt8(this._pos)&h.WILL_FLAG_MASK,p.will&&(g.will={},g.will.retain=(this._list.readUInt8(this._pos)&h.WILL_RETAIN_MASK)!==0,g.will.qos=(this._list.readUInt8(this._pos)&h.WILL_QOS_MASK)>>h.WILL_QOS_SHIFT),g.clean=(this._list.readUInt8(this._pos)&h.CLEAN_SESSION_MASK)!==0,this._pos++,g.keepalive=this._parseNum(),g.keepalive===-1)return this._emitError(new Error("Packet too short"));if(g.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(g.properties=v)}let c=this._parseString();if(c===null)return this._emitError(new Error("Packet too short"));if(g.clientId=c,s("_parseConnect: packet.clientId: %s",g.clientId),p.will){if(g.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(g.will.properties=v)}if(e=this._parseString(),e===null)return this._emitError(new Error("Cannot parse will topic"));if(g.will.topic=e,s("_parseConnect: packet.will.topic: %s",g.will.topic),t=this._parseBuffer(),t===null)return this._emitError(new Error("Cannot parse will payload"));g.will.payload=t,s("_parseConnect: packet.will.paylaod: %s",g.will.payload)}if(p.username){if(l=this._parseString(),l===null)return this._emitError(new Error("Cannot parse username"));g.username=l,s("_parseConnect: packet.username: %s",g.username)}if(p.password){if(o=this._parseBuffer(),o===null)return this._emitError(new Error("Cannot parse password"));g.password=o}return this.settings=g,s("_parseConnect: complete"),g}_parseConnack(){s("_parseConnack");let e=this.packet;if(this._list.length<1)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&h.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else{if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++)}if(e.returnCode===-1||e.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}s("_parseConnack: complete")}_parsePublish(){s("_parsePublish");let e=this.packet;if(e.topic=this._parseString(),e.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length),s("_parsePublish: payload from buffer list: %o",e.payload)}}_parseSubscribe(){s("_parseSubscribe");let e=this.packet,t,o,l,p,g,_,c;if(e.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(e.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(e.properties=v)}for(;this._pos=e.length)return this._emitError(new Error("Malformed Subscribe Payload"));o=this._parseByte(),l=o&h.SUBSCRIBE_OPTIONS_QOS_MASK,_=(o>>h.SUBSCRIBE_OPTIONS_NL_SHIFT&h.SUBSCRIBE_OPTIONS_NL_MASK)!==0,g=(o>>h.SUBSCRIBE_OPTIONS_RAP_SHIFT&h.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,p=o>>h.SUBSCRIBE_OPTIONS_RH_SHIFT&h.SUBSCRIBE_OPTIONS_RH_MASK,c={topic:t,qos:l},this.settings.protocolVersion===5?(c.nl=_,c.rap=g,c.rh=p):this.settings.bridgeMode&&(c.rh=0,c.rap=!0,c.nl=!0),s("_parseSubscribe: push subscription `%s` to subscription",c),e.subscriptions.push(c)}}}_parseSuback(){s("_parseSuback");let e=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos2?(e.reasonCode=this._parseByte(),s("_parseConfirmation: packet.reasonCode `%d`",e.reasonCode)):e.reasonCode=0,e.length>3)){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0}_parseDisconnect(){let e=this.packet;if(s("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?e.reasonCode=this._parseByte():e.reasonCode=0;let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return s("_parseDisconnect result: true"),!0}_parseAuth(){s("_parseAuth");let e=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));e.reasonCode=this._parseByte();let t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),s("_parseAuth: result: true"),!0}_parseMessageId(){let e=this.packet;return e.messageId=this._parseNum(),e.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(s("_parseMessageId: packet.messageId %d",e.messageId),!0)}_parseString(e){let t=this._parseNum(),o=t+this._pos;if(t===-1||o>this._list.length||o>this.packet.length)return null;let l=this._list.toString("utf8",this._pos,o);return this._pos+=t,s("_parseString: result: %s",l),l}_parseStringPair(){return s("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let e=this._parseNum(),t=e+this._pos;if(e===-1||t>this._list.length||t>this.packet.length)return null;let o=this._list.slice(this._pos,t);return this._pos+=e,s("_parseBuffer: result: %o",o),o}_parseNum(){if(this._list.length-this._pos<2)return-1;let e=this._list.readUInt16BE(this._pos);return this._pos+=2,s("_parseNum: result: %s",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let e=this._list.readUInt32BE(this._pos);return this._pos+=4,s("_parse4ByteNum: result: %s",e),e}_parseVarByteNum(e){s("_parseVarByteNum");let t=4,o=0,l=1,p=0,g=!1,_,c=this._pos?this._pos:0;for(;o=o&&this._emitError(new Error("Invalid variable byte integer")),c&&(this._pos+=o),g=g?e?{bytes:o,value:p}:p:!1,s("_parseVarByteNum: result: %o",g),g}_parseByte(){let e;return this._pos=4)&&(w||z))b+=d.byteLength(w)+2;else{if(C<4)return B.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(z*1===0)return B.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof Q!="number"||Q<0||Q>65535||Q%1!==0)return B.emit("error",new Error("Invalid keepalive")),!1;if(b+=2,b+=1,C===5){var L=H(B,a);if(!L)return!1;b+=L.length}if(N){if(typeof N!="object")return B.emit("error",new Error("Invalid will")),!1;if(!N.topic||typeof N.topic!="string")return B.emit("error",new Error("Invalid will topic")),!1;if(b+=d.byteLength(N.topic)+2,b+=2,N.payload)if(N.payload.length>=0)typeof N.payload=="string"?b+=d.byteLength(N.payload):b+=N.payload.length;else return B.emit("error",new Error("Invalid will payload")),!1;var K={};if(C===5){if(K=H(B,N.properties),!K)return!1;b+=K.length}}let J=!1;if(u!=null)if(Z(u))J=!0,b+=d.byteLength(u)+2;else return B.emit("error",new Error("Invalid username")),!1;if(n!=null){if(!J)return B.emit("error",new Error("Username is required to use password")),!1;if(Z(n))b+=oe(n)+2;else return B.emit("error",new Error("Invalid password")),!1}B.write(f.CONNECT_HEADER),G(B,b),ee(B,O),te.bridgeMode&&(C+=128),B.write(C===131?f.VERSION131:C===132?f.VERSION132:C===4?f.VERSION4:C===5?f.VERSION5:f.VERSION3);let ae=0;return ae|=u!=null?f.USERNAME_MASK:0,ae|=n!=null?f.PASSWORD_MASK:0,ae|=N&&N.retain?f.WILL_RETAIN_MASK:0,ae|=N&&N.qos?N.qos<0&&g(B,w),a?.write(),r("publish: payload: %o",Q),B.write(Q)}function j(F,B,Y){let te=Y?Y.protocolVersion:4,O=F||{},C=O.cmd||"puback",N=O.messageId,z=O.dup&&C==="pubrel"?f.DUP_MASK:0,Q=0,w=O.reasonCode,u=O.properties,n=te===5?3:2;if(C==="pubrel"&&(Q=1),typeof N!="number")return B.emit("error",new Error("Invalid messageId")),!1;let a=null;if(te===5&&typeof u=="object"){if(a=D(B,u,Y,n),!a)return!1;n+=a.length}return B.write(f.ACKS[C][Q][z][0]),G(B,n),g(B,N),te===5&&B.write(d.from([w])),a!==null&&a.write(),!0}function I(F,B,Y){r("subscribe: packet: ");let te=Y?Y.protocolVersion:4,O=F||{},C=O.dup?f.DUP_MASK:0,N=O.messageId,z=O.subscriptions,Q=O.properties,w=0;if(typeof N!="number")return B.emit("error",new Error("Invalid messageId")),!1;w+=2;let u=null;if(te===5){if(u=H(B,Q),!u)return!1;w+=u.length}if(typeof z=="object"&&z.length)for(let a=0;a2)return B.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}w+=d.byteLength(b)+2+1}else return B.emit("error",new Error("Invalid subscriptions")),!1;r("subscribe: writing to stream: %o",f.SUBSCRIBE_HEADER),B.write(f.SUBSCRIBE_HEADER[1][C?1:0][0]),G(B,w),g(B,N),u!==null&&u.write();let n=!0;for(let a of z){let b=a.topic,L=a.qos,K=+a.nl,J=+a.rap,ae=a.rh,le;E(B,b),le=f.SUBSCRIBE_OPTIONS_QOS[L],te===5&&(le|=K?f.SUBSCRIBE_OPTIONS_NL:0,le|=J?f.SUBSCRIBE_OPTIONS_RAP:0,le|=ae?f.SUBSCRIBE_OPTIONS_RH[ae]:0),n=B.write(d.from([le]))}return n}function P(F,B,Y){let te=Y?Y.protocolVersion:4,O=F||{},C=O.messageId,N=O.granted,z=O.properties,Q=0;if(typeof C!="number")return B.emit("error",new Error("Invalid messageId")),!1;if(Q+=2,typeof N=="object"&&N.length)for(let u=0;uf.VARBYTEINT_MAX)return F.emit("error",new Error(`Invalid variable byte integer: ${B}`)),!1;let Y=ie[B];return Y||(Y=l(B),B<16384&&(ie[B]=Y)),r("writeVarByteInt: writing to stream: %o",Y),F.write(Y)}function E(F,B){let Y=d.byteLength(B);return g(F,Y),r("writeString: %s",B),F.write(B,"utf8")}function T(F,B,Y){E(F,B),E(F,Y)}function U(F,B){return r("writeNumberCached: number: %d",B),r("writeNumberCached: %o",e[B]),F.write(e[B])}function q(F,B){let Y=t(B);return r("writeNumberGenerated: %o",Y),F.write(Y)}function re(F,B){let Y=p(B);return r("write4ByteNumber: %o",Y),F.write(Y)}function ee(F,B){typeof B=="string"?E(F,B):B?(g(F,B.length),F.write(B)):g(F,0)}function H(F,B){if(typeof B!="object"||B.length!=null)return{length:1,write(){$(F,{},0)}};let Y=0;function te(C,N){let z=f.propertiesTypes[C],Q=0;switch(z){case"byte":{if(typeof N!="boolean")return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=2;break}case"int8":{if(typeof N!="number"||N<0||N>255)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=2;break}case"binary":{if(N&&N===null)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=1+d.byteLength(N)+2;break}case"int16":{if(typeof N!="number"||N<0||N>65535)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=3;break}case"int32":{if(typeof N!="number"||N<0||N>4294967295)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=5;break}case"var":{if(typeof N!="number"||N<0||N>268435455)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=1+d.byteLength(l(N));break}case"string":{if(typeof N!="string")return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=3+d.byteLength(N.toString());break}case"pair":{if(typeof N!="object")return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=Object.getOwnPropertyNames(N).reduce((w,u)=>{let n=N[u];return Array.isArray(n)?w+=n.reduce((a,b)=>(a+=3+d.byteLength(u.toString())+2+d.byteLength(b.toString()),a),0):w+=3+d.byteLength(u.toString())+2+d.byteLength(N[u].toString()),w},0);break}default:return F.emit("error",new Error(`Invalid property ${C}: ${N}`)),!1}return Q}if(B)for(let C in B){let N=0,z=0,Q=B[C];if(Array.isArray(Q))for(let w=0;wC;){let z=O.shift();if(z&&B[z])delete B[z],N=H(F,B);else return!1}return N}function X(F,B,Y){switch(f.propertiesTypes[B]){case"byte":{F.write(d.from([f.properties[B]])),F.write(d.from([+Y]));break}case"int8":{F.write(d.from([f.properties[B]])),F.write(d.from([Y]));break}case"binary":{F.write(d.from([f.properties[B]])),ee(F,Y);break}case"int16":{F.write(d.from([f.properties[B]])),g(F,Y);break}case"int32":{F.write(d.from([f.properties[B]])),re(F,Y);break}case"var":{F.write(d.from([f.properties[B]])),G(F,Y);break}case"string":{F.write(d.from([f.properties[B]])),E(F,Y);break}case"pair":{Object.getOwnPropertyNames(Y).forEach(O=>{let C=Y[O];Array.isArray(C)?C.forEach(N=>{F.write(d.from([f.properties[B]])),T(F,O.toString(),N.toString())}):(F.write(d.from([f.properties[B]])),T(F,O.toString(),C.toString()))});break}default:return F.emit("error",new Error(`Invalid property ${B} value: ${Y}`)),!1}}function $(F,B,Y){G(F,Y);for(let te in B)if(Object.prototype.hasOwnProperty.call(B,te)&&B[te]!==null){let O=B[te];if(Array.isArray(O))for(let C=0;C0)return r(l);if(g==="number"&&isFinite(l))return p.long?t(l):e(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function r(l){if(l=String(l),!(l.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(p){var g=parseFloat(p[1]),_=(p[2]||"ms").toLowerCase();switch(_){case"years":case"year":case"yrs":case"yr":case"y":return g*i;case"weeks":case"week":case"w":return g*s;case"days":case"day":case"d":return g*h;case"hours":case"hour":case"hrs":case"hr":case"h":return g*m;case"minutes":case"minute":case"mins":case"min":case"m":return g*f;case"seconds":case"second":case"secs":case"sec":case"s":return g*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function e(l){var p=Math.abs(l);return p>=h?Math.round(l/h)+"d":p>=m?Math.round(l/m)+"h":p>=f?Math.round(l/f)+"m":p>=d?Math.round(l/d)+"s":l+"ms"}function t(l){var p=Math.abs(l);return p>=h?o(l,p,h,"day"):p>=m?o(l,p,m,"hour"):p>=f?o(l,p,f,"minute"):p>=d?o(l,p,d,"second"):l+" ms"}function o(l,p,g,_){var c=p>=g*1.5;return Math.round(l/g)+" "+_+(c?"s":"")}},{}],54:[function(y,k,x){let d=y("./lib/number-allocator.js");k.exports.NumberAllocator=d},{"./lib/number-allocator.js":55}],55:[function(y,k,x){"use strict";let d=y("js-sdsl").OrderedSet,f=y("debug")("number-allocator:trace"),m=y("debug")("number-allocator:error");function h(i,r){this.low=i,this.high=r}h.prototype.equals=function(i){return this.low===i.low&&this.high===i.high},h.prototype.compare=function(i){return this.lowe.compare(t)),f("Create"),this.clear()}s.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},s.prototype.alloc=function(){if(this.ss.size()===0)return f("alloc():empty"),null;let i=this.ss.begin(),r=i.pointer.low,e=i.pointer.high,t=r;return t+1<=e?this.ss.updateKeyByIterator(i,new h(r+1,e)):this.ss.eraseElementByPos(0),f("alloc():"+t),t},s.prototype.use=function(i){let r=new h(i,i),e=this.ss.lowerBound(r);if(!e.equals(this.ss.end())){let t=e.pointer.low,o=e.pointer.high;return e.pointer.equals(r)?(this.ss.eraseElementByIterator(e),f("use():"+i),!0):t>i?!1:t===i?(this.ss.updateKeyByIterator(e,new h(t+1,o)),f("use():"+i),!0):o===i?(this.ss.updateKeyByIterator(e,new h(t,o-1)),f("use():"+i),!0):(this.ss.updateKeyByIterator(e,new h(i+1,o)),this.ss.insert(new h(t,i-1)),f("use():"+i),!0)}return f("use():failed"),!1},s.prototype.free=function(i){if(ithis.max){m("free():"+i+" is out of range");return}let r=new h(i,i),e=this.ss.upperBound(r);if(e.equals(this.ss.end())){if(e.equals(this.ss.begin())){this.ss.insert(r);return}e.pre();let t=e.pointer.high;e.pointer.high+1===i?this.ss.updateKeyByIterator(e,new h(t,i)):this.ss.insert(r)}else if(e.equals(this.ss.begin()))if(i+1===e.pointer.low){let t=e.pointer.high;this.ss.updateKeyByIterator(e,new h(i,t))}else this.ss.insert(r);else{let t=e.pointer.low,o=e.pointer.high;e.pre();let l=e.pointer.low;e.pointer.high+1===i?i+1===t?(this.ss.eraseElementByIterator(e),this.ss.updateKeyByIterator(e,new h(l,o))):this.ss.updateKeyByIterator(e,new h(l,i)):i+1===t?(this.ss.eraseElementByIterator(e.next()),this.ss.insert(new h(i,o))):this.ss.insert(r)}f("free():"+i)},s.prototype.clear=function(){f("clear()"),this.ss.clear(),this.ss.insert(new h(this.min,this.max))},s.prototype.intervalCount=function(){return this.ss.size()},s.prototype.dump=function(){console.log("length:"+this.ss.size());for(let i of this.ss)console.log(i)},k.exports=s},{debug:20,"js-sdsl":42}],56:[function(y,k,x){var d=y("wrappy");k.exports=d(f),k.exports.strict=d(m),f.proto=f(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return f(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return m(this)},configurable:!0})});function f(h){var s=function(){return s.called?s.value:(s.called=!0,s.value=h.apply(this,arguments))};return s.called=!1,s}function m(h){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=h.apply(this,arguments)},i=h.name||"Function wrapped with `once`";return s.onceError=i+" shouldn't be called more than once",s.called=!1,s}},{wrappy:80}],57:[function(y,k,x){(function(d){(function(){"use strict";typeof d>"u"||!d.version||d.version.indexOf("v0.")===0||d.version.indexOf("v1.")===0&&d.version.indexOf("v1.8.")!==0?k.exports={nextTick:f}:k.exports=d;function f(m,h,s,i){if(typeof m!="function")throw new TypeError('"callback" argument must be a function');var r=arguments.length,e,t;switch(r){case 0:case 1:return d.nextTick(m);case 2:return d.nextTick(function(){m.call(null,h)});case 3:return d.nextTick(function(){m.call(null,h,s)});case 4:return d.nextTick(function(){m.call(null,h,s,i)});default:for(e=new Array(r-1),t=0;t2?"one of ".concat(t," ").concat(e.slice(0,o-1).join(", "),", or ")+e[o-1]:o===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function s(e,t,o){return e.substr(!o||o<0?0:+o,t.length)===t}function i(e,t,o){return(o===void 0||o>e.length)&&(o=e.length),e.substring(o-t.length,o)===t}function r(e,t,o){return typeof o!="number"&&(o=0),o+t.length>e.length?!1:e.indexOf(t,o)!==-1}m("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),m("ERR_INVALID_ARG_TYPE",function(e,t,o){var l;typeof t=="string"&&s(t,"not ")?(l="must not be",t=t.replace(/^not /,"")):l="must be";var p;if(i(e," argument"))p="The ".concat(e," ").concat(l," ").concat(h(t,"type"));else{var g=r(e,".")?"property":"argument";p='The "'.concat(e,'" ').concat(g," ").concat(l," ").concat(h(t,"type"))}return p+=". Received type ".concat(typeof o),p},TypeError),m("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),m("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),m("ERR_STREAM_PREMATURE_CLOSE","Premature close"),m("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),m("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),m("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),m("ERR_STREAM_WRITE_AFTER_END","write after end"),m("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),m("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),m("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),k.exports.codes=f},{}],59:[function(y,k,x){(function(d){(function(){"use strict";var f=Object.keys||function(l){var p=[];for(var g in l)p.push(g);return p};k.exports=e;var m=y("./_stream_readable"),h=y("./_stream_writable");y("inherits")(e,m);for(var s=f(h.prototype),i=0;i0)if(typeof u!="string"&&!L.objectMode&&Object.getPrototypeOf(u)!==r.prototype&&(u=t(u)),a)L.endEmitted?M(w,new I):T(w,L,u,!0);else if(L.ended)M(w,new W);else{if(L.destroyed)return!1;L.reading=!1,L.decoder&&!n?(u=L.decoder.write(u),L.objectMode||u.length!==0?T(w,L,u,!1):$(w,L)):T(w,L,u,!1)}else a||(L.reading=!1,$(w,L))}return!L.ended&&(L.length=q?w=q:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}function ee(w,u){return w<=0||u.length===0&&u.ended?0:u.objectMode?1:w!==w?u.flowing&&u.length?u.buffer.head.data.length:u.length:(w>u.highWaterMark&&(u.highWaterMark=re(w)),w<=u.length?w:u.ended?u.length:(u.needReadable=!0,0))}G.prototype.read=function(w){p("read",w),w=parseInt(w,10);var u=this._readableState,n=w;if(w!==0&&(u.emittedReadable=!1),w===0&&u.needReadable&&((u.highWaterMark!==0?u.length>=u.highWaterMark:u.length>0)||u.ended))return p("read: emitReadable",u.length,u.ended),u.length===0&&u.ended?N(this):D(this),null;if(w=ee(w,u),w===0&&u.ended)return u.length===0&&N(this),null;var a=u.needReadable;p("need readable",a),(u.length===0||u.length-w0?b=C(w,u):b=null,b===null?(u.needReadable=u.length<=u.highWaterMark,w=0):(u.length-=w,u.awaitDrain=0),u.length===0&&(u.ended||(u.needReadable=!0),n!==w&&u.ended&&N(this)),b!==null&&this.emit("data",b),b};function H(w,u){if(p("onEofChunk"),!u.ended){if(u.decoder){var n=u.decoder.end();n&&n.length&&(u.buffer.push(n),u.length+=u.objectMode?1:n.length)}u.ended=!0,u.sync?D(w):(u.needReadable=!1,u.emittedReadable||(u.emittedReadable=!0,X(w)))}}function D(w){var u=w._readableState;p("emitReadable",u.needReadable,u.emittedReadable),u.needReadable=!1,u.emittedReadable||(p("emitReadable",u.flowing),u.emittedReadable=!0,d.nextTick(X,w))}function X(w){var u=w._readableState;p("emitReadable_",u.destroyed,u.length,u.ended),!u.destroyed&&(u.length||u.ended)&&(w.emit("readable"),u.emittedReadable=!1),u.needReadable=!u.flowing&&!u.ended&&u.length<=u.highWaterMark,O(w)}function $(w,u){u.readingMore||(u.readingMore=!0,d.nextTick(oe,w,u))}function oe(w,u){for(;!u.reading&&!u.ended&&(u.length1&&Q(a.pipes,w)!==-1)&&!le&&(p("false write response, pause",a.awaitDrain),a.awaitDrain++),n.pause())}function fe(be){p("onerror",be),ye(),w.removeListener("error",fe),s(w,"error")===0&&M(w,be)}se(w,"error",fe);function me(){w.removeListener("finish",we),ye()}w.once("close",me);function we(){p("onfinish"),w.removeListener("close",me),ye()}w.once("finish",we);function ye(){p("unpipe"),n.unpipe(w)}return w.emit("pipe",n),a.flowing||(p("pipe resume"),n.resume()),w};function Z(w){return function(){var n=w._readableState;p("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,n.awaitDrain===0&&s(w,"data")&&(n.flowing=!0,O(w))}}G.prototype.unpipe=function(w){var u=this._readableState,n={hasUnpiped:!1};if(u.pipesCount===0)return this;if(u.pipesCount===1)return w&&w!==u.pipes?this:(w||(w=u.pipes),u.pipes=null,u.pipesCount=0,u.flowing=!1,w&&w.emit("unpipe",this,n),this);if(!w){var a=u.pipes,b=u.pipesCount;u.pipes=null,u.pipesCount=0,u.flowing=!1;for(var L=0;L0,a.flowing!==!1&&this.resume()):w==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,p("on readable",a.length,a.reading),a.length?D(this):a.reading||d.nextTick(B,this)),n},G.prototype.addListener=G.prototype.on,G.prototype.removeListener=function(w,u){var n=i.prototype.removeListener.call(this,w,u);return w==="readable"&&d.nextTick(F,this),n},G.prototype.removeAllListeners=function(w){var u=i.prototype.removeAllListeners.apply(this,arguments);return(w==="readable"||w===void 0)&&d.nextTick(F,this),u};function F(w){var u=w._readableState;u.readableListening=w.listenerCount("readable")>0,u.resumeScheduled&&!u.paused?u.flowing=!0:w.listenerCount("data")>0&&w.resume()}function B(w){p("readable nexttick read 0"),w.read(0)}G.prototype.resume=function(){var w=this._readableState;return w.flowing||(p("resume"),w.flowing=!w.readableListening,Y(this,w)),w.paused=!1,this};function Y(w,u){u.resumeScheduled||(u.resumeScheduled=!0,d.nextTick(te,w,u))}function te(w,u){p("resume",u.reading),u.reading||w.read(0),u.resumeScheduled=!1,w.emit("resume"),O(w),u.flowing&&!u.reading&&w.read(0)}G.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function O(w){var u=w._readableState;for(p("flow",u.flowing);u.flowing&&w.read()!==null;);}G.prototype.wrap=function(w){var u=this,n=this._readableState,a=!1;w.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var K=n.decoder.end();K&&K.length&&u.push(K)}u.push(null)}),w.on("data",function(K){if(p("wrapped data"),n.decoder&&(K=n.decoder.write(K)),!(n.objectMode&&K==null)&&!(!n.objectMode&&(!K||!K.length))){var J=u.push(K);J||(a=!0,w.pause())}});for(var b in w)this[b]===void 0&&typeof w[b]=="function"&&(this[b]=function(J){return function(){return w[J].apply(w,arguments)}}(b));for(var L=0;L=u.length?(u.decoder?n=u.buffer.join(""):u.buffer.length===1?n=u.buffer.first():n=u.buffer.concat(u.length),u.buffer.clear()):n=u.buffer.consume(w,u.decoder),n}function N(w){var u=w._readableState;p("endReadable",u.endEmitted),u.endEmitted||(u.ended=!0,d.nextTick(z,u,w))}function z(w,u){if(p("endReadableNT",w.endEmitted,w.length),!w.endEmitted&&w.length===0&&(w.endEmitted=!0,u.readable=!1,u.emit("end"),w.autoDestroy)){var n=u._writableState;(!n||n.autoDestroy&&n.finished)&&u.destroy()}}typeof Symbol=="function"&&(G.from=function(w,u){return V===void 0&&(V=y("./internal/streams/from")),V(G,w,u)});function Q(w,u){for(var n=0,a=w.length;n-1))throw new S(C);return this._writableState.defaultEncoding=C,this},Object.defineProperty(ie.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function T(O,C,N){return!O.objectMode&&O.decodeStrings!==!1&&typeof C=="string"&&(C=e.from(C,N)),C}Object.defineProperty(ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function U(O,C,N,z,Q,w){if(!N){var u=T(C,z,Q);z!==u&&(N=!0,Q="buffer",z=u)}var n=C.objectMode?1:z.length;C.length+=n;var a=C.length0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(c){var v={data:c,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(c){if(this.length===0)return"";for(var v=this.head,R=""+v.data;v=v.next;)R+=c+v.data;return R}},{key:"concat",value:function(c){if(this.length===0)return e.alloc(0);for(var v=e.allocUnsafe(c>>>0),R=this.head,A=0;R;)p(R.data,v,A),A+=R.data.length,R=R.next;return v}},{key:"consume",value:function(c,v){var R;return cW.length?W.length:c;if(j===W.length?A+=W:A+=W.slice(0,c),c-=j,c===0){j===W.length?(++R,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=W.slice(j));break}++R}return this.length-=R,A}},{key:"_getBuffer",value:function(c){var v=e.allocUnsafe(c),R=this.head,A=1;for(R.data.copy(v),c-=R.data.length;R=R.next;){var W=R.data,j=c>W.length?W.length:c;if(W.copy(v,v.length-c,0,j),c-=j,c===0){j===W.length?(++A,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=W.slice(j));break}++A}return this.length-=A,v}},{key:l,value:function(c,v){return o(this,f({},v,{depth:0,customInspect:!1}))}}]),g}()},{buffer:3,util:2}],66:[function(y,k,x){(function(d){(function(){"use strict";function f(e,t){var o=this,l=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return l||p?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(i,this,e)):d.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(g){!t&&g?o._writableState?o._writableState.errorEmitted?d.nextTick(h,o):(o._writableState.errorEmitted=!0,d.nextTick(m,o,g)):d.nextTick(m,o,g):t?(d.nextTick(h,o),t(g)):d.nextTick(h,o)}),this)}function m(e,t){i(e,t),h(e)}function h(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(e,t){e.emit("error",t)}function r(e,t){var o=e._readableState,l=e._writableState;o&&o.autoDestroy||l&&l.autoDestroy?e.destroy(t):e.emit("error",t)}k.exports={destroy:f,undestroy:s,errorOrDestroy:r}}).call(this)}).call(this,y("_process"))},{_process:85}],67:[function(y,k,x){"use strict";var d=y("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function f(i){var r=!1;return function(){if(!r){r=!0;for(var e=arguments.length,t=new Array(e),o=0;o0;return e(W,I,P,function(S){R||(R=S),S&&A.forEach(t),!I&&(A.forEach(t),v(R))})});return _.reduce(o)}k.exports=p},{"../../../errors":58,"./end-of-stream":67}],70:[function(y,k,x){"use strict";var d=y("../../../errors").codes.ERR_INVALID_OPT_VALUE;function f(h,s,i){return h.highWaterMark!=null?h.highWaterMark:s?h[i]:null}function m(h,s,i,r){var e=f(s,r,i);if(e!=null){if(!(isFinite(e)&&Math.floor(e)===e)||e<0){var t=r?i:"highWaterMark";throw new d(t,e)}return Math.floor(e)}return h.objectMode?16:16*1024}k.exports={getHighWaterMark:m}},{"../../../errors":58}],71:[function(y,k,x){k.exports=y("events").EventEmitter},{events:4}],72:[function(y,k,x){x=k.exports=y("./lib/_stream_readable.js"),x.Stream=x,x.Readable=x,x.Writable=y("./lib/_stream_writable.js"),x.Duplex=y("./lib/_stream_duplex.js"),x.Transform=y("./lib/_stream_transform.js"),x.PassThrough=y("./lib/_stream_passthrough.js"),x.finished=y("./lib/internal/streams/end-of-stream.js"),x.pipeline=y("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":59,"./lib/_stream_passthrough.js":60,"./lib/_stream_readable.js":61,"./lib/_stream_transform.js":62,"./lib/_stream_writable.js":63,"./lib/internal/streams/end-of-stream.js":67,"./lib/internal/streams/pipeline.js":69}],73:[function(y,k,x){"use strict";function d(m,h,s){var i=this;this._callback=m,this._args=s,this._interval=setInterval(m,h,this._args),this.reschedule=function(r){r||(r=i._interval),i._interval&&clearInterval(i._interval),i._interval=setInterval(i._callback,r,i._args)},this.clear=function(){i._interval&&(clearInterval(i._interval),i._interval=void 0)},this.destroy=function(){i._interval&&clearInterval(i._interval),i._callback=void 0,i._interval=void 0,i._args=void 0}}function f(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var m;if(arguments.length>0){m=new Array(arguments.length-2);for(var h=0;h>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function r(A,W,j){var I=W.length-1;if(I=0?(P>0&&(A.lastNeed=P-1),P):--I=0?(P>0&&(A.lastNeed=P-2),P):--I=0?(P>0&&(P===2?P=0:A.lastNeed=P-3),P):0))}function e(A,W,j){if((W[0]&192)!==128)return A.lastNeed=0,"\uFFFD";if(A.lastNeed>1&&W.length>1){if((W[1]&192)!==128)return A.lastNeed=1,"\uFFFD";if(A.lastNeed>2&&W.length>2&&(W[2]&192)!==128)return A.lastNeed=2,"\uFFFD"}}function t(A){var W=this.lastTotal-this.lastNeed,j=e(this,A,W);if(j!==void 0)return j;if(this.lastNeed<=A.length)return A.copy(this.lastChar,W,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,W,0,A.length),this.lastNeed-=A.length}function o(A,W){var j=r(this,A,W);if(!this.lastNeed)return A.toString("utf8",W);this.lastTotal=j;var I=A.length-(j-this.lastNeed);return A.copy(this.lastChar,0,I),A.toString("utf8",W,I)}function l(A){var W=A&&A.length?this.write(A):"";return this.lastNeed?W+"\uFFFD":W}function p(A,W){if((A.length-W)%2===0){var j=A.toString("utf16le",W);if(j){var I=j.charCodeAt(j.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],j.slice(0,-1)}return j}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",W,A.length-1)}function g(A){var W=A&&A.length?this.write(A):"";if(this.lastNeed){var j=this.lastTotal-this.lastNeed;return W+this.lastChar.toString("utf16le",0,j)}return W}function _(A,W){var j=(A.length-W)%3;return j===0?A.toString("base64",W):(this.lastNeed=3-j,this.lastTotal=3,j===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",W,A.length-j))}function c(A){var W=A&&A.length?this.write(A):"";return this.lastNeed?W+this.lastChar.toString("base64",0,3-this.lastNeed):W}function v(A){return A.toString(this.encoding)}function R(A){return A&&A.length?this.write(A):""}},{"safe-buffer":76}],79:[function(y,k,x){(function(d){(function(){k.exports=f;function f(h,s){if(m("noDeprecation"))return h;var i=!1;function r(){if(!i){if(m("throwDeprecation"))throw new Error(s);m("traceDeprecation")?console.trace(s):console.warn(s),i=!0}return h.apply(this,arguments)}return r}function m(h){try{if(!d.localStorage)return!1}catch{return!1}var s=d.localStorage[h];return s==null?!1:String(s).toLowerCase()==="true"}}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],80:[function(y,k,x){k.exports=d;function d(f,m){if(f&&m)return d(f)(m);if(typeof f!="function")throw new TypeError("need wrapper function");return Object.keys(f).forEach(function(s){h[s]=f[s]}),h;function h(){for(var s=new Array(arguments.length),i=0;i0)for(var e=0,t=arguments.length;e1)e=r;else if(this.head)t=this.head.next,e=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;t!==null;o++)e=i(e,t.value,o),t=t.next;return e},d.prototype.reduceReverse=function(i,r){var e,t=this.tail;if(arguments.length>1)e=r;else if(this.tail)t=this.tail.prev,e=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;t!==null;o--)e=i(e,t.value,o),t=t.prev;return e},d.prototype.toArray=function(){for(var i=new Array(this.length),r=0,e=this.head;e!==null;r++)i[r]=e.value,e=e.next;return i},d.prototype.toArrayReverse=function(){for(var i=new Array(this.length),r=0,e=this.tail;e!==null;r++)i[r]=e.value,e=e.prev;return i},d.prototype.slice=function(i,r){r=r||this.length,r<0&&(r+=this.length),i=i||0,i<0&&(i+=this.length);var e=new d;if(rthis.length&&(r=this.length);for(var t=0,o=this.head;o!==null&&tthis.length&&(r=this.length);for(var t=this.length,o=this.tail;o!==null&&t>r;t--)o=o.prev;for(;o!==null&&t>i;t--,o=o.prev)e.push(o.value);return e},d.prototype.splice=function(i,r,...e){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var t=0,o=this.head;o!==null&&t1)for(var A=1;A= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=e-t,I=Math.floor,P=String.fromCharCode,S;function V(H){throw new RangeError(W[H])}function M(H,D){for(var X=H.length,$=[];X--;)$[X]=D(H[X]);return $}function ne(H,D){var X=H.split("@"),$="";X.length>1&&($=X[0]+"@",H=X[1]),H=H.replace(A,".");var oe=H.split("."),Z=M(oe,D).join(".");return $+Z}function se(H){for(var D=[],X=0,$=H.length,oe,Z;X<$;)oe=H.charCodeAt(X++),oe>=55296&&oe<=56319&&X<$?(Z=H.charCodeAt(X++),(Z&64512)==56320?D.push(((oe&1023)<<10)+(Z&1023)+65536):(D.push(oe),X--)):D.push(oe);return D}function ie(H){return M(H,function(D){var X="";return D>65535&&(D-=65536,X+=P(D>>>10&1023|55296),D=56320|D&1023),X+=P(D),X}).join("")}function G(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:e}function E(H,D){return H+22+75*(H<26)-((D!=0)<<5)}function T(H,D,X){var $=0;for(H=X?I(H/p):H>>1,H+=I(H/D);H>j*o>>1;$+=e)H=I(H/j);return I($+(j+1)*H/(H+l))}function U(H){var D=[],X=H.length,$,oe=0,Z=_,F=g,B,Y,te,O,C,N,z,Q,w;for(B=H.lastIndexOf(c),B<0&&(B=0),Y=0;Y=128&&V("not-basic"),D.push(H.charCodeAt(Y));for(te=B>0?B+1:0;te=X&&V("invalid-input"),z=G(H.charCodeAt(te++)),(z>=e||z>I((r-oe)/C))&&V("overflow"),oe+=z*C,Q=N<=F?t:N>=F+o?o:N-F,!(zI(r/w)&&V("overflow"),C*=w;$=D.length+1,F=T(oe-O,$,O==0),I(oe/$)>r-Z&&V("overflow"),Z+=I(oe/$),oe%=$,D.splice(oe++,0,Z)}return ie(D)}function q(H){var D,X,$,oe,Z,F,B,Y,te,O,C,N=[],z,Q,w,u;for(H=se(H),z=H.length,D=_,X=0,Z=g,F=0;F=D&&CI((r-X)/Q)&&V("overflow"),X+=(B-D)*Q,D=B,F=0;Fr&&V("overflow"),C==D){for(Y=X,te=e;O=te<=Z?t:te>=Z+o?o:te-Z,!(Y0&&o>t&&(o=t);for(var l=0;l=0?(_=p.substr(0,g),c=p.substr(g+1)):(_=p,c=""),v=decodeURIComponent(_),R=decodeURIComponent(c),d(r,v)?f(r[v])?r[v].push(R):r[v]=[r[v],R]:r[v]=R}return r};var f=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"}},{}],88:[function(y,k,x){"use strict";var d=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}};k.exports=function(s,i,r,e){return i=i||"&",r=r||"=",s===null&&(s=void 0),typeof s=="object"?m(h(s),function(t){var o=encodeURIComponent(d(t))+r;return f(s[t])?m(s[t],function(l){return o+encodeURIComponent(d(l))}).join(i):o+encodeURIComponent(d(s[t]))}).join(i):e?encodeURIComponent(d(e))+r+encodeURIComponent(d(s)):""};var f=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"};function m(s,i){if(s.map)return s.map(i);for(var r=[],e=0;e",'"',"`"," ","\r",` +import{A as St,Ba as jt,C as xt,Fa as Wt,Ha as Vt,Ka as qt,O as It,Oa as zt,P as Ct,Ra as Kt,S as At,T as Tt,Ta as Yt,U as Rt,V as Pt,Wa as Qt,_ as Ot,_a as Gt,ab as $t,ca as Bt,cb as Jt,e as yt,eb as Xt,gb as Zt,ib as er,j as _t,ka as Mt,n as wt,oa as kt,qa as Nt,sa as Lt,ta as Ut,u as bt,v as vt,va as Ft,xa as Dt,z as Et}from"./chunk-OOUNO2UZ.js";import{Db as ot,Eb as Fe,Fb as De,Fe as ct,Ge as ft,He as pt,I as Qe,J as Ge,Jb as at,K as $e,Ka as _e,Le as dt,Nf as Ht,Oa as ge,Ta as Le,Va as Ce,X as Je,Y as Xe,a as Te,b as Re,c as Ie,cc as ut,dc as lt,f as ir,gb as Ae,h as Ve,ha as Ze,hb as Se,hf as gt,ib as tt,ja as Be,k as Ee,ka as Me,l as qe,lf as mt,m as ze,mb as rt,n as Ke,na as et,nc as ht,o as Oe,p as Ye,qb as it,sa as ke,sb as Ue,ta as Ne,tb as nt,ub as st}from"./chunk-VDRVUQCF.js";var We=ir((tr,je)=>{"use strict";(function(ue){if(typeof tr=="object"&&typeof je<"u")je.exports=ue();else if(typeof define=="function"&&define.amd)define([],ue);else{var he;typeof window<"u"?he=window:typeof global<"u"?he=global:typeof self<"u"?he=self:he=this,he.mqtt=ue()}})(function(){var ue,he,de;return function(){function y(k,x,d){function f(s,i){if(!x[s]){if(!k[s]){var r=typeof Ie=="function"&&Ie;if(!i&&r)return r(s,!0);if(m)return m(s,!0);var e=new Error("Cannot find module '"+s+"'");throw e.code="MODULE_NOT_FOUND",e}var t=x[s]={exports:{}};k[s][0].call(t.exports,function(o){var l=k[s][1][o];return f(l||o)},t,t.exports,y,k,x,d)}return x[s].exports}for(var m=typeof Ie=="function"&&Ie,h=0;h0)throw new Error("Invalid string. Length must be a multiple of 4");var v=_.indexOf("=");v===-1&&(v=c);var R=v===c?0:4-v%4;return[v,R]}function e(_){var c=r(_),v=c[0],R=c[1];return(v+R)*3/4-R}function t(_,c,v){return(c+v)*3/4-v}function o(_){var c,v=r(_),R=v[0],A=v[1],W=new m(t(_,R,A)),j=0,I=A>0?R-4:R,P;for(P=0;P>16&255,W[j++]=c>>8&255,W[j++]=c&255;return A===2&&(c=f[_.charCodeAt(P)]<<2|f[_.charCodeAt(P+1)]>>4,W[j++]=c&255),A===1&&(c=f[_.charCodeAt(P)]<<10|f[_.charCodeAt(P+1)]<<4|f[_.charCodeAt(P+2)]>>2,W[j++]=c>>8&255,W[j++]=c&255),W}function l(_){return d[_>>18&63]+d[_>>12&63]+d[_>>6&63]+d[_&63]}function p(_,c,v){for(var R,A=[],W=c;WI?I:j+W));return R===1?(c=_[v-1],A.push(d[c>>2]+d[c<<4&63]+"==")):R===2&&(c=(_[v-2]<<8)+_[v-1],A.push(d[c>>10]+d[c>>4&63]+d[c<<2&63]+"=")),A.join("")}},{}],2:[function(y,k,x){},{}],3:[function(y,k,x){(function(d){(function(){"use strict";var f=y("base64-js"),m=y("ieee754");x.Buffer=r,x.SlowBuffer=R,x.INSPECT_MAX_BYTES=50;var h=2147483647;x.kMaxLength=h,r.TYPED_ARRAY_SUPPORT=s(),!r.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{var u=new Uint8Array(1);return u.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},u.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function i(u){if(u>h)throw new RangeError('The value "'+u+'" is invalid for option "size"');var n=new Uint8Array(u);return n.__proto__=r.prototype,n}function r(u,n,a){if(typeof u=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(u)}return e(u,n,a)}typeof Symbol<"u"&&Symbol.species!=null&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192;function e(u,n,a){if(typeof u=="string")return p(u,n);if(ArrayBuffer.isView(u))return g(u);if(u==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(Q(u,ArrayBuffer)||u&&Q(u.buffer,ArrayBuffer))return _(u,n,a);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var b=u.valueOf&&u.valueOf();if(b!=null&&b!==u)return r.from(b,n,a);var L=c(u);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return r.from(u[Symbol.toPrimitive]("string"),n,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}r.from=function(u,n,a){return e(u,n,a)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array;function t(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function o(u,n,a){return t(u),u<=0?i(u):n!==void 0?typeof a=="string"?i(u).fill(n,a):i(u).fill(n):i(u)}r.alloc=function(u,n,a){return o(u,n,a)};function l(u){return t(u),i(u<0?0:v(u)|0)}r.allocUnsafe=function(u){return l(u)},r.allocUnsafeSlow=function(u){return l(u)};function p(u,n){if((typeof n!="string"||n==="")&&(n="utf8"),!r.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var a=A(u,n)|0,b=i(a),L=b.write(u,n);return L!==a&&(b=b.slice(0,L)),b}function g(u){for(var n=u.length<0?0:v(u.length)|0,a=i(n),b=0;b=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return u|0}function R(u){return+u!=u&&(u=0),r.alloc(+u)}r.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==r.prototype},r.compare=function(n,a){if(Q(n,Uint8Array)&&(n=r.from(n,n.offset,n.byteLength)),Q(a,Uint8Array)&&(a=r.from(a,a.offset,a.byteLength)),!r.isBuffer(n)||!r.isBuffer(a))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===a)return 0;for(var b=n.length,L=a.length,K=0,J=Math.min(b,L);K2&&arguments[2]===!0;if(!b&&a===0)return 0;for(var L=!1;;)switch(n){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return te(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a*2;case"hex":return a>>>1;case"base64":return N(u).length;default:if(L)return b?-1:te(u).length;n=(""+n).toLowerCase(),L=!0}}r.byteLength=A;function W(u,n,a){var b=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((a===void 0||a>this.length)&&(a=this.length),a<=0)||(a>>>=0,n>>>=0,a<=n))return"";for(u||(u="utf8");;)switch(u){case"hex":return ee(this,n,a);case"utf8":case"utf-8":return E(this,n,a);case"ascii":return q(this,n,a);case"latin1":case"binary":return re(this,n,a);case"base64":return G(this,n,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,n,a);default:if(b)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),b=!0}}r.prototype._isBuffer=!0;function j(u,n,a){var b=u[n];u[n]=u[a],u[a]=b}r.prototype.swap16=function(){var n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var a=0;aa&&(n+=" ... "),""},r.prototype.compare=function(n,a,b,L,K){if(Q(n,Uint8Array)&&(n=r.from(n,n.offset,n.byteLength)),!r.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(a===void 0&&(a=0),b===void 0&&(b=n?n.length:0),L===void 0&&(L=0),K===void 0&&(K=this.length),a<0||b>n.length||L<0||K>this.length)throw new RangeError("out of range index");if(L>=K&&a>=b)return 0;if(L>=K)return-1;if(a>=b)return 1;if(a>>>=0,b>>>=0,L>>>=0,K>>>=0,this===n)return 0;for(var J=K-L,ae=b-a,le=Math.min(J,ae),ce=this.slice(L,K),pe=n.slice(a,b),fe=0;fe2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),a=+a,w(a)&&(a=L?0:u.length-1),a<0&&(a=u.length+a),a>=u.length){if(L)return-1;a=u.length-1}else if(a<0)if(L)a=0;else return-1;if(typeof n=="string"&&(n=r.from(n,b)),r.isBuffer(n))return n.length===0?-1:P(u,n,a,b,L);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(u,n,a):Uint8Array.prototype.lastIndexOf.call(u,n,a):P(u,[n],a,b,L);throw new TypeError("val must be string, number or Buffer")}function P(u,n,a,b,L){var K=1,J=u.length,ae=n.length;if(b!==void 0&&(b=String(b).toLowerCase(),b==="ucs2"||b==="ucs-2"||b==="utf16le"||b==="utf-16le")){if(u.length<2||n.length<2)return-1;K=2,J/=2,ae/=2,a/=2}function le(we,ye){return K===1?we[ye]:we.readUInt16BE(ye*K)}var ce;if(L){var pe=-1;for(ce=a;ceJ&&(a=J-ae),ce=a;ce>=0;ce--){for(var fe=!0,me=0;meL&&(b=L)):b=L;var K=n.length;b>K/2&&(b=K/2);for(var J=0;J>>0,isFinite(b)?(b=b>>>0,L===void 0&&(L="utf8")):(L=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-a;if((b===void 0||b>K)&&(b=K),n.length>0&&(b<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var J=!1;;)switch(L){case"hex":return S(this,n,a,b);case"utf8":case"utf-8":return V(this,n,a,b);case"ascii":return M(this,n,a,b);case"latin1":case"binary":return ne(this,n,a,b);case"base64":return se(this,n,a,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,n,a,b);default:if(J)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),J=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(u,n,a){return n===0&&a===u.length?f.fromByteArray(u):f.fromByteArray(u.slice(n,a))}function E(u,n,a){a=Math.min(u.length,a);for(var b=[],L=n;L239?4:K>223?3:K>191?2:1;if(L+ae<=a){var le,ce,pe,fe;switch(ae){case 1:K<128&&(J=K);break;case 2:le=u[L+1],(le&192)===128&&(fe=(K&31)<<6|le&63,fe>127&&(J=fe));break;case 3:le=u[L+1],ce=u[L+2],(le&192)===128&&(ce&192)===128&&(fe=(K&15)<<12|(le&63)<<6|ce&63,fe>2047&&(fe<55296||fe>57343)&&(J=fe));break;case 4:le=u[L+1],ce=u[L+2],pe=u[L+3],(le&192)===128&&(ce&192)===128&&(pe&192)===128&&(fe=(K&15)<<18|(le&63)<<12|(ce&63)<<6|pe&63,fe>65535&&fe<1114112&&(J=fe))}}J===null?(J=65533,ae=1):J>65535&&(J-=65536,b.push(J>>>10&1023|55296),J=56320|J&1023),b.push(J),L+=ae}return U(b)}var T=4096;function U(u){var n=u.length;if(n<=T)return String.fromCharCode.apply(String,u);for(var a="",b=0;bb)&&(a=b);for(var L="",K=n;Kb&&(n=b),a<0?(a+=b,a<0&&(a=0)):a>b&&(a=b),aa)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUIntLE=function(n,a,b){n=n>>>0,a=a>>>0,b||D(n,a,this.length);for(var L=this[n],K=1,J=0;++J>>0,a=a>>>0,b||D(n,a,this.length);for(var L=this[n+--a],K=1;a>0&&(K*=256);)L+=this[n+--a]*K;return L},r.prototype.readUInt8=function(n,a){return n=n>>>0,a||D(n,1,this.length),this[n]},r.prototype.readUInt16LE=function(n,a){return n=n>>>0,a||D(n,2,this.length),this[n]|this[n+1]<<8},r.prototype.readUInt16BE=function(n,a){return n=n>>>0,a||D(n,2,this.length),this[n]<<8|this[n+1]},r.prototype.readUInt32LE=function(n,a){return n=n>>>0,a||D(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},r.prototype.readUInt32BE=function(n,a){return n=n>>>0,a||D(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},r.prototype.readIntLE=function(n,a,b){n=n>>>0,a=a>>>0,b||D(n,a,this.length);for(var L=this[n],K=1,J=0;++J=K&&(L-=Math.pow(2,8*a)),L},r.prototype.readIntBE=function(n,a,b){n=n>>>0,a=a>>>0,b||D(n,a,this.length);for(var L=a,K=1,J=this[n+--L];L>0&&(K*=256);)J+=this[n+--L]*K;return K*=128,J>=K&&(J-=Math.pow(2,8*a)),J},r.prototype.readInt8=function(n,a){return n=n>>>0,a||D(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},r.prototype.readInt16LE=function(n,a){n=n>>>0,a||D(n,2,this.length);var b=this[n]|this[n+1]<<8;return b&32768?b|4294901760:b},r.prototype.readInt16BE=function(n,a){n=n>>>0,a||D(n,2,this.length);var b=this[n+1]|this[n]<<8;return b&32768?b|4294901760:b},r.prototype.readInt32LE=function(n,a){return n=n>>>0,a||D(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},r.prototype.readInt32BE=function(n,a){return n=n>>>0,a||D(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},r.prototype.readFloatLE=function(n,a){return n=n>>>0,a||D(n,4,this.length),m.read(this,n,!0,23,4)},r.prototype.readFloatBE=function(n,a){return n=n>>>0,a||D(n,4,this.length),m.read(this,n,!1,23,4)},r.prototype.readDoubleLE=function(n,a){return n=n>>>0,a||D(n,8,this.length),m.read(this,n,!0,52,8)},r.prototype.readDoubleBE=function(n,a){return n=n>>>0,a||D(n,8,this.length),m.read(this,n,!1,52,8)};function X(u,n,a,b,L,K){if(!r.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>L||nu.length)throw new RangeError("Index out of range")}r.prototype.writeUIntLE=function(n,a,b,L){if(n=+n,a=a>>>0,b=b>>>0,!L){var K=Math.pow(2,8*b)-1;X(this,n,a,b,K,0)}var J=1,ae=0;for(this[a]=n&255;++ae>>0,b=b>>>0,!L){var K=Math.pow(2,8*b)-1;X(this,n,a,b,K,0)}var J=b-1,ae=1;for(this[a+J]=n&255;--J>=0&&(ae*=256);)this[a+J]=n/ae&255;return a+b},r.prototype.writeUInt8=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,1,255,0),this[a]=n&255,a+1},r.prototype.writeUInt16LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,65535,0),this[a]=n&255,this[a+1]=n>>>8,a+2},r.prototype.writeUInt16BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,65535,0),this[a]=n>>>8,this[a+1]=n&255,a+2},r.prototype.writeUInt32LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,4294967295,0),this[a+3]=n>>>24,this[a+2]=n>>>16,this[a+1]=n>>>8,this[a]=n&255,a+4},r.prototype.writeUInt32BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,4294967295,0),this[a]=n>>>24,this[a+1]=n>>>16,this[a+2]=n>>>8,this[a+3]=n&255,a+4},r.prototype.writeIntLE=function(n,a,b,L){if(n=+n,a=a>>>0,!L){var K=Math.pow(2,8*b-1);X(this,n,a,b,K-1,-K)}var J=0,ae=1,le=0;for(this[a]=n&255;++J>0)-le&255;return a+b},r.prototype.writeIntBE=function(n,a,b,L){if(n=+n,a=a>>>0,!L){var K=Math.pow(2,8*b-1);X(this,n,a,b,K-1,-K)}var J=b-1,ae=1,le=0;for(this[a+J]=n&255;--J>=0&&(ae*=256);)n<0&&le===0&&this[a+J+1]!==0&&(le=1),this[a+J]=(n/ae>>0)-le&255;return a+b},r.prototype.writeInt8=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,1,127,-128),n<0&&(n=255+n+1),this[a]=n&255,a+1},r.prototype.writeInt16LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,32767,-32768),this[a]=n&255,this[a+1]=n>>>8,a+2},r.prototype.writeInt16BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,2,32767,-32768),this[a]=n>>>8,this[a+1]=n&255,a+2},r.prototype.writeInt32LE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,2147483647,-2147483648),this[a]=n&255,this[a+1]=n>>>8,this[a+2]=n>>>16,this[a+3]=n>>>24,a+4},r.prototype.writeInt32BE=function(n,a,b){return n=+n,a=a>>>0,b||X(this,n,a,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[a]=n>>>24,this[a+1]=n>>>16,this[a+2]=n>>>8,this[a+3]=n&255,a+4};function $(u,n,a,b,L,K){if(a+b>u.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function oe(u,n,a,b,L){return n=+n,a=a>>>0,L||$(u,n,a,4,34028234663852886e22,-34028234663852886e22),m.write(u,n,a,b,23,4),a+4}r.prototype.writeFloatLE=function(n,a,b){return oe(this,n,a,!0,b)},r.prototype.writeFloatBE=function(n,a,b){return oe(this,n,a,!1,b)};function Z(u,n,a,b,L){return n=+n,a=a>>>0,L||$(u,n,a,8,17976931348623157e292,-17976931348623157e292),m.write(u,n,a,b,52,8),a+8}r.prototype.writeDoubleLE=function(n,a,b){return Z(this,n,a,!0,b)},r.prototype.writeDoubleBE=function(n,a,b){return Z(this,n,a,!1,b)},r.prototype.copy=function(n,a,b,L){if(!r.isBuffer(n))throw new TypeError("argument should be a Buffer");if(b||(b=0),!L&&L!==0&&(L=this.length),a>=n.length&&(a=n.length),a||(a=0),L>0&&L=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),n.length-a=0;--J)n[J+a]=this[J+b];else Uint8Array.prototype.set.call(n,this.subarray(b,L),a);return K},r.prototype.fill=function(n,a,b,L){if(typeof n=="string"){if(typeof a=="string"?(L=a,a=0,b=this.length):typeof b=="string"&&(L=b,b=this.length),L!==void 0&&typeof L!="string")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!r.isEncoding(L))throw new TypeError("Unknown encoding: "+L);if(n.length===1){var K=n.charCodeAt(0);(L==="utf8"&&K<128||L==="latin1")&&(n=K)}}else typeof n=="number"&&(n=n&255);if(a<0||this.length>>0,b=b===void 0?this.length:b>>>0,n||(n=0);var J;if(typeof n=="number")for(J=a;J55295&&a<57344){if(!L){if(a>56319){(n-=3)>-1&&K.push(239,191,189);continue}else if(J+1===b){(n-=3)>-1&&K.push(239,191,189);continue}L=a;continue}if(a<56320){(n-=3)>-1&&K.push(239,191,189),L=a;continue}a=(L-55296<<10|a-56320)+65536}else L&&(n-=3)>-1&&K.push(239,191,189);if(L=null,a<128){if((n-=1)<0)break;K.push(a)}else if(a<2048){if((n-=2)<0)break;K.push(a>>6|192,a&63|128)}else if(a<65536){if((n-=3)<0)break;K.push(a>>12|224,a>>6&63|128,a&63|128)}else if(a<1114112){if((n-=4)<0)break;K.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else throw new Error("Invalid code point")}return K}function O(u){for(var n=[],a=0;a>8,L=a%256,K.push(L),K.push(b);return K}function N(u){return f.toByteArray(B(u))}function z(u,n,a,b){for(var L=0;L=n.length||L>=u.length);++L)n[L+a]=u[L];return L}function Q(u,n){return u instanceof n||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===n.name}function w(u){return u!==u}}).call(this)}).call(this,y("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:5}],4:[function(y,k,x){"use strict";var d=typeof Reflect=="object"?Reflect:null,f=d&&typeof d.apply=="function"?d.apply:function(P,S,V){return Function.prototype.apply.call(P,S,V)},m;d&&typeof d.ownKeys=="function"?m=d.ownKeys:Object.getOwnPropertySymbols?m=function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:m=function(P){return Object.getOwnPropertyNames(P)};function h(I){console&&console.warn&&console.warn(I)}var s=Number.isNaN||function(P){return P!==P};function i(){i.init.call(this)}k.exports=i,k.exports.once=A,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var r=10;function e(I){if(typeof I!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof I)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(I){if(typeof I!="number"||I<0||s(I))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+I+".");r=I}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||s(P))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+P+".");return this._maxListeners=P,this};function t(I){return I._maxListeners===void 0?i.defaultMaxListeners:I._maxListeners}i.prototype.getMaxListeners=function(){return t(this)},i.prototype.emit=function(P){for(var S=[],V=1;V0&&(se=S[0]),se instanceof Error)throw se;var ie=new Error("Unhandled error."+(se?" ("+se.message+")":""));throw ie.context=se,ie}var G=ne[P];if(G===void 0)return!1;if(typeof G=="function")f(G,this,S);else for(var E=G.length,T=c(G,E),V=0;V0&&se.length>M&&!se.warned){se.warned=!0;var ie=new Error("Possible EventEmitter memory leak detected. "+se.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");ie.name="MaxListenersExceededWarning",ie.emitter=I,ie.type=P,ie.count=se.length,h(ie)}return I}i.prototype.addListener=function(P,S){return o(this,P,S,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(P,S){return o(this,P,S,!0)};function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(I,P,S){var V={fired:!1,wrapFn:void 0,target:I,type:P,listener:S},M=l.bind(V);return M.listener=S,V.wrapFn=M,M}i.prototype.once=function(P,S){return e(S),this.on(P,p(this,P,S)),this},i.prototype.prependOnceListener=function(P,S){return e(S),this.prependListener(P,p(this,P,S)),this},i.prototype.removeListener=function(P,S){var V,M,ne,se,ie;if(e(S),M=this._events,M===void 0)return this;if(V=M[P],V===void 0)return this;if(V===S||V.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete M[P],M.removeListener&&this.emit("removeListener",P,V.listener||S));else if(typeof V!="function"){for(ne=-1,se=V.length-1;se>=0;se--)if(V[se]===S||V[se].listener===S){ie=V[se].listener,ne=se;break}if(ne<0)return this;ne===0?V.shift():v(V,ne),V.length===1&&(M[P]=V[0]),M.removeListener!==void 0&&this.emit("removeListener",P,ie||S)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(P){var S,V,M;if(V=this._events,V===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[P]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete V[P]),this;if(arguments.length===0){var ne=Object.keys(V),se;for(M=0;M=0;M--)this.removeListener(P,S[M]);return this};function g(I,P,S){var V=I._events;if(V===void 0)return[];var M=V[P];return M===void 0?[]:typeof M=="function"?S?[M.listener||M]:[M]:S?R(M):c(M,M.length)}i.prototype.listeners=function(P){return g(this,P,!0)},i.prototype.rawListeners=function(P){return g(this,P,!1)},i.listenerCount=function(I,P){return typeof I.listenerCount=="function"?I.listenerCount(P):_.call(I,P)},i.prototype.listenerCount=_;function _(I){var P=this._events;if(P!==void 0){var S=P[I];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?m(this._events):[]};function c(I,P){for(var S=new Array(P),V=0;V>1,l=-7,p=m?s-1:0,g=m?-1:1,_=d[f+p];for(p+=g,i=_&(1<<-l)-1,_>>=-l,l+=e;l>0;i=i*256+d[f+p],p+=g,l-=8);for(r=i&(1<<-l)-1,i>>=-l,l+=h;l>0;r=r*256+d[f+p],p+=g,l-=8);if(i===0)i=1-o;else{if(i===t)return r?NaN:(_?-1:1)*(1/0);r=r+Math.pow(2,h),i=i-o}return(_?-1:1)*r*Math.pow(2,i-h)},x.write=function(d,f,m,h,s,i){var r,e,t,o=i*8-s-1,l=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=h?0:i-1,c=h?1:-1,v=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(e=isNaN(f)?1:0,r=l):(r=Math.floor(Math.log(f)/Math.LN2),f*(t=Math.pow(2,-r))<1&&(r--,t*=2),r+p>=1?f+=g/t:f+=g*Math.pow(2,1-p),f*t>=2&&(r++,t/=2),r+p>=l?(e=0,r=l):r+p>=1?(e=(f*t-1)*Math.pow(2,s),r=r+p):(e=f*Math.pow(2,p-1)*Math.pow(2,s),r=0));s>=8;d[m+_]=e&255,_+=c,e/=256,s-=8);for(r=r<0;d[m+_]=r&255,_+=c,r/=256,o-=8);d[m+_-c]|=v*128}},{}],6:[function(y,k,x){(function(d,f){(function(){"use strict";let m=y("events").EventEmitter,h=y("./store"),s=y("./topic-alias-recv"),i=y("./topic-alias-send"),r=y("mqtt-packet"),e=y("./default-message-id-provider"),t=y("readable-stream").Writable,o=y("inherits"),l=y("reinterval"),p=y("rfdc/default"),g=y("./validations"),_=y("xtend"),c=y("debug")("mqttjs:client"),v=d?d.nextTick:function(E){setTimeout(E,0)},R=f.setImmediate||function(E){v(E)},A={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0},W=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],j={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function I(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function P(E,T){if(E.options.protocolVersion===5&&T.cmd==="publish"){let U;T.properties&&(U=T.properties.topicAlias);let q=T.topic.toString();if(E.topicAliasSend)if(U){if(q.length!==0&&(c("applyTopicAlias :: register topic: %s - alias: %d",q,U),!E.topicAliasSend.put(q,U)))return c("applyTopicAlias :: error out of range. topic: %s - alias: %d",q,U),new Error("Sending Topic Alias out of range")}else q.length!==0&&(E.options.autoAssignTopicAlias?(U=E.topicAliasSend.getAliasByTopic(q),U?(T.topic="",T.properties=Re(Te({},T.properties),{topicAlias:U}),c("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",q,U)):(U=E.topicAliasSend.getLruAlias(),E.topicAliasSend.put(q,U),T.properties=Re(Te({},T.properties),{topicAlias:U}),c("applyTopicAlias :: auto assign topic: %s - alias: %d",q,U))):E.options.autoUseTopicAlias&&(U=E.topicAliasSend.getAliasByTopic(q),U&&(T.topic="",T.properties=Re(Te({},T.properties),{topicAlias:U}),c("applyTopicAlias :: auto use topic: %s - alias: %d",q,U))));else if(U)return c("applyTopicAlias :: error out of range. topic: %s - alias: %d",q,U),new Error("Sending Topic Alias out of range")}}function S(E,T){let U;T.properties&&(U=T.properties.topicAlias);let q=T.topic.toString();if(q.length===0){if(typeof U>"u")return new Error("Unregistered Topic Alias");if(q=E.topicAliasSend.getTopicByAlias(U),typeof q>"u")return new Error("Unregistered Topic Alias");T.topic=q}U&&delete T.properties.topicAlias}function V(E,T,U){c("sendPacket :: packet: %O",T),c("sendPacket :: emitting `packetsend`"),E.emit("packetsend",T),c("sendPacket :: writing to stream");let q=r.writeToStream(T,E.stream,E.options);c("sendPacket :: writeToStream result %s",q),!q&&U&&U!==ie?(c("sendPacket :: handle events on `drain` once through callback."),E.stream.once("drain",U)):U&&(c("sendPacket :: invoking cb"),U())}function M(E){E&&(c("flush: queue exists? %b",!!E),Object.keys(E).forEach(function(T){typeof E[T].cb=="function"&&(E[T].cb(new Error("Connection closed")),delete E[T])}))}function ne(E){E&&(c("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(E).forEach(function(T){E[T].volatile&&typeof E[T].cb=="function"&&(E[T].cb(new Error("Connection closed")),delete E[T])}))}function se(E,T,U,q){c("storeAndSend :: store packet with cmd %s to outgoingStore",T.cmd);let re=T,ee;if(re.cmd==="publish"&&(re=p(T),ee=S(E,re),ee))return U&&U(ee);E.outgoingStore.put(re,function(D){if(D)return U&&U(D);q(),V(E,T,U)})}function ie(E){c("nop ::",E)}function G(E,T){let U,q=this;if(!(this instanceof G))return new G(E,T);this.options=T||{};for(U in A)typeof this.options[U]>"u"?this.options[U]=A[U]:this.options[U]=T[U];c("MqttClient :: options.protocol",T.protocol),c("MqttClient :: options.protocolVersion",T.protocolVersion),c("MqttClient :: options.username",T.username),c("MqttClient :: options.keepalive",T.keepalive),c("MqttClient :: options.reconnectPeriod",T.reconnectPeriod),c("MqttClient :: options.rejectUnauthorized",T.rejectUnauthorized),c("MqttClient :: options.topicAliasMaximum",T.topicAliasMaximum),this.options.clientId=typeof T.clientId=="string"?T.clientId:I(),c("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=T.protocolVersion===5&&T.customHandleAcks?T.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=E,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new e:this.options.messageIdProvider,this.outgoingStore=T.outgoingStore||new h,this.incomingStore=T.incomingStore||new h,this.queueQoSZero=T.queueQoSZero===void 0?!0:T.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,T.topicAliasMaximum>0&&(T.topicAliasMaximum>65535?c("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(T.topicAliasMaximum)),this.on("connect",function(){let re=this.queue;function ee(){let H=re.shift();c("deliver :: entry %o",H);let D=null;if(!H){q._resubscribe();return}D=H.packet,c("deliver :: call _sendPacket for %o",D);let X=!0;D.messageId&&D.messageId!==0&&(q.messageIdProvider.register(D.messageId)||(X=!1)),X?q._sendPacket(D,function($){H.cb&&H.cb($),ee()}):(c("messageId: %d has already used. The message is skipped and removed.",D.messageId),ee())}c("connect :: sending queued packets"),ee()}),this.on("close",function(){c("close :: connected set to `false`"),this.connected=!1,c("close :: clearing connackTimer"),clearTimeout(this.connackTimer),c("close :: clearing ping timer"),q.pingTimer!==null&&(q.pingTimer.clear(),q.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),c("close :: calling _setupReconnect"),this._setupReconnect()}),m.call(this),c("MqttClient :: setting up stream"),this._setupStream()}o(G,m),G.prototype._setupStream=function(){let E=this,T=new t,U=r.parser(this.options),q=null,re=[];c("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),c("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),U.on("packet",function($){c("parser :: on packet push to packets array."),re.push($)});function ee(){if(re.length)v(H);else{let $=q;q=null,$()}}function H(){c("work :: getting next packet in queue");let $=re.shift();if($)c("work :: packet pulled from queue"),E._handlePacket($,ee);else{c("work :: no packets in queue");let oe=q;q=null,c("work :: done flag is %s",!!oe),oe&&oe()}}T._write=function($,oe,Z){q=Z,c("writable stream :: parsing buffer"),U.parse($),H()};function D($){c("streamErrorHandler :: error",$.message),W.includes($.code)?(c("streamErrorHandler :: emitting error"),E.emit("error",$)):ie($)}c("_setupStream :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",D),this.stream.on("close",function(){c("(%s)stream :: on close",E.options.clientId),ne(E.outgoing),c("stream: emit close to MqttClient"),E.emit("close")}),c("_setupStream: sending packet `connect`");let X=Object.create(this.options);if(X.cmd="connect",this.topicAliasRecv&&(X.properties||(X.properties={}),this.topicAliasRecv&&(X.properties.topicAliasMaximum=this.topicAliasRecv.max)),V(this,X),U.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return E.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let $=_({cmd:"auth",reasonCode:0},this.options.authPacket);V(this,$)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){c("!!connectTimeout hit!! Calling _cleanUp with force `true`"),E._cleanUp(!0)},this.options.connectTimeout)},G.prototype._handlePacket=function(E,T){let U=this.options;if(U.protocolVersion===5&&U.properties&&U.properties.maximumPacketSize&&U.properties.maximumPacketSize0||!D())&&this._storeProcessingQueue.push({invoke:D,cbStorePut:U.cbStorePut,callback:q}),this},G.prototype.subscribe=function(){let E=this,T=new Array(arguments.length);for(let Z=0;Z0){let te={qos:Y.qos};D===5&&(te.nl=Y.nl||!1,te.rap=Y.rap||!1,te.rh=Y.rh||0,te.properties=Y.properties),E._resubscribeTopics[Y.topic]=te,B.push(Y.topic)}}),E.messageIdToTopic[F.messageId]=B}return E.outgoing[F.messageId]={volatile:!0,cb:function(B,Y){if(!B){let te=Y.granted;for(let O=0;O0||!oe())&&this._storeProcessingQueue.push({invoke:oe,callback:ee}),this},G.prototype.unsubscribe=function(){let E=this,T=new Array(arguments.length);for(let D=0;D0||!H())&&this._storeProcessingQueue.push({invoke:H,callback:q}),this},G.prototype.end=function(E,T,U){let q=this;c("end :: (%s)",this.options.clientId),(E==null||typeof E!="boolean")&&(U=T||ie,T=E,E=!1,typeof T!="object"&&(U=T,T=null,typeof U!="function"&&(U=ie))),typeof T!="object"&&(U=T,T=null),c("end :: cb? %s",!!U),U=U||ie;function re(){c("end :: closeStores: closing incoming and outgoing stores"),q.disconnected=!0,q.incomingStore.close(function(H){q.outgoingStore.close(function(D){if(c("end :: closeStores: emitting end"),q.emit("end"),U){let X=H||D;c("end :: closeStores: invoking callback with args"),U(X)}})}),q._deferredReconnect&&q._deferredReconnect()}function ee(){c("end :: (%s) :: finish :: calling _cleanUp with force %s",q.options.clientId,E),q._cleanUp(E,()=>{c("end :: finish :: calling process.nextTick on closeStores"),v(re.bind(q))},T)}return this.disconnecting?(U(),this):(this._clearReconnect(),this.disconnecting=!0,!E&&Object.keys(this.outgoing).length>0?(c("end :: (%s) :: calling finish in 10ms once outgoing is empty",q.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,ee,10))):(c("end :: (%s) :: immediately calling finish",q.options.clientId),ee()),this)},G.prototype.removeOutgoingMessage=function(E){let T=this.outgoing[E]?this.outgoing[E].cb:null;return delete this.outgoing[E],this.outgoingStore.del({messageId:E},function(){T(new Error("Message removed"))}),this},G.prototype.reconnect=function(E){c("client reconnect");let T=this,U=function(){E?(T.options.incomingStore=E.incomingStore,T.options.outgoingStore=E.outgoingStore):(T.options.incomingStore=null,T.options.outgoingStore=null),T.incomingStore=T.options.incomingStore||new h,T.outgoingStore=T.options.outgoingStore||new h,T.disconnecting=!1,T.disconnected=!1,T._deferredReconnect=null,T._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=U:U(),this},G.prototype._reconnect=function(){c("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),c("client already connected. disconnecting first.")):(c("_reconnect: calling _setupStream"),this._setupStream())},G.prototype._setupReconnect=function(){let E=this;!E.disconnecting&&!E.reconnectTimer&&E.options.reconnectPeriod>0?(this.reconnecting||(c("_setupReconnect :: emit `offline` state"),this.emit("offline"),c("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),c("_setupReconnect :: setting reconnectTimer for %d ms",E.options.reconnectPeriod),E.reconnectTimer=setInterval(function(){c("reconnectTimer :: reconnect triggered!"),E._reconnect()},E.options.reconnectPeriod)):c("_setupReconnect :: doing nothing...")},G.prototype._clearReconnect=function(){c("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},G.prototype._cleanUp=function(E,T){let U=arguments[2];if(T&&(c("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),c("_cleanUp :: forced? %s",E),E)this.options.reconnectPeriod===0&&this.options.clean&&M(this.outgoing),c("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let q=_({cmd:"disconnect"},U);c("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(q,R.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(c("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(c("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),T&&!this.connected&&(c("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",T),T())},G.prototype._sendPacket=function(E,T,U){c("_sendPacket :: (%s) :: start",this.options.clientId),U=U||ie,T=T||ie;let q=P(this,E);if(q){T(q);return}if(!this.connected){if(E.cmd==="auth"){this._shiftPingInterval(),V(this,E,T);return}c("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(E,T,U);return}switch(this._shiftPingInterval(),E.cmd){case"publish":break;case"pubrel":se(this,E,T,U);return;default:V(this,E,T);return}switch(E.qos){case 2:case 1:se(this,E,T,U);break;case 0:default:V(this,E,T);break}c("_sendPacket :: (%s) :: end",this.options.clientId)},G.prototype._storePacket=function(E,T,U){c("_storePacket :: packet: %o",E),c("_storePacket :: cb? %s",!!T),U=U||ie;let q=E;if(q.cmd==="publish"){q=p(E);let re=S(this,q);if(re)return T&&T(re)}(q.qos||0)===0&&this.queueQoSZero||q.cmd!=="publish"?this.queue.push({packet:q,cb:T}):q.qos>0?(T=this.outgoing[q.messageId]?this.outgoing[q.messageId].cb:null,this.outgoingStore.put(q,function(re){if(re)return T&&T(re);U()})):T&&T(new Error("No connection to broker"))},G.prototype._setupPingTimer=function(){c("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);let E=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=l(function(){E._checkPing()},this.options.keepalive*1e3))},G.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(this.options.keepalive*1e3)},G.prototype._checkPing=function(){c("_checkPing :: checking ping..."),this.pingResp?(c("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(c("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},G.prototype._handlePingresp=function(){this.pingResp=!0},G.prototype._handleConnack=function(E){c("_handleConnack");let T=this.options,q=T.protocolVersion===5?E.reasonCode:E.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,E.properties){if(E.properties.topicAliasMaximum){if(E.properties.topicAliasMaximum>65535){this.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}E.properties.topicAliasMaximum>0&&(this.topicAliasSend=new i(E.properties.topicAliasMaximum))}E.properties.serverKeepAlive&&T.keepalive&&(T.keepalive=E.properties.serverKeepAlive,this._shiftPingInterval()),E.properties.maximumPacketSize&&(T.properties||(T.properties={}),T.properties.maximumPacketSize=E.properties.maximumPacketSize)}if(q===0)this.reconnecting=!1,this._onConnect(E);else if(q>0){let re=new Error("Connection refused: "+j[q]);re.code=q,this.emit("error",re)}},G.prototype._handleAuth=function(E){let U=this.options.protocolVersion,q=U===5?E.reasonCode:E.returnCode;if(U!==5){let ee=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+U);ee.code=q,this.emit("error",ee);return}let re=this;this.handleAuth(E,function(ee,H){if(ee){re.emit("error",ee);return}if(q===24)re.reconnecting=!1,re._sendPacket(H);else{let D=new Error("Connection refused: "+j[q]);ee.code=q,re.emit("error",D)}})},G.prototype.handleAuth=function(E,T){T()},G.prototype._handlePublish=function(E,T){c("_handlePublish: packet %o",E),T=typeof T<"u"?T:ie;let U=E.topic.toString(),q=E.payload,re=E.qos,ee=E.messageId,H=this,D=this.options,X=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let $;if(E.properties&&($=E.properties.topicAlias),typeof $<"u")if(U.length===0)if($>0&&$<=65535){let oe=this.topicAliasRecv.getTopicByAlias($);if(oe)U=oe,c("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",U,$);else{c("_handlePublish :: unregistered topic alias. alias: %d",$),this.emit("error",new Error("Received unregistered Topic Alias"));return}}else{c("_handlePublish :: topic alias out of range. alias: %d",$),this.emit("error",new Error("Received Topic Alias is out of range"));return}else if(this.topicAliasRecv.put(U,$))c("_handlePublish :: registered topic: %s - alias: %d",U,$);else{c("_handlePublish :: topic alias out of range. alias: %d",$),this.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(c("_handlePublish: qos %d",re),re){case 2:{D.customHandleAcks(U,q,E,function($,oe){if($ instanceof Error||(oe=$,$=null),$)return H.emit("error",$);if(X.indexOf(oe)===-1)return H.emit("error",new Error("Wrong reason code for pubrec"));oe?H._sendPacket({cmd:"pubrec",messageId:ee,reasonCode:oe},T):H.incomingStore.put(E,function(){H._sendPacket({cmd:"pubrec",messageId:ee},T)})});break}case 1:{D.customHandleAcks(U,q,E,function($,oe){if($ instanceof Error||(oe=$,$=null),$)return H.emit("error",$);if(X.indexOf(oe)===-1)return H.emit("error",new Error("Wrong reason code for puback"));oe||H.emit("message",U,q,E),H.handleMessage(E,function(Z){if(Z)return T&&T(Z);H._sendPacket({cmd:"puback",messageId:ee,reasonCode:oe},T)})});break}case 0:this.emit("message",U,q,E),this.handleMessage(E,T);break;default:c("_handlePublish: unknown QoS. Doing nothing.");break}},G.prototype.handleMessage=function(E,T){T()},G.prototype._handleAck=function(E){let T=E.messageId,U=E.cmd,q=null,re=this.outgoing[T]?this.outgoing[T].cb:null,ee=this,H;if(!re){c("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(c("_handleAck :: packet type",U),U){case"pubcomp":case"puback":{let D=E.reasonCode;D&&D>0&&D!==16&&(H=new Error("Publish error: "+j[D]),H.code=D,re(H,E)),delete this.outgoing[T],this.outgoingStore.del(E,re),this.messageIdProvider.deallocate(T),this._invokeStoreProcessingQueue();break}case"pubrec":{q={cmd:"pubrel",qos:2,messageId:T};let D=E.reasonCode;D&&D>0&&D!==16?(H=new Error("Publish error: "+j[D]),H.code=D,re(H,E)):this._sendPacket(q);break}case"suback":{delete this.outgoing[T],this.messageIdProvider.deallocate(T);for(let D=0;D0)if(this.options.resubscribe)if(this.options.protocolVersion===5){c("_resubscribe: protocolVersion 5");for(let T=0;T0){let E=this._storeProcessingQueue[0];if(E&&E.invoke())return this._storeProcessingQueue.shift(),!0}return!1},G.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},G.prototype._flushStoreProcessingQueue=function(){for(let E of this._storeProcessingQueue)E.cbStorePut&&E.cbStorePut(new Error("Connection closed")),E.callback&&E.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},k.exports=G}).call(this)}).call(this,y("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-message-id-provider":12,"./store":13,"./topic-alias-recv":14,"./topic-alias-send":15,"./validations":16,_process:85,debug:20,events:4,inherits:24,"mqtt-packet":48,"readable-stream":72,reinterval:73,"rfdc/default":74,xtend:82}],7:[function(y,k,x){"use strict";let{Buffer:d}=y("buffer"),f=y("readable-stream").Transform,m=y("duplexify"),h,s,i,r=!1;function e(){let g=new f;return g._write=function(_,c,v){h.sendSocketMessage({data:_.buffer,success:function(){v()},fail:function(){v(new Error)}})},g._flush=function(c){h.closeSocket({success:function(){c()}})},g}function t(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function o(g,_){let c=g.protocol==="alis"?"wss":"ws",v=c+"://"+g.hostname+g.path;return g.port&&g.port!==80&&g.port!==443&&(v=c+"://"+g.hostname+":"+g.port+g.path),typeof g.transformWsUrl=="function"&&(v=g.transformWsUrl(v,g,_)),v}function l(){r||(r=!0,h.onSocketOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onSocketMessage(function(g){if(typeof g.data=="string"){let _=d.from(g.data,"base64");s.push(_)}else{let _=new FileReader;_.addEventListener("load",function(){let c=_.result;c instanceof ArrayBuffer?c=d.from(c):c=d.from(c,"utf8"),s.push(c)}),_.readAsArrayBuffer(g.data)}}),h.onSocketClose(function(){i.end(),i.destroy()}),h.onSocketError(function(g){i.destroy(g)}))}function p(g,_){if(_.hostname=_.hostname||_.host,!_.hostname)throw new Error("Could not determine host. Specify host manually.");let c=_.protocolId==="MQIsdp"&&_.protocolVersion===3?"mqttv3.1":"mqtt";t(_);let v=o(_,g);return h=_.my,h.connectSocket({url:v,protocols:c}),s=e(),i=m.obj(),l(),i}k.exports=p},{buffer:3,duplexify:22,"readable-stream":72}],8:[function(y,k,x){"use strict";let d=y("net"),f=y("debug")("mqttjs:tcp");function m(h,s){s.port=s.port||1883,s.hostname=s.hostname||s.host||"localhost";let i=s.port,r=s.hostname;return f("port %d and host %s",i,r),d.createConnection(i,r)}k.exports=m},{debug:20,net:2}],9:[function(y,k,x){"use strict";let d=y("tls"),f=y("net"),m=y("debug")("mqttjs:tls");function h(s,i){i.port=i.port||8883,i.host=i.hostname||i.host||"localhost",f.isIP(i.host)===0&&(i.servername=i.host),i.rejectUnauthorized=i.rejectUnauthorized!==!1,delete i.path,m("port %d host %s rejectUnauthorized %b",i.port,i.host,i.rejectUnauthorized);let r=d.connect(i);r.on("secureConnect",function(){i.rejectUnauthorized&&!r.authorized?r.emit("error",new Error("TLS not authorized")):r.removeListener("error",e)});function e(t){i.rejectUnauthorized&&s.emit("error",t),r.end()}return r.on("error",e),r}k.exports=h},{debug:20,net:2,tls:2}],10:[function(y,k,x){(function(d){(function(){"use strict";let{Buffer:f}=y("buffer"),m=y("ws"),h=y("debug")("mqttjs:ws"),s=y("duplexify"),i=y("readable-stream").Transform,r=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],e=typeof d<"u"&&d.title==="browser"||typeof __webpack_require__=="function";function t(v,R){let A=v.protocol+"://"+v.hostname+":"+v.port+v.path;return typeof v.transformWsUrl=="function"&&(A=v.transformWsUrl(A,v,R)),A}function o(v){let R=v;return v.hostname||(R.hostname="localhost"),v.port||(v.protocol==="wss"?R.port=443:R.port=80),v.path||(R.path="/"),v.wsOptions||(R.wsOptions={}),!e&&v.protocol==="wss"&&r.forEach(function(A){Object.prototype.hasOwnProperty.call(v,A)&&!Object.prototype.hasOwnProperty.call(v.wsOptions,A)&&(R.wsOptions[A]=v[A])}),R}function l(v){let R=o(v);if(R.hostname||(R.hostname=R.host),!R.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let A=new URL(document.URL);R.hostname=A.hostname,R.port||(R.port=A.port)}return R.objectMode===void 0&&(R.objectMode=!(R.binary===!0||R.binary===void 0)),R}function p(v,R,A){h("createWebSocket"),h("protocol: "+A.protocolId+" "+A.protocolVersion);let W=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt";return h("creating new Websocket for url: "+R+" and protocol: "+W),new m(R,[W],A.wsOptions)}function g(v,R){let A=R.protocolId==="MQIsdp"&&R.protocolVersion===3?"mqttv3.1":"mqtt",W=t(R,v),j=new WebSocket(W,[A]);return j.binaryType="arraybuffer",j}function _(v,R){h("streamBuilder");let A=o(R),W=t(A,v),j=p(v,W,A),I=m.createWebSocketStream(j,A.wsOptions);return I.url=W,j.on("close",()=>{I.destroy()}),I}function c(v,R){h("browserStreamBuilder");let A,j=l(R).browserBufferSize||1024*512,I=R.browserBufferTimeout||1e3,P=!R.objectMode,S=g(v,R),V=ne(R,U,q);R.objectMode||(V._writev=T),V.on("close",()=>{S.close()});let M=typeof S.addEventListener<"u";S.readyState===S.OPEN?A=V:(A=A=s(void 0,void 0,R),R.objectMode||(A._writev=T),M?S.addEventListener("open",se):S.onopen=se),A.socket=S,M?(S.addEventListener("close",ie),S.addEventListener("error",G),S.addEventListener("message",E)):(S.onclose=ie,S.onerror=G,S.onmessage=E);function ne(re,ee,H){let D=new i({objectModeMode:re.objectMode});return D._write=ee,D._flush=H,D}function se(){A.setReadable(V),A.setWritable(V),A.emit("connect")}function ie(){A.end(),A.destroy()}function G(re){A.destroy(re)}function E(re){let ee=re.data;ee instanceof ArrayBuffer?ee=f.from(ee):ee=f.from(ee,"utf8"),V.push(ee)}function T(re,ee){let H=new Array(re.length);for(let D=0;Dj&&setTimeout(U,I,re,ee,H),P&&typeof re=="string"&&(re=f.from(re,"utf8"));try{S.send(re)}catch(D){return H(D)}H()}function q(re){S.close(),re()}return A}e?k.exports=c:k.exports=_}).call(this)}).call(this,y("_process"))},{_process:85,buffer:3,debug:20,duplexify:22,"readable-stream":72,ws:81}],11:[function(y,k,x){"use strict";let{Buffer:d}=y("buffer"),f=y("readable-stream").Transform,m=y("duplexify"),h,s,i;function r(){let p=new f;return p._write=function(g,_,c){h.send({data:g.buffer,success:function(){c()},fail:function(v){c(new Error(v))}})},p._flush=function(_){h.close({success:function(){_()}})},p}function e(p){p.hostname||(p.hostname="localhost"),p.path||(p.path="/"),p.wsOptions||(p.wsOptions={})}function t(p,g){let _=p.protocol==="wxs"?"wss":"ws",c=_+"://"+p.hostname+p.path;return p.port&&p.port!==80&&p.port!==443&&(c=_+"://"+p.hostname+":"+p.port+p.path),typeof p.transformWsUrl=="function"&&(c=p.transformWsUrl(c,p,g)),c}function o(){h.onOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onMessage(function(p){let g=p.data;g instanceof ArrayBuffer?g=d.from(g):g=d.from(g,"utf8"),s.push(g)}),h.onClose(function(){i.end(),i.destroy()}),h.onError(function(p){i.destroy(new Error(p.errMsg))})}function l(p,g){if(g.hostname=g.hostname||g.host,!g.hostname)throw new Error("Could not determine host. Specify host manually.");let _=g.protocolId==="MQIsdp"&&g.protocolVersion===3?"mqttv3.1":"mqtt";e(g);let c=t(g,p);h=wx.connectSocket({url:c,protocols:[_]}),s=r(),i=m.obj(),i._destroy=function(R,A){h.close({success:function(){A&&A(R)}})};let v=i.destroy;return i.destroy=(function(){i.destroy=v;let R=this;setTimeout(function(){h.close({fail:function(){R._destroy(new Error)}})},0)}).bind(i),o(),i}k.exports=l},{buffer:3,duplexify:22,"readable-stream":72}],12:[function(y,k,x){"use strict";function d(){if(!(this instanceof d))return new d;this.nextId=Math.max(1,Math.floor(Math.random()*65535))}d.prototype.allocate=function(){let f=this.nextId++;return this.nextId===65536&&(this.nextId=1),f},d.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},d.prototype.register=function(f){return!0},d.prototype.deallocate=function(f){},d.prototype.clear=function(){},k.exports=d},{}],13:[function(y,k,x){"use strict";let d=y("xtend"),f=y("readable-stream").Readable,m={objectMode:!0},h={clean:!0};function s(i){if(!(this instanceof s))return new s(i);this.options=i||{},this.options=d(h,i),this._inflights=new Map}s.prototype.put=function(i,r){return this._inflights.set(i.messageId,i),r&&r(),this},s.prototype.createStream=function(){let i=new f(m),r=[],e=!1,t=0;return this._inflights.forEach(function(o,l){r.push(o)}),i._read=function(){!e&&tthis.max?!1:(this.aliasToTopic[m]=f,this.length=Object.keys(this.aliasToTopic).length,!0)},d.prototype.getTopicByAlias=function(f){return this.aliasToTopic[f]},d.prototype.clear=function(){this.aliasToTopic={}},k.exports=d},{}],15:[function(y,k,x){"use strict";let d=y("lru-cache"),f=y("number-allocator").NumberAllocator;function m(h){if(!(this instanceof m))return new m(h);h>0&&(this.aliasToTopic=new d({max:h}),this.topicToAlias={},this.numberAllocator=new f(1,h),this.max=h,this.length=0)}m.prototype.put=function(h,s){if(s===0||s>this.max)return!1;let i=this.aliasToTopic.get(s);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(s,h),this.topicToAlias[h]=s,this.numberAllocator.use(s),this.length=this.aliasToTopic.length,!0},m.prototype.getTopicByAlias=function(h){return this.aliasToTopic.get(h)},m.prototype.getAliasByTopic=function(h){let s=this.topicToAlias[h];return typeof s<"u"&&this.aliasToTopic.get(s),s},m.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},m.prototype.getLruAlias=function(){let h=this.numberAllocator.firstVacant();return h||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},k.exports=m},{"lru-cache":45,"number-allocator":54}],16:[function(y,k,x){"use strict";function d(m){let h=m.split("/");for(let s=0;sthis.length||s<0)return;let i=this._offset(s);return this._bufs[i[0]][i[1]]},m.prototype.slice=function(s,i){return typeof s=="number"&&s<0&&(s+=this.length),typeof i=="number"&&i<0&&(i+=this.length),this.copy(null,0,s,i)},m.prototype.copy=function(s,i,r,e){if((typeof r!="number"||r<0)&&(r=0),(typeof e!="number"||e>this.length)&&(e=this.length),r>=this.length||e<=0)return s||d.alloc(0);let t=!!s,o=this._offset(r),l=e-r,p=l,g=t&&i||0,_=o[1];if(r===0&&e===this.length){if(!t)return this._bufs.length===1?this._bufs[0]:d.concat(this._bufs,this.length);for(let c=0;cv)this._bufs[c].copy(s,g,_),g+=v;else{this._bufs[c].copy(s,g,_,_+p),g+=v;break}p-=v,_&&(_=0)}return s.length>g?s.slice(0,g):s},m.prototype.shallowSlice=function(s,i){if(s=s||0,i=typeof i!="number"?this.length:i,s<0&&(s+=this.length),i<0&&(i+=this.length),s===i)return this._new();let r=this._offset(s),e=this._offset(i),t=this._bufs.slice(r[0],e[0]+1);return e[1]===0?t.pop():t[t.length-1]=t[t.length-1].slice(0,e[1]),r[1]!==0&&(t[0]=t[0].slice(r[1])),this._new(t)},m.prototype.toString=function(s,i,r){return this.slice(i,r).toString(s)},m.prototype.consume=function(s){if(s=Math.trunc(s),Number.isNaN(s)||s<=0)return this;for(;this._bufs.length;)if(s>=this._bufs[0].length)s-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(s),this.length-=s;break}return this},m.prototype.duplicate=function(){let s=this._new();for(let i=0;ithis.length?this.length:s;let r=this._offset(s),e=r[0],t=r[1];for(;e=h.length){let p=o.indexOf(h,t);if(p!==-1)return this._reverseOffset([e,p]);t=o.length-h.length+1}else{let p=this._reverseOffset([e,t]);if(this._match(p,h))return p;t++}t=0}return-1},m.prototype._match=function(h,s){if(this.length-h{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),x.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function f(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function m(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+k.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let o=0,l=0;e[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(o++,p==="%c"&&(l=o))}),e.splice(l,0,t)}x.log=console.debug||console.log||(()=>{});function h(e){try{e?x.storage.setItem("debug",e):x.storage.removeItem("debug")}catch{}}function s(){let e;try{e=x.storage.getItem("debug")}catch{}return!e&&typeof d<"u"&&"env"in d&&(e=d.env.DEBUG),e}function i(){try{return localStorage}catch{}}k.exports=y("./common")(x);let{formatters:r}=k.exports;r.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this)}).call(this,y("_process"))},{"./common":21,_process:85}],21:[function(y,k,x){function d(f){h.debug=h,h.default=h,h.coerce=o,h.disable=r,h.enable=i,h.enabled=e,h.humanize=y("ms"),h.destroy=l,Object.keys(f).forEach(p=>{h[p]=f[p]}),h.names=[],h.skips=[],h.formatters={};function m(p){let g=0;for(let _=0;_{if(V==="%%")return"%";P++;let ne=h.formatters[M];if(typeof ne=="function"){let se=A[P];V=ne.call(W,se),A.splice(P,1),P--}return V}),h.formatArgs.call(W,A),(W.log||h.log).apply(W,A)}return R.namespace=p,R.useColors=h.useColors(),R.color=h.selectColor(p),R.extend=s,R.destroy=h.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(c!==h.namespaces&&(c=h.namespaces,v=h.enabled(p)),v),set:A=>{_=A}}),typeof h.init=="function"&&h.init(R),R}function s(p,g){let _=h(this.namespace+(typeof g>"u"?":":g)+p);return _.log=this.log,_}function i(p){h.save(p),h.namespaces=p,h.names=[],h.skips=[];let g,_=(typeof p=="string"?p:"").split(/[\s,]+/),c=_.length;for(g=0;g"-"+g)].join(",");return h.enable(""),p}function e(p){if(p[p.length-1]==="*")return!0;let g,_;for(g=0,_=h.skips.length;g<_;g++)if(h.skips[g].test(p))return!1;for(g=0,_=h.names.length;g<_;g++)if(h.names[g].test(p))return!0;return!1}function t(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}function o(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return h.enable(h.load()),h}k.exports=d},{ms:53}],22:[function(y,k,x){(function(d,f){(function(){var m=y("readable-stream"),h=y("end-of-stream"),s=y("inherits"),i=y("stream-shift"),r=f.from&&f.from!==Uint8Array.from?f.from([0]):new f([0]),e=function(c,v){c._corked?c.once("uncork",v):v()},t=function(c,v){c._autoDestroy&&c.destroy(v)},o=function(c,v){return function(R){R?t(c,R.message==="premature close"?null:R):v&&!c._ended&&c.end()}},l=function(c,v){if(!c||c._writableState&&c._writableState.finished)return v();if(c._writableState)return c.end(v);c.end(),v()},p=function(){},g=function(c){return new m.Readable({objectMode:!0,highWaterMark:16}).wrap(c)},_=function(c,v,R){if(!(this instanceof _))return new _(c,v,R);m.Duplex.call(this,R),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!R||R.autoDestroy!==!1,this._forwardDestroy=!R||R.destroy!==!1,this._forwardEnd=!R||R.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,c&&this.setWritable(c),v&&this.setReadable(v)};s(_,m.Duplex),_.obj=function(c,v,R){return R||(R={}),R.objectMode=!0,R.highWaterMark=16,new _(c,v,R)},_.prototype.cork=function(){++this._corked===1&&this.emit("cork")},_.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},_.prototype.setWritable=function(c){if(this._unwrite&&this._unwrite(),this.destroyed){c&&c.destroy&&c.destroy();return}if(c===null||c===!1){this.end();return}var v=this,R=h(c,{writable:!0,readable:!1},o(this,this._forwardEnd)),A=function(){var j=v._ondrain;v._ondrain=null,j&&j()},W=function(){v._writable.removeListener("drain",A),R()};this._unwrite&&d.nextTick(A),this._writable=c,this._writable.on("drain",A),this._unwrite=W,this.uncork()},_.prototype.setReadable=function(c){if(this._unread&&this._unread(),this.destroyed){c&&c.destroy&&c.destroy();return}if(c===null||c===!1){this.push(null),this.resume();return}var v=this,R=h(c,{writable:!1,readable:!0},o(this)),A=function(){v._forward()},W=function(){v.push(null)},j=function(){v._readable2.removeListener("readable",A),v._readable2.removeListener("end",W),R()};this._drained=!0,this._readable=c,this._readable2=c._readableState?c:g(c),this._readable2.on("readable",A),this._readable2.on("end",W),this._unread=j,this._forward()},_.prototype._read=function(){this._drained=!0,this._forward()},_.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var c;this._drained&&(c=i(this._readable2))!==null;)this.destroyed||(this._drained=this.push(c));this._forwarding=!1}},_.prototype.destroy=function(c,v){if(v||(v=p),this.destroyed)return v(null);this.destroyed=!0;var R=this;d.nextTick(function(){R._destroy(c),v(null)})},_.prototype._destroy=function(c){if(c){var v=this._ondrain;this._ondrain=null,v?v(c):this.emit("error",c)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},_.prototype._write=function(c,v,R){if(!this.destroyed){if(this._corked)return e(this,this._write.bind(this,c,v,R));if(c===r)return this._finish(R);if(!this._writable)return R();this._writable.write(c)===!1?this._ondrain=R:this.destroyed||R()}},_.prototype._finish=function(c){var v=this;this.emit("preend"),e(this,function(){l(v._forwardEnd&&v._writable,function(){v._writableState.prefinished===!1&&(v._writableState.prefinished=!0),v.emit("prefinish"),e(v,c)})})},_.prototype.end=function(c,v,R){return typeof c=="function"?this.end(null,null,c):typeof v=="function"?this.end(c,null,v):(this._ended=!0,c&&this.write(c),!this._writableState.ending&&!this._writableState.destroyed&&this.write(r),m.Writable.prototype.end.call(this,R))},k.exports=_}).call(this)}).call(this,y("_process"),y("buffer").Buffer)},{_process:85,buffer:3,"end-of-stream":23,inherits:24,"readable-stream":72,"stream-shift":77}],23:[function(y,k,x){(function(d){(function(){var f=y("once"),m=function(){},h=function(r){return r.setHeader&&typeof r.abort=="function"},s=function(r){return r.stdio&&Array.isArray(r.stdio)&&r.stdio.length===3},i=function(r,e,t){if(typeof e=="function")return i(r,null,e);e||(e={}),t=f(t||m);var o=r._writableState,l=r._readableState,p=e.readable||e.readable!==!1&&r.readable,g=e.writable||e.writable!==!1&&r.writable,_=!1,c=function(){r.writable||v()},v=function(){g=!1,p||t.call(r)},R=function(){p=!1,g||t.call(r)},A=function(S){t.call(r,S?new Error("exited with error code: "+S):null)},W=function(S){t.call(r,S)},j=function(){d.nextTick(I)},I=function(){if(!_){if(p&&!(l&&l.ended&&!l.destroyed))return t.call(r,new Error("premature close"));if(g&&!(o&&o.ended&&!o.destroyed))return t.call(r,new Error("premature close"))}},P=function(){r.req.on("finish",v)};return h(r)?(r.on("complete",v),r.on("abort",j),r.req?P():r.on("request",P)):g&&!o&&(r.on("end",c),r.on("close",c)),s(r)&&r.on("exit",A),r.on("end",R),r.on("finish",v),e.error!==!1&&r.on("error",W),r.on("close",j),function(){_=!0,r.removeListener("complete",v),r.removeListener("abort",j),r.removeListener("request",P),r.req&&r.req.removeListener("finish",v),r.removeListener("end",c),r.removeListener("close",c),r.removeListener("finish",v),r.removeListener("exit",A),r.removeListener("end",R),r.removeListener("error",W),r.removeListener("close",j)}};k.exports=i}).call(this)}).call(this,y("_process"))},{_process:85,once:56}],24:[function(y,k,x){typeof Object.create=="function"?k.exports=function(f,m){m&&(f.super_=m,f.prototype=Object.create(m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(f,m){if(m){f.super_=m;var h=function(){};h.prototype=m.prototype,f.prototype=new h,f.prototype.constructor=f}}},{}],25:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.ContainerIterator=x.Container=x.Base=void 0;class d{constructor(s=0){this.iteratorType=s}equals(s){return this.o===s.o}}x.ContainerIterator=d;class f{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}}x.Base=f;class m extends f{}x.Container=m},{}],26:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.HashContainerIterator=x.HashContainer=void 0;var d=y("../../ContainerBase"),f=h(y("../../../utils/checkObject")),m=y("../../../utils/throwError");function h(r){return r&&r.t?r:{default:r}}class s extends d.ContainerIterator{constructor(e,t,o){super(o),this.o=e,this.h=t,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o=this.o.L,this})}}x.HashContainerIterator=s;class i extends d.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(e){let{L:t,B:o}=e;t.B=o,o.L=t,e===this.p&&(this.p=o),e===this._&&(this._=t),this.i-=1}M(e,t,o){o===void 0&&(o=(0,f.default)(e));let l;if(o){let p=e[this.HASH_TAG];if(p!==void 0)return this.H[p].l=t,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),l={u:e,l:t,L:this._,B:this.h},this.H.push(l)}else{let p=this.g[e];if(p)return p.l=t,this.i;l={u:e,l:t,L:this._,B:this.h},this.g[e]=l}return this.i===0?(this.p=l,this.h.B=l):this._.B=l,this._=l,this.h.L=l,++this.i}I(e,t){if(t===void 0&&(t=(0,f.default)(e)),t){let o=e[this.HASH_TAG];return o===void 0?this.h:this.H[o]}else return this.g[e]||this.h}clear(){let e=this.HASH_TAG;this.H.forEach(function(t){delete t.u[e]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(e,t){let o;if(t===void 0&&(t=(0,f.default)(e)),t){let l=e[this.HASH_TAG];if(l===void 0)return!1;delete e[this.HASH_TAG],o=this.H[l],delete this.H[l]}else{if(o=this.g[e],o===void 0)return!1;delete this.g[e]}return this.V(o),!0}eraseElementByIterator(e){let t=e.o;return t===this.h&&(0,m.throwIteratorAccessError)(),this.V(t),e.next()}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let t=this.p;for(;e--;)t=t.B;return this.V(t),this.i}}x.HashContainer=i},{"../../../utils/checkObject":43,"../../../utils/throwError":44,"../../ContainerBase":25}],27:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("./Base"),f=h(y("../../utils/checkObject")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends d.HashContainerIterator{constructor(t,o,l,p){super(t,o,p),this.container=l}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,l){if(l==="0")return t.o.u;if(l==="1")return t.o.l},set(o,l,p){if(l!=="1")throw new TypeError("props must be 1");return t.o.l=p,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends d.HashContainer{constructor(t=[]){super();let o=this;t.forEach(function(l){o.setElement(l[0],l[1])})}begin(){return new s(this.p,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this._,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(t,o,l){return this.M(t,o,l)}getElementByKey(t,o){if(o===void 0&&(o=(0,f.default)(t)),o){let p=t[this.HASH_TAG];return p!==void 0?this.H[p].l:void 0}let l=this.g[t];return l?l.l:void 0}getElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return[o.u,o.l]}find(t,o){let l=this.I(t,o);return new s(l,this.h,this)}forEach(t){let o=0,l=this.p;for(;l!==this.h;)t([l.u,l.l],o++,this),l=l.B}[Symbol.iterator](){return(function*(){let t=this.p;for(;t!==this.h;)yield[t.u,t.l],t=t.B}).bind(this)()}}var r=i;x.default=r},{"../../utils/checkObject":43,"../../utils/throwError":44,"./Base":26}],28:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("./Base"),f=y("../../utils/throwError");class m extends d.HashContainerIterator{constructor(r,e,t,o){super(r,e,o),this.container=t}get pointer(){return this.o===this.h&&(0,f.throwIteratorAccessError)(),this.o.u}copy(){return new m(this.o,this.h,this.container,this.iteratorType)}}class h extends d.HashContainer{constructor(r=[]){super();let e=this;r.forEach(function(t){e.insert(t)})}begin(){return new m(this.p,this.h,this)}end(){return new m(this.h,this.h,this)}rBegin(){return new m(this._,this.h,this,1)}rEnd(){return new m(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(r,e){return this.M(r,void 0,e)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e=this.p;for(;r--;)e=e.B;return e.u}find(r,e){let t=this.I(r,e);return new m(t,this.h,this)}forEach(r){let e=0,t=this.p;for(;t!==this.h;)r(t.u,e++,this),t=t.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield r.u,r=r.B}).bind(this)()}}var s=h;x.default=s},{"../../utils/throwError":44,"./Base":26}],29:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("../ContainerBase");class f extends d.Base{constructor(s=[],i=function(e,t){return e>t?-1:e>1;for(let t=this.i-1>>1;t>=0;--t)this.k(t,e)}m(s){let i=this.C[s];for(;s>0;){let r=s-1>>1,e=this.C[r];if(this.v(e,i)<=0)break;this.C[s]=e,s=r}this.C[s]=i}k(s,i){let r=this.C[s];for(;s0&&(e=t,o=this.C[t]),this.v(o,r)>=0)break;this.C[s]=o,s=e}this.C[s]=r}clear(){this.i=0,this.C.length=0}push(s){this.C.push(s),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let s=this.C[0],i=this.C.pop();return this.i-=1,this.i&&(this.C[0]=i,this.k(0,this.i>>1)),s}top(){return this.C[0]}find(s){return this.C.indexOf(s)>=0}remove(s){let i=this.C.indexOf(s);return i<0?!1:(i===0?this.pop():i===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(i,1,this.C.pop()),this.i-=1,this.m(i),this.k(i,this.i>>1)),!0)}updateItem(s){let i=this.C.indexOf(s);return i<0?!1:(this.m(i),this.k(i,this.i>>1),!0)}toArray(){return[...this.C]}}var m=f;x.default=m},{"../ContainerBase":25}],30:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=y("../ContainerBase");class f extends d.Base{constructor(s=[]){super(),this.j=0,this.q=[];let i=this;s.forEach(function(r){i.push(r)})}clear(){this.q=[],this.i=this.j=0}push(s){let i=this.q.length;if(this.j/i>.5&&this.j+this.i>=i&&i>4096){let r=this.i;for(let e=0;e{if(typeof e.length=="number")return e.length;if(typeof e.size=="number")return e.size;if(typeof e.size=="function")return e.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=t,this.P=Math.max(Math.ceil(o/this.F),1);for(let g=0;g>1)-(l>>1),this.D=this.N=this.F-o%this.F>>1;let p=this;e.forEach(function(g){p.pushBack(g)})}T(){let e=[],t=Math.max(this.P>>1,1);for(let o=0;o>1}begin(){return new h(0,this)}end(){return new h(this.i,this)}rBegin(){return new h(this.i-1,this,1)}rEnd(){return new h(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(e){return this.i&&(this.N0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}pushFront(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}popFront(){if(this.i===0)return;let e=this.A[this.j][this.D];return this.i!==1&&(this.Dthis.i-1)throw new RangeError;let{curNodeBucketIndex:t,curNodePointerIndex:o}=this.O(e);return this.A[t][o]}setElementByPos(e,t){if(e<0||e>this.i-1)throw new RangeError;let{curNodeBucketIndex:o,curNodePointerIndex:l}=this.O(e);this.A[o][l]=t}insert(e,t,o=1){if(e<0||e>this.i)throw new RangeError;if(e===0)for(;o--;)this.pushFront(t);else if(e===this.i)for(;o--;)this.pushBack(t);else{let l=[];for(let p=e;pthis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else{let t=[];for(let l=e+1;le;)this.popBack();return this.i}sort(e){let t=[];for(let o=0;othis.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return o.l}eraseElementByPos(t){if(t<0||t>this.i-1)throw new RangeError;let o=this.p;for(;t--;)o=o.B;return this.V(o),this.i}eraseElementByValue(t){let o=this.p;for(;o!==this.h;)o.l===t&&this.V(o),o=o.B;return this.i}eraseElementByIterator(t){let o=t.o;return o===this.h&&(0,m.throwIteratorAccessError)(),t=t.next(),this.V(o),t}pushBack(t){return this.G(t,this._),this.i}popBack(){if(this.i===0)return;let t=this._.l;return this.V(this._),t}pushFront(t){return this.G(t,this.h),this.i}popFront(){if(this.i===0)return;let t=this.p.l;return this.V(this.p),t}setElementByPos(t,o){if(t<0||t>this.i-1)throw new RangeError;let l=this.p;for(;t--;)l=l.B;l.l=o}insert(t,o,l=1){if(t<0||t>this.i)throw new RangeError;if(l<=0)return this.i;if(t===0)for(;l--;)this.pushFront(o);else if(t===this.i)for(;l--;)this.pushBack(o);else{let p=this.p;for(let _=1;_this.i-1)throw new RangeError;return this.J[e]}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}eraseElementByValue(e){let t=0;for(let o=0;othis.i-1)throw new RangeError;this.J[e]=t}insert(e,t,o=1){if(e<0||e>this.i)throw new RangeError;return this.J.splice(e,0,...new Array(o).fill(t)),this.i+=o,this.i}find(e){for(let t=0;to?1:0},e=!1){super(),this.Y=void 0,this.v=r,e?(this.re=d.TreeNodeEnableIndex,this.M=function(t,o,l){let p=this.ne(t,o,l);if(p){let g=p.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let _=this.he(p);if(_){let{parentNode:c,grandParent:v,curNode:R}=_;c.ie(),v.ie(),R.ie()}}return this.i},this.V=function(t){let o=this.fe(t);for(;o!==this.h;)o.rt-=1,o=o.tt}):(this.re=d.TreeNode,this.M=function(t,o,l){let p=this.ne(t,o,l);return p&&this.he(p),this.i},this.V=this.fe),this.h=new this.re}X(r,e){let t=this.h;for(;r;){let o=this.v(r.u,e);if(o<0)r=r.W;else if(o>0)t=r,r=r.U;else return r}return t}Z(r,e){let t=this.h;for(;r;)this.v(r.u,e)<=0?r=r.W:(t=r,r=r.U);return t}$(r,e){let t=this.h;for(;r;){let o=this.v(r.u,e);if(o<0)t=r,r=r.W;else if(o>0)r=r.U;else return r}return t}rr(r,e){let t=this.h;for(;r;)this.v(r.u,e)<0?(t=r,r=r.W):r=r.U;return t}ue(r){for(;;){let e=r.tt;if(e===this.h)return;if(r.ee===1){r.ee=0;return}if(r===e.U){let t=e.W;if(t.ee===1)t.ee=0,e.ee=1,e===this.Y?this.Y=e.te():e.te();else if(t.W&&t.W.ee===1){t.ee=e.ee,e.ee=0,t.W.ee=0,e===this.Y?this.Y=e.te():e.te();return}else t.U&&t.U.ee===1?(t.ee=1,t.U.ee=0,t.se()):(t.ee=1,r=e)}else{let t=e.U;if(t.ee===1)t.ee=0,e.ee=1,e===this.Y?this.Y=e.se():e.se();else if(t.U&&t.U.ee===1){t.ee=e.ee,e.ee=0,t.U.ee=0,e===this.Y?this.Y=e.se():e.se();return}else t.W&&t.W.ee===1?(t.ee=1,t.W.ee=0,t.te()):(t.ee=1,r=e)}}}fe(r){if(this.i===1)return this.clear(),this.h;let e=r;for(;e.U||e.W;){if(e.W)for(e=e.W;e.U;)e=e.U;else e=e.U;[r.u,e.u]=[e.u,r.u],[r.l,e.l]=[e.l,r.l],r=e}this.h.U===e?this.h.U=e.tt:this.h.W===e&&(this.h.W=e.tt),this.ue(e);let t=e.tt;return e===t.U?t.U=void 0:t.W=void 0,this.i-=1,this.Y.ee=0,t}oe(r,e){return r===void 0?!1:this.oe(r.U,e)||e(r)?!0:this.oe(r.W,e)}he(r){for(;;){let e=r.tt;if(e.ee===0)return;let t=e.tt;if(e===t.U){let o=t.W;if(o&&o.ee===1){if(o.ee=e.ee=0,t===this.Y)return;t.ee=1,r=t;continue}else if(r===e.W){if(r.ee=0,r.U&&(r.U.tt=e),r.W&&(r.W.tt=t),e.W=r.U,t.U=r.W,r.U=e,r.W=t,t===this.Y)this.Y=r,this.h.tt=r;else{let l=t.tt;l.U===t?l.U=r:l.W=r}return r.tt=t.tt,e.tt=r,t.tt=r,t.ee=1,{parentNode:e,grandParent:t,curNode:r}}else e.ee=0,t===this.Y?this.Y=t.se():t.se(),t.ee=1}else{let o=t.U;if(o&&o.ee===1){if(o.ee=e.ee=0,t===this.Y)return;t.ee=1,r=t;continue}else if(r===e.U){if(r.ee=0,r.U&&(r.U.tt=t),r.W&&(r.W.tt=e),t.W=r.U,e.U=r.W,r.U=t,r.W=e,t===this.Y)this.Y=r,this.h.tt=r;else{let l=t.tt;l.U===t?l.U=r:l.W=r}return r.tt=t.tt,e.tt=r,t.tt=r,t.ee=1,{parentNode:e,grandParent:t,curNode:r}}else e.ee=0,t===this.Y?this.Y=t.te():t.te(),t.ee=1}return}}ne(r,e,t){if(this.Y===void 0){this.i+=1,this.Y=new this.re(r,e),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let o,l=this.h.U,p=this.v(l.u,r);if(p===0){l.l=e;return}else if(p>0)l.U=new this.re(r,e),l.U.tt=l,o=l.U,this.h.U=o;else{let g=this.h.W,_=this.v(g.u,r);if(_===0){g.l=e;return}else if(_<0)g.W=new this.re(r,e),g.W.tt=g,o=g.W,this.h.W=o;else{if(t!==void 0){let c=t.o;if(c!==this.h){let v=this.v(c.u,r);if(v===0){c.l=e;return}else if(v>0){let R=c.L(),A=this.v(R.u,r);if(A===0){R.l=e;return}else A<0&&(o=new this.re(r,e),R.W===void 0?(R.W=o,o.tt=R):(c.U=o,o.tt=c))}}}if(o===void 0)for(o=this.Y;;){let c=this.v(o.u,r);if(c>0){if(o.U===void 0){o.U=new this.re(r,e),o.U.tt=o,o=o.U;break}o=o.U}else if(c<0){if(o.W===void 0){o.W=new this.re(r,e),o.W.tt=o,o=o.W;break}o=o.W}else{o.l=e;return}}}}return this.i+=1,o}I(r,e){for(;r;){let t=this.v(r.u,e);if(t<0)r=r.W;else if(t>0)r=r.U;else return r}return r||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(r,e){let t=r.o;if(t===this.h&&(0,m.throwIteratorAccessError)(),this.i===1)return t.u=e,!0;if(t===this.h.U)return this.v(t.B().u,e)>0?(t.u=e,!0):!1;if(t===this.h.W)return this.v(t.L().u,e)<0?(t.u=e,!0):!1;let o=t.L().u;if(this.v(o,e)>=0)return!1;let l=t.B().u;return this.v(l,e)<=0?!1:(t.u=e,!0)}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e=0,t=this;return this.oe(this.Y,function(o){return r===e?(t.V(o),!0):(e+=1,!1)}),this.i}eraseElementByKey(r){if(this.i===0)return!1;let e=this.I(this.Y,r);return e===this.h?!1:(this.V(e),!0)}eraseElementByIterator(r){let e=r.o;e===this.h&&(0,m.throwIteratorAccessError)();let t=e.W===void 0;return r.iteratorType===0?t&&r.next():(!t||e.U===void 0)&&r.next(),this.V(e),r}forEach(r){let e=0;for(let t of this)r(t,e++,this)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let e,t=0;for(let o of this){if(t===r){e=o;break}t+=1}return e}getHeight(){if(this.i===0)return 0;let r=function(e){return e?Math.max(r(e.U),r(e.W))+1:0};return r(this.Y)}}var s=h;x.default=s},{"../../../utils/throwError":44,"../../ContainerBase":25,"./TreeNode":38}],40:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=h(y("./Base")),f=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends f.default{constructor(t,o,l,p){super(t,o,p),this.container=l}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,l){if(l==="0")return t.o.u;if(l==="1")return t.o.l},set(o,l,p){if(l!=="1")throw new TypeError("props must be 1");return t.o.l=p,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends d.default{constructor(t=[],o,l){super(o,l);let p=this;t.forEach(function(g){p.setElement(g[0],g[1])})}*K(t){t!==void 0&&(yield*Ee(this.K(t.U)),yield[t.u,t.l],yield*Ee(this.K(t.W)))}begin(){return new s(this.h.U||this.h,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this.h.W||this.h,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){if(this.i===0)return;let t=this.h.U;return[t.u,t.l]}back(){if(this.i===0)return;let t=this.h.W;return[t.u,t.l]}lowerBound(t){let o=this.X(this.Y,t);return new s(o,this.h,this)}upperBound(t){let o=this.Z(this.Y,t);return new s(o,this.h,this)}reverseLowerBound(t){let o=this.$(this.Y,t);return new s(o,this.h,this)}reverseUpperBound(t){let o=this.rr(this.Y,t);return new s(o,this.h,this)}setElement(t,o,l){return this.M(t,o,l)}find(t){let o=this.I(this.Y,t);return new s(o,this.h,this)}getElementByKey(t){return this.I(this.Y,t).l}union(t){let o=this;return t.forEach(function(l){o.setElement(l[0],l[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}}var r=i;x.default=r},{"../../utils/throwError":44,"./Base":39,"./Base/TreeIterator":37}],41:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var d=h(y("./Base")),f=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends f.default{constructor(t,o,l,p){super(t,o,p),this.container=l}get pointer(){return this.o===this.h&&(0,m.throwIteratorAccessError)(),this.o.u}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends d.default{constructor(t=[],o,l){super(o,l);let p=this;t.forEach(function(g){p.insert(g)})}*K(t){t!==void 0&&(yield*Ee(this.K(t.U)),yield t.u,yield*Ee(this.K(t.W)))}begin(){return new s(this.h.U||this.h,this.h,this)}end(){return new s(this.h,this.h,this)}rBegin(){return new s(this.h.W||this.h,this.h,this,1)}rEnd(){return new s(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(t,o){return this.M(t,void 0,o)}find(t){let o=this.I(this.Y,t);return new s(o,this.h,this)}lowerBound(t){let o=this.X(this.Y,t);return new s(o,this.h,this)}upperBound(t){let o=this.Z(this.Y,t);return new s(o,this.h,this)}reverseLowerBound(t){let o=this.$(this.Y,t);return new s(o,this.h,this)}reverseUpperBound(t){let o=this.rr(this.Y,t);return new s(o,this.h,this)}union(t){let o=this;return t.forEach(function(l){o.insert(l)}),this.i}[Symbol.iterator](){return this.K(this.Y)}}var r=i;x.default=r},{"../../utils/throwError":44,"./Base":39,"./Base/TreeIterator":37}],42:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),Object.defineProperty(x,"Deque",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(x,"HashMap",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(x,"HashSet",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(x,"LinkList",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(x,"OrderedMap",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(x,"OrderedSet",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(x,"PriorityQueue",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(x,"Queue",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(x,"Stack",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(x,"Vector",{enumerable:!0,get:function(){return h.default}});var d=l(y("./container/OtherContainer/Stack")),f=l(y("./container/OtherContainer/Queue")),m=l(y("./container/OtherContainer/PriorityQueue")),h=l(y("./container/SequentialContainer/Vector")),s=l(y("./container/SequentialContainer/LinkList")),i=l(y("./container/SequentialContainer/Deque")),r=l(y("./container/TreeContainer/OrderedSet")),e=l(y("./container/TreeContainer/OrderedMap")),t=l(y("./container/HashContainer/HashSet")),o=l(y("./container/HashContainer/HashMap"));function l(p){return p&&p.t?p:{default:p}}},{"./container/HashContainer/HashMap":27,"./container/HashContainer/HashSet":28,"./container/OtherContainer/PriorityQueue":29,"./container/OtherContainer/Queue":30,"./container/OtherContainer/Stack":31,"./container/SequentialContainer/Deque":34,"./container/SequentialContainer/LinkList":35,"./container/SequentialContainer/Vector":36,"./container/TreeContainer/OrderedMap":40,"./container/TreeContainer/OrderedSet":41}],43:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=d;function d(f){let m=typeof f;return m==="object"&&f!==null||m==="function"}},{}],44:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.throwIteratorAccessError=d;function d(){throw new RangeError("Iterator access denied!")}},{}],45:[function(y,k,x){"use strict";let d=y("yallist"),f=Symbol("max"),m=Symbol("length"),h=Symbol("lengthCalculator"),s=Symbol("allowStale"),i=Symbol("maxAge"),r=Symbol("dispose"),e=Symbol("noDisposeOnSet"),t=Symbol("lruList"),o=Symbol("cache"),l=Symbol("updateAgeOnGet"),p=()=>1;class g{constructor(I){if(typeof I=="number"&&(I={max:I}),I||(I={}),I.max&&(typeof I.max!="number"||I.max<0))throw new TypeError("max must be a non-negative number");let P=this[f]=I.max||1/0,S=I.length||p;if(this[h]=typeof S!="function"?p:S,this[s]=I.stale||!1,I.maxAge&&typeof I.maxAge!="number")throw new TypeError("maxAge must be a number");this[i]=I.maxAge||0,this[r]=I.dispose,this[e]=I.noDisposeOnSet||!1,this[l]=I.updateAgeOnGet||!1,this.reset()}set max(I){if(typeof I!="number"||I<0)throw new TypeError("max must be a non-negative number");this[f]=I||1/0,v(this)}get max(){return this[f]}set allowStale(I){this[s]=!!I}get allowStale(){return this[s]}set maxAge(I){if(typeof I!="number")throw new TypeError("maxAge must be a non-negative number");this[i]=I,v(this)}get maxAge(){return this[i]}set lengthCalculator(I){typeof I!="function"&&(I=p),I!==this[h]&&(this[h]=I,this[m]=0,this[t].forEach(P=>{P.length=this[h](P.value,P.key),this[m]+=P.length})),v(this)}get lengthCalculator(){return this[h]}get length(){return this[m]}get itemCount(){return this[t].length}rforEach(I,P){P=P||this;for(let S=this[t].tail;S!==null;){let V=S.prev;W(this,I,S,P),S=V}}forEach(I,P){P=P||this;for(let S=this[t].head;S!==null;){let V=S.next;W(this,I,S,P),S=V}}keys(){return this[t].toArray().map(I=>I.key)}values(){return this[t].toArray().map(I=>I.value)}reset(){this[r]&&this[t]&&this[t].length&&this[t].forEach(I=>this[r](I.key,I.value)),this[o]=new Map,this[t]=new d,this[m]=0}dump(){return this[t].map(I=>c(this,I)?!1:{k:I.key,v:I.value,e:I.now+(I.maxAge||0)}).toArray().filter(I=>I)}dumpLru(){return this[t]}set(I,P,S){if(S=S||this[i],S&&typeof S!="number")throw new TypeError("maxAge must be a number");let V=S?Date.now():0,M=this[h](P,I);if(this[o].has(I)){if(M>this[f])return R(this,this[o].get(I)),!1;let ie=this[o].get(I).value;return this[r]&&(this[e]||this[r](I,ie.value)),ie.now=V,ie.maxAge=S,ie.value=P,this[m]+=M-ie.length,ie.length=M,this.get(I),v(this),!0}let ne=new A(I,P,M,V,S);return ne.length>this[f]?(this[r]&&this[r](I,P),!1):(this[m]+=ne.length,this[t].unshift(ne),this[o].set(I,this[t].head),v(this),!0)}has(I){if(!this[o].has(I))return!1;let P=this[o].get(I).value;return!c(this,P)}get(I){return _(this,I,!0)}peek(I){return _(this,I,!1)}pop(){let I=this[t].tail;return I?(R(this,I),I.value):null}del(I){R(this,this[o].get(I))}load(I){this.reset();let P=Date.now();for(let S=I.length-1;S>=0;S--){let V=I[S],M=V.e||0;if(M===0)this.set(V.k,V.v);else{let ne=M-P;ne>0&&this.set(V.k,V.v,ne)}}}prune(){this[o].forEach((I,P)=>_(this,P,!1))}}let _=(j,I,P)=>{let S=j[o].get(I);if(S){let V=S.value;if(c(j,V)){if(R(j,S),!j[s])return}else P&&(j[l]&&(S.value.now=Date.now()),j[t].unshiftNode(S));return V.value}},c=(j,I)=>{if(!I||!I.maxAge&&!j[i])return!1;let P=Date.now()-I.now;return I.maxAge?P>I.maxAge:j[i]&&P>j[i]},v=j=>{if(j[m]>j[f])for(let I=j[t].tail;j[m]>j[f]&&I!==null;){let P=I.prev;R(j,I),I=P}},R=(j,I)=>{if(I){let P=I.value;j[r]&&j[r](P.key,P.value),j[m]-=P.length,j[o].delete(P.key),j[t].removeNode(I)}};class A{constructor(I,P,S,V,M){this.key=I,this.value=P,this.length=S,this.now=V,this.maxAge=M||0}}let W=(j,I,P,S)=>{let V=P.value;c(j,V)&&(R(j,P),j[s]||(V=void 0)),V&&I.call(S,V.value,V.key,j)};k.exports=g},{yallist:84}],46:[function(y,k,x){(function(d){(function(){let f=k.exports;f.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},f.codes={};for(let h in f.types){let s=f.types[h];f.codes[s]=h}f.CMD_SHIFT=4,f.CMD_MASK=240,f.DUP_MASK=8,f.QOS_MASK=3,f.QOS_SHIFT=1,f.RETAIN_MASK=1,f.VARBYTEINT_MASK=127,f.VARBYTEINT_FIN_MASK=128,f.VARBYTEINT_MAX=268435455,f.SESSIONPRESENT_MASK=1,f.SESSIONPRESENT_HEADER=d.from([f.SESSIONPRESENT_MASK]),f.CONNACK_HEADER=d.from([f.codes.connack<[0,1].map(i=>[0,1].map(r=>{let e=d.alloc(1);return e.writeUInt8(f.codes[h]<d.from([h])),f.EMPTY={pingreq:d.from([f.codes.pingreq<<4,0]),pingresp:d.from([f.codes.pingresp<<4,0]),disconnect:d.from([f.codes.disconnect<<4,0])}}).call(this)}).call(this,y("buffer").Buffer)},{buffer:3}],47:[function(y,k,x){(function(d){(function(){let f=y("./writeToStream"),m=y("events");function h(i,r){let e=new s;return f(i,e,r),e.concat()}class s extends m{constructor(){super(),this._array=new Array(20),this._i=0}write(r){return this._array[this._i++]=r,!0}concat(){let r=0,e=new Array(this._array.length),t=this._array,o=0,l;for(l=0;l>8,0),o.writeUInt8(t&255,1),o}function i(){for(let t=0;t<65536;t++)m[t]=s(t)}function r(t){let l=0,p=0,g=d.allocUnsafe(4);do l=t%128|0,t=t/128|0,t>0&&(l=l|128),g.writeUInt8(l,p++);while(t>0&&p<4);return t>0&&(p=0),h?g.subarray(0,p):g.slice(0,p)}function e(t){let o=d.allocUnsafe(4);return o.writeUInt32BE(t,0),o}k.exports={cache:m,generateCache:i,generateNumber:s,genBufVariableByteInt:r,generate4ByteBuffer:e}}).call(this)}).call(this,y("buffer").Buffer)},{buffer:3}],50:[function(y,k,x){class d{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}k.exports=d},{}],51:[function(y,k,x){let d=y("bl"),f=y("events"),m=y("./packet"),h=y("./constants"),s=y("debug")("mqtt-packet:parser");class i extends f{constructor(){super(),this.parser=this.constructor.parser}static parser(e){return this instanceof i?(this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new i().parser(e)}_resetState(){s("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new m,this.error=null,this._list=d(),this._stateCounter=0}parse(e){for(this.error&&this._resetState(),this._list.append(e),s("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,s("parse: state complete. _stateCounter is now: %d",this._stateCounter),s("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return s("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let e=this._list.readUInt8(0);return this.packet.cmd=h.types[e>>h.CMD_SHIFT],this.packet.retain=(e&h.RETAIN_MASK)!==0,this.packet.qos=e>>h.QOS_SHIFT&h.QOS_MASK,this.packet.dup=(e&h.DUP_MASK)!==0,s("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){let e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),s("_parseLength %d",e.value),!!e}_parsePayload(){s("_parsePayload: payload %O",this._list);let e=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return s("_parsePayload complete result: %s",e),e}_parseConnect(){s("_parseConnect");let e,t,o,l,p={},g=this.packet,_=this._parseString();if(_===null)return this._emitError(new Error("Cannot parse protocolId"));if(_!=="MQTT"&&_!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(g.protocolId=_,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(g.protocolVersion=this._list.readUInt8(this._pos),g.protocolVersion>=128&&(g.bridgeMode=!0,g.protocolVersion=g.protocolVersion-128),g.protocolVersion!==3&&g.protocolVersion!==4&&g.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(p.username=this._list.readUInt8(this._pos)&h.USERNAME_MASK,p.password=this._list.readUInt8(this._pos)&h.PASSWORD_MASK,p.will=this._list.readUInt8(this._pos)&h.WILL_FLAG_MASK,p.will&&(g.will={},g.will.retain=(this._list.readUInt8(this._pos)&h.WILL_RETAIN_MASK)!==0,g.will.qos=(this._list.readUInt8(this._pos)&h.WILL_QOS_MASK)>>h.WILL_QOS_SHIFT),g.clean=(this._list.readUInt8(this._pos)&h.CLEAN_SESSION_MASK)!==0,this._pos++,g.keepalive=this._parseNum(),g.keepalive===-1)return this._emitError(new Error("Packet too short"));if(g.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(g.properties=v)}let c=this._parseString();if(c===null)return this._emitError(new Error("Packet too short"));if(g.clientId=c,s("_parseConnect: packet.clientId: %s",g.clientId),p.will){if(g.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(g.will.properties=v)}if(e=this._parseString(),e===null)return this._emitError(new Error("Cannot parse will topic"));if(g.will.topic=e,s("_parseConnect: packet.will.topic: %s",g.will.topic),t=this._parseBuffer(),t===null)return this._emitError(new Error("Cannot parse will payload"));g.will.payload=t,s("_parseConnect: packet.will.paylaod: %s",g.will.payload)}if(p.username){if(l=this._parseString(),l===null)return this._emitError(new Error("Cannot parse username"));g.username=l,s("_parseConnect: packet.username: %s",g.username)}if(p.password){if(o=this._parseBuffer(),o===null)return this._emitError(new Error("Cannot parse password"));g.password=o}return this.settings=g,s("_parseConnect: complete"),g}_parseConnack(){s("_parseConnack");let e=this.packet;if(this._list.length<1)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&h.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else{if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++)}if(e.returnCode===-1||e.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}s("_parseConnack: complete")}_parsePublish(){s("_parsePublish");let e=this.packet;if(e.topic=this._parseString(),e.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length),s("_parsePublish: payload from buffer list: %o",e.payload)}}_parseSubscribe(){s("_parseSubscribe");let e=this.packet,t,o,l,p,g,_,c;if(e.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(e.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(e.properties=v)}for(;this._pos=e.length)return this._emitError(new Error("Malformed Subscribe Payload"));o=this._parseByte(),l=o&h.SUBSCRIBE_OPTIONS_QOS_MASK,_=(o>>h.SUBSCRIBE_OPTIONS_NL_SHIFT&h.SUBSCRIBE_OPTIONS_NL_MASK)!==0,g=(o>>h.SUBSCRIBE_OPTIONS_RAP_SHIFT&h.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,p=o>>h.SUBSCRIBE_OPTIONS_RH_SHIFT&h.SUBSCRIBE_OPTIONS_RH_MASK,c={topic:t,qos:l},this.settings.protocolVersion===5?(c.nl=_,c.rap=g,c.rh=p):this.settings.bridgeMode&&(c.rh=0,c.rap=!0,c.nl=!0),s("_parseSubscribe: push subscription `%s` to subscription",c),e.subscriptions.push(c)}}}_parseSuback(){s("_parseSuback");let e=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}for(;this._pos2?(e.reasonCode=this._parseByte(),s("_parseConfirmation: packet.reasonCode `%d`",e.reasonCode)):e.reasonCode=0,e.length>3)){let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return!0}_parseDisconnect(){let e=this.packet;if(s("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?e.reasonCode=this._parseByte():e.reasonCode=0;let t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return s("_parseDisconnect result: true"),!0}_parseAuth(){s("_parseAuth");let e=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));e.reasonCode=this._parseByte();let t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),s("_parseAuth: result: true"),!0}_parseMessageId(){let e=this.packet;return e.messageId=this._parseNum(),e.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(s("_parseMessageId: packet.messageId %d",e.messageId),!0)}_parseString(e){let t=this._parseNum(),o=t+this._pos;if(t===-1||o>this._list.length||o>this.packet.length)return null;let l=this._list.toString("utf8",this._pos,o);return this._pos+=t,s("_parseString: result: %s",l),l}_parseStringPair(){return s("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let e=this._parseNum(),t=e+this._pos;if(e===-1||t>this._list.length||t>this.packet.length)return null;let o=this._list.slice(this._pos,t);return this._pos+=e,s("_parseBuffer: result: %o",o),o}_parseNum(){if(this._list.length-this._pos<2)return-1;let e=this._list.readUInt16BE(this._pos);return this._pos+=2,s("_parseNum: result: %s",e),e}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let e=this._list.readUInt32BE(this._pos);return this._pos+=4,s("_parse4ByteNum: result: %s",e),e}_parseVarByteNum(e){s("_parseVarByteNum");let t=4,o=0,l=1,p=0,g=!1,_,c=this._pos?this._pos:0;for(;o=o&&this._emitError(new Error("Invalid variable byte integer")),c&&(this._pos+=o),g=g?e?{bytes:o,value:p}:p:!1,s("_parseVarByteNum: result: %o",g),g}_parseByte(){let e;return this._pos=4)&&(w||z))b+=d.byteLength(w)+2;else{if(C<4)return B.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(z*1===0)return B.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof Q!="number"||Q<0||Q>65535||Q%1!==0)return B.emit("error",new Error("Invalid keepalive")),!1;if(b+=2,b+=1,C===5){var L=H(B,a);if(!L)return!1;b+=L.length}if(N){if(typeof N!="object")return B.emit("error",new Error("Invalid will")),!1;if(!N.topic||typeof N.topic!="string")return B.emit("error",new Error("Invalid will topic")),!1;if(b+=d.byteLength(N.topic)+2,b+=2,N.payload)if(N.payload.length>=0)typeof N.payload=="string"?b+=d.byteLength(N.payload):b+=N.payload.length;else return B.emit("error",new Error("Invalid will payload")),!1;var K={};if(C===5){if(K=H(B,N.properties),!K)return!1;b+=K.length}}let J=!1;if(u!=null)if(Z(u))J=!0,b+=d.byteLength(u)+2;else return B.emit("error",new Error("Invalid username")),!1;if(n!=null){if(!J)return B.emit("error",new Error("Username is required to use password")),!1;if(Z(n))b+=oe(n)+2;else return B.emit("error",new Error("Invalid password")),!1}B.write(f.CONNECT_HEADER),G(B,b),ee(B,O),te.bridgeMode&&(C+=128),B.write(C===131?f.VERSION131:C===132?f.VERSION132:C===4?f.VERSION4:C===5?f.VERSION5:f.VERSION3);let ae=0;return ae|=u!=null?f.USERNAME_MASK:0,ae|=n!=null?f.PASSWORD_MASK:0,ae|=N&&N.retain?f.WILL_RETAIN_MASK:0,ae|=N&&N.qos?N.qos<0&&g(B,w),a?.write(),r("publish: payload: %o",Q),B.write(Q)}function j(F,B,Y){let te=Y?Y.protocolVersion:4,O=F||{},C=O.cmd||"puback",N=O.messageId,z=O.dup&&C==="pubrel"?f.DUP_MASK:0,Q=0,w=O.reasonCode,u=O.properties,n=te===5?3:2;if(C==="pubrel"&&(Q=1),typeof N!="number")return B.emit("error",new Error("Invalid messageId")),!1;let a=null;if(te===5&&typeof u=="object"){if(a=D(B,u,Y,n),!a)return!1;n+=a.length}return B.write(f.ACKS[C][Q][z][0]),G(B,n),g(B,N),te===5&&B.write(d.from([w])),a!==null&&a.write(),!0}function I(F,B,Y){r("subscribe: packet: ");let te=Y?Y.protocolVersion:4,O=F||{},C=O.dup?f.DUP_MASK:0,N=O.messageId,z=O.subscriptions,Q=O.properties,w=0;if(typeof N!="number")return B.emit("error",new Error("Invalid messageId")),!1;w+=2;let u=null;if(te===5){if(u=H(B,Q),!u)return!1;w+=u.length}if(typeof z=="object"&&z.length)for(let a=0;a2)return B.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}w+=d.byteLength(b)+2+1}else return B.emit("error",new Error("Invalid subscriptions")),!1;r("subscribe: writing to stream: %o",f.SUBSCRIBE_HEADER),B.write(f.SUBSCRIBE_HEADER[1][C?1:0][0]),G(B,w),g(B,N),u!==null&&u.write();let n=!0;for(let a of z){let b=a.topic,L=a.qos,K=+a.nl,J=+a.rap,ae=a.rh,le;E(B,b),le=f.SUBSCRIBE_OPTIONS_QOS[L],te===5&&(le|=K?f.SUBSCRIBE_OPTIONS_NL:0,le|=J?f.SUBSCRIBE_OPTIONS_RAP:0,le|=ae?f.SUBSCRIBE_OPTIONS_RH[ae]:0),n=B.write(d.from([le]))}return n}function P(F,B,Y){let te=Y?Y.protocolVersion:4,O=F||{},C=O.messageId,N=O.granted,z=O.properties,Q=0;if(typeof C!="number")return B.emit("error",new Error("Invalid messageId")),!1;if(Q+=2,typeof N=="object"&&N.length)for(let u=0;uf.VARBYTEINT_MAX)return F.emit("error",new Error(`Invalid variable byte integer: ${B}`)),!1;let Y=ie[B];return Y||(Y=l(B),B<16384&&(ie[B]=Y)),r("writeVarByteInt: writing to stream: %o",Y),F.write(Y)}function E(F,B){let Y=d.byteLength(B);return g(F,Y),r("writeString: %s",B),F.write(B,"utf8")}function T(F,B,Y){E(F,B),E(F,Y)}function U(F,B){return r("writeNumberCached: number: %d",B),r("writeNumberCached: %o",e[B]),F.write(e[B])}function q(F,B){let Y=t(B);return r("writeNumberGenerated: %o",Y),F.write(Y)}function re(F,B){let Y=p(B);return r("write4ByteNumber: %o",Y),F.write(Y)}function ee(F,B){typeof B=="string"?E(F,B):B?(g(F,B.length),F.write(B)):g(F,0)}function H(F,B){if(typeof B!="object"||B.length!=null)return{length:1,write(){$(F,{},0)}};let Y=0;function te(C,N){let z=f.propertiesTypes[C],Q=0;switch(z){case"byte":{if(typeof N!="boolean")return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=2;break}case"int8":{if(typeof N!="number"||N<0||N>255)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=2;break}case"binary":{if(N&&N===null)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=1+d.byteLength(N)+2;break}case"int16":{if(typeof N!="number"||N<0||N>65535)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=3;break}case"int32":{if(typeof N!="number"||N<0||N>4294967295)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=5;break}case"var":{if(typeof N!="number"||N<0||N>268435455)return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=1+d.byteLength(l(N));break}case"string":{if(typeof N!="string")return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=3+d.byteLength(N.toString());break}case"pair":{if(typeof N!="object")return F.emit("error",new Error(`Invalid ${C}: ${N}`)),!1;Q+=Object.getOwnPropertyNames(N).reduce((w,u)=>{let n=N[u];return Array.isArray(n)?w+=n.reduce((a,b)=>(a+=3+d.byteLength(u.toString())+2+d.byteLength(b.toString()),a),0):w+=3+d.byteLength(u.toString())+2+d.byteLength(N[u].toString()),w},0);break}default:return F.emit("error",new Error(`Invalid property ${C}: ${N}`)),!1}return Q}if(B)for(let C in B){let N=0,z=0,Q=B[C];if(Array.isArray(Q))for(let w=0;wC;){let z=O.shift();if(z&&B[z])delete B[z],N=H(F,B);else return!1}return N}function X(F,B,Y){switch(f.propertiesTypes[B]){case"byte":{F.write(d.from([f.properties[B]])),F.write(d.from([+Y]));break}case"int8":{F.write(d.from([f.properties[B]])),F.write(d.from([Y]));break}case"binary":{F.write(d.from([f.properties[B]])),ee(F,Y);break}case"int16":{F.write(d.from([f.properties[B]])),g(F,Y);break}case"int32":{F.write(d.from([f.properties[B]])),re(F,Y);break}case"var":{F.write(d.from([f.properties[B]])),G(F,Y);break}case"string":{F.write(d.from([f.properties[B]])),E(F,Y);break}case"pair":{Object.getOwnPropertyNames(Y).forEach(O=>{let C=Y[O];Array.isArray(C)?C.forEach(N=>{F.write(d.from([f.properties[B]])),T(F,O.toString(),N.toString())}):(F.write(d.from([f.properties[B]])),T(F,O.toString(),C.toString()))});break}default:return F.emit("error",new Error(`Invalid property ${B} value: ${Y}`)),!1}}function $(F,B,Y){G(F,Y);for(let te in B)if(Object.prototype.hasOwnProperty.call(B,te)&&B[te]!==null){let O=B[te];if(Array.isArray(O))for(let C=0;C0)return r(l);if(g==="number"&&isFinite(l))return p.long?t(l):e(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function r(l){if(l=String(l),!(l.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(p){var g=parseFloat(p[1]),_=(p[2]||"ms").toLowerCase();switch(_){case"years":case"year":case"yrs":case"yr":case"y":return g*i;case"weeks":case"week":case"w":return g*s;case"days":case"day":case"d":return g*h;case"hours":case"hour":case"hrs":case"hr":case"h":return g*m;case"minutes":case"minute":case"mins":case"min":case"m":return g*f;case"seconds":case"second":case"secs":case"sec":case"s":return g*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function e(l){var p=Math.abs(l);return p>=h?Math.round(l/h)+"d":p>=m?Math.round(l/m)+"h":p>=f?Math.round(l/f)+"m":p>=d?Math.round(l/d)+"s":l+"ms"}function t(l){var p=Math.abs(l);return p>=h?o(l,p,h,"day"):p>=m?o(l,p,m,"hour"):p>=f?o(l,p,f,"minute"):p>=d?o(l,p,d,"second"):l+" ms"}function o(l,p,g,_){var c=p>=g*1.5;return Math.round(l/g)+" "+_+(c?"s":"")}},{}],54:[function(y,k,x){let d=y("./lib/number-allocator.js");k.exports.NumberAllocator=d},{"./lib/number-allocator.js":55}],55:[function(y,k,x){"use strict";let d=y("js-sdsl").OrderedSet,f=y("debug")("number-allocator:trace"),m=y("debug")("number-allocator:error");function h(i,r){this.low=i,this.high=r}h.prototype.equals=function(i){return this.low===i.low&&this.high===i.high},h.prototype.compare=function(i){return this.lowe.compare(t)),f("Create"),this.clear()}s.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},s.prototype.alloc=function(){if(this.ss.size()===0)return f("alloc():empty"),null;let i=this.ss.begin(),r=i.pointer.low,e=i.pointer.high,t=r;return t+1<=e?this.ss.updateKeyByIterator(i,new h(r+1,e)):this.ss.eraseElementByPos(0),f("alloc():"+t),t},s.prototype.use=function(i){let r=new h(i,i),e=this.ss.lowerBound(r);if(!e.equals(this.ss.end())){let t=e.pointer.low,o=e.pointer.high;return e.pointer.equals(r)?(this.ss.eraseElementByIterator(e),f("use():"+i),!0):t>i?!1:t===i?(this.ss.updateKeyByIterator(e,new h(t+1,o)),f("use():"+i),!0):o===i?(this.ss.updateKeyByIterator(e,new h(t,o-1)),f("use():"+i),!0):(this.ss.updateKeyByIterator(e,new h(i+1,o)),this.ss.insert(new h(t,i-1)),f("use():"+i),!0)}return f("use():failed"),!1},s.prototype.free=function(i){if(ithis.max){m("free():"+i+" is out of range");return}let r=new h(i,i),e=this.ss.upperBound(r);if(e.equals(this.ss.end())){if(e.equals(this.ss.begin())){this.ss.insert(r);return}e.pre();let t=e.pointer.high;e.pointer.high+1===i?this.ss.updateKeyByIterator(e,new h(t,i)):this.ss.insert(r)}else if(e.equals(this.ss.begin()))if(i+1===e.pointer.low){let t=e.pointer.high;this.ss.updateKeyByIterator(e,new h(i,t))}else this.ss.insert(r);else{let t=e.pointer.low,o=e.pointer.high;e.pre();let l=e.pointer.low;e.pointer.high+1===i?i+1===t?(this.ss.eraseElementByIterator(e),this.ss.updateKeyByIterator(e,new h(l,o))):this.ss.updateKeyByIterator(e,new h(l,i)):i+1===t?(this.ss.eraseElementByIterator(e.next()),this.ss.insert(new h(i,o))):this.ss.insert(r)}f("free():"+i)},s.prototype.clear=function(){f("clear()"),this.ss.clear(),this.ss.insert(new h(this.min,this.max))},s.prototype.intervalCount=function(){return this.ss.size()},s.prototype.dump=function(){console.log("length:"+this.ss.size());for(let i of this.ss)console.log(i)},k.exports=s},{debug:20,"js-sdsl":42}],56:[function(y,k,x){var d=y("wrappy");k.exports=d(f),k.exports.strict=d(m),f.proto=f(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return f(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return m(this)},configurable:!0})});function f(h){var s=function(){return s.called?s.value:(s.called=!0,s.value=h.apply(this,arguments))};return s.called=!1,s}function m(h){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=h.apply(this,arguments)},i=h.name||"Function wrapped with `once`";return s.onceError=i+" shouldn't be called more than once",s.called=!1,s}},{wrappy:80}],57:[function(y,k,x){(function(d){(function(){"use strict";typeof d>"u"||!d.version||d.version.indexOf("v0.")===0||d.version.indexOf("v1.")===0&&d.version.indexOf("v1.8.")!==0?k.exports={nextTick:f}:k.exports=d;function f(m,h,s,i){if(typeof m!="function")throw new TypeError('"callback" argument must be a function');var r=arguments.length,e,t;switch(r){case 0:case 1:return d.nextTick(m);case 2:return d.nextTick(function(){m.call(null,h)});case 3:return d.nextTick(function(){m.call(null,h,s)});case 4:return d.nextTick(function(){m.call(null,h,s,i)});default:for(e=new Array(r-1),t=0;t2?"one of ".concat(t," ").concat(e.slice(0,o-1).join(", "),", or ")+e[o-1]:o===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function s(e,t,o){return e.substr(!o||o<0?0:+o,t.length)===t}function i(e,t,o){return(o===void 0||o>e.length)&&(o=e.length),e.substring(o-t.length,o)===t}function r(e,t,o){return typeof o!="number"&&(o=0),o+t.length>e.length?!1:e.indexOf(t,o)!==-1}m("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),m("ERR_INVALID_ARG_TYPE",function(e,t,o){var l;typeof t=="string"&&s(t,"not ")?(l="must not be",t=t.replace(/^not /,"")):l="must be";var p;if(i(e," argument"))p="The ".concat(e," ").concat(l," ").concat(h(t,"type"));else{var g=r(e,".")?"property":"argument";p='The "'.concat(e,'" ').concat(g," ").concat(l," ").concat(h(t,"type"))}return p+=". Received type ".concat(typeof o),p},TypeError),m("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),m("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),m("ERR_STREAM_PREMATURE_CLOSE","Premature close"),m("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),m("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),m("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),m("ERR_STREAM_WRITE_AFTER_END","write after end"),m("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),m("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),m("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),k.exports.codes=f},{}],59:[function(y,k,x){(function(d){(function(){"use strict";var f=Object.keys||function(l){var p=[];for(var g in l)p.push(g);return p};k.exports=e;var m=y("./_stream_readable"),h=y("./_stream_writable");y("inherits")(e,m);for(var s=f(h.prototype),i=0;i0)if(typeof u!="string"&&!L.objectMode&&Object.getPrototypeOf(u)!==r.prototype&&(u=t(u)),a)L.endEmitted?M(w,new I):T(w,L,u,!0);else if(L.ended)M(w,new W);else{if(L.destroyed)return!1;L.reading=!1,L.decoder&&!n?(u=L.decoder.write(u),L.objectMode||u.length!==0?T(w,L,u,!1):$(w,L)):T(w,L,u,!1)}else a||(L.reading=!1,$(w,L))}return!L.ended&&(L.length=q?w=q:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}function ee(w,u){return w<=0||u.length===0&&u.ended?0:u.objectMode?1:w!==w?u.flowing&&u.length?u.buffer.head.data.length:u.length:(w>u.highWaterMark&&(u.highWaterMark=re(w)),w<=u.length?w:u.ended?u.length:(u.needReadable=!0,0))}G.prototype.read=function(w){p("read",w),w=parseInt(w,10);var u=this._readableState,n=w;if(w!==0&&(u.emittedReadable=!1),w===0&&u.needReadable&&((u.highWaterMark!==0?u.length>=u.highWaterMark:u.length>0)||u.ended))return p("read: emitReadable",u.length,u.ended),u.length===0&&u.ended?N(this):D(this),null;if(w=ee(w,u),w===0&&u.ended)return u.length===0&&N(this),null;var a=u.needReadable;p("need readable",a),(u.length===0||u.length-w0?b=C(w,u):b=null,b===null?(u.needReadable=u.length<=u.highWaterMark,w=0):(u.length-=w,u.awaitDrain=0),u.length===0&&(u.ended||(u.needReadable=!0),n!==w&&u.ended&&N(this)),b!==null&&this.emit("data",b),b};function H(w,u){if(p("onEofChunk"),!u.ended){if(u.decoder){var n=u.decoder.end();n&&n.length&&(u.buffer.push(n),u.length+=u.objectMode?1:n.length)}u.ended=!0,u.sync?D(w):(u.needReadable=!1,u.emittedReadable||(u.emittedReadable=!0,X(w)))}}function D(w){var u=w._readableState;p("emitReadable",u.needReadable,u.emittedReadable),u.needReadable=!1,u.emittedReadable||(p("emitReadable",u.flowing),u.emittedReadable=!0,d.nextTick(X,w))}function X(w){var u=w._readableState;p("emitReadable_",u.destroyed,u.length,u.ended),!u.destroyed&&(u.length||u.ended)&&(w.emit("readable"),u.emittedReadable=!1),u.needReadable=!u.flowing&&!u.ended&&u.length<=u.highWaterMark,O(w)}function $(w,u){u.readingMore||(u.readingMore=!0,d.nextTick(oe,w,u))}function oe(w,u){for(;!u.reading&&!u.ended&&(u.length1&&Q(a.pipes,w)!==-1)&&!le&&(p("false write response, pause",a.awaitDrain),a.awaitDrain++),n.pause())}function fe(be){p("onerror",be),ye(),w.removeListener("error",fe),s(w,"error")===0&&M(w,be)}se(w,"error",fe);function me(){w.removeListener("finish",we),ye()}w.once("close",me);function we(){p("onfinish"),w.removeListener("close",me),ye()}w.once("finish",we);function ye(){p("unpipe"),n.unpipe(w)}return w.emit("pipe",n),a.flowing||(p("pipe resume"),n.resume()),w};function Z(w){return function(){var n=w._readableState;p("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,n.awaitDrain===0&&s(w,"data")&&(n.flowing=!0,O(w))}}G.prototype.unpipe=function(w){var u=this._readableState,n={hasUnpiped:!1};if(u.pipesCount===0)return this;if(u.pipesCount===1)return w&&w!==u.pipes?this:(w||(w=u.pipes),u.pipes=null,u.pipesCount=0,u.flowing=!1,w&&w.emit("unpipe",this,n),this);if(!w){var a=u.pipes,b=u.pipesCount;u.pipes=null,u.pipesCount=0,u.flowing=!1;for(var L=0;L0,a.flowing!==!1&&this.resume()):w==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,p("on readable",a.length,a.reading),a.length?D(this):a.reading||d.nextTick(B,this)),n},G.prototype.addListener=G.prototype.on,G.prototype.removeListener=function(w,u){var n=i.prototype.removeListener.call(this,w,u);return w==="readable"&&d.nextTick(F,this),n},G.prototype.removeAllListeners=function(w){var u=i.prototype.removeAllListeners.apply(this,arguments);return(w==="readable"||w===void 0)&&d.nextTick(F,this),u};function F(w){var u=w._readableState;u.readableListening=w.listenerCount("readable")>0,u.resumeScheduled&&!u.paused?u.flowing=!0:w.listenerCount("data")>0&&w.resume()}function B(w){p("readable nexttick read 0"),w.read(0)}G.prototype.resume=function(){var w=this._readableState;return w.flowing||(p("resume"),w.flowing=!w.readableListening,Y(this,w)),w.paused=!1,this};function Y(w,u){u.resumeScheduled||(u.resumeScheduled=!0,d.nextTick(te,w,u))}function te(w,u){p("resume",u.reading),u.reading||w.read(0),u.resumeScheduled=!1,w.emit("resume"),O(w),u.flowing&&!u.reading&&w.read(0)}G.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function O(w){var u=w._readableState;for(p("flow",u.flowing);u.flowing&&w.read()!==null;);}G.prototype.wrap=function(w){var u=this,n=this._readableState,a=!1;w.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var K=n.decoder.end();K&&K.length&&u.push(K)}u.push(null)}),w.on("data",function(K){if(p("wrapped data"),n.decoder&&(K=n.decoder.write(K)),!(n.objectMode&&K==null)&&!(!n.objectMode&&(!K||!K.length))){var J=u.push(K);J||(a=!0,w.pause())}});for(var b in w)this[b]===void 0&&typeof w[b]=="function"&&(this[b]=function(J){return function(){return w[J].apply(w,arguments)}}(b));for(var L=0;L=u.length?(u.decoder?n=u.buffer.join(""):u.buffer.length===1?n=u.buffer.first():n=u.buffer.concat(u.length),u.buffer.clear()):n=u.buffer.consume(w,u.decoder),n}function N(w){var u=w._readableState;p("endReadable",u.endEmitted),u.endEmitted||(u.ended=!0,d.nextTick(z,u,w))}function z(w,u){if(p("endReadableNT",w.endEmitted,w.length),!w.endEmitted&&w.length===0&&(w.endEmitted=!0,u.readable=!1,u.emit("end"),w.autoDestroy)){var n=u._writableState;(!n||n.autoDestroy&&n.finished)&&u.destroy()}}typeof Symbol=="function"&&(G.from=function(w,u){return V===void 0&&(V=y("./internal/streams/from")),V(G,w,u)});function Q(w,u){for(var n=0,a=w.length;n-1))throw new S(C);return this._writableState.defaultEncoding=C,this},Object.defineProperty(ie.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function T(O,C,N){return!O.objectMode&&O.decodeStrings!==!1&&typeof C=="string"&&(C=e.from(C,N)),C}Object.defineProperty(ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function U(O,C,N,z,Q,w){if(!N){var u=T(C,z,Q);z!==u&&(N=!0,Q="buffer",z=u)}var n=C.objectMode?1:z.length;C.length+=n;var a=C.length0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(c){var v={data:c,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(c){if(this.length===0)return"";for(var v=this.head,R=""+v.data;v=v.next;)R+=c+v.data;return R}},{key:"concat",value:function(c){if(this.length===0)return e.alloc(0);for(var v=e.allocUnsafe(c>>>0),R=this.head,A=0;R;)p(R.data,v,A),A+=R.data.length,R=R.next;return v}},{key:"consume",value:function(c,v){var R;return cW.length?W.length:c;if(j===W.length?A+=W:A+=W.slice(0,c),c-=j,c===0){j===W.length?(++R,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=W.slice(j));break}++R}return this.length-=R,A}},{key:"_getBuffer",value:function(c){var v=e.allocUnsafe(c),R=this.head,A=1;for(R.data.copy(v),c-=R.data.length;R=R.next;){var W=R.data,j=c>W.length?W.length:c;if(W.copy(v,v.length-c,0,j),c-=j,c===0){j===W.length?(++A,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=W.slice(j));break}++A}return this.length-=A,v}},{key:l,value:function(c,v){return o(this,f({},v,{depth:0,customInspect:!1}))}}]),g}()},{buffer:3,util:2}],66:[function(y,k,x){(function(d){(function(){"use strict";function f(e,t){var o=this,l=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return l||p?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,d.nextTick(i,this,e)):d.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(g){!t&&g?o._writableState?o._writableState.errorEmitted?d.nextTick(h,o):(o._writableState.errorEmitted=!0,d.nextTick(m,o,g)):d.nextTick(m,o,g):t?(d.nextTick(h,o),t(g)):d.nextTick(h,o)}),this)}function m(e,t){i(e,t),h(e)}function h(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(e,t){e.emit("error",t)}function r(e,t){var o=e._readableState,l=e._writableState;o&&o.autoDestroy||l&&l.autoDestroy?e.destroy(t):e.emit("error",t)}k.exports={destroy:f,undestroy:s,errorOrDestroy:r}}).call(this)}).call(this,y("_process"))},{_process:85}],67:[function(y,k,x){"use strict";var d=y("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function f(i){var r=!1;return function(){if(!r){r=!0;for(var e=arguments.length,t=new Array(e),o=0;o0;return e(W,I,P,function(S){R||(R=S),S&&A.forEach(t),!I&&(A.forEach(t),v(R))})});return _.reduce(o)}k.exports=p},{"../../../errors":58,"./end-of-stream":67}],70:[function(y,k,x){"use strict";var d=y("../../../errors").codes.ERR_INVALID_OPT_VALUE;function f(h,s,i){return h.highWaterMark!=null?h.highWaterMark:s?h[i]:null}function m(h,s,i,r){var e=f(s,r,i);if(e!=null){if(!(isFinite(e)&&Math.floor(e)===e)||e<0){var t=r?i:"highWaterMark";throw new d(t,e)}return Math.floor(e)}return h.objectMode?16:16*1024}k.exports={getHighWaterMark:m}},{"../../../errors":58}],71:[function(y,k,x){k.exports=y("events").EventEmitter},{events:4}],72:[function(y,k,x){x=k.exports=y("./lib/_stream_readable.js"),x.Stream=x,x.Readable=x,x.Writable=y("./lib/_stream_writable.js"),x.Duplex=y("./lib/_stream_duplex.js"),x.Transform=y("./lib/_stream_transform.js"),x.PassThrough=y("./lib/_stream_passthrough.js"),x.finished=y("./lib/internal/streams/end-of-stream.js"),x.pipeline=y("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":59,"./lib/_stream_passthrough.js":60,"./lib/_stream_readable.js":61,"./lib/_stream_transform.js":62,"./lib/_stream_writable.js":63,"./lib/internal/streams/end-of-stream.js":67,"./lib/internal/streams/pipeline.js":69}],73:[function(y,k,x){"use strict";function d(m,h,s){var i=this;this._callback=m,this._args=s,this._interval=setInterval(m,h,this._args),this.reschedule=function(r){r||(r=i._interval),i._interval&&clearInterval(i._interval),i._interval=setInterval(i._callback,r,i._args)},this.clear=function(){i._interval&&(clearInterval(i._interval),i._interval=void 0)},this.destroy=function(){i._interval&&clearInterval(i._interval),i._callback=void 0,i._interval=void 0,i._args=void 0}}function f(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var m;if(arguments.length>0){m=new Array(arguments.length-2);for(var h=0;h>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function r(A,W,j){var I=W.length-1;if(I=0?(P>0&&(A.lastNeed=P-1),P):--I=0?(P>0&&(A.lastNeed=P-2),P):--I=0?(P>0&&(P===2?P=0:A.lastNeed=P-3),P):0))}function e(A,W,j){if((W[0]&192)!==128)return A.lastNeed=0,"\uFFFD";if(A.lastNeed>1&&W.length>1){if((W[1]&192)!==128)return A.lastNeed=1,"\uFFFD";if(A.lastNeed>2&&W.length>2&&(W[2]&192)!==128)return A.lastNeed=2,"\uFFFD"}}function t(A){var W=this.lastTotal-this.lastNeed,j=e(this,A,W);if(j!==void 0)return j;if(this.lastNeed<=A.length)return A.copy(this.lastChar,W,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,W,0,A.length),this.lastNeed-=A.length}function o(A,W){var j=r(this,A,W);if(!this.lastNeed)return A.toString("utf8",W);this.lastTotal=j;var I=A.length-(j-this.lastNeed);return A.copy(this.lastChar,0,I),A.toString("utf8",W,I)}function l(A){var W=A&&A.length?this.write(A):"";return this.lastNeed?W+"\uFFFD":W}function p(A,W){if((A.length-W)%2===0){var j=A.toString("utf16le",W);if(j){var I=j.charCodeAt(j.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],j.slice(0,-1)}return j}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",W,A.length-1)}function g(A){var W=A&&A.length?this.write(A):"";if(this.lastNeed){var j=this.lastTotal-this.lastNeed;return W+this.lastChar.toString("utf16le",0,j)}return W}function _(A,W){var j=(A.length-W)%3;return j===0?A.toString("base64",W):(this.lastNeed=3-j,this.lastTotal=3,j===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",W,A.length-j))}function c(A){var W=A&&A.length?this.write(A):"";return this.lastNeed?W+this.lastChar.toString("base64",0,3-this.lastNeed):W}function v(A){return A.toString(this.encoding)}function R(A){return A&&A.length?this.write(A):""}},{"safe-buffer":76}],79:[function(y,k,x){(function(d){(function(){k.exports=f;function f(h,s){if(m("noDeprecation"))return h;var i=!1;function r(){if(!i){if(m("throwDeprecation"))throw new Error(s);m("traceDeprecation")?console.trace(s):console.warn(s),i=!0}return h.apply(this,arguments)}return r}function m(h){try{if(!d.localStorage)return!1}catch{return!1}var s=d.localStorage[h];return s==null?!1:String(s).toLowerCase()==="true"}}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],80:[function(y,k,x){k.exports=d;function d(f,m){if(f&&m)return d(f)(m);if(typeof f!="function")throw new TypeError("need wrapper function");return Object.keys(f).forEach(function(s){h[s]=f[s]}),h;function h(){for(var s=new Array(arguments.length),i=0;i0)for(var e=0,t=arguments.length;e1)e=r;else if(this.head)t=this.head.next,e=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;t!==null;o++)e=i(e,t.value,o),t=t.next;return e},d.prototype.reduceReverse=function(i,r){var e,t=this.tail;if(arguments.length>1)e=r;else if(this.tail)t=this.tail.prev,e=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;t!==null;o--)e=i(e,t.value,o),t=t.prev;return e},d.prototype.toArray=function(){for(var i=new Array(this.length),r=0,e=this.head;e!==null;r++)i[r]=e.value,e=e.next;return i},d.prototype.toArrayReverse=function(){for(var i=new Array(this.length),r=0,e=this.tail;e!==null;r++)i[r]=e.value,e=e.prev;return i},d.prototype.slice=function(i,r){r=r||this.length,r<0&&(r+=this.length),i=i||0,i<0&&(i+=this.length);var e=new d;if(rthis.length&&(r=this.length);for(var t=0,o=this.head;o!==null&&tthis.length&&(r=this.length);for(var t=this.length,o=this.tail;o!==null&&t>r;t--)o=o.prev;for(;o!==null&&t>i;t--,o=o.prev)e.push(o.value);return e},d.prototype.splice=function(i,r,...e){i>this.length&&(i=this.length-1),i<0&&(i=this.length+i);for(var t=0,o=this.head;o!==null&&t1)for(var A=1;A= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=e-t,I=Math.floor,P=String.fromCharCode,S;function V(H){throw new RangeError(W[H])}function M(H,D){for(var X=H.length,$=[];X--;)$[X]=D(H[X]);return $}function ne(H,D){var X=H.split("@"),$="";X.length>1&&($=X[0]+"@",H=X[1]),H=H.replace(A,".");var oe=H.split("."),Z=M(oe,D).join(".");return $+Z}function se(H){for(var D=[],X=0,$=H.length,oe,Z;X<$;)oe=H.charCodeAt(X++),oe>=55296&&oe<=56319&&X<$?(Z=H.charCodeAt(X++),(Z&64512)==56320?D.push(((oe&1023)<<10)+(Z&1023)+65536):(D.push(oe),X--)):D.push(oe);return D}function ie(H){return M(H,function(D){var X="";return D>65535&&(D-=65536,X+=P(D>>>10&1023|55296),D=56320|D&1023),X+=P(D),X}).join("")}function G(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:e}function E(H,D){return H+22+75*(H<26)-((D!=0)<<5)}function T(H,D,X){var $=0;for(H=X?I(H/p):H>>1,H+=I(H/D);H>j*o>>1;$+=e)H=I(H/j);return I($+(j+1)*H/(H+l))}function U(H){var D=[],X=H.length,$,oe=0,Z=_,F=g,B,Y,te,O,C,N,z,Q,w;for(B=H.lastIndexOf(c),B<0&&(B=0),Y=0;Y=128&&V("not-basic"),D.push(H.charCodeAt(Y));for(te=B>0?B+1:0;te=X&&V("invalid-input"),z=G(H.charCodeAt(te++)),(z>=e||z>I((r-oe)/C))&&V("overflow"),oe+=z*C,Q=N<=F?t:N>=F+o?o:N-F,!(zI(r/w)&&V("overflow"),C*=w;$=D.length+1,F=T(oe-O,$,O==0),I(oe/$)>r-Z&&V("overflow"),Z+=I(oe/$),oe%=$,D.splice(oe++,0,Z)}return ie(D)}function q(H){var D,X,$,oe,Z,F,B,Y,te,O,C,N=[],z,Q,w,u;for(H=se(H),z=H.length,D=_,X=0,Z=g,F=0;F=D&&CI((r-X)/Q)&&V("overflow"),X+=(B-D)*Q,D=B,F=0;Fr&&V("overflow"),C==D){for(Y=X,te=e;O=te<=Z?t:te>=Z+o?o:te-Z,!(Y0&&o>t&&(o=t);for(var l=0;l=0?(_=p.substr(0,g),c=p.substr(g+1)):(_=p,c=""),v=decodeURIComponent(_),R=decodeURIComponent(c),d(r,v)?f(r[v])?r[v].push(R):r[v]=[r[v],R]:r[v]=R}return r};var f=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"}},{}],88:[function(y,k,x){"use strict";var d=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}};k.exports=function(s,i,r,e){return i=i||"&",r=r||"=",s===null&&(s=void 0),typeof s=="object"?m(h(s),function(t){var o=encodeURIComponent(d(t))+r;return f(s[t])?m(s[t],function(l){return o+encodeURIComponent(d(l))}).join(i):o+encodeURIComponent(d(s[t]))}).join(i):e?encodeURIComponent(d(e))+r+encodeURIComponent(d(s)):""};var f=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"};function m(s,i){if(s.map)return s.map(i);for(var r=[],e=0;e",'"',"`"," ","\r",` `," "],e=["{","}","|","\\","^","`"].concat(r),t=["'"].concat(e),o=["%","/","?",";","#"].concat(t),l=["/","?","#"],p=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,c={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},R={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=y("querystring");function W(S,V,M){if(S&&f.isObject(S)&&S instanceof m)return S;var ne=new m;return ne.parse(S,V,M),ne}m.prototype.parse=function(S,V,M){if(!f.isString(S))throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var ne=S.indexOf("?"),se=ne!==-1&&ne127?Y+="x":Y+=B[te];if(!Y.match(g)){var C=Z.slice(0,H),N=Z.slice(H+1),z=B.match(_);z&&(C.push(z[1]),N.unshift(z[2])),N.length&&(E="/"+N.join(".")+E),this.hostname=C.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),oe||(this.hostname=d.toASCII(this.hostname));var Q=this.port?":"+this.port:"",w=this.hostname||"";this.host=w+Q,this.href+=this.host,oe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),E[0]!=="/"&&(E="/"+E))}if(!c[q])for(var H=0,F=t.length;H0?M.host.split("@"):!1;Y&&(M.auth=Y.shift(),M.host=M.hostname=Y.shift())}return M.search=S.search,M.query=S.query,(!f.isNull(M.pathname)||!f.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.href=M.format(),M}if(!Z.length)return M.pathname=null,M.search?M.path="/"+M.search:M.path=null,M.href=M.format(),M;for(var te=Z.slice(-1)[0],O=(M.host||S.host||Z.length>1)&&(te==="."||te==="..")||te==="",C=0,N=Z.length;N>=0;N--)te=Z[N],te==="."?Z.splice(N,1):te===".."?(Z.splice(N,1),C++):C&&(Z.splice(N,1),C--);if(!$&&!oe)for(;C--;C)Z.unshift("..");$&&Z[0]!==""&&(!Z[0]||Z[0].charAt(0)!=="/")&&Z.unshift(""),O&&Z.join("/").substr(-1)!=="/"&&Z.push("");var z=Z[0]===""||Z[0]&&Z[0].charAt(0)==="/";if(B){M.hostname=M.host=z?"":Z.length?Z.shift():"";var Y=M.host&&M.host.indexOf("@")>0?M.host.split("@"):!1;Y&&(M.auth=Y.shift(),M.host=M.hostname=Y.shift())}return $=$||M.host&&Z.length,$&&!z&&Z.unshift(""),Z.length?M.pathname=Z.join("/"):(M.pathname=null,M.path=null),(!f.isNull(M.pathname)||!f.isNull(M.search))&&(M.path=(M.pathname?M.pathname:"")+(M.search?M.search:"")),M.auth=S.auth||M.auth,M.slashes=M.slashes||S.slashes,M.href=M.format(),M},m.prototype.parseHost=function(){var S=this.host,V=s.exec(S);V&&(V=V[0],V!==":"&&(this.port=V.substr(1)),S=S.substr(0,S.length-V.length)),S&&(this.hostname=S)}},{"./util":91,punycode:86,querystring:89}],91:[function(y,k,x){"use strict";k.exports={isString:function(d){return typeof d=="string"},isObject:function(d){return typeof d=="object"&&d!==null},isNull:function(d){return d===null},isNullOrUndefined:function(d){return d==null}}},{}]},{},[17])(17)})});function sr(ue,he){if(ue&1){let de=rt();Ae(0,"li",9)(1,"label",10),it("ngModelChange",function(k){let d=ke(de).$implicit;return Ne(d.checked=k)})("ngModelChange",function(){ke(de);let k=Ue(2);return Ne(k.onCheckChange())}),Fe(2),Se()()}if(ue&2){let de=he.$implicit;_e(),Ce("ngModel",de.checked),_e(),De(de.label)}}function or(ue,he){if(ue&1&&(Ae(0,"div",4),tt(1,"a",5),Ae(2,"nz-dropdown-menu",null,6)(4,"ul",7),Le(5,sr,3,2,"li",8),Se()()()),ue&2){let de=ot(3),y=Ue();_e(),Ce("nzDropdownMenu",de),_e(4),Ce("ngForOf",y.optionsList)}}var ar=["*"],ti=(()=>{let he=class he{constructor(){this.showSetting=!1,this.optionsList=[],this.onCheckedItemsChange=new ge,this.title=""}getCheckedItems(){return this.optionsList.filter(y=>y.checked)}onCheckChange(){let y=this.getCheckedItems();this.onCheckedItemsChange.emit(y)}};he.\u0275fac=function(k){return new(k||he)},he.\u0275cmp=et({type:he,selectors:[["data-v-card"]],inputs:{showSetting:"showSetting",optionsList:"optionsList",title:"title"},outputs:{onCheckedItemsChange:"onCheckedItemsChange"},standalone:!0,features:[at],ngContentSelectors:ar,decls:6,vars:2,consts:[[1,"card-content"],[1,"card-content-title"],[1,"card-content-l"],["class","card-content-r",4,"ngIf"],[1,"card-content-r"],["nz-dropdown","","nz-icon","","nzType","setting","nzTrigger","click","nzTheme","outline",3,"nzDropdownMenu"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",4,"ngFor","ngForOf"],["nz-menu-item",""],["nz-checkbox","",3,"ngModel","ngModelChange"]],template:function(k,x){k&1&&(nt(),Ae(0,"div",0)(1,"div",1)(2,"div",2),Fe(3),Se(),Le(4,or,6,2,"div",3),Se(),st(5),Se()),k&2&&(_e(3),De(x.title),_e(),Ce("ngIf",x.showSetting))},dependencies:[ft,ct,ht,ut,lt,Pt,Ct,It,At,Tt,Rt,bt,_t,wt,vt,Kt,Dt,Qt,Gt,Yt,qt,yt,Lt,Ft,er,Vt,Wt,jt,dt,pt,kt,Nt,$t,Zt,Ot,Jt,Ht,Ut,Mt,Xt,mt,gt,zt,xt,St,Et,Bt],styles:['.card-content[_ngcontent-%COMP%]{overflow:hidden;padding:1rem 1.5rem;background-image:url("./media/dashboard_card_bg-2QFDBQFD.jpg");background-position:top;background-size:cover;margin-bottom:.5rem}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%]{display:flex;margin-bottom:.5rem;font-size:18px;font-weight:600;color:#74fafb}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-l[_ngcontent-%COMP%]{align-self:flex-start;flex:1}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-r[_ngcontent-%COMP%]{align-self:flex-end}']});let ue=he;return ue})();var ci=Ve(We(),1),rr=Ve(We(),1);var xe=function(ue){return ue[ue.CLOSED=0]="CLOSED",ue[ue.CONNECTING=1]="CONNECTING",ue[ue.CONNECTED=2]="CONNECTED",ue}(xe||{});var ur=new Be("NgxMqttServiceConfig"),lr=new Be("NgxMqttClientService");function Pe(ue,...he){if(!he.length)return ue;let de=he.shift();if(He(ue)&&He(de))for(let y in de)He(de[y])?(ue[y]||Object.assign(ue,{[y]:{}}),Pe(ue[y],de[y])):Object.assign(ue,{[y]:de[y]});return Pe(ue,...he)}function He(ue){return ue&&typeof ue=="object"&&!Array.isArray(ue)}var di=(()=>{let he=class he{constructor(y,k){this.options=y,this.observables={},this.state=new Ye(xe.CLOSED),this.messages=new Oe,this._clientId=this._generateClientId(),this._connectTimeout=1e4,this._reconnectPeriod=1e4,this._onConnect=new ge,this._onReconnect=new ge,this._onClose=new ge,this._onOffline=new ge,this._onError=new ge,this._onEnd=new ge,this._onMessage=new ge,this._onSuback=new ge,this._onPacketsend=new ge,this._onPacketreceive=new ge,this._handleOnConnect=x=>{this.options.connectOnCreate===!0&&Object.keys(this.observables).forEach(d=>{this.client.subscribe(d)}),this.state.next(xe.CONNECTED),this._onConnect.emit(x)},this._handleOnReconnect=()=>{this.options.connectOnCreate===!0&&Object.keys(this.observables).forEach(x=>{this.client.subscribe(x)}),this.state.next(xe.CONNECTING),this._onReconnect.emit()},this._handleOnClose=()=>{this.state.next(xe.CLOSED),this._onClose.emit()},this._handleOnOffline=()=>{this._onOffline.emit()},this._handleOnError=x=>{this._onError.emit(x),console.error(x)},this._handleOnEnd=()=>{this._onEnd.emit()},this._handleOnMessage=(x,d,f)=>{this._onMessage.emit(f),f.cmd==="publish"&&this.messages.next(f)},this._handleOnPacketsend=x=>{this._onPacketsend.emit(x)},this._handleOnPacketreceive=x=>{this._onPacketreceive.emit(x)},y.connectOnCreate!==!1&&this.connect({},k),this.state.subscribe()}get clientId(){return this._clientId}get onConnect(){return this._onConnect}get onReconnect(){return this._onReconnect}get onClose(){return this._onClose}get onOffline(){return this._onOffline}get onError(){return this._onError}get onEnd(){return this._onEnd}get onMessage(){return this._onMessage}get onPacketsend(){return this._onPacketsend}get onPacketreceive(){return this._onPacketreceive}get onSuback(){return this._onSuback}static filterMatchesTopic(y,k){if(y[0]==="#"&&k[0]==="$")return!1;let x=(y||"").split("/").reverse(),d=(k||"").split("/").reverse(),f=()=>{let m=x.pop(),h=d.pop();switch(m){case"#":return!0;case"+":return h?f():!1;default:return m===h&&(m===void 0?!0:f())}};return f()}connect(y,k){let x=Pe(this.options||{},y),d=x.protocol||"ws",f=x.hostname||"localhost";x.url?this._url=x.url:(this._url=`${d}://${f}`,this._url+=x.port?`:${x.port}`:"",this._url+=x.path?`${x.path}`:""),this.state.next(xe.CONNECTING);let m=Pe({clientId:this._clientId,reconnectPeriod:this._reconnectPeriod,connectTimeout:this._connectTimeout},x);this.client&&this.client.end(!0),k?this.client=k:this.client=(0,rr.connect)(this._url,m),this._clientId=m.clientId,this.client.on("connect",this._handleOnConnect),this.client.on("reconnect",this._handleOnReconnect),this.client.on("close",this._handleOnClose),this.client.on("offline",this._handleOnOffline),this.client.on("error",this._handleOnError),this.client.stream.on("error",this._handleOnError),this.client.on("end",this._handleOnEnd),this.client.on("message",this._handleOnMessage),this.client.on("packetsend",this._handleOnPacketsend),this.client.on("packetreceive",this._handleOnPacketreceive)}disconnect(y=!0){if(!this.client)throw new Error("mqtt client not connected");this.client.end(y)}observeRetained(y,k={qos:1}){return this._generalObserve(y,()=>Xe(1),k)}observe(y,k={qos:1}){return this._generalObserve(y,()=>Je(),k)}_generalObserve(y,k,x){if(!this.client)throw new Error("mqtt client not connected");if(!this.observables[y]){let d=new Oe;this.observables[y]=$e(()=>{let f=new qe;return this.client.subscribe(y,x,(m,h)=>{h&&h.forEach(s=>{s.qos===128&&(delete this.observables[s.topic],this.client.unsubscribe(s.topic),d.error(`subscription for '${s.topic}' rejected!`)),this._onSuback.emit({filter:y,granted:s.qos!==128})})}),f.add(()=>{delete this.observables[y],this.client.unsubscribe(y)}),f},f=>Qe(d,this.messages)).pipe(Ge(f=>he.filterMatchesTopic(y,f.topic)),k(),Ke())}return this.observables[y]}publish(y,k,x={}){if(!this.client)throw new Error("mqtt client not connected");return ze.create(d=>{this.client.publish(y,k,x,f=>{f?d.error(f):(d.next(),d.complete())})})}unsafePublish(y,k,x={}){if(!this.client)throw new Error("mqtt client not connected");this.client.publish(y,k,x,d=>{if(d)throw d})}_generateClientId(){return"client-"+Math.random().toString(36).substr(2,19)}};he.\u0275fac=function(k){return new(k||he)(Me(ur),Me(lr))},he.\u0275prov=Ze({token:he,factory:he.\u0275fac,providedIn:"root"});let ue=he;return ue})();export{ti as a,di as b}; diff --git a/dist/himp.platform.angular/browser/chunk-SZALJX3W.js b/dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js similarity index 91% rename from dist/himp.platform.angular/browser/chunk-SZALJX3W.js rename to dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js index 860fad3..8b456db 100644 --- a/dist/himp.platform.angular/browser/chunk-SZALJX3W.js +++ b/dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js @@ -1 +1 @@ -import{D as u,E as n,F as i,G as s,H as a,I as o,J as c,K as m,L as v}from"./chunk-XXGLJ63T.js";var C=class{static num(r){return u(r.value)?null:{num:!0}}static int(r){return n(r.value)?null:{int:!0}}static decimal(r){return i(r.value)?null:{decimal:!0}}static idCard(r){return s(r.value)?null:{idCard:!0}}static mobile(r){return a(r.value)?null:{mobile:!0}}static url(r){return o(r.value)?null:{url:!0}}static ip(r){return c(r.value)?null:{ip:!0}}static color(r){return m(r.value)?null:{color:!0}}static chinese(r){return v(r.value)?null:{chinese:!0}}};function p(e,r){return l=>{let d=l.get(e),t=l.get(r);return t.errors&&!t.errors.matchControl||(d.value!==t.value?t.setErrors({matchControl:!0}):t.setErrors(null)),null}}export{C as a,p as b}; +import{D as u,E as n,F as i,G as s,H as a,I as o,J as c,K as m,L as v}from"./chunk-OOUNO2UZ.js";var C=class{static num(r){return u(r.value)?null:{num:!0}}static int(r){return n(r.value)?null:{int:!0}}static decimal(r){return i(r.value)?null:{decimal:!0}}static idCard(r){return s(r.value)?null:{idCard:!0}}static mobile(r){return a(r.value)?null:{mobile:!0}}static url(r){return o(r.value)?null:{url:!0}}static ip(r){return c(r.value)?null:{ip:!0}}static color(r){return m(r.value)?null:{color:!0}}static chinese(r){return v(r.value)?null:{chinese:!0}}};function p(e,r){return l=>{let d=l.get(e),t=l.get(r);return t.errors&&!t.errors.matchControl||(d.value!==t.value?t.setErrors({matchControl:!0}):t.setErrors(null)),null}}export{C as a,p as b}; diff --git a/dist/himp.platform.angular/browser/chunk-ZRW2SW2G.js b/dist/himp.platform.angular/browser/chunk-4FFPI7ZP.js similarity index 96% rename from dist/himp.platform.angular/browser/chunk-ZRW2SW2G.js rename to dist/himp.platform.angular/browser/chunk-4FFPI7ZP.js index 2c626b6..5210764 100644 --- a/dist/himp.platform.angular/browser/chunk-ZRW2SW2G.js +++ b/dist/himp.platform.angular/browser/chunk-4FFPI7ZP.js @@ -1 +1 @@ -import{F as b,H as C,Hc as m,Uc as u,X as p,Zb as v,a as y,fa as l,ha as g,ia as A,ja as c,k as d,m as w,n as S,oc as T,rc as x,xa as I,y as O}from"./chunk-TV7RDLL7.js";var U={store_key:"_token",token_invalid_redirect:!0,token_exp_offset:10,token_send_key:"token",token_send_template:"${token}",token_send_place:"header",login_url:"/login",refreshTime:3e3,refreshOffset:6e3};function E(e){return e.merge("auth",U)}function j(){return new h}var h=class{get(t){return JSON.parse(localStorage.getItem(t)||"{}")||{}}set(t,i){return localStorage.setItem(t,JSON.stringify(i)),!0}remove(t){localStorage.removeItem(t)}},D=new g("AUTH_STORE_TOKEN",{providedIn:"root",factory:j});function L(){return new F(c(u))}var F=(()=>{let t=class t{constructor(n){this.store=c(D),this.refresh$=new w,this.change$=new S(null),this._referrer={},this._options=E(n)}get refresh(){return this.builderRefresh(),this.refresh$.pipe(p())}get login_url(){return this._options.login_url}get referrer(){return this._referrer}get options(){return this._options}set(n){let r=this.store.set(this._options.store_key,n);return this.change$.next(n),r}get(n){let r=this.store.get(this._options.store_key);return n?Object.assign(new n,r):r}clear(n={onlyToken:!1}){let r=null;n.onlyToken===!0?(r=this.get(),r.token="",this.set(r)):this.store.remove(this._options.store_key),this.change$.next(r)}change(){return this.change$.pipe(p())}builderRefresh(){let{refreshTime:n,refreshOffset:r}=this._options;this.cleanRefresh(),this.interval$=b(n).pipe(O(()=>{let o=this.get(),s=o.expired||o.exp||0;if(s<=0)return null;let a=new Date().valueOf()+r;return s<=a?o:null}),C(o=>o!=null)).subscribe(o=>this.refresh$.next(o))}cleanRefresh(){this.interval$&&!this.interval$.closed&&this.interval$.unsubscribe()}ngOnDestroy(){this.cleanRefresh()}};t.\u0275fac=function(r){return new(r||t)(A(u))},t.\u0275prov=l({token:t,factory:t.\u0275fac});let e=t;return e})(),f=new g("DA_SERVICE_TOKEN",{providedIn:"root",factory:L}),_="_delonAuthSocialType",k="_delonAuthSocialCallbackByHref",te=(()=>{let t=class t{constructor(){this.tokenService=c(f),this.doc=c(v),this.router=c(m),this._win=null}login(n,r="/",o={}){if(o=y({type:"window",windowFeatures:"location=yes,height=570,width=520,scrollbars=yes,status=yes"},o),localStorage.setItem(_,o.type),localStorage.setItem(k,r),o.type==="href"){this.doc.location.href=n;return}return this._win=window.open(n,"_blank",o.windowFeatures),this._winTime=setInterval(()=>{if(this._win&&this._win.closed){this.ngOnDestroy();let s=this.tokenService.get();s&&!s.token&&(s=null),s&&this.tokenService.set(s),this.observer.next(s),this.observer.complete()}},100),new d(s=>{this.observer=s})}callback(n){if(!n&&this.router.url.indexOf("?")===-1)throw new Error("url muse contain a ?");let r={token:""};if(typeof n=="string"){let a=n.split("?")[1].split("#")[0];r=this.router.parseUrl(`./?${a}`).queryParams}else r=n;if(!r||!r.token)throw new Error("invalide token data");this.tokenService.set(r);let o=localStorage.getItem(k)||"/";localStorage.removeItem(k);let s=localStorage.getItem(_);return localStorage.removeItem(_),s==="window"?window.close():this.router.navigateByUrl(o),r}ngOnDestroy(){clearInterval(this._winTime),this._winTime=null}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=l({token:t,factory:t.\u0275fac});let e=t;return e})();function N(e){return e!=null&&typeof e.token=="string"&&e.token.length>0}function R(e,t){let i=c(m),n=c(f),r=c(v);n.referrer.url=t||i.url,e.token_invalid_redirect===!0&&setTimeout(()=>{/^https?:\/\//g.test(e.login_url)?r.location.href=e.login_url:i.navigate([e.login_url])})}var J=new T(()=>!1);function H(e,t){if(e.context.get(J))return!0;if(Array.isArray(t.ignores)){for(let i of t.ignores)if(i.test(e.url))return!0}return!1}function P(e,t){return R(t),new d(i=>{let n="",r=new x({url:e.url,headers:e.headers,status:401,statusText:n});i.error(r)})}var $=(()=>{let t=class t{constructor(){this.srv=c(f)}process(n){let r=N(this.srv.get());return r||R(this.srv.options,n),r}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=l({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),re=(e,t)=>c($).process(t.url),ne=(e,t)=>c($).process(t.url);function B(e,t,i){let{token_send_template:n,token_send_key:r}=i,o=n.replace(/\$\{([\w]+)\}/g,(s,a)=>t[a]);switch(i.token_send_place){case"header":let s={};s[r]=o,e=e.clone({setHeaders:s});break;case"body":let a=e.body||{};a[r]=o,e=e.clone({body:a});break;case"url":e=e.clone({params:e.params.append(r,o)});break}return e}var oe=(e,t)=>{let i=E(c(u));if(H(e,i))return t(e);let n=c(f).get();return N(n)?t(B(e,n,i)):P(e,i)};var M=function(e){return e[e.Store=0]="Store",e}(M||{});function K(e,t){return{\u0275kind:e,\u0275providers:t}}function se(e){return I([(e??W()).\u0275providers])}function W(){return K(M.Store,[{provide:D,useClass:h}])}export{f as a,te as b,J as c,re as d,ne as e,oe as f,se as g}; +import{$b as v,A as O,H as b,J as C,Jc as m,Wc as u,Z as p,a as y,ha as l,ja as g,ka as A,la as c,m as d,o as w,p as S,qc as T,tc as x,za as I}from"./chunk-VDRVUQCF.js";var U={store_key:"_token",token_invalid_redirect:!0,token_exp_offset:10,token_send_key:"token",token_send_template:"${token}",token_send_place:"header",login_url:"/login",refreshTime:3e3,refreshOffset:6e3};function E(e){return e.merge("auth",U)}function j(){return new h}var h=class{get(t){return JSON.parse(localStorage.getItem(t)||"{}")||{}}set(t,i){return localStorage.setItem(t,JSON.stringify(i)),!0}remove(t){localStorage.removeItem(t)}},D=new g("AUTH_STORE_TOKEN",{providedIn:"root",factory:j});function L(){return new F(c(u))}var F=(()=>{let t=class t{constructor(n){this.store=c(D),this.refresh$=new w,this.change$=new S(null),this._referrer={},this._options=E(n)}get refresh(){return this.builderRefresh(),this.refresh$.pipe(p())}get login_url(){return this._options.login_url}get referrer(){return this._referrer}get options(){return this._options}set(n){let r=this.store.set(this._options.store_key,n);return this.change$.next(n),r}get(n){let r=this.store.get(this._options.store_key);return n?Object.assign(new n,r):r}clear(n={onlyToken:!1}){let r=null;n.onlyToken===!0?(r=this.get(),r.token="",this.set(r)):this.store.remove(this._options.store_key),this.change$.next(r)}change(){return this.change$.pipe(p())}builderRefresh(){let{refreshTime:n,refreshOffset:r}=this._options;this.cleanRefresh(),this.interval$=b(n).pipe(O(()=>{let o=this.get(),s=o.expired||o.exp||0;if(s<=0)return null;let a=new Date().valueOf()+r;return s<=a?o:null}),C(o=>o!=null)).subscribe(o=>this.refresh$.next(o))}cleanRefresh(){this.interval$&&!this.interval$.closed&&this.interval$.unsubscribe()}ngOnDestroy(){this.cleanRefresh()}};t.\u0275fac=function(r){return new(r||t)(A(u))},t.\u0275prov=l({token:t,factory:t.\u0275fac});let e=t;return e})(),f=new g("DA_SERVICE_TOKEN",{providedIn:"root",factory:L}),_="_delonAuthSocialType",k="_delonAuthSocialCallbackByHref",te=(()=>{let t=class t{constructor(){this.tokenService=c(f),this.doc=c(v),this.router=c(m),this._win=null}login(n,r="/",o={}){if(o=y({type:"window",windowFeatures:"location=yes,height=570,width=520,scrollbars=yes,status=yes"},o),localStorage.setItem(_,o.type),localStorage.setItem(k,r),o.type==="href"){this.doc.location.href=n;return}return this._win=window.open(n,"_blank",o.windowFeatures),this._winTime=setInterval(()=>{if(this._win&&this._win.closed){this.ngOnDestroy();let s=this.tokenService.get();s&&!s.token&&(s=null),s&&this.tokenService.set(s),this.observer.next(s),this.observer.complete()}},100),new d(s=>{this.observer=s})}callback(n){if(!n&&this.router.url.indexOf("?")===-1)throw new Error("url muse contain a ?");let r={token:""};if(typeof n=="string"){let a=n.split("?")[1].split("#")[0];r=this.router.parseUrl(`./?${a}`).queryParams}else r=n;if(!r||!r.token)throw new Error("invalide token data");this.tokenService.set(r);let o=localStorage.getItem(k)||"/";localStorage.removeItem(k);let s=localStorage.getItem(_);return localStorage.removeItem(_),s==="window"?window.close():this.router.navigateByUrl(o),r}ngOnDestroy(){clearInterval(this._winTime),this._winTime=null}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=l({token:t,factory:t.\u0275fac});let e=t;return e})();function N(e){return e!=null&&typeof e.token=="string"&&e.token.length>0}function R(e,t){let i=c(m),n=c(f),r=c(v);n.referrer.url=t||i.url,e.token_invalid_redirect===!0&&setTimeout(()=>{/^https?:\/\//g.test(e.login_url)?r.location.href=e.login_url:i.navigate([e.login_url])})}var J=new T(()=>!1);function H(e,t){if(e.context.get(J))return!0;if(Array.isArray(t.ignores)){for(let i of t.ignores)if(i.test(e.url))return!0}return!1}function P(e,t){return R(t),new d(i=>{let n="",r=new x({url:e.url,headers:e.headers,status:401,statusText:n});i.error(r)})}var $=(()=>{let t=class t{constructor(){this.srv=c(f)}process(n){let r=N(this.srv.get());return r||R(this.srv.options,n),r}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=l({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),re=(e,t)=>c($).process(t.url),ne=(e,t)=>c($).process(t.url);function B(e,t,i){let{token_send_template:n,token_send_key:r}=i,o=n.replace(/\$\{([\w]+)\}/g,(s,a)=>t[a]);switch(i.token_send_place){case"header":let s={};s[r]=o,e=e.clone({setHeaders:s});break;case"body":let a=e.body||{};a[r]=o,e=e.clone({body:a});break;case"url":e=e.clone({params:e.params.append(r,o)});break}return e}var oe=(e,t)=>{let i=E(c(u));if(H(e,i))return t(e);let n=c(f).get();return N(n)?t(B(e,n,i)):P(e,i)};var M=function(e){return e[e.Store=0]="Store",e}(M||{});function K(e,t){return{\u0275kind:e,\u0275providers:t}}function se(e){return I([(e??W()).\u0275providers])}function W(){return K(M.Store,[{provide:D,useClass:h}])}export{f as a,te as b,J as c,re as d,ne as e,oe as f,se as g}; diff --git a/dist/himp.platform.angular/browser/chunk-7KRKUWJJ.js b/dist/himp.platform.angular/browser/chunk-7KRKUWJJ.js deleted file mode 100644 index 1899641..0000000 --- a/dist/himp.platform.angular/browser/chunk-7KRKUWJJ.js +++ /dev/null @@ -1 +0,0 @@ -import{a as fe,e as he,j as Pe}from"./chunk-T3OMXG5T.js";import{b as Ie}from"./chunk-SZALJX3W.js";import{$a as re,A as Ce,Aa as G,Ba as oe,C as _e,Ca as $,Da as q,Ea as j,Fa as W,Oa as ye,Pa as Ne,Sa as xe,Ta as Ee,Y as Se,Z as Fe,_ as be,ab as ne,bb as we,cb as De,d as ge,db as Me,eb as ke,fb as Be,gb as Ae,h as k,i as d,j as B,k as A,l as ze,la as O,lb as Te,m as ve,na as U,o as T,oa as V,p as P,q as I,t as ie,v as R,za as L}from"./chunk-XXGLJ63T.js";import{a as ee,b as M,c as te}from"./chunk-ZRW2SW2G.js";import{$a as h,Bb as S,Cb as u,Eb as K,Ee as de,Fe as F,Gb as X,Ge as b,Hb as C,Hc as w,Ia as r,Ib as ce,Ic as Q,Ie as y,Je as N,Ka as Y,Qb as _,Ra as f,T as H,Ta as l,Ya as ue,a as se,eb as n,fb as s,gb as c,ja as m,la as z,ob as v,pc as J,pf as D,qb as x,vf as Z}from"./chunk-TV7RDLL7.js";var Re=(()=>{let i=class i{constructor(){this.socialService=m(M),this.settingsSrv=m(D),this.type=""}ngOnInit(){this.mockModel()}mockModel(){let t={token:"123456789",name:"cipchk",email:`${this.type}@${this.type}.com`,id:1e4,time:+new Date};this.settingsSrv.setUser(se(se({},this.settingsSrv.user),t)),this.socialService.callback(t)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["app-callback"]],inputs:{type:"type"},standalone:!0,features:[X([M]),C],decls:0,vars:0,template:function(o,a){},encapsulation:2});let e=i;return e})();var Ge=(()=>{let i=class i{constructor(){this.tokenService=m(ee),this.settings=m(D),this.router=m(w),this.f=new ze({password:new ve("",{nonNullable:!0,validators:[d.required]})})}get user(){return this.settings.user}submit(){this.f.controls.password.markAsDirty(),this.f.controls.password.updateValueAndValidity(),this.f.valid&&(console.log("Valid!"),console.log(this.f.value),this.tokenService.set({token:"123"}),this.router.navigate(["dashboard"]))}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-lock"]],standalone:!0,features:[C],decls:13,vars:6,consts:[[1,"ant-card","width-lg",2,"margin","0 auto"],[1,"ant-card-body"],[1,"avatar"],["nzIcon","user","nzSize","large",3,"nzSrc"],["nz-form","","role","form",1,"mt-md",3,"formGroup","ngSubmit"],[3,"nzErrorTip"],["nzSuffixIcon","lock"],["type","password","nz-input","","formControlName","password"],["nz-row","","nzType","flex","nzAlign","middle"],["nz-col","",2,"text-align","right",3,"nzOffset","nzSpan"],["nz-button","","nzType","primary",3,"disabled"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-avatar",3),s(),n(4,"form",4),v("ngSubmit",function(){return a.submit()}),n(5,"nz-form-item")(6,"nz-form-control",5)(7,"nz-input-group",6),c(8,"input",7),s()()(),n(9,"div",8)(10,"div",9)(11,"button",10),u(12,"\u9501\u5C4F"),s()()()()()()),o&2&&(r(3),l("nzSrc",a.user.avatar),r(),l("formGroup",a.f),r(2),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(4),l("nzOffset",12)("nzSpan",12),r(),l("disabled",!a.f.valid))},dependencies:[R,T,k,B,A,P,I,De,we,W,G,L,q,$,j,oe,N,y,F,b,V,O,U],styles:["[_nghost-%COMP%] .ant-card-body{position:relative;margin-top:80px}[_nghost-%COMP%] .avatar{position:absolute;top:-20px;left:50%;margin-left:-20px}"]});let e=i;return e})();function Xe(e,i){if(e&1&&c(0,"nz-alert",15),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Je(e,i){e&1&&c(0,"img",16)}var $e=(()=>{let i=class i{constructor(){this.router=m(w),this.settingsService=m(D),this.socialService=m(M),this.reuseTabService=m(Ne,{optional:!0}),this.tokenService=m(ee),this.startupSrv=m(he),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({userName:["",[d.required]],password:["",[d.required]],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]],remember:[!0]}),this.error="",this.type=0,this.loading=!1,this.count=0}switch({index:t}){this.type=t}getCaptcha(){let t=this.form.controls.mobile;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.interval$=setInterval(()=>{this.count-=1,this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",this.type===0){let{userName:t,password:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}else{let{mobile:t,captcha:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}this.loading=!0,this.cdr.detectChanges(),this.http.post("/api/main/login/account",{type:this.type,userName:this.form.value.userName,password:this.form.value.password},null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(t=>{if(t.msg!=="ok"){this.error=t.msg,this.cdr.detectChanges();return}this.reuseTabService?.clear(),this.settingsService.setUser({name:t.user.name,avatar:"./assets/pai.svg",email:t.user.email,staffId:t.staff?.id,organs:t.organ,currentOrgan:t.organ.find(o=>!0)}),this.tokenService.set(t.user),this.startupSrv.load().subscribe(()=>{let o=this.tokenService.referrer.url||"/";o.includes("/passport")&&(o="/"),this.router.navigateByUrl(o)})})}open(t,o="href"){let a="",g="";switch(fe.production?g=`https://ng-alain.github.io/ng-alain/#/passport/callback/${t}`:g=`http://localhost:4200/#/passport/callback/${t}`,t){case"auth0":a=`//cipchk.auth0.com/login?client=8gcNydIDzGBYxzqV0Vm1CX_RXH-wsWo5&redirect_uri=${decodeURIComponent(g)}`;break;case"github":a=`//github.com/login/oauth/authorize?client_id=9d6baae4b04a23fcafa2&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break;case"weibo":a=`https://api.weibo.com/oauth2/authorize?client_id=1239507802&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break}o==="window"?this.socialService.login(a,"/",{type:"window"}).subscribe(E=>{E&&(this.settingsService.setUser(E),this.router.navigateByUrl("/"))}):this.socialService.login(a,"/",{type:"href"})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-login"]],standalone:!0,features:[X([M]),C],decls:21,vars:3,consts:[[1,"login-container"],[1,"head"],["src","./assets/lh-logo.png",1,"logo"],[1,"title"],[1,"login-form"],["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],["nzErrorTip","Please enter user, admin"],["nzSize","large","nzPrefixIcon","user",2,"color","#515151"],["nz-input","","formControlName","userName","placeholder","\u767B\u5F55\u8D26\u6237",2,"color","#515151"],["nzErrorTip","Please enter password, 1q2w3E*"],["nzSize","large","nzPrefixIcon","lock",2,"color","#515151"],["nz-input","","type","password","formControlName","password","placeholder","\u767B\u5F55\u5BC6\u7801",2,"color","#515151"],["nz-button","","type","submit","nzType","primary","nzSize","large","nzBlock","",3,"nzLoading"],["coverTemplate",""],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],["alt","example","src","assets/bg2.jpg",2,"height","100px"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1),c(2,"img",2),n(3,"span",3),u(4,"\u56FD\u5BB6\u7535\u6295\u4E34\u6CB3\u7535\u5382\u5168\u8FC7\u7A0B\u667A\u80FD\u71C3\u6599\u7BA1\u7406\u7CFB\u7EDF"),s()(),n(5,"div",4)(6,"form",5),v("ngSubmit",function(){return a.submit()}),f(7,Xe,1,3,"nz-alert",6),n(8,"nz-form-item")(9,"nz-form-control",7)(10,"nz-input-group",8),c(11,"input",9),s()()(),n(12,"nz-form-item")(13,"nz-form-control",10)(14,"nz-input-group",11),c(15,"input",12),s()()(),n(16,"nz-form-item")(17,"button",13),u(18," \u767B\u5F55 "),s()()()()(),f(19,Je,1,0,"ng-template",null,14,_)),o&2&&(r(6),l("formGroup",a.form),r(),h(7,a.error?7:-1),r(10),l("nzLoading",a.loading))},dependencies:[R,T,k,B,A,P,I,Ce,ye,ne,re,W,G,L,q,$,j,V,O,U,N,y,F,b,_e,de,Te],styles:["[_nghost-%COMP%]{display:block;width:538px;margin:0 auto}[_nghost-%COMP%] .ant-tabs .ant-tabs-bar{margin-bottom:24px;text-align:center;border-bottom:0}[_nghost-%COMP%] .ant-tabs-tab{font-size:16px;line-height:24px}[_nghost-%COMP%] .ant-input-affix-wrapper .ant-input:not(:first-child){padding-left:4px}[_nghost-%COMP%] .icon{cursor:pointer;margin-left:16px;font-size:24px;color:#0003;vertical-align:middle;transition:color .3s}[_nghost-%COMP%] .icon:hover{color:#1890ff}[_nghost-%COMP%] .other{margin-top:24px;line-height:22px;text-align:left}[_nghost-%COMP%] .other nz-tooltip{vertical-align:middle}[_nghost-%COMP%] .other .register{float:right}[_nghost-%COMP%] .login-container{border-radius:10px;background-image:url(/assets/bg2.jpg);background-size:100%;box-shadow:0 4px 6px #0000001a;padding:10px 0 0;height:300px}[_nghost-%COMP%] .head{margin:0 0 0 20px}[_nghost-%COMP%] .login-form{justify-content:center;padding:30px 120px 0}[_nghost-%COMP%] .header{height:46px;line-height:46px}[_nghost-%COMP%] .header a{text-decoration:none}[_nghost-%COMP%] .logo{height:46px;margin-right:6px}[_nghost-%COMP%] .title{position:relative;font-family:Myriad Pro,Helvetica Neue,Arial,Helvetica,sans-serif;font-size:20px;font-weight:400;color:#515151;vertical-align:middle}[_nghost-%COMP%] .color-515151{color:#515151}[data-theme=dark] [_nghost-%COMP%] .icon{color:#fff3}[data-theme=dark] [_nghost-%COMP%] .icon:hover{color:#515151}"],changeDetection:0});let e=i;return e})();function Qe(e,i){if(e&1&&c(0,"nz-alert",23),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Ze(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740\uFF01 ")}function et(e,i){e&1&&u(0," \u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function tt(e,i){if(e&1&&f(0,Ze,1,0)(1,et,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.email?1:-1)}}function it(e,i){e&1&&(n(0,"div",27),u(1,"\u5F3A\u5EA6\uFF1A\u5F3A"),s())}function ot(e,i){e&1&&(n(0,"div",28),u(1,"\u5F3A\u5EA6\uFF1A\u4E2D"),s())}function rt(e,i){e&1&&(n(0,"div",29),u(1,"\u5F3A\u5EA6\uFF1A\u592A\u77ED"),s())}function nt(e,i){if(e&1&&(n(0,"div",24),f(1,it,2,0)(2,ot,2,0)(3,rt,2,0),n(4,"div"),c(5,"nz-progress",25),s(),n(6,"p",26),u(7,"\u8BF7\u81F3\u5C11\u8F93\u5165 6 \u4E2A\u5B57\u7B26\u3002\u8BF7\u4E0D\u8981\u4F7F\u7528\u5BB9\u6613\u88AB\u731C\u5230\u7684\u5BC6\u7801\u3002"),s()()),e&2){let p=x(),t;r(),h(1,(t=p.status)==="ok"?1:t==="pass"?2:3),r(3),ue("progress-",p.status,""),r(),l("nzPercent",p.progress)("nzStatus",p.passwordProgressMap[p.status])("nzStrokeWidth",6)("nzShowInfo",!1)}}function at(e,i){e&1&&u(0," \u8BF7\u786E\u8BA4\u5BC6\u7801\uFF01 ")}function st(e,i){e&1&&u(0," \u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u5339\u914D! ")}function lt(e,i){if(e&1&&f(0,at,1,0)(1,st,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.matchControl?1:-1)}}function pt(e,i){e&1&&(n(0,"nz-select",30),c(1,"nz-option",31)(2,"nz-option",31),s()),e&2&&(r(),l("nzLabel","+86")("nzValue","+86"),r(),l("nzLabel","+87")("nzValue","+87"))}function mt(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u624B\u673A\u53F7\uFF01 ")}function ut(e,i){e&1&&u(0," \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function ct(e,i){if(e&1&&f(0,mt,1,0)(1,ut,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.pattern?1:-1)}}var dt=()=>({"width.px":240}),qe=(()=>{let i=class i{constructor(){this.router=m(w),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({mail:["",[d.required,d.email]],password:["",[d.required,d.minLength(6),i.checkPassword.bind(this)]],confirm:["",[d.required,d.minLength(6)]],mobilePrefix:["+86"],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]]},{validators:Ie("password","confirm")}),this.error="",this.type=0,this.loading=!1,this.visible=!1,this.status="pool",this.progress=0,this.passwordProgressMap={ok:"success",pass:"normal",pool:"exception"},this.count=0}static checkPassword(t){if(!t)return null;let o=this;o.visible=!!t.value,t.value&&t.value.length>9?o.status="ok":t.value&&t.value.length>5?o.status="pass":o.status="pool",o.visible&&(o.progress=t.value.length*10>100?100:t.value.length*10)}getCaptcha(){let{mobile:t}=this.form.controls;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.cdr.detectChanges(),this.interval$=setInterval(()=>{this.count-=1,this.cdr.detectChanges(),this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",Object.keys(this.form.controls).forEach(o=>{let a=this.form.controls[o];a.markAsDirty(),a.updateValueAndValidity()}),this.form.invalid)return;let t=this.form.value;this.loading=!0,this.cdr.detectChanges(),this.http.post("/register",t,null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(()=>{this.router.navigate(["passport","register-result"],{queryParams:{email:t.mail}})})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register"]],standalone:!0,features:[C],decls:44,vars:19,consts:[["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],[3,"nzErrorTip"],["nzSize","large","nzAddonBeforeIcon","user"],["nz-input","","formControlName","mail","placeholder","Email"],["mailErrorTip",""],["nzSize","large","nzAddonBeforeIcon","lock","nz-popover","","nzPopoverPlacement","right","nzPopoverTrigger","focus","nzPopoverOverlayClassName","register-password-cdk",3,"nzPopoverVisible","nzPopoverOverlayStyle","nzPopoverContent","nzPopoverVisibleChange"],["nz-input","","type","password","formControlName","password","placeholder","Password"],["pwdCdkTpl",""],["nzSize","large","nzAddonBeforeIcon","lock"],["nz-input","","type","password","formControlName","confirm","placeholder","Confirm Password"],["confirmErrorTip",""],["nzSize","large",3,"nzAddOnBefore"],["addOnBeforeTemplate",""],["formControlName","mobile","nz-input","","placeholder","Phone number"],["mobileErrorTip",""],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzSpan"],["nzSize","large","nzAddonBeforeIcon","mail"],["nz-input","","formControlName","captcha","placeholder","Captcha"],["type","button","nz-button","","nzSize","large","nzBlock","",3,"disabled","nzLoading","click"],["nz-button","","nzType","primary","nzSize","large","type","submit",1,"submit",3,"nzLoading"],["routerLink","/passport/login",1,"login"],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],[2,"padding","4px 0"],[3,"nzPercent","nzStatus","nzStrokeWidth","nzShowInfo"],[1,"mt-sm"],[1,"success"],[1,"warning"],[1,"error"],["formControlName","mobilePrefix",2,"width","100px"],[3,"nzLabel","nzValue"]],template:function(o,a){if(o&1&&(n(0,"h3"),u(1,"\u6CE8\u518C"),s(),n(2,"form",0),v("ngSubmit",function(){return a.submit()}),f(3,Qe,1,3,"nz-alert",1),n(4,"nz-form-item")(5,"nz-form-control",2)(6,"nz-input-group",3),c(7,"input",4),s(),f(8,tt,2,2,"ng-template",null,5,_),s()(),n(10,"nz-form-item")(11,"nz-form-control",2)(12,"nz-input-group",6),v("nzPopoverVisibleChange",function(E){return a.visible=E}),c(13,"input",7),s(),f(14,nt,8,8,"ng-template",null,8,_),s()(),n(16,"nz-form-item")(17,"nz-form-control",2)(18,"nz-input-group",9),c(19,"input",10),s(),f(20,lt,2,2,"ng-template",null,11,_),s()(),n(22,"nz-form-item")(23,"nz-form-control",2)(24,"nz-input-group",12),f(25,pt,3,4,"ng-template",null,13,_),c(27,"input",14),s(),f(28,ct,2,2,"ng-template",null,15,_),s()(),n(30,"nz-form-item")(31,"nz-form-control",2)(32,"div",16)(33,"div",17)(34,"nz-input-group",18),c(35,"input",19),s()(),n(36,"div",17)(37,"button",20),v("click",function(){return a.getCaptcha()}),u(38),s()()()()(),n(39,"nz-form-item")(40,"button",21),u(41," \u6CE8\u518C "),s(),n(42,"a",22),u(43,"\u4F7F\u7528\u5DF2\u6709\u8D26\u6237\u767B\u5F55"),s()()()),o&2){let g=S(9),E=S(15),We=S(21),He=S(26),Ye=S(29);r(2),l("formGroup",a.form),r(),h(3,a.error?3:-1),r(2),l("nzErrorTip",g),r(6),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(),l("nzPopoverVisible",a.visible)("nzPopoverOverlayStyle",ce(18,dt))("nzPopoverContent",E),r(5),l("nzErrorTip",We),r(6),l("nzErrorTip",Ye),r(),l("nzAddOnBefore",He),r(7),l("nzErrorTip","\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\uFF01"),r(),l("nzGutter",8),r(),l("nzSpan",16),r(3),l("nzSpan",8),r(),l("disabled",a.count>0)("nzLoading",a.loading),r(),K(" ",a.count?a.count+"s":"\u83B7\u53D6\u9A8C\u8BC1\u7801"," "),r(2),l("nzLoading",a.loading)}},dependencies:[R,T,k,B,A,P,I,Q,ne,re,W,G,L,q,$,j,V,O,U,ke,Me,Ae,Be,be,Se,Fe,oe,N,y,F,b],styles:["[_nghost-%COMP%]{display:block;width:368px;margin:0 auto}[_nghost-%COMP%] h3{margin-bottom:20px;font-size:16px}[_nghost-%COMP%] .submit{width:50%}[_nghost-%COMP%] .login{float:right;line-height:40px} .register-password-cdk .success, .register-password-cdk .warning, .register-password-cdk .error{transition:color .3s} .register-password-cdk .success{color:#52c41a} .register-password-cdk .warning{color:#faad14} .register-password-cdk .error{color:#ff4d4f} .register-password-cdk .progress-pass>.progress .ant-progress-bg{background-color:#faad14}"],changeDetection:0});let e=i;return e})();function ft(e,i){if(e&1&&(n(0,"div",4),u(1),s()),e&2){let p=x();r(),K(" \u4F60\u7684\u8D26\u6237\uFF1A",p.email," \u6CE8\u518C\u6210\u529F ")}}var je=(()=>{let i=class i{constructor(){this.msg=m(ge),this.email=""}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register-result"]],inputs:{email:"email"},standalone:!0,features:[C],decls:7,vars:2,consts:[["type","success","description","\u6FC0\u6D3B\u90AE\u4EF6\u5DF2\u53D1\u9001\u5230\u4F60\u7684\u90AE\u7BB1\u4E2D\uFF0C\u90AE\u4EF6\u6709\u6548\u671F\u4E3A24\u5C0F\u65F6\u3002\u8BF7\u53CA\u65F6\u767B\u5F55\u90AE\u7BB1\uFF0C\u70B9\u51FB\u90AE\u4EF6\u4E2D\u7684\u94FE\u63A5\u6FC0\u6D3B\u5E10\u6237\u3002",3,"title"],["title",""],["nz-button","","nzSize","large",3,"nzType","click"],["routerLink","/","nz-button","","nzSize","large"],[1,"title",2,"font-size","20px"]],template:function(o,a){if(o&1&&(n(0,"result",0),f(1,ft,2,1,"ng-template",null,1,_),n(3,"button",2),v("click",function(){return a.msg.success("email")}),u(4," \u67E5\u770B\u90AE\u7BB1 "),s(),n(5,"button",3),u(6," \u8FD4\u56DE\u9996\u9875 "),s()()),o&2){let g=S(2);l("title",g),r(3),l("nzType","primary")}},dependencies:[Q,N,y,F,b,Ee,xe],encapsulation:2});let e=i;return e})();var qi=[{path:"passport",component:Pe,children:[{path:"login",component:$e,data:{title:"\u767B\u5F55",titleI18n:"app.login.login"}},{path:"register",component:qe,data:{title:"\u6CE8\u518C",titleI18n:"app.register.register"}},{path:"register-result",component:je,data:{title:"\u6CE8\u518C\u7ED3\u679C",titleI18n:"app.register.register"}},{path:"lock",component:Ge,data:{title:"\u9501\u5C4F",titleI18n:"app.lock"}}]},{path:"passport/callback/:type",component:Re}];export{qi as routes}; diff --git a/dist/himp.platform.angular/browser/chunk-CTDZNHTN.js b/dist/himp.platform.angular/browser/chunk-CTDZNHTN.js deleted file mode 100644 index 5895972..0000000 --- a/dist/himp.platform.angular/browser/chunk-CTDZNHTN.js +++ /dev/null @@ -1,39 +0,0 @@ -import{a as kT,b as VT}from"./chunk-4YNSMQCN.js";import{A as tl,Aa as Qc,Ba as Tn,C as el,Fa as pl,Ha as hl,Ka as vl,Oa as dl,Ra as ml,Ta as gl,V as rl,W as ET,Wa as yl,X as PT,_ as il,_a as xl,ab as _l,b as qc,ba as zT,bb as RT,ca as wn,cb as Cn,e as Qs,eb as Sl,fb as NT,gb as bl,ib as wl,jb as OT,ka as al,oa as nl,qa as ol,sa as sl,ta as ll,u as $s,v as Js,va as ul,xa as fl,y as jc,za as Kc}from"./chunk-XXGLJ63T.js";import{$ as Ng,Ab as Bi,B as pT,Bb as Wa,Cb as Re,Db as bn,Ec as DT,Ee as Xs,Fa as xT,G as cT,Gb as CT,Hb as Ae,Hc as MT,Ia as wt,Ic as IT,Ja as $r,Jb as AT,Je as qs,Ka as Og,Kb as Gg,Ke as Wc,Le as Yc,Lf as cl,Na as _T,O as hT,Qb as Zs,Ra as qt,S as vT,Ta as mt,Ua as ST,Va as kg,Wa as bT,Z as dT,a as Fc,ac as df,ad as LT,bb as Vg,bc as va,cb as Ug,db as Bg,eb as Ft,f as sT,fb as Wt,ff as js,ga as mT,gb as Ce,gc as mf,hb as ca,ib as ha,ja as Ys,jb as wT,jf as Ks,k as lT,la as Te,lc as Hc,m as Rg,ma as gT,n as uT,na as yT,ob as TT,pa as vf,qb as Jt,rb as hi,s as hf,sb as ze,tf as Zc,u as fT,vd as gf,vf as Xc,wb as Fg,xb as Sn,yb as Gc,zb as Ui}from"./chunk-TV7RDLL7.js";var Hg=function(r,e){return Hg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])},Hg(r,e)};function E(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Hg(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var nF=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),oF=function(){function r(){this.browser=new nF,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),Mo=new oF;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Mo.wxa=!0,Mo.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Mo.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(Mo.node=!0,Mo.svgSupported=!0):sF(navigator.userAgent,Mo);function sF(r,e){var t=e.browser,i=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(t.firefox=!0,t.version=i[1]),a&&(t.ie=!0,t.version=a[1]),n&&(t.edge=!0,t.version=n[1],t.newEdge=+n[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var Tt=Mo;var $c=12,Wg="sans-serif",Jr=$c+"px "+Wg,lF=20,uF=100,fF="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function pF(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",a[u]+":0",i[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function DF(r,e,t){for(var i=t?"invTrans":"trans",a=e[i],n=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),p=2*u,c=f.left,h=f.top;o.push(c,h),l=l&&n&&c===n[p]&&h===n[p+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[i]=t?Kg(s,o):Kg(o,s))}function $g(r){return r.nodeName.toUpperCase()==="CANVAS"}var MF=/([&<>"'])/g,IF={"&":"&","<":"<",">":">",'"':""","'":"'"};function Je(r){return r==null?"":(r+"").replace(MF,function(e,t){return IF[t]})}var LF=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Jg=[],EF=Tt.browser.firefox&&+Tt.browser.version.split(".")[0]<39;function sh(r,e,t,i){return t=t||{},i?JT(r,e,t):EF&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):JT(r,e,t),t}function JT(r,e,t){if(Tt.domSupported&&r.getBoundingClientRect){var i=e.clientX,a=e.clientY;if($g(r)){var n=r.getBoundingClientRect();t.zrX=i-n.left,t.zrY=a-n.top;return}else if(oh(Jg,r,i,a)){t.zrX=Jg[0],t.zrY=Jg[1];return}}t.zrX=t.zrY=0}function lh(r){return r||window.event}function Er(r,e,t){if(e=lh(e),e.zrX!=null)return e;var i=e.type,a=i&&i.indexOf("touch")>=0;if(a){var o=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&sh(r,o,e,t)}else{sh(r,e,e,t);var n=PF(e);e.zrDelta=n?n/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&LF.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function PF(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,i=r.deltaY;if(t==null||i==null)return e;var a=Math.abs(i!==0?i:t),n=i>0?-1:i<0?1:t>0?-1:1;return 3*a*n}function Sf(r,e,t,i){r.addEventListener(e,t,i)}function tC(r,e,t,i){r.removeEventListener(e,t,i)}var Pr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function ty(r){return r.which===2||r.which===3}var rC=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,i){var a=e.touches;if(a){for(var n={points:[],touches:[],target:t,event:e},o=0,s=a.length;o1&&i&&i.length>1){var n=eC(i)/eC(a);!isFinite(n)&&(n=1),e.pinchScale=n;var o=zF(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function Me(){return[1,0,0,1,0,0]}function Ln(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function bf(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function zr(r,e,t){var i=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],n=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=i,r[1]=a,r[2]=n,r[3]=o,r[4]=s,r[5]=l,r}function tr(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Rr(r,e,t,i){i===void 0&&(i=[0,0]);var a=e[0],n=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),p=Math.cos(t);return r[0]=a*p+s*f,r[1]=-a*f+s*p,r[2]=n*p+l*f,r[3]=-n*f+p*l,r[4]=p*(o-i[0])+f*(u-i[1])+i[0],r[5]=p*(u-i[1])-f*(o-i[0])+i[1],r}function Pl(r,e,t){var i=t[0],a=t[1];return r[0]=e[0]*i,r[1]=e[1]*a,r[2]=e[2]*i,r[3]=e[3]*a,r[4]=e[4]*i,r[5]=e[5]*a,r}function mi(r,e){var t=e[0],i=e[2],a=e[4],n=e[1],o=e[3],s=e[5],l=t*o-n*i;return l?(l=1/l,r[0]=o*l,r[1]=-n*l,r[2]=-i*l,r[3]=t*l,r[4]=(i*s-o*a)*l,r[5]=(n*a-t*s)*l,r):null}function iC(r){var e=Me();return bf(e,r),e}var RF=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,i){e.x=t,e.y=i},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},r.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},r.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},r.scaleAndAdd=function(e,t,i,a){e.x=t.x+i.x*a,e.y=t.y+i.y*a},r.lerp=function(e,t,i,a){var n=1-a;e.x=n*t.x+a*i.x,e.y=n*t.y+a*i.y},r}(),bt=RF;var uh=Math.min,fh=Math.max,Po=new bt,zo=new bt,Ro=new bt,No=new bt,wf=new bt,Tf=new bt,NF=function(){function r(e,t,i,a){i<0&&(e=e+i,i=-i),a<0&&(t=t+a,a=-a),this.x=e,this.y=t,this.width=i,this.height=a}return r.prototype.union=function(e){var t=uh(e.x,this.x),i=uh(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=fh(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=fh(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,a=e.height/t.height,n=Me();return tr(n,n,[-t.x,-t.y]),Pl(n,n,[i,a]),tr(n,n,[e.x,e.y]),n},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var i=this,a=i.x,n=i.x+i.width,o=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,f=e.y,p=e.y+e.height,c=!(nv&&(v=x,dv&&(v=_,g=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,i){if(!i){e!==t&&r.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var a=i[0],n=i[3],o=i[4],s=i[5];e.x=t.x*a+o,e.y=t.y*n+s,e.width=t.width*a,e.height=t.height*n,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Po.x=Ro.x=t.x,Po.y=No.y=t.y,zo.x=No.x=t.x+t.width,zo.y=Ro.y=t.y+t.height,Po.transform(i),No.transform(i),zo.transform(i),Ro.transform(i),e.x=uh(Po.x,zo.x,Ro.x,No.x),e.y=uh(Po.y,zo.y,Ro.y,No.y);var l=fh(Po.x,zo.x,Ro.x,No.x),u=fh(Po.y,zo.y,Ro.y,No.y);e.width=l-e.x,e.height=u-e.y},r}(),rt=NF;var nC="silent";function OF(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:kF}}function kF(){Pr(this.event)}var VF=function(r){Mt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ne),Cf=function(){function r(e,t){this.x=e,this.y=t}return r}(),UF=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ry=new rt(0,0,0,0),oC=function(r){Mt(e,r);function e(t,i,a,n,o){var s=r.call(this)||this;return s._hovered=new Cf(0,0),s.storage=t,s.painter=i,s.painterRoot=n,s._pointerSize=o,a=a||new VF,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new KT(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(w(UF,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,a=t.zrY,n=sC(this,i,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=n?new Cf(i,a):this.findHover(i,a),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Cf(0,0)},e.prototype.dispatch=function(t,i){var a=this[t];a&&a.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,a){t=t||{};var n=t.target;if(!(n&&n.silent)){for(var o="on"+i,s=OF(i,t,a);n&&(n[o]&&(s.cancelBubble=!!n[o].call(n,s)),n.trigger(i,s),n=n.__hostTarget?n.__hostTarget:n.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},e.prototype.findHover=function(t,i,a){var n=this.storage.getDisplayList(),o=new Cf(t,i);if(aC(n,o,t,i,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new rt(t-u,i-u,l,l),p=n.length-1;p>=0;p--){var c=n[p];c!==a&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(ry.copy(c.getBoundingRect()),c.transform&&ry.applyTransform(c.transform),ry.intersect(f)&&s.push(c))}if(s.length)for(var h=4,v=Math.PI/12,d=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(n,r,e)}});function BF(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var i=r,a=void 0,n=!1;i;){if(i.ignoreClip&&(n=!0),!n){var o=i.getClipPath();if(o&&!o.contain(e,t))return!1}i.silent&&(a=!0);var s=i.__hostTarget;i=s||i.parent}return a?nC:!0}return!1}function aC(r,e,t,i,a){for(var n=r.length-1;n>=0;n--){var o=r[n],s=void 0;if(o!==a&&!o.ignore&&(s=BF(o,t,i))&&(!e.topTarget&&(e.topTarget=o),s!==nC)){e.target=o;break}}}function sC(r,e,t){var i=r.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var lC=oC;var pC=32,Af=7;function FF(r){for(var e=0;r>=pC;)e|=r&1,r>>=1;return r+e}function uC(r,e,t,i){var a=e+1;if(a===t)return 1;if(i(r[a++],r[e])<0){for(;a=0;)a++;return a-e}function GF(r,e,t){for(t--;e>>1,a(n,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=n}}function iy(r,e,t,i,a,n){var o=0,s=0,l=1;if(n(r,e[t+a])>0){for(s=i-a;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o>>1);n(r,e[t+f])>0?o=f+1:l=f}return l}function ay(r,e,t,i,a,n){var o=0,s=0,l=1;if(n(r,e[t+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=i-a;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);n(r,e[t+f])<0?l=f:o=f+1}return l}function HF(r,e){var t=Af,i,a,n=0,o=[];i=[],a=[];function s(h,v){i[n]=h,a[n]=v,n+=1}function l(){for(;n>1;){var h=n-2;if(h>=1&&a[h-1]<=a[h]+a[h+1]||h>=2&&a[h-2]<=a[h]+a[h-1])a[h-1]a[h+1])break;f(h)}}function u(){for(;n>1;){var h=n-2;h>0&&a[h-1]=Af||T>=Af);if(C)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),v===1){for(g=0;g=0;g--)r[S+g]=r[b+g];r[_]=o[x];return}for(var T=t;;){var C=0,A=0,D=!1;do if(e(o[x],r[y])<0){if(r[_--]=r[y--],C++,A=0,--v===0){D=!0;break}}else if(r[_--]=o[x--],A++,C=0,--m===1){D=!0;break}while((C|A)=0;g--)r[S+g]=r[b+g];if(v===0){D=!0;break}}if(r[_--]=o[x--],--m===1){D=!0;break}if(A=m-iy(r[y],o,0,m,m-1,e),A!==0){for(_-=A,x-=A,m-=A,S=_+1,b=x+1,g=0;g=Af||A>=Af);if(D)break;T<0&&(T=0),T+=2}if(t=T,t<1&&(t=1),m===1){for(_-=v,y-=v,S=_+1,b=y+1,g=v-1;g>=0;g--)r[S+g]=r[b+g];r[_]=o[x]}else{if(m===0)throw new Error;for(b=_-(m-1),g=0;gs&&(l=s),fC(r,t,t+l,t+n,e),n=l}o.pushRun(t,n),o.mergeRuns(),a-=n,t+=n}while(a!==0);o.forceMergeRuns()}}var Ve=1,ko=2,En=4;var cC=!1;function ny(){cC||(cC=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function hC(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var WF=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=hC}return r.prototype.traverse=function(e,t){for(var i=0;i0&&(f.__clipPaths=[]),isNaN(f.z)&&(ny(),f.z=0),isNaN(f.z2)&&(ny(),f.z2=0),isNaN(f.zlevel)&&(ny(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var p=e.getDecalElement&&e.getDecalElement();p&&this._updateAndAddDisplayable(p,t,i);var c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,t,i);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,i)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t=0&&this._roots.splice(a,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),vC=WF;var dC;dC=Tt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Df=dC;var ph={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)))},elasticOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-ph.bounceOut(1-r)},bounceOut:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},bounceInOut:function(r){return r<.5?ph.bounceIn(r*2)*.5:ph.bounceOut(r*2-1)*.5+.5}},ch=ph;var hh=Math.pow,zn=Math.sqrt,dh=1e-8,gC=1e-4,mC=zn(3),vh=1/3,ma=da(),gi=da(),zl=da();function Pn(r){return r>-dh&&rdh||r<-dh}function ye(r,e,t,i,a){var n=1-a;return n*n*(n*r+3*a*e)+a*a*(a*i+3*n*t)}function oy(r,e,t,i,a){var n=1-a;return 3*(((e-r)*n+2*(t-e)*a)*n+(i-t)*a*a)}function Vo(r,e,t,i,a,n){var o=i+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,f=s*s-3*o*l,p=s*l-9*o*u,c=l*l-3*s*u,h=0;if(Pn(f)&&Pn(p))if(Pn(s))n[0]=0;else{var v=-l/s;v>=0&&v<=1&&(n[h++]=v)}else{var d=p*p-4*f*c;if(Pn(d)){var m=p/f,v=-s/o+m,g=-m/2;v>=0&&v<=1&&(n[h++]=v),g>=0&&g<=1&&(n[h++]=g)}else if(d>0){var y=zn(d),x=f*s+1.5*o*(-p+y),_=f*s+1.5*o*(-p-y);x<0?x=-hh(-x,vh):x=hh(x,vh),_<0?_=-hh(-_,vh):_=hh(_,vh);var v=(-s-(x+_))/(3*o);v>=0&&v<=1&&(n[h++]=v)}else{var b=(2*f*s-3*o*p)/(2*zn(f*f*f)),S=Math.acos(b)/3,T=zn(f),C=Math.cos(S),v=(-s-2*T*C)/(3*o),g=(-s+T*(C+mC*Math.sin(S)))/(3*o),A=(-s+T*(C-mC*Math.sin(S)))/(3*o);v>=0&&v<=1&&(n[h++]=v),g>=0&&g<=1&&(n[h++]=g),A>=0&&A<=1&&(n[h++]=A)}}return h}function mh(r,e,t,i,a){var n=6*t-12*e+6*r,o=9*e+3*i-3*r-9*t,s=3*e-3*r,l=0;if(Pn(o)){if(yC(n)){var u=-s/n;u>=0&&u<=1&&(a[l++]=u)}}else{var f=n*n-4*o*s;if(Pn(f))a[0]=-n/(2*o);else if(f>0){var p=zn(f),u=(-n+p)/(2*o),c=(-n-p)/(2*o);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function yi(r,e,t,i,a,n){var o=(e-r)*a+r,s=(t-e)*a+e,l=(i-t)*a+t,u=(s-o)*a+o,f=(l-s)*a+s,p=(f-u)*a+u;n[0]=r,n[1]=o,n[2]=u,n[3]=p,n[4]=p,n[5]=f,n[6]=l,n[7]=i}function gh(r,e,t,i,a,n,o,s,l,u,f){var p,c=.005,h=1/0,v,d,m,g;ma[0]=l,ma[1]=u;for(var y=0;y<1;y+=.05)gi[0]=ye(r,t,a,o,y),gi[1]=ye(e,i,n,s,y),m=Ya(ma,gi),m=0&&m=0&&u<=1&&(a[l++]=u)}}else{var f=o*o-4*n*s;if(Pn(f)){var u=-o/(2*n);u>=0&&u<=1&&(a[l++]=u)}else if(f>0){var p=zn(f),u=(-o+p)/(2*n),c=(-o-p)/(2*n);u>=0&&u<=1&&(a[l++]=u),c>=0&&c<=1&&(a[l++]=c)}}return l}function yh(r,e,t){var i=r+t-2*e;return i===0?.5:(r-e)/i}function Rn(r,e,t,i,a){var n=(e-r)*i+r,o=(t-e)*i+e,s=(o-n)*i+n;a[0]=r,a[1]=n,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function xh(r,e,t,i,a,n,o,s,l){var u,f=.005,p=1/0;ma[0]=o,ma[1]=s;for(var c=0;c<1;c+=.05){gi[0]=Se(r,t,a,c),gi[1]=Se(e,i,n,c);var h=Ya(ma,gi);h=0&&h=1?1:Vo(0,i,n,1,l,s)&&ye(0,a,o,1,s[0])}}}var ZF=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||te,this.ondestroy=e.ondestroy||te,this.onrestart=e.onrestart||te,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,a=e-this._startTime-this._pausedTime,n=a/i;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,s=o?o(n):n;if(this.onframe(s),n===1)if(this.loop){var l=a%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=X(e)?e:ch[e]||Rl(e)},r}(),bC=ZF;var wC=function(){function r(e){this.value=e}return r}();var XF=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new wC(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}();var qF=function(){function r(e){this._list=new XF,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var i=this._list,a=this._map,n=null;if(a[e]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete a[l.key],n=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new wC(t),s.key=e,i.insertEntry(s),a[e]=s}return n},r.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Za=qF;var TC={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Gi(r){return r=Math.round(r),r<0?0:r>255?255:r}function jF(r){return r=Math.round(r),r<0?0:r>360?360:r}function Lf(r){return r<0?0:r>1?1:r}function sy(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Gi(parseFloat(e)/100*255):Gi(parseInt(e,10))}function Uo(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Lf(parseFloat(e)/100):Lf(parseFloat(e))}function ly(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Nn(r,e,t){return r+(e-r)*t}function xi(r,e,t,i,a){return r[0]=e,r[1]=t,r[2]=i,r[3]=a,r}function uy(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var AC=new Za(20),_h=null;function Nl(r,e){_h&&uy(_h,e),_h=AC.put(r,_h||e.slice())}function qe(r,e){if(r){e=e||[];var t=AC.get(r);if(t)return uy(e,t);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in TC)return uy(e,TC[i]),Nl(r,e),e;var a=i.length;if(i.charAt(0)==="#"){if(a===4||a===5){var n=parseInt(i.slice(1,4),16);if(!(n>=0&&n<=4095)){xi(e,0,0,0,1);return}return xi(e,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,a===5?parseInt(i.slice(4),16)/15:1),Nl(r,e),e}else if(a===7||a===9){var n=parseInt(i.slice(1,7),16);if(!(n>=0&&n<=16777215)){xi(e,0,0,0,1);return}return xi(e,(n&16711680)>>16,(n&65280)>>8,n&255,a===9?parseInt(i.slice(7),16)/255:1),Nl(r,e),e}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===a){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?xi(e,+u[0],+u[1],+u[2],1):xi(e,0,0,0,1);f=Uo(u.pop());case"rgb":if(u.length>=3)return xi(e,sy(u[0]),sy(u[1]),sy(u[2]),u.length===3?f:Uo(u[3])),Nl(r,e),e;xi(e,0,0,0,1);return;case"hsla":if(u.length!==4){xi(e,0,0,0,1);return}return u[3]=Uo(u[3]),fy(u,e),Nl(r,e),e;case"hsl":if(u.length!==3){xi(e,0,0,0,1);return}return fy(u,e),Nl(r,e),e;default:return}}xi(e,0,0,0,1)}}function fy(r,e){var t=(parseFloat(r[0])%360+360)%360/360,i=Uo(r[1]),a=Uo(r[2]),n=a<=.5?a*(i+1):a+i-a*i,o=a*2-n;return e=e||[],xi(e,Gi(ly(o,n,t+1/3)*255),Gi(ly(o,n,t)*255),Gi(ly(o,n,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function KF(r){if(r){var e=r[0]/255,t=r[1]/255,i=r[2]/255,a=Math.min(e,t,i),n=Math.max(e,t,i),o=n-a,s=(n+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+a):u=o/(2-n-a);var f=((n-e)/6+o/2)/o,p=((n-t)/6+o/2)/o,c=((n-i)/6+o/2)/o;e===n?l=c-p:t===n?l=1/3+f-c:i===n&&(l=2/3+p-f),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function Sh(r,e){var t=qe(r);if(t){for(var i=0;i<3;i++)e<0?t[i]=t[i]*(1-e)|0:t[i]=(255-t[i])*e+t[i]|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return _i(t,t.length===4?"rgba":"rgb")}}function bh(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var i=r*(e.length-1),a=Math.floor(i),n=Math.ceil(i),o=e[a],s=e[n],l=i-a;return t[0]=Gi(Nn(o[0],s[0],l)),t[1]=Gi(Nn(o[1],s[1],l)),t[2]=Gi(Nn(o[2],s[2],l)),t[3]=Lf(Nn(o[3],s[3],l)),t}}function DC(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var i=r*(e.length-1),a=Math.floor(i),n=Math.ceil(i),o=qe(e[a]),s=qe(e[n]),l=i-a,u=_i([Gi(Nn(o[0],s[0],l)),Gi(Nn(o[1],s[1],l)),Gi(Nn(o[2],s[2],l)),Lf(Nn(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:n,value:i}:u}}function Bo(r,e,t,i){var a=qe(r);if(r)return a=KF(a),e!=null&&(a[0]=jF(e)),t!=null&&(a[1]=Uo(t)),i!=null&&(a[2]=Uo(i)),_i(fy(a),"rgba")}function Fo(r,e){var t=qe(r);if(t&&e!=null)return t[3]=Lf(e),_i(t,"rgba")}function _i(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Ol(r,e){var t=qe(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var CC=new Za(100);function Ef(r){if(F(r)){var e=CC.get(r);return e||(e=Sh(r,-.1),CC.put(r,e)),e}else if(Dn(r)){var t=N({},r);return t.colorStops=k(r.colorStops,function(i){return{offset:i.offset,color:Sh(i.color,-.1)}}),t}return r}var Th=Math.round;function On(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=qe(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var MC=1e-4;function ga(r){return r-MC}function wh(r){return Th(r*1e3)/1e3}function Ch(r){return Th(r*1e4)/1e4}function IC(r){return"matrix("+wh(r[0])+","+wh(r[1])+","+wh(r[2])+","+wh(r[3])+","+Ch(r[4])+","+Ch(r[5])+")"}var LC={left:"start",right:"end",center:"middle",middle:"middle"};function EC(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function PC(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function zC(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function cy(r){return r&&!!r.image}function QF(r){return r&&!!r.svgElement}function Pf(r){return cy(r)||QF(r)}function Ah(r){return r.type==="linear"}function Dh(r){return r.type==="radial"}function Mh(r){return r&&(r.type==="linear"||r.type==="radial")}function zf(r){return"url(#"+r+")"}function Ih(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function Lh(r){var e=r.x||0,t=r.y||0,i=(r.rotation||0)*Dl,a=at(r.scaleX,1),n=at(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),i&&l.push("rotate("+i+")"),(a!==1||n!==1)&&l.push("scale("+a+","+n+")"),(o||s)&&l.push("skew("+Th(o*Dl)+"deg, "+Th(s*Dl)+"deg)"),l.join(" ")}var RC=function(){return Tt.hasGlobalWindow&&X(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}();var vy=Array.prototype.slice;function Xa(r,e,t){return(e-r)*t+r}function hy(r,e,t,i){for(var a=e.length,n=0;ni?e:r,n=Math.min(t,i),o=a[n-1]||{color:[0,0,0,0],offset:0},s=n;so;if(s)i.length=o;else for(var l=n;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var a=this.keyframes,n=a.length,o=!1,s=OC,l=t;if(me(t)){var u=e5(t);s=u,(u===1&&!vt(t[0])||u===2&&!vt(t[0][0]))&&(o=!0)}else if(vt(t)&&!Mn(t))s=Ph;else if(F(t))if(!isNaN(+t))s=Ph;else{var f=qe(t);f&&(l=f,s=Nf)}else if(Dn(t)){var p=N({},l);p.colorStops=k(t.colorStops,function(h){return{offset:h.offset,color:qe(h.color)}}),Ah(t)?s=dy:Dh(t)&&(s=my),l=p}n===0?this.valType=s:(s!==this.valType||s===OC)&&(o=!0),this.discrete=this.discrete||o;var c={time:e,value:l,rawValue:t,percent:0};return i&&(c.easing=i,c.easingFunc=X(i)?i:ch[i]||Rl(i)),a.push(c),c},r.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(d,m){return d.time-m.time});for(var a=this.valType,n=i.length,o=i[n-1],s=this.discrete,l=zh(a),u=kC(a),f=0;f=0&&!(o[f].percent<=t);f--);f=c(f,s-2)}else{for(f=p;ft);f++);f=c(f-1,s-2)}v=o[f+1],h=o[f]}if(h&&v){this._lastFr=f,this._lastFrP=t;var m=v.percent-h.percent,g=m===0?1:c((t-h.percent)/m,1);v.easingFunc&&(g=v.easingFunc(g));var y=i?this._additiveValue:u?Rf:e[l];if((zh(n)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=g<1?h.rawValue:v.rawValue;else if(zh(n))n===Nh?hy(y,h[a],v[a],g):$F(y,h[a],v[a],g);else if(kC(n)){var x=h[a],_=v[a],b=n===dy;e[l]={type:b?"linear":"radial",x:Xa(x.x,_.x,g),y:Xa(x.y,_.y,g),colorStops:k(x.colorStops,function(T,C){var A=_.colorStops[C];return{offset:Xa(T.offset,A.offset,g),color:Rh(hy([],T.color,A.color,g))}}),global:_.global},b?(e[l].x2=Xa(x.x2,_.x2,g),e[l].y2=Xa(x.y2,_.y2,g)):e[l].r=Xa(x.r,_.r,g)}else if(u)hy(y,h[a],v[a],g),i||(e[l]=Rh(y));else{var S=Xa(h[a],v[a],g);i?this._additiveValue=S:e[l]=S}i&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,a=this._additiveValue;t===Ph?e[i]=e[i]+a:t===Nf?(qe(e[i],Rf),Eh(Rf,Rf,a,1),e[i]=Rh(Rf)):t===Nh?Eh(e[i],e[i],a,1):t===VC&&NC(e[i],e[i],a,1)},r}(),i5=function(){function r(e,t,i,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){Io("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,ft(t),i)},r.prototype.whenWithKeys=function(e,t,i,a){for(var n=this._tracks,o=0;o0&&l.addKeyframe(0,Go(u),a),this._trackKeys.push(s)}l.addKeyframe(e,Go(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i0)){this._started=1;for(var t=this,i=[],a=this._maxTime||0,n=0;n1){var s=o.pop();n.addKeyframe(s.time,e[a]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},r}(),Of=i5;function Ho(){return new Date().getTime()}var a5=function(r){Mt(e,r);function e(t){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,a=t.next;i?i.next=a:this._head=a,a?a.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=Ho()-this._pausedTime,a=i-this._time,n=this._head;n;){var o=n.next,s=n.step(i,a);s&&(n.ondestroy(),this.removeClip(n)),n=o}this._time=i,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(Df(i),!t._paused&&t.update())}Df(i)},e.prototype.start=function(){this._running||(this._time=Ho(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ho(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ho()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var a=new Of(t,i.loop);return this.addAnimator(a),a},e}(Ne),UC=a5;var n5=300,gy=Tt.domSupported,yy=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=k(r,function(a){var n=a.replace("mouse","pointer");return t.hasOwnProperty(n)?n:a});return{mouse:r,touch:e,pointer:i}}(),BC={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},FC=!1;function Sy(r){var e=r.pointerType;return e==="pen"||e==="touch"}function o5(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function xy(r){r&&(r.zrByTouch=!0)}function s5(r,e){return Er(r.dom,new l5(r,e),!0)}function HC(r,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return i}var l5=function(){function r(e,t){this.stopPropagation=te,this.stopImmediatePropagation=te,this.preventDefault=te,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Hi={mousedown:function(r){r=Er(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Er(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Er(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Er(this.dom,r);var e=r.toElement||r.relatedTarget;HC(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){FC=!0,r=Er(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){FC||(r=Er(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Er(this.dom,r),xy(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Hi.mousemove.call(this,r),Hi.mousedown.call(this,r)},touchmove:function(r){r=Er(this.dom,r),xy(r),this.handler.processGesture(r,"change"),Hi.mousemove.call(this,r)},touchend:function(r){r=Er(this.dom,r),xy(r),this.handler.processGesture(r,"end"),Hi.mouseup.call(this,r),+new Date-+this.__lastTouchMomentqC||r<-qC}var Zo=[],kl=[],wy=Me(),Ty=Math.abs,c5=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Yo(this.rotation)||Yo(this.x)||Yo(this.y)||Yo(this.scaleX-1)||Yo(this.scaleY-1)||Yo(this.skewX)||Yo(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(XC(i),this.invTransform=null);return}i=i||Me(),t?this.getLocalTransform(i):XC(i),e&&(t?zr(i,e,i):bf(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Zo);var i=Zo[0]<0?-1:1,a=Zo[1]<0?-1:1,n=((Zo[0]-i)*t+i)/Zo[0]||0,o=((Zo[1]-a)*t+a)/Zo[1]||0;e[0]*=n,e[1]*=n,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Me(),mi(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),n=Math.PI/2+a-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(n),t=Math.sqrt(t),this.skewX=n,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Me(),zr(kl,e.invTransform,t),t=kl);var i=this.originX,a=this.originY;(i||a)&&(wy[4]=i,wy[5]=a,zr(kl,t,wy),kl[4]-=i,kl[5]-=a,t=kl),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var i=[e,t],a=this.invTransform;return a&&ge(i,i,a),i},r.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],a=this.transform;return a&&ge(i,i,a),i},r.prototype.getLineScale=function(){var e=this.transform;return e&&Ty(e[0]-1)>1e-10&&Ty(e[3]-1)>1e-10?Math.sqrt(Ty(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Cy(this,e)},r.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,a=e.originY||0,n=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,p=e.y,c=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(i||a||s||l){var v=i+s,d=a+l;t[4]=-v*n-c*d*o,t[5]=-d*o-h*v*n}else t[4]=t[5]=0;return t[0]=n,t[3]=o,t[1]=h*n,t[2]=c*o,u&&Rr(t,t,u),t[4]+=i+f,t[5]+=a+p,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),ii=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Cy(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function qo(r,e,t){var i=e.position||"inside",a=e.distance!=null?e.distance:5,n=t.height,o=t.width,s=n/2,l=t.x,u=t.y,f="left",p="top";if(i instanceof Array)l+=er(i[0],t.width),u+=er(i[1],t.height),f=null,p=null;else switch(i){case"left":l-=a,u+=s,f="right",p="middle";break;case"right":l+=a+o,u+=s,p="middle";break;case"top":l+=o/2,u-=a,f="center",p="bottom";break;case"bottom":l+=o/2,u+=n+a,f="center";break;case"inside":l+=o/2,u+=s,f="center",p="middle";break;case"insideLeft":l+=a,u+=s,p="middle";break;case"insideRight":l+=o-a,u+=s,f="right",p="middle";break;case"insideTop":l+=o/2,u+=a,f="center";break;case"insideBottom":l+=o/2,u+=n-a,f="center",p="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,f="right";break;case"insideBottomLeft":l+=a,u+=n-a,p="bottom";break;case"insideBottomRight":l+=o-a,u+=n-a,f="right",p="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=p,r}var Ay="__zr_normal__",Dy=ii.concat(["ignore"]),h5=$e(ii,function(r,e){return r[e]=!0,r},{ignore:!1}),Bl={},v5=new rt(0,0,0,0),Ly=function(){function r(e){this.id=eh(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,a=i.local,n=t.innerTransformable,o=void 0,s=void 0,l=!1;n.parent=a?this:null;var u=!1;if(n.copyTransform(t),i.position!=null){var f=v5;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),a||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Bl,i,f):qo(Bl,i,f),n.x=Bl.x,n.y=Bl.y,o=Bl.align,s=Bl.verticalAlign;var p=i.origin;if(p&&i.rotation!=null){var c=void 0,h=void 0;p==="center"?(c=f.width*.5,h=f.height*.5):(c=er(p[0],f.width),h=er(p[1],f.height)),u=!0,n.originX=-n.x+c+(a?0:f.x),n.originY=-n.y+h+(a?0:f.y)}}i.rotation!=null&&(n.rotation=i.rotation);var v=i.offset;v&&(n.x+=v[0],n.y+=v[1],u||(n.originX=-v[0],n.originY=-v[1]));var d=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,y=void 0,x=void 0;d&&this.canBeInsideText()?(g=i.insideFill,y=i.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(g),x=!0)):(g=i.outsideFill,y=i.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(g),x=!0)),g=g||"#000",(g!==m.fill||y!==m.stroke||x!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=g,m.stroke=y,m.autoStroke=x,m.align=o,m.verticalAlign=s,t.setDefaultTextStyle(m)),t.__dirty|=Ve,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Uf:Vf},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&qe(t);i||(i=[255,255,255,1]);for(var a=i[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*a+(n?0:255)*(1-a);return i[3]=1,_i(i,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},N(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(j(e))for(var i=e,a=ft(i),n=0;n0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Ay,!1,e)},r.prototype.useState=function(e,t,i,a){var n=e===Ay,o=this.hasState();if(!(!o&&n)){var s=this.currentStates,l=this.stateTransition;if(!(nt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!n&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!n){Io("State "+e+" not exists.");return}n||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var p=this._textContent,c=this._textGuide;return p&&p.useState(e,t,i,f),c&&c.useState(e,t,i,f),n?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ve),u}}},r.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var a=[],n=this.currentStates,o=e.length,s=o===n.length;if(s){for(var l=0;l0,v);var d=this._textContent,m=this._textGuide;d&&d.useStates(e,t,c),m&&m.useStates(e,t,c),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ve)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},r.prototype.replaceState=function(e,t,i){var a=this.currentStates.slice(),n=nt(a,e),o=nt(a,t)>=0;n>=0?o?a.splice(n,1):a[n]=t:i&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},i,a=0;a=0&&n.splice(o,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var i=this.animators,a=i.length,n=[],o=0;o0&&t.during&&n[0].during(function(v,d){t.during(d)});for(var c=0;c0||a.force&&!o.length){var C=void 0,A=void 0,D=void 0;if(s){A={},c&&(C={});for(var _=0;_=0&&(a.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var a=nt(this._children,t);return a>=0&&this.replaceAt(i,a),this},e.prototype.replaceAt=function(t,i){var a=this._children,n=a[i];if(t&&t!==this&&t.parent!==this&&t!==n){a[i]=t,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,a=this._children,n=nt(a,t);return n<0?this:(a.splice(n,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=a)return o;if(r>=n)return s}else{if(r>=a)return o;if(r<=n)return s}else{if(r===a)return o;if(r===n)return s}return(r-a)/l*u+o}function H(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return F(r)?w5(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Qt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),aA),r=(+r).toFixed(e),t?r:+r}function Ie(r){return r.sort(function(e,t){return e-t}),r}function rr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return zy(r)}function zy(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,a=t>0?t:e.length,n=e.indexOf("."),o=n<0?0:a-1-n;return Math.max(0,o-i)}function Fl(r,e){var t=Math.log,i=Math.LN10,a=Math.floor(t(r[1]-r[0])/i),n=Math.round(t(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-a+n,0),20);return isFinite(o)?o:20}function nA(r,e,t){if(!r[e])return 0;var i=Ry(r,t);return i[e]||0}function Ry(r,e){var t=$e(r,function(h,v){return h+(isNaN(v)?0:v)},0);if(t===0)return[];for(var i=Math.pow(10,e),a=k(r,function(h){return(isNaN(h)?0:h)/t*i*100}),n=i*100,o=k(a,function(h){return Math.floor(h)}),s=$e(o,function(h,v){return h+v},0),l=k(a,function(h,v){return h-o[v]});su&&(u=l[p],f=p);++o[f],l[f]=0,++s}return k(o,function(h){return h/i})}function oA(r,e){var t=Math.max(rr(r),rr(e)),i=r+e;return t>aA?i:Qt(i,t)}var Bf=9007199254740991;function Ff(r){var e=Math.PI*2;return(r%e+e)%e}function qa(r){return r>-iA&&r=10&&e++,e}function Hl(r,e){var t=Gl(r),i=Math.pow(10,t),a=r/i,n;return e?a<1.5?n=1:a<2.5?n=2:a<4?n=3:a<7?n=5:n=10:a<1?n=1:a<2?n=2:a<3?n=3:a<5?n=5:n=10,r=n*i,t>=-20?+r.toFixed(t<0?-t:0):r}function Wl(r,e){var t=(r.length-1)*e+1,i=Math.floor(t),a=+r[i-1],n=t-i;return n?a+n*(r[i]-a):a}function Gf(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i=0||n&&nt(n,l)<0)){var u=i.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var G5=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],H5=Br(G5),TA=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return H5(this,e,t)},r}();var Uy=new Za(50);function AA(r){if(typeof r=="string"){var e=Uy.get(r);return e&&e.image}else return r}function Zf(r,e,t,i,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var n=Uy.get(r),o={hostEl:t,cb:i,cbPayload:a};return n?(e=n.image,!ql(e)&&n.pending.push(o)):(e=pr.loadImage(r,CA,CA),e.__zrImageSrc=r,Uy.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function CA(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=Or(t,e);return u>s&&(t="",u=0),s=r-u,a.ellipsis=t,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=r,a}function IA(r,e){var t=e.containerWidth,i=e.font,a=e.contentWidth;if(!t)return"";var n=Or(r,i);if(n<=t)return r;for(var o=0;;o++){if(n<=a||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?Z5(r,a,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(r.length*a/n):0;r=r.substr(0,s),n=Or(r,i)}return r===""&&(r=e.placeholder),r}function Z5(r,e,t,i){for(var a=0,n=0,o=r.length;nh&&u){var v=Math.floor(h/s);p=p.slice(0,v)}if(r&&n&&f!=null)for(var d=MA(f,a,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m=0;ms&&Fy(t,r.substring(s,u),e,o),Fy(t,l[2],e,o,l[1]),s=By.lastIndex}sa){b>0?(y.tokens=y.tokens.slice(0,b),m(y,_,x),t.lines=t.lines.slice(0,g+1)):t.lines=t.lines.slice(0,g);break t}var I=T.width,L=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")S.percentWidth=I,f.push(S),S.contentWidth=Or(S.text,D);else{if(L){var P=T.backgroundColor,z=P&&P.image;z&&(z=AA(z),ql(z)&&(S.width=Math.max(S.width,z.width*M/z.height)))}var R=v&&i!=null?i-_:null;R!=null&&R0&&v+i.accumWidth>i.width&&(f=e.split(` -`),u=!0),i.accumWidth=v}else{var d=PA(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=d.accumWidth+h,p=d.linesWidths,f=d.lines}}else f=e.split(` -`);for(var m=0;m=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var K5=$e(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function Q5(r){return j5(r)?!!K5[r]:!0}function PA(r,e,t,i,a){for(var n=[],o=[],s="",l="",u=0,f=0,p=0;pt:a+f+h>t){f?(s||l)&&(v?(s||(s=l,l="",u=0,f=u),n.push(s),o.push(f-u),l+=c,u+=h,s="",f=u):(l&&(s+=l,l="",u=0),n.push(s),o.push(f),s=c,f=h)):v?(n.push(l),o.push(u),l=c,u=h):(n.push(c),o.push(h));continue}f+=h,v?(l+=c,u+=h):(l&&(s+=l,l="",u=0),s+=c)}return!n.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(n.push(s),o.push(f)),n.length===1&&(f+=a),{accumWidth:f,lines:n,linesWidths:o}}var Wy="__zr_style_"+Math.round(Math.random()*10),xa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Qo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};xa[Wy]=!0;var zA=["z","z2","invisible"],$5=["invisible"],J5=function(r){Mt(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var i=ft(t),a=0;a1e-4){s[0]=r-t,s[1]=e-i,l[0]=r+t,l[1]=e+i;return}if(Yh[0]=Zy(a)*t+r,Yh[1]=Yy(a)*i+e,Zh[0]=Zy(n)*t+r,Zh[1]=Yy(n)*i+e,u(s,Yh,Zh),f(l,Yh,Zh),a=a%$o,a<0&&(a=a+$o),n=n%$o,n<0&&(n=n+$o),a>n&&!o?n+=$o:aa&&(Xh[0]=Zy(h)*t+r,Xh[1]=Yy(h)*i+e,u(s,Xh,s),f(l,Xh,l))}var oe={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ts=[],es=[],_a=[],Bn=[],Sa=[],ba=[],qy=Math.min,jy=Math.max,rs=Math.cos,is=Math.sin,ja=Math.abs,$y=Math.PI,Fn=$y*2,Ky=typeof Float32Array<"u",Xf=[];function Qy(r){var e=Math.round(r/$y*1e8)/1e8;return e%2*$y}function qf(r,e){var t=Qy(r[0]);t<0&&(t+=Fn);var i=t-r[0],a=r[1];a+=i,!e&&a-t>=Fn?a=t+Fn:e&&t-a>=Fn?a=t-Fn:!e&&t>a?a=t+(Fn-Qy(t-a)):e&&t0&&(this._ux=ja(i/Wo/e)||0,this._uy=ja(i/Wo/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(oe.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var i=ja(e-this._xi),a=ja(t-this._yi),n=i>this._ux||a>this._uy;if(this.addData(oe.L,e,t),this._ctx&&n&&this._ctx.lineTo(e,t),n)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=i*i+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,i,a,n,o){return this._drawPendingPt(),this.addData(oe.C,e,t,i,a,n,o),this._ctx&&this._ctx.bezierCurveTo(e,t,i,a,n,o),this._xi=n,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,i,a){return this._drawPendingPt(),this.addData(oe.Q,e,t,i,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,a),this._xi=i,this._yi=a,this},r.prototype.arc=function(e,t,i,a,n,o){this._drawPendingPt(),Xf[0]=a,Xf[1]=n,qf(Xf,o),a=Xf[0],n=Xf[1];var s=n-a;return this.addData(oe.A,e,t,i,i,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,i,a,n,o),this._xi=rs(n)*i+e,this._yi=is(n)*i+t,this},r.prototype.arcTo=function(e,t,i,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,a,n),this},r.prototype.rect=function(e,t,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,a),this.addData(oe.R,e,t,i,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(oe.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&Ky&&(this.data=new Float32Array(t));for(var i=0;if.length&&(this._expandData(),f=this.data);for(var p=0;p0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){_a[0]=_a[1]=Sa[0]=Sa[1]=Number.MAX_VALUE,Bn[0]=Bn[1]=ba[0]=ba[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,a=0,n=0,o;for(o=0;oi||ja(x)>a||c===t-1)&&(d=Math.sqrt(y*y+x*x),n=m,o=g);break}case oe.C:{var _=e[c++],b=e[c++],m=e[c++],g=e[c++],S=e[c++],T=e[c++];d=xC(n,o,_,b,m,g,S,T,10),n=S,o=T;break}case oe.Q:{var _=e[c++],b=e[c++],m=e[c++],g=e[c++];d=SC(n,o,_,b,m,g,10),n=m,o=g;break}case oe.A:var C=e[c++],A=e[c++],D=e[c++],M=e[c++],I=e[c++],L=e[c++],P=L+I;c+=1,v&&(s=rs(I)*D+C,l=is(I)*M+A),d=jy(D,M)*qy(Fn,Math.abs(L)),n=rs(P)*D+C,o=is(P)*M+A;break;case oe.R:{s=n=e[c++],l=o=e[c++];var z=e[c++],R=e[c++];d=z*2+R*2;break}case oe.Z:{var y=s-n,x=l-o;d=Math.sqrt(y*y+x*x),n=s,o=l;break}}d>=0&&(u[p++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var i=this.data,a=this._ux,n=this._uy,o=this._len,s,l,u,f,p,c,h=t<1,v,d,m=0,g=0,y,x=0,_,b;if(!(h&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,d=this._pathLen,y=t*d,!y)))t:for(var S=0;S0&&(e.lineTo(_,b),x=0),T){case oe.M:s=u=i[S++],l=f=i[S++],e.moveTo(u,f);break;case oe.L:{p=i[S++],c=i[S++];var A=ja(p-u),D=ja(c-f);if(A>a||D>n){if(h){var M=v[g++];if(m+M>y){var I=(y-m)/M;e.lineTo(u*(1-I)+p*I,f*(1-I)+c*I);break t}m+=M}e.lineTo(p,c),u=p,f=c,x=0}else{var L=A*A+D*D;L>x&&(_=p,b=c,x=L)}break}case oe.C:{var P=i[S++],z=i[S++],R=i[S++],U=i[S++],V=i[S++],B=i[S++];if(h){var M=v[g++];if(m+M>y){var I=(y-m)/M;yi(u,P,R,V,I,ts),yi(f,z,U,B,I,es),e.bezierCurveTo(ts[1],es[1],ts[2],es[2],ts[3],es[3]);break t}m+=M}e.bezierCurveTo(P,z,R,U,V,B),u=V,f=B;break}case oe.Q:{var P=i[S++],z=i[S++],R=i[S++],U=i[S++];if(h){var M=v[g++];if(m+M>y){var I=(y-m)/M;Rn(u,P,R,I,ts),Rn(f,z,U,I,es),e.quadraticCurveTo(ts[1],es[1],ts[2],es[2]);break t}m+=M}e.quadraticCurveTo(P,z,R,U),u=R,f=U;break}case oe.A:var Z=i[S++],Q=i[S++],st=i[S++],ct=i[S++],pt=i[S++],Lt=i[S++],Bt=i[S++],Et=!i[S++],gt=st>ct?st:ct,Pt=ja(st-ct)>.001,Ct=pt+Lt,ut=!1;if(h){var M=v[g++];m+M>y&&(Ct=pt+Lt*(y-m)/M,ut=!0),m+=M}if(Pt&&e.ellipse?e.ellipse(Z,Q,st,ct,Bt,pt,Ct,Et):e.arc(Z,Q,gt,pt,Ct,Et),ut)break t;C&&(s=rs(pt)*st+Z,l=is(pt)*ct+Q),u=rs(Ct)*st+Z,f=is(Ct)*ct+Q;break;case oe.R:s=u=i[S],l=f=i[S+1],p=i[S++],c=i[S++];var At=i[S++],ce=i[S++];if(h){var M=v[g++];if(m+M>y){var Yt=y-m;e.moveTo(p,c),e.lineTo(p+qy(Yt,At),c),Yt-=At,Yt>0&&e.lineTo(p+At,c+qy(Yt,ce)),Yt-=ce,Yt>0&&e.lineTo(p+jy(At-Yt,0),c+ce),Yt-=At,Yt>0&&e.lineTo(p,c+jy(ce-Yt,0));break t}m+=M}e.rect(p,c,At,ce);break;case oe.Z:if(h){var M=v[g++];if(m+M>y){var I=(y-m)/M;e.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}m+=M}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=oe,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}(),Ye=eG;function wa(r,e,t,i,a,n,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>i+s||or+s&&n>t+s||ne+p&&f>i+p&&f>n+p&&f>s+p||fr+p&&u>t+p&&u>a+p&&u>o+p||ue+u&&l>i+u&&l>n+u||lr+u&&s>t+u&&s>a+u||st||f+ua&&(a+=jf);var c=Math.atan2(l,s);return c<0&&(c+=jf),c>=i&&c<=a||c+jf>=i&&c+jf<=a}function bi(r,e,t,i,a,n){if(n>e&&n>i||na?s:0}var Gn=Ye.CMD,as=Math.PI*2,aG=1e-4;function nG(r,e){return Math.abs(r-e)e&&u>i&&u>n&&u>s||u1&&oG(),h=ye(e,i,n,s,wi[0]),c>1&&(v=ye(e,i,n,s,wi[1]))),c===2?me&&s>i&&s>n||s=0&&u<=1){for(var f=0,p=Se(e,i,n,u),c=0;ct||s<-t)return 0;var l=Math.sqrt(t*t-s*s);xr[0]=-l,xr[1]=l;var u=Math.abs(i-a);if(u<1e-4)return 0;if(u>=as-1e-4){i=0,a=as;var f=n?1:-1;return o>=xr[0]+r&&o<=xr[1]+r?f:0}if(i>a){var p=i;i=a,a=p}i<0&&(i+=as,a+=as);for(var c=0,h=0;h<2;h++){var v=xr[h];if(v+r>o){var d=Math.atan2(s,v),f=n?1:-1;d<0&&(d=as+d),(d>=i&&d<=a||d+as>=i&&d+as<=a)&&(d>Math.PI/2&&d1&&(t||(s+=bi(l,u,f,p,i,a))),m&&(l=n[v],u=n[v+1],f=l,p=u),d){case Gn.M:f=n[v++],p=n[v++],l=f,u=p;break;case Gn.L:if(t){if(wa(l,u,n[v],n[v+1],e,i,a))return!0}else s+=bi(l,u,n[v],n[v+1],i,a)||0;l=n[v++],u=n[v++];break;case Gn.C:if(t){if(FA(l,u,n[v++],n[v++],n[v++],n[v++],n[v],n[v+1],e,i,a))return!0}else s+=sG(l,u,n[v++],n[v++],n[v++],n[v++],n[v],n[v+1],i,a)||0;l=n[v++],u=n[v++];break;case Gn.Q:if(t){if(qh(l,u,n[v++],n[v++],n[v],n[v+1],e,i,a))return!0}else s+=lG(l,u,n[v++],n[v++],n[v],n[v+1],i,a)||0;l=n[v++],u=n[v++];break;case Gn.A:var g=n[v++],y=n[v++],x=n[v++],_=n[v++],b=n[v++],S=n[v++];v+=1;var T=!!(1-n[v++]);c=Math.cos(b)*x+g,h=Math.sin(b)*_+y,m?(f=c,p=h):s+=bi(l,u,c,h,i,a);var C=(i-g)*_/x+g;if(t){if(WA(g,y,_,b,b+S,T,e,C,a))return!0}else s+=uG(g,y,_,b,b+S,T,C,a);l=Math.cos(b+S)*x+g,u=Math.sin(b+S)*_+y;break;case Gn.R:f=l=n[v++],p=u=n[v++];var A=n[v++],D=n[v++];if(c=f+A,h=p+D,t){if(wa(f,p,c,p,e,i,a)||wa(c,p,c,h,e,i,a)||wa(c,h,f,h,e,i,a)||wa(f,h,f,p,e,i,a))return!0}else s+=bi(c,p,c,h,i,a),s+=bi(f,h,f,p,i,a);break;case Gn.Z:if(t){if(wa(l,u,f,p,e,i,a))return!0}else s+=bi(l,u,f,p,i,a);l=f,u=p;break}}return!t&&!nG(u,p)&&(s+=bi(l,u,f,p,i,a)||0),s!==0}function ZA(r,e,t){return YA(r,0,!1,e,t)}function XA(r,e,t,i){return YA(r,e,!0,t,i)}var jl=q({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},xa),pG={style:q({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Qo.style)},Jy=ii.concat(["invisible","culling","z","z2","zlevel","parent"]),cG=function(r){Mt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var n=a.style;for(var o in i)n[o]!==i[o]&&(n[o]=i[o]);n.fill=i.fill?i.decal:null,n.decal=null,n.shadowColor=null,i.strokeFirst&&(n.stroke=null);for(var s=0;s.5?Vf:i>.2?ZC:Uf}else if(t)return Uf}return Vf},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(F(i)){var a=this.__zr,n=!!(a&&a.isDarkMode()),o=Ol(t,0)0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,a=!t;if(a){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&En)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,i){var a=this.transformCoordToLocal(t,i),n=this.getBoundingRect(),o=this.style;if(t=a[0],i=a[1],n.contain(t,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),XA(s,l/u,t,i)))return!0}if(this.hasFill())return ZA(s,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=En,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,i){t==="shape"?this.setShape(i):r.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=i:N(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&En)},e.prototype.createStyle=function(t){return In(jl,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=N({},this.shape))},e.prototype._applyStateObj=function(t,i,a,n,o,s){r.prototype._applyStateObj.call(this,t,i,a,n,o,s);var l=!(i&&n),u;if(i&&i.shape?o?n?u=i.shape:(u=N({},a.shape),N(u,i.shape)):(u=N({},n?this.shape:a.shape),N(u,i.shape)):l&&(u=a.shape),u)if(o){this.shape=N({},this.shape);for(var f={},p=ft(u),c=0;c0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return In(hG,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var a=ya(i,t.font,t.textAlign,t.textBaseline);if(a.x+=t.x||0,a.y+=t.y||0,this.hasStroke()){var n=t.lineWidth;a.x-=n/2,a.y-=n/2,a.width+=n,a.height+=n}this._rect=a}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(be);qA.prototype.type="tspan";var Ka=qA;var vG=q({x:0,y:0},xa),dG={style:q({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Qo.style)};function mG(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var jA=function(r){Mt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return In(vG,t)},e.prototype._getSize=function(t){var i=this.style,a=i[t];if(a!=null)return a;var n=mG(i.image)?i.image:this.__image;if(!n)return 0;var o=t==="width"?"height":"width",s=i[o];return s==null?n[t]:n[t]/n[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return dG},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new rt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(be);jA.prototype.type="image";var re=jA;function KA(r,e){var t=e.x,i=e.y,a=e.width,n=e.height,o=e.r,s,l,u,f;a<0&&(t=t+a,a=-a),n<0&&(i=i+n,n=-n),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var p;s+l>a&&(p=s+l,s*=a/p,l*=a/p),u+f>a&&(p=u+f,u*=a/p,f*=a/p),l+u>n&&(p=l+u,l*=n/p,u*=n/p),s+f>n&&(p=s+f,s*=n/p,f*=n/p),r.moveTo(t+s,i),r.lineTo(t+a-l,i),l!==0&&r.arc(t+a-l,i+l,l,-Math.PI/2,0),r.lineTo(t+a,i+n-u),u!==0&&r.arc(t+a-u,i+n-u,u,0,Math.PI/2),r.lineTo(t+f,i+n),f!==0&&r.arc(t+f,i+n-f,f,Math.PI/2,Math.PI),r.lineTo(t,i+s),s!==0&&r.arc(t+s,i+s,s,Math.PI,Math.PI*1.5)}var Kl=Math.round;function jh(r,e,t){if(e){var i=e.x1,a=e.x2,n=e.y1,o=e.y2;r.x1=i,r.x2=a,r.y1=n,r.y2=o;var s=t&&t.lineWidth;return s&&(Kl(i*2)===Kl(a*2)&&(r.x1=r.x2=Hn(i,s,!0)),Kl(n*2)===Kl(o*2)&&(r.y1=r.y2=Hn(n,s,!0))),r}}function Kh(r,e,t){if(e){var i=e.x,a=e.y,n=e.width,o=e.height;r.x=i,r.y=a,r.width=n,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Hn(i,s,!0),r.y=Hn(a,s,!0),r.width=Math.max(Hn(i+n,s,!1)-r.x,n===0?0:1),r.height=Math.max(Hn(a+o,s,!1)-r.y,o===0?0:1)),r}}function Hn(r,e,t){if(!e)return r;var i=Kl(r*2);return(i+Kl(e))%2===0?i/2:(i+(t?1:-1))/2}var xG=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}();var _G={},QA=function(r){Mt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new xG},e.prototype.buildPath=function(t,i){var a,n,o,s;if(this.subPixelOptimize){var l=Kh(_G,i,this.style);a=l.x,n=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else a=i.x,n=i.y,o=i.width,s=i.height;i.r?KA(t,i):t.rect(a,n,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(it);QA.prototype.type="rect";var ht=QA;var $A={fill:"#000"},JA=2,SG={style:q({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Qo.style)},sD=function(r){Mt(e,r);function e(t){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=$A,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,I=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),L=o.calculatedLineHeight,P=0;P=0&&(P=S[L],P.align==="right");)this._placeToken(P,t,C,g,I,"right",x),A-=P.width,I-=P.width,L--;for(M+=(n-(M-m)-(y-I)-A)/2;D<=L;)P=S[D],this._placeToken(P,t,C,g,M+P.width/2,"center",x),M+=P.width,D++;g+=C}},e.prototype._placeToken=function(t,i,a,n,o,s,l){var u=i.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,p=n+a/2;f==="top"?p=n+t.height/2:f==="bottom"&&(p=n+a-t.height/2);var c=!t.isLineHolder&&t0(u);c&&this._renderBackground(u,i,s==="right"?o-t.width:s==="center"?o-t.width/2:o,p-t.height/2,t.width,t.height);var h=!!u.backgroundColor,v=t.textPadding;v&&(o=nD(o,s,v),p-=t.height/2-v[0]-t.innerHeight/2);var d=this._getOrCreateChild(Ka),m=d.createStyle();d.useStyle(m);var g=this._defaultStyle,y=!1,x=0,_=aD("fill"in u?u.fill:"fill"in i?i.fill:(y=!0,g.fill)),b=iD("stroke"in u?u.stroke:"stroke"in i?i.stroke:!h&&!l&&(!g.autoStroke||y)?(x=JA,g.stroke):null),S=u.textShadowBlur>0||i.textShadowBlur>0;m.text=t.text,m.x=o,m.y=p,S&&(m.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,m.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=t.font||Jr,m.opacity=Be(u.opacity,i.opacity,1),eD(m,u),b&&(m.lineWidth=Be(u.lineWidth,i.lineWidth,x),m.lineDash=at(u.lineDash,i.lineDash),m.lineDashOffset=i.lineDashOffset||0,m.stroke=b),_&&(m.fill=_);var T=t.contentWidth,C=t.contentHeight;d.setBoundingRect(new rt(Vl(m.x,T,m.textAlign),Xo(m.y,C,m.textBaseline),T,C))},e.prototype._renderBackground=function(t,i,a,n,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,p=l&&l.image,c=l&&!p,h=t.borderRadius,v=this,d,m;if(c||t.lineHeight||u&&f){d=this._getOrCreateChild(ht),d.useStyle(d.createStyle()),d.style.fill=null;var g=d.shape;g.x=a,g.y=n,g.width=o,g.height=s,g.r=h,d.dirtyShape()}if(c){var y=d.style;y.fill=l||null,y.fillOpacity=at(t.fillOpacity,1)}else if(p){m=this._getOrCreateChild(re),m.onload=function(){v.dirtyStyle()};var x=m.style;x.image=l.image,x.x=a,x.y=n,x.width=o,x.height=s}if(u&&f){var y=d.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=at(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(d||m).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=Be(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return r0(t)&&(i=[t.fontStyle,t.fontWeight,e0(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&Fe(i)||t.textFont||t.font},e}(be),bG={left:!0,right:1,center:1},wG={top:1,bottom:1,middle:1},tD=["fontStyle","fontWeight","fontSize","fontFamily"];function e0(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?$c+"px":r+"px"}function eD(r,e){for(var t=0;t=0,n=!1;if(r instanceof it){var o=vD(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Ql(s)||Ql(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(n=!0,i=N({},i),u=N({},u),u.fill=s):!Ql(u.fill)&&Ql(s)?(n=!0,i=N({},i),u=N({},u),u.fill=Ef(s)):!Ql(u.stroke)&&Ql(l)&&(n||(i=N({},i),u=N({},u)),u.stroke=Ef(l)),i.style=u}}if(i&&i.z2==null){n||(i=N({},i));var f=r.z2EmphasisLift;i.z2=r.z2+(f??Qa)}return i}function LG(r,e,t){if(t&&t.z2==null){t=N({},t);var i=r.z2SelectLift;t.z2=r.z2+(i??CG)}return t}function EG(r,e,t){var i=nt(r.currentStates,e)>=0,a=r.style.opacity,n=i?null:MG(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=N({},t),o=N({opacity:i?a:n.opacity*.1},o),t.style=o),t}function i0(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return IG(this,r,e,t);if(r==="blur")return EG(this,r,t);if(r==="select")return LG(this,r,t)}return t}function Yi(r){r.stateProxy=i0;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=i0),t&&(t.stateProxy=i0)}function pD(r,e){!yD(r,e)&&!r.__highByOuter&&$a(r,dD)}function cD(r,e){!yD(r,e)&&!r.__highByOuter&&$a(r,mD)}function cr(r,e){r.__highByOuter|=1<<(e||0),$a(r,dD)}function hr(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&$a(r,mD)}function Jh(r){$a(r,s0)}function tp(r){$a(r,gD)}function l0(r){$a(r,AG)}function u0(r){$a(r,DG)}function yD(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function f0(r){var e=r.getModel(),t=[],i=[];e.eachComponent(function(a,n){var o=n0(n),s=a==="series",l=s?r.getViewOfSeriesModel(n):r.getViewOfComponentModel(n);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){gD(u)}),s&&t.push(n)),o.isBlured=!1}),w(i,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function a0(r,e,t,i){var a=i.getModel();t=t||"coordinateSystem";function n(u,f){for(var p=0;p0){var l={dataIndex:s,seriesIndex:t.seriesIndex};o!=null&&(l.dataType=o),e.push(l)}})}),e}function Ta(r,e,t){Ja(r,!0),$a(r,Yi),ev(r,e,t)}function PG(r){Ja(r,!1)}function Vt(r,e,t,i){i?PG(r):Ta(r,e,t)}function ev(r,e,t){var i=tt(r);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}var hD=["emphasis","blur","select"],zG={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function se(r,e,t,i){t=t||"itemStyle";for(var a=0;anp,BezierCurve:()=>us,BoundingRect:()=>rt,Circle:()=>_r,CompoundPath:()=>iu,Ellipse:()=>rp,Group:()=>K,Image:()=>re,IncrementalDisplayable:()=>KD,Line:()=>fe,LinearGradient:()=>Aa,OrientedBoundingRect:()=>au,Path:()=>it,Point:()=>bt,Polygon:()=>he,Polyline:()=>pe,RadialGradient:()=>fv,Rect:()=>ht,Ring:()=>ls,Sector:()=>we,Text:()=>yt,applyTransform:()=>nr,clipPointsByRect:()=>S0,clipRectByRect:()=>c3,createIcon:()=>nn,extendPath:()=>u3,extendShape:()=>s3,getShapeClass:()=>op,getTransform:()=>qi,groupTransition:()=>an,initProps:()=>Ut,isElementRemoved:()=>tn,lineLineIntersect:()=>aM,linePolygonIntersect:()=>ou,makeImage:()=>_0,makePath:()=>nu,mergePath:()=>dr,registerShape:()=>Xi,removeElement:()=>Ti,removeElementWithFadeOut:()=>en,resizePath:()=>iM,setTooltipConfig:()=>ji,subPixelOptimize:()=>sp,subPixelOptimizeLine:()=>rn,subPixelOptimizeRect:()=>f3,transformDirection:()=>cs,traverseElements:()=>Sr,updateProps:()=>_t});var tu=Ye.CMD,RG=[[],[],[]],DD=Math.sqrt,NG=Math.atan2;function iv(r,e){if(e){var t=r.data,i=r.len(),a,n,o,s,l,u,f=tu.M,p=tu.C,c=tu.L,h=tu.R,v=tu.A,d=tu.Q;for(o=0,s=0;o1&&(o*=h0(v),s*=h0(v));var d=(a===n?-1:1)*h0((o*o*(s*s)-o*o*(h*h)-s*s*(c*c))/(o*o*(h*h)+s*s*(c*c)))||0,m=d*o*h/s,g=d*-s*c/o,y=(r+t)/2+nv(p)*m-av(p)*g,x=(e+i)/2+av(p)*m+nv(p)*g,_=ID([1,0],[(c-m)/o,(h-g)/s]),b=[(c-m)/o,(h-g)/s],S=[(-1*c-m)/o,(-1*h-g)/s],T=ID(b,S);if(v0(b,S)<=-1&&(T=ep),v0(b,S)>=1&&(T=0),T<0){var C=Math.round(T/ep*1e6)/1e6;T=ep*2+C%2*ep}f.addData(u,y,x,o,s,_,T,p,n)}var OG=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,kG=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function VG(r){var e=new Ye;if(!r)return e;var t=0,i=0,a=t,n=i,o,s=Ye.CMD,l=r.match(OG);if(!l)return e;for(var u=0;uP*P+z*z&&(C=D,A=M),{cx:C,cy:A,x0:-f,y0:-p,x1:C*(a/b-1),y1:A*(a/b-1)}}function WG(r){var e;if(O(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function BD(r,e){var t,i=ip(e.r,0),a=ip(e.r0||0,0),n=i>0,o=a>0;if(!(!n&&!o)){if(n||(i=a,a=0),a>i){var s=i;i=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,p=e.cy,c=!!e.clockwise,h=VD(u-l),v=h>d0&&h%d0;if(v>Zi&&(h=v),!(i>Zi))r.moveTo(f,p);else if(h>d0-Zi)r.moveTo(f+i*ru(l),p+i*ss(l)),r.arc(f,p,i,l,u,!c),a>Zi&&(r.moveTo(f+a*ru(u),p+a*ss(u)),r.arc(f,p,a,u,l,c));else{var d=void 0,m=void 0,g=void 0,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0,T=void 0,C=void 0,A=void 0,D=void 0,M=void 0,I=void 0,L=void 0,P=void 0,z=i*ru(l),R=i*ss(l),U=a*ru(u),V=a*ss(u),B=h>Zi;if(B){var Z=e.cornerRadius;Z&&(t=WG(Z),d=t[0],m=t[1],g=t[2],y=t[3]);var Q=VD(i-a)/2;if(x=Ca(Q,g),_=Ca(Q,y),b=Ca(Q,d),S=Ca(Q,m),A=T=ip(x,_),D=C=ip(b,S),(T>Zi||C>Zi)&&(M=i*ru(u),I=i*ss(u),L=a*ru(l),P=a*ss(l),hZi){var Pt=Ca(g,A),Ct=Ca(y,A),ut=sv(L,P,z,R,i,Pt,c),At=sv(M,I,U,V,i,Ct,c);r.moveTo(f+ut.cx+ut.x0,p+ut.cy+ut.y0),A0&&r.arc(f+ut.cx,p+ut.cy,Pt,vr(ut.y0,ut.x0),vr(ut.y1,ut.x1),!c),r.arc(f,p,i,vr(ut.cy+ut.y1,ut.cx+ut.x1),vr(At.cy+At.y1,At.cx+At.x1),!c),Ct>0&&r.arc(f+At.cx,p+At.cy,Ct,vr(At.y1,At.x1),vr(At.y0,At.x0),!c))}else r.moveTo(f+z,p+R),r.arc(f,p,i,l,u,!c);if(!(a>Zi)||!B)r.lineTo(f+U,p+V);else if(D>Zi){var Pt=Ca(d,D),Ct=Ca(m,D),ut=sv(U,V,M,I,a,-Ct,c),At=sv(z,R,L,P,a,-Pt,c);r.lineTo(f+ut.cx+ut.x0,p+ut.cy+ut.y0),D0&&r.arc(f+ut.cx,p+ut.cy,Ct,vr(ut.y0,ut.x0),vr(ut.y1,ut.x1),!c),r.arc(f,p,a,vr(ut.cy+ut.y1,ut.cx+ut.x1),vr(At.cy+At.y1,At.cx+At.x1),c),Pt>0&&r.arc(f+At.cx,p+At.cy,Pt,vr(At.y1,At.x1),vr(At.y0,At.x0),!c))}else r.lineTo(f+U,p+V),r.arc(f,p,a,u,l,c)}r.closePath()}}}var ZG=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}();var FD=function(r){Mt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new ZG},e.prototype.buildPath=function(t,i){BD(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(it);FD.prototype.type="sector";var we=FD;var XG=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}();var GD=function(r){Mt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new XG},e.prototype.buildPath=function(t,i){var a=i.cx,n=i.cy,o=Math.PI*2;t.moveTo(a+i.r,n),t.arc(a,n,i.r,0,o,!1),t.moveTo(a+i.r0,n),t.arc(a,n,i.r0,0,o,!0)},e}(it);GD.prototype.type="ring";var ls=GD;function m0(r,e,t,i){var a=[],n=[],o=[],s=[],l,u,f,p;if(i){f=[1/0,1/0],p=[-1/0,-1/0];for(var c=0,h=r.length;c=2){if(i){var n=m0(a,i,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=n[s*2],u=n[s*2+1],f=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,p=a.length;sps[1]){if(s=!1,n)return s;var f=Math.abs(ps[0]-fs[1]),p=Math.abs(fs[0]-ps[1]);Math.min(f,p)>a.len()&&(f0){var p=f.duration,c=f.delay,h=f.easing,v={duration:p,delay:c||0,easing:h,done:n,force:!!n||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,v):e.animateTo(t,v)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),n&&n()}function _t(r,e,t,i,a,n){g0("update",r,e,t,i,a,n)}function Ut(r,e,t,i,a,n){g0("enter",r,e,t,i,a,n)}function tn(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function tM(r){return!r.isGroup}function p3(r){return r.shape!=null}function an(r,e,t){if(!r||!e)return;function i(o){var s={};return o.traverse(function(l){tM(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return p3(o)&&(s.shape=N({},o.shape)),s}var n=i(r);e.traverse(function(o){if(tM(o)&&o.anid){var s=n[o.anid];if(s){var l=a(o);o.attr(a(s)),_t(o,l,t,tt(o).dataIndex)}}})}function S0(r,e){return k(r,function(t){var i=t[0];i=hv(i,e.x),i=vv(i,e.x+e.width);var a=t[1];return a=hv(a,e.y),a=vv(a,e.y+e.height),[i,a]})}function c3(r,e){var t=hv(r.x,e.x),i=vv(r.x+r.width,e.x+e.width),a=hv(r.y,e.y),n=vv(r.y+r.height,e.y+e.height);if(i>=t&&n>=a)return{x:t,y:a,width:i-t,height:n-a}}function nn(r,e,t){var i=N({rectHover:!0},e),a=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),q(a,t),new re(i)):nu(r.replace("path://",""),i,t,"center")}function ou(r,e,t,i,a){for(var n=0,o=a[a.length-1];n1)return!1;var m=y0(h,v,f,p)/c;return!(m<0||m>1)}function y0(r,e,t,i){return r*i-t*e}function h3(r){return r<=1e-6&&r>=-1e-6}function ji(r){var e=r.itemTooltipOption,t=r.componentModel,i=r.itemName,a=F(e)?{formatter:e}:e,n=t.mainType,o=t.componentIndex,s={componentType:n,name:i,$vars:["name"]};s[n+"Index"]=o;var l=r.formatterParamsExtra;l&&w(ft(l),function(f){J(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=tt(r.el);u.componentMainType=n,u.componentIndex=o,u.tooltipConfig={name:i,option:q({content:i,formatterParams:s},a)}}function eM(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Sr(r,e){if(r)if(O(r))for(var t=0;t=0&&s.push(l)}),s}}function mr(r,e){return lt(lt({},r,!0),e,!0)}var dM={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}};var mM={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var xv="ZH",M0="EN",lu=M0,yv={},I0={},_v=Tt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||lu).toUpperCase();return r.indexOf(xv)>-1?xv:lu}():lu;function gM(r,e){r=r.toUpperCase(),I0[r]=new zt(e),yv[r]=e}function yM(r){if(F(r)){var e=yv[r.toUpperCase()]||{};return r===xv||r===M0?$(e):lt($(e),$(yv[lu]),!1)}else return lt($(r),$(yv[lu]),!1)}function up(r){return I0[r]}function xM(){return I0[lu]}gM(M0,dM);gM(xv,mM);var bv=1e3,wv=bv*60,fu=wv*60,ni=fu*24,E0=ni*365,fp={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Sv="{yyyy}-{MM}-{dd}",P0={year:"{yyyy}",month:"{yyyy}-{MM}",day:Sv,hour:Sv+" "+fp.hour,minute:Sv+" "+fp.minute,second:Sv+" "+fp.second,millisecond:fp.none},L0=["year","month","day","hour","minute","second","millisecond"],z0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function sn(r,e){return r+="","0000".substr(0,e-r.length)+r}function ds(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function _M(r){return r===ds(r)}function SM(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ms(r,e,t,i){var a=ir(r),n=a[Tv(t)](),o=a[vs(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[pp(t)](),u=a["get"+(t?"UTC":"")+"Day"](),f=a[uu(t)](),p=(f-1)%12+1,c=a[cp(t)](),h=a[hp(t)](),v=a[vp(t)](),d=i instanceof zt?i:up(i||_v)||xM(),m=d.getModel("time"),g=m.get("month"),y=m.get("monthAbbr"),x=m.get("dayOfWeek"),_=m.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,n+"").replace(/{yy}/g,sn(n%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,g[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,sn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,sn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,sn(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,sn(p+"",2)).replace(/{h}/g,p+"").replace(/{mm}/g,sn(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,sn(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,sn(v,3)).replace(/{S}/g,v+"")}function bM(r,e,t,i,a){var n=null;if(F(t))n=t;else if(X(t))n=t(r.value,e,{level:r.level});else{var o=N({},fp);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){n=l[u];break}n=n||o.none}if(O(n)){var p=r.level==null?0:r.level>=0?r.level:n.length+r.level;p=Math.min(p,n.length-1),n=n[p]}}return ms(new Date(r.value),n,a,i)}function wM(r,e){var t=ir(r),i=t[vs(e)]()+1,a=t[pp(e)](),n=t[uu(e)](),o=t[cp(e)](),s=t[hp(e)](),l=t[vp(e)](),u=l===0,f=u&&s===0,p=f&&o===0,c=p&&n===0,h=c&&a===1,v=h&&i===1;return v?"year":h?"month":c?"day":p?"hour":f?"minute":u?"second":"millisecond"}function R0(r,e,t){var i=vt(r)?ir(r):r;switch(e=e||wM(r,t),e){case"year":return i[Tv(t)]();case"half-year":return i[vs(t)]()>=6?1:0;case"quarter":return Math.floor((i[vs(t)]()+1)/4);case"month":return i[vs(t)]();case"day":return i[pp(t)]();case"half-day":return i[uu(t)]()/24;case"hour":return i[uu(t)]();case"minute":return i[cp(t)]();case"second":return i[hp(t)]();case"millisecond":return i[vp(t)]()}}function Tv(r){return r?"getUTCFullYear":"getFullYear"}function vs(r){return r?"getUTCMonth":"getMonth"}function pp(r){return r?"getUTCDate":"getDate"}function uu(r){return r?"getUTCHours":"getHours"}function cp(r){return r?"getUTCMinutes":"getMinutes"}function hp(r){return r?"getUTCSeconds":"getSeconds"}function vp(r){return r?"getUTCMilliseconds":"getMilliseconds"}function TM(r){return r?"setUTCFullYear":"setFullYear"}function N0(r){return r?"setUTCMonth":"setMonth"}function O0(r){return r?"setUTCDate":"setDate"}function k0(r){return r?"setUTCHours":"setHours"}function V0(r){return r?"setUTCMinutes":"setMinutes"}function U0(r){return r?"setUTCSeconds":"setSeconds"}function B0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function G0(r){if(!jo(r))return F(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Cv(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ki=Al;function Av(r,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&Fe(f)?f:"-"}function n(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?ir(r):r;if(isNaN(+l)){if(s)return"-"}else return ms(l,i,t)}if(e==="ordinal")return xf(r)?a(r):vt(r)&&n(r)?r+"":"-";var u=kr(r);return n(u)?G0(u):xf(r)?a(r):typeof r=="boolean"?r+"":"-"}var CM=["a","b","c","d","e","f","g"],F0=function(r,e){return"{"+r+(e??"")+"}"};function Dv(r,e,t){O(e)||(e=[e]);var i=e.length;if(!i)return"";for(var a=e[0].$vars||[],n=0;n':'';var o=t.markerId||"markerX";return{renderMode:n,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Qi(r,e){return e=e||"transparent",F(r)?r:j(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function gs(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Mv=w,H0=["left","right","top","bottom","width","height"],ys=[["width","left","right"],["height","top","bottom"]];function W0(r,e,t,i,a){var n=0,o=0;i==null&&(i=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),p=e.childAt(u+1),c=p&&p.getBoundingRect(),h,v;if(r==="horizontal"){var d=f.width+(c?-c.x+f.x:0);h=n+d,h>i||l.newline?(n=0,h=d,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(c?-c.y+f.y:0);v=o+m,v>a||l.newline?(n+=s+t,o=0,v=m,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=n,l.y=o,l.markRedraw(),r==="horizontal"?n=h+t:o=v+t)})}var $i=W0,Rat=et(W0,"vertical"),Nat=et(W0,"horizontal");function MM(r,e,t){var i=e.width,a=e.height,n=H(r.left,i),o=H(r.top,a),s=H(r.right,i),l=H(r.bottom,a);return(isNaN(n)||isNaN(parseFloat(r.left)))&&(n=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=a),t=Ki(t||0),{width:Math.max(s-n-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function Zt(r,e,t){t=Ki(t||0);var i=e.width,a=e.height,n=H(r.left,i),o=H(r.top,a),s=H(r.right,i),l=H(r.bottom,a),u=H(r.width,i),f=H(r.height,a),p=t[2]+t[0],c=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=i-s-c-n),isNaN(f)&&(f=a-l-p-o),h!=null&&(isNaN(u)&&isNaN(f)&&(h>i/a?u=i*.8:f=a*.8),isNaN(u)&&(u=h*f),isNaN(f)&&(f=u/h)),isNaN(n)&&(n=i-s-u-c),isNaN(o)&&(o=a-l-f-p),r.left||r.right){case"center":n=i/2-u/2-t[3];break;case"right":n=i-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-t[0];break;case"bottom":o=a-f-p;break}n=n||0,o=o||0,isNaN(u)&&(u=i-c-n-(s||0)),isNaN(f)&&(f=a-p-o-(l||0));var v=new rt(n+t[3],o+t[0],u,f);return v.margin=t,v}function Xn(r,e,t,i,a,n){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(n=n||r,n.x=r.x,n.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new rt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var p=Zt(q({width:u.width,height:u.height},e),t,i),c=o?p.x-u.x:0,h=s?p.y-u.y:0;return l==="raw"?(n.x=c,n.y=h):(n.x+=c,n.y+=h),n===r&&r.markRedraw(),!0}function IM(r,e){return r[ys[e][0]]!=null||r[ys[e][1]]!=null&&r[ys[e][2]]!=null}function qn(r){var e=r.layoutMode||r.constructor.layoutMode;return j(e)?e:e?{type:e}:null}function Wr(r,e,t){var i=t&&t.ignoreSize;!O(i)&&(i=[i,i]);var a=o(ys[0],0),n=o(ys[1],1);u(ys[0],r,a),u(ys[1],r,n);function o(f,p){var c={},h=0,v={},d=0,m=2;if(Mv(f,function(x){v[x]=r[x]}),Mv(f,function(x){s(e,x)&&(c[x]=v[x]=e[x]),l(c,x)&&h++,l(v,x)&&d++}),i[p])return l(e,f[1])?v[f[2]]=null:l(e,f[2])&&(v[f[1]]=null),v;if(d===m||!h)return v;if(h>=m)return c;for(var g=0;g=0;l--)s=lt(s,a[l],!0);i.defaultOption=s}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var a=t+"Index",n=t+"Id";return Vn(this.ecModel,t,{index:this.get(a,!0),id:this.get(n,!0)},i)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(zt);Wh(pu,zt);Un(pu);hM(pu);vM(pu,w3);function w3(r){var e=[];return w(pu.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=k(e,function(t){return Ur(t).main}),r!=="dataset"&&nt(e,"dataset")<=0&&e.unshift("dataset"),e}var xt=pu;var LM="";typeof navigator<"u"&&(LM=navigator.platform||"");var cu="rgba(0, 0, 0, 0.2)",EM={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:cu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:cu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:cu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:cu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:cu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:cu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:LM.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Iv=Y(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),je="original",Le="arrayRows",sr="objectRows",oi="keyedColumns",si="typedArray",Z0="unknown",Yr="column",ln="row";var Ze={Must:1,Might:2,Not:3},PM=ot();function zM(r){PM(r).datasetMap=Y()}function Lv(r,e,t){var i={},a=Ev(e);if(!a||!r)return i;var n=[],o=[],s=e.ecModel,l=PM(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,f,p;r=r.slice(),w(r,function(d,m){var g=j(d)?d:r[m]={name:d};g.type==="ordinal"&&f==null&&(f=m,p=v(g)),i[g.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:p,valueWayDim:0});w(r,function(d,m){var g=d.name,y=v(d);if(f==null){var x=c.valueWayDim;h(i[g],x,y),h(o,x,y),c.valueWayDim+=y}else if(f===m)h(i[g],0,y),h(n,0,y);else{var x=c.categoryWayDim;h(i[g],x,y),h(o,x,y),c.categoryWayDim+=y}});function h(d,m,g){for(var y=0;ye)return r[i];return r[t-1]}function UM(r,e,t,i,a,n,o){n=n||r;var s=e(n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!i?t:C3(i,o);if(f=f||t,!(!f||!f.length)){var p=f[l];return a&&(u[a]=p),s.paletteIdx=(l+1)%f.length,p}}function A3(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var zv,yp,BM,FM="\0_ec_inner",D3=1;var YM=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,i,a,n,o,s){n=n||{},this.option=null,this._theme=new zt(n),this._locale=new zt(o),this._optionManager=s},e.prototype.setOption=function(t,i,a){var n=WM(i);this._optionManager.setOption(t,a,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,i){return this._resetOption(t,WM(i))},e.prototype._resetOption=function(t,i){var a=!1,n=this._optionManager;if(!t||t==="recreate"){var o=n.mountOption(t==="recreate");!this.option||t==="recreate"?BM(this,o):(this.restoreData(),this._mergeOption(o,i)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=n.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,i))}if(!t||t==="recreate"||t==="media"){var l=n.getMediaOption(this);l.length&&w(l,function(u){a=!0,this._mergeOption(u,i)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var a=this.option,n=this._componentsMap,o=this._componentsCount,s=[],l=Y(),u=i&&i.replaceMergeMainTypeMap;zM(this),w(t,function(p,c){p!=null&&(xt.hasClass(c)?c&&(s.push(c),l.set(c,!0)):a[c]=a[c]==null?$(p):lt(a[c],p,!0))}),u&&u.each(function(p,c){xt.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),xt.topologicalTravel(s,xt.getAllClassMainTypes(),f,this);function f(p){var c=kM(this,p,Nt(t[p])),h=n.get(p),v=h?u&&u.get(p)?"replaceMerge":"normalMerge":"replaceAll",d=Gh(h,c,v);mA(d,p,xt),a[p]=null,n.set(p,null),o.set(p,0);var m=[],g=[],y=0,x,_;w(d,function(b,S){var T=b.existing,C=b.newOption;if(!C)T&&(T.mergeOption({},this),T.optionUpdated({},!1));else{var A=p==="series",D=xt.getClass(p,b.keyInfo.subType,!A);if(!D){if(0)var M,I;return}if(p==="tooltip"){if(x)return;x=!0}if(T&&T.constructor===D)T.name=b.keyInfo.name,T.mergeOption(C,this),T.optionUpdated(C,!1);else{var L=N({componentIndex:S},b.keyInfo);T=new D(C,this,this,L),N(T,L),b.brandNew&&(T.__requireNewView=!0),T.init(C,this,this),T.optionUpdated(null,!0)}}T?(m.push(T.option),g.push(T),y++):(m.push(void 0),g.push(void 0))},this),a[p]=m,n.set(p,g),o.set(p,y),p==="series"&&zv(this)}this._seriesIndices||zv(this)},e.prototype.getOption=function(){var t=$(this.option);return w(t,function(i,a){if(xt.hasClass(a)){for(var n=Nt(i),o=n.length,s=!1,l=o-1;l>=0;l--)n[l]&&!Yl(n[l])?s=!0:(n[l]=null,!s&&o--);n.length=o,t[a]=n}}),delete t[FM],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,i){var a=this._componentsMap.get(t);if(a){var n=a[i||0];if(n)return n;if(i==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function V3(r,e){return r.join(",")===e.join(",")}var ZM=R3;var Ji=w,_p=j,XM=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function j0(r){var e=r&&r.itemStyle;if(e)for(var t=0,i=XM.length;t=0;m--){var g=r[m];if(s||(v=g.data.rawIndexOf(g.stackedByDimension,h)),v>=0){var y=g.data.getByRawIndex(g.stackResultDimension,v);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&c>=0&&y>0||l==="samesign"&&c<=0&&y<0){c=oA(c,y),d=y;break}}}return i[0]=c,i[1]=d,i})})}var kv=function(){function r(e){this.data=e.data||(e.sourceFormat===oi?{}:[]),this.sourceFormat=e.sourceFormat||Z0,this.seriesLayoutBy=e.seriesLayoutBy||Yr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;id&&(d=x)}h[0]=v,h[1]=d}},a=function(){return this._data?this._data.length/this._dimSize:0};rI=(e={},e[Le+"_"+Yr]={pure:!0,appendData:n},e[Le+"_"+ln]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[sr]={pure:!0,appendData:n},e[oi]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var f=s[u]||(s[u]=[]),p=0;p<(l||[]).length;p++)f.push(l[p])})}},e[je]={appendData:n},e[si]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function n(o){for(var s=0;s=0&&(d=o.interpolatedValue[m])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return pn(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,i){},r}();function nx(r){var e,t;return j(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function jn(r){return new $3(r)}var $3=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var n;this._plan&&!i&&(n=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(n="reset");function f(y){return!(y>=1)&&(y=1),y}var p;(this._dirty||n==="reset")&&(this._dirty=!1,p=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,v=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(p||h1&&i>0?s:o}};return n;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},tH=function(){function r(e,t){if(!vt(t)){var i="";Gt(i)}this._opFn=sI[e],this._rvalFloat=kr(t)}return r.prototype.evaluate=function(e){return vt(e)?this._opFn(e,this._rvalFloat):this._opFn(kr(e),this._rvalFloat)},r}(),Fv=function(){function r(e,t){var i=e==="desc";this._resultLT=i?1:-1,t==null&&(t=i?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var i=vt(e)?e:kr(e),a=vt(t)?t:kr(t),n=isNaN(i),o=isNaN(a);if(n&&(i=this._incomparable),o&&(a=this._incomparable),n&&o){var s=F(e),l=F(t);s&&(i=l?e:0),l&&(a=s?t:0)}return ia?-this._resultLT:0},r}();var eH=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=kr(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(t=kr(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function lI(r,e){return r==="eq"||r==="ne"?new eH(r==="eq",e):J(sI,r)?new tH(r,e):null}var rH=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Mi(e,t)},r}();function iH(r,e){var t=new rH,i=r.data,a=t.sourceFormat=r.sourceFormat,n=r.startIndex,o="";r.seriesLayoutBy!==Yr&&Gt(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(d,m){var g=d.name,y={index:m,name:g,displayName:d.displayName};if(s.push(y),g!=null){var x="";J(l,g)&&Gt(x),l[g]=y}});else for(var f=0;f65535?uH:fH}function gu(){return[1/0,-1/0]}function pH(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function hI(r,e,t,i,a){var n=vI[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==i){for(var l=new n(i),u=0;um[1]&&(m[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,i){for(var a=this._provider,n=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=k(o,function(y){return y.property}),f=0;fg[1]&&(g[1]=m)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&ie)n=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,i){var a=this._chunks,n=a[e],o=[];if(!n)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,f=0,p=this.count();f=0&&l<0)&&(s=v,l=h,u=0),h===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,a=this._count;if(i===Array){e=new i(a);for(var n=0;n=p&&y<=c||isNaN(y))&&(l[u++]=d),d++}v=!0}else if(n===2){for(var m=h[a[0]],x=h[a[1]],_=e[a[1]][0],b=e[a[1]][1],g=0;g=p&&y<=c||isNaN(y))&&(S>=_&&S<=b||isNaN(S))&&(l[u++]=d),d++}v=!0}}if(!v)if(n===1)for(var g=0;g=p&&y<=c||isNaN(y))&&(l[u++]=T)}else for(var g=0;ge[D][1])&&(C=!1)}C&&(l[u++]=t.getRawIndex(g))}return ug[1]&&(g[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),a=i._chunks,n=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,p,c,h=new(wp(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var v=1;vf&&(f=p,c=_)}M>0&&Mf-v&&(l=f-v,s.length=l);for(var d=0;dp[1]&&(p[1]=g),c[h++]=y}return n._count=h,n._indices=c,n._updateGetRawIdx(),n},r.prototype.each=function(e,t){if(this._count)for(var i=e.length,a=this._chunks,n=0,o=this.count();nl&&(l=p)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],a=this._chunks,n=0;n=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,i,a,n){return Mi(t[n],this._dimensions[n])}sx={arrayRows:e,objectRows:function(t,i,a,n){return Mi(t[i],this._dimensions[n])},keyedColumns:e,original:function(t,i,a,n){var o=t&&(t.value==null?t:t.value);return Mi(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(t,i,a,n){return t[n]}}}(),r}(),Tp=cH;var Wv=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,a,n;if(Hv(e)){var o=e,s=void 0,l=void 0,u=void 0;if(i){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,n=[f._getVersionSign()]}else s=o.get("data",!0),l=De(s)?si:je,n=[];var p=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},h=at(p.seriesLayoutBy,c.seriesLayoutBy)||null,v=at(p.sourceHeader,c.sourceHeader),d=at(p.dimensions,c.dimensions),m=h!==c.seriesLayoutBy||!!v!=!!c.sourceHeader||d;a=m?[bp(s,{seriesLayoutBy:h,sourceHeader:v,dimensions:d},l)]:[]}else{var g=e;if(i){var y=this._applyTransform(t);a=y.sourceList,n=y.upstreamSignList}else{var x=g.get("source",!0);a=[bp(x,this._getSourceMetaRawOption(),null)],n=[]}}this._setLocalSource(a,n)},r.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(a!=null){var n="";e.length!==1&&dI(n)}var o,s=[],l=[];return w(e,function(u){u.prepareSource();var f=u.getSource(a||0),p="";a!=null&&!f&&dI(p),s.push(f),l.push(u._getVersionSign())}),i?o=pI(i,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[eI(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return w(r.blocks,function(a){var n=xI(a);n>=e&&(e=n+ +(i&&(!n||fx(a)&&!a.noHeader)))}),e}return 0}function dH(r,e,t,i){var a=e.noHeader,n=gH(xI(e)),o=[],s=e.blocks||[];ne(!s||O(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(J(u,l)){var f=new Fv(u[l],null);s.sort(function(v,d){return f.evaluate(v.sortParam,d.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(v,d){var m=e.valueFormatter,g=yI(v)(m?N(N({},r),{valueFormatter:m}):r,v,d>0?n.html:0,i);g!=null&&o.push(g)});var p=r.renderMode==="richText"?o.join(n.richText):px(o.join(""),a?t:n.html);if(a)return p;var c=Av(e.header,"ordinal",r.useUTC),h=gI(i,r.renderMode).nameStyle;return r.renderMode==="richText"?_I(r,c,h)+n.richText+p:px('
'+Je(c)+"
"+p,t)}function mH(r,e,t,i){var a=r.renderMode,n=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(_){return _=O(_)?_:[_],k(_,function(b,S){return Av(b,O(h)?h[S]:h,u)})};if(!(n&&o)){var p=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",a),c=n?"":Av(l,"ordinal",u),h=e.valueType,v=o?[]:f(e.value,e.dataIndex),d=!s||!n,m=!s&&n,g=gI(i,a),y=g.nameStyle,x=g.valueStyle;return a==="richText"?(s?"":p)+(n?"":_I(r,c,y))+(o?"":_H(r,v,d,m,x)):px((s?"":p)+(n?"":yH(c,!s,y))+(o?"":xH(v,d,m,x)),t)}}function cx(r,e,t,i,a,n){if(r){var o=yI(r),s={useUTC:a,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,n)}}function gH(r){return{html:hH[r],richText:vH[r]}}function px(r,e){var t='
',i="margin: "+e+"px 0 0";return'
'+r+t+"
"}function yH(r,e,t){var i=e?"margin-left:2px":"";return''+Je(r)+""}function xH(r,e,t,i){var a=t?"10px":"20px",n=e?"float:right;margin-left:"+a:"";return r=O(r)?r:[r],''+k(r,function(o){return Je(o)}).join("  ")+""}function _I(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function _H(r,e,t,i,a){var n=[a],o=i?10:20;return t&&n.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(O(e)?e.join(" "):e,n)}function Yv(r,e){var t=r.getData().getItemVisual(e,"style"),i=t[r.visualDrawType];return Qi(i)}function Zv(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Xv=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Fh()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,i){var a=i==="richText"?this._generateStyleName():null,n=DM({color:t,type:e,renderMode:i,markerId:a});return F(n)?n:(this.richTextStyles[a]=n.style,n.content)},r.prototype.wrapRichTextStyle=function(e,t){var i={};O(t)?w(t,function(n){return N(i,n)}):N(i,t);var a=this._generateStyleName();return this.richTextStyles[a]=i,"{"+a+"|"+e+"}"},r}();function qv(r){var e=r.series,t=r.dataIndex,i=r.multipleSeries,a=e.getData(),n=a.mapDimensionsAll("defaultedTooltip"),o=n.length,s=e.getRawValue(t),l=O(s),u=Yv(e,t),f,p,c,h;if(o>1||l&&!o){var v=SH(s,e,t,n,u);f=v.inlineValues,p=v.inlineValueTypes,c=v.blocks,h=v.inlineValues[0]}else if(o){var d=a.getDimensionInfo(n[0]);h=f=pn(a,t,n[0]),p=d.type}else h=f=l?s[0]:s;var m=Zl(e),g=m&&e.name||"",y=a.getName(t),x=i?g:y;return ie("section",{header:g,noHeader:i||!m,sortParam:h,blocks:[ie("nameValue",{markerType:"item",markerColor:u,name:x,noName:!Fe(x),value:f,valueType:p,dataIndex:t})].concat(c||[])})}function SH(r,e,t,i,a){var n=e.getData(),o=$e(r,function(p,c,h){var v=n.getDimensionInfo(h);return p=p||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];i.length?w(i,function(p){f(pn(n,t,p),p)}):w(r,f);function f(p,c){var h=n.getDimensionInfo(c);!h||h.otherDims.tooltip===!1||(o?u.push(ie("nameValue",{markerType:"subItem",markerColor:a,name:h.displayName,value:p,valueType:h.type})):(s.push(p),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Kn=ot();function jv(r,e){return r.getName(e)||r.getId(e)}var Cp="__universalTransitionEnabled",Kv=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,a){this.seriesIndex=this.componentIndex,this.dataTask=jn({count:wH,reset:TH}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var n=Kn(this).sourceManager=new Wv(this);n.prepareSource();var o=this.getInitialData(t,a);bI(o,this),this.dataTask.context.data=o,Kn(this).dataBeforeProcessed=o,SI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,i){var a=qn(this),n=a?Ai(t):{},o=this.subType;xt.hasClass(o)&&(o+="Series"),lt(t,i.getTheme().get(this.subType)),lt(t,this.getDefaultOption()),ai(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&Wr(t,n,a)},e.prototype.mergeOption=function(t,i){t=lt(this.option,t,!0),this.fillDataTextStyle(t.data);var a=qn(this);a&&Wr(this.option,t,a);var n=Kn(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(t,i);bI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Kn(this).dataBeforeProcessed=o,SI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!De(t))for(var i=["show"],a=0;athis.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,a){var n=this.ecModel,o=mp.prototype.getColorFromPalette.call(this,t,i,a);return o||(o=n.getColorFromPalette(t,i,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var a=this.option.selectedMap;if(a){var n=this.option.selectedMode,o=this.getData(i);if(n==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},e.prototype.isSelected=function(t,i){var a=this.option.selectedMap;if(!a)return!1;var n=this.getData(i);return(a==="all"||a[jv(n,t)])&&!n.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Cp])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var a,n,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){j(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,i)}},e.registerClass=function(t){return xt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(xt);jt(Kv,mu);jt(Kv,mp);Wh(Kv,xt);function SI(r){var e=r.name;Zl(r)||(r.name=bH(r)||e)}function bH(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return w(t,function(a){var n=e.getDimensionInfo(a);n.displayName&&i.push(n.displayName)}),i.join(" ")}function wH(r){return r.model.getRawData().count()}function TH(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),CH}function CH(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function bI(r,e){w(Eo(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,et(AH,e))})}function AH(r,e){var t=hx(r);return t&&t.setOutputEnd((e||this).count()),e}function hx(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var i=t.currentTask;if(i){var a=i.agentStubMap;a&&(i=a.get(r.uid))}return i}}var Rt=Kv;var vx=function(){function r(){this.group=new K,this.uid=Ci("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,a){},r.prototype.updateLayout=function(e,t,i,a){},r.prototype.updateVisual=function(e,t,i,a){},r.prototype.toggleBlurSeries=function(e,t,i){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();Xl(vx);Un(vx);var Ot=vx;function li(){var r=ot();return function(e){var t=r(e),i=e.pipelineContext,a=!!t.large,n=!!t.progressiveRender,o=t.large=!!(i&&i.large),s=t.progressiveRender=!!(i&&i.progressiveRender);return(a!==o||n!==s)&&"reset"}}var CI=ot(),DH=li(),dx=function(){function r(){this.group=new K,this.uid=Ci("viewChart"),this.renderTask=jn({plan:MH,reset:IH}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,a){},r.prototype.highlight=function(e,t,i,a){var n=e.getData(a&&a.dataType);n&&TI(n,a,"emphasis")},r.prototype.downplay=function(e,t,i,a){var n=e.getData(a&&a.dataType);n&&TI(n,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,a){this.render(e,t,i,a)},r.prototype.updateLayout=function(e,t,i,a){this.render(e,t,i,a)},r.prototype.updateVisual=function(e,t,i,a){this.render(e,t,i,a)},r.prototype.eachRendered=function(e){Sr(this.group,e)},r.markUpdateMethod=function(e,t){CI(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function wI(r,e,t){r&&Zn(r)&&(e==="emphasis"?cr:hr)(r,t)}function TI(r,e,t){var i=Si(r,e),a=e&&e.highlightKey!=null?CD(e.highlightKey):null;i!=null?w(Nt(i),function(n){wI(r.getItemGraphicEl(n),t,a)}):r.eachItemGraphicEl(function(n){wI(n,t,a)})}Xl(dx,["dispose"]);Un(dx);function MH(r){return DH(r.model)}function IH(r){var e=r.model,t=r.ecModel,i=r.api,a=r.payload,n=e.pipelineContext.progressiveRender,o=r.view,s=a&&CI(a).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,i,a),LH[l]}var LH={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},It=dx;var Qv="\0__throttleOriginMethod",AI="\0__throttleRate",DI="\0__throttleType";function Ap(r,e,t){var i,a=0,n=0,o=null,s,l,u,f;e=e||0;function p(){n=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var h=[],v=0;v=0?p():o=setTimeout(p,-s),a=i};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(h){f=h},c}function Ii(r,e,t,i){var a=r[e];if(a){var n=a[Qv]||a,o=a[DI],s=a[AI];if(s!==t||o!==i){if(t==null||!i)return r[e]=n;a=r[e]=Ap(n,t,i==="debounce"),a[Qv]=n,a[DI]=i,a[AI]=t}return a}}function cn(r,e){var t=r[e];t&&t[Qv]&&(t.clear&&t.clear(),r[e]=t[Qv])}var MI=ot(),II={itemStyle:Br(A0,!0),lineStyle:Br(C0,!0)},EH={lineStyle:"stroke",itemStyle:"fill"};function LI(r,e){var t=r.visualStyleMapper||II[e];return t||(console.warn("Unknown style type '"+e+"'."),II.itemStyle)}function EI(r,e){var t=r.visualDrawType||EH[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var PI={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",a=r.getModel(i),n=LI(r,i),o=n(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=EI(r,i),u=o[l],f=X(u)?u:null,p=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||p){var c=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=c,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||X(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||X(o.stroke)?c:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,v){var d=r.getDataParams(v),m=N({},o);m[l]=f(d),h.setItemVisual(v,"style",m)}}}},Dp=new zt,zI={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",a=LI(r,i),n=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){Dp.option=l[i];var u=a(Dp),f=o.ensureUniqueItemVisual(s,"style");N(f,u),Dp.option.decal&&(o.setItemVisual(s,"decal",Dp.option.decal),Dp.option.decal.dirty=!0),n in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},RI={performRawSeries:!0,overallReset:function(r){var e=Y();r.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+i,n=e.get(a);n||(n={},e.set(a,n)),MI(t).scope=n}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var i=t.getRawData(),a={},n=t.getData(),o=MI(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=EI(t,s);n.each(function(u){var f=n.getRawIndex(u);a[f]=u}),i.each(function(u){var f=a[u],p=n.getItemVisual(f,"colorFromPalette");if(p){var c=n.ensureUniqueItemVisual(f,"style"),h=i.getName(u)||u+"",v=i.count();c[l]=t.getColorFromPalette(h,o,v)}})}})}};var Jv=Math.PI;function mx(r,e){e=e||{},q(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new K,i=new ht({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var a=new yt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),n=new ht({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(n);var o;return e.showSpinner&&(o=new np({shape:{startAngle:-Jv/2,endAngle:-Jv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Jv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Jv*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),n.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var PH=function(){function r(e,t,i,a){this._stageTaskMap=Y(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=i.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var a=i.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),a=i.context,n=!t&&i.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>i.blockIndex,o=n?i.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),a=e.getData(),n=a.count(),o=i.progressiveEnabled&&t.incrementalPrepareRender&&n>=i.threshold,s=e.get("large")&&n>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?n:null;e.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=Y();e.eachSeries(function(a){var n=a.getProgressive(),o=a.uid;i.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:n&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;w(this._allHandlers,function(a){var n=e.get(a.uid)||e.set(a.uid,{}),o="";ne(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,n,t,i),a.overallReset&&this._createOverallStageTask(a,n,t,i)},this)},r.prototype.prepareView=function(e,t,i,a){var n=e.renderTask,o=n.context;o.model=t,o.ecModel=i,o.api=a,n.__block=!e.incrementalPrepareRender,this._pipe(t,n)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},r.prototype._performStageTasks=function(e,t,i,a){a=a||{};var n=!1,o=this;w(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),p=f.seriesTaskMap,c=f.overallTask;if(c){var h,v=c.agentStubMap;v.each(function(m){s(a,m)&&(m.dirty(),h=!0)}),h&&c.dirty(),o.updatePayload(c,i);var d=o.getPerformArgs(c,a.block);v.each(function(m){m.perform(d)}),c.perform(d)&&(n=!0)}else p&&p.each(function(m,g){s(a,m)&&m.dirty();var y=o.getPerformArgs(m,a.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,i),m.perform(y)&&(n=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=n||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,i,a){var n=this,o=t.seriesTaskMap,s=t.seriesTaskMap=Y(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,a).each(f);function f(p){var c=p.uid,h=s.set(c,o&&o.get(c)||jn({plan:kH,reset:VH,count:BH}));h.context={model:p,ecModel:i,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:n},n._pipe(p,h)}},r.prototype._createOverallStageTask=function(e,t,i,a){var n=this,o=t.overallTask=t.overallTask||jn({reset:zH});o.context={ecModel:i,api:a,overallReset:e.overallReset,scheduler:n};var s=o.agentStubMap,l=o.agentStubMap=Y(),u=e.seriesType,f=e.getTargetSeries,p=!0,c=!1,h="";ne(!e.createOnAllSeries,h),u?i.eachRawSeriesByType(u,v):f?f(i,a).each(v):(p=!1,w(i.getSeries(),v));function v(d){var m=d.uid,g=l.set(m,s&&s.get(m)||(c=!0,jn({reset:RH,onDirty:OH})));g.context={model:d,overallProgress:p},g.agent=o,g.__block=p,n._pipe(d,g)}c&&o.dirty()},r.prototype._pipe=function(e,t){var i=e.uid,a=this._pipelineMap.get(i);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return X(e)&&(e={overallReset:e,seriesType:FH(e)}),e.uid=Ci("stageHandler"),t&&(e.visualType=t),e},r}();function zH(r){r.overallReset(r.ecModel,r.api,r.payload)}function RH(r){return r.overallProgress&&NH}function NH(){this.agent.dirty(),this.getDownstream().dirty()}function OH(){this.agent&&this.agent.dirty()}function kH(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function VH(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Nt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?k(e,function(t,i){return NI(i)}):UH}var UH=NI(0);function NI(r){return function(e,t){var i=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var n=e.start;n0&&h===u.length-c.length){var v=u.slice(0,h);v!=="data"&&(t.mainType=v,t[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(a[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:a}},r.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var a=i.targetEl,n=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,n,"name")&&f(u,n,"dataIndex")&&f(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,n));function f(p,c,h,v){return p[h]==null||c[v||h]===p[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}();var yx=["symbol","symbolSize","symbolRotate","symbolOffset"],YI=yx.concat(["symbolKeepAspect"]),ZI={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},a={},n=!1,o=0;o=0&&bs(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Ep(r,e,t){for(var i=e.type==="radial"?t4(r,e,t):JH(r,e,t),a=e.colorStops,n=0;n0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:vt(r)?[r]:O(r)?r:null}function Pp(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&e4(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=k(t,function(n){return n/a}),i/=a)}return[t,i]}var r4=new Ye(!0);function ad(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function $I(r){return typeof r=="string"&&r!=="none"}function nd(r){var e=r.fill;return e!=null&&e!=="none"}function JI(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function tL(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function od(r,e,t){var i=Zf(e.image,e.__image,t);if(ql(i)){var a=r.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var n=new DOMMatrix;n.translateSelf(e.x||0,e.y||0),n.rotateSelf(0,0,(e.rotation||0)*Dl),n.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(n)}return a}}function i4(r,e,t,i){var a,n=ad(t),o=nd(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||r4,p=e.__dirty;if(!i){var c=t.fill,h=t.stroke,v=o&&!!c.colorStops,d=n&&!!h.colorStops,m=o&&!!c.image,g=n&&!!h.image,y=void 0,x=void 0,_=void 0,b=void 0,S=void 0;(v||d)&&(S=e.getBoundingRect()),v&&(y=p?Ep(r,c,S):e.__canvasFillGradient,e.__canvasFillGradient=y),d&&(x=p?Ep(r,h,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=x),m&&(_=p||!e.__canvasFillPattern?od(r,c,e):e.__canvasFillPattern,e.__canvasFillPattern=_),g&&(b=p||!e.__canvasStrokePattern?od(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),v?r.fillStyle=y:m&&(_?r.fillStyle=_:o=!1),d?r.strokeStyle=x:g&&(b?r.strokeStyle=b:n=!1)}var T=e.getGlobalScale();f.setScale(T[0],T[1],e.segmentIgnoreThreshold);var C,A;r.setLineDash&&t.lineDash&&(a=Pp(e),C=a[0],A=a[1]);var D=!0;(u||p&En)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),D=!1),f.reset(),e.buildPath(f,e.shape,i),f.toStatic(),e.pathUpdated()),D&&f.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=A),i||(t.strokeFirst?(n&&tL(r,t),o&&JI(r,t)):(o&&JI(r,t),n&&tL(r,t))),C&&r.setLineDash([])}function a4(r,e,t){var i=e.__image=Zf(t.image,e.__image,e,e.onload);if(!(!i||!ql(i))){var a=t.x||0,n=t.y||0,o=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(i,u,f,t.sWidth,t.sHeight,a,n,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,p=o-u,c=s-f;r.drawImage(i,u,f,p,c,a,n,o,s)}else r.drawImage(i,a,n,o,s)}}function n4(r,e,t){var i,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||Jr,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var n=void 0,o=void 0;r.setLineDash&&t.lineDash&&(i=Pp(e),n=i[0],o=i[1]),n&&(r.setLineDash(n),r.lineDashOffset=o),t.strokeFirst?(ad(t)&&r.strokeText(a,t.x,t.y),nd(t)&&r.fillText(a,t.x,t.y)):(nd(t)&&r.fillText(a,t.x,t.y),ad(t)&&r.strokeText(a,t.x,t.y)),n&&r.setLineDash([])}}var eL=["shadowBlur","shadowOffsetX","shadowOffsetY"],rL=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function lL(r,e,t,i,a){var n=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){Zr(r,a),n=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?xa.opacity:o}(i||e.blend!==t.blend)&&(n||(Zr(r,a),n=!0),r.globalCompositeOperation=e.blend||xa.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,i,a){if(!this[yr]){if(this._disposed){this.id;return}var n,o,s;if(j(i)&&(a=i.lazyUpdate,n=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[yr]=!0,!this._model||i){var l=new ZM(this._api),u=this._theme,f=this._model=new Rv;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Ex);var p={seriesTransition:s,optionChanged:!0};if(a)this[Xr]={silent:n,updateParams:p},this[yr]=!1,this.getZr().wakeUp();else{try{xu(this),Jn.update.call(this,null,p)}catch(c){throw this[Xr]=null,this[yr]=!1,c}this._ssr||this._zr.flush(),this[Xr]=null,this[yr]=!1,Rp.call(this,n),Np.call(this,n)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Tt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(Tt.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return w(i,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,a=this._model,n=[],o=this;w(i,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(n.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return w(n,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",a=this.group,n=Math.min,o=Math.max,s=1/0;if(CL[a]){var l=s,u=s,f=-s,p=-s,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();w(kp,function(x,_){if(x.group===a){var b=i?x.getZr().painter.getSvgDom().innerHTML:x.renderToCanvas($(t)),S=x.getDom().getBoundingClientRect();l=n(S.left,l),u=n(S.top,u),f=o(S.right,f),p=o(S.bottom,p),c.push({dom:b,left:S.left,top:S.top})}}),l*=h,u*=h,f*=h,p*=h;var v=f-l,d=p-u,m=pr.createCanvas(),g=Py(m,{renderer:i?"svg":"canvas"});if(g.resize({width:v,height:d}),i){var y="";return w(c,function(x){var _=x.left-l,b=x.top-u;y+=''+x.dom+""}),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new ht({shape:{x:0,y:0,width:v,height:d},style:{fill:t.connectedBackgroundColor}})),w(c,function(x){var _=new re({style:{x:x.left*h-l,y:x.top*h-u,image:x.dom}});g.add(_)}),g.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return Ax(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return Ax(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var a=this._model,n,o=kn(a,t);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)n=n||!!f.containPoint(i);else if(l==="seriesModels"){var p=this._chartsMap[u.__viewId];p&&p.containPoint&&(n=n||p.containPoint(i,u))}},this)},this),!!n},e.prototype.getVisual=function(t,i){var a=this._model,n=kn(a,t,{defaultMainType:"series"}),o=n.seriesModel,s=o.getData(),l=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?s.indexOfRawIndex(n.dataIndex):null;return l!=null?Ip(s,l,i):Ma(s,i)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;w(D4,function(i){var a=function(n){var o=t.getModel(),s=n.target,l,u=i==="globalout";if(u?l={}:s&&ta(s,function(v){var d=tt(v);if(d&&d.dataIndex!=null){var m=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=m&&m.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=N({},d.eventData),!0},!0),l){var f=l.componentType,p=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",p=l.seriesIndex);var c=f&&p!=null&&o.getComponent(f,p),h=c&&t[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];l.event=n,l.type=i,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:h},t.trigger(i,l)}};a.zrEventfulCallAtLast=!0,t._zr.on(i,a,t)}),w(Op,function(i,a){t._messageCenter.on(a,function(n){this.trigger(a,n)},t)}),w(["selectchanged"],function(i){t._messageCenter.on(i,function(a){this.trigger(i,a)},t)}),qI(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&ky(this.getDom(),Nx,"");var i=this,a=i._api,n=i._model;w(i._componentsViews,function(o){o.dispose(n,a)}),w(i._chartsViews,function(o){o.dispose(n,a)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete kp[i.id]},e.prototype.resize=function(t){if(!this[yr]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var a=i.resetOption("media"),n=t&&t.silent;this[Xr]&&(n==null&&(n=this[Xr].silent),a=!0,this[Xr]=null),this[yr]=!0;try{a&&xu(this),Jn.update.call(this,{type:"resize",animation:N({duration:0},t&&t.animation)})}catch(o){throw this[yr]=!1,o}this[yr]=!1,Rp.call(this,n),Np.call(this,n)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if(j(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!Px[t]){var a=Px[t](this._api,i),n=this._zr;this._loadingFX=a,n.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var i=N({},t);return i.type=Op[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if(j(i)||(i={silent:!!i}),!!fd[t.type]&&this._model){if(this[yr]){this._pendingActions.push(t);return}var a=i.silent;Mx.call(this,t,a);var n=i.flush;n?this._zr.flush():n!==!1&&Tt.browser.weChat&&this._throttledZrFlush(),Rp.call(this,a),Np.call(this,a)}},e.prototype.updateLabelLayout=function(){Li.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,a=this.getModel(),n=a.getSeriesByIndex(i);n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){xu=function(p){var c=p._scheduler;c.restorePipelines(p._model),c.prepareStageTasks(),Cx(p,!0),Cx(p,!1),c.plan()},Cx=function(p,c){for(var h=p._model,v=p._scheduler,d=c?p._componentsViews:p._chartsViews,m=c?p._componentsMap:p._chartsMap,g=p._zr,y=p._api,x=0;xc.get("hoverLayerThreshold")&&!Tt.node&&!Tt.worker&&c.eachSeries(function(m){if(!m.preventUsingHoverLayer){var g=p._chartsMap[m.__viewId];g.__alive&&g.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(p,c){var h=p.get("blendMode")||null;c.eachRendered(function(v){v.isGroup||(v.style.blend=h)})}function s(p,c){if(!p.preventAutoZ){var h=p.get("z")||0,v=p.get("zlevel")||0;c.eachRendered(function(d){return l(d,h,v,-1/0),!0})}}function l(p,c,h,v){var d=p.getTextContent(),m=p.getTextGuideLine(),g=p.isGroup;if(g)for(var y=p.childrenRef(),x=0;x0?{duration:d,delay:h.get("delay"),easing:h.get("easing")}:null;c.eachRendered(function(g){if(g.states&&g.states.emphasis){if(tn(g))return;if(g instanceof it&&AD(g),g.__dirty){var y=g.prevStates;y&&g.useStates(y)}if(v){g.stateTransition=m;var x=g.getTextContent(),_=g.getTextGuideLine();x&&(x.stateTransition=m),_&&(_.stateTransition=m)}g.__dirty&&a(g)}})}wL=function(p){return new(function(c){E(h,c);function h(){return c!==null&&c.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return p._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(v){for(;v;){var d=v.__ecComponentInfo;if(d!=null)return p._model.getComponent(d.mainType,d.index);v=v.parent}},h.prototype.enterEmphasis=function(v,d){cr(v,d),Ei(p)},h.prototype.leaveEmphasis=function(v,d){hr(v,d),Ei(p)},h.prototype.enterBlur=function(v){Jh(v),Ei(p)},h.prototype.leaveBlur=function(v){tp(v),Ei(p)},h.prototype.enterSelect=function(v){l0(v),Ei(p)},h.prototype.leaveSelect=function(v){u0(v),Ei(p)},h.prototype.getModel=function(){return p.getModel()},h.prototype.getViewOfComponentModel=function(v){return p.getViewOfComponentModel(v)},h.prototype.getViewOfSeriesModel=function(v){return p.getViewOfSeriesModel(v)},h}(Nv))(p)},OL=function(p){function c(h,v){for(var d=0;d=0)){AL.push(t);var n=gx.wrapStageHandler(t,a);n.__prio=e,n.__raw=t,r.push(n)}}function Bx(r,e){Px[r]=e}function WL(r,e,t){var i=gL("registerMap");i&&i(r,e,t)}var YL=fI;to(zx,PI);to(cd,zI);to(cd,RI);to(zx,ZI);to(cd,XI);to(IL,Sx);kx(Ov);Vx(m4,$0);Bx("default",mx);wr({type:Yn,event:Yn,update:Yn},te);wr({type:$f,event:$f,update:$f},te);wr({type:$l,event:$l,update:$l},te);wr({type:Jf,event:Jf,update:Jf},te);wr({type:Jl,event:Jl,update:Jl},te);UL("light",UI);UL("dark",HI);var ZL=[],L4={registerPreprocessor:kx,registerProcessor:Vx,registerPostInit:BL,registerPostUpdate:FL,registerUpdateLifecycle:hd,registerAction:wr,registerCoordinateSystem:GL,registerLayout:HL,registerVisual:to,registerTransform:YL,registerLoading:Bx,registerMap:WL,registerImpl:mL,PRIORITY:LL,ComponentModel:xt,ComponentView:Ot,SeriesModel:Rt,ChartView:It,registerComponentModel:function(r){xt.registerClass(r)},registerComponentView:function(r){Ot.registerClass(r)},registerSeriesModel:function(r){Rt.registerClass(r)},registerChartView:function(r){It.registerClass(r)},registerSubTypeDefaulter:function(r,e){xt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){tA(r,e)}};function St(r){if(O(r)){w(r,function(e){St(e)});return}nt(ZL,r)>=0||(ZL.push(r),X(r)&&(r={install:r}),r.install(L4))}function Vp(r){return r==null?0:r.length||1}function XL(r){return r}var E4=function(){function r(e,t,i,a,n,o){this._old=e,this._new=t,this._oldKeyGetter=i||XL,this._newKeyGetter=a||XL,this.context=n,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},a=new Array(e.length),n=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,i,n,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(n,i)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},a={},n=[],o=[];this._initIndexMap(e,i,n,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[l]=null;else if(p===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[l]=null;else if(p===1&&c===1)this._update&&this._update(f,u),a[l]=null;else if(p>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[l]=null;else if(p>1)for(var h=0;h1)for(var s=0;s30}var Up=j,eo=k,k4=typeof Int32Array>"u"?Array:Int32Array,V4="e\0\0",jL=-1,U4=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],B4=["_approximateExtent"],KL,md,Bp,Fp,Zx,gd,Xx,F4=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i,a=!1;dd(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,i=e),i=i||["x","y"];for(var n={},o=[],s={},l=!1,u={},f=0;f=t)){var i=this._store,a=i.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===je;if(l&&!a.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,a=i[e];a||(a=i[e]={});var n=a[t];return n==null&&(n=this.getVisual(t),O(n)?n=n.slice():Up(n)&&(n=N({},n)),a[t]=n),n},r.prototype.setItemVisual=function(e,t,i){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Up(t)?N(a,t):a[t]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Up(e)?N(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?N(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;Kf(i,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){w(this._graphicEls,function(i,a){i&&e&&e.call(t,i,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:eo(this.dimensions,this._getDimInfo,this),this.hostModel)),Zx(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var i=this[e];X(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=i.apply(this,arguments);return t.apply(this,[a].concat(rh(arguments)))})},r.internalField=function(){KL=function(e){var t=e._invertedIndicesMap;w(t,function(i,a){var n=e._dimInfos[a],o=n.ordinalMeta,s=e._store;if(o){i=t[a]=new k4(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),a[t]=l}}}(),r}(),ve=F4;function ia(r,e){vu(r)||(r=du(r)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||r.dimensionsDefine||[],a=Y(),n=[],o=H4(r,t,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Yx(o),l=i===r.dimensionsDefine,u=l?Wx(r):Hx(i),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var p=Y(f),c=new lx(o),h=0;h0&&(i.name=a+(n-1)),n++,e.set(a,n)}}function H4(r,e,t,i){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,i||0);return w(e,function(n){var o;j(n)&&(o=n.dimsDef)&&(a=Math.max(a,o.length))}),a}function W4(r,e,t){if(t||e.hasKey(r)){for(var i=0;e.hasKey(r+i);)i++;r+=i}return e.set(r,!0),r}var Y4=function(){function r(e){this.coordSysDims=[],this.axisMap=Y(),this.categoryAxisMap=Y(),this.coordSysName=e}return r}();function QL(r){var e=r.get("coordinateSystem"),t=new Y4(e),i=Z4[e];if(i)return i(r,t,t.axisMap,t.categoryAxisMap),t}var Z4={cartesian2d:function(r,e,t,i){var a=r.getReferringComponents("xAxis",$t).models[0],n=r.getReferringComponents("yAxis",$t).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",n),Su(a)&&(i.set("x",a),e.firstCategoryDimIndex=0),Su(n)&&(i.set("y",n),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,i){var a=r.getReferringComponents("singleAxis",$t).models[0];e.coordSysDims=["single"],t.set("single",a),Su(a)&&(i.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,i){var a=r.getReferringComponents("polar",$t).models[0],n=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",n),t.set("angle",o),Su(n)&&(i.set("radius",n),e.firstCategoryDimIndex=0),Su(o)&&(i.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,i){var a=r.ecModel,n=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();w(n.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];t.set(f,u),Su(u)&&(i.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Su(r){return r.get("type")==="category"}function $L(r,e,t){t=t||{};var i=t.byIndex,a=t.stackedCoordDimension,n,o,s;X4(e)?n=e:(o=e.schema,n=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,p,c;if(w(n,function(y,x){F(y)&&(n[x]=y={name:y}),l&&!y.isExtraCoord&&(!i&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!a||a===y.coordDim)&&(f=y))}),f&&!i&&!u&&(i=!0),f){p="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=f.coordDim,v=f.type,d=0;w(n,function(y){y.coordDim===h&&d++});var m={name:p,coordDim:h,coordDimIndex:d,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},g={name:c,coordDim:c,coordDimIndex:d+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(c,v),g.storeDimIndex=s.ensureCalculationDimension(p,v)),o.appendCalculationDimension(m),o.appendCalculationDimension(g)):(n.push(m),n.push(g))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:c,stackResultDimension:p}}function X4(r){return!dd(r.schema)}function fi(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function yd(r,e){return fi(r,e)?r.getCalculationInfo("stackResultDimension"):e}function q4(r,e){var t=r.get("coordinateSystem"),i=un.get(t),a;return e&&e.coordSysDims&&(a=k(e.coordSysDims,function(n){var o={name:n},s=e.axisMap.get(n);if(s){var l=s.get("type");o.type=ws(l)}return o})),a||(a=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),a}function j4(r,e,t){var i,a;return t&&w(r,function(n,o){var s=n.coordDim,l=t.categoryAxisMap.get(s);l&&(i==null&&(i=o),n.ordinalMeta=l.getOrdinalMeta(),e&&(n.createInvertedIndices=!0)),n.otherDims.itemName!=null&&(a=!0)}),!a&&i!=null&&(r[i].otherDims.itemName=0),i}function K4(r,e,t){t=t||{};var i=e.getSourceManager(),a,n=!1;r?(n=!0,a=du(r)):(a=i.getSource(),n=a.sourceFormat===je);var o=QL(e),s=q4(e,o),l=t.useEncodeDefaulter,u=X(l)?l:l?et(Lv,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!n},p=ia(a,f),c=j4(p.dimensions,t.createInvertedIndices,o),h=n?null:i.getSharedDataStore(p),v=$L(e,{schema:p,store:h}),d=new ve(p,e);d.setCalculationInfo(v);var m=c!=null&&Q4(a)?function(g,y,x,_){return _===c?x:this.defaultDimValueGetter(g,y,x,_)}:null;return d.hasItemOption=!1,d.initData(n?a:h,null,m),d}function Q4(r){if(r.sourceFormat===je){var e=$4(r.data||[]);return!O(Wi(e))}}function $4(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();Un(JL);var qr=JL;var J4=0,tW=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++J4}return r.createByAxisModel=function(e){var t=e.option,i=t.data,a=i&&k(i,eW);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!F(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,a.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=Y(this.categories))},r}();function eW(r){return j(r)&&r.value!=null?r.value:r+""}var Gp=tW;function Hp(r){return r.type==="interval"||r.type==="log"}function eE(r,e,t,i){var a={},n=r[1]-r[0],o=a.interval=Hl(n/e,!0);t!=null&&oi&&(o=a.interval=i);var s=a.intervalPrecision=qx(o),l=a.niceTickExtent=[Qt(Math.ceil(r[0]/o)*o,s),Qt(Math.floor(r[1]/o)*o,s)];return rW(l,r),a}function xd(r){var e=Math.pow(10,Gl(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Qt(t*e)}function qx(r){return rr(r)+2}function tE(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function rW(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),tE(r,0,e),tE(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function ro(r,e){return r>=e[0]&&r<=e[1]}function io(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function ao(r,e){return r*(e[1]-e[0])+e[0]}var rE=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;i.type="ordinal";var a=i.getSetting("ordinalMeta");return a||(a=new Gp({})),O(a)&&(a=new Gp({categories:k(a,function(n){return j(n)?n.value:n})})),i._ordinalMeta=a,i._extent=i.getSetting("extent")||[0,a.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:F(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),ro(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),io(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(ao(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,a=i[0];a<=i[1];)t.push({value:a}),a++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,a=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(qr);qr.registerClass(rE);var Wp=rE;var Ts=Qt,iE=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return ro(t,this._extent)},e.prototype.normalize=function(t){return io(t,this._extent)},e.prototype.scale=function(t){return ao(t,this._extent)},e.prototype.setExtent=function(t,i){var a=this._extent;isNaN(t)||(a[0]=parseFloat(t)),isNaN(i)||(a[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=qx(t)},e.prototype.getTicks=function(t){var i=this._interval,a=this._extent,n=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;a[0]l)return[];var f=s.length?s[s.length-1].value:n[1];return a[1]>f&&(t?s.push({value:Ts(f+i,o)}):s.push({value:a[1]})),s},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),a=[],n=this.getExtent(),o=1;on[0]&&h0&&(n=n===null?s:Math.min(n,s))}t[i]=n}}return t}function Jx(r){var e=aW(r),t=[];return w(r,function(i){var a=i.coordinateSystem,n=a.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],f=Math.abs(o[1]-o[0]),p=n.scale.getExtent(),c=Math.abs(p[1]-p[0]);s=u?f/c*u:f}else{var h=i.getData();s=Math.abs(o[1]-o[0])/h.count()}var v=H(i.get("barWidth"),s),d=H(i.get("barMaxWidth"),s),m=H(i.get("barMinWidth")||(uE(i)?.5:1),s),g=i.get("barGap"),y=i.get("barCategoryGap");t.push({bandWidth:s,barWidth:v,barMaxWidth:d,barMinWidth:m,barGap:g,barCategoryGap:y,axisKey:Qx(n),stackId:Kx(i)})}),oE(t)}function oE(r){var e={};w(r,function(i,a){var n=i.axisKey,o=i.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[n]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var p=i.barMaxWidth;p&&(l[u].maxWidth=p);var c=i.barMinWidth;c&&(l[u].minWidth=c);var h=i.barGap;h!=null&&(s.gap=h);var v=i.barCategoryGap;v!=null&&(s.categoryGap=v)});var t={};return w(e,function(i,a){t[a]={};var n=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=ft(n).length;s=Math.max(35-l*4,15)+"%"}var u=H(s,o),f=H(i.gap,1),p=i.remainedWidth,c=i.autoWidthCount,h=(p-u)/(c+(c-1)*f);h=Math.max(h,0),w(n,function(g){var y=g.maxWidth,x=g.minWidth;if(g.width){var _=g.width;y&&(_=Math.min(_,y)),x&&(_=Math.max(_,x)),g.width=_,p-=_+f*_,c--}else{var _=h;y&&y<_&&(_=Math.min(y,p)),x&&x>_&&(_=x),_!==h&&(g.width=_,p-=_+f*_,c--)}}),h=(p-u)/(c+(c-1)*f),h=Math.max(h,0);var v=0,d;w(n,function(g,y){g.width||(g.width=h),d=g,v+=g.width*(1+f)}),d&&(v-=d.width*f);var m=-v/2;w(n,function(g,y){t[a][y]=t[a][y]||{bandWidth:o,offset:m,width:g.width},m+=g.width*(1+f)})}),t}function sE(r,e,t){if(r&&e){var i=r[Qx(e)];return i!=null&&t!=null?i[Kx(t)]:i}}function Sd(r,e){var t=$x(r,e),i=Jx(t);w(t,function(a){var n=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=Kx(a),u=i[Qx(s)][l],f=u.offset,p=u.width;n.setLayout({bandWidth:u.bandWidth,offset:f,size:p})})}function bd(r){return{seriesType:r,plan:li(),reset:function(e){if(lE(e)){var t=e.getData(),i=e.coordinateSystem,a=i.getBaseAxis(),n=i.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(n.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(n.dim),f=t.getCalculationInfo("stackResultDimension"),p=fi(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),c=n.isHorizontal(),h=nW(a,n),v=uE(e),d=e.get("barMinHeight")||0,m=f&&t.getDimensionIndex(f),g=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(x,_){for(var b=x.count,S=v&&Tr(b*3),T=v&&l&&Tr(b*3),C=v&&Tr(b),A=i.master.getRect(),D=c?A.width:A.height,M,I=_.getStore(),L=0;(M=x.next())!=null;){var P=I.get(p?m:o,M),z=I.get(s,M),R=h,U=void 0;p&&(U=+P-I.get(o,M));var V=void 0,B=void 0,Z=void 0,Q=void 0;if(c){var st=i.dataToPoint([P,z]);if(p){var ct=i.dataToPoint([U,z]);R=ct[0]}V=R,B=st[1]+y,Z=st[0]-R,Q=g,Math.abs(Z)>>1;r[a][1]a&&(this._approxInterval=a);var s=wd.length,l=Math.min(oW(wd,this._approxInterval,0,s),s-1);this._interval=wd[l][1],this._minLevelUnit=wd[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return vt(t)?t:+ir(t)},e.prototype.contain=function(t){return ro(this.parse(t),this._extent)},e.prototype.normalize=function(t){return io(this.parse(t),this._extent)},e.prototype.scale=function(t){return ao(t,this._extent)},e.type="time",e}(jr),wd=[["second",bv],["minute",wv],["hour",fu],["quarter-day",fu*6],["half-day",fu*12],["day",ni*1.2],["half-week",ni*3.5],["week",ni*7],["month",ni*31],["quarter",ni*95],["half-year",E0/2],["year",E0]];function sW(r,e,t,i){var a=ir(e),n=ir(t),o=function(v){return R0(a,v,i)===R0(n,v,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},p=function(){return f()&&o("minute")},c=function(){return p()&&o("second")},h=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return p();case"second":return c();case"millisecond":return h()}}function lW(r,e){return r/=ni,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function uW(r){var e=30*ni;return r/=e,r>6?6:r>3?3:r>2?2:1}function fW(r){return r/=fu,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function fE(r,e){return r/=e?wv:bv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function pW(r){return Hl(r,!0)}function cW(r,e,t){var i=new Date(r);switch(ds(e)){case"year":case"month":i[N0(t)](0);case"day":i[O0(t)](1);case"hour":i[k0(t)](0);case"minute":i[V0(t)](0);case"second":i[U0(t)](0),i[B0(t)](0)}return i.getTime()}function hW(r,e,t,i){var a=1e4,n=z0,o=0;function s(D,M,I,L,P,z,R){for(var U=new Date(M),V=M,B=U[L]();V1&&z===0&&I.unshift({value:I[0].value-V})}}for(var z=0;z=i[0]&&y<=i[1]&&p++)}var x=(i[1]-i[0])/e;if(p>x*1.5&&c>x/1.5||(u.push(m),p>x||r===n[h]))break}f=[]}}}for(var _=Dt(k(u,function(D){return Dt(D,function(M){return M.value>=i[0]&&M.value<=i[1]&&!M.notAdd})}),function(D){return D.length>0}),b=[],S=_.length-1,h=0;h<_.length;++h)for(var T=_[h],C=0;C0;)n*=10;var s=[Qt(mW(i[0]/n)*n),Qt(dW(i[1]/n)*n)];this._interval=n,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Yp.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=aa(t)/aa(this.base),ro(t,this._extent)},e.prototype.normalize=function(t){return t=aa(t)/aa(this.base),io(t,this._extent)},e.prototype.scale=function(t){return t=ao(t,this._extent),Cd(this.base,t)},e.type="log",e}(qr),hE=t_.prototype;hE.getMinorTicks=Yp.getMinorTicks;hE.getLabel=Yp.getLabel;function Ad(r,e){return vW(r,rr(e))}qr.registerClass(t_);var vE=t_;var gW=function(){function r(e,t,i){this._prepareParams(e,t,i)}return r.prototype._prepareParams=function(e,t,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,h=this._determinedMax;return c!=null&&(s=c,u=!0),h!=null&&(l=h,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:p}},r.prototype.modifyDataMinMax=function(e,t){this[xW[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var i=yW[e];this[i]=t},r.prototype.freeze=function(){this.frozen=!0},r}();var yW={min:"_determinedMin",max:"_determinedMax"},xW={min:"_dataMin",max:"_dataMax"};function Md(r,e,t){var i=r.rawExtentInfo;return i||(i=new gW(r,e,t),r.rawExtentInfo=i,i)}function Dd(r,e){return e==null?null:Mn(e)?NaN:r.parse(e)}function e_(r,e){var t=r.type,i=Md(r,e,r.getExtent()).calculate();r.setBlank(i.isBlank);var a=i.min,n=i.max,o=e.ecModel;if(o&&t==="time"){var s=$x("bar",o),l=!1;if(w(s,function(p){l=l||p.getBaseAxis()===e.axis}),l){var u=Jx(s),f=_W(a,n,e,u);a=f.min,n=f.max}}return{extent:[a,n],fixMin:i.minFixed,fixMax:i.maxFixed}}function _W(r,e,t,i){var a=t.axis.getExtent(),n=a[1]-a[0],o=sE(i,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;w(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;w(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,p=1-(s+l)/n,c=f/p-f;return e+=c*(l/u),r-=c*(s/u),{min:r,max:e}}function Ia(r,e){var t=e,i=e_(r,t),a=i.extent,n=t.get("splitNumber");r instanceof vE&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:n,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function no(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new Wp({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Td({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(qr.getClass(e)||jr)}}function dE(r){var e=r.scale.getExtent(),t=e[0],i=e[1];return!(t>0&&i>0||t<0&&i<0)}function bu(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(a,n){return r.scale.getFormattedLabel(a,n,i)}}(e):F(e)?function(i){return function(a){var n=r.scale.getLabel(a),o=i.replace("{value}",n??"");return o}}(e):X(e)?function(i){return function(a,n){return t!=null&&(n=a.value-t),i(Zp(r,a),n,a.level!=null?{level:a.level}:null)}}(e):function(i){return r.scale.getLabel(i)}}function Zp(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function mE(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var i,a,n=t.getExtent();t instanceof Wp?a=t.count():(i=t.getTicks(),a=i.length);var o=r.getLabelModel(),s=bu(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;fr[1]&&(r[1]=a[1])})}var La=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}();var bW=1e-8;function yE(r,e){return Math.abs(r-e)a&&(i=o,a=l)}if(i)return TW(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var i=this._rect;if(i&&!t)return i;var a=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return w(o,function(s){s.type==="polygon"?_E(s.exterior,a,n,t):w(s.points,function(l){_E(l,a,n,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(n[0])&&isFinite(n[1])||(a[0]=a[1]=n[0]=n[1]=0),i=new rt(a[0],a[1],n[0]-a[0],n[1]-a[1]),t||(this._rect=i),i},e.prototype.contain=function(t){var i=this.getBoundingRect(),a=this.geometries;if(!i.contain(t[0],t[1]))return!1;t:for(var n=0,o=a.length;n>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=n,a=s,n=l,i.push([s/t,l/t])}return i}function o_(r,e){return r=CW(r),k(Dt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var i=t.properties,a=t.geometry,n=[];switch(a.type){case"Polygon":var o=a.coordinates;n.push(new i_(o[0],o.slice(1)));break;case"MultiPolygon":w(a.coordinates,function(l){l[0]&&n.push(new i_(l[0],l.slice(1)))});break;case"LineString":n.push(new a_([a.coordinates]));break;case"MultiLineString":n.push(new a_(a.coordinates))}var s=new Pd(i[e||"name"],n,i.cp);return s.properties=i,s})}var Tu={};sT(Tu,{MAX_SAFE_INTEGER:()=>Bf,asc:()=>Ie,getPercentWithPrecision:()=>nA,getPixelPrecision:()=>Fl,getPrecision:()=>rr,getPrecisionSafe:()=>zy,isNumeric:()=>jo,isRadianAroundZero:()=>qa,linearMap:()=>kt,nice:()=>Hl,numericToNumber:()=>kr,parseDate:()=>ir,quantile:()=>Wl,quantity:()=>Bh,quantityExponent:()=>Gl,reformIntervals:()=>Gf,remRadian:()=>Ff,round:()=>Qt});var Xp=ot();function TE(r){return r.type==="category"?AW(r):MW(r)}function CE(r,e){return r.type==="category"?DW(r,e):{ticks:k(r.scale.getTicks(),function(t){return t.value})}}function AW(r){var e=r.getLabelModel(),t=AE(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function AE(r,e){var t=DE(r,"labels"),i=Id(e),a=ME(t,i);if(a)return a;var n,o;return X(i)?n=PE(r,i):(o=i==="auto"?IW(r):i,n=EE(r,o)),IE(t,i,{labels:n,labelCategoryInterval:o})}function DW(r,e){var t=DE(r,"ticks"),i=Id(e),a=ME(t,i);if(a)return a;var n,o;if((!e.get("show")||r.scale.isBlank())&&(n=[]),X(i))n=PE(r,i,!0);else if(i==="auto"){var s=AE(r,r.getLabelModel());o=s.labelCategoryInterval,n=k(s.labels,function(l){return l.tickValue})}else o=i,n=EE(r,o,!0);return IE(t,i,{ticks:n,tickCategoryInterval:o})}function MW(r){var e=r.scale.getTicks(),t=bu(r);return{labels:k(e,function(i,a){return{level:i.level,formattedLabel:t(i,a),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function DE(r,e){return Xp(r)[e]||(Xp(r)[e]=[])}function ME(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(i)),p=Math.abs(u*Math.sin(i)),c=0,h=0;l<=n[1];l+=s){var v=0,d=0,m=ya(t({value:l}),e.font,"center","top");v=m.width*1.3,d=m.height*1.3,c=Math.max(c,v,7),h=Math.max(h,d,7)}var g=c/f,y=h/p;isNaN(g)&&(g=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(g,y))),_=Xp(r.model),b=r.getExtent(),S=_.lastAutoInterval,T=_.lastTickCount;return S!=null&&T!=null&&Math.abs(S-x)<=1&&Math.abs(T-o)<=1&&S>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=S:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}function LW(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function EE(r,e,t){var i=bu(r),a=r.scale,n=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var p=Ld(r),c=o.get("showMinLabel")||p,h=o.get("showMaxLabel")||p;c&&u!==n[0]&&d(n[0]);for(var v=u;v<=n[1];v+=l)d(v);h&&v-l!==n[1]&&d(n[1]);function d(m){var g={value:m};s.push(t?m:{formattedLabel:i(g),rawLabel:a.getLabel(g),tickValue:m})}return s}function PE(r,e,t){var i=r.scale,a=bu(r),n=[];return w(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;e(o.value,s)&&n.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),n}var zE=[0,1],EW=function(){function r(e,t,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=i||[0,0]}return r.prototype.contain=function(e){var t=this._extent,i=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=i&&e<=a},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Fl(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var i=this._extent;i[0]=e,i[1]=t},r.prototype.dataToCoord=function(e,t){var i=this._extent,a=this.scale;return e=a.normalize(e),this.onBand&&a.type==="ordinal"&&(i=i.slice(),RE(i,a.count())),kt(e,zE,i,t)},r.prototype.coordToData=function(e,t){var i=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(i=i.slice(),RE(i,a.count()));var n=kt(e,i,zE,t);return this.scale.scale(n)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),i=CE(this,t),a=i.ticks,n=k(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return PW(this,n,o,e.clamp),n},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var i=this.scale.getMinorTicks(t),a=k(i,function(n){return k(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return TE(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);i===0&&(i=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/i},r.prototype.calculateCategoryInterval=function(){return LE(this)},r}();function RE(r,e){var t=r[1]-r[0],i=e,a=t/i/2;r[0]+=a,r[1]-=a}function PW(r,e,t,i){var a=e.length;if(!r.onBand||t||!a)return;var n=r.getExtent(),o,s;if(a===1)e[0].coord=n[0],o=e[1]={coord:n[1]};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;w(e,function(h){h.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s},e.push(o)}var p=n[0]>n[1];c(e[0].coord,n[0])&&(i?e[0].coord=n[0]:e.shift()),i&&c(n[0],e[0].coord)&&e.unshift({coord:n[0]}),c(n[1],o.coord)&&(i?o.coord=n[1]:e.pop()),i&&c(o.coord,n[1])&&e.push({coord:n[1]});function c(h,v){return h=Qt(h),v=Qt(v),p?h>v:ha&&(a+=qp);var h=Math.atan2(s,o);if(h<0&&(h+=qp),h>=i&&h<=a||h+qp>=i&&h+qp<=a)return l[0]=f,l[1]=p,u-t;var v=t*Math.cos(i)+r,d=t*Math.sin(i)+e,m=t*Math.cos(a)+r,g=t*Math.sin(a)+e,y=(v-o)*(v-o)+(d-s)*(d-s),x=(m-o)*(m-o)+(g-s)*(g-s);return y0){e=e/180*Math.PI,oa.fromArray(r[0]),ue.fromArray(r[1]),Ee.fromArray(r[2]),bt.sub(Pa,oa,ue),bt.sub(Ea,Ee,ue);var t=Pa.len(),i=Ea.len();if(!(t<.001||i<.001)){Pa.scale(1/t),Ea.scale(1/i);var a=Pa.dot(Ea),n=Math.cos(e);if(n1&&bt.copy(Cr,Ee),Cr.toArray(r[1])}}}}function OE(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,oa.fromArray(r[0]),ue.fromArray(r[1]),Ee.fromArray(r[2]),bt.sub(Pa,ue,oa),bt.sub(Ea,Ee,ue);var i=Pa.len(),a=Ea.len();if(!(i<.001||a<.001)){Pa.scale(1/i),Ea.scale(1/a);var n=Pa.dot(e),o=Math.cos(t);if(n=l)bt.copy(Cr,Ee);else{Cr.scaleAndAdd(Ea,s/Math.tan(Math.PI/2-f));var p=Ee.x!==ue.x?(Cr.x-ue.x)/(Ee.x-ue.x):(Cr.y-ue.y)/(Ee.y-ue.y);if(isNaN(p))return;p<0?bt.copy(Cr,ue):p>1&&bt.copy(Cr,Ee)}Cr.toArray(r[1])}}}}function s_(r,e,t,i){var a=t==="normal",n=a?r:r.ensureState(t);n.ignore=e;var o=i.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();a?r.useStyle(s):n.style=s}function VW(r,e){var t=e.smooth,i=e.points;if(i)if(r.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var a=di(i[0],i[1]),n=di(i[1],i[2]);if(!a||!n){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var o=Math.min(a,n)*t,s=Il([],i[1],i[0],o/a),l=Il([],i[1],i[2],o/n),u=Il([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var f=1;f0&&n&&S(-p/o,0,o);var m=r[0],g=r[o-1],y,x;_(),y<0&&T(-y,.8),x<0&&T(x,.8),_(),b(y,x,1),b(x,y,-1),_(),y<0&&C(-y),x<0&&C(x);function _(){y=m.rect[e]-i,x=a-g.rect[e]-g.rect[t]}function b(A,D,M){if(A<0){var I=Math.min(D,-A);if(I>0){S(I*M,0,o);var L=I+A;L<0&&T(-L*M,1)}else T(-A*M,1)}}function S(A,D,M){A!==0&&(u=!0);for(var I=D;I0)for(var L=0;L0;L--){var U=M[L-1]*R;S(-U,L,o)}}}function C(A){var D=A<0?-1:1;A=Math.abs(A);for(var M=Math.ceil(A/(o-1)),I=0;I0?S(M,0,I+1):S(-M,o-I-1,o),A-=M,A<=0)return}return u}function VE(r,e,t,i){return kE(r,"x","width",e,t,i)}function Od(r,e,t,i){return kE(r,"y","height",e,t,i)}function kd(r){var e=[];r.sort(function(d,m){return m.priority-d.priority});var t=new rt(0,0,0,0);function i(d){if(!d.ignore){var m=d.ensureState("emphasis");m.ignore==null&&(m.ignore=!1)}d.ignore=!0}for(var a=0;a=0&&i.attr(n.oldLayoutSelect),nt(c,"emphasis")>=0&&i.attr(n.oldLayoutEmphasis)),_t(i,u,t,l)}else if(i.attr(u),!on(i).valueAnimation){var p=at(i.style.opacity,1);i.style.opacity=0,Ut(i,{style:{opacity:p}},t,l)}if(n.oldLayout=u,i.states.select){var h=n.oldLayoutSelect={};Vd(h,u,Ud),Vd(h,i.states.select,Ud)}if(i.states.emphasis){var v=n.oldLayoutEmphasis={};Vd(v,u,Ud),Vd(v,i.states.emphasis,Ud)}gv(i,l,f,t,t)}if(a&&!a.ignore&&!a.invisible){var n=FW(a),o=n.oldLayout,d={points:a.shape.points};o?(a.attr({shape:o}),_t(a,{shape:d},t)):(a.setShape(d),a.style.strokePercent=0,Ut(a,{style:{strokePercent:1}},t)),n.oldLayout=d}},r}(),BE=GW;var p_=ot();function c_(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var a=p_(t).labelManager;a||(a=p_(t).labelManager=new BE),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var a=p_(t).labelManager;i.updatedSeries.forEach(function(n){a.addLabelsOfSeries(t.getViewOfSeriesModel(n))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var h_=Math.sin,v_=Math.cos,FE=Math.PI,As=Math.PI*2,HW=180/FE,WW=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,i,a,n,o){this._add("C",e,t,i,a,n,o)},r.prototype.quadraticCurveTo=function(e,t,i,a){this._add("Q",e,t,i,a)},r.prototype.arc=function(e,t,i,a,n,o){this.ellipse(e,t,i,i,0,a,n,o)},r.prototype.ellipse=function(e,t,i,a,n,o,s,l){var u=s-o,f=!l,p=Math.abs(u),c=ga(p-As)||(f?u>=As:-u>=As),h=u>0?u%As:u%As+As,v=!1;c?v=!0:ga(p)?v=!1:v=h>=FE==!!f;var d=e+i*v_(o),m=t+a*h_(o);this._start&&this._add("M",d,m);var g=Math.round(n*HW);if(c){var y=1/this._p,x=(f?1:-1)*(As-y);this._add("A",i,a,g,1,+f,e+i*v_(o+x),t+a*h_(o+x)),y>.01&&this._add("A",i,a,g,0,+f,d,m)}else{var _=e+i*v_(s),b=t+a*h_(s);this._add("A",i,a,g,+v,+f,_,b)}},r.prototype.rect=function(e,t,i,a){this._add("M",e,t),this._add("l",i,0),this._add("l",0,a),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,i,a,n,o,s,l,u){for(var f=[],p=this._p,c=1;c"}function KW(r){return""}function Kp(r,e){e=e||{};var t=e.newline?` -`:"";function i(a){var n=a.children,o=a.tag,s=a.attrs,l=a.text;return jW(o,s)+(o!=="style"?Je(l):l||"")+(n?""+t+k(n,function(u){return i(u)}).join(t)+t:"")+KW(o)}return i(r)}function YE(r,e,t){t=t||{};var i=t.newline?` -`:"",a=" {"+i,n=i+"}",o=k(ft(r),function(l){return l+a+k(ft(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+n}).join(i),s=k(ft(e),function(l){return"@keyframes "+l+a+k(ft(e[l]),function(u){return u+a+k(ft(e[l][u]),function(f){var p=e[l][u][f];return f==="d"&&(p='path("'+p+'")'),f+":"+p+";"}).join(i)+n}).join(i)+n}).join(i);return!o&&!s?"":[""].join(i)}function Qp(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function x_(r,e,t,i){return Pe("svg","root",{width:r,height:e,xmlns:GE,"xmlns:xlink":g_,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+e:!1},t)}var QW=0;function Gd(){return QW++}var ZE={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ds="transform-origin";function $W(r,e,t){var i=N({},r.shape);N(i,e),r.buildPath(t,i);var a=new Bd;return a.reset(Ih(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function JW(r,e){var t=e.originX,i=e.originY;(t||i)&&(r[Ds]=t+"px "+i+"px")}var t6={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function qE(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function e6(r,e,t){var i=r.shape.paths,a={},n,o;if(w(i,function(l){var u=Qp(t.zrId);u.animation=!0,$p(l,{},u,!0);var f=u.cssAnims,p=u.cssNodes,c=ft(f),h=c.length;if(h){o=c[h-1];var v=f[o];for(var d in v){var m=v[d];a[d]=a[d]||{d:""},a[d].d+=m.d||""}for(var g in p){var y=p[g].animation;y.indexOf(o)>=0&&(n=y)}}}),!!n){e.d=!1;var s=qE(a,t);return n.replace(o,s)}}function XE(r){return F(r)?ZE[r]?"cubic-bezier("+ZE[r]+")":Rl(r)?r:"":""}function $p(r,e,t,i){var a=r.animators,n=a.length,o=[];if(r instanceof iu){var s=e6(r,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var Et=qE(T,t);return Et+" "+y[0]+" both"}}for(var m in l){var s=d(l[m]);s&&o.push(s)}if(o.length){var g=t.zrId+"-cls-"+Gd();t.cssNodes["."+g]={animation:o.join(",")},e.class=g}}function KE(r,e,t){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};jE(i,e,t,!0)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},n=a.fill;if(!n){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(n=Ef(l))}var u=a.lineWidth;if(u){var f=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var i={cursor:"pointer"};n&&(i.fill=n),a.stroke&&(i.stroke=a.stroke),u&&(i["stroke-width"]=u),jE(i,e,t,!0)}}function jE(r,e,t,i){var a=JSON.stringify(r),n=t.cssStyleCache[a];n||(n=t.zrId+"-cls-"+Gd(),t.cssStyleCache[a]=n,t.cssNodes["."+n+(i?":hover":"")]=r),e.class=e.class?e.class+" "+n:n}var Jp=Math.round;function t2(r){return r&&F(r.src)}function e2(r){return r&&X(r.toDataURL)}function __(r,e,t,i){m_(function(a,n){var o=a==="fill"||a==="stroke";o&&Mh(n)?T_(e,r,a,i):o&&Pf(n)?C_(t,r,a,i):o&&n==="none"?r[a]="transparent":r[a]=n},e,t,!1),l6(t,r,i)}function S_(r,e){var t=eA(e);t&&(t.each(function(i,a){i!=null&&(r[(y_+a).toLowerCase()]=i+"")}),e.isSilent()&&(r[y_+"silent"]="true"))}function QE(r){return ga(r[0]-1)&&ga(r[1])&&ga(r[2])&&ga(r[3]-1)}function r6(r){return ga(r[4])&&ga(r[5])}function b_(r,e,t){if(e&&!(r6(e)&&QE(e))){var i=t?10:1e4;r.transform=QE(e)?"translate("+Jp(e[4]*i)/i+" "+Jp(e[5]*i)/i+")":IC(e)}}function $E(r,e,t){for(var i=r.points,a=[],n=0;n"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";ne(c,m),ne(h,m)}else if(c==null||h==null){var g=function(D,M){if(D){var I=D.elm,L=c||M.width,P=h||M.height;D.tag==="pattern"&&(u?(P=1,L/=n.width):f&&(L=1,P/=n.height)),D.attrs.width=L,D.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},y=Zf(v,null,r,function(D){l||g(S,D),g(p,D)});y&&y.width&&y.height&&(c=c||y.width,h=h||y.height)}p=Pe("image","img",{href:v,width:c,height:h}),o.width=c,o.height=h}else a.svgElement&&(p=$(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(p){var x,_;l?x=_=1:u?(_=1,x=o.width/n.width):f?(x=1,_=o.height/n.height):o.patternUnits="userSpaceOnUse",x!=null&&!isNaN(x)&&(o.width=x),_!=null&&!isNaN(_)&&(o.height=_);var b=Lh(a);b&&(o.patternTransform=b);var S=Pe("pattern","",o,[p]),T=Kp(S),C=i.patternCache,A=C[T];A||(A=i.zrId+"-p"+i.patternIdx++,C[T]=A,o.id=A,S=i.defs[A]=Pe("pattern",A,o,[p])),e[t]=zf(A)}}function i2(r,e,t){var i=t.clipPathCache,a=t.defs,n=i[r.id];if(!n){n=t.zrId+"-c"+t.clipPathIdx++;var o={id:n};i[r.id]=n,a[n]=Pe("clipPath",n,o,[r2(r,t)])}e["clip-path"]=zf(n)}function A_(r){return document.createTextNode(r)}function oo(r,e,t){r.insertBefore(e,t)}function D_(r,e){r.removeChild(e)}function M_(r,e){r.appendChild(e)}function I_(r){return r.parentNode}function L_(r){return r.nextSibling}function Hd(r,e){r.textContent=e}var a2=58,f6=120,p6=Pe("","");function E_(r){return r===void 0}function za(r){return r!==void 0}function c6(r,e,t){for(var i={},a=e;a<=t;++a){var n=r[a].key;n!==void 0&&(i[n]=a)}return i}function tc(r,e){var t=r.key===e.key,i=r.tag===e.tag;return i&&t}function ec(r){var e,t=r.children,i=r.tag;if(za(i)){var a=r.elm=Fd(i);if(Yd(p6,r),O(t))for(e=0;en?(v=t[l+1]==null?null:t[l+1].elm,n2(r,v,t,a,l)):Wd(r,e,i,n))}function Du(r,e){var t=e.elm=r.elm,i=r.children,a=e.children;r!==e&&(Yd(r,e),E_(e.text)?za(i)&&za(a)?i!==a&&h6(t,i,a):za(a)?(za(r.text)&&Hd(t,""),n2(t,null,a,0,a.length-1)):za(i)?Wd(t,i,0,i.length-1):za(r.text)&&Hd(t,""):r.text!==e.text&&(za(i)&&Wd(t,i,0,i.length-1),Hd(t,e.text)))}function P_(r,e){if(tc(r,e))Du(r,e);else{var t=r.elm,i=I_(t);ec(e),i!==null&&(oo(i,e.elm,L_(t)),Wd(i,[r],0,0))}return e}var v6=0,d6=function(){function r(e,t,i){if(this.type="svg",this.refreshHover=o2("refreshHover"),this.configLayer=o2("configLayer"),this.storage=t,this._opts=i=N({},i),this.root=e,this._id="zr"+v6++,this._oldVNode=x_(i.width,i.height),e&&!i.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=Fd("svg");Yd(null,this._oldVNode),a.appendChild(n),e.appendChild(a)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",P_(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return w_(e,Qp(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),i=this._width,a=this._height,n=Qp(this._id);n.animation=e.animation,n.willUpdate=e.willUpdate,n.compress=e.compress,n.emphasis=e.emphasis;var o=[],s=this._bgVNode=m6(i,a,this._backgroundColor,n);s&&o.push(s);var l=e.compress?null:this._mainVNode=Pe("g","main",{},[]);this._paintList(t,n,l?l.children:o),l&&o.push(l);var u=k(ft(n.defs),function(c){return n.defs[c]});if(u.length&&o.push(Pe("defs","defs",{},u)),e.animation){var f=YE(n.cssNodes,n.cssAnims,{newline:!0});if(f){var p=Pe("style","stl",{},[],f);o.push(p)}}return x_(i,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},Kp(this.renderToVNode({animation:at(e.cssAnimation,!0),emphasis:at(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:at(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,i){for(var a=e.length,n=[],o=0,s,l,u=0,f=0;f=0&&!(c&&l&&c[d]===l[d]);d--);for(var m=v-1;m>d;m--)o--,s=n[o-1];for(var g=d+1;g=s)}}for(var p=this.__startIndex;p15)break}}P.prevElClipPaths&&g.restore()};if(y)if(y.length===0)C=m.__endIndex;else for(var D=h.dpr,M=0;M0&&e>a[0]){for(l=0;le);l++);s=i[a[l]]}if(a.splice(l+1,0,e),i[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,a=0;a0?Xd:0),this._needsManuallyCompositing),f.__builtin__||Io("ZLevel "+u+" has been used by unkown layer "+f.id),f!==n&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),n=f),a.__dirty&Ve&&!a.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(p,c){!p.__used&&p.getElementCount()>0&&(p.__dirty=!0,p.__startIndex=p.__endIndex=p.__drawIndex=0),p.__dirty&&p.__drawIndex<0&&(p.__drawIndex=p.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,w(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?lt(i[e],t,!0):i[e]=t;for(var a=0;a-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Rt),p2=b6;function sa(r,e){var t=r.mapDimensionsAll("defaultedLabel"),i=t.length;if(i===1){var a=pn(r,e,t[0]);return a!=null?a+"":null}else if(i){for(var n=[],o=0;o=0&&i.push(e[n])}return i.join(" ")}var w6=function(r){E(e,r);function e(t,i,a,n){var o=r.call(this)||this;return o.updateData(t,i,a,n),o}return e.prototype._createSymbol=function(t,i,a,n,o){this.removeAll();var s=Xt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=T6,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){cr(this.childAt(0))},e.prototype.downplay=function(){hr(this.childAt(0))},e.prototype.setZ=function(t,i){var a=this.childAt(0);a.zlevel=t,a.z=i},e.prototype.setDraggable=function(t,i){var a=this.childAt(0);a.draggable=t,a.cursor=!i&&t?"move":a.cursor},e.prototype.updateData=function(t,i,a,n){this.silent=!1;var o=t.getItemVisual(i,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,i),u=o!==this._symbolType,f=n&&n.disableAnimation;if(u){var p=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,t,i,l,p)}else{var c=this.childAt(0);c.silent=!1;var h={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(h):_t(c,h,s,i),Oe(c)}if(this._updateCommon(t,i,l,a,n),u){var c=this.childAt(0);if(!f){var h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Ut(c,h,s,i)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,i,a,n,o){var s=this.childAt(0),l=t.hostModel,u,f,p,c,h,v,d,m,g;if(n&&(u=n.emphasisItemStyle,f=n.blurItemStyle,p=n.selectItemStyle,c=n.focus,h=n.blurScope,d=n.labelStatesModels,m=n.hoverScale,g=n.cursorStyle,v=n.emphasisDisabled),!n||t.hasItemOption){var y=n&&n.itemModel?n.itemModel:t.getItemModel(i),x=y.getModel("emphasis");u=x.getModel("itemStyle").getItemStyle(),p=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),c=x.get("focus"),h=x.get("blurScope"),v=x.get("disabled"),d=Kt(y),m=x.getShallow("scale"),g=y.getShallow("cursor")}var _=t.getItemVisual(i,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var b=ui(t.getItemVisual(i,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var S=t.getItemVisual(i,"style"),T=S.fill;if(s instanceof re){var C=s.style;s.useStyle(N({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},S))}else s.__isEmptyBrush?s.useStyle(N({},S)):s.useStyle(S),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var A=t.getItemVisual(i,"liftZ"),D=this._z2;A!=null?D==null&&(this._z2=s.z2,s.z2+=A):D!=null&&(s.z2=D,this._z2=null);var M=o&&o.useNameLabel;ee(s,d,{labelFetcher:l,labelDataIndex:i,defaultText:I,inheritColor:T,defaultOpacity:S.opacity});function I(z){return M?t.getName(z):sa(t,z)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=p,s.ensureState("blur").style=f;var P=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Vt(this,c,h,v)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,i,a){var n=this.childAt(0),o=tt(this).dataIndex,s=a&&a.animation;if(this.silent=n.silent=!0,a&&a.fadeLabel){var l=n.getTextContent();l&&Ti(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Ti(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,i){return ea(t.getItemVisual(i,"symbolSize"))},e}(K);function T6(r,e){this.parent.drift(r,e)}var vn=w6;function N_(r,e,t,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(t))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function c2(r){return r!=null&&!j(r)&&(r={isIgnore:r}),r||{}}function h2(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Kt(e),cursorStyle:e.get("cursor")}}var C6=function(){function r(e){this.group=new K,this._SymbolCtor=e||vn}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=c2(t);var i=this.group,a=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=h2(e),u={disableAnimation:s},f=t.getSymbolPoint||function(p){return e.getItemLayout(p)};n||i.removeAll(),e.diff(n).add(function(p){var c=f(p);if(N_(e,c,p,t)){var h=new o(e,p,l,u);h.setPosition(c),e.setItemGraphicEl(p,h),i.add(h)}}).update(function(p,c){var h=n.getItemGraphicEl(c),v=f(p);if(!N_(e,v,p,t)){i.remove(h);return}var d=e.getItemVisual(p,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==d)i.remove(h),h=new o(e,p,l,u),h.setPosition(v);else{h.updateData(e,p,l,u);var g={x:v[0],y:v[1]};s?h.attr(g):_t(h,g,a)}i.add(h),e.setItemGraphicEl(p,h)}).remove(function(p){var c=n.getItemGraphicEl(p);c&&c.fadeOut(function(){i.remove(c)},a)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(i,a){var n=e._getSymbolPoint(a);i.setPosition(n),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=h2(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=c2(i);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0?t=i[0]:i[1]<0&&(t=i[1]),t}function Kd(r,e,t,i){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),i)),isNaN(a)&&(a=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=t.get(r.baseDim,i),o[1-n]=a,e.dataToPoint(o)}function D6(r,e){var t=[];return e.diff(r).add(function(i){t.push({cmd:"+",idx:i})}).update(function(i,a){t.push({cmd:"=",idx:a,idx1:i})}).remove(function(i){t.push({cmd:"-",idx:i})}).execute(),t}function O_(r,e,t,i,a,n,o,s){for(var l=D6(r,e),u=[],f=[],p=[],c=[],h=[],v=[],d=[],m=jd(a,e,o),g=r.getLayout("points")||[],y=e.getLayout("points")||[],x=0;x=a||d<0)break;if(Is(g,y)){if(l){d+=n;continue}break}if(d===t)r[n>0?"moveTo":"lineTo"](g,y),p=g,c=y;else{var x=g-u,_=y-f;if(x*x+_*_<.5){d+=n;continue}if(o>0){for(var b=d+n,S=e[b*2],T=e[b*2+1];S===g&&T===y&&m=i||Is(S,T))h=g,v=y;else{D=S-u,M=T-f;var P=g-u,z=S-g,R=y-f,U=T-y,V=void 0,B=void 0;if(s==="x"){V=Math.abs(P),B=Math.abs(z);var Z=D>0?1:-1;h=g-Z*V*o,v=y,I=g+Z*B*o,L=y}else if(s==="y"){V=Math.abs(R),B=Math.abs(U);var Q=M>0?1:-1;h=g,v=y-Q*V*o,I=g,L=y+Q*B*o}else V=Math.sqrt(P*P+R*R),B=Math.sqrt(z*z+U*U),A=B/(B+V),h=g-D*o*(1-A),v=y-M*o*(1-A),I=g+D*o*A,L=y+M*o*A,I=so(I,lo(S,g)),L=so(L,lo(T,y)),I=lo(I,so(S,g)),L=lo(L,so(T,y)),D=I-g,M=L-y,h=g-D*V/B,v=y-M*V/B,h=so(h,lo(u,g)),v=so(v,lo(f,y)),h=lo(h,so(u,g)),v=lo(v,so(f,y)),D=g-h,M=y-v,I=g+D*B/V,L=y+M*B/V}r.bezierCurveTo(p,c,h,v,g,y),p=I,c=L}else r.lineTo(g,y)}u=g,f=y,d+=n}return m}var v2=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),d2=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new v2},e.prototype.buildPath=function(t,i){var a=i.points,n=0,o=a.length/2;if(i.connectNulls){for(;o>0&&Is(a[o*2-2],a[o*2-1]);o--);for(;n=0){var _=u?(v-l)*x+l:(h-s)*x+s;return u?[t,_]:[_,t]}s=h,l=v;break;case o.C:h=n[p++],v=n[p++],d=n[p++],m=n[p++],g=n[p++],y=n[p++];var b=u?Vo(s,h,d,g,t,f):Vo(l,v,m,y,t,f);if(b>0)for(var S=0;S=0){var _=u?ye(l,v,m,y,T):ye(s,h,d,g,T);return u?[t,_]:[_,t]}}s=g,l=y;break}}},e}(it);var M6=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(v2),Qd=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new M6},e.prototype.buildPath=function(t,i){var a=i.points,n=i.stackedOnPoints,o=0,s=a.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&Is(a[s*2-2],a[s*2-1]);s--);for(;oe){n?t.push(o(n,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),n=l}return t}function E6(r,e,t){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&e.type==="cartesian2d"){for(var a,n,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){n=i[o];break}}if(n){var l=e.getAxis(a),u=k(n.stops,function(x){return{coord:l.toGlobalCoord(l.dataToCoord(x.value)),color:x.color}}),f=u.length,p=n.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),p.reverse());var c=L6(u,a==="x"?t.getWidth():t.getHeight()),h=c.length;if(!h&&f)return u[0].coord<0?p[1]?p[1]:u[f-1].color:p[0]?p[0]:u[0].color;var v=10,d=c[0].coord-v,m=c[h-1].coord+v,g=m-d;if(g<.001)return"transparent";w(c,function(x){x.offset=(x.coord-d)/g}),c.push({offset:h?c[h-1].offset:.5,color:p[1]||"transparent"}),c.unshift({offset:h?c[0].offset:.5,color:p[0]||"transparent"});var y=new Aa(0,0,0,0,c,!0);return y[a]=d,y[a+"2"]=m,y}}}function P6(r,e,t){var i=r.get("showAllSymbol"),a=i==="auto";if(!(i&&!a)){var n=t.getAxesByScale("ordinal")[0];if(n&&!(a&&z6(n,e))){var o=e.mapDimension(n.dim),s={};return w(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function z6(r,e){var t=r.getExtent(),i=Math.abs(t[1]-t[0])/r.scale.count();isNaN(i)&&(i=0);for(var a=e.count(),n=Math.max(1,Math.round(a/5)),o=0;oi)return!1;return!0}function R6(r,e){return isNaN(r)||isNaN(e)}function N6(r){for(var e=r.length/2;e>0&&R6(r[e*2-2],r[e*2-1]);e--);return e-1}function _2(r,e){return[r[e*2],r[e*2+1]]}function O6(r,e,t){for(var i=r.length/2,a=t==="x"?0:1,n,o,s=0,l=-1,u=0;u=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function S2(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var Z=d.getState("emphasis").style;Z.lineWidth=+d.style.lineWidth+1}tt(d).seriesIndex=t.seriesIndex,Vt(d,U,V,B);var Q=x2(t.get("smooth")),st=t.get("smoothMonotone");if(d.setShape({smooth:Q,smoothMonotone:st,connectNulls:C}),m){var ct=l.getCalculationInfo("stackedOnSeries"),pt=0;m.useStyle(q(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),ct&&(pt=x2(ct.get("smooth"))),m.setShape({smooth:Q,stackedOnSmooth:pt,smoothMonotone:st,connectNulls:C}),se(m,t,"areaStyle"),tt(m).seriesIndex=t.seriesIndex,Vt(m,U,V,B)}var Lt=function(Bt){n._changePolyState(Bt)};l.eachItemGraphicEl(function(Bt){Bt&&(Bt.onHoverStateChange=Lt)}),this._polyline.onHoverStateChange=Lt,this._data=l,this._coordSys=o,this._stackedOnPoints=S,this._points=p,this._step=M,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,d),m&&this.packEventData(t,m))},e.prototype.packEventData=function(t,i){tt(i).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,i,a,n){var o=t.getData(),s=Si(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],p=l[s*2+1];if(isNaN(f)||isNaN(p)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,p))return;var c=t.get("zlevel")||0,h=t.get("z")||0;u=new vn(o,s),u.x=f,u.y=p,u.setZ(c,h);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=c,v.z=h,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else It.prototype.highlight.call(this,t,i,a,n)},e.prototype.downplay=function(t,i,a,n){var o=t.getData(),s=Si(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else It.prototype.downplay.call(this,t,i,a,n)},e.prototype._changePolyState=function(t){var i=this._polygon;os(this._polyline,t),i&&os(i,t)},e.prototype._newPolyline=function(t){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new d2({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(t,i){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new Qd({shape:{points:t,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,i,a){var n,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):i.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");X(f)&&(f=f(null));var p=u.get("animationDelay")||0,c=X(p)?p(null):p;t.eachItemGraphicEl(function(h,v){var d=h;if(d){var m=[h.x,h.y],g=void 0,y=void 0,x=void 0;if(a)if(o){var _=a,b=i.pointToCoord(m);n?(g=_.startAngle,y=_.endAngle,x=-b[1]/180*Math.PI):(g=_.r0,y=_.r,x=b[0])}else{var S=a;n?(g=S.x,y=S.x+S.width,x=h.x):(g=S.y+S.height,y=S.y,x=h.y)}var T=y===g?0:(x-g)/(y-g);l&&(T=1-T);var C=X(p)?p(v):f*T+c,A=d.getSymbolPath(),D=A.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:C}),A.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,i,a){var n=t.getModel("endLabel");if(S2(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new yt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=N6(l);f>=0&&(ee(s,Kt(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:f,defaultText:function(p,c,h){return h!=null?qd(o,h):sa(o,p)},enableTextSetter:!0},k6(n,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,i,a,n,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var p=a.getLayout("points"),c=a.hostModel,h=c.get("connectNulls"),v=s.get("precision"),d=s.get("distance")||0,m=l.getBaseAxis(),g=m.isHorizontal(),y=m.inverse,x=i.shape,_=y?g?x.x:x.y+x.height:g?x.x+x.width:x.y,b=(g?d:0)*(y?-1:1),S=(g?0:-d)*(y?-1:1),T=g?"x":"y",C=O6(p,_,T),A=C.range,D=A[1]-A[0],M=void 0;if(D>=1){if(D>1&&!h){var I=_2(p,A[0]);u.attr({x:I[0]+b,y:I[1]+S}),o&&(M=c.getRawValue(A[0]))}else{var I=f.getPointOn(_,T);I&&u.attr({x:I[0]+b,y:I[1]+S});var L=c.getRawValue(A[0]),P=c.getRawValue(A[1]);o&&(M=Hh(a,v,L,P,C.t))}n.lastFrameIndex=A[0]}else{var z=t===1||n.lastFrameIndex>0?A[0]:0,I=_2(p,z);o&&(M=c.getRawValue(z)),u.attr({x:I[0]+b,y:I[1]+S})}if(o){var R=on(u);typeof R.setLabelText=="function"&&R.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,i,a,n,o,s,l){var u=this._polyline,f=this._polygon,p=t.hostModel,c=O_(this._data,t,this._stackedOnPoints,i,this._coordSys,a,this._valueOrigin,s),h=c.current,v=c.stackedOnCurrent,d=c.next,m=c.stackedOnNext;if(o&&(h=uo(c.current,a,o,l),v=uo(c.stackedOnCurrent,a,o,l),d=uo(c.next,a,o,l),m=uo(c.stackedOnNext,a,o,l)),y2(h,d)>3e3||f&&y2(v,m)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:m}));return}u.shape.__points=c.current,u.shape.points=h;var g={shape:{points:d}};c.current!==h&&(g.shape.__points=c.next),u.stopAnimation(),_t(u,g,p),f&&(f.setShape({points:h,stackedOnPoints:v}),f.stopAnimation(),_t(f,{shape:{stackedOnPoints:m}},p),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],x=c.status,_=0;_e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;te&&(e=n,t=a)}return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},B6=function(r){return Math.round(r.length/2)};function rc(r){return{seriesType:r,reset:function(e,t,i){var a=e.getData(),n=e.get("sampling"),o=e.coordinateSystem,s=a.count();if(s>10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),p=i.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(p||1),h=Math.round(s/c);if(isFinite(h)&&h>1){n==="lttb"&&e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/h));var v=void 0;F(n)?v=U6[n]:X(n)&&(v=n),v&&e.setData(a.downSample(a.mapDimension(u.dim),1/h,v,B6))}}}}}function F_(r){r.registerChartView(b2),r.registerSeriesModel(p2),r.registerLayout(la("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,rc("line"))}var w2=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return Ke(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,i,a){var n=this.coordinateSystem;if(n&&n.clampData){var o=n.clampData(t),s=n.dataToPoint(o);if(a)w(n.getAxes(),function(c,h){if(c.type==="category"&&i!=null){var v=c.getTicksCoords(),d=c.getTickModel().get("alignWithLabel"),m=o[h],g=i[h]==="x1"||i[h]==="y1";if(g&&!d&&(m+=1),v.length<2)return;if(v.length===2){s[h]=c.toGlobalCoord(c.getExtent()[g?1:0]);return}for(var y=void 0,x=void 0,_=1,b=0;bm){x=(S+y)/2;break}b===1&&(_=T-v[0].tickValue)}x==null&&(y?y&&(x=v[v.length-1].coord):x=v[0].coord),s[h]=c.toGlobalCoord(x)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),p=n.getBaseAxis().isHorizontal()?0:1;s[p]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Rt);Rt.registerClass(w2);var Mu=w2;var F6=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return Ke(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>t&&(t=i),t},e.prototype.brushSelector=function(t,i,a){return a.rect(i.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=mr(Mu.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Mu),T2=F6;var G6=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),H6=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new G6},e.prototype.buildPath=function(t,i){var a=i.cx,n=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,f=i.startAngle,p=i.endAngle,c=i.clockwise,h=Math.PI*2,v=c?p-fMath.PI/2&&fs)return!0;s=p}return!1},e.prototype._isOrderDifferentInView=function(t,i){for(var a=i.scale,n=a.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,i,a,n){if(this._isOrderChangedWithinSameData(t,i,a)){var o=this._dataSort(t,a,i);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,i,a){var n=i.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(i.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(t,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var i=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(n){en(n,t,tt(n).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(It),D2={cartesian2d:function(r,e){var t=e.width<0?-1:1,i=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,n=r.y+r.height,o=G_(e.x,r.x),s=H_(e.x+e.width,a),l=G_(e.y,r.y),u=H_(e.y+e.height,n),f=sa?s:o,e.y=p&&l>n?u:l,e.width=f?0:s-o,e.height=p?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),f||p},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}var a=H_(e.r,r.r),n=G_(e.r0,r.r0);e.r=a,e.r0=n;var o=a-n<0;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}return o}},M2={cartesian2d:function(r,e,t,i,a,n,o,s,l){var u=new ht({shape:N({},i),z2:1});if(u.__dataIndex=t,u.name="item",n){var f=u.shape,p=a?"height":"width";f[p]=0}return u},polar:function(r,e,t,i,a,n,o,s,l){var u=!a&&l?Iu:we,f=new u({shape:i,z2:1});f.name="item";var p=O2(a);if(f.calculateTextPosition=C2(p,{isRoundCap:u===Iu}),n){var c=f.shape,h=a?"r":"endAngle",v={};c[h]=a?i.r0:i.startAngle,v[h]=i[h],(s?_t:Ut)(f,{shape:v},n)}return f}};function Z6(r,e){var t=r.get("realtimeSort",!0),i=e.getBaseAxis();if(t&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function I2(r,e,t,i,a,n,o,s){var l,u;n?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?_t:Ut)(t,{shape:l},e,a,null);var f=e?r.baseAxis.model:null;(o?_t:Ut)(t,{shape:u},f,a)}function L2(r,e){for(var t=0;t0?1:-1,o=i.height>0?1:-1;return{x:i.x+n*a/2,y:i.y+o*a/2,width:i.width-n*a,height:i.height-o*a}},polar:function(r,e,t){var i=r.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function j6(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function O2(r){return function(e){var t=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+t;default:return i}}}(r)}function P2(r,e,t,i,a,n,o,s){var l=e.getItemVisual(t,"style");if(s){if(!n.get("roundCap")){var f=r.shape,p=Oa(i.getModel("itemStyle"),f,!0);N(f,p),r.setShape(f)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=i.getShallow("cursor");c&&r.attr("cursor",c);var h=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",v=Kt(i);ee(r,v,{labelFetcher:n,labelDataIndex:t,defaultText:sa(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=r.getTextContent();if(s&&d){var m=i.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,A2(r,m==="outside"?h:m,O2(o),i.get(["label","rotate"]))}mv(d,v,n.getRawValue(t),function(y){return qd(e,y)});var g=i.getModel(["emphasis"]);Vt(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),se(r,i),j6(a)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function K6(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,a,n)}var Q6=function(){function r(){}return r}(),z2=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new Q6},e.prototype.buildPath=function(t,i){for(var a=i.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function $6(r,e,t){for(var i=r.baseDimIdx,a=1-i,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,p=n.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function k2(r,e,t){if(Pi(t,"cartesian2d")){var i=e,a=t.getArea();return{x:r?i.x:a.x,y:r?a.y:i.y,width:r?i.width:a.width,height:r?a.height:i.height}}else{var a=t.getArea(),n=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:n.r0,r:r?a.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function J6(r,e,t){var i=r.type==="polar"?we:ht;return new i({shape:k2(e,t,r),silent:!0,z2:0})}var V2=Y6;function W_(r){r.registerChartView(V2),r.registerSeriesModel(T2),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,et(Sd,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bd("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,rc("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var U2=Math.PI*2,em=Math.PI/180;function B2(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Y_(r,e){var t=B2(r,e),i=r.get("center"),a=r.get("radius");O(a)||(a=[0,a]);var n=H(t.width,e.getWidth()),o=H(t.height,e.getHeight()),s=Math.min(n,o),l=H(a[0],s/2),u=H(a[1],s/2),f,p,c=r.coordinateSystem;if(c){var h=c.dataToPoint(i);f=h[0]||0,p=h[1]||0}else O(i)||(i=[i,i]),f=H(i[0],n)+t.x,p=H(i[1],o)+t.y;return{cx:f,cy:p,r0:l,r:u}}function Z_(r,e,t){e.eachSeriesByType(r,function(i){var a=i.getData(),n=a.mapDimension("value"),o=B2(i,t),s=Y_(i,t),l=s.cx,u=s.cy,f=s.r,p=s.r0,c=-i.get("startAngle")*em,h=i.get("endAngle"),v=i.get("padAngle")*em;h=h==="auto"?c-U2:-h*em;var d=i.get("minAngle")*em,m=d+v,g=0;a.each(n,function(R){!isNaN(R)&&g++});var y=a.getSum(n),x=Math.PI/(y||g)*2,_=i.get("clockwise"),b=i.get("roseType"),S=i.get("stillShowZeroSum"),T=a.getDataExtent(n);T[0]=0;var C=_?1:-1,A=[c,h],D=C*v/2;qf(A,!_),c=A[0],h=A[1];var M=Math.abs(h-c),I=M,L=0,P=c;if(a.setLayout({viewRect:o,r:f}),a.each(n,function(R,U){var V;if(isNaN(R)){a.setItemLayout(U,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:p,r:b?NaN:f});return}b!=="area"?V=y===0&&S?x:R*x:V=M/g,VV?(Z=P+C*V/2,Q=Z):(Z=P+D,Q=B-D),a.setItemLayout(U,{angle:V,startAngle:Z,endAngle:Q,clockwise:_,cx:l,cy:u,r0:p,r:b?kt(R,T,[p,f]):f}),P=B}),It?g:m,b=Math.abs(x.label.y-t);if(b>=_.maxY){var S=x.label.x-e-x.len2*a,T=i+x.len,C=Math.abs(S)r.unconstrainedWidth?null:h:null;i.setStyle("width",v)}var d=i.getBoundingRect();n.width=d.width;var m=(i.style.margin||0)+2.1;n.height=d.height+m,n.y-=(n.height-p)/2}}}function X_(r){return r.position==="center"}function q_(r){var e=r.getData(),t=[],i,a,n=!1,o=(r.get("minShowLabelAngle")||0)*t7,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,p=s.y,c=s.height;function h(S){S.ignore=!0}function v(S){if(!S.ignore)return!0;for(var T in S.states)if(S.states[T].ignore===!1)return!0;return!1}e.each(function(S){var T=e.getItemGraphicEl(S),C=T.shape,A=T.getTextContent(),D=T.getTextGuideLine(),M=e.getItemModel(S),I=M.getModel("label"),L=I.get("position")||M.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),z=I.get("alignTo"),R=H(I.get("edgeDistance"),u),U=I.get("bleedMargin"),V=M.getModel("labelLine"),B=V.get("length");B=H(B,u);var Z=V.get("length2");if(Z=H(Z,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":st>0?"left":"right"}var _e=Math.PI,de=0,fr=I.get("rotate");if(vt(fr))de=fr*(_e/180);else if(L==="center")de=0;else if(fr==="radial"||fr===!0){var Ha=st<0?-Q+_e:-Q;de=Ha}else if(fr==="tangential"&&L!=="outside"&&L!=="outer"){var Ir=Math.atan2(st,ct);Ir<0&&(Ir=_e*2+Ir);var Bc=ct>0;Bc&&(Ir=_e+Ir),de=Ir-_e}if(n=!!de,A.x=pt,A.y=Lt,A.rotation=de,A.setStyle({verticalAlign:"middle"}),gt){A.setStyle({align:Et});var zg=A.states.select;zg&&(zg.x+=A.x,zg.y+=A.y)}else{var _n=A.getBoundingRect().clone();_n.applyTransform(A.getComputedTransform());var oT=(A.style.margin||0)+2.1;_n.y-=oT/2,_n.height+=oT,t.push({label:A,labelLine:D,position:L,len:B,len2:Z,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new bt(st,ct),linePoints:Bt,textAlign:Et,labelDistance:P,labelAlignTo:z,edgeDistance:R,bleedMargin:U,rect:_n,unconstrainedWidth:_n.width,labelStyleWidth:A.style.width})}T.setTextConfig({inside:gt})}}),!n&&r.get("avoidLabelOverlap")&&e7(t,i,a,l,u,c,f,p);for(var d=0;d0){for(var f=o.getItemLayout(0),p=1;isNaN(f&&f.startAngle)&&p=n.r0}},e.type="pie",e}(It),H2=i7;function pi(r,e,t){e=O(e)&&{coordDimensions:e}||N({encodeDefine:r.getEncode()},e);var i=r.getSource(),a=ia(i,e).dimensions,n=new ve(a,r);return n.initData(i,t),n}var a7=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,t)},r}(),ka=a7;var n7=ot(),o7=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ka(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return pi(this,{coordDimensions:["value"],encodeDefaulter:et(hu,this)})},e.prototype.getDataParams=function(t){var i=this.getData(),a=n7(i),n=a.seats;if(!n){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),n=a.seats=Ry(o,i.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=n[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){ai(t,"labelLine",["show"]);var i=t.labelLine,a=t.emphasis.labelLine;i.show=i.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Rt),W2=o7;function j_(r){return{seriesType:r,reset:function(e,t){var i=e.getData();i.filterSelf(function(a){var n=i.mapDimension("value"),o=i.get(n,a);return!(vt(o)&&!isNaN(o)&&o<0)})}}}function K_(r){r.registerChartView(H2),r.registerSeriesModel(W2),rd("pie",r.registerAction),r.registerLayout(et(Z_,"pie")),r.registerProcessor(ua("pie")),r.registerProcessor(j_("pie"))}var s7=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return Ke(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,i,a){return a.point(i.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Rt),Y2=s7;var Z2=4,l7=function(){function r(){}return r}(),u7=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new l7},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,i){var a=i.points,n=i.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]=0;u--){var f=u*2,p=n[f]-s/2,c=n[f+1]-l/2;if(t>=p&&i>=c&&t<=p+s&&i<=c+l)return u}return-1},e.prototype.contain=function(t,i){var a=this.transformCoordToLocal(t,i),n=this.getBoundingRect();if(t=a[0],i=a[1],n.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,a=i.points,n=i.size,o=n[0],s=n[1],l=1/0,u=1/0,f=-1/0,p=-1/0,c=0;c=0&&(u.dataIndex=p+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),X2=f7;var p7=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,a){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,i,a){this._symbolDraw.incrementalUpdate(t,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=t.end===i.getData().count()},e.prototype.updateTransform=function(t,i,a){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=la("").reset(t,i,a);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var i=t.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,i){var a=this._symbolDraw,n=i.pipelineContext,o=n.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new X2:new Ra,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(It),q2=p7;var c7=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(xt),j2=c7;var rm=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",$t).models[0]},e.type="cartesian2dAxis",e}(xt);jt(rm,La);var K2={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},h7=lt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},K2),Q_=lt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},K2),v7=lt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Q_),d7=q({logBase:10},Q_),im={category:h7,value:Q_,time:v7,log:d7};var Q2={value:1,category:1,time:1,log:1};function fa(r,e,t,i){w(Q2,function(a,n){var o=lt(lt({},im[n],!0),i,!0),s=function(l){E(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+n,f}return u.prototype.mergeDefaultAndTheme=function(f,p){var c=qn(this),h=c?Ai(f):{},v=p.getTheme();lt(f,v.get(n+"Axis")),lt(f,this.getDefaultOption()),f.type=$2(f),c&&Wr(f,h,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Gp.createByAxisModel(this))},u.prototype.getCategories=function(f){var p=this.option;if(p.type==="category")return f?p.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+n,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",$2)}function $2(r){return r.type||(r.data?"category":"value")}var m7=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return k(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Dt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),J2=m7;var am=["x","y"];function tP(r){return r.type==="interval"||r.type==="time"}var g7=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=am,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!tP(t)||!tP(i))){var a=t.getExtent(),n=i.getExtent(),o=this.dataToPoint([a[0],n[0]]),s=this.dataToPoint([a[1],n[1]]),l=a[1]-a[0],u=n[1]-n[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,p=(s[1]-o[1])/u,c=o[0]-a[0]*f,h=o[1]-n[0]*p,v=this._transform=[f,0,0,p,c,h];this._invTransform=mi([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var i=this.getAxis("x"),a=this.getAxis("y");return i.contain(i.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,i){var a=this.dataToPoint(t),n=this.dataToPoint(i),o=this.getArea(),s=new rt(a[0],a[1],n[0]-a[0],n[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,i,a){a=a||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return ge(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(n,i)),a[1]=l.toGlobalCoord(l.dataToCoord(o,i)),a},e.prototype.clampData=function(t,i){var a=this.getAxis("x").scale,n=this.getAxis("y").scale,o=a.getExtent(),s=n.getExtent(),l=a.parse(t[0]),u=n.parse(t[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},e.prototype.pointToData=function(t,i){var a=[];if(this._invTransform)return ge(a,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return a[0]=n.coordToData(n.toLocalCoord(t[0]),i),a[1]=o.coordToData(o.toLocalCoord(t[1]),i),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var i=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),n=Math.min(i[0],i[1])-t,o=Math.min(a[0],a[1])-t,s=Math.max(i[0],i[1])-n+t,l=Math.max(a[0],a[1])-o+t;return new rt(n,o,s,l)},e}(J2),eP=g7;var y7=function(r){E(e,r);function e(t,i,a,n,o){var s=r.call(this,t,i,a)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),t&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(t,i){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Qe),rP=y7;function ic(r,e,t){t=t||{};var i=r.coordinateSystem,a=e.axis,n={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,f=i.getRect(),p=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},h=e.get("offset")||0,v=u==="x"?[p[2]-h,p[3]+h]:[p[0]-h,p[1]+h];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));v[c.onZero]=Math.max(Math.min(d,v[1]),v[0])}n.position=[u==="y"?v[c[l]]:p[0],u==="x"?v[c[l]]:p[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=m[s],n.labelOffset=o?v[c[s]]-v[c.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),ae(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var g=e.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-g:g,n.z2=1,n}function $_(r){return r.get("coordinateSystem")==="cartesian2d"}function J_(r){var e={xAxisModel:null,yAxisModel:null};return w(e,function(t,i){var a=i.replace(/Model$/,""),n=r.getReferringComponents(a,$t).models[0];e[i]=n}),e}var tS=Math.log;function nm(r,e,t){var i=jr.prototype,a=i.getTicks.call(t),n=i.getTicks.call(t,!0),o=a.length-1,s=i.getInterval.call(t),l=e_(r,e),u=l.extent,f=l.fixMin,p=l.fixMax;if(r.type==="log"){var c=tS(r.base);u=[tS(u[0])/c,tS(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:p});var h=i.getExtent.call(r);f&&(u[0]=h[0]),p&&(u[1]=h[1]);var v=i.getInterval.call(r),d=u[0],m=u[1];if(f&&p)v=(m-d)/o;else if(f)for(m=u[0]+v*o;mu[0]&&isFinite(d)&&isFinite(u[0]);)v=xd(v),d=u[1]-v*o;else{var g=r.getTicks().length-1;g>o&&(v=xd(v));var y=v*o;m=Math.ceil(u[1]/v)*v,d=Qt(m-y),d<0&&u[0]>=0?(d=0,m=Qt(y)):m>0&&u[1]<=0&&(m=0,d=-Qt(y))}var x=(a[0].value-n[0].value)/s,_=(a[o].value-n[o].value)/s;if(i.setExtent.call(r,d+v*x,m+v*_),i.setInterval.call(r,v),(x||_)&&i.setNiceExtent.call(r,d+v,m-v),0)var b}var x7=function(){function r(e,t,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=am,this._initCartesian(e,t,i),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=ft(o),u=l.length;if(u){for(var f=[],p=u-1;p>=0;p--){var c=+l[p],h=o[c],v=h.model,d=h.scale;Hp(d)&&v.get("alignTicks")&&v.get("interval")==null?f.push(h):(Ia(d,v),Hp(d)&&(s=h))}f.length&&(s||(s=f.pop(),Ia(s.scale,s.model)),w(f,function(m){nm(m.scale,m.model,s.scale)}))}}a(i.x),a(i.y);var n={};w(i.x,function(o){aP(i,"y",o,n)}),w(i.y,function(o){aP(i,"x",o,n)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,i){var a=e.getBoxLayoutParams(),n=!i&&e.get("containLabel"),o=Zt(a,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),n&&(w(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=mE(u);if(f){var p=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[p]-=f[p]+c,u.position==="top"?o.y+=f.height+c:u.position==="left"&&(o.x+=f.width+c)}}}),l()),w(this._coordsList,function(u){u.calcAffineTransform()});function l(){w(s,function(u){var f=u.isHorizontal(),p=f?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(p[c],p[1-c]),_7(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var i=this._axesMap[e];if(i!=null)return i[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var i="x"+e+"y"+t;return this._coordsMap[i]}j(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,n=this._coordsList;a0?"top":"bottom",n="center"):qa(a-fo)?(o=i>0?"bottom":"top",n="center"):(o="middle",a>0&&a0?"right":"left":n=i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),sP={axisLine:function(r,e,t,i){var a=e.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var n=e.axis.getExtent(),o=i.transform,s=[n[0],0],l=[n[1],0],u=s[0]>l[0];o&&(ge(s,s,o),ge(l,l,o));var f=N({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),p=new fe({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});rn(p.shape,p.style.lineWidth),p.anid="line",t.add(p);var c=e.get(["axisLine","symbol"]);if(c!=null){var h=e.get(["axisLine","symbolSize"]);F(c)&&(c=[c,c]),(F(h)||vt(h))&&(h=[h,h]);var v=ui(e.get(["axisLine","symbolOffset"])||0,h),d=h[0],m=h[1];w([{rotate:r.rotation+Math.PI/2,offset:v[0],r:0},{rotate:r.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,y){if(c[y]!=="none"&&c[y]!=null){var x=Xt(c[y],-d/2,-m/2,d,m,f.stroke,!0),_=g.r+g.offset,b=u?l:s;x.attr({rotation:g.rotate,x:b[0]+_*Math.cos(r.rotation),y:b[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),t.add(x)}})}}},axisTickLabel:function(r,e,t,i){var a=w7(t,i,e,r),n=C7(t,i,e,r);if(b7(e,n,a),T7(t,i,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=Nd(k(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));kd(o)}},axisName:function(r,e,t,i){var a=ae(r.axisName,e.get("name"));if(a){var n=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,p=[n==="start"?u[0]-f*l:n==="end"?u[1]+f*l:(u[0]+u[1])/2,uP(n)?r.labelOffset+o*l:0],c,h=e.get("nameRotate");h!=null&&(h=h*fo/180);var v;uP(n)?c=Ls.innerTextLayout(r.rotation,h??r.rotation,o):(c=S7(r.rotation,n,h||0,u),v=r.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(c.rotation)),!isFinite(v)&&(v=null)));var d=s.getFont(),m=e.get("nameTruncate",!0)||{},g=m.ellipsis,y=ae(r.nameTruncateMaxWidth,m.maxWidth,v),x=new yt({x:p[0],y:p[1],rotation:c.rotation,silent:Ls.isLabelSilent(e),style:Ht(s,{text:a,font:d,overflow:"truncate",width:y,ellipsis:g,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(ji({el:x,componentModel:e,itemName:a}),x.__fullText=a,x.anid="name",e.get("triggerEvent")){var _=Ls.makeAxisEventDataBase(e);_.targetType="axisName",_.name=a,tt(x).eventData=_}i.add(x),x.updateTransform(),t.add(x),x.decomposeTransform()}}};function S7(r,e,t,i){var a=Ff(t-r),n,o,s=i[0]>i[1],l=e==="start"&&!s||e!=="start"&&s;return qa(a-fo/2)?(o=l?"bottom":"top",n="center"):qa(a-fo*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",afo/2?n=l?"left":"right":n=l?"right":"left"),{rotation:a,textAlign:n,textVerticalAlign:o}}function b7(r,e,t){if(!Ld(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],p=t[t.length-1],c=t[t.length-2];i===!1?(zi(n),zi(u)):lP(n,o)&&(i?(zi(o),zi(f)):(zi(n),zi(u))),a===!1?(zi(s),zi(p)):lP(l,s)&&(a?(zi(l),zi(c)):(zi(s),zi(p)))}}function zi(r){r&&(r.ignore=!0)}function lP(r,e){var t=r&&r.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var a=Ln([]);return Rr(a,a,-r.rotation),t.applyTransform(zr([],a,r.getLocalTransform())),i.applyTransform(zr([],a,e.getLocalTransform())),t.intersect(i)}}function uP(r){return r==="middle"||r==="center"}function fP(r,e,t,i,a){for(var n=[],o=[],s=[],l=0;l=0||r===e}function cP(r){var e=om(r);if(e){var t=e.axisPointerModel,i=e.axis.scale,a=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=i.parse(o));var s=iS(t);n==null&&(a.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var d=l;v.color!=null&&(d=q({color:v.color},l));var m=lt($(v),{boundaryGap:t,splitNumber:i,scale:a,axisLine:n,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:p,nameTextStyle:d,triggerEvent:c},!1);if(F(f)){var g=m.name;m.name=f.replace("{value}",g??"")}else X(f)&&(m.name=f(m.name,m));var y=new zt(m,null,this.ecModel);return jt(y,La.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:lt({lineStyle:{color:"#bbb"}},ac.axisLine),axisLabel:fm(ac.axisLabel,!1),axisTick:fm(ac.axisTick,!1),splitLine:fm(ac.splitLine,!0),splitArea:fm(ac.splitArea,!0),indicator:[]},e}(xt),bP=k7;var V7=["axisLine","axisTickLabel","axisName"],U7=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var i=t.coordinateSystem,a=i.getIndicatorAxes(),n=k(a,function(o){var s=o.model.get("showName")?o.name:"",l=new ur(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});w(n,function(o){w(V7,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var i=t.coordinateSystem,a=i.getIndicatorAxes();if(!a.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),p=s.get("show"),c=l.get("color"),h=u.get("color"),v=O(c)?c:[c],d=O(h)?h:[h],m=[],g=[];function y(z,R,U){var V=U%R.length;return z[V]=z[V]||[],V}if(n==="circle")for(var x=a[0].getTicksCoords(),_=i.cx,b=i.cy,S=0;S3?1.4:o>1?1.2:1.1,f=n>0?u:1/u;hS(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(a){var p=Math.abs(n),c=(n>0?1:-1)*(p>3?.4:p>1?.15:.05);hS(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!pS(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;hS(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Ne);function hS(r,e,t,i,a){r.pointerChecker&&r.pointerChecker(i,a.originX,a.originY)&&(Pr(i.event),EP(r,e,t,i,a))}function EP(r,e,t,i,a){a.isAvailableBehavior=W(pm,null,t,i),r.trigger(e,a)}function pm(r,e,t){var i=t[r];return!r||i&&(!F(i)||e.event[i+"Key"])}var Va=G7;function Eu(r,e,t){var i=r.target;i.x+=e,i.y+=t,i.dirty()}function Pu(r,e,t,i){var a=r.target,n=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,a.x-=(t-a.x)*(u-1),a.y-=(i-a.y)*(u-1),a.scaleX*=u,a.scaleY*=u,a.dirty()}var H7={axisPointer:1,tooltip:1,brush:1};function po(r,e,t){var i=e.getComponentByElement(r.topTarget),a=i&&i.coordinateSystem;return i&&i!==t&&!H7.hasOwnProperty(i.mainType)&&a&&a.model!==t}function cm(r){if(F(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var dS,hm={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},PP=ft(hm),vm={"alignment-baseline":"textBaseline","stop-color":"stopColor"},zP=ft(vm),W7=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var i=cm(e);this._defsUsePending=[];var a=new K;this._root=a;var n=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),ci(i,a,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,a,n,null,!1,!1),u=u.nextSibling;X7(this._defs,this._defsUsePending),this._defsUsePending=[];var f,p;if(o){var c=dm(o);c.length>=4&&(f={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(f&&s!=null&&l!=null&&(p=gS(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=a;a=new K,a.add(h),h.scaleX=h.scaleY=p.scale,h.x=p.x,h.y=p.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new ht({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:f,viewBoxTransform:p,named:n}},r.prototype._parseNode=function(e,t,i,a,n,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var f=dS[s];if(f&&J(dS,s)){l=f.call(this,e,t);var p=e.getAttribute("name");if(p){var c={name:p,namedFrom:null,svgNodeTagLower:s,el:l};i.push(c),s==="g"&&(u=c)}else a&&i.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var h=RP[s];if(h&&J(RP,s)){var v=h.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=v)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,i,u,n,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},r.prototype._parseText=function(e,t){var i=new Ka({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ri(t,i),ci(e,i,this._defsUsePending,!1,!1),Y7(i,t);var a=i.style,n=a.fontSize;n&&n<9&&(a.fontSize=9,i.scaleX*=n/9,i.scaleY*=n/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i},r.internalField=function(){dS={g:function(e,t){var i=new K;return Ri(t,i),ci(e,i,this._defsUsePending,!1,!1),i},rect:function(e,t){var i=new ht;return Ri(t,i),ci(e,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(e,t){var i=new _r;return Ri(t,i),ci(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,t){var i=new fe;return Ri(t,i),ci(e,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(e,t){var i=new rp;return Ri(t,i),ci(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(e,t){var i=e.getAttribute("points"),a;i&&(a=kP(i));var n=new he({shape:{points:a||[]},silent:!0});return Ri(t,n),ci(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var i=e.getAttribute("points"),a;i&&(a=kP(i));var n=new pe({shape:{points:a||[]},silent:!0});return Ri(t,n),ci(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var i=new re;return Ri(t,i),ci(e,i,this._defsUsePending,!1,!1),i.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),i.silent=!0,i},text:function(e,t){var i=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(n),this._textY=parseFloat(a)+parseFloat(o);var s=new K;return Ri(t,s),ci(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var i=e.getAttribute("x"),a=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),a!=null&&(this._textY=parseFloat(a));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new K;return Ri(t,s),ci(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var i=e.getAttribute("d")||"",a=ov(i);return Ri(t,a),ci(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}}(),r}(),RP={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),n=new Aa(e,t,i,a);return NP(r,n),OP(r,n),n},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),a=new fv(e,t,i);return NP(r,a),OP(r,a),a}};function NP(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function OP(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var i=t.getAttribute("offset"),a=void 0;i&&i.indexOf("%")>0?a=parseInt(i,10)/100:i?a=parseFloat(i):a=0;var n={};BP(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function Ri(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),q(e.__inheritedStyle,r.__inheritedStyle))}function kP(r){for(var e=dm(r),t=[],i=0;i0;n-=2){var o=i[n],s=i[n-1],l=dm(o);switch(a=a||Me(),s){case"translate":tr(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Pl(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Rr(a,a,-parseFloat(l[0])*mS,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*mS);zr(a,[1,0,u,1,0,0],a);break;case"skewY":var f=Math.tan(parseFloat(l[0])*mS);zr(a,[1,f,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var UP=/([^\s:;]+)\s*:\s*([^:;]+)/g;function BP(r,e,t){var i=r.getAttribute("style");if(i){UP.lastIndex=0;for(var a;(a=UP.exec(i))!=null;){var n=a[1],o=J(hm,n)?hm[n]:null;o&&(e[o]=a[2]);var s=J(vm,n)?vm[n]:null;s&&(t[s]=a[2])}}}function Q7(r,e,t){for(var i=0;i0,m={api:i,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,t,i),this._updateMapSelectHandler(e,u,i,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=Y(),i=Y(),a=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(h,v){return v&&(h=v(h)),h&&[h[0]*n.scaleX+n.x,h[1]*n.scaleY+n.y]}function p(h){for(var v=[],d=!u&&l&&l.project,m=0;m=0)&&(c=a);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ee(e,Kt(i),{labelFetcher:c,labelDataIndex:p,defaultText:t},h);var v=e.getTextContent();if(v&&($P(v).ignore=v.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function qP(r,e,t,i,a,n){r.data?r.data.setItemGraphicEl(n,e):tt(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:i&&i.option||{}}}function jP(r,e,t,i,a){r.data||ji({el:e,componentModel:a,itemName:t,itemTooltipOption:i.get("tooltip")})}function KP(r,e,t,i,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var n=i.getModel("emphasis"),o=n.get("focus");return Vt(e,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&TD(e,a,t),o}function QP(r,e,t){var i=[],a;function n(){a=[]}function o(){a.length&&(i.push(a),a=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),w(r,function(l){s.lineStart();for(var u=0;u-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Rt),tz=p8;function c8(r,e){var t={};return w(r,function(i){i.each(i.mapDimension("value"),function(a,n){var o="ec-"+i.getName(n);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(i,a){for(var n="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[n].length,f=0;f1?(_.width=x,_.height=x/m):(_.height=x,_.width=x*m),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var b=r.getBoxLayoutParams();b.aspect=m,_=Zt(b,{width:v,height:d})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function d8(r,e){w(e.get("geoCoord"),function(t,i){r.addGeoCoord(i,t)})}var m8=function(){function r(){this.dimensions=CS}return r.prototype.create=function(e,t){var i=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new AS(l+s,l,N({nameMap:o.get("nameMap")},a(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=nz,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),w(n,function(o,s){var l=k(o,function(f){return f.get("nameMap")}),u=new AS(s,s,N({nameMap:Cl(l)},a(o[0])));u.zoomLimit=ae.apply(null,k(o,function(f){return f.get("scaleLimit")})),i.push(u),u.resize=nz,u.resize(o[0],t),w(o,function(f){f.coordinateSystem=u,d8(u,f)})}),i},r.prototype.getFilledRegions=function(e,t,i,a){for(var n=(e||[]).slice(),o=Y(),s=0;s=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function fz(r,e){var t=r.isExpand?r.children:[],i=r.parentNode.children,a=r.hierNode.i?i[r.hierNode.i-1]:null;if(t.length){S8(r);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-n):r.hierNode.prelim=n}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=b8(r,a,r.parentNode.hierNode.defaultAncestor||i[0],e)}function pz(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function LS(r){return arguments.length?r:C8}function zs(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function cz(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function S8(r){for(var e=r.children,t=e.length,i=0,a=0;--t>=0;){var n=e[t];n.hierNode.prelim+=i,n.hierNode.modifier+=i,a+=n.hierNode.change,i+=n.hierNode.shift+a}}function b8(r,e,t,i){if(e){for(var a=r,n=r,o=n.parentNode.children[0],s=e,l=a.hierNode.modifier,u=n.hierNode.modifier,f=o.hierNode.modifier,p=s.hierNode.modifier;s=MS(s),n=IS(n),s&&n;){a=MS(a),o=IS(o),a.hierNode.ancestor=r;var c=s.hierNode.prelim+p-n.hierNode.prelim-u+i(s,n);c>0&&(T8(w8(s,r,t),r,c),u+=c,l+=c),p+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=a.hierNode.modifier,f+=o.hierNode.modifier}s&&!MS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=p-l),n&&!IS(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-f,t=r)}return t}function MS(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function IS(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function w8(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function T8(r,e,t){var i=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=i}function C8(r,e){return r.parentNode===e.parentNode?1:2}var A8=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),D8=function(r){E(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new A8},e.prototype.buildPath=function(t,i){var a=i.childPoints,n=a.length,o=i.parentPoint,s=a[0],l=a[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=i.orient,f=u==="TB"||u==="BT"?0:1,p=1-f,c=H(i.forkPosition,1),h=[];h[f]=o[f],h[p]=o[p]+(l[p]-o[p])*c,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[f]=s[f],t.lineTo(h[0],h[1]),h[f]=l[f],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var v=1;vy.x,b||(_=_-Math.PI));var T=b?"left":"right",C=s.getModel("label"),A=C.get("rotate"),D=A*(Math.PI/180),M=m.getTextContent();M&&(m.setTextConfig({position:C.get("position")||T,rotation:A==null?-_:D,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Eo(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(tt(t).focus=L),I8(a,o,f,t,v,h,d,i),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var z=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);z&&z.hoverState===ns||os(t.__edge,P)}})}function I8(r,e,t,i,a,n,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),p=r.getOrient(),c=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),d=i.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=i.__edge=new us({shape:ES(f,p,c,a,a)})),_t(d,{shape:ES(f,p,c,n,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,g=[],y=0;yt&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,a=i.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var i=t.getData().tree.root,a=r.targetNode;if(F(a)&&(a=i.getNodeById(a)),a&&i.contains(a))return{node:a};var n=r.targetNodeId;if(n!=null&&(a=i.getNodeById(n)))return{node:a}}}function zS(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Nu(r,e){var t=zS(r);return nt(t,e)>=0}function ho(r,e){for(var t=[];r;){var i=r.dataIndex;t.push({name:r.name,dataIndex:i,value:e.getRawValue(i)}),r=r.parentNode}return t.reverse(),t}var B8=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var i={name:t.name,children:t.data},a=t.leaves||{},n=new zt(a,this,this.ecModel),o=Ru.createTree(i,this,s);function s(p){p.wrapMethod("getItemModel",function(c,h){var v=o.getNodeByDataIndex(h);return v&&v.children.length&&v.isExpand||(c.parentModel=n),c})}var l=0;o.eachNode("preorder",function(p){p.depth>l&&(l=p.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(p){var c=p.hostTree.data.getRawDataItem(p.dataIndex);p.isExpand=c&&c.collapsed!=null?!c.collapsed:p.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,i,a){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ie("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=ho(a,this),i.collapsed=!a.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Rt),_z=B8;function Sz(r,e,t){for(var i=[r],a=[],n;n=i.pop();)if(a.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;n--)t.push(a[n])}}function NS(r,e){r.eachSeriesByType("tree",function(t){F8(t,e)})}function F8(r,e){var t=cz(r,e);r.layoutInfo=t;var i=r.get("layout"),a=0,n=0,o=null;i==="radial"?(a=2*Math.PI,n=Math.min(t.height,t.width)/2,o=LS(function(x,_){return(x.parentNode===_.parentNode?1:2)/x.depth})):(a=t.width,n=t.height,o=LS());var s=r.getData().tree.root,l=s.children[0];if(l){uz(s),Sz(l,fz,o),s.hierNode.modifier=-l.hierNode.prelim,Ou(l,pz);var u=l,f=l,p=l;Ou(l,function(x){var _=x.getLayout().x;_f.getLayout().x&&(f=x),x.depth>p.depth&&(p=x)});var c=u===f?1:o(u,f)/2,h=c-u.getLayout().x,v=0,d=0,m=0,g=0;if(i==="radial")v=a/(f.getLayout().x+c+h),d=n/(p.depth-1||1),Ou(l,function(x){m=(x.getLayout().x+h)*v,g=(x.depth-1)*d;var _=zs(m,g);x.setLayout({x:_.x,y:_.y,rawX:m,rawY:g},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(d=n/(f.getLayout().x+c+h),v=a/(p.depth-1||1),Ou(l,function(x){g=(x.getLayout().x+h)*d,m=y==="LR"?(x.depth-1)*v:a-(x.depth-1)*v,x.setLayout({x:m,y:g},!0)})):(y==="TB"||y==="BT")&&(v=a/(f.getLayout().x+c+h),d=n/(p.depth-1||1),Ou(l,function(x){m=(x.getLayout().x+h)*v,g=y==="TB"?(x.depth-1)*d:n-(x.depth-1)*d,x.setLayout({x:m,y:g},!0)}))}}}function OS(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),i=t.tree;i.eachNode(function(a){var n=a.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");N(s,o)})})}function bz(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=e.dataIndex,n=i.getData().tree,o=n.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,i){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=a.coordinateSystem,o=zu(n,e,void 0,i);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}function kS(r){r.registerChartView(yz),r.registerSeriesModel(_z),r.registerLayout(NS),r.registerVisual(OS),bz(r)}var wz=["treemapZoomToNode","treemapRender","treemapMove"];function Tz(r){for(var e=0;e1;)n=n.parentNode;var o=gp(r.ecModel,n.name||n.dataIndex+"",i);a.setVisual("decal",o)})}var G8=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,i){var a={name:t.name,children:t.data};Cz(a);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new zt({itemStyle:o},this,i);n=t.levels=H8(n,i);var l=k(n||[],function(p){return new zt(p,s,i)},this),u=Ru.createTree(a,this,f);function f(p){p.wrapMethod("getItemModel",function(c,h){var v=u.getNodeByDataIndex(h),d=v?l[v.depth]:null;return c.parentModel=d||s,c})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,i,a){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return ie("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=ho(a,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},N(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var i=this._idIndexMap;i||(i=this._idIndexMap=Y(),this._idIndexMapCount=0);var a=i.get(t);return a==null&&i.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){sc(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Rt);function Cz(r){var e=0;w(r.children,function(i){Cz(i);var a=i.value;O(a)&&(a=a[0]),e+=a});var t=r.value;O(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),O(r.value)?r.value[0]=t:r.value=t}function H8(r,e){var t=Nt(e.get("color")),i=Nt(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,n;w(r,function(s){var l=new zt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(n=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!n&&i&&(o.decal=i.slice()),r}}var Az=G8;var W8=8,Dz=8,VS=5,Y8=function(){function r(e){this.group=new K,e.add(this.group)}return r.prototype.render=function(e,t,i,a){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!i)){var s=n.getModel("itemStyle"),l=n.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),p={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,p,u),this._renderContent(e,p,s,l,u,f,a),Xn(o,p.pos,p.box)}},r.prototype._prepare=function(e,t,i){for(var a=e;a;a=a.parentNode){var n=le(a.getModel().get("name"),""),o=i.getTextRect(n),s=Math.max(o.width+W8*2,t.emptyItemWidth);t.totalWidth+=s+Dz,t.renderList.push({node:a,text:n,width:s})}},r.prototype._renderContent=function(e,t,i,a,n,o,s){for(var l=0,u=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),p=MM(t.pos,t.box),c=t.totalWidth,h=t.renderList,v=a.getModel("itemStyle").getItemStyle(),d=h.length-1;d>=0;d--){var m=h[d],g=m.node,y=m.width,x=m.text;c>p.width&&(c-=y-u,y=u,x=null);var _=new he({shape:{points:Z8(l,0,y,f,d===h.length-1,d===0)},style:q(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new yt({style:Ht(n,{text:x})}),textConfig:{position:"inside"},z2:Qa*1e4,onclick:et(s,g)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Ht(o,{text:x}),_.ensureState("emphasis").style=v,Vt(_,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(_),X8(_,e,g),l+=y+Dz}},r.prototype.remove=function(){this.group.removeAll()},r}();function Z8(r,e,t,i,a,n){var o=[[a?r:r-VS,e],[r+t,e],[r+t,e+i],[a?r:r-VS,e+i]];return!n&&o.splice(2,0,[r+t+VS,e+i/2]),!a&&o.push([r,e+i/2]),o}function X8(r,e,t){tt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&ho(t,e)}}var Mz=Y8;var q8=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,i,a,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:i,delay:a,easing:n}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,i=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,n=this._storage.length;aEz||Math.abs(t.dy)>Ez)){var i=this.seriesModel.getData().tree.root;if(!i)return;var a=i.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var i=t.originX,a=t.originY;if(this._state!=="animating"){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var s=new rt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;i-=l.x,a-=l.y;var u=Me();tr(u,u,[-i,-a]),Pl(u,u,[t.scale,t.scale]),tr(u,u,[i,a]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var i=this;t.on("click",function(a){if(i._state==="ready"){var n=i.seriesModel.get("nodeClick",!0);if(n){var o=i.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)i._rootToNode(o);else if(n==="zoomToNode")i._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&gs(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,i,a){var n=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Mz(this.group))).render(t,i,a.node,function(o){n._state!=="animating"&&(Nu(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=lc(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,i){var a,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,i),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e}(It);function lc(){return{nodeGroup:[],background:[],content:[]}}function tY(r,e,t,i,a,n,o,s,l,u){if(!o)return;var f=o.getLayout(),p=r.getData(),c=o.getModel();if(p.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var h=f.width,v=f.height,d=f.borderWidth,m=f.invisible,g=o.getRawIndex(),y=s&&s.getRawIndex(),x=o.viewChildren,_=f.upperHeight,b=x&&x.length,S=c.getModel("itemStyle"),T=c.getModel(["emphasis","itemStyle"]),C=c.getModel(["blur","itemStyle"]),A=c.getModel(["select","itemStyle"]),D=S.get("borderRadius")||0,M=pt("nodeGroup",US);if(!M)return;if(l.add(M),M.x=f.x||0,M.y=f.y||0,M.markRedraw(),_m(M).nodeWidth=h,_m(M).nodeHeight=v,f.isAboveViewRoot)return M;var I=pt("background",Lz,u,Q8);I&&B(M,I,b&&f.upperLabelHeight);var L=c.getModel("emphasis"),P=L.get("focus"),z=L.get("blurScope"),R=L.get("disabled"),U=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Zn(M)&&Ja(M,!1),I&&(Ja(I,!R),p.setItemGraphicEl(o.dataIndex,I),ev(I,U,z));else{var V=pt("content",Lz,u,$8);V&&Z(M,V),I.disableMorphing=!0,I&&Zn(I)&&Ja(I,!1),Ja(M,!R),p.setItemGraphicEl(o.dataIndex,M),ev(M,U,z)}return M;function B(Et,gt,Pt){var Ct=tt(gt);if(Ct.dataIndex=o.dataIndex,Ct.seriesIndex=r.seriesIndex,gt.setShape({x:0,y:0,width:h,height:v,r:D}),m)Q(gt);else{gt.invisible=!1;var ut=o.getVisual("style"),At=ut.stroke,ce=Rz(S);ce.fill=At;var Yt=Rs(T);Yt.fill=T.get("borderColor");var _e=Rs(C);_e.fill=C.get("borderColor");var de=Rs(A);if(de.fill=A.get("borderColor"),Pt){var fr=h-2*d;st(gt,At,ut.opacity,{x:d,y:0,width:fr,height:_})}else gt.removeTextContent();gt.setStyle(ce),gt.ensureState("emphasis").style=Yt,gt.ensureState("blur").style=_e,gt.ensureState("select").style=de,Yi(gt)}Et.add(gt)}function Z(Et,gt){var Pt=tt(gt);Pt.dataIndex=o.dataIndex,Pt.seriesIndex=r.seriesIndex;var Ct=Math.max(h-2*d,0),ut=Math.max(v-2*d,0);if(gt.culling=!0,gt.setShape({x:d,y:d,width:Ct,height:ut,r:D}),m)Q(gt);else{gt.invisible=!1;var At=o.getVisual("style"),ce=At.fill,Yt=Rz(S);Yt.fill=ce,Yt.decal=At.decal;var _e=Rs(T),de=Rs(C),fr=Rs(A);st(gt,ce,At.opacity,null),gt.setStyle(Yt),gt.ensureState("emphasis").style=_e,gt.ensureState("blur").style=de,gt.ensureState("select").style=fr,Yi(gt)}Et.add(gt)}function Q(Et){!Et.invisible&&n.push(Et)}function st(Et,gt,Pt,Ct){var ut=c.getModel(Ct?zz:Pz),At=le(c.get("name"),null),ce=ut.getShallow("show");ee(Et,Kt(c,Ct?zz:Pz),{defaultText:ce?At:null,inheritColor:gt,defaultOpacity:Pt,labelFetcher:r,labelDataIndex:o.dataIndex});var Yt=Et.getTextContent();if(Yt){var _e=Yt.style,de=Al(_e.padding||0);Ct&&(Et.setTextConfig({layoutRect:Ct}),Yt.disableLabelLayout=!0),Yt.beforeUpdate=function(){var Ha=Math.max((Ct?Ct.width:Et.shape.width)-de[1]-de[3],0),Ir=Math.max((Ct?Ct.height:Et.shape.height)-de[0]-de[2],0);(_e.width!==Ha||_e.height!==Ir)&&Yt.setStyle({width:Ha,height:Ir})},_e.truncateMinChar=2,_e.lineOverflow="truncate",ct(_e,Ct,f);var fr=Yt.getState("emphasis");ct(fr?fr.style:null,Ct,f)}}function ct(Et,gt,Pt){var Ct=Et?Et.text:null;if(!gt&&Pt.isLeafRoot&&Ct!=null){var ut=r.get("drillDownIcon",!0);Et.text=ut?ut+" "+Ct:Ct}}function pt(Et,gt,Pt,Ct){var ut=y!=null&&t[Et][y],At=a[Et];return ut?(t[Et][y]=null,Lt(At,ut)):m||(ut=new gt,ut instanceof be&&(ut.z2=eY(Pt,Ct)),Bt(At,ut)),e[Et][g]=ut}function Lt(Et,gt){var Pt=Et[g]={};gt instanceof US?(Pt.oldX=gt.x,Pt.oldY=gt.y):Pt.oldShape=N({},gt.shape)}function Bt(Et,gt){var Pt=Et[g]={},Ct=o.parentNode,ut=gt instanceof K;if(Ct&&(!i||i.direction==="drillDown")){var At=0,ce=0,Yt=a.background[Ct.getRawIndex()];!i&&Yt&&Yt.oldShape&&(At=Yt.oldShape.width,ce=Yt.oldShape.height),ut?(Pt.oldX=0,Pt.oldY=ce):Pt.oldShape={x:At,y:ce,width:0,height:0}}Pt.fadein=!ut}}function eY(r,e){return r*K8+e}var Nz=J8;var pc=w,rY=j,wm=-1,HS=function(){function r(e){var t=e.mappingMethod,i=e.type,a=this.option=$(e);this.type=i,this.mappingMethod=t,this._normalizeData=nY[t];var n=r.visualHandlers[i];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(BS(a),iY(a)):t==="category"?a.categories?aY(a):BS(a,!0):(ne(t!=="linear"||a.dataExtent),BS(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return W(this._normalizeData,this)},r.listVisualTypes=function(){return ft(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,i){j(e)?w(e,t,i):t.call(i,e)},r.mapVisual=function(e,t,i){var a,n=O(e)?[]:j(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(i,o,s);a?n=l:n[s]=l}),n},r.retrieveVisuals=function(e){var t={},i;return e&&pc(r.visualHandlers,function(a,n){e.hasOwnProperty(n)&&(t[n]=e[n],i=!0)}),i?t:null},r.prepareVisualTypes=function(e){if(O(e))e=e.slice();else if(rY(e)){var t=[];pc(e,function(i,a){t.push(a)}),e=t}else return[];return e.sort(function(i,a){return a==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,i){for(var a,n=1/0,o=0,s=t.length;o=0;n--)i[n]==null&&(delete t[e[n]],e.pop())}function BS(r,e){var t=r.visual,i=[];j(t)?pc(t,function(n){i.push(n)}):t!=null&&i.push(t);var a={color:1,symbol:1};!e&&i.length===1&&!a.hasOwnProperty(r.type)&&(i[1]=i[0]),kz(r,i)}function Sm(r){return{applyVisual:function(e,t,i){var a=this.mapValueToVisual(e);i("color",r(t("color"),a))},_normalizedToVisual:FS([0,1])}}function Oz(r){var e=this.option.visual;return e[Math.round(kt(r,[0,1],[0,e.length-1],!0))]||{}}function uc(r){return function(e,t,i){i(r,this.mapValueToVisual(e))}}function fc(r){var e=this.option.visual;return e[this.option.loop&&r!==wm?r%e.length:r]}function Ns(){return this.option.visual[0]}function FS(r){return{linear:function(e){return kt(e,r,this.option.visual,!0)},category:fc,piecewise:function(e,t){var i=GS.call(this,t);return i==null&&(i=kt(e,r,this.option.visual,!0)),i},fixed:Ns}}function GS(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=HS.findPieceIndex(r,t),a=t[i];if(a&&a.visual)return a.visual[this.type]}}function kz(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=k(e,function(t){var i=qe(t);return i||[0,0,0,1]})),e}var nY={linear:function(r){return kt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=HS.findPieceIndex(r,e,!0);if(t!=null)return kt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??wm},fixed:te};function bm(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var g=fY(a,l,d,m,v,i);Fz(d,g,t,i)}})}}}function sY(r,e,t){var i=N({},e),a=t.designatedVisualItemStyle;return w(["color","colorAlpha","colorSaturation"],function(n){a[n]=e[n];var o=r.get(n);a[n]=null,o!=null&&(i[n]=o)}),i}function Vz(r){var e=WS(r,"color");if(e){var t=WS(r,"colorAlpha"),i=WS(r,"colorSaturation");return i&&(e=Bo(e,null,null,i)),t&&(e=Fo(e,t)),e}}function lY(r,e){return e!=null?Bo(e,null,null,r):null}function WS(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function uY(r,e,t,i,a,n){if(!(!n||!n.length)){var o=YS(e,"color")||a.color!=null&&a.color!=="none"&&(YS(e,"colorAlpha")||YS(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),p={type:o.name,dataExtent:u,visual:o.range};p.type==="color"&&(f==="index"||f==="id")?(p.mappingMethod="category",p.loop=!0):p.mappingMethod="linear";var c=new xe(p);return Uz(c).drColorMappingBy=f,c}}}function YS(r,e){var t=r.get(e);return O(t)&&t.length?{name:e,range:t}:null}function fY(r,e,t,i,a,n){var o=N({},e);if(a){var s=a.type,l=s==="color"&&Uz(a).drColorMappingBy,u=l==="index"?i:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var cc=Math.max,Tm=Math.min,Gz=ae,ZS=w,Wz=["itemStyle","borderWidth"],pY=["itemStyle","gapWidth"],cY=["upperLabel","show"],hY=["upperLabel","height"],Yz={seriesType:"treemap",reset:function(r,e,t,i){var a=t.getWidth(),n=t.getHeight(),o=r.option,s=Zt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=H(Gz(s.width,l[0]),a),f=H(Gz(s.height,l[1]),n),p=i&&i.type,c=["treemapZoomToNode","treemapRootToNode"],h=mn(i,c,r),v=p==="treemapRender"||p==="treemapMove"?i.rootRect:null,d=r.getViewRoot(),m=zS(d);if(p!=="treemapMove"){var g=p==="treemapZoomToNode"?xY(r,h,d,u,f):v?[v.width,v.height]:[u,f],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var x={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),Zz(d,x,!1,0),_=d.getLayout(),ZS(m,function(S,T){var C=(m[T+1]||d).getValue();S.setLayout(N({dataExtent:[C,C],borderWidth:0,upperHeight:0},_))})}var b=r.getData().tree.root;b.setLayout(_Y(s,v,h),!0),r.setLayoutInfo(s),Xz(b,new rt(-s.x,-s.y,a,n),m,d,0)}};function Zz(r,e,t,i){var a,n;if(!r.isRemoved()){var o=r.getLayout();a=o.width,n=o.height;var s=r.getModel(),l=s.get(Wz),u=s.get(pY)/2,f=qz(s),p=Math.max(l,f),c=l-u,h=p-u;r.setLayout({borderWidth:l,upperHeight:p,upperLabelHeight:f},!0),a=cc(a-2*c,0),n=cc(n-c-h,0);var v=a*n,d=vY(r,s,v,e,t,i);if(d.length){var m={x:c,y:h,width:a,height:n},g=Tm(a,n),y=1/0,x=[];x.area=0;for(var _=0,b=d.length;_=0;l--){var u=a[i==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:i,dataExtent:s}}function yY(r,e,t){for(var i=0,a=1/0,n=0,o=void 0,s=r.length;ni&&(i=o));var l=r.area*r.area,u=e*e*t;return l?cc(u*i/l,l/(u*a)):1/0}function Hz(r,e,t,i,a){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],f=e?r.area/e:0;(a||f>t[l[o]])&&(f=t[l[o]]);for(var p=0,c=r.length;pBf&&(u=Bf),n=s}ui&&(i=e);var n=i%2?i+2:i+3;a=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var T=_[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var C=-Math.atan2(_[1],_[0]);p[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":n.x=-c[0]*g+f[0],n.y=-c[1]*y+f[1],v=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=g*T+f[0],n.y=f[1]+A,v=_[0]<0?"right":"left",n.originX=-g*T,n.originY=-A;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=S[0],n.y=S[1]+A,v="center",n.originY=-A;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-g*T+p[0],n.y=p[1]+A,v=_[0]>=0?"right":"left",n.originX=g*T,n.originY=-A;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||v})}},e}(K),Bu=DY;var MY=function(){function r(e){this.group=new K,this._LineCtor=e||Bu}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var i=this,a=i.group,n=i._lineData;i._lineData=e,n||a.removeAll();var o=sR(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){a.remove(n.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,i){t.updateLayout(e,i)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=sR(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function i(s){!s.isGroup&&!IY(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0}function sR(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Kt(e)}}function lR(r){return isNaN(r[0])||isNaN(r[1])}function u1(r){return r&&!lR(r[0])&&!lR(r[1])}var Fu=MY;var f1=[],p1=[],c1=[],Gu=Se,h1=Ya,uR=Math.abs;function fR(r,e,t){for(var i=r[0],a=r[1],n=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){f1[0]=Gu(i[0],a[0],n[0],f),f1[1]=Gu(i[1],a[1],n[1],f);var p=uR(h1(f1,e)-l);p=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function dc(r,e){var t=[],i=Rn,a=[[],[],[]],n=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),p=s.getVisual("toSymbol");u.__original||(u.__original=[Lr(u[0]),Lr(u[1])],u[2]&&u.__original.push(Lr(u[2])));var c=u.__original;if(u[2]!=null){if(Ge(a[0],c[0]),Ge(a[1],c[2]),Ge(a[2],c[1]),f&&f!=="none"){var h=ks(s.node1),v=fR(a,c[0],h*e);i(a[0][0],a[1][0],a[2][0],v,t),a[0][0]=t[3],a[1][0]=t[4],i(a[0][1],a[1][1],a[2][1],v,t),a[0][1]=t[3],a[1][1]=t[4]}if(p&&p!=="none"){var h=ks(s.node2),v=fR(a,c[1],h*e);i(a[0][0],a[1][0],a[2][0],v,t),a[1][0]=t[1],a[2][0]=t[2],i(a[0][1],a[1][1],a[2][1],v,t),a[1][1]=t[1],a[2][1]=t[2]}Ge(u[0],a[0]),Ge(u[1],a[2]),Ge(u[2],a[1])}else{if(Ge(n[0],c[0]),Ge(n[1],c[1]),Fi(o,n[1],n[0]),vi(o,o),f&&f!=="none"){var h=ks(s.node1);_f(n[0],n[0],o,h*e)}if(p&&p!=="none"){var h=ks(s.node2);_f(n[1],n[1],o,-h*e)}Ge(u[0],n[0]),Ge(u[1],n[1])}})}function pR(r){return r.type==="view"}var LY=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){var a=new Ra,n=new Fu,o=this.group;this._controller=new Va(i.getZr()),this._controllerHost={target:o},o.add(a.group),o.add(n.group),this._symbolDraw=a,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,i,a){var n=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(pR(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):_t(u,f,t)}dc(t.getGraph(),Os(t));var p=t.getData();s.updateData(p);var c=t.getEdgeData();l.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,i,a),clearTimeout(this._layoutTimeout);var h=t.forceLayout,v=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,v);var d=t.get("layout");p.graph.eachNode(function(x){var _=x.dataIndex,b=x.getGraphicEl(),S=x.getModel();if(b){b.off("drag").off("dragend");var T=S.get("draggable");T&&b.on("drag",function(A){switch(d){case"force":h.warmUp(),!n._layouting&&n._startForceLayoutIteration(h,v),h.setFixed(_),p.setItemLayout(_,[b.x,b.y]);break;case"circular":p.setItemLayout(_,[b.x,b.y]),x.setLayout({fixed:!0},!0),Vu(t,"symbolSize",x,[A.offsetX,A.offsetY]),n.updateLayout(t);break;case"none":default:p.setItemLayout(_,[b.x,b.y]),vc(t.getGraph(),t),n.updateLayout(t);break}}).on("dragend",function(){h&&h.setUnfixed(_)}),b.setDraggable(T,!!S.get("cursor"));var C=S.get(["emphasis","focus"]);C==="adjacency"&&(tt(b).focus=x.getAdjacentDataIndices())}}),p.graph.eachEdge(function(x){var _=x.getGraphicEl(),b=x.getModel().get(["emphasis","focus"]);_&&b==="adjacency"&&(tt(_).focus={edge:[x.dataIndex],node:[x.node1.dataIndex,x.node2.dataIndex]})});var m=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=p.getLayout("cx"),y=p.getLayout("cy");p.graph.eachNode(function(x){e1(x,m,g,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,i){var a=this;(function n(){t.step(function(o){a.updateLayout(a._model),(a._layouting=!o)&&(i?a._layoutTimeout=setTimeout(n,16):n())})})()},e.prototype._updateController=function(t,i,a){var n=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,p){var c=l.getBoundingRect();return c.applyTransform(l.transform),c.contain(f,p)&&!po(u,a,t)}),!pR(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Eu(s,u.dx,u.dy),a.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Pu(s,u.scale,u.originX,u.originY),a.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),n._updateNodeAndLinkScale(),dc(t.getGraph(),Os(t)),n._lineDraw.updateLayout(),a.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,i=t.getData(),a=Os(t);i.eachItemGraphicEl(function(n,o){n&&n.setSymbolScale(a)})},e.prototype.updateLayout=function(t){dc(t.getGraph(),Os(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(It),cR=LY;function Hu(r){return"_EC_"+r}var EY=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var i=this._nodesMap;if(!i[Hu(e)]){var a=new Vs(e,t);return a.hostGraph=this,this.nodes.push(a),i[Hu(e)]=a,a}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Hu(e)]},r.prototype.addEdge=function(e,t,i){var a=this._nodesMap,n=this._edgesMap;if(vt(e)&&(e=this.nodes[e]),vt(t)&&(t=this.nodes[t]),e instanceof Vs||(e=a[Hu(e)]),t instanceof Vs||(t=a[Hu(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new hR(e,t,i);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),n[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof Vs&&(e=e.id),t instanceof Vs&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var i=this.nodes,a=i.length,n=0;n=0&&e.call(t,i[n],n)},r.prototype.eachEdge=function(e,t){for(var i=this.edges,a=i.length,n=0;n=0&&i[n].node1.dataIndex>=0&&i[n].node2.dataIndex>=0&&e.call(t,i[n],n)},r.prototype.breadthFirstTraverse=function(e,t,i,a){if(t instanceof Vs||(t=this._nodesMap[Hu(t)]),!!t){for(var n=i==="out"?"outEdges":i==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var n=0,o=a.length;n=0&&this[r][e].setItemVisual(this.dataIndex,t,i)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,i){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,i)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}jt(Vs,vR("hostGraph","data"));jt(hR,vR("hostGraph","edgeData"));var dR=EY;function mc(r,e,t,i,a){for(var n=new dR(i),o=0;o "+c)),u++)}var h=t.get("coordinateSystem"),v;if(h==="cartesian2d"||h==="polar")v=Ke(r,t);else{var d=un.get(h),m=d?d.dimensions||[]:[];nt(m,"value")<0&&m.concat(["value"]);var g=ia(r,{coordDimensions:m,encodeDefine:t.getEncode()}).dimensions;v=new ve(g,t),v.initData(r)}var y=new ve(["value"],t);return y.initData(l,s),a&&a(v,y),xm({mainData:v,struct:n,structAttr:"graph",datas:{node:v,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var PY=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var i=this;function a(){return i._categoriesData}this.legendVisualProvider=new ka(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),ai(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,i){var a=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&a){Qz(this);var s=mc(n,a,this,!0,l);return w(s.edges,function(u){$z(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(v){var d=o._categoriesModels,m=v.getShallow("category"),g=d[m];return g&&(g.parentModel=v.parentModel,v.parentModel=g),v});var p=zt.prototype.getModel;function c(v,d){var m=p.call(this,v,d);return m.resolveParentPath=h,m}f.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=c,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var d=v.slice();return v[0]==="label"?d[0]="edgeLabel":v[1]==="label"&&(d[1]="edgeLabel"),d}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,i,a){if(a==="edge"){var n=this.getData(),o=this.getDataParams(t,a),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ie("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var p=qv({series:this,dataIndex:t,multipleSeries:i});return p},e.prototype._updateCategoriesData=function(){var t=k(this.option.categories||[],function(a){return a.value!=null?a:N({value:0},a)}),i=new ve(["value"],this);i.initData(t),this._categoriesData=i,this._categoriesModels=i.mapArray(function(a){return i.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Rt),mR=PY;var zY={type:"graphRoam",event:"graphRoam",update:"none"};function v1(r){r.registerChartView(cR),r.registerSeriesModel(mR),r.registerProcessor(qS),r.registerVisual(jS),r.registerVisual(KS),r.registerLayout(JS),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,r1),r.registerLayout(i1),r.registerCoordinateSystem("graphView",{dimensions:dn.dimensions,create:a1}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},te),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},te),r.registerAction(zY,function(e,t,i){t.eachComponent({mainType:"series",query:e},function(a){var n=a.coordinateSystem,o=zu(n,e,void 0,i);a.setCenter&&a.setCenter(o.center),a.setZoom&&a.setZoom(o.zoom)})})}var RY=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),NY=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i.type="pointer",i}return e.prototype.getDefaultShape=function(){return new RY},e.prototype.buildPath=function(t,i){var a=Math.cos,n=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-a(l)*s*(s>=o/3?1:2),f=i.y-n(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(i.x+a(l)*s,i.y+n(l)*s),t.lineTo(i.x+a(i.angle)*o,i.y+n(i.angle)*o),t.lineTo(i.x-a(l)*s,i.y-n(l)*s),t.lineTo(u,f)},e}(it),gR=NY;function OY(r,e){var t=r.get("center"),i=e.getWidth(),a=e.getHeight(),n=Math.min(i,a),o=H(t[0],e.getWidth()),s=H(t[1],e.getHeight()),l=H(r.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Mm(r,e){var t=r==null?"":r+"";return e&&(F(e)?t=e.replace("{value}",t):X(e)&&(t=e(r))),t}var kY=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=OY(t,a);this._renderMain(t,i,a,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,i,a,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,p=t.getModel("axisLine"),c=p.get("roundCap"),h=c?Iu:we,v=p.get("show"),d=p.getModel("lineStyle"),m=d.get("width"),g=[u,f];qf(g,!l),u=g[0],f=g[1];for(var y=f-u,x=u,_=[],b=0;v&&b=A&&(D===0?0:n[D-1][0])Math.PI/2&&(pt+=Math.PI)):ct==="tangential"?pt=-C-Math.PI/2:vt(ct)&&(pt=ct*Math.PI/180),pt===0?p.add(new yt({style:Ht(x,{text:B,x:Q,y:st,verticalAlign:z<-.8?"top":z>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:Z}),silent:!0})):p.add(new yt({style:Ht(x,{text:B,x:Q,y:st,verticalAlign:"middle",align:"center"},{inheritColor:Z}),silent:!0,originX:Q,originY:st,rotation:pt}))}if(y.get("show")&&R!==_){var U=y.get("distance");U=U?U+f:f;for(var Lt=0;Lt<=b;Lt++){P=Math.cos(C),z=Math.sin(C);var Bt=new fe({shape:{x1:P*(v-U)+c,y1:z*(v-U)+h,x2:P*(v-T-U)+c,y2:z*(v-T-U)+h},silent:!0,style:I});I.stroke==="auto"&&Bt.setStyle({stroke:n((R+Lt/b)/_)}),p.add(Bt),C+=D}C-=D}else C+=A}},e.prototype._renderPointer=function(t,i,a,n,o,s,l,u,f){var p=this.group,c=this._data,h=this._progressEls,v=[],d=t.get(["pointer","show"]),m=t.getModel("progress"),g=m.get("show"),y=t.getData(),x=y.mapDimension("value"),_=+t.get("min"),b=+t.get("max"),S=[_,b],T=[s,l];function C(D,M){var I=y.getItemModel(D),L=I.getModel("pointer"),P=H(L.get("width"),o.r),z=H(L.get("length"),o.r),R=t.get(["pointer","icon"]),U=L.get("offsetCenter"),V=H(U[0],o.r),B=H(U[1],o.r),Z=L.get("keepAspect"),Q;return R?Q=Xt(R,V-P/2,B-z,P,z,null,Z):Q=new gR({shape:{angle:-Math.PI/2,width:P,r:z,x:V,y:B}}),Q.rotation=-(M+Math.PI/2),Q.x=o.cx,Q.y=o.cy,Q}function A(D,M){var I=m.get("roundCap"),L=I?Iu:we,P=m.get("overlap"),z=P?m.get("width"):f/y.count(),R=P?o.r-z:o.r-(D+1)*z,U=P?o.r:o.r-D*z,V=new L({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:U}});return P&&(V.z2=b-y.get(x,D)%b),V}(g||d)&&(y.diff(c).add(function(D){var M=y.get(x,D);if(d){var I=C(D,s);Ut(I,{rotation:-((isNaN(+M)?T[0]:kt(M,S,T,!0))+Math.PI/2)},t),p.add(I),y.setItemGraphicEl(D,I)}if(g){var L=A(D,s),P=m.get("clip");Ut(L,{shape:{endAngle:kt(M,S,T,P)}},t),p.add(L),Kf(t.seriesIndex,y.dataType,D,L),v[D]=L}}).update(function(D,M){var I=y.get(x,D);if(d){var L=c.getItemGraphicEl(M),P=L?L.rotation:s,z=C(D,P);z.rotation=P,_t(z,{rotation:-((isNaN(+I)?T[0]:kt(I,S,T,!0))+Math.PI/2)},t),p.add(z),y.setItemGraphicEl(D,z)}if(g){var R=h[M],U=R?R.shape.endAngle:s,V=A(D,U),B=m.get("clip");_t(V,{shape:{endAngle:kt(I,S,T,B)}},t),p.add(V),Kf(t.seriesIndex,y.dataType,D,V),v[D]=V}}).execute(),y.each(function(D){var M=y.getItemModel(D),I=M.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),z=I.get("disabled");if(d){var R=y.getItemGraphicEl(D),U=y.getItemVisual(D,"style"),V=U.fill;if(R instanceof re){var B=R.style;R.useStyle(N({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},U))}else R.useStyle(U),R.type!=="pointer"&&R.setColor(V);R.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",n(kt(y.get(x,D),S,[0,1],!0))),R.z2EmphasisLift=0,se(R,M),Vt(R,L,P,z)}if(g){var Z=v[D];Z.useStyle(y.getItemVisual(D,"style")),Z.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),Z.z2EmphasisLift=0,se(Z,M),Vt(Z,L,P,z)}}),this._progressEls=v)},e.prototype._renderAnchor=function(t,i){var a=t.getModel("anchor"),n=a.get("show");if(n){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),f=Xt(s,i.cx-o/2+H(l[0],i.r),i.cy-o/2+H(l[1],i.r),o,o,null,u);f.z2=a.get("showAbove")?1:0,f.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,i,a,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),p=+t.get("max"),c=new K,h=[],v=[],d=t.isAnimationEnabled(),m=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(g){h[g]=new yt({silent:!0}),v[g]=new yt({silent:!0})}).update(function(g,y){h[g]=s._titleEls[y],v[g]=s._detailEls[y]}).execute(),l.each(function(g){var y=l.getItemModel(g),x=l.get(u,g),_=new K,b=n(kt(x,[f,p],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var T=S.get("offsetCenter"),C=o.cx+H(T[0],o.r),A=o.cy+H(T[1],o.r),D=h[g];D.attr({z2:m?0:2,style:Ht(S,{x:C,y:A,text:l.getName(g),align:"center",verticalAlign:"middle"},{inheritColor:b})}),_.add(D)}var M=y.getModel("detail");if(M.get("show")){var I=M.get("offsetCenter"),L=o.cx+H(I[0],o.r),P=o.cy+H(I[1],o.r),z=H(M.get("width"),o.r),R=H(M.get("height"),o.r),U=t.get(["progress","show"])?l.getItemVisual(g,"style").fill:b,D=v[g],V=M.get("formatter");D.attr({z2:m?0:2,style:Ht(M,{x:L,y:P,text:Mm(x,V),width:isNaN(z)?null:z,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:U})}),mv(D,{normal:M},x,function(Z){return Mm(Z,V)}),d&&gv(D,g,l,t,{getFormattedLabel:function(Z,Q,st,ct,pt,Lt){return Mm(Lt?Lt.interpolatedValue:x,V)}}),_.add(D)}c.add(_)}),this.group.add(c),this._titleEls=h,this._detailEls=v},e.type="gauge",e}(It),yR=kY;var VY=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,i){return pi(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Rt),xR=VY;function d1(r){r.registerChartView(yR),r.registerSeriesModel(xR)}var UY=["itemStyle","opacity"],BY=function(r){E(e,r);function e(t,i){var a=r.call(this)||this,n=a,o=new pe,s=new yt;return n.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,i,!0),a}return e.prototype.updateData=function(t,i,a){var n=this,o=t.hostModel,s=t.getItemModel(i),l=t.getItemLayout(i),u=s.getModel("emphasis"),f=s.get(UY);f=f??1,a||Oe(n),n.useStyle(t.getItemVisual(i,"style")),n.style.lineJoin="round",a?(n.setShape({points:l.points}),n.style.opacity=0,Ut(n,{style:{opacity:f}},o,i)):_t(n,{style:{opacity:f},shape:{points:l.points}},o,i),se(n,s),this._updateLabel(t,i),Vt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i){var a=this,n=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(i),u=t.getItemLayout(i),f=u.label,p=t.getItemVisual(i,"style"),c=p.fill;ee(o,Kt(l),{labelFetcher:t.hostModel,labelDataIndex:i,defaultOpacity:p.opacity,defaultText:t.getName(i)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),a.setTextConfig({local:!0,inside:!!f.inside,insideStroke:c,outsideFill:c});var h=f.linePoints;n.setShape({points:h}),a.textGuideLineConfig={anchor:h?new bt(h[0][0],h[0][1]):null},_t(o,{style:{x:f.x,y:f.y}},s,i),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),Cu(a,Au(l),{stroke:c})},e}(he),FY=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,a){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new BY(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(n,l),s.add(f),n.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);en(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(It),_R=FY;var GY=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ka(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,i){return pi(this,{coordDimensions:["value"],encodeDefaulter:et(hu,this)})},e.prototype._defaultLabelLine=function(t){ai(t,"labelLine",["show"]);var i=t.labelLine,a=t.emphasis.labelLine;i.show=i.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var i=this.getData(),a=r.prototype.getDataParams.call(this,t),n=i.mapDimension("value"),o=i.getSum(n);return a.percent=o?+(i.get(n,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Rt),SR=GY;function HY(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function WY(r,e){for(var t=r.mapDimension("value"),i=r.mapArray(t,function(l){return l}),a=[],n=e==="ascending",o=0,s=r.count();oi9)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!_1(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=t.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function _1(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var MR=a9;var o9=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var i=this.option;t&<(i,t,!0),this._initDimensions()},e.prototype.contains=function(t,i){var a=t.get("parallelIndex");return a!=null&&i.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){w(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){t.hasOwnProperty(i)&&(this.option[i]=t[i])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],i=this.parallelAxisIndex=[],a=Dt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);w(a,function(n){t.push("dim"+n.get("dim")),i.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(xt),IR=o9;var s9=function(r){E(e,r);function e(t,i,a,n,o){var s=r.call(this,t,i,a)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Qe),LR=s9;function Qr(r,e,t,i,a,n){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=Wu(a,[0,o])),n!=null&&(n=Math.max(n,a??0)),i==="all"){var s=Math.abs(e[1]-e[0]);s=Wu(s,[0,o]),a=n=Wu(s,[a,n]),i=0}e[0]=Wu(e[0],t),e[1]=Wu(e[1],t);var l=S1(e,i);e[i]+=r;var u=a||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[i]=Wu(e[i],f);var p;return p=S1(e,i),a!=null&&(p.sign!==l.sign||p.spann&&(e[1-i]=e[i]+p.sign*n),e}function S1(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Wu(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var b1=w,zR=Math.min,RR=Math.max,ER=Math.floor,l9=Math.ceil,PR=Qt,u9=Math.PI,f9=function(){function r(e,t,i){this.type="parallel",this._axesMap=Y(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,i)}return r.prototype._init=function(e,t,i){var a=e.dimensions,n=e.parallelAxisIndex;b1(a,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new LR(o,no(u),[0,0],u.get("type"),l)),p=f.type==="category";f.onBand=p&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),i=t.axisBase,a=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=i&&o<=i+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(i){if(e.contains(i,t)){var a=i.getData();b1(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(a,a.mapDimension(n)),Ia(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Zt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,i=["x","y"],a=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,f=Im(e.get("axisExpandWidth"),l),p=Im(e.get("axisExpandCount")||0,[0,u]),c=e.get("axisExpandable")&&u>3&&u>p&&p>1&&f>0&&s>0,h=e.get("axisExpandWindow"),v;if(h)v=Im(h[1]-h[0],l),h[1]=h[0]+v;else{v=Im(f*(p-1),l);var d=e.get("axisExpandCenter")||ER(u/2);h=[f*d-v/2],h[1]=h[0]+v}var m=(s-v)/(u-p);m<3&&(m=0);var g=[ER(PR(h[0]/f,1))+1,l9(PR(h[1]/f,1))-1],y=m/f*h[0];return{layout:n,pixelDimIndex:o,layoutBase:t[i[o]],layoutLength:s,axisBase:t[i[1-o]],axisLength:t[a[1-o]],axisExpandable:c,axisExpandWidth:f,axisCollapseWidth:m,axisExpandWindow:h,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,i=this.dimensions,a=this._makeLayoutInfo(),n=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),b1(i,function(o,s){var l=(a.axisExpandable?c9:p9)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},f={horizontal:u9/2,vertical:0},p=[u[n].x+e.x,u[n].y+e.y],c=f[n],h=Me();Rr(h,h,c),tr(h,h,p),this._axesLayout[o]={position:p,rotation:c,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,i,a){i==null&&(i=0),a==null&&(a=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];w(o,function(m){s.push(e.mapDimension(m)),l.push(n.get(m).model)});for(var u=this.hasAxisBrushed(),f=i;fn*(1-p[0])?(u="jump",l=s-n*(1-p[2])):(l=s-n*p[1])>=0&&(l=s-n*(1-p[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?Qr(l,a,o,"all"):u="none";else{var h=a[1]-a[0],v=o[1]*s/h;a=[RR(0,v-h/2)],a[1]=zR(o[1],a[0]+h),a[0]=a[1]-h}return{axisExpandWindow:a,behavior:u}},r}();function Im(r,e){return zR(RR(r,e[0]),e[1])}function p9(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function c9(r,e){var t=e.layoutLength,i=e.axisExpandWidth,a=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,f;return r=0;a--)Ie(i[a])},e.prototype.getActiveState=function(t){var i=this.activeIntervals;if(!i.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(i.length===1){var a=i[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var n=0,o=i.length;ng9}function jR(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function KR(r,e,t,i){var a=new K;return a.add(new ht({name:"main",style:P1(t),silent:!0,draggable:!0,cursor:"move",drift:et(BR,r,e,a,["n","s","w","e"]),ondragend:et(Bs,e,{isEnd:!0})})),w(i,function(n){a.add(new ht({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:et(BR,r,e,a,n),ondragend:et(Bs,e,{isEnd:!0})}))}),a}function QR(r,e,t,i){var a=i.brushStyle.lineWidth||0,n=Yu(a,y9),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,f=t[0][1],p=t[1][1],c=f-n+a/2,h=p-n+a/2,v=f-o,d=p-s,m=v+a,g=d+a;gn(r,e,"main",o,s,v,d),i.transformable&&(gn(r,e,"w",l,u,n,g),gn(r,e,"e",c,u,n,g),gn(r,e,"n",l,u,m,n),gn(r,e,"s",l,h,m,n),gn(r,e,"nw",l,u,n,n),gn(r,e,"ne",c,u,n,n),gn(r,e,"sw",l,h,n,n),gn(r,e,"se",c,h,n,n))}function C1(r,e){var t=e.__brushOption,i=t.transformable,a=e.childAt(0);a.useStyle(P1(t)),a.attr({silent:!i,cursor:i?"move":"default"}),w([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?A1(r,n[0]):C9(r,n);o&&o.attr({silent:!i,invisible:!i,cursor:i?_9[s]+"-resize":null})})}function gn(r,e,t,i,a,n,o){var s=e.childOfName(t);s&&s.setShape(D9(z1(r,e,[[i,a],[i+n,a+o]])))}function P1(r){return q({strokeNoScale:!0},r.brushStyle)}function $R(r,e,t,i){var a=[gc(r,t),gc(e,i)],n=[Yu(r,t),Yu(e,i)];return[[a[0],n[0]],[a[1],n[1]]]}function T9(r){return qi(r.group)}function A1(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},a=cs(t[e],T9(r));return i[a]}function C9(r,e){var t=[A1(r,e[0]),A1(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function BR(r,e,t,i,a,n){var o=t.__brushOption,s=r.toRectRange(o.range),l=JR(e,a,n);w(i,function(u){var f=x9[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange($R(s[0][0],s[1][0],s[0][1],s[1][1])),I1(e,t),Bs(e,{isEnd:!1})}function A9(r,e,t,i){var a=e.__brushOption.range,n=JR(r,t,i);w(a,function(o){o[0]+=n[0],o[1]+=n[1]}),I1(r,e),Bs(r,{isEnd:!1})}function JR(r,e,t){var i=r.group,a=i.transformCoordToLocal(e,t),n=i.transformCoordToLocal(0,0);return[a[0]-n[0],a[1]-n[1]]}function z1(r,e,t){var i=qR(r,e);return i&&i!==Us?i.clipPath(t,r._transform):$(t)}function D9(r){var e=gc(r[0][0],r[1][0]),t=gc(r[0][1],r[1][1]),i=Yu(r[0][0],r[1][0]),a=Yu(r[0][1],r[1][1]);return{x:e,y:t,width:i-e,height:a-t}}function M9(r,e,t){if(!(!r._brushType||L9(r,e.offsetX,e.offsetY))){var i=r._zr,a=r._covers,n=E1(r,e,t);if(!r._dragging)for(var o=0;oi.getWidth()||t<0||t>i.getHeight()}var Lm={lineX:HR(0),lineY:HR(1),rect:{createCover:function(r,e){function t(i){return i}return KR({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=jR(r);return $R(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,i){QR(r,e,t,i)},updateCommon:C1,contain:M1},polygon:{createCover:function(r,e){var t=new K;return t.add(new pe({name:"main",style:P1(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new he({name:"main",draggable:!0,drift:et(A9,r,e),ondragend:et(Bs,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,i){e.childAt(0).setShape({points:z1(r,e,t)})},updateCommon:C1,contain:M1}};function HR(r){return{createCover:function(e,t){return KR({toRectRange:function(i){var a=[i,[0,100]];return r&&a.reverse(),a},fromRectRange:function(i){return i[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=jR(e),i=gc(t[0][r],t[1][r]),a=Yu(t[0][r],t[1][r]);return[i,a]},updateCoverShape:function(e,t,i,a){var n,o=qR(e,t);if(o!==Us&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(r);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,n];r&&l.reverse(),QR(e,t,l,a)},updateCommon:C1,contain:M1}}var Zu=b9;function Em(r){return r=R1(r),function(e){return S0(e,r)}}function Pm(r,e){return r=R1(r),function(t){var i=e??t,a=i?r.width:r.height,n=i?r.x:r.y;return[n,n+(a||0)]}}function zm(r,e,t){var i=R1(r);return function(a,n){return i.contain(n[0],n[1])&&!po(a,e,t)}}function R1(r){return rt.create(r)}var E9=["axisLine","axisTickLabel","axisName"],P9=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){r.prototype.init.apply(this,arguments),(this._brushController=new Zu(i.getZr())).on("brush",W(this._onBrush,this))},e.prototype.render=function(t,i,a,n){if(!z9(t,i,n)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new K,this.group.add(this._axisGroup),!!t.get("show")){var s=N9(t,i),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,p=t.axis.dim,c=l.getAxisLayout(p),h=N({strokeContainThreshold:f},c),v=new ur(t,h);w(E9,v.add,v),this._axisGroup.add(v.getGroup()),this._refreshBrushController(h,u,t,s,f,a),an(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,i,a,n,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),p=rt.create({x:l[0],y:-o/2,width:u,height:o});p.x-=f,p.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Em(p),isTargetByCursor:zm(p,s,n),getLinearBrushOtherExtent:Pm(p,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(R9(a))},e.prototype._onBrush=function(t){var i=t.areas,a=this.axisModel,n=a.axis,o=k(i,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Ot);function z9(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function R9(r){var e=r.axis;return k(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function N9(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var rN=P9;var O9={type:"axisAreaSelect",event:"axisAreaSelected"};function iN(r){r.registerAction(O9,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var k9={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function yc(r){r.registerComponentView(MR),r.registerComponentModel(IR),r.registerCoordinateSystem("parallel",OR),r.registerPreprocessor(x1),r.registerComponentModel(w1),r.registerComponentView(rN),fa(r,"parallel",w1,k9),iN(r)}function N1(r){St(yc),r.registerChartView(CR),r.registerSeriesModel(AR),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,DR)}var V9=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),U9=function(r){E(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new V9},e.prototype.buildPath=function(t,i){var a=i.extent;t.moveTo(i.x1,i.y1),t.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(t.lineTo(i.x2+a,i.y2),t.bezierCurveTo(i.cpx2+a,i.cpy2,i.cpx1+a,i.cpy1,i.x1+a,i.y1)):(t.lineTo(i.x2,i.y2+a),t.bezierCurveTo(i.cpx2,i.cpy2+a,i.cpx1,i.cpy1+a,i.x1,i.y1+a)),t.closePath()},e.prototype.highlight=function(){cr(this)},e.prototype.downplay=function(){hr(this)},e}(it),B9=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,i,a){var n=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,f=l.height,p=t.getData(),c=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(v){var d=new U9,m=tt(d);m.dataIndex=v.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var g=v.getModel(),y=g.getModel("lineStyle"),x=y.get("curveness"),_=v.node1.getLayout(),b=v.node1.getModel(),S=b.get("localX"),T=b.get("localY"),C=v.node2.getLayout(),A=v.node2.getModel(),D=A.get("localX"),M=A.get("localY"),I=v.getLayout(),L,P,z,R,U,V,B,Z;d.shape.extent=Math.max(1,I.dy),d.shape.orient=h,h==="vertical"?(L=(S!=null?S*u:_.x)+I.sy,P=(T!=null?T*f:_.y)+_.dy,z=(D!=null?D*u:C.x)+I.ty,R=M!=null?M*f:C.y,U=L,V=P*(1-x)+R*x,B=z,Z=P*x+R*(1-x)):(L=(S!=null?S*u:_.x)+_.dx,P=(T!=null?T*f:_.y)+I.sy,z=D!=null?D*u:C.x,R=(M!=null?M*f:C.y)+I.ty,U=L*(1-x)+z*x,V=P,B=L*x+z*(1-x),Z=R),d.setShape({x1:L,y1:P,x2:z,y2:R,cpx1:U,cpy1:V,cpx2:B,cpy2:Z}),d.useStyle(y.getItemStyle()),aN(d.style,h,v);var Q=""+g.get("value"),st=Kt(g,"edgeLabel");ee(d,st,{labelFetcher:{getFormattedLabel:function(Lt,Bt,Et,gt,Pt,Ct){return t.getFormattedLabel(Lt,Bt,"edge",gt,Be(Pt,st.normal&&st.normal.get("formatter"),Q),Ct)}},labelDataIndex:v.dataIndex,defaultText:Q}),d.setTextConfig({position:"inside"});var ct=g.getModel("emphasis");se(d,g,"lineStyle",function(Lt){var Bt=Lt.getItemStyle();return aN(Bt,h,v),Bt}),s.add(d),c.setItemGraphicEl(v.dataIndex,d);var pt=ct.get("focus");Vt(d,pt==="adjacency"?v.getAdjacentDataIndices():pt==="trajectory"?v.getTrajectoryDataIndices():pt,ct.get("blurScope"),ct.get("disabled"))}),o.eachNode(function(v){var d=v.getLayout(),m=v.getModel(),g=m.get("localX"),y=m.get("localY"),x=m.getModel("emphasis"),_=new ht({shape:{x:g!=null?g*u:d.x,y:y!=null?y*f:d.y,width:d.dx,height:d.dy},style:m.getModel("itemStyle").getItemStyle(),z2:10});ee(_,Kt(m),{labelFetcher:{getFormattedLabel:function(S,T){return t.getFormattedLabel(S,T,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),_.disableLabelAnimation=!0,_.setStyle("fill",v.getVisual("color")),_.setStyle("decal",v.getVisual("style").decal),se(_,m),s.add(_),p.setItemGraphicEl(v.dataIndex,_),tt(_).dataType="node";var b=x.get("focus");Vt(_,b==="adjacency"?v.getAdjacentDataIndices():b==="trajectory"?v.getTrajectoryDataIndices():b,x.get("blurScope"),x.get("disabled"))}),p.eachItemGraphicEl(function(v,d){var m=p.getItemModel(d);m.get("draggable")&&(v.drift=function(g,y){n._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=y,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:p.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},v.ondragend=function(){n._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(F9(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(It);function aN(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var i=t.node1.getVisual("color"),a=t.node2.getVisual("color");F(i)&&F(a)&&(r.fill=new Aa(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:i,offset:0},{color:a,offset:1}]))}}function F9(r,e,t){var i=new ht({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Ut(i,{shape:{width:r.width+20}},e,t),i}var nN=B9;var G9=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){var a=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new zt(o[l],this,i));if(n&&a){var u=mc(n,a,this,!0,f);return u.data}function f(p,c){p.wrapMethod("getItemModel",function(h,v){var d=h.parentModel,m=d.getData().getItemLayout(v);if(m){var g=m.depth,y=d.levelModels[g];y&&(h.parentModel=y)}return h}),c.wrapMethod("getItemModel",function(h,v){var d=h.parentModel,m=d.getGraph().getEdgeByIndex(v),g=m.node1.getLayout();if(g){var y=g.depth,x=d.levelModels[y];x&&(h.parentModel=x)}return h})}},e.prototype.setNodePosition=function(t,i){var a=this.option.data||this.option.nodes,n=a[t];n.localX=i[0],n.localY=i[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,i,a){function n(h){return isNaN(h)||h==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ie("nameValue",{name:u,value:l,noValue:n(l)})}else{var f=this.getGraph().getNodeByIndex(t),p=f.getLayout().value,c=this.getDataParams(t,a).data.name;return ie("nameValue",{name:c!=null?c+"":null,value:p,noValue:n(p)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,i){var a=r.prototype.getDataParams.call(this,t,i);if(a.value==null&&i==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;a.value=o}return a},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Rt),oN=G9;function k1(r,e){r.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),a=t.get("nodeGap"),n=H9(t,e);t.layoutInfo=n;var o=n.width,s=n.height,l=t.getGraph(),u=l.nodes,f=l.edges;Y9(u);var p=Dt(u,function(d){return d.getLayout().value===0}),c=p.length!==0?0:t.get("layoutIterations"),h=t.get("orient"),v=t.get("nodeAlign");W9(u,f,i,a,o,s,c,h,v)})}function H9(r,e){return Zt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function W9(r,e,t,i,a,n,o,s,l){Z9(r,e,t,a,n,s,l),K9(r,e,n,a,i,o,s),nZ(r,s)}function Y9(r){w(r,function(e){var t=vo(e.outEdges,Rm),i=vo(e.inEdges,Rm),a=e.getValue()||0,n=Math.max(t,i,a);e.setLayout({value:n},!0)})}function Z9(r,e,t,i,a,n,o){for(var s=[],l=[],u=[],f=[],p=0,c=0;c=0;g&&m.depth>h&&(h=m.depth),d.setLayout({depth:g?m.depth:p},!0),n==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var y=0;yp-1?h:p-1;o&&o!=="left"&&X9(r,o,n,T);var C=n==="vertical"?(a-t)/T:(i-t)/T;j9(r,C,n)}function sN(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function X9(r,e,t,i){if(e==="right"){for(var a=[],n=r,o=0;n.length;){for(var s=0;s0;n--)l*=.99,J9(s,l,o),O1(s,a,t,i,o),aZ(s,l,o),O1(s,a,t,i,o)}function Q9(r,e){var t=[],i=e==="vertical"?"y":"x",a=Yf(r,function(n){return n.getLayout()[i]});return a.keys.sort(function(n,o){return n-o}),w(a.keys,function(n){t.push(a.buckets.get(n))}),t}function $9(r,e,t,i,a,n){var o=1/0;w(r,function(s){var l=s.length,u=0;w(s,function(p){u+=p.getLayout().value});var f=n==="vertical"?(i-(l-1)*a)/u:(t-(l-1)*a)/u;f0&&(s=l.getLayout()[n]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[n]+l.getLayout()[c]+e;var v=a==="vertical"?i:t;if(u=f-e-v,u>0){s=l.getLayout()[n]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var h=p-2;h>=0;--h)l=o[h],u=l.getLayout()[n]+l.getLayout()[c]+e-f,u>0&&(s=l.getLayout()[n]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[n]}})}function J9(r,e,t){w(r.slice().reverse(),function(i){w(i,function(a){if(a.outEdges.length){var n=vo(a.outEdges,tZ,t)/vo(a.outEdges,Rm);if(isNaN(n)){var o=a.outEdges.length;n=o?vo(a.outEdges,eZ,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(n-mo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(n-mo(a,t))*e;a.setLayout({y:l},!0)}}})})}function tZ(r,e){return mo(r.node2,e)*r.getValue()}function eZ(r,e){return mo(r.node2,e)}function rZ(r,e){return mo(r.node1,e)*r.getValue()}function iZ(r,e){return mo(r.node1,e)}function mo(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Rm(r){return r.getValue()}function vo(r,e,t){for(var i=0,a=r.length,n=-1;++no&&(o=l)}),w(i,function(s){var l=new xe({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&w(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function U1(r){r.registerChartView(nN),r.registerSeriesModel(oN),r.registerLayout(k1),r.registerVisual(V1),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){i.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var Nm=function(){function r(){}return r.prototype.getInitialData=function(e,t){var i,a=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",i=a.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",i=n.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,p=this._baseAxisDim=u[f],c=u[1-f],h=[a,n],v=h[f].get("type"),d=h[1-f].get("type"),m=e.data;if(m&&l){var g=[];w(m,function(_,b){var S;O(_)?(S=_.slice(),_.unshift(b)):O(_.value)?(S=N({},_),S.value=S.value.slice(),_.value.unshift(b)):S=_,g.push(S)}),e.data=g}var y=this.defaultValueDimensions,x=[{name:p,type:ws(v),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:ws(d),dimsDef:y.slice()}];return pi(this,{coordDimensions:x,dimensionsCount:y.length+1,encodeDefaulter:et(Lv,x,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}();var lN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Rt);jt(lN,Nm,!0);var uN=lN;var oZ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var f=n.getItemLayout(u),p=fN(f,n,u,l,!0);n.setItemGraphicEl(u,p),o.add(p)}}).update(function(u,f){var p=s.getItemGraphicEl(f);if(!n.hasValue(u)){o.remove(p);return}var c=n.getItemLayout(u);p?(Oe(p),pN(c,p,n,u)):p=fN(c,n,u,l),o.add(p),n.setItemGraphicEl(u,p)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=n},e.prototype.remove=function(t){var i=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(n){n&&i.remove(n)})},e.type="boxplot",e}(It),sZ=function(){function r(){}return r}(),lZ=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i.type="boxplotBoxPath",i}return e.prototype.getDefaultShape=function(){return new sZ},e.prototype.buildPath=function(t,i){var a=i.points,n=0;for(t.moveTo(a[n][0],a[n][1]),n++;n<4;n++)t.lineTo(a[n][0],a[n][1]);for(t.closePath();nd){var _=[g,x];i.push(_)}}}return{boxData:t,outliers:i}}var hN={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Le){var i="";Gt(i)}var a=F1(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function G1(r){r.registerSeriesModel(uN),r.registerChartView(cN),r.registerLayout(B1),r.registerTransform(hN)}var hZ=["color","borderColor"],vZ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,i,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,i,a,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,i):this._incrementalRenderNormal(t,i)},e.prototype.eachRendered=function(t){Sr(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t){var i=t.getData(),a=this._data,n=this.group,o=i.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),i.diff(a).add(function(f){if(i.hasValue(f)){var p=i.getItemLayout(f);if(s&&vN(u,p))return;var c=H1(p,f,!0);Ut(c,{shape:{points:p.ends}},t,f),W1(c,i,f,o),n.add(c),i.setItemGraphicEl(f,c)}}).update(function(f,p){var c=a.getItemGraphicEl(p);if(!i.hasValue(f)){n.remove(c);return}var h=i.getItemLayout(f);if(s&&vN(u,h)){n.remove(c);return}c?(_t(c,{shape:{points:h.ends}},t,f),Oe(c)):c=H1(h,f),W1(c,i,f,o),n.add(c),i.setItemGraphicEl(f,c)}).remove(function(f){var p=a.getItemGraphicEl(f);p&&n.remove(p)}).execute(),this._data=i},e.prototype._renderLarge=function(t){this._clear(),dN(t,this.group);var i=t.get("clip",!0)?Na(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,i){for(var a=i.getData(),n=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=H1(s,o);W1(l,a,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,i){dN(i,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(It),dZ=function(){function r(){}return r}(),mZ=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i.type="normalCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new dZ},e.prototype.buildPath=function(t,i){var a=i.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e}(it);function H1(r,e,t){var i=r.ends;return new mZ({shape:{points:t?gZ(i,r):i},z2:100})}function vN(r,e){for(var t=!0,i=0;i0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(a=t.get(["itemStyle","borderColorDoji"]));var n=t.getModel("itemStyle").getItemStyle(hZ);e.useStyle(n),e.style.fill=null,e.style.stroke=a}var mN=vZ;var gN=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,i,a){var n=i.getItemLayout(t);return n&&a.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Rt);jt(gN,Nm,!0);var yN=gN;function X1(r){!r||!O(r.series)||w(r.series,function(e){j(e)&&e.type==="k"&&(e.type="candlestick")})}var xZ=["itemStyle","borderColor"],_Z=["itemStyle","borderColor0"],SZ=["itemStyle","borderColorDoji"],bZ=["itemStyle","color"],wZ=["itemStyle","color0"],TZ={seriesType:"candlestick",plan:li(),performRawSeries:!0,reset:function(r,e){function t(n,o){return o.get(n>0?bZ:wZ)}function i(n,o){return o.get(n===0?SZ:n>0?xZ:_Z)}if(!e.isSeriesFiltered(r)){var a=r.pipelineContext.large;return!a&&{progress:function(n,o){for(var s;(s=n.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=t(u,l),f.stroke=i(u,l)||f.fill;var p=o.ensureUniqueItemVisual(s,"style");N(p,f)}}}}}},xN=TZ;var CZ={seriesType:"candlestick",plan:li(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),i=AZ(r,t),a=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[a])),l=k(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],f=l[1],p=l[2],c=l[3];if(t.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?v:h};function h(d,m){for(var g,y=m.getStore();(g=d.next())!=null;){var x=y.get(s,g),_=y.get(u,g),b=y.get(f,g),S=y.get(p,g),T=y.get(c,g),C=Math.min(_,b),A=Math.max(_,b),D=U(C,x),M=U(A,x),I=U(S,x),L=U(T,x),P=[];V(P,M,0),V(P,D,1),P.push(Z(L),Z(M),Z(I),Z(D));var z=m.getItemModel(g),R=!!z.get(["itemStyle","borderColorDoji"]);m.setItemLayout(g,{sign:_N(y,g,_,b,f,R),initBaseline:_>b?M[n]:D[n],ends:P,brushRect:B(S,T,x)})}function U(Q,st){var ct=[];return ct[a]=st,ct[n]=Q,isNaN(st)||isNaN(Q)?[NaN,NaN]:e.dataToPoint(ct)}function V(Q,st,ct){var pt=st.slice(),Lt=st.slice();pt[a]=sp(pt[a]+i/2,1,!1),Lt[a]=sp(Lt[a]-i/2,1,!0),ct?Q.push(pt,Lt):Q.push(Lt,pt)}function B(Q,st,ct){var pt=U(Q,ct),Lt=U(st,ct);return pt[a]-=i/2,Lt[a]-=i/2,{x:pt[0],y:pt[1],width:n?i:Lt[0]-pt[0],height:n?Lt[1]-pt[1]:i}}function Z(Q){return Q[a]=sp(Q[a],1),Q}}function v(d,m){for(var g=Tr(d.count*4),y=0,x,_=[],b=[],S,T=m.getStore(),C=!!r.get(["itemStyle","borderColorDoji"]);(S=d.next())!=null;){var A=T.get(s,S),D=T.get(u,S),M=T.get(f,S),I=T.get(p,S),L=T.get(c,S);if(isNaN(A)||isNaN(I)||isNaN(L)){g[y++]=NaN,y+=3;continue}g[y++]=_N(T,S,D,M,f,C),_[a]=A,_[n]=I,x=e.dataToPoint(_,null,b),g[y++]=x?x[0]:NaN,g[y++]=x?x[1]:NaN,_[n]=L,x=e.dataToPoint(_,null,b),g[y++]=x?x[1]:NaN}m.setLayout("largePoints",g)}}};function _N(r,e,t,i,a,n){var o;return t>i?o=-1:t0?r.get(a,e-1)<=i?1:-1:1,o}function AZ(r,e){var t=r.getBaseAxis(),i,a=t.type==="category"?t.getBandWidth():(i=t.getExtent(),Math.abs(i[1]-i[0])/e.count()),n=H(at(r.get("barMaxWidth"),a),a),o=H(at(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?H(s,a):Math.max(Math.min(a/2,n),o)}var SN=CZ;function q1(r){r.registerChartView(mN),r.registerSeriesModel(yN),r.registerPreprocessor(X1),r.registerVisual(xN),r.registerLayout(SN)}function bN(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(i){i.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var DZ=function(r){E(e,r);function e(t,i){var a=r.call(this)||this,n=new vn(t,i),o=new K;return a.add(n),a.add(o),a.updateData(t,i),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var i=t.symbolType,a=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(n)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){n.stopAnimation();var c=void 0;X(p)?c=p(a):c=p,n.__t>0&&(c=-s*n.__t),this._animateSymbol(n,s,c,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,i,a,n,o){if(i>0){t.__t=0;var s=this,l=t.animate("",n).when(o?i*2:i,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});n||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return di(t.__p1,t.__cp1)+di(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,i){t.__p1=i[0],t.__p2=i[1],t.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},e.prototype.updateData=function(t,i,a){this.childAt(0).updateData(t,i,a),this._updateEffectSymbol(t,i)},e.prototype._updateSymbolPosition=function(t){var i=t.__p1,a=t.__p2,n=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Se,f=Mf;s[0]=u(i[0],n[0],a[0],o),s[1]=u(i[1],n[1],a[1],o);var p=t.__t<1?f(i[0],n[0],a[0],o):f(a[0],n[0],i[0],1-o),c=t.__t<1?f(i[1],n[1],a[1],o):f(a[1],n[1],i[1],1-o);t.rotation=-Math.atan2(c,p)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(n[l]<=i);l--);l=Math.min(l,o-2)}else{for(l=s;li);l++);l=Math.min(l-1,o-2)}var f=(i-n[l])/(n[l+1]-n[l]),p=a[l],c=a[l+1];t.x=p[0]*(1-f)+f*c[0],t.y=p[1]*(1-f)+f*c[1];var h=t.__t<1?c[0]-p[0]:p[0]-c[0],v=t.__t<1?c[1]-p[1]:p[1]-c[1];t.rotation=-Math.atan2(v,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,t.ignore=!1}},e}(Om),AN=PZ;var zZ=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),RZ=function(r){E(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new zZ},e.prototype.buildPath=function(t,i){var a=i.segs,n=i.curveness,o;if(i.polyline)for(o=this._off;o0){t.moveTo(a[o++],a[o++]);for(var l=1;l0){var h=(u+p)/2-(f-c)*n,v=(f+c)/2-(p-u)*n;t.quadraticCurveTo(h,v,p,c)}else t.lineTo(p,c)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,i){var a=this.shape,n=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u0)for(var p=n[u++],c=n[u++],h=1;h0){var m=(p+v)/2-(c-d)*o,g=(c+d)/2-(v-p)*o;if(qh(p,c,m,g,v,d,s,t,i))return l}else if(wa(p,c,v,d,s,t,i))return l;l++}return-1},e.prototype.contain=function(t,i){var a=this.transformCoordToLocal(t,i),n=this.getBoundingRect();if(t=a[0],i=a[1],n.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,a=i.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),DN=NZ;var OZ={seriesType:"lines",plan:li(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),i=r.pipelineContext.large;return{progress:function(a,n){var o=[];if(i){var s=void 0,l=a.end-a.start;if(t){for(var u=0,f=a.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var p=t.get("clip",!0)&&Na(t.coordinateSystem,!1,t);p?this.group.setClipPath(p):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,a){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,i,a){this._lineDraw.incrementalUpdate(t,i.getData()),this._finished=t.end===i.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,i,a){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=Vm.reset(t,i,a);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,i){var a=this._lineDraw,n=this._showEffect(i),o=!!i.get("polyline"),s=i.pipelineContext,l=s.large;return(!a||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new DN:new Fu(o?n?AN:km:n?Om:Bu),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var i=t.getZr(),a=i.painter.getType()==="svg";!a&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.type="lines",e}(It),MN=kZ;var VZ=typeof Uint32Array>"u"?Array:Uint32Array,UZ=typeof Float64Array>"u"?Array:Float64Array;function IN(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=k(e,function(t){var i=[t[0].coord,t[1].coord],a={coords:i};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),Cl([a,t[0],t[1]])}))}var BZ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],IN(t);var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(IN(t),t.data){var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var i=this._processFlatCoordsArray(t.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=Eo(this._flatCoords,i.flatCoords),this._flatCoordsOffset=Eo(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),t.data=new Float32Array(i.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var i=this.getData().getItemModel(t),a=i.option instanceof Array?i.option:i.getShallow("coords");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,i){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;oa}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,i){if(0)var a;var n=new ve(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;n.hasItemOption=!0;var f=o.value;if(f!=null)return f instanceof Array?f[u]:f}),n},e.prototype.formatTooltip=function(t,i,a){var n=this.getData(),o=n.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ie("nameValue",{name:f.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),i=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&i>0?i+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Rt),LN=BZ;function Um(r){return r instanceof Array||(r=[r,r]),r}var FZ={seriesType:"lines",reset:function(r){var e=Um(r.get("symbol")),t=Um(r.get("symbolSize")),i=r.getData();i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",t&&t[0]),i.setVisual("toSymbolSize",t&&t[1]);function a(n,o){var s=n.getItemModel(o),l=Um(s.getShallow("symbol",!0)),u=Um(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?a:null}}},EN=FZ;function K1(r){r.registerChartView(MN),r.registerSeriesModel(LN),r.registerLayout(Vm),r.registerVisual(EN)}var GZ=256,HZ=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=pr.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,i,a,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),f=this.pointSize+this.blurSize,p=this.canvas,c=p.getContext("2d"),h=e.length;p.width=t,p.height=i;for(var v=0;v0){var I=o(x)?l:u;x>0&&(x=x*D+C),b[S++]=I[M],b[S++]=I[M+1],b[S++]=I[M+2],b[S++]=I[M+3]*x*256}else S+=4}return c.putImageData(_,0,0),p},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=pr.createCanvas()),t=this.pointSize+this.blurSize,i=t*2;e.width=i,e.height=i;var a=e.getContext("2d");return a.clearRect(0,0,i,i),a.shadowOffsetX=i,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var i=this._gradientPixels,a=i[t]||(i[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),a[o++]=n[0],a[o++]=n[1],a[o++]=n[2],a[o++]=n[3];return a},r}(),PN=HZ;function WZ(r,e,t){var i=r[1]-r[0];e=k(e,function(o){return{interval:[(o.interval[0]-r[0])/i,(o.interval[1]-r[0])/i]}});var a=e.length,n=0;return function(o){var s;for(s=n;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s=e[0]&&i<=e[1]}}function zN(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var ZZ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){var n;i.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,a,0,t.getData().count()):zN(o)&&this._renderOnGeo(o,t,n,a)},e.prototype.incrementalPrepareRender=function(t,i,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,i,a,n){var o=i.coordinateSystem;o&&(zN(o)?this.render(i,a,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Sr(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,i,a,n,o){var s=t.coordinateSystem,l=Pi(s,"cartesian2d"),u,f,p,c;if(l){var h=s.getAxis("x"),v=s.getAxis("y");u=h.getBandWidth()+.5,f=v.getBandWidth()+.5,p=h.scale.getExtent(),c=v.scale.getExtent()}for(var d=this.group,m=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),x=t.getModel(["select","itemStyle"]).getItemStyle(),_=t.get(["itemStyle","borderRadius"]),b=Kt(t),S=t.getModel("emphasis"),T=S.get("focus"),C=S.get("blurScope"),A=S.get("disabled"),D=l?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],M=a;Mp[1]||zc[1])continue;var R=s.dataToPoint([P,z]);I=new ht({shape:{x:R[0]-u/2,y:R[1]-f/2,width:u,height:f},style:L})}else{if(isNaN(m.get(D[1],M)))continue;I=new ht({z2:1,shape:s.dataToRect([m.get(D[0],M)]).contentShape,style:L})}if(m.hasItemOption){var U=m.getItemModel(M),V=U.getModel("emphasis");g=V.getModel("itemStyle").getItemStyle(),y=U.getModel(["blur","itemStyle"]).getItemStyle(),x=U.getModel(["select","itemStyle"]).getItemStyle(),_=U.get(["itemStyle","borderRadius"]),T=V.get("focus"),C=V.get("blurScope"),A=V.get("disabled"),b=Kt(U)}I.shape.r=_;var B=t.getRawValue(M),Z="-";B&&B[2]!=null&&(Z=B[2]+""),ee(I,b,{labelFetcher:t,labelDataIndex:M,defaultOpacity:L.opacity,defaultText:Z}),I.ensureState("emphasis").style=g,I.ensureState("blur").style=y,I.ensureState("select").style=x,Vt(I,T,C,A),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),d.add(I),m.setItemGraphicEl(M,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,i,a,n){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new PN;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var f=t.getViewRect().clone(),p=t.getRoamTransform();f.applyTransform(p);var c=Math.max(f.x,0),h=Math.max(f.y,0),v=Math.min(f.width+f.x,n.getWidth()),d=Math.min(f.height+f.y,n.getHeight()),m=v-c,g=d-h,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],x=l.mapArray(y,function(T,C,A){var D=t.dataToPoint([T,C]);return D[0]-=c,D[1]-=h,D.push(A),D}),_=a.getExtent(),b=a.type==="visualMap.continuous"?YZ(_,a.option.range):WZ(_,a.getPieceList(),a.option.selected);u.update(x,m,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var S=new re({style:{width:m,height:g,x:c,y:h,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(It),RN=ZZ;var XZ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return Ke(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=un.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Rt),NN=XZ;function Q1(r){r.registerChartView(RN),r.registerSeriesModel(NN)}var qZ=["itemStyle","borderWidth"],ON=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],$1=new _r,jZ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),p=l.master.getRect(),c={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[p.x,p.x+p.width],[p.y,p.y+p.height]],isHorizontal:f,valueDim:ON[+f],categoryDim:ON[1-+f]};o.diff(s).add(function(v){if(o.hasValue(v)){var d=VN(o,v),m=kN(o,v,d,c),g=UN(o,c,m);o.setItemGraphicEl(v,g),n.add(g),FN(g,c,m)}}).update(function(v,d){var m=s.getItemGraphicEl(d);if(!o.hasValue(v)){n.remove(m);return}var g=VN(o,v),y=kN(o,v,g,c),x=qN(o,y);m&&x!==m.__pictorialShapeStr&&(n.remove(m),o.setItemGraphicEl(v,null),m=null),m?rX(m,c,y):m=UN(o,c,y,!0),o.setItemGraphicEl(v,m),m.__pictorialSymbolMeta=y,n.add(m),FN(m,c,y)}).remove(function(v){var d=s.getItemGraphicEl(v);d&&BN(s,v,d.__pictorialSymbolMeta.animationModel,d)}).execute();var h=t.get("clip",!0)?Na(t.coordinateSystem,!1,t):null;return h?n.setClipPath(h):n.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,i){var a=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){BN(n,tt(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e}(It);function kN(r,e,t,i){var a=r.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,p=t.isAnimationEnabled(),c={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:p?t:null,hoverScale:p&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};KZ(t,n,a,i,c),QZ(r,e,a,n,o,c.boundingLength,c.pxSign,f,i,c),$Z(t,c.symbolScale,u,i,c);var h=c.symbolSize,v=ui(t.get("symbolOffset"),h);return JZ(t,h,a,n,o,v,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function KZ(r,e,t,i,a){var n=i.valueDim,o=r.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),f;if(O(o)){var p=[J1(s,o[0])-l,J1(s,o[1])-l];p[1]0?1:-1}function J1(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function QZ(r,e,t,i,a,n,o,s,l,u){var f=l.valueDim,p=l.categoryDim,c=Math.abs(t[p.wh]),h=r.getItemVisual(e,"symbolSize"),v;O(h)?v=h.slice():h==null?v=["100%","100%"]:v=[h,h],v[p.index]=H(v[p.index],c),v[f.index]=H(v[f.index],i?c:Math.abs(n)),u.symbolSize=v;var d=u.symbolScale=[v[0]/s,v[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function $Z(r,e,t,i,a){var n=r.get(qZ)||0;n&&($1.attr({scaleX:e[0],scaleY:e[1],rotation:t}),$1.updateTransform(),n/=$1.getLineScale(),n*=e[i.valueDim.index]),a.valueLineWidth=n||0}function JZ(r,e,t,i,a,n,o,s,l,u,f,p){var c=f.categoryDim,h=f.valueDim,v=p.pxSign,d=Math.max(e[h.index]+s,0),m=d;if(i){var g=Math.abs(l),y=ae(r.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=H(y,e[h.index]),b=Math.max(d+_*2,0),S=x?0:_*2,T=jo(i),C=T?i:GN((g+S)/b),A=g-C*d;_=A/2/(x?C:Math.max(C-1,1)),b=d+_*2,S=x?0:_*2,!T&&i!=="fixed"&&(C=u?GN((Math.abs(u)+S)/b):0),m=C*b-S,p.repeatTimes=C,p.symbolMargin=_}var D=v*(m/2),M=p.pathPosition=[];M[c.index]=t[c.wh]/2,M[h.index]=o==="start"?D:o==="end"?l-D:l/2,n&&(M[0]+=n[0],M[1]+=n[1]);var I=p.bundlePosition=[];I[c.index]=t[c.xy],I[h.index]=t[h.xy];var L=p.barRectShape=N({},t);L[h.wh]=v*Math.max(Math.abs(t[h.wh]),Math.abs(M[h.index]+D)),L[c.wh]=t[c.wh];var P=p.clipShape={};P[c.xy]=-t[c.xy],P[c.wh]=f.ecSize[c.wh],P[h.xy]=0,P[h.wh]=t[h.wh]}function HN(r){var e=r.symbolPatternSize,t=Xt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function WN(r,e,t,i){var a=r.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,p=n[e.valueDim.index]+o+t.symbolMargin*2;for(tb(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:g<0)&&(y=u-1-d),m[l.index]=p*(y-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function YN(r,e,t,i){var a=r.__pictorialBundle,n=r.__pictorialMainPath;n?Xu(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,i):(n=r.__pictorialMainPath=HN(t),a.add(n),Xu(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,i))}function ZN(r,e,t){var i=N({},e.barRectShape),a=r.__pictorialBarRect;a?Xu(a,null,{shape:i},e,t):(a=r.__pictorialBarRect=new ht({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function XN(r,e,t,i){if(t.symbolClip){var a=r.__pictorialClipPath,n=N({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)_t(a,{shape:n},s,l);else{n[o.wh]=0,a=new ht({shape:n}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],dt[i?"updateProps":"initProps"](a,{shape:u},s,l)}}}function VN(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=tX,t.isAnimationEnabled=eX,t}function tX(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function eX(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function UN(r,e,t,i){var a=new K,n=new K;return a.add(n),a.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?WN(a,e,t):YN(a,e,t),ZN(a,t,i),XN(a,e,t,i),a.__pictorialShapeStr=qN(r,t),a.__pictorialSymbolMeta=t,a}function rX(r,e,t){var i=t.animationModel,a=t.dataIndex,n=r.__pictorialBundle;_t(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},i,a),t.symbolRepeat?WN(r,e,t,!0):YN(r,e,t,!0),ZN(r,t,!0),XN(r,e,t,!0)}function BN(r,e,t,i){var a=i.__pictorialBarRect;a&&a.removeTextContent();var n=[];tb(i,function(o){n.push(o)}),i.__pictorialMainPath&&n.push(i.__pictorialMainPath),i.__pictorialClipPath&&(t=null),w(n,function(o){Ti(o,{scaleX:0,scaleY:0},t,e,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(e,null)}function qN(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tb(r,e,t){w(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&e.call(t,i)})}function Xu(r,e,t,i,a,n){e&&r.attr(e),i.symbolClip&&!a?t&&r.attr(t):t&&dt[a?"updateProps":"initProps"](r,t,i.animationModel,i.dataIndex,n)}function FN(r,e,t){var i=t.dataIndex,a=t.itemModel,n=a.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),f=n.get("focus"),p=n.get("blurScope"),c=n.get("scale");tb(r,function(d){if(d instanceof re){var m=d.style;d.useStyle(N({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else d.useStyle(t.style);var g=d.ensureState("emphasis");g.style=o,c&&(g.scaleX=d.scaleX*1.1,g.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],v=r.__pictorialBarRect;v.ignoreClip=!0,ee(v,Kt(a),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:sa(e.seriesModel.getData(),i),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Vt(r,f,p,n.get("disabled"))}function GN(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var jN=jZ;var iX=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=mr(Mu.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Mu),KN=iX;function eb(r){r.registerChartView(jN),r.registerSeriesModel(KN),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,et(Sd,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bd("pictorialBar"))}var aX=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,i,a){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),f=u.rect,p=u.boundaryGap;s.x=0,s.y=f.y+p[0];function c(m){return m.name}var h=new lr(this._layersSeries||[],l,c,c),v=[];h.add(W(d,this,"add")).update(W(d,this,"update")).remove(W(d,this,"remove")).execute();function d(m,g,y){var x=o._layers;if(m==="remove"){s.remove(x[g]);return}for(var _=[],b=[],S,T=l[g].indices,C=0;Cn&&(n=s),i.push(s)}for(var u=0;un&&(n=p)}return{y0:a,max:n}}function ab(r){r.registerChartView(QN),r.registerSeriesModel($N),r.registerLayout(ib),r.registerProcessor(ua("themeRiver"))}var lX=2,uX=4,fX=function(r){E(e,r);function e(t,i,a,n){var o=r.call(this)||this;o.z2=lX,o.textConfig={inside:!0},tt(o).seriesIndex=i.seriesIndex;var s=new yt({z2:uX,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,i,a,n),o}return e.prototype.updateData=function(t,i,a,n,o){this.node=i,i.piece=this,a=a||this._seriesModel,n=n||this._ecModel;var s=this;tt(s).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),f=i.getLayout(),p=N({},f);p.label=null;var c=i.getVisual("style");c.lineJoin="bevel";var h=i.getVisual("decal");h&&(c.decal=ra(h,o));var v=Oa(l.getModel("itemStyle"),p,!0);N(p,v),w(Ue,function(y){var x=s.ensureState(y),_=l.getModel([y,"itemStyle"]);x.style=_.getItemStyle();var b=Oa(_,p);b&&(x.shape=b)}),t?(s.setShape(p),s.shape.r=f.r0,Ut(s,{shape:{r:f.r}},a,i.dataIndex)):(_t(s,{shape:p},a),Oe(s)),s.useStyle(c),this._updateLabel(a);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=a||this._seriesModel,this._ecModel=n||this._ecModel;var m=u.get("focus"),g=m==="ancestor"?i.getAncestorsIndices():m==="descendant"?i.getDescendantIndices():m;Vt(this,g,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var i=this,a=this.node.getModel(),n=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),p=this,c=p.getTextContent(),h=this.node.dataIndex,v=n.get("minAngle")/180*Math.PI,d=n.get("show")&&!(v!=null&&Math.abs(s)P&&!qa(R-P)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,i,a):(o.virtualPiece=new nb(y,t,i,a),f.add(o.virtualPiece)),x.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(x.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(i){var a=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!a&&o.piece&&o.piece===i.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";gs(u,f)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Bm,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,i){var a=i.getData(),n=a.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(It),rO=cX;var hX=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,i){var a={name:t.name,children:t.data};iO(a);var n=this._levelModels=k(t.levels||[],function(l){return new zt(l,this,i)},this),o=Ru.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var p=o.getNodeByDataIndex(f),c=n[p.depth];return c&&(u.parentModel=c),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return i.treePathInfo=ho(a,this),i},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){sc(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Rt);function iO(r){var e=0;w(r.children,function(i){iO(i);var a=i.value;O(a)&&(a=a[0]),e+=a});var t=r.value;O(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),O(r.value)?r.value[0]=t:r.value=t}var aO=hX;var nO=Math.PI/180;function ob(r,e,t){e.eachSeriesByType(r,function(i){var a=i.get("center"),n=i.get("radius");O(n)||(n=[0,n]),O(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=H(a[0],o),f=H(a[1],s),p=H(n[0],l/2),c=H(n[1],l/2),h=-i.get("startAngle")*nO,v=i.get("minAngle")*nO,d=i.getData().tree.root,m=i.getViewRoot(),g=m.depth,y=i.get("sort");y!=null&&oO(m,y);var x=0;w(m.children,function(R){!isNaN(R.getValue())&&x++});var _=m.getValue(),b=Math.PI/(_||x)*2,S=m.depth>0,T=m.height-(S?-1:1),C=(c-p)/(T||1),A=i.get("clockwise"),D=i.get("stillShowZeroSum"),M=A?1:-1,I=function(R,U){if(R){var V=U;if(R!==d){var B=R.getValue(),Z=_===0&&D?b:B*b;Z1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return i.depth>1&&F(s)&&(s=Sh(s,(i.depth-1)/(n-1)*.5)),s}r.eachSeriesByType("sunburst",function(i){var a=i.getData(),n=a.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,i,n.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");N(u,l)})})}function lb(r){r.registerChartView(rO),r.registerSeriesModel(aO),r.registerLayout(et(ob,"sunburst")),r.registerProcessor(et(ua,"sunburst")),r.registerVisual(sb),eO(r)}var ub={color:"fill",borderColor:"stroke"},sO={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ua=ot(),dX=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,i){return Ke(null,this)},e.prototype.getDataParams=function(t,i,a){var n=r.prototype.getDataParams.call(this,t,i);return a&&(n.info=Ua(a).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Rt),lO=dX;function mX(r,e){return e=e||[0,0],k(["x","y"],function(t,i){var a=this.getAxis(t),n=e[i],o=r[i]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(n-o)-a.dataToCoord(n+o))},this)}function fb(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:W(mX,r)}}}function gX(r,e){return e=e||[0,0],k([0,1],function(t){var i=e[t],a=r[t]/2,n=[],o=[];return n[t]=i-a,o[t]=i+a,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function pb(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:W(gX,r)}}}function yX(r,e){var t=this.getAxis(),i=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(i-a)-t.dataToCoord(i+a))}function cb(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:W(yX,r)}}}function xX(r,e){return e=e||[0,0],k(["Radius","Angle"],function(t,i){var a="get"+t+"Axis",n=this[a](),o=e[i],s=r[i]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function hb(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:i[1],r0:i[0]},api:{coord:function(a){var n=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:W(xX,r)}}}function vb(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(i,a){return r.dataToPoint(i,a)}}}}function Fm(r,e,t,i){return r&&(r.legacy||r.legacy!==!1&&!t&&!i&&e!=="tspan"&&(e==="text"||J(r,"text")))}function Gm(r,e,t){var i=r,a,n,o;if(e==="text")o=i;else{o={},J(i,"text")&&(o.text=i.text),J(i,"rich")&&(o.rich=i.rich),J(i,"textFill")&&(o.fill=i.textFill),J(i,"textStroke")&&(o.stroke=i.textStroke),J(i,"fontFamily")&&(o.fontFamily=i.fontFamily),J(i,"fontSize")&&(o.fontSize=i.fontSize),J(i,"fontStyle")&&(o.fontStyle=i.fontStyle),J(i,"fontWeight")&&(o.fontWeight=i.fontWeight),n={type:"text",style:o,silent:!0},a={};var s=J(i,"textPosition");t?a.position=s?i.textPosition:"inside":s&&(a.position=i.textPosition),J(i,"textPosition")&&(a.position=i.textPosition),J(i,"textOffset")&&(a.offset=i.textOffset),J(i,"textRotation")&&(a.rotation=i.textRotation),J(i,"textDistance")&&(a.distance=i.textDistance)}return uO(o,r),w(o.rich,function(l){uO(l,l)}),{textConfig:a,textContent:n}}function uO(r,e){e&&(e.font=e.textFont||e.font,J(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),J(e,"textAlign")&&(r.align=e.textAlign),J(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),J(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),J(e,"textWidth")&&(r.width=e.textWidth),J(e,"textHeight")&&(r.height=e.textHeight),J(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),J(e,"textPadding")&&(r.padding=e.textPadding),J(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),J(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),J(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),J(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),J(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),J(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),J(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function db(r,e,t){var i=r;i.textPosition=i.textPosition||t.position||"inside",t.offset!=null&&(i.textOffset=t.offset),t.rotation!=null&&(i.textRotation=t.rotation),t.distance!=null&&(i.textDistance=t.distance);var a=i.textPosition.indexOf("inside")>=0,n=r.fill||"#000";fO(i,e);var o=i.textFill==null;return a?o&&(i.textFill=t.insideFill||"#fff",!i.textStroke&&t.insideStroke&&(i.textStroke=t.insideStroke),!i.textStroke&&(i.textStroke=n),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=r.fill||t.outsideFill||"#000"),!i.textStroke&&t.outsideStroke&&(i.textStroke=t.outsideStroke)),i.text=e.text,i.rich=e.rich,w(e.rich,function(s){fO(s,s)}),i}function fO(r,e){e&&(J(e,"fill")&&(r.textFill=e.fill),J(e,"stroke")&&(r.textStroke=e.fill),J(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),J(e,"font")&&(r.font=e.font),J(e,"fontStyle")&&(r.fontStyle=e.fontStyle),J(e,"fontWeight")&&(r.fontWeight=e.fontWeight),J(e,"fontSize")&&(r.fontSize=e.fontSize),J(e,"fontFamily")&&(r.fontFamily=e.fontFamily),J(e,"align")&&(r.textAlign=e.align),J(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),J(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),J(e,"width")&&(r.textWidth=e.width),J(e,"height")&&(r.textHeight=e.height),J(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),J(e,"padding")&&(r.textPadding=e.padding),J(e,"borderColor")&&(r.textBorderColor=e.borderColor),J(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),J(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),J(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),J(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),J(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),J(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),J(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),J(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),J(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),J(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var vO={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},pO=ft(vO),zMt=$e(ii,function(r,e){return r[e]=1,r},{}),RMt=ii.join(", "),_c=["","style","shape","extra"],qu=ot();function mb(r,e,t,i,a){var n=r+"Animation",o=Da(r,i,a)||{},s=qu(e).userDuring;return o.duration>0&&(o.during=s?W(TX,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),N(o,t[n]),o}function ju(r,e,t,i){i=i||{};var a=i.dataIndex,n=i.isInit,o=i.clearStyle,s=t.isAnimationEnabled(),l=qu(r),u=e.style;l.userDuring=e.during;var f={},p={};if(AX(r,e,p),hO("shape",e,p),hO("extra",e,p),!n&&s&&(CX(r,e,f),cO("shape",r,e,f),cO("extra",r,e,f),DX(r,e,u,f)),p.style=u,_X(r,p,o),bX(r,e),s)if(n){var c={};w(_c,function(v){var d=v?e[v]:e;d&&d.enterFrom&&(v&&(c[v]=c[v]||{}),N(v?c[v]:c,d.enterFrom))});var h=mb("enter",r,e,t,a);h.duration>0&&r.animateFrom(c,h)}else SX(r,e,a||0,t,f);gb(r,e),u?r.dirty():r.markRedraw()}function gb(r,e){for(var t=qu(r).leaveToProps,i=0;i<_c.length;i++){var a=_c[i],n=a?e[a]:e;n&&n.leaveTo&&(t||(t=qu(r).leaveToProps={}),a&&(t[a]=t[a]||{}),N(a?t[a]:t,n.leaveTo))}}function Ku(r,e,t,i){if(r){var a=r.parent,n=qu(r).leaveToProps;if(n){var o=mb("update",r,e,t,0);o.done=function(){a.remove(r),i&&i()},r.animateTo(n,o)}else a.remove(r),i&&i()}}function go(r){return r==="all"}function _X(r,e,t){var i=e.style;if(!r.isGroup&&i){if(t){r.useStyle({});for(var a=r.animators,n=0;n0&&r.animateFrom(a,n)}}function bX(r,e){J(e,"silent")&&(r.silent=e.silent),J(e,"ignore")&&(r.ignore=e.ignore),r instanceof be&&J(e,"invisible")&&(r.invisible=e.invisible),r instanceof it&&J(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Ba={},wX={setTransform:function(r,e){return Ba.el[r]=e,this},getTransform:function(r){return Ba.el[r]},setShape:function(r,e){var t=Ba.el,i=t.shape||(t.shape={});return i[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Ba.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Ba.el,i=t.style;return i&&(i[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Ba.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Ba.el.extra||(Ba.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Ba.el.extra;if(e)return e[r]}};function TX(){var r=this,e=r.el;if(e){var t=qu(e).userDuring,i=r.userDuring;if(t!==i){r.el=r.userDuring=null;return}Ba.el=e,i(wX)}}function cO(r,e,t,i){var a=t[r];if(a){var n=e[r],o;if(n){var s=t.transition,l=a.transition;if(l)if(!o&&(o=i[r]={}),go(l))N(o,n);else for(var u=Nt(l),f=0;f=0){!o&&(o=i[r]={});for(var h=ft(n),f=0;f=0)){var c=r.getAnimationStyleProps(),h=c?c.style:null;if(h){!n&&(n=i.style={});for(var v=ft(t),u=0;u=0?e.getStore().get(U,z):void 0}var V=e.get(R.name,z),B=R&&R.ordinalMeta;return B?B.categories[V]:V}function S(P,z){z==null&&(z=u);var R=e.getItemVisual(z,"style"),U=R&&R.fill,V=R&&R.opacity,B=y(z,yo).getItemStyle();U!=null&&(B.fill=U),V!=null&&(B.opacity=V);var Z={inheritColor:F(U)?U:"#000"},Q=x(z,yo),st=Ht(Q,null,Z,!1,!0);st.text=Q.getShallow("show")?at(r.getFormattedLabel(z,yo),sa(e,z)):null;var ct=lp(Q,Z,!1);return A(P,B),B=db(B,st,ct),P&&C(B,P),B.legacy=!0,B}function T(P,z){z==null&&(z=u);var R=y(z,yn).getItemStyle(),U=x(z,yn),V=Ht(U,null,null,!0,!0);V.text=U.getShallow("show")?Be(r.getFormattedLabel(z,yn),r.getFormattedLabel(z,yo),sa(e,z)):null;var B=lp(U,null,!0);return A(P,R),R=db(R,V,B),P&&C(R,P),R.legacy=!0,R}function C(P,z){for(var R in z)J(z,R)&&(P[R]=z[R])}function A(P,z){P&&(P.textFill&&(z.textFill=P.textFill),P.textPosition&&(z.textPosition=P.textPosition))}function D(P,z){if(z==null&&(z=u),J(ub,P)){var R=e.getItemVisual(z,"style");return R?R[ub[P]]:null}if(J(sO,P))return e.getItemVisual(z,P)}function M(P){if(n.type==="cartesian2d"){var z=n.getBaseAxis();return nE(q({axis:z},P))}}function I(){return t.getCurrentSeriesIndices()}function L(P){return su(P,t)}}function kX(r){var e={};return w(r.dimensions,function(t){var i=r.getDimensionInfo(t);if(!i.isExtraCoord){var a=i.coordDim,n=e[a]=e[a]||[];n[i.coordDimIndex]=r.getDimensionIndex(t)}}),e}function _b(r,e,t,i,a,n,o){if(!i){n.remove(e);return}var s=Db(r,e,t,i,a,n);return s&&o.setItemGraphicEl(t,s),s&&Vt(s,i.focus,i.blurScope,i.emphasisDisabled),s}function Db(r,e,t,i,a,n){var o=-1,s=e;e&&bO(e,i,a)&&(o=nt(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Cb(i),s&&zX(s,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Oi.normal.cfg=Oi.normal.conOpt=Oi.emphasis.cfg=Oi.emphasis.conOpt=Oi.blur.cfg=Oi.blur.conOpt=Oi.select.cfg=Oi.select.conOpt=null,Oi.isLegacy=!1,UX(u,t,i,a,l,Oi),VX(u,t,i,a,l),Ab(r,u,t,i,Oi,a,l),J(i,"info")&&(Ua(u).info=i.info);for(var f=0;f=0?n.replaceAt(u,o):n.add(u),u}function bO(r,e,t){var i=Ua(r),a=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==i.customGraphicType||a==="path"&&WX(n)&&wO(n)!==i.customPathData||a==="image"&&J(o,"image")&&o.image!==i.customImagePath}function VX(r,e,t,i,a){var n=t.clipPath;if(n===!1)r&&r.getClipPath()&&r.removeClipPath();else if(n){var o=r.getClipPath();o&&bO(o,n,i)&&(o=null),o||(o=Cb(n),r.setClipPath(o)),Ab(null,o,e,n,null,i,a)}}function UX(r,e,t,i,a,n){if(!r.isGroup){gO(t,null,n),gO(t,yn,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=Cb(o),r.setTextContent(f)),Ab(null,f,e,o,null,i,a);for(var p=o&&o.style,c=0;c=f;h--){var v=e.childAt(h);FX(e,v,a)}}}function FX(r,e,t){e&&Ku(e,Ua(r).option,t)}function GX(r){new lr(r.oldChildren,r.newChildren,yO,yO,r).add(xO).update(xO).remove(HX).execute()}function yO(r,e){var t=r&&r.name;return t??EX+e}function xO(r,e){var t=this.context,i=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;Db(t.api,a,t.dataIndex,i,t.seriesModel,t.group)}function HX(r){var e=this.context,t=e.oldChildren[r];t&&Ku(t,Ua(t).option,e.seriesModel)}function wO(r){return r&&(r.pathData||r.d)}function WX(r){return r&&(J(r,"pathData")||J(r,"d"))}function Ib(r){r.registerChartView(_O),r.registerSeriesModel(lO)}var Fs=ot(),TO=$,Lb=W,YX=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,i,a){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,!(!a&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,e,t,i);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=f;var p=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new K,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),i.getZr().add(s);else{var c=et(CO,t,p);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,t)}DO(s,t,!0),this._renderHandle(n)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var i=t.get("animation"),a=e.axis,n=a.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(n&&a.getBandWidth()>s)return!0;if(o){var l=om(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(e,t,i,a,n){},r.prototype.createPointerEl=function(e,t,i,a){var n=t.pointer;if(n){var o=Fs(e).pointerEl=new dt[n.type](TO(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,i,a){if(t.label){var n=Fs(e).labelEl=new yt(TO(t.label));e.add(n),AO(n,a)}},r.prototype.updatePointerEl=function(e,t,i){var a=Fs(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),i(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,i,a){var n=Fs(e).labelEl;n&&(n.setStyle(t.label.style),i(n,{x:t.label.x,y:t.label.y}),AO(n,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),a=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){a&&i.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=nn(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Pr(u.event)},onmousedown:Lb(this._onHandleDragMove,this,0,0),drift:Lb(this._onHandleDragMove,this),ondragend:Lb(this._onHandleDragEnd,this)}),i.add(a)),DO(a,t,!1),a.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");O(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Ii(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){CO(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Eb(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var a=this.updateHandleTransform(Eb(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,i.stopAnimation(),i.attr(Eb(a)),Fs(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,a=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),cn(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},r}();function CO(r,e,t,i){MO(Fs(t).lastProp,i)||(Fs(t).lastProp=i,e?_t(t,i,r):(t.stopAnimation(),t.attr(i)))}function MO(r,e){if(j(r)&&j(e)){var t=!0;return w(e,function(i,a){t=t&&MO(r[a],i)}),!!t}else return r===e}function AO(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Eb(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function DO(r,e,t){var i=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(n){n.type!=="group"&&(i!=null&&(n.z=i),a!=null&&(n.zlevel=a),n.silent=t)})}var $u=YX;function Ju(r){var e=r.get("type"),t=r.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function Pb(r,e,t,i,a){var n=t.get("value"),o=zb(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Ki(s.get("padding")||0),u=s.getFont(),f=ya(o,u),p=a.position,c=f.width+l[1]+l[3],h=f.height+l[0]+l[2],v=a.align;v==="right"&&(p[0]-=c),v==="center"&&(p[0]-=c/2);var d=a.verticalAlign;d==="bottom"&&(p[1]-=h),d==="middle"&&(p[1]-=h/2),ZX(p,c,h,i);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:p[0],y:p[1],style:Ht(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function ZX(r,e,t,i){var a=i.getWidth(),n=i.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,n)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function zb(r,e,t,i,a){r=e.scale.parse(r);var n=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Zp(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};w(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,p=u&&u.getDataParams(f);p&&s.seriesData.push(p)}),F(o)?n=o.replace("{value}",n):X(o)&&(n=o(s))}return n}function Sc(r,e,t){var i=Me();return Rr(i,i,t.rotation),tr(i,i,t.position),nr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function Ym(r,e,t,i,a,n){var o=ur.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),Pb(e,i,a,n,{position:Sc(i.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function tf(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function Zm(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function Rb(r,e,t,i,a,n){return{cx:r,cy:e,r0:t,r:i,startAngle:a,endAngle:n,clockwise:!0}}var XX=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,a,n,o){var s=a.axis,l=s.grid,u=n.get("type"),f=IO(l,s).getOtherAxis(s).getGlobalExtent(),p=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var c=Ju(n),h=qX[u](s,p,f);h.style=c,t.graphicKey=h.type,t.pointer=h}var v=ic(l.model,a);Ym(i,t,v,a,n,o)},e.prototype.getHandleTransform=function(t,i,a){var n=ic(i.axis.grid.model,i,{labelInside:!1});n.labelMargin=a.get(["handle","margin"]);var o=Sc(i.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,a,n){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=IO(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,p=[t.x,t.y];p[f]+=i[f],p[f]=Math.min(l[1],p[f]),p[f]=Math.max(l[0],p[f]);var c=(u[1]+u[0])/2,h=[c,c];h[f]=p[f];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:p[0],y:p[1],rotation:t.rotation,cursorPoint:h,tooltipOption:v[f]}},e}($u);function IO(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var qX={line:function(r,e,t){var i=tf([e,t[0]],[e,t[1]],LO(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:Zm([e-i/2,t[0]],[i,a],LO(r))}}};function LO(r){return r.dim==="x"?0:1}var EO=XX;var jX=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(xt),PO=jX;var xn=ot(),KX=w;function qm(r,e,t){if(!Tt.node){var i=e.getZr();xn(i).records||(xn(i).records={}),QX(i,e);var a=xn(i).records[r]||(xn(i).records[r]={});a.handler=t}}function QX(r,e){if(xn(r).initialized)return;xn(r).initialized=!0,t("click",et(zO,"click")),t("mousemove",et(zO,"mousemove")),t("globalout",JX);function t(i,a){r.on(i,function(n){var o=tq(e);KX(xn(r).records,function(s){s&&a(s,n,o.dispatchAction)}),$X(o.pendings,e)})}}function $X(r,e){var t=r.showTip.length,i=r.hideTip.length,a;t?a=r.showTip[t-1]:i&&(a=r.hideTip[i-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function JX(r,e,t){r.handler("leave",null,t)}function zO(r,e,t,i){e.handler(r,t,i)}function tq(r){var e={showTip:[],hideTip:[]},t=function(i){var a=e[i.type];a?a.push(i):(i.dispatchAction=t,r.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function bc(r,e){if(!Tt.node){var t=e.getZr(),i=(xn(t).records||{})[r];i&&(xn(t).records[r]=null)}}var eq=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){var n=i.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";qm("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,i){bc("axisPointer",i)},e.prototype.dispose=function(t,i){bc("axisPointer",i)},e.type="axisPointer",e}(Ot),NO=eq;function wc(r,e){var t=[],i=r.seriesIndex,a;if(i==null||!(a=e.getSeriesByIndex(i)))return{point:[]};var n=a.getData(),o=Si(n,r);if(o==null||o<0||O(o))return{point:[]};var s=n.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),p=f.dim,c=u.dim,h=p==="x"||p==="radius"?1:0,v=n.mapDimension(c),d=[];d[h]=n.get(v,o),d[1-h]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(n.getValues(k(l.dimensions,function(g){return n.mapDimension(g)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var OO=ot();function Nb(r,e,t){var i=r.currTrigger,a=[r.x,r.y],n=r,o=r.dispatchAction||W(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){jm(a)&&(a=wc({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=jm(a),u=n.axesInfo,f=s.axesInfo,p=i==="leave"||jm(a),c={},h={},v={list:[],map:{}},d={showPointer:et(iq,h),showTooltip:et(aq,v)};w(s.coordSysMap,function(g,y){var x=l||g.containPoint(a);w(s.coordSysAxesInfo[y],function(_,b){var S=_.axis,T=lq(u,_);if(!p&&x&&(!u||T)){var C=T&&T.value;C==null&&!l&&(C=S.pointToData(a)),C!=null&&kO(_,C,d,!1,c)}})});var m={};return w(f,function(g,y){var x=g.linkGroup;x&&!h[y]&&w(x.axesInfo,function(_,b){var S=h[b];if(_!==g&&S){var T=S.value;x.mapper&&(T=g.axis.scale.parse(x.mapper(T,VO(_),VO(g)))),m[g.key]=T}})}),w(m,function(g,y){kO(f[y],g,d,!0,c)}),nq(h,f,c),oq(v,a,r,o),sq(f,o,t),c}}function kO(r,e,t,i,a){var n=r.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=rq(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&N(a,s[0]),!i&&r.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function rq(r,e){var t=e.axis,i=t.dim,a=r,n=[],o=Number.MAX_VALUE,s=-1;return w(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),p,c;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(f,r,t);c=h.dataIndices,p=h.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!c.length)return;p=l.getData().get(f[0],c[0])}if(!(p==null||!isFinite(p))){var v=r-p,d=Math.abs(v);d<=o&&((d=0&&s<0)&&(o=d,s=v,a=p,n.length=0),w(c,function(m){n.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:n,snapToValue:a}}function iq(r,e,t,i){r[e.key]={value:t,payloadBatch:i}}function aq(r,e,t,i){var a=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=Lu(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function nq(r,e,t){var i=t.axesInfo=[];w(e,function(a,n){var o=a.axisPointerModel.option,s=r[n];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function oq(r,e,t,i){if(jm(e)||!r.list.length){i({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function sq(r,e,t){var i=t.getZr(),a="axisPointerLastHighlights",n=OO(i)[a]||{},o=OO(i)[a]={};w(r,function(u,f){var p=u.axisPointerModel.option;p.status==="show"&&u.triggerEmphasis&&w(p.seriesDataIndices,function(c){var h=c.seriesIndex+" | "+c.dataIndex;o[h]=c})});var s=[],l=[];w(n,function(u,f){!o[f]&&l.push(u)}),w(o,function(u,f){!n[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function lq(r,e){for(var t=0;t<(r||[]).length;t++){var i=r[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function VO(r){var e=r.axis.model,t={},i=t.axisDim=r.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function jm(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function pa(r){Kr.registerAxisPointerClass("CartesianAxisPointer",EO),r.registerComponentModel(PO),r.registerComponentView(NO),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!O(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=pP(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Nb)}function Ob(r){St(um),St(pa)}var uq=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,a,n,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),p=s.dataToCoord(i),c=n.get("type");if(c&&c!=="none"){var h=Ju(n),v=pq[c](s,l,p,f);v.style=h,t.graphicKey=v.type,t.pointer=v}var d=n.get(["label","margin"]),m=fq(i,a,n,l,d);Pb(t,a,n,o,m)},e}($u);function fq(r,e,t,i,a){var n=e.axis,o=n.dataToCoord(r),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,f,p;if(n.dim==="radius"){var c=Me();Rr(c,c,s),tr(c,c,[i.cx,i.cy]),u=nr([o,-a],c);var h=e.getModel("axisLabel").get("rotate")||0,v=ur.innerTextLayout(s,h*Math.PI/180,-1);f=v.textAlign,p=v.textVerticalAlign}else{var d=l[1];u=i.coordToPoint([d+a,o]);var m=i.cx,g=i.cy;f=Math.abs(u[0]-m)/d<.3?"center":u[0]>m?"left":"right",p=Math.abs(u[1]-g)/d<.3?"middle":u[1]>g?"top":"bottom"}return{position:u,align:f,verticalAlign:p}}var pq={line:function(r,e,t,i){return r.dim==="angle"?{type:"Line",shape:tf(e.coordToPoint([i[0],t]),e.coordToPoint([i[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,i){var a=Math.max(1,r.getBandWidth()),n=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:Rb(e.cx,e.cy,i[0],i[1],(-t-a/2)*n,(-t+a/2)*n)}:{type:"Sector",shape:Rb(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},UO=uq;var cq=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var i,a=this.ecModel;return a.eachComponent(t,function(n){n.getCoordSysModel()===this&&(i=n)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(xt),BO=cq;var kb=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",$t).models[0]},e.type="polarAxis",e}(xt);jt(kb,La);var FO=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(kb);var GO=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(kb);var Vb=function(r){E(e,r);function e(t,i){return r.call(this,"radius",t,i)||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e}(Qe);Vb.prototype.dataToRadius=Qe.prototype.dataToCoord;Vb.prototype.radiusToData=Qe.prototype.coordToData;var HO=Vb;var hq=ot(),Ub=function(r){E(e,r);function e(t,i){return r.call(this,"angle",t,i||[0,360])||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,i=t.getLabelModel(),a=t.scale,n=a.getExtent(),o=a.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=ya(s==null?"":s+"",i.getFont(),"center","top"),p=Math.max(f.height,7),c=p/u;isNaN(c)&&(c=1/0);var h=Math.max(0,Math.floor(c)),v=hq(t.model),d=v.lastAutoInterval,m=v.lastTickCount;return d!=null&&m!=null&&Math.abs(d-h)<=1&&Math.abs(m-o)<=1&&d>h?h=d:(v.lastTickCount=o,v.lastAutoInterval=h),h},e}(Qe);Ub.prototype.dataToAngle=Qe.prototype.dataToCoord;Ub.prototype.angleToData=Qe.prototype.coordToData;var WO=Ub;var Bb=["radius","angle"],vq=function(){function r(e){this.dimensions=Bb,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new HO,this._angleAxis=new WO,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],i=this._angleAxis,a=this._radiusAxis;return i.scale.type===e&&t.push(i),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,a=this.getAngleAxis(),n=a.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+i*i);t/=l,i/=l;for(var u=Math.atan2(-i,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],i=e[1]/180*Math.PI,a=Math.cos(i)*t+this.cx,n=-Math.sin(i)*t+this.cy;return[a,n]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),i=t.getExtent().slice();i[0]>i[1]&&i.reverse();var a=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-a[0]*n,endAngle:-a[1]*n,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,f=l*l+u*u-1e-4,p=this.r,c=this.r0;return f<=p*p&&f>=c*c}}},r.prototype.convertToPixel=function(e,t,i){var a=YO(t);return a===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var a=YO(t);return a===this?this.pointToData(i):null},r}();function YO(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var ZO=vq;function dq(r,e,t){var i=e.get("center"),a=t.getWidth(),n=t.getHeight();r.cx=H(i[0],a),r.cy=H(i[1],n);var o=r.getRadiusAxis(),s=Math.min(a,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:O(l)||(l=[0,l]);var u=[H(l[0],s),H(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function mq(r,e){var t=this,i=t.getAngleAxis(),a=t.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();w(wu(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),w(wu(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),Ia(i.scale,i.model),Ia(a.scale,a.model),i.type==="category"&&!i.onBand){var n=i.getExtent(),o=360/i.scale.count();i.inverse?n[1]+=o:n[1]-=o,i.setExtent(n[0],n[1])}}function gq(r){return r.mainType==="angleAxis"}function XO(r,e){var t;if(r.type=e.get("type"),r.scale=no(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),gq(e)){r.inverse=r.inverse!==e.get("clockwise");var i=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:i+(r.inverse?-360:360);r.setExtent(i,a)}e.axis=r,r.model=e}var yq={dimensions:Bb,create:function(r,e){var t=[];return r.eachComponent("polar",function(i,a){var n=new ZO(a+"");n.update=mq;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");XO(o,l),XO(s,u),dq(n,i,e),t.push(n),i.coordinateSystem=n,n.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var a=i.getReferringComponents("polar",$t).models[0];i.coordinateSystem=a.coordinateSystem}}),t}},qO=yq;var xq=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Km(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var i=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:i[0],y1:i[1],x2:a[0],y2:a[1]}}function Qm(r){var e=r.getRadiusAxis();return e.inverse?0:1}function jO(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var _q=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,n=a.polar,o=n.getRadiusAxis().getExtent(),s=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=k(a.getViewLabels(),function(f){f=$(f);var p=a.scale,c=p.type==="ordinal"?p.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=a.dataToCoord(c),f});jO(u),jO(s),w(xq,function(f){t.get([f,"show"])&&(!a.scale.isBlank()||f==="axisLine")&&Sq[f](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}(Kr),Sq={axisLine:function(r,e,t,i,a,n){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Qm(t),p=f?0:1,c,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";n[p]===0?c=new dt[h]({shape:{cx:t.cx,cy:t.cy,r:n[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):c=new ls({shape:{cx:t.cx,cy:t.cy,r:n[f],r0:n[p]},style:o.getLineStyle(),z2:1,silent:!0}),c.style.fill=null,r.add(c)},axisTick:function(r,e,t,i,a,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[Qm(t)],u=k(i,function(f){return new fe({shape:Km(t,[l,l+s],f.coord)})});r.add(dr(u,{style:q(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,i,a,n){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[Qm(t)],f=[],p=0;pg?"left":"right",_=Math.abs(m[1]-y)/d<.3?"middle":m[1]>y?"top":"bottom";if(s&&s[v]){var b=s[v];j(b)&&b.textStyle&&(h=new zt(b.textStyle,l,l.ecModel))}var S=new yt({silent:ur.isLabelSilent(e),style:Ht(h,{x:m[0],y:m[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:p.formattedLabel,align:x,verticalAlign:_})});if(r.add(S),f){var T=ur.makeAxisEventDataBase(e);T.targetType="axisLabel",T.value=p.rawLabel,tt(S).eventData=T}},this)},splitLine:function(r,e,t,i,a,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],p=0;p=0?"p":"n",L=T;b&&(i[f][M]||(i[f][M]={p:T,n:T}),L=i[f][M][I]);var P=void 0,z=void 0,R=void 0,U=void 0;if(v.dim==="radius"){var V=v.dataToCoord(D)-T,B=l.dataToCoord(M);Math.abs(V)=U})}}})}function Mq(r){var e={};w(r,function(i,a){var n=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=JO(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),p=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=p.stacks;e[l]=p;var h=$O(i);c[h]||p.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var v=H(i.get("barWidth"),f),d=H(i.get("barMaxWidth"),f),m=i.get("barGap"),g=i.get("barCategoryGap");v&&!c[h].width&&(v=Math.min(p.remainedWidth,v),c[h].width=v,p.remainedWidth-=v),d&&(c[h].maxWidth=d),m!=null&&(p.gap=m),g!=null&&(p.categoryGap=g)});var t={};return w(e,function(i,a){t[a]={};var n=i.stacks,o=i.bandWidth,s=H(i.categoryGap,o),l=H(i.gap,1),u=i.remainedWidth,f=i.autoWidthCount,p=(u-s)/(f+(f-1)*l);p=Math.max(p,0),w(n,function(d,m){var g=d.maxWidth;g&&g=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),i=this.getRect(),a=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[n]=t.toGlobalCoord(t.dataToCoord(+e)),a[1-n]=n===0?i.y+i.height/2:i.x+i.width/2,a},r.prototype.convertToPixel=function(e,t,i){var a=nk(t);return a===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var a=nk(t);return a===this?this.pointToData(i):null},r}();function nk(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var ok=kq;function Vq(r,e){var t=[];return r.eachComponent("singleAxis",function(i,a){var n=new ok(i,r,e);n.name="single_"+a,n.resize(i,e),i.coordinateSystem=n,t.push(n)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var a=i.getReferringComponents("singleAxis",$t).models[0];i.coordinateSystem=a&&a.coordinateSystem}}),t}var Uq={create:Vq,dimensions:Gb},sk=Uq;var lk=["x","y"],Bq=["width","height"],Fq=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,a,n,o){var s=a.axis,l=s.coordinateSystem,u=Hb(l,1-Jm(s)),f=l.dataToPoint(i)[0],p=n.get("type");if(p&&p!=="none"){var c=Ju(n),h=Gq[p](s,f,u);h.style=c,t.graphicKey=h.type,t.pointer=h}var v=Tc(a);Ym(i,t,v,a,n,o)},e.prototype.getHandleTransform=function(t,i,a){var n=Tc(i,{labelInside:!1});n.labelMargin=a.get(["handle","margin"]);var o=Sc(i.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,a,n){var o=a.axis,s=o.coordinateSystem,l=Jm(o),u=Hb(s,l),f=[t.x,t.y];f[l]+=i[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var p=Hb(s,1-l),c=(p[1]+p[0])/2,h=[c,c];return h[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}($u),Gq={line:function(r,e,t){var i=tf([e,t[0]],[e,t[1]],Jm(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:Zm([e-i/2,t[0]],[i,a],Jm(r))}}};function Jm(r){return r.isHorizontal()?0:1}function Hb(r,e){var t=r.getRect();return[t[lk[e]],t[lk[e]]+t[Bq[e]]]}var uk=Fq;var Hq=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Ot);function Wb(r){St(pa),Kr.registerAxisPointerClass("SingleAxisPointer",uk),r.registerComponentView(Hq),r.registerComponentView(rk),r.registerComponentModel($m),fa(r,"single",$m,$m.defaultOption),r.registerCoordinateSystem("single",sk)}var Wq=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,a){var n=Ai(t);r.prototype.init.apply(this,arguments),fk(t,n)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),fk(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(xt);function fk(r,e){var t=r.cellSize,i;O(t)?i=t:i=r.cellSize=[t,t],i.length===1&&(i[1]=i[0]);var a=k([0,1],function(n){return IM(e,n)&&(i[n]="auto"),i[n]!=null&&i[n]!=="auto"});Wr(r,e,{type:"box",ignoreSize:a})}var pk=Wq;var Yq=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=i.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,i,a){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=i.start.time;u<=i.end.time;u=n.getNextNDay(u,1).time){var f=n.dataToRect([u],!1).tl,p=new ht({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});a.add(p)}},e.prototype._renderLines=function(t,i,a,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var p=i.start,c=0;p.time<=i.end.time;c++){v(p.formatedDate),c===0&&(p=s.getDateInfo(i.start.y+"-"+i.start.m));var h=p.date;h.setMonth(h.getMonth()+1),p=s.getDateInfo(h)}v(s.getNextNDay(i.end.time,1).formatedDate);function v(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var m=o._getLinePointsOfOneWeek(t,d,a);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,a),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,a),l,n)},e.prototype._getEdgesPoints=function(t,i,a){var n=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return n[0][o]=n[0][o]-i/2,n[1][o]=n[1][o]+i/2,n},e.prototype._drawSplitline=function(t,i,a){var n=new pe({z2:20,shape:{points:t},style:i});a.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,i,a){for(var n=t.coordinateSystem,o=n.getDateInfo(i),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),f=n.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,i){return F(t)&&t?AM(t,i):X(t)?t(i):i.nameMap},e.prototype._yearTextPositionControl=function(t,i,a,n,o){var s=i[0],l=i[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(n==="left"||n==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,i,a,n){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,p=(u[0][1]+u[1][1])/2,c=a==="horizontal"?0:1,h={top:[f,u[c][1]],bottom:[f,u[1-c][1]],left:[u[1-c][0],p],right:[u[c][0],p]},v=i.start.y;+i.end.y>+i.start.y&&(v=v+"-"+i.end.y);var d=o.get("formatter"),m={start:i.start.y,end:i.end.y,nameMap:v},g=this._formatterLabel(d,m),y=new yt({z2:30,style:Ht(o,{text:g})});y.attr(this._yearTextPositionControl(y,h[l],a,l,s)),n.add(y)}},e.prototype._monthTextPositionControl=function(t,i,a,n,o){var s="left",l="top",u=t[0],f=t[1];return a==="horizontal"?(f=f+o,i&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),n==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,i,a,n){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),p=[this._tlpoints,this._blpoints];(!s||F(s))&&(s&&(i=up(s)||i),s=i.get(["time","monthAbbr"])||[]);var c=u==="start"?0:1,h=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=f==="center",d=0;d=a.start.time&&i.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;t[0].time>t[1].time&&(i=!0,t.reverse());var a=Math.floor(t[1].time/Yb)-Math.floor(t[0].time/Yb)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+a-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)a-=u,n.setDate(l-u);var f=Math.floor((a+t[0].day+6)/7),p=i?-f+1:f-1;return i&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:f,nthWeek:p,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,i){var a=this._getRangeInfo(i);if(e>a.weeks||e===0&&ta.lweek)return null;var n=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+n),this.getDateInfo(o)},r.create=function(e,t){var i=[];return e.eachComponent("calendar",function(a){var n=new r(a,e,t);i.push(n),a.coordinateSystem=n}),e.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=i[a.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function hk(r){var e=r.calendarModel,t=r.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}var vk=Zq;function Zb(r){r.registerComponentModel(pk),r.registerComponentView(ck),r.registerCoordinateSystem("calendar",vk)}function Xq(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function dk(r,e){var t;return w(e,function(i){r[i]!=null&&r[i]!=="auto"&&(t=!0)}),t}function qq(r,e,t){var i=N({},t),a=r[e],n=t.$action||"merge";if(n==="merge")if(a){if(0)var o;lt(a,i,!0),Wr(a,i,{ignoreSize:!0}),Y0(t,a),tg(t,a),tg(t,a,"shape"),tg(t,a,"style"),tg(t,a,"extra"),t.clipPath=a.clipPath}else r[e]=i;else n==="replace"?r[e]=i:n==="remove"&&a&&(r[e]=null)}var mk=["transition","enterFrom","leaveTo"],jq=mk.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function tg(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var i=t?mk:jq,a=0;a=0;f--){var p=a[f],c=le(p.id,null),h=c!=null?o.get(c):null;if(h){var v=h.parent,g=ki(v),y=v===n?{width:s,height:l}:{width:g.width,height:g.height},x={},_=Xn(h,p,y,null,{hv:p.hv,boundingMode:p.bounding},x);if(!ki(h).isNew&&_){for(var b=p.transition,S={},T=0;T=0)?S[C]=A:h[C]=A}_t(h,S,t,0)}else h.attr(x)}}},e.prototype._clear=function(){var t=this,i=this._elMap;i.each(function(a){eg(a,ki(a).option,i,t._lastGraphicModel)}),this._elMap=Y()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Ot);function Xb(r){var e=J(yk,r)?yk[r]:op(r),t=new e({});return ki(t).type=r,t}function xk(r,e,t,i){var a=Xb(t);return e.add(a),i.set(r,a),ki(a).id=r,ki(a).isNew=!0,a}function eg(r,e,t,i){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(n){eg(n,e,t,i)}),Ku(r,e,i),t.removeKey(ki(r).id))}function _k(r,e,t,i){r.isGroup||w([["cursor",be.prototype.cursor],["zlevel",i||0],["z",t||0],["z2",0]],function(a){var n=a[0];J(e,n)?r[n]=at(e[n],a[1]):r[n]==null&&(r[n]=a[1])}),w(ft(e),function(a){if(a.indexOf("on")===0){var n=e[a];r[a]=X(n)?n:null}}),J(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function Qq(r){return r=N({},r),w(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(H0),function(e){delete r[e]}),r}function $q(r,e,t){var i=tt(r).eventData;!r.silent&&!r.ignore&&!i&&(i=tt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),i&&(i.info=t.info)}function qb(r){r.registerComponentModel(gk),r.registerComponentView(Sk),r.registerPreprocessor(function(e){var t=e.graphic;O(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var jb=["x","y","radius","angle","single"],Jq=["cartesian2d","polar","singleAxis"];function bk(r){var e=r.get("coordinateSystem");return nt(Jq,e)>=0}function Vi(r){return r+"Axis"}function wk(r,e){var t=Y(),i=[],a=Y();r.eachComponent({mainType:"dataZoom",query:e},function(f){a.get(f.uid)||s(f)});var n;do n=!1,r.eachComponent("dataZoom",o);while(n);function o(f){!a.get(f.uid)&&l(f)&&(s(f),n=!0)}function s(f){a.set(f.uid,!0),i.push(f),u(f)}function l(f){var p=!1;return f.eachTargetAxis(function(c,h){var v=t.get(c);v&&v[h]&&(p=!0)}),p}function u(f){f.eachTargetAxis(function(p,c){(t.get(p)||t.set(p,[]))[c]=!0})}return i}function rg(r){var e=r.ecModel,t={infoList:[],infoMap:Y()};return r.eachTargetAxis(function(i,a){var n=e.getComponent(Vi(i),a);if(n){var o=n.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(n)}}}),t}var Kb=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),tj=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,i,a){var n=Tk(t);this.settledOption=n,this.mergeDefaultAndTheme(t,a),this._doInit(n)},e.prototype.mergeOption=function(t){var i=Tk(t);lt(this.option,t,!0),lt(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(t){var i=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(i[n[0]]=a[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),i=this._targetAxisInfoMap=Y(),a=this._fillSpecifiedTargetAxis(i);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var i=!1;return w(jb,function(a){var n=this.getReferringComponents(Vi(a),yA);if(n.specified){i=!0;var o=new Kb;w(n.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(t,i){var a=this.ecModel,n=!0;if(n){var o=i==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===i}});l(s,"single")}function l(u,f){var p=u[0];if(p){var c=new Kb;if(c.add(p.componentIndex),t.set(f,c),n=!1,f==="x"||f==="y"){var h=p.getReferringComponents("grid",$t).models[0];h&&w(u,function(v){p.componentIndex!==v.componentIndex&&h===v.getReferringComponents("grid",$t).models[0]&&c.add(v.componentIndex)})}}}n&&w(jb,function(u){if(n){var f=a.findComponents({mainType:Vi(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var p=new Kb;p.add(f[0].componentIndex),t.set(u,p),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(i){!t&&(t=i)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var i=this._rangePropMode,a=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":a?i[o]=a[o]:s&&(i[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(i,a){t==null&&(t=this.ecModel.getComponent(Vi(i),a))},this),t},e.prototype.eachTargetAxis=function(t,i){this._targetAxisInfoMap.each(function(a,n){w(a.indexList,function(o){t.call(i,n,o)})})},e.prototype.getAxisProxy=function(t,i){var a=this.getAxisModel(t,i);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,i){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[i])return this.ecModel.getComponent(Vi(t),i)},e.prototype.setRawRange=function(t){var i=this.option,a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(i[n[0]]=a[n[0]]=t[n[0]],i[n[1]]=a[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var i=this.option;w(["start","startValue","end","endValue"],function(a){i[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,i){if(t==null&&i==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var i,a=this._targetAxisInfoMap.keys(),n=0;no[1];if(x&&!_&&!b)return!0;x&&(m=!0),_&&(v=!0),b&&(d=!0)}return m&&v&&d})}else rf(f,function(h){if(n==="empty")l.setData(u=u.map(h,function(d){return s(d)?d:NaN}));else{var v={};v[h]=o,u.selectRange(v)}});rf(f,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,i=this._dataExtent;rf(["min","max"],function(a){var n=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=kt(i[0]+o,i,[0,100],!0):n!=null&&(o=kt(n,[0,100],i,!0)-i[0]),e[a+"Span"]=n,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,i=this._valueWindow;if(t){var a=Fl(i,[0,500]);a=Math.min(a,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+i[0].toFixed(a)),t[1]!==100&&n.setDeterminedMinMax("max",+i[1].toFixed(a)),n.freeze()}},r}();function nj(r,e,t){var i=[1/0,-1/0];rf(t,function(o){gE(i,o.getData(),e)});var a=r.getAxisModel(),n=Md(a.axis.scale,a,i).calculate();return[n.min,n.max]}var Mk=aj;var oj={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=r.getComponent(Vi(o),s);a(o,s,l,n)})})}e(function(a,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Mk(a,n,s,r),t.push(o.__dzAxisProxy))});var i=Y();return w(t,function(a){w(a.getTargetSeriesModels(),function(n){i.set(n.uid,n)})}),i},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(i,a){t.getAxisProxy(i,a).reset(t)}),t.eachTargetAxis(function(i,a){t.getAxisProxy(i,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var i=t.findRepresentativeAxisProxy();if(i){var a=i.getDataPercentWindow(),n=i.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:n[0],endValue:n[1]})}})}},Ik=oj;function Qb(r){r.registerAction("dataZoom",function(e,t){var i=wk(t,e);w(i,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Lk=!1;function Gs(r){Lk||(Lk=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Ik),Qb(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Ek(r){r.registerComponentModel(Ck),r.registerComponentView(Ak),Gs(r)}var Xe=function(){function r(){}return r}();var Pk={};function So(r,e){Pk[r]=e}function ig(r){return Pk[r]}var lj=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;w(this.option.feature,function(i,a){var n=ig(a);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),lt(i,n.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(xt),zk=lj;function Rk(r,e,t){var i=e.getBoxLayoutParams(),a=e.get("padding"),n={width:t.getWidth(),height:t.getHeight()},o=Zt(i,n,a);$i(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Xn(r,i,n,a)}function ag(r,e){var t=Ki(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),r=new ht({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var fj=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,a,n){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),p=[];w(u,function(v,d){p.push(d)}),new lr(this._featureNames||[],p).add(c).update(c).remove(et(c,null)).execute(),this._featureNames=p;function c(v,d){var m=p[v],g=p[d],y=u[m],x=new zt(y,t,t.ecModel),_;if(n&&n.newTitle!=null&&n.featureName===m&&(y.title=n.newTitle),m&&!g){if(pj(m))_={onclick:x.option.onclick,featureName:m};else{var b=ig(m);if(!b)return;_=new b}f[m]=_}else if(_=f[g],!_)return;_.uid=Ci("toolbox-feature"),_.model=x,_.ecModel=i,_.api=a;var S=_ instanceof Xe;if(!m&&g){S&&_.dispose&&_.dispose(i,a);return}if(!x.get("show")||S&&_.unusable){S&&_.remove&&_.remove(i,a);return}h(x,_,m),x.setIconStatus=function(T,C){var A=this.option,D=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[T]=C,D[T]&&(C==="emphasis"?cr:hr)(D[T])},_ instanceof Xe&&_.render&&_.render(x,i,a,n)}function h(v,d,m){var g=v.getModel("iconStyle"),y=v.getModel(["emphasis","iconStyle"]),x=d instanceof Xe&&d.getIcons?d.getIcons():v.get("icon"),_=v.get("title")||{},b,S;F(x)?(b={},b[m]=x):b=x,F(_)?(S={},S[m]=_):S=_;var T=v.iconPaths={};w(b,function(C,A){var D=nn(C,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(g.getItemStyle());var M=D.ensureState("emphasis");M.style=y.getItemStyle();var I=new yt({style:{text:S[A],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:su({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},i)},ignore:!0});D.setTextContent(I),ji({el:D,componentModel:t,itemName:A,formatterParamsExtra:{title:S[A]}}),D.__title=S[A],D.on("mouseover",function(){var L=y.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:y.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),D.setTextConfig({position:y.get("textPosition")||P}),I.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){v.get(["iconStatus",A])!=="emphasis"&&a.leaveEmphasis(this),I.hide()}),(v.get(["iconStatus",A])==="emphasis"?cr:hr)(D),o.add(D),D.on("click",W(d.onclick,d,i,a,A)),T[A]=D})}Rk(o,t,a),o.add(ag(o.getBoundingRect(),t)),l||o.eachChild(function(v){var d=v.__title,m=v.ensureState("emphasis"),g=m.textConfig||(m.textConfig={}),y=v.getTextContent(),x=y&&y.ensureState("emphasis");if(x&&!X(x)&&d){var _=x.style||(x.style={}),b=ya(d,yt.makeFont(_)),S=v.x+o.x,T=v.y+o.y+s,C=!1;T+b.height>a.getHeight()&&(g.position="top",C=!0);var A=C?-5-b.height:s+10;S+b.width/2>a.getWidth()?(g.position=["100%",A],_.align="right"):S-b.width/2<0&&(g.position=[0,A],_.align="left")}})},e.prototype.updateView=function(t,i,a,n){w(this._features,function(o){o instanceof Xe&&o.updateView&&o.updateView(o.model,i,a,n)})},e.prototype.remove=function(t,i){w(this._features,function(a){a instanceof Xe&&a.remove&&a.remove(t,i)}),this.group.removeAll()},e.prototype.dispose=function(t,i){w(this._features,function(a){a instanceof Xe&&a.dispose&&a.dispose(t,i)})},e.type="toolbox",e}(Ot);function pj(r){return r.indexOf("my")===0}var Nk=fj;var cj=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){var a=this.model,n=a.get("name")||t.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=Tt.browser;if(X(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=n+"."+s,f.target="_blank",f.href=l;var p=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}else if(window.navigator.msSaveOrOpenBlob||o){var c=l.split(","),h=c[0].indexOf("base64")>-1,v=o?decodeURIComponent(c[1]):c[1];h&&(v=window.atob(v));var d=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=v.length,g=new Uint8Array(m);m--;)g[m]=v.charCodeAt(m);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,d)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,b=_.document;b.open("image/svg+xml","replace"),b.write(v),b.close(),_.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(x)}}else{var S=a.get("lang"),T='',C=window.open();C.document.write(T),C.document.title=n}},e.getDefaultOption=function(t){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},e}(Xe),Ok=cj;var kk="__ec_magicType_stack__";var hj=[["line","bar"],["stack"]],vj=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,i=t.get("icon"),a={};return w(t.get("type"),function(n){i[n]&&(a[n]=i[n])}),a},e.getDefaultOption=function(t){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},e.prototype.onclick=function(t,i,a){var n=this.model,o=n.get(["seriesIndex",a]);if(Vk[a]){var s={series:[]},l=function(p){var c=p.subType,h=p.id,v=Vk[a](c,h,p,n);v&&(q(v,p.option),s.series.push(v));var d=p.coordinateSystem;if(d&&d.type==="cartesian2d"&&(a==="line"||a==="bar")){var m=d.getAxesByScale("ordinal")[0];if(m){var g=m.dim,y=g+"Axis",x=p.getReferringComponents(y,$t).models[0],_=x.componentIndex;s[y]=s[y]||[];for(var b=0;b<=_;b++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=a==="bar"}}};w(hj,function(p){nt(p,a)>=0&&w(p,function(c){n.setIconStatus(c,"normal")})}),n.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=lt({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),i.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Xe),Vk={line:function(r,e,t,i){if(r==="bar")return lt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,e,t,i){if(r==="line")return lt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,e,t,i){var a=t.get("stack")===kk;if(r==="line"||r==="bar")return i.setIconStatus("stack",a?"normal":"emphasis"),lt({id:e,stack:a?"":kk},i.get(["option","stack"])||{},!0)}};wr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Uk=vj;var og=new Array(60).join("-"),af=" ";function dj(r){var e={},t=[],i=[];return r.eachRawSeries(function(a){var n=a.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:i}}function mj(r){var e=[];return w(r,function(t,i){var a=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(k(t.series,function(h){return h.name})),l=[a.model.getCategories()];w(t.series,function(h){var v=h.getRawData();l.push(h.getRawData().mapArray(v.mapDimension(o),function(d){return d}))});for(var u=[s.join(af)],f=0;f=0)return!0}var $b=new RegExp("["+af+"]+","g");function _j(r){for(var e=r.split(/\n+/g),t=ng(e.shift()).split($b),i=[],a=k(t,function(l){return{name:l,data:[]}}),n=0;n=0;n--){var o=t[n];if(o[a])break}if(n<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function Wk(r){var e=Jb(r),t=e[e.length-1];e.length>1&&e.pop();var i={};return Fk(t,function(a,n){for(var o=e.length-1;o>=0;o--)if(a=e[o][n],a){i[n]=a;break}}),i}function Yk(r){Gk(r).snapshots=null}function Zk(r){return Jb(r).length}function Jb(r){var e=Gk(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Cj=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){Yk(t),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return i},e}(Xe);wr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var qk=Cj;var Aj=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Dj=function(){function r(e,t,i){var a=this;this._targetInfoList=[];var n=jk(t,e);w(Mj,function(o,s){(!i||!i.include||nt(i.include,s)>=0)&&o(n,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(i,a,n){if((i.coordRanges||(i.coordRanges=[])).push(a),!i.coordRange){i.coordRange=a;var o=tw[i.brushType](0,n,a);i.__rangeOffset={offset:Jk[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,i){w(e,function(a){var n=this.findTargetInfo(a,t);n&&n!==!0&&w(n.coordSyses,function(o){var s=tw[a.brushType](1,o,a.range,!0);i(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){w(e,function(i){var a=this.findTargetInfo(i,t);if(i.range=i.range||[],a&&a!==!0){i.panelId=a.panelId;var n=tw[i.brushType](0,a.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?Jk[i.brushType](n.values,o.offset,Ij(n.xyMinMax,o.xyMinMax)):n.values}},this)},r.prototype.makePanelOpts=function(e,t){return k(this._targetInfoList,function(i){var a=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t?t(i):null,clipPath:Em(a),isTargetByCursor:zm(a,e,i.coordSysModel),getLinearBrushOtherExtent:Pm(a)}})},r.prototype.controlSeries=function(e,t,i){var a=this.findTargetInfo(e,i);return a===!0||a&&nt(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var i=this._targetInfoList,a=jk(t,e),n=0;nr[1]&&r.reverse(),r}function jk(r,e){return kn(r,e,{includeMainTypes:Aj})}var Mj={grid:function(r,e){var t=r.xAxisModels,i=r.yAxisModels,a=r.gridModels,n=Y(),o={},s={};!t&&!i&&!a||(w(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),w(i,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),w(a,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,f=[];w(u.getCartesians(),function(p,c){(nt(t,p.getAxis("x").model)>=0||nt(i,p.getAxis("y").model)>=0)&&f.push(p)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Qk.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){w(r.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:Qk.geo})})}},Kk=[function(r,e){var t=r.xAxisModel,i=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&i&&(a=i.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Qk={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(qi(r)),e}},tw={lineX:et($k,0),lineY:et($k,1),rect:function(r,e,t,i){var a=r?e.pointToData([t[0][0],t[1][0]],i):e.dataToPoint([t[0][0],t[1][0]],i),n=r?e.pointToData([t[0][1],t[1][1]],i):e.dataToPoint([t[0][1],t[1][1]],i),o=[ew([a[0],n[0]]),ew([a[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,i){var a=[[1/0,-1/0],[1/0,-1/0]],n=k(t,function(o){var s=r?e.pointToData(o,i):e.dataToPoint(o,i);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:n,xyMinMax:a}}};function $k(r,e,t,i){var a=t.getAxis(["x","y"][r]),n=ew(k([0,1],function(s){return e?a.coordToData(a.toLocalCoord(i[s]),!0):a.toGlobalCoord(a.dataToCoord(i[s]))})),o=[];return o[r]=n,o[1-r]=[NaN,NaN],{values:n,xyMinMax:o}}var Jk={lineX:et(tV,0),lineY:et(tV,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return k(r,function(i,a){return[i[0]-t[0]*e[a][0],i[1]-t[1]*e[a][1]]})}};function tV(r,e,t,i){return[e[0]-i[r]*t[0],e[1]-i[r]*t[1]]}function Ij(r,e){var t=eV(r),i=eV(e),a=[t[0]/i[0],t[1]/i[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function eV(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Cc=Dj;var rw=w,Lj=dA("toolbox-dataZoom_");var Ej=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,a,n){this._brushController||(this._brushController=new Zu(a.getZr()),this._brushController.on("brush",W(this._onBrush,this)).mount()),Rj(t,i,this,n,a),zj(t,i)},e.prototype.onclick=function(t,i,a){Pj[a].call(this)},e.prototype.remove=function(t,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var i=t.areas;if(!t.isEnd||!i.length)return;var a={},n=this.ecModel;this._brushController.updateCovers([]);var o=new Cc(iw(this.model),n,{include:["grid"]});o.matchOutputRanges(i,n,function(u,f,p){if(p.type==="cartesian2d"){var c=u.brushType;c==="rect"?(s("x",p,f[0]),s("y",p,f[1])):s({lineX:"x",lineY:"y"}[c],p,f)}}),Hk(n,a),this._dispatchZoomAction(a);function s(u,f,p){var c=f.getAxis(u),h=c.model,v=l(u,h,n),d=v.findRepresentativeAxisProxy(h).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(p=Qr(0,p.slice(),c.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),v&&(a[v.id]={dataZoomId:v.id,startValue:p[0],endValue:p[1]})}function l(u,f,p){var c;return p.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var v=h.getAxisModel(u,f.componentIndex);v&&(c=h)}),c}},e.prototype._dispatchZoomAction=function(t){var i=[];rw(t,function(a,n){i.push($(a))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(t){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},e}(Xe),Pj={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Wk(this.ecModel))}};function iw(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function zj(r,e){r.setIconStatus("back",Zk(e)>1?"emphasis":"normal")}function Rj(r,e,t,i,a){var n=t._isZoomActive;i&&i.type==="takeGlobalCursor"&&(n=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),t._isZoomActive=n,r.setIconStatus("zoom",n?"emphasis":"normal");var o=new Cc(iw(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}OM("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var i=e.getModel(t),a=[],n=iw(i),o=kn(r,n);rw(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),rw(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var p=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:Lj+u+p};c[f]=p,a.push(c)}return a});var rV=Ej;function aw(r){r.registerComponentModel(zk),r.registerComponentView(Nk),So("saveAsImage",Ok),So("magicType",Uk),So("dataView",Bk),So("dataZoom",rV),So("restore",qk),St(Ek)}var Nj=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(xt),iV=Nj;function sg(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function aV(r){if(Tt.domSupported){for(var e=document.documentElement.style,t=0,i=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var f=u*Math.PI/180,p=o+a,c=p*Math.abs(Math.cos(f))+p*Math.abs(Math.sin(f)),h=Math.round(((c-Math.SQRT2*a)/2+Math.SQRT2*a-(c-p)/2)*100)/100;s+=";"+n+":-"+h+"px";var v=e+" solid "+a+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+i+";"];return'
'}function Bj(r,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+t,a="opacity"+i+",visibility"+i;return e||(i=" "+r+"s "+t,a+=Tt.transformSupported?","+sw+i:",left"+i+",top"+i),Oj+":"+a}function sV(r,e,t){var i=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!Tt.transformSupported)return t?"top:"+a+";left:"+i+";":[["top",a],["left",i]];var n=Tt.transform3dSupported,o="translate"+(n?"3d":"")+"("+i+","+a+(n?",0":"")+")";return t?"top:0;left:0;"+sw+":"+o+";":[["top",0],["left",0],[nw,o]]}function Fj(r){var e=[],t=r.get("fontSize"),i=r.getTextColor();i&&e.push("color:"+i),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var a=r.get("textShadowColor"),n=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return a&&n&&e.push("text-shadow:"+o+"px "+s+"px "+n+"px "+a),w(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function Gj(r,e,t){var i=[],a=r.get("transitionDuration"),n=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),p=Zv(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+c),e&&a&&i.push(Bj(a,t)),n&&i.push("background-color:"+n),w(["width","color","radius"],function(h){var v="border-"+h,d=Cv(v),m=r.get(d);m!=null&&i.push(v+":"+m+(h==="color"?"":"px"))}),i.push(Fj(f)),p!=null&&i.push("padding:"+Ki(p).join("px ")+"px"),i.join(";")+";"}function lV(r,e,t,i,a){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&$T(r,o,t,i,a)}else{r[0]=i,r[1]=a;var s=n&&n.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var Hj=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Tt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=e.getZr(),n=t.appendTo,o=n&&(F(n)?document.querySelector(n):An(n)?n:X(n)&&n(e.getDom()));lV(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(i),this._api=e,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();Er(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=oV(t,"position"),a=t.style;a.position!=="absolute"&&i!=="absolute"&&(a.position="relative")}var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,a=i.style,n=this._styleCoord;i.innerHTML?a.cssText=kj+Gj(e,!this._firstShow,this._longHide)+sV(n[0],n[1],!0)+("border-color:"+Qi(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,i,a,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(F(n)&&i.get("trigger")==="item"&&!sg(i)&&(s=Uj(i,a,n)),F(e))o.innerHTML=e+s;else if(e){o.innerHTML="",O(e)||(e=[e]);for(var l=0;l=0?this._tryShow(n,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,a=this._api,n=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,i,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,a,n){if(!(n.from===this.uid||Tt.node||!a.getDom())){var o=hV(n,a);this._ticket="";var s=n.dataByCoordSys,l=Kj(n,i,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var f=Yj;f.x=n.x,f.y=n.y,f.update(),tt(f).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:f},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,i,a,n))return;var p=wc(n,i),c=p.point[0],h=p.point[1];c!=null&&h!=null&&this._tryShow({offsetX:c,offsetY:h,target:p.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:a.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,i,a,n){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(hV(n,a))},e.prototype._manuallyAxisShowTip=function(t,i,a,n){var o=n.seriesIndex,s=n.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var f=u.getData(),p=Ac([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(p.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,i){var a=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){var s=tt(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;ta(a,function(f){if(tt(f).dataIndex!=null)return l=f,!0;if(tt(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var a=t.get("showDelay");i=W(i,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(i,a):i()},e.prototype._showAxisTooltip=function(t,i){var a=this._ecModel,n=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Ac([i.tooltipOption],n),l=this._renderMode,u=[],f=ie("section",{blocks:[],noHeader:!0}),p=[],c=new Xv;w(t,function(y){w(y.dataByAxis,function(x){var _=a.getComponent(x.axisDim+"Axis",x.axisIndex),b=x.value;if(!(!_||b==null)){var S=zb(b,_.axis,a,x.seriesDataIndices,x.valueLabelOpt),T=ie("section",{header:S,noHeader:!Fe(S),sortBlocks:!0,blocks:[]});f.blocks.push(T),w(x.seriesDataIndices,function(C){var A=a.getSeriesByIndex(C.seriesIndex),D=C.dataIndexInside,M=A.getDataParams(D);if(!(M.dataIndex<0)){M.axisDim=x.axisDim,M.axisIndex=x.axisIndex,M.axisType=x.axisType,M.axisId=x.axisId,M.axisValue=Zp(_.axis,{value:b}),M.axisValueLabel=S,M.marker=c.makeTooltipMarker("item",Qi(M.color),l);var I=nx(A.formatTooltip(D,!0,null)),L=I.frag;if(L){var P=Ac([A],n).get("valueFormatter");T.blocks.push(P?N({valueFormatter:P},L):L)}I.text&&p.push(I.text),u.push(M)}})}})}),f.blocks.reverse(),p.reverse();var h=i.position,v=s.get("order"),d=cx(f,c,l,v,a.get("useUTC"),s.get("textStyle"));d&&p.unshift(d);var m=l==="richText"?` - -`:"
",g=p.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],h,null,c)})},e.prototype._showSeriesItemTooltip=function(t,i,a){var n=this._ecModel,o=tt(i),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,p=o.dataType,c=u.getData(p),h=this._renderMode,v=t.positionDefault,d=Ac([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=d.get("trigger");if(!(m!=null&&m!=="item")){var g=u.getDataParams(f,p),y=new Xv;g.marker=y.makeTooltipMarker("item",Qi(g.color),h);var x=nx(u.formatTooltip(f,!1,p)),_=d.get("order"),b=d.get("valueFormatter"),S=x.frag,T=S?cx(b?N({valueFormatter:b},S):S,y,h,_,n.get("useUTC"),d.get("textStyle")):x.text,C="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,T,g,C,t.offsetX,t.offsetY,t.position,t.target,y)}),a({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,a){var n=tt(i),o=n.tooltipConfig,s=o.option||{};if(F(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(n.componentMainType,n.componentIndex);f&&u.push(f),u.push({formatter:s.content});var p=t.positionDefault,c=Ac(u,this._tooltipModel,p?{position:p}:null),h=c.get("content"),v=Math.random()+"",d=new Xv;this._showOrMove(c,function(){var m=$(c.get("formatterParams")||{});this._showTooltipContent(c,h,m,v,t.offsetX,t.offsetY,t.position,i,d)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,a,n,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var p=this._tooltipContent;p.setEnterable(t.get("enterable"));var c=t.get("formatter");l=l||t.get("position");var h=i,v=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor")),d=v.color;if(c)if(F(c)){var m=t.ecModel.get("useUTC"),g=O(a)?a[0]:a,y=g&&g.axisType&&g.axisType.indexOf("time")>=0;h=c,y&&(h=ms(g.axisValue,h,m)),h=Dv(h,a,!0)}else if(X(c)){var x=W(function(_,b){_===this._ticket&&(p.setContent(b,f,t,d,l),this._updatePosition(t,l,o,s,p,a,u))},this);this._ticket=n,h=c(a,n,x)}else h=c;p.setContent(h,f,t,d,l),p.show(t,d),this._updatePosition(t,l,o,s,p,a,u)}},e.prototype._getNearestPoint=function(t,i,a,n){if(a==="axis"||O(i))return{color:n||(this._renderMode==="html"?"#fff":"none")};if(!O(i))return{color:n||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,a,n,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||t.get("position");var p=o.getSize(),c=t.get("align"),h=t.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),X(i)&&(i=i([a,n],s,o.el,v,{viewSize:[u,f],contentSize:p.slice()})),O(i))a=H(i[0],u),n=H(i[1],f);else if(j(i)){var d=i;d.width=p[0],d.height=p[1];var m=Zt(d,{width:u,height:f});a=m.x,n=m.y,c=null,h=null}else if(F(i)&&l){var g=jj(i,v,p,t.get("borderWidth"));a=g[0],n=g[1]}else{var g=Xj(a,n,o,u,f,c?null:20,h?null:20);a=g[0],n=g[1]}if(c&&(a-=vV(c)?p[0]/2:c==="right"?p[0]:0),h&&(n-=vV(h)?p[1]/2:h==="bottom"?p[1]:0),sg(t)){var g=qj(a,n,o,u,f);a=g[0],n=g[1]}o.moveTo(a,n)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var a=this._lastDataByCoordSys,n=this._cbParamsList,o=!!a&&a.length===t.length;return o&&w(a,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},p=f.dataByAxis||[];o=o&&u.length===p.length,o&&w(u,function(c,h){var v=p[h]||{},d=c.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&c.value===v.value&&c.axisType===v.axisType&&c.axisId===v.axisId&&d.length===m.length,o&&w(d,function(g,y){var x=m[y];o=o&&g.seriesIndex===x.seriesIndex&&g.dataIndex===x.dataIndex}),n&&w(c.seriesDataIndices,function(g){var y=g.seriesIndex,x=i[y],_=n[y];x&&_&&_.data!==x.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){Tt.node||!i.getDom()||(cn(this,"_updatePosition"),this._tooltipContent.dispose(),bc("itemTooltip",i))},e.type="tooltip",e}(Ot);function Ac(r,e,t){var i=e.ecModel,a;t?(a=new zt(t,i,i),a=new zt(e.option,a,i)):a=e;for(var n=r.length-1;n>=0;n--){var o=r[n];o&&(o instanceof zt&&(o=o.get("tooltip",!0)),F(o)&&(o={formatter:o}),o&&(a=new zt(o,a,i)))}return a}function hV(r,e){return r.dispatchAction||W(e.dispatchAction,e)}function Xj(r,e,t,i,a,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(r+l+n+2>i?r-=l+n:r+=n),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function qj(r,e,t,i,a){var n=t.getSize(),o=n[0],s=n[1];return r=Math.min(r+o,i)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function jj(r,e,t,i){var a=t[0],n=t[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+f/2-n/2;break;case"top":s=e.x+u/2-a/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+f+o;break;case"left":s=e.x-a-o,l=e.y+f/2-n/2;break;case"right":s=e.x+u+o,l=e.y+f/2-n/2}return[s,l]}function vV(r){return r==="center"||r==="middle"}function Kj(r,e,t){var i=Wf(r).queryOptionMap,a=i.keys()[0];if(!(!a||a==="series")){var n=Vn(e,a,i.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=tt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}var dV=Zj;function lw(r){St(pa),r.registerComponentModel(iV),r.registerComponentView(dV),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},te),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},te)}var Qj=["rect","polygon","keep","clear"];function uw(r,e){var t=Nt(r?r.brush:[]);if(t.length){var i=[];w(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var a=r&&r.toolbox;O(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var n=a.feature||(a.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),$j(s),e&&!s.length&&s.push.apply(s,Qj)}}function $j(r){var e={};w(r,function(t){e[t]=1}),r.length=0,w(e,function(t,i){r.push(i)})}var mV=w;function gV(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Dc(r,e,t){var i={};return mV(e,function(n){var o=i[n]=a();mV(r[n],function(s,l){if(xe.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new xe(u),l==="opacity"&&(u=$(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new xe(u))}})}),i;function a(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function lg(r,e,t){var i;w(t,function(a){e.hasOwnProperty(a)&&gV(e[a])&&(i=!0)}),i&&w(t,function(a){e.hasOwnProperty(a)&&gV(e[a])?r[a]=$(e[a]):delete r[a]})}function yV(r,e,t,i,a,n){var o={};w(r,function(p){var c=xe.prepareVisualTypes(e[p]);o[p]=c});var s;function l(p){return Ip(t,s,p)}function u(p,c){xx(t,s,p,c)}n==null?t.each(f):t.each([n],f);function f(p,c){s=n==null?p:c;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var v=i.call(a,p),d=e[v],m=o[v],g=0,y=m.length;ge[0][1]&&(e[0][1]=n[0]),n[1]e[1][1]&&(e[1][1]=n[1])}return e&&CV(e)}};function CV(r){return new rt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var iK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i,this.model,(this._brushController=new Zu(i.getZr())).on("brush",W(this._onBrush,this)).mount()},e.prototype.render=function(t,i,a,n){this.model=t,this._updateController(t,i,a,n)},e.prototype.updateTransform=function(t,i,a,n){cw(i),this._updateController(t,i,a,n)},e.prototype.updateVisual=function(t,i,a,n){this.updateTransform(t,i,a,n)},e.prototype.updateView=function(t,i,a,n){this._updateController(t,i,a,n)},e.prototype._updateController=function(t,i,a,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var i=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:$(a),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:$(a),$from:i})},e.type="brush",e}(Ot),AV=iK;var aK="#ddd",nK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,i){var a=this.option;!i&&lg(a,t,["inBrush","outOfBrush"]);var n=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:aK},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=k(t,function(i){return DV(this.option,i)},this))},e.prototype.setBrushOption=function(t){this.brushOption=DV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(xt);function DV(r,e){return lt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new zt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var MV=nK;var oK=["rect","polygon","lineX","lineY","keep","clear"],sK=function(r){E(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,a){var n,o,s;i.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,w(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,i,a){this.render(t,i,a)},e.prototype.getIcons=function(){var t=this.model,i=t.get("icon",!0),a={};return w(t.get("type",!0),function(n){i[n]&&(a[n]=i[n])}),a},e.prototype.onclick=function(t,i,a){var n=this._brushType,o=this._brushMode;a==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?n:n===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var i={show:!0,type:oK.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return i},e}(Xe),IV=sK;function vw(r){r.registerComponentView(AV),r.registerComponentModel(MV),r.registerPreprocessor(uw),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,hw),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(i){i.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},te),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},te),So("brush",IV)}var lK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(xt),uK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,a){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=at(t.get("textBaseline"),t.get("textVerticalAlign")),f=new yt({style:Ht(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),p=f.getBoundingRect(),c=t.get("subtext"),h=new yt({style:Ht(s,{text:c,fill:s.getTextColor(),y:p.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=t.get("link"),d=t.get("sublink"),m=t.get("triggerEvent",!0);f.silent=!v&&!m,h.silent=!d&&!m,v&&f.on("click",function(){gs(v,"_"+t.get("target"))}),d&&h.on("click",function(){gs(d,"_"+t.get("subtarget"))}),tt(f).eventData=tt(h).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(f),c&&n.add(h);var g=n.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var x=Zt(y,{width:a.getWidth(),height:a.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?x.x+=x.width:l==="center"&&(x.x+=x.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?x.y+=x.height:u==="middle"&&(x.y+=x.height/2),u=u||"top"),n.x=x.x,n.y=x.y,n.markRedraw();var _={align:l,verticalAlign:u};f.setStyle(_),h.setStyle(_),g=n.getBoundingRect();var b=x.margin,S=t.getItemStyle(["color","opacity"]);S.fill=t.get("backgroundColor");var T=new ht({shape:{x:g.x-b[3],y:g.y-b[0],width:g.width+b[1]+b[3],height:g.height+b[0]+b[2],r:t.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});n.add(T)}},e.type="title",e}(Ot);function dw(r){r.registerComponentModel(lK),r.registerComponentView(uK)}var fK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,i,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var i=this._data.count();this.option.loop?t=(t%i+i)%i:(t>=i&&(t=i-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,i=t.data||[],a=t.axisType,n=this._names=[],o;a==="category"?(o=[],w(i,function(u,f){var p=le(Wi(u),""),c;j(u)?(c=$(u),c.value=f):c=f,o.push(c),n.push(p)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new ve([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(xt),mw=fK;var LV=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=mr(mw.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(mw);jt(LV,mu.prototype);var EV=LV;var pK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Ot),PV=pK;var cK=function(r){E(e,r);function e(t,i,a,n){var o=r.call(this,t,i,a)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Qe),zV=cK;var gw=Math.PI,RV=ot(),hK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.api=i},e.prototype.render=function(t,i,a){if(this.model=t,this.api=a,this.ecModel=i,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ie("nameValue",{noName:!0,value:f})},w(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,i){var a=t.get(["label","position"]),n=t.get("orient"),o=dK(t,i),s;a==null||a==="auto"?s=n==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:gw/2},p=n==="vertical"?o.height:o.width,c=t.getModel("controlStyle"),h=c.get("show",!0),v=h?c.get("itemSize"):0,d=h?c.get("itemGap"):0,m=v+d,g=t.get(["label","rotate"])||0;g=g*gw/180;var y,x,_,b=c.get("position",!0),S=h&&c.get("showPlayBtn",!0),T=h&&c.get("showPrevBtn",!0),C=h&&c.get("showNextBtn",!0),A=0,D=p;b==="left"||b==="bottom"?(S&&(y=[0,0],A+=m),T&&(x=[A,0],A+=m),C&&(_=[D-v,0],D-=m)):(S&&(y=[D-v,0],D-=m),T&&(x=[0,0],A+=m),C&&(_=[D-v,0],D-=m));var M=[A,D];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:p,orient:n,rotation:f[n],labelRotation:g,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:y,prevBtnPosition:x,nextBtnPosition:_,axisExtent:M,controlSize:v,controlGap:d}},e.prototype._position=function(t,i){var a=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Me(),l=o.x,u=o.y+o.height;tr(s,s,[-l,-u]),Rr(s,s,-gw/2),tr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=y(o),p=y(a.getBoundingRect()),c=y(n.getBoundingRect()),h=[a.x,a.y],v=[n.x,n.y];v[0]=h[0]=f[0][0];var d=t.labelPosOpt;if(d==null||F(d)){var m=d==="+"?0:1;x(h,p,f,1,m),x(v,c,f,1,1-m)}else{var m=d>=0?0:1;x(h,p,f,1,m),v[1]=h[1]+d}a.setPosition(h),n.setPosition(v),a.rotation=n.rotation=t.rotation,g(a),g(n);function g(_){_.originX=f[0][0]-_.x,_.originY=f[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function x(_,b,S,T,C){_[T]+=S[T][C]-b[T][C]}},e.prototype._createAxis=function(t,i){var a=i.getData(),n=i.get("axisType"),o=vK(i,n);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new zV("value",o,t.axisExtent,n);return l.model=i,l},e.prototype._createGroup=function(t){var i=this[t]=new K;return this.group.add(i),i},e.prototype._renderAxisLine=function(t,i,a,n){var o=a.getExtent();if(n.get(["lineStyle","show"])){var s=new fe({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:N({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new fe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:q({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(t,i,a,n){var o=this,s=n.getData(),l=a.scale.getTicks();this._tickSymbols=[],w(l,function(u){var f=a.dataToCoord(u.value),p=s.getItemModel(u.value),c=p.getModel("itemStyle"),h=p.getModel(["emphasis","itemStyle"]),v=p.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:W(o._changeTimeline,o,u.value)},m=NV(p,c,i,d);m.ensureState("emphasis").style=h.getItemStyle(),m.ensureState("progress").style=v.getItemStyle(),Ta(m);var g=tt(m);p.get("tooltip")?(g.dataIndex=u.value,g.dataModel=n):g.dataIndex=g.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(t,i,a,n){var o=this,s=a.getLabelModel();if(s.get("show")){var l=n.getData(),u=a.getViewLabels();this._tickLabels=[],w(u,function(f){var p=f.tickValue,c=l.getItemModel(p),h=c.getModel("label"),v=c.getModel(["emphasis","label"]),d=c.getModel(["progress","label"]),m=a.dataToCoord(f.tickValue),g=new yt({x:m,y:0,rotation:t.labelRotation-t.rotation,onclick:W(o._changeTimeline,o,p),silent:!1,style:Ht(h,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});g.ensureState("emphasis").style=Ht(v),g.ensureState("progress").style=Ht(d),i.add(g),Ta(g),RV(g).dataIndex=p,o._tickLabels.push(g)})}},e.prototype._renderControl=function(t,i,a,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),f=n.getPlayState(),p=n.get("inverse",!0);c(t.nextBtnPosition,"next",W(this._changeTimeline,this,p?"-":"+")),c(t.prevBtnPosition,"prev",W(this._changeTimeline,this,p?"+":"-")),c(t.playPosition,f?"stop":"play",W(this._handlePlayClick,this,!f),!0);function c(h,v,d,m){if(h){var g=er(at(n.get(["controlStyle",v+"BtnSize"]),o),o),y=[0,-g/2,g,g],x=mK(n,v+"Icon",y,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:d});x.ensureState("emphasis").style=u,i.add(x),Ta(x)}}},e.prototype._renderCurrentPointer=function(t,i,a,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(p){p.draggable=!0,p.drift=W(u._handlePointerDrag,u),p.ondragend=W(u._handlePointerDragend,u),OV(p,u._progressLine,s,a,n,!0)},onUpdate:function(p){OV(p,u._progressLine,s,a,n)}};this._currentPointer=NV(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,i,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,i){var a=this._toAxisCoord(t)[0],n=this._axis,o=Ie(n.getExtent().slice());a>o[1]&&(a=o[1]),a=0&&(o[n]=+o[n].toFixed(c)),[o,p]}var _w={min:et(cg,"min"),max:et(cg,"max"),average:et(cg,"average"),median:et(cg,"median")};function wo(r,e){if(e){var t=r.getData(),i=r.coordinateSystem,a=i&&i.dimensions;if(!xK(e)&&!O(e.coord)&&O(a)){var n=bw(e,t,i,r);if(e=$(e),e.type&&_w[e.type]&&n.baseAxis&&n.valueAxis){var o=nt(a,n.baseAxis.dim),s=nt(a,n.valueAxis.dim),l=_w[e.type](t,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!O(a))e.coord=[];else for(var u=e.coord,f=0;f<2;f++)_w[u[f]]&&(u[f]=vg(t,t.mapDimension(a[f]),u[f]));return e}}function bw(r,e,t,i){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(_K(i,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=i.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function _K(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function To(r,e){return r&&r.containData&&e.coord&&!Sw(e)?r.containData(e.coord):!0}function GV(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Sw(e)&&!Sw(t)?r.containZone(e.coord,t.coord):!0}function hg(r,e){return r?function(t,i,a,n){var o=n<2?t.coord&&t.coord[n]:t.value;return Mi(o,e[n])}:function(t,i,a,n){return Mi(t.value,e[n])}}function vg(r,e,t){if(t==="average"){var i=0,a=0;return r.each(e,function(n,o){isNaN(n)||(i+=n,a++)}),i/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Tw=ot(),SK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=Y()},e.prototype.render=function(t,i,a){var n=this,o=this.markerGroupMap;o.each(function(s){Tw(s).keep=!1}),i.eachSeries(function(s){var l=Mr.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,i,a)}),o.each(function(s){!Tw(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){Tw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,i){var a=this;w(t,function(n){var o=Mr.getMarkerModelFromSeries(n,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?Jh(l):tp(l))})}})},e.type="marker",e}(Ot),nf=SK;function HV(r,e,t){var i=e.coordinateSystem;r.each(function(a){var n=r.getItemModel(a),o,s=H(n.get("x"),t.getWidth()),l=H(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,a));else if(i){var u=r.get(i.dimensions[0],a),f=r.get(i.dimensions[1],a);o=i.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(a,o)})}var bK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,a){i.eachSeries(function(n){var o=Mr.getMarkerModelFromSeries(n,"markPoint");o&&(HV(o.getData(),n,a),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,i,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Ra),p=wK(o,t,i);i.setData(p),HV(i.getData(),t,n),p.each(function(c){var h=p.getItemModel(c),v=h.getShallow("symbol"),d=h.getShallow("symbolSize"),m=h.getShallow("symbolRotate"),g=h.getShallow("symbolOffset"),y=h.getShallow("symbolKeepAspect");if(X(v)||X(d)||X(m)||X(g)){var x=i.getRawValue(c),_=i.getDataParams(c);X(v)&&(v=v(x,_)),X(d)&&(d=d(x,_)),X(m)&&(m=m(x,_)),X(g)&&(g=g(x,_))}var b=h.getModel("itemStyle").getItemStyle(),S=Ma(l,"color");b.fill||(b.fill=S),p.setItemVisual(c,{symbol:v,symbolSize:d,symbolRotate:m,symbolOffset:g,symbolKeepAspect:y,style:b})}),f.updateData(p),this.group.add(f.group),p.eachItemGraphicEl(function(c){c.traverse(function(h){tt(h).dataModel=i})}),this.markKeep(f),f.group.silent=i.get("silent")||t.get("silent")},e.type="markPoint",e}(nf);function wK(r,e,t){var i;r?i=k(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return N(N({},l),{name:s,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var a=new ve(i,t),n=k(t.get("data"),et(wo,e));r&&(n=Dt(n,et(To,r)));var o=hg(!!r,i);return a.initData(n,null,o),a}var WV=bK;function Cw(r){r.registerComponentModel(FV),r.registerComponentView(WV),r.registerPreprocessor(function(e){Ws(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var TK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,a){return new e(t,i,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Mr),YV=TK;var dg=ot(),CK=function(r,e,t,i){var a=r.getData(),n;if(O(i))n=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=e.getAxis(i.yAxis!=null?"y":"x"),l=ae(i.yAxis,i.xAxis);else{var u=bw(i,a,e,r);s=u.valueAxis;var f=yd(a,u.valueDataDim);l=vg(a,f,o)}var p=s.dim==="x"?0:1,c=1-p,h=$(i),v={coord:[]};h.type=null,h.coord=[],h.coord[c]=-1/0,v.coord[c]=1/0;var d=t.get("precision");d>=0&&vt(l)&&(l=+l.toFixed(Math.min(d,20))),h.coord[p]=v.coord[p]=l,n=[h,v,{type:o,valueIndex:i.valueIndex,value:l}]}else n=[]}var m=[wo(r,n[0]),wo(r,n[1]),N({},n[2])];return m[2].type=m[2].type||null,lt(m[2],m[0]),lt(m[2],m[1]),m};function mg(r){return!isNaN(r)&&!isFinite(r)}function ZV(r,e,t,i){var a=1-r,n=i.dimensions[r];return mg(e[a])&&mg(t[a])&&e[r]===t[r]&&i.getAxis(n).containData(e[r])}function AK(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,i=e[1].coord;if(t&&i&&(ZV(1,t,i,r)||ZV(0,t,i,r)))return!0}return To(r,e[0])&&To(r,e[1])}function Aw(r,e,t,i,a){var n=i.coordinateSystem,o=r.getItemModel(e),s,l=H(o.get("x"),a.getWidth()),u=H(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=n.dimensions,p=r.get(f[0],e),c=r.get(f[1],e);s=n.dataToPoint([p,c])}if(Pi(n,"cartesian2d")){var h=n.getAxis("x"),v=n.getAxis("y"),f=n.dimensions;mg(r.get(f[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):mg(r.get(f[1],e))&&(s[1]=v.toGlobalCoord(v.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var DK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,a){i.eachSeries(function(n){var o=Mr.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=dg(o).from,u=dg(o).to;l.each(function(f){Aw(l,f,!0,n,a),Aw(u,f,!1,n,a)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,i,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Fu);this.group.add(f.group);var p=MK(o,t,i),c=p.from,h=p.to,v=p.line;dg(i).from=c,dg(i).to=h,i.setData(v);var d=i.get("symbol"),m=i.get("symbolSize"),g=i.get("symbolRotate"),y=i.get("symbolOffset");O(d)||(d=[d,d]),O(m)||(m=[m,m]),O(g)||(g=[g,g]),O(y)||(y=[y,y]),p.from.each(function(_){x(c,_,!0),x(h,_,!1)}),v.each(function(_){var b=v.getItemModel(_).getModel("lineStyle").getLineStyle();v.setItemLayout(_,[c.getItemLayout(_),h.getItemLayout(_)]),b.stroke==null&&(b.stroke=c.getItemVisual(_,"style").fill),v.setItemVisual(_,{fromSymbolKeepAspect:c.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(_,"symbolOffset"),fromSymbolRotate:c.getItemVisual(_,"symbolRotate"),fromSymbolSize:c.getItemVisual(_,"symbolSize"),fromSymbol:c.getItemVisual(_,"symbol"),toSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(_,"symbolOffset"),toSymbolRotate:h.getItemVisual(_,"symbolRotate"),toSymbolSize:h.getItemVisual(_,"symbolSize"),toSymbol:h.getItemVisual(_,"symbol"),style:b})}),f.updateData(v),p.line.eachItemGraphicEl(function(_){tt(_).dataModel=i,_.traverse(function(b){tt(b).dataModel=i})});function x(_,b,S){var T=_.getItemModel(b);Aw(_,b,S,t,n);var C=T.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=Ma(l,"color")),_.setItemVisual(b,{symbolKeepAspect:T.get("symbolKeepAspect"),symbolOffset:at(T.get("symbolOffset",!0),y[S?0:1]),symbolRotate:at(T.get("symbolRotate",!0),g[S?0:1]),symbolSize:at(T.get("symbolSize"),m[S?0:1]),symbol:at(T.get("symbol",!0),d[S?0:1]),style:C})}this.markKeep(f),f.group.silent=i.get("silent")||t.get("silent")},e.type="markLine",e}(nf);function MK(r,e,t){var i;r?i=k(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return N(N({},f),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var a=new ve(i,t),n=new ve(i,t),o=new ve([],t),s=k(t.get("data"),et(CK,e,r,t));r&&(s=Dt(s,et(AK,r)));var l=hg(!!r,i);return a.initData(k(s,function(u){return u[0]}),null,l),n.initData(k(s,function(u){return u[1]}),null,l),o.initData(k(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:n,line:o}}var XV=DK;function Dw(r){r.registerComponentModel(YV),r.registerComponentView(XV),r.registerPreprocessor(function(e){Ws(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var IK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,a){return new e(t,i,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Mr),qV=IK;var gg=ot(),LK=function(r,e,t,i){var a=i[0],n=i[1];if(!(!a||!n)){var o=wo(r,a),s=wo(r,n),l=o.coord,u=s.coord;l[0]=ae(l[0],-1/0),l[1]=ae(l[1],-1/0),u[0]=ae(u[0],1/0),u[1]=ae(u[1],1/0);var f=Cl([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function yg(r){return!isNaN(r)&&!isFinite(r)}function jV(r,e,t,i){var a=1-r;return yg(e[a])&&yg(t[a])}function EK(r,e){var t=e.coord[0],i=e.coord[1],a={coord:t,x:e.x0,y:e.y0},n={coord:i,x:e.x1,y:e.y1};return Pi(r,"cartesian2d")?t&&i&&(jV(1,t,i,r)||jV(0,t,i,r))?!0:GV(r,a,n):To(r,a)||To(r,n)}function KV(r,e,t,i,a){var n=i.coordinateSystem,o=r.getItemModel(e),s,l=H(o.get(t[0]),a.getWidth()),u=H(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var f=r.getValues(["x0","y0"],e),p=r.getValues(["x1","y1"],e),c=n.clampData(f),h=n.clampData(p),v=[];t[0]==="x0"?v[0]=c[0]>h[0]?p[0]:f[0]:v[0]=c[0]>h[0]?f[0]:p[0],t[1]==="y0"?v[1]=c[1]>h[1]?p[1]:f[1]:v[1]=c[1]>h[1]?f[1]:p[1],s=i.getMarkerPosition(v,t,!0)}else{var d=r.get(t[0],e),m=r.get(t[1],e),g=[d,m];n.clampData&&n.clampData(g,g),s=n.dataToPoint(g,!0)}if(Pi(n,"cartesian2d")){var y=n.getAxis("x"),x=n.getAxis("y"),d=r.get(t[0],e),m=r.get(t[1],e);yg(d)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):yg(m)&&(s[1]=x.toGlobalCoord(x.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var QV=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],PK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,a){i.eachSeries(function(n){var o=Mr.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=k(QV,function(p){return KV(s,l,p,n,a)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,i,a,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new K});this.group.add(f.group),this.markKeep(f);var p=zK(o,t,i);i.setData(p),p.each(function(c){var h=k(QV,function(C){return KV(p,c,C,t,n)}),v=o.getAxis("x").scale,d=o.getAxis("y").scale,m=v.getExtent(),g=d.getExtent(),y=[v.parse(p.get("x0",c)),v.parse(p.get("x1",c))],x=[d.parse(p.get("y0",c)),d.parse(p.get("y1",c))];Ie(y),Ie(x);var _=!(m[0]>y[1]||m[1]x[1]||g[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(xt),Ic=NK;var of=et,Iw=w,xg=K,OK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new xg),this.group.add(this._selectorGroup=new xg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,i,a){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,i,a,l,s,u);var f=t.getBoxLayoutParams(),p={width:a.getWidth(),height:a.getHeight()},c=t.get("padding"),h=Zt(f,p,c),v=this.layoutInner(t,o,h,n,l,u),d=Zt(q({width:v.width,height:v.height},f),p,c);this.group.x=d.x-v.x,this.group.y=d.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=ag(v,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,i,a,n,o,s,l){var u=this.getContentGroup(),f=Y(),p=i.get("selectedMode"),c=[];a.eachRawSeries(function(h){!h.get("legendHoverLink")&&c.push(h.id)}),Iw(i.getData(),function(h,v){var d=h.get("name");if(!this.newlineDisabled&&(d===""||d===` -`)){var m=new xg;m.newline=!0,u.add(m);return}var g=a.getSeriesByName(d)[0];if(!f.get(d))if(g){var y=g.getData(),x=y.getVisual("legendLineStyle")||{},_=y.getVisual("legendIcon"),b=y.getVisual("style"),S=this._createItem(g,d,v,h,i,t,x,b,_,p,n);S.on("click",of(JV,d,null,n,c)).on("mouseover",of(Lw,g.name,null,n,c)).on("mouseout",of(Ew,g.name,null,n,c)),a.ssr&&S.eachChild(function(T){var C=tt(T);C.seriesIndex=g.seriesIndex,C.dataIndex=v,C.ssrType="legend"}),f.set(d,!0)}else a.eachRawSeries(function(T){if(!f.get(d)&&T.legendVisualProvider){var C=T.legendVisualProvider;if(!C.containName(d))return;var A=C.indexOfName(d),D=C.getItemVisual(A,"style"),M=C.getItemVisual(A,"legendIcon"),I=qe(D.fill);I&&I[3]===0&&(I[3]=.2,D=N(N({},D),{fill:_i(I,"rgba")}));var L=this._createItem(T,d,v,h,i,t,{},D,M,p,n);L.on("click",of(JV,null,d,n,c)).on("mouseover",of(Lw,null,d,n,c)).on("mouseout",of(Ew,null,d,n,c)),a.ssr&&L.eachChild(function(P){var z=tt(P);z.seriesIndex=T.seriesIndex,z.dataIndex=v,z.ssrType="legend"}),f.set(d,!0)}},this)},this),o&&this._createSelector(o,i,n,s,l)},e.prototype._createSelector=function(t,i,a,n,o){var s=this.getSelectorGroup();Iw(t,function(u){var f=u.type,p=new yt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(p);var c=i.getModel("selectorLabel"),h=i.getModel(["emphasis","selectorLabel"]);ee(p,{normal:c,emphasis:h},{defaultText:u.title}),Ta(p)})},e.prototype._createItem=function(t,i,a,n,o,s,l,u,f,p,c){var h=t.visualDrawType,v=o.get("itemWidth"),d=o.get("itemHeight"),m=o.isSelected(i),g=n.get("symbolRotate"),y=n.get("symbolKeepAspect"),x=n.get("icon");f=x||f||"roundRect";var _=kK(f,n,l,u,h,m,c),b=new xg,S=n.getModel("textStyle");if(X(t.getLegendIcon)&&(!x||x==="inherit"))b.add(t.getLegendIcon({itemWidth:v,itemHeight:d,icon:f,iconRotate:g,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var T=x==="inherit"&&t.getData().getVisual("symbol")?g==="inherit"?t.getData().getVisual("symbolRotate"):g:0;b.add(VK({itemWidth:v,itemHeight:d,icon:f,iconRotate:T,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?v+5:-5,A=s,D=o.get("formatter"),M=i;F(D)&&D?M=D.replace("{name}",i??""):X(D)&&(M=D(i));var I=m?S.getTextColor():n.get("inactiveColor");b.add(new yt({style:Ht(S,{text:M,x:C,y:d/2,fill:I,align:A,verticalAlign:"middle"},{inheritColor:I})}));var L=new ht({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=n.getModel("tooltip");return P.get("show")&&ji({el:L,componentModel:o,itemName:i,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(z){z.silent=!0}),L.silent=!p,this.getContentGroup().add(b),Ta(b),b.__legendDataIndex=a,b},e.prototype.layoutInner=function(t,i,a,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();$i(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),p=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){$i("horizontal",u,t.get("selectorItemGap",!0));var c=u.getBoundingRect(),h=[-c.x,-c.y],v=t.get("selectorButtonGap",!0),d=t.getOrient().index,m=d===0?"width":"height",g=d===0?"height":"width",y=d===0?"y":"x";s==="end"?h[d]+=f[m]+v:p[d]+=c[m]+v,h[1-d]+=f[g]/2-c[g]/2,u.x=h[0],u.y=h[1],l.x=p[0],l.y=p[1];var x={x:0,y:0};return x[m]=f[m]+v+c[m],x[g]=Math.max(f[g],c[g]),x[y]=Math.min(0,c[y]+h[1-d]),x}else return l.x=p[0],l.y=p[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Ot);function kK(r,e,t,i,a,n,o){function s(m,g){m.lineWidth==="auto"&&(m.lineWidth=g.lineWidth>0?2:0),Iw(m,function(y,x){m[x]==="inherit"&&(m[x]=g[x])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",p=l.getShallow("decal");u.decal=!p||p==="inherit"?i.decal:ra(p,o),u.fill==="inherit"&&(u.fill=i[a]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?i:t).opacity),s(u,i);var c=e.getModel("lineStyle"),h=c.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),h.stroke==="auto"&&(h.stroke=i.fill),!n){var v=e.get("inactiveBorderWidth"),d=u[f];u.lineWidth=v==="auto"?i.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=c.get("inactiveColor"),h.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function VK(r){var e=r.icon||"roundRect",t=Xt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function JV(r,e,t,i){Ew(r,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:r??e}),Lw(r,e,t,i)}function tU(r){for(var e=r.getZr().storage.getDisplayList(),t,i=0,a=e.length;ia[o],m=[-h.x,-h.y];i||(m[n]=f[u]);var g=[0,0],y=[-v.x,-v.y],x=at(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var _=t.get("pageButtonPosition",!0);_==="end"?y[n]+=a[o]-v[o]:g[n]+=v[o]+x}y[1-n]+=h[s]/2-v[s]/2,f.setPosition(m),p.setPosition(g),c.setPosition(y);var b={x:0,y:0};if(b[o]=d?a[o]:h[o],b[s]=Math.max(h[s],v[s]),b[l]=Math.min(0,v[l]+y[1-n]),p.__rectSize=a[o],d){var S={x:0,y:0};S[o]=Math.max(a[o]-v[o]-x,0),S[s]=b[s],p.setClipPath(new ht({shape:S})),p.__rectSize=S[o]}else c.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var T=this._getPageInfo(t);return T.pageIndex!=null&&_t(f,{x:T.contentPosition[0],y:T.contentPosition[1]},d?t:null),this._updatePageInfoView(t,T),b},e.prototype._pageGo=function(t,i,a){var n=this._getPageInfo(i)[t];n!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:i.id})},e.prototype._updatePageInfoView=function(t,i){var a=this._controllerGroup;w(["pagePrev","pageNext"],function(f){var p=f+"DataIndex",c=i[p]!=null,h=a.childOfName(f);h&&(h.setStyle("fill",c?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=c?"pointer":"default")});var n=a.childOfName("pageText"),o=t.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;n&&o&&n.setStyle("text",F(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var i=t.get("scrollDataIndex",!0),a=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=zw[o],l=Rw[o],u=this._findTargetItemIndex(i),f=a.children(),p=f[u],c=f.length,h=c?1:0,v={contentPosition:[a.x,a.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!p)return v;var d=_(p);v.contentPosition[o]=-d.s;for(var m=u+1,g=d,y=d,x=null;m<=c;++m)x=_(f[m]),(!x&&y.e>g.s+n||x&&!b(x,g.s))&&(y.i>g.i?g=y:g=x,g&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=g.i),++v.pageCount)),y=x;for(var m=u-1,g=d,y=d,x=null;m>=-1;--m)x=_(f[m]),(!x||!b(y,x.s))&&g.i=T&&S.s<=T+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var i,a=this.getContentGroup(),n;return a.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(i=s)}),i??n},e.type="legend.scroll",e}(_g),nU=BK;function Nw(r){r.registerAction("legendScroll","legendscroll",function(e,t){var i=e.scrollDataIndex;i!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(i)})})}function oU(r){St(Sg),r.registerComponentModel(iU),r.registerComponentView(nU),Nw(r)}function Ow(r){St(Sg),St(oU)}var FK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=mr(_o.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(_o),sU=FK;var kw=ot();function lU(r,e,t){kw(r).coordSysRecordMap.each(function(i){var a=i.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function uU(r,e){for(var t=kw(r).coordSysRecordMap,i=t.keys(),a=0;ai[t+e]&&(e=s),a=a&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function pU(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=kw(t),a=i.coordSysRecordMap||(i.coordSysRecordMap=Y());a.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=rg(n);w(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,GK(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=Y());f.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),a.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){fU(a,n);return}var f=YK(l);o.enable(f.controlType,f.opt),o.setPointerChecker(n.containsPoint),Ii(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var XK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,i,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),lU(a,t,{pan:W(Vw.pan,this),zoom:W(Vw.zoom,this),scrollMove:W(Vw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){uU(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(ef),Vw={zoom:function(r,e,t,i){var a=this.range,n=a.slice(),o=r.axisModels[0];if(o){var s=Uw[e](null,[i.originX,i.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/i.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Qr(0,n,[0,100],0,f.minSpan,f.maxSpan),this.range=n,a[0]!==n[0]||a[1]!==n[1])return n}},pan:cU(function(r,e,t,i,a,n){var o=Uw[i]([n.oldX,n.oldY],[n.newX,n.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:cU(function(r,e,t,i,a,n){var o=Uw[i]([0,0],[n.scrollDelta,n.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*n.scrollDelta})};function cU(r){return function(e,t,i,a){var n=this.range,o=n.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,i,a);if(Qr(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Uw={grid:function(r,e,t,i,a){var n=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],n.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(r,e,t,i,a){var n=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(r,e,t,i,a){var n=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},hU=XK;function Ec(r){Gs(r),r.registerComponentModel(sU),r.registerComponentView(hU),pU(r)}var qK=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=mr(_o.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(_o),vU=qK;var Pc=ht,dU=7,jK=1,Bw=30,KK=7,zc="horizontal",mU="vertical",QK=5,$K=["line","bar","candlestick","scatter"],JK={easing:"cubicOut",duration:100,delay:0},tQ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,i){this.api=i,this._onBrush=W(this._onBrush,this),this._onBrushEnd=W(this._onBrushEnd,this)},e.prototype.render=function(t,i,a,n){if(r.prototype.render.apply(this,arguments),Ii(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){cn(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new K;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,i=this.api,a=t.get("brushSelect"),n=a?KK:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===zc?{right:s.width-o.x-o.width,top:s.height-Bw-dU-n,width:o.width,height:Bw}:{right:dU,top:o.y,width:Bw,height:o.height},u=Ai(t.option);w(["right","top","width","height"],function(p){u[p]==="ph"&&(u[p]=l[p])});var f=Zt(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===mU&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,i=this._location,a=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===zc&&!o?{scaleY:l?1:-1,scaleX:1}:a===zc&&o?{scaleY:l?1:-1,scaleX:-1}:a===mU&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=i.x-u.x,t.y=i.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,i=this._size,a=this._displayables.sliderGroup,n=t.get("brushSelect");a.add(new Pc({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Pc({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:W(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var i=this._size,a=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim&&n.getShadowDim(),l=s&&o.getDimensionInfo(s)?n.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==a[0]||i[1]!==a[1]){var p=o.getDataExtent(l),c=(p[1]-p[0])*.3;p=[p[0]-c,p[1]+c];var h=[0,i[1]],v=[0,i[0]],d=[[i[0],0],[0,0]],m=[],g=v[1]/(o.count()-1),y=0,x=Math.round(o.count()/i[0]),_;o.each([l],function(A,D){if(x>0&&D%x){y+=g;return}var M=A==null||isNaN(A)||A==="",I=M?0:kt(A,p,h,!0);M&&!_&&D?(d.push([d[d.length-1][0],0]),m.push([m[m.length-1][0],0])):!M&&_&&(d.push([y,0]),m.push([y,0])),d.push([y,I]),m.push([y,I]),y+=g,_=M}),u=this._shadowPolygonPts=d,f=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var b=this.dataZoomModel;function S(A){var D=b.getModel(A?"selectedDataBackground":"dataBackground"),M=new K,I=new he({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new pe({shape:{points:f},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(I),M.add(L),M}for(var T=0;T<3;T++){var C=S(T===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,i=t.get("showDataShadow");if(i!==!1){var a,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();w(l,function(u){if(!a&&!(i!==!0&&nt($K,u.get("type"))<0)){var f=n.getComponent(Vi(o),s).axis,p=eQ(o),c,h=u.coordinateSystem;p!=null&&h.getOtherAxis&&(c=h.getOtherAxis(f).inverse),p=u.getData().mapDimension(p),a={thisAxis:f,series:u,thisDim:o,otherDim:p,otherAxisInverse:c}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,i=this._displayables,a=i.handles=[null,null],n=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,p=l.get("brushSelect"),c=i.filler=new Pc({silent:p,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new Pc({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:jK,fill:"rgba(0,0,0,0)"}})),w([0,1],function(x){var _=l.get("handleIcon");!Lp[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var b=Xt(_,-1,0,2,2,null,!0);b.attr({cursor:gU(this._orient),draggable:!0,drift:W(this._onDragMove,this,x),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),T=l.get("handleSize");this._handleHeight=H(T,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ta(b);var C=l.get("handleColor");C!=null&&(b.style.fill=C),o.add(a[x]=b);var A=l.getModel("textStyle");t.add(n[x]=new yt({silent:!0,invisible:!0,style:Ht(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var h=c;if(p){var v=H(l.get("moveHandleSize"),s[1]),d=i.moveHandle=new ht({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),m=v*.8,g=i.moveHandleIcon=Xt(l.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);g.silent=!0,g.y=s[1]+v/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(v,10));h=i.moveZone=new ht({invisible:!0,shape:{y:s[1]-y,height:v+y}}),h.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(g),o.add(h)}h.attr({draggable:!0,cursor:gU(this._orient),drift:W(this._onDragMove,this,"all"),ondragstart:W(this._showDataInfo,this,!0),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[kt(t[0],[0,100],i,!0),kt(t[1],[0,100],i,!0)]},e.prototype._updateInterval=function(t,i){var a=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Qr(i,n,o,a.get("zoomLock")?"all":t,s.minSpan!=null?kt(s.minSpan,l,o,!0):null,s.maxSpan!=null?kt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Ie([kt(n[0],o,l,!0),kt(n[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var i=this._displayables,a=this._handleEnds,n=Ie(a.slice()),o=this._size;w([0,1],function(h){var v=i.handles[h],d=this._handleHeight;v.attr({scaleX:d/2,scaleY:d/2,x:a[h]+(h?-1:1),y:o[1]/2-d/2})},this),i.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,n[0],n[1],o[0]],f=0;fi[0]||a[1]<0||a[1]>i[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var i=t.offsetX,a=t.offsetY;this._brushStart=new bt(i,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var a=i.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Ie([kt(a.x,o,s,!0),kt(a.x+a.width,o,s,!0)]),this._handleEnds=[a.x,a.x+a.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Pr(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,i){var a=this._displayables,n=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new Pc({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,i),f=l.transformCoordToLocal(s.x,s.y),p=this._size;u[0]=Math.max(Math.min(p[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:p[1]})},e.prototype._dispatchZoomAction=function(t){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?JK:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var t,i=rg(this.dataZoomModel).infoList;if(!t&&i.length){var a=i[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(ef);function eQ(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function gU(r){return r==="vertical"?"ns-resize":"ew-resize"}var yU=tQ;function Rc(r){r.registerComponentModel(vU),r.registerComponentView(yU),Gs(r)}function Fw(r){St(Ec),St(Rc)}var rQ={get:function(r,e,t){var i=$((iQ[r]||{})[e]);return t&&O(i)?i[i.length-1]:i}},iQ={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},bg=rQ;var xU=xe.mapVisual,aQ=xe.eachVisual,nQ=O,_U=w,oQ=Ie,sQ=kt,lQ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,i,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,i){var a=this.option;!i&&lg(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var i=this.stateList;t=W(t,this),this.controllerVisuals=Dc(this.option.controller,i,t),this.targetVisuals=Dc(this.option.target,i,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,i=[];return t==null||t==="all"?this.ecModel.eachSeries(function(a,n){i.push(n)}):i=Nt(t),i},e.prototype.eachTargetSeries=function(t,i){w(this.getTargetSeriesIndices(),function(a){var n=this.ecModel.getSeriesByIndex(a);n&&t.call(i,n)},this)},e.prototype.isTargetSeries=function(t){var i=!1;return this.eachTargetSeries(function(a){a===t&&(i=!0)}),i},e.prototype.formatValueText=function(t,i,a){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;a=a||["<",">"],O(t)&&(t=t.slice(),u=!0);var f=i?t:u?[p(t[0]),p(t[1])]:p(t);if(F(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(X(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+f[1]:t[1]===s[1]?a[1]+" "+f[0]:f[0]+" - "+f[1];return f;function p(c){return c===s[0]?"min":c===s[1]?"max":(+c).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,i=oQ([t.min,t.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(t){var i=this.option.dimension;if(i!=null)return t.getDimensionIndex(i);for(var a=t.dimensions,n=a.length-1;n>=0;n--){var o=a[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,i=this.option,a={inRange:i.inRange,outOfRange:i.outOfRange},n=i.target||(i.target={}),o=i.controller||(i.controller={});lt(n,a),lt(o,a);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),f.call(this,o);function l(p){nQ(i.color)&&!p.inRange&&(p.inRange={color:i.color.slice().reverse()}),p.inRange=p.inRange||{color:t.get("gradientColor")}}function u(p,c,h){var v=p[c],d=p[h];v&&!d&&(d=p[h]={},_U(v,function(m,g){if(xe.isValidType(g)){var y=bg.get(g,"inactive",s);y!=null&&(d[g]=y,g==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(p){var c=(p.inRange||{}).symbol||(p.outOfRange||{}).symbol,h=(p.inRange||{}).symbolSize||(p.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),d=this.getItemSymbol(),m=d||"roundRect";_U(this.stateList,function(g){var y=this.itemSize,x=p[g];x||(x=p[g]={color:s?v:[v]}),x.symbol==null&&(x.symbol=c&&$(c)||(s?m:[m])),x.symbolSize==null&&(x.symbolSize=h&&$(h)||(s?y[0]:[y[0],y[0]])),x.symbol=xU(x.symbol,function(S){return S==="none"?m:S});var _=x.symbolSize;if(_!=null){var b=-1/0;aQ(_,function(S){S>b&&(b=S)}),x.symbolSize=xU(_,function(S){return sQ(S,[0,b],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(xt),sf=lQ;var SU=[20,140],uQ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=SU[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=SU[1])},e.prototype._resetRange=function(){var t=this.getExtent(),i=this.option.range;!i||i.auto?(t.auto=1,this.option.range=t):O(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],t[0]),i[1]=Math.min(i[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),w(this.stateList,function(t){var i=this.option.controller[t].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),i=Ie((this.get("range")||[]).slice());return i[0]>t[1]&&(i[0]=t[1]),i[1]>t[1]&&(i[1]=t[1]),i[0]=a[1]||t<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[];return this.eachTargetSeries(function(a){var n=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),i.push({seriesId:a.id,dataIndex:n})},this),i},e.prototype.getVisualMeta=function(t){var i=bU(this,"outOfRange",this.getExtent()),a=bU(this,"inRange",this.option.range.slice()),n=[];function o(h,v){n.push({value:h,color:t(h,v)})}for(var s=0,l=0,u=a.length,f=i.length;lt[1])break;n.push({color:this.getControllerVisual(l,"color",i),offset:s/a})}return n.push({color:this.getControllerVisual(t[1],"color",i),offset:1}),n},e.prototype._createBarPoints=function(t,i){var a=this.visualMapModel.itemSize;return[[a[0]-i[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-i[1],t[1]]]},e.prototype._createBarGroup=function(t){var i=this._orient,a=this.visualMapModel.get("inverse");return new K(i==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,i){if(this._useHandle){var a=this._shapes,n=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=n.itemSize,u=n.getExtent();pQ([0,1],function(f){var p=o[f];p.setStyle("fill",i.handlesColor[f]),p.y=t[f];var c=Fa(t[f],[0,l[1]],u,!0),h=this.getControllerVisual(c,"symbolSize");p.scaleX=p.scaleY=h/l[0],p.x=l[0]-h/2;var v=nr(a.handleLabelPoints[f],qi(p,this.group));s[f].setStyle({x:v[0],y:v[1],text:n.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,i,a,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,p=f.indicator;if(p){p.attr("invisible",!1);var c={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",c),v=this.getControllerVisual(t,"symbolSize"),d=Fa(t,s,u,!0),m=l[0]-v/2,g={x:p.x,y:p.y};p.y=d,p.x=m;var y=nr(f.indicatorLabelPoint,qi(p,this.group)),x=f.indicatorLabel;x.attr("invisible",!1);var _=this._applyTransform("left",f.mainGroup),b=this._orient,S=b==="horizontal";x.setStyle({text:(a||"")+o.formatValueText(i),verticalAlign:S?_:"middle",align:S?"center":_});var T={x:m,y:d,style:{fill:h}},C={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};p.x=g.x,p.y=g.y,p.animateTo(T,A),x.animateTo(C,A)}else p.attr(T),x.attr(C);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var M=0;Mo[1]&&(p[1]=1/0),i&&(p[0]===-1/0?this._showIndicator(f,p[1],"< ",l):p[1]===1/0?this._showIndicator(f,p[0],"> ",l):this._showIndicator(f,f,"\u2248 ",l));var c=this._hoverLinkDataIndices,h=[];(i||MU(a))&&(h=this._hoverLinkDataIndices=a.findTargetDataIndices(p));var v=gA(c,h);this._dispatchHighDown("downplay",lf(v[0],a)),this._dispatchHighDown("highlight",lf(v[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var i;if(ta(t.target,function(l){var u=tt(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var a=this.ecModel.getSeriesByIndex(i.seriesIndex),n=this.visualMapModel;if(n.isTargetSeries(a)){var o=a.getData(i.dataType),s=o.getStore().get(n.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var a=0;a=0&&(n.dimension=o,i.push(n))}}),r.getData().setVisual("visualMeta",i)}}];function mQ(r,e,t,i){for(var a=e.targetVisuals[i],n=xe.prepareVisualTypes(a),o={color:Ma(r.getData(),"color")},s=0,l=n.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(EU,PU),w(zU,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(Hw))}function Oc(r){r.registerComponentModel(wU),r.registerComponentView(LU),Nc(r)}var gQ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],yQ[this._mode].call(this,this._pieceList),this._resetSelected(t,i);var n=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=$(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=k(this._pieceList,function(l){return l=$(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,i={},a=xe.listVisualTypes(),n=this.isCategory();w(t.pieces,function(s){w(a,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),w(i,function(s,l){var u=!1;w(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&w(this.stateList,function(f){(t[f]||(t[f]={}))[l]=bg.get(l,f==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,i){var a=this.option,n=this._pieceList,o=(i?a:t).selected||{};if(a.selected=o,w(n,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),a.selectedMode==="single"){var s=!1;w(n,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=$(t)},e.prototype.getValueState=function(t){var i=xe.findPieceIndex(t,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[],a=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=xe.findPieceIndex(l,a);f===t&&o.push(u)},this),i.push({seriesId:n.id,dataIndex:o})},this),i},e.prototype.getRepresentValue=function(t){var i;if(this.isCategory())i=t.value;else if(t.value!=null)i=t.value;else{var a=t.interval||[];i=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return i},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var i=[],a=["",""],n=this;function o(f,p){var c=n.getRepresentValue({interval:f});p||(p=n.getValueState(c));var h=t(c,p);f[0]===-1/0?a[0]=h:f[1]===1/0?a[1]=h:i.push({value:f[0],color:h},{value:f[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return w(s,function(f){var p=f.interval;p&&(p[0]>u&&o([u,p[0]],"outOfRange"),o(p.slice()),u=p[1])},this),{stops:i,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=mr(sf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(sf),yQ={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),i=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var n=(i[1]-i[0])/a;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o","\u2265"][i[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function OU(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var kU=gQ;var xQ=function(r){E(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var i=this.visualMapModel,a=i.get("textGap"),n=i.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=i.itemSize,f=this._getViewData(),p=f.endsText,c=ae(i.get("showLabel",!0),!p);p&&this._renderEndsText(t,p[0],u,c,l),w(f.viewPieceList,function(h){var v=h.piece,d=new K;d.onclick=W(this._onItemClick,this,v),this._enableHoverLink(d,h.indexInModelPieceList);var m=i.getRepresentValue(v);if(this._createItemSymbol(d,m,[0,0,u[0],u[1]]),c){var g=this.visualMapModel.getValueState(m);d.add(new yt({style:{x:l==="right"?-a:u[0]+a,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:g==="outOfRange"?.5:1}}))}t.add(d)},this),p&&this._renderEndsText(t,p[1],u,c,l),$i(i.get("orient"),t,i.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,i){var a=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:lf(s.findTargetDataIndices(i),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,i=t.option;if(i.orient==="vertical")return Tg(t,this.api,t.itemSize);var a=i.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,i,a,n,o){if(i){var s=new K,l=this.visualMapModel.textStyleModel;s.add(new yt({style:Ht(l,{x:n?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:n?o:"center",text:i})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,i=k(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?i.reverse():a&&(a=a.slice().reverse()),{viewPieceList:i,endsText:a}},e.prototype._createItemSymbol=function(t,i,a){t.add(Xt(this.getControllerVisual(i,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(i,"color")))},e.prototype._onItemClick=function(t){var i=this.visualMapModel,a=i.option,n=a.selectedMode;if(n){var o=$(a.selected),s=i.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,w(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(wg),VU=xQ;function kc(r){r.registerComponentModel(kU),r.registerComponentView(VU),Nc(r)}function Ww(r){St(Oc),St(kc)}var _Q={label:{enabled:!0},decal:{show:!1}},UU=ot(),SQ={};function Yw(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var i=$(_Q);lt(i.label,r.getLocaleModel().get("aria"),!1),lt(t.option,i,!1),a(),n();function a(){var u=t.getModel("decal"),f=u.get("show");if(f){var p=Y();r.eachSeries(function(c){if(!c.isColorBySeries()){var h=p.get(c.type);h||(h={},p.set(c.type,h)),UU(c).scope=h}}),r.eachRawSeries(function(c){if(r.isSeriesFiltered(c))return;if(X(c.enableAriaDecal)){c.enableAriaDecal();return}var h=c.getData();if(c.isColorBySeries()){var y=gp(c.ecModel,c.name,SQ,r.getSeriesCount()),x=h.getVisual("decal");h.setVisual("decal",_(x,y))}else{var v=c.getRawData(),d={},m=UU(c).scope;h.each(function(b){var S=h.getRawIndex(b);d[S]=b});var g=v.count();v.each(function(b){var S=d[b],T=v.getName(b)||b+"",C=gp(c.ecModel,T,m,g),A=h.getItemVisual(S,"decal");h.setItemVisual(S,"decal",_(A,C))})}function _(b,S){var T=b?N(N({},S),b):S;return T.dirty=!0,T}})}}function n(){var u=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=q(f.option,u),!!f.get("enabled")){var p=e.getZr().dom;if(f.get("description")){p.setAttribute("aria-label",f.get("description"));return}var c=r.getSeriesCount(),h=f.get(["data","maxCount"])||10,v=f.get(["series","maxCount"])||10,d=Math.min(c,v),m;if(!(c<1)){var g=s();if(g){var y=f.get(["general","withTitle"]);m=o(y,{title:g})}else m=f.get(["general","withoutTitle"]);var x=[],_=c>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(_,{seriesCount:c}),r.eachSeries(function(C,A){if(A1?f.get(["series","multiple",I]):f.get(["series","single",I]),D=o(D,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var L=C.getData();if(L.count()>h){var P=f.get(["data","partialData"]);D+=o(P,{displayCnt:h})}else D+=f.get(["data","allData"]);for(var z=f.get(["data","separator","middle"]),R=f.get(["data","separator","end"]),U=[],V=0;V":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},bQ=function(){function r(e){var t=this._condVal=F(e)?new RegExp(e):ZT(e)?e:null;if(t==null){var i="";Gt(i)}}return r.prototype.evaluate=function(e){var t=typeof e;return F(t)?this._condVal.test(e):vt(t)?this._condVal.test(e+""):!1},r}(),wQ=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),TQ=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&i.push(a),a=[L,P]}function f(L,P,z,R){ff(L,z)&&ff(P,R)||a.push(L,P,z,R,z,R)}function p(L,P,z,R,U,V){var B=Math.abs(P-L),Z=Math.tan(B/4)*4/3,Q=PC:M2&&i.push(a),i}function Qw(r,e,t,i,a,n,o,s,l,u){if(ff(r,t)&&ff(e,i)&&ff(a,o)&&ff(n,s)){l.push(o,s);return}var f=2/u,p=f*f,c=o-r,h=s-e,v=Math.sqrt(c*c+h*h);c/=v,h/=v;var d=t-r,m=i-e,g=a-o,y=n-s,x=d*d+m*m,_=g*g+y*y;if(x=0&&C=0){l.push(o,s);return}var A=[],D=[];yi(r,t,a,o,.5,A),yi(e,i,n,s,.5,D),Qw(A[0],D[0],A[1],D[1],A[2],D[2],A[3],D[3],l,u),Qw(A[4],D[4],A[5],D[5],A[6],D[6],A[7],D[7],l,u)}function ZU(r,e){var t=Cg(r),i=[];e=e||1;for(var a=0;a0)for(var u=0;uMath.abs(u),p=KU([l,u],f?0:1,e),c=(f?s:u)/p.length,h=0;ha,o=KU([i,a],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",f=n?"y":"x",p=r[s]/o.length,c=0;c1?null:new bt(d*l+r,d*u+e)}function NQ(r,e,t){var i=new bt;bt.sub(i,t,e),i.normalize();var a=new bt;bt.sub(a,r,e);var n=a.dot(i);return n}function pf(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function OQ(r,e,t){for(var i=r.length,a=[],n=0;no?(u.x=f.x=s+n/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+n),OQ(e,u,f)}function Ag(r,e,t,i){if(t===1)i.push(e);else{var a=Math.floor(t/2),n=r(e);Ag(r,n[0],a,i),Ag(r,n[1],t-a,i)}return i}function kQ(r,e){for(var t=[],i=0;i0)for(var b=i/t,S=-i/2;S<=i/2;S+=b){for(var T=Math.sin(S),C=Math.cos(S),A=0,x=0;x0;u/=2){var f=0,p=0;(r&u)>0&&(f=1),(e&u)>0&&(p=1),s+=u*u*(3*f^p),p===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Mg(r){var e=1/0,t=1/0,i=-1/0,a=-1/0,n=k(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),p=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(p,t),i=Math.max(f,i),a=Math.max(p,a),[f,p]}),o=k(n,function(s,l){return{cp:s,z:YQ(s[0],s[1],e,t,i,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function iB(r){return QU(r.path,r.count)}function $w(){return{fromIndividuals:[],toIndividuals:[],count:0}}function aB(r,e,t){var i=[];function a(b){for(var S=0;S=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[a].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var ZQ={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),i=0;i0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;oB(r)&&(u=r,f=e),oB(e)&&(u=e,f=r);function p(g,y,x,_,b){var S=g.many,T=g.one;if(S.length===1&&!b){var C=y?S[0]:T,A=y?T:S[0];if(Uc(C))p({many:[C],one:A},!0,x,_,!0);else{var D=s?q({delay:s(x,_)},l):l;Ig(C,A,D),n(C,A,C,A,D)}}else for(var M=q({dividePath:ZQ[t],individualDelay:s&&function(U,V,B,Z){return s(U+x,_)}},l),I=y?aB(S,T,M):nB(T,S,M),L=I.fromIndividuals,P=I.toIndividuals,z=L.length,R=0;Re.length,h=u?sB(f,u):sB(c?e:r,[c?r:e]),v=0,d=0;ddB))for(var n=i.getIndices(),o=0;o0&&S.group.traverse(function(C){C instanceof it&&!C.animators.length&&C.animateFrom({style:{opacity:0}},T)})})}function cB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function hB(r){return O(r)?r.sort().join(","):r}function Ao(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function JQ(r,e){var t=Y(),i=Y(),a=Y();w(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],f=cB(o),p=hB(f);i.set(p,{dataGroupId:l,data:u}),O(f)&&w(f,function(c){a.set(c,{key:p,dataGroupId:l,data:u})})});function n(o){t.get(o)&&uA("Duplicated seriesKey in universalTransition "+o)}return w(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=cB(o),f=hB(u),p=i.get(f);if(p)t.set(f,{oldSeries:[{dataGroupId:p.dataGroupId,divide:Ao(p.data),data:p.data}],newSeries:[{dataGroupId:s,divide:Ao(l),data:l}]});else if(O(u)){var c=[];w(u,function(d){var m=i.get(d);m.data&&c.push({dataGroupId:m.dataGroupId,divide:Ao(m.data),data:m.data})}),c.length&&t.set(f,{oldSeries:c,newSeries:[{dataGroupId:s,data:l,divide:Ao(l)}]})}else{var h=a.get(u);if(h){var v=t.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ao(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({dataGroupId:s,data:l,divide:Ao(l)})}}}}),t}function vB(r,e){for(var t=0;t=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ao(e.oldData[s]),groupIdDim:o.dimension})}),w(Nt(r.to),function(o){var s=vB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ao(l),groupIdDim:o.dimension})}}),a.length>0&&n.length>0&&mB(a,n,i)}function eT(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){w(Nt(i.seriesTransition),function(a){w(Nt(a.to),function(n){for(var o=i.updatedSeries,s=0;s{let e=class e{constructor(){this.chartInstance=null,this.options={},this.defaultTooltipOptions={tooltip:{trigger:"item",borderColor:"#00eff8",backgroundColor:"#12192C",padding:[6,14,6,14],textStyle:{fontSize:14,color:"#74FAFB"},position:"top",axisPointer:{type:"shadow"}},series:[{type:"gauge",startAngle:180,endAngle:0,center:["50%","75%"],radius:"90%",min:0,max:1,splitNumber:8,axisLine:{lineStyle:{width:6,color:[[.25,"#74FAFB"],[.5,"#74FAFB"],[.75,"#74FAFB"],[1,"#74FAFB"]]}},pointer:{icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"12%",width:20,offsetCenter:[0,"-60%"],itemStyle:{color:"auto"}},axisTick:{length:12,lineStyle:{color:"auto",width:2}},splitLine:{length:20,lineStyle:{color:"auto",width:5}},axisLabel:{color:"#464646",fontSize:20,distance:-60,rotate:"tangential",formatter:function(i){return""}},title:{offsetCenter:[0,"-10%"],fontSize:20},tooltip:{trigger:"item",borderColor:"#00eff8",backgroundColor:"#12192C",padding:[6,14,6,14],textStyle:{fontSize:14,color:"#74FAFB"},position:"top",axisPointer:{type:"shadow"}},detail:{fontSize:30,offsetCenter:[0,"-5%"],valueAnimation:!0,formatter:function(i){return Math.round(i*100)+""},color:"inherit"}}]}}ngOnInit(){console.log("ChartComponentComponent ngOnInit"),this.initEcharts()}ngOnChanges(i){i.options&&!i.options.isFirstChange()&&(console.log("ChartComponentComponent ngOnChanges"),this.updateChartOptions())}ngOnDestroy(){this.chartInstance&&(console.log("ChartComponentComponent ngOnInit"),this.chartInstance.dispose())}initEcharts(){let i=this.chartContainer.nativeElement;this.chartInstance=Ox(i,"dark");let a=Fc(Fc({},this.defaultTooltipOptions),this.options);this.chartInstance.setOption(a)}updateChartOptions(){this.chartInstance&&this.chartInstance.setOption(this.options)}};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["app-chart-component"]],viewQuery:function(a,n){if(a&1&&Gc(e$,7),a&2){let o;Ui(o=Bi())&&(n.chartContainer=o.first)}},inputs:{options:"options"},standalone:!0,features:[vf,Ae],decls:2,vars:0,consts:[[2,"width","100%","height","100%"],["chart",""]],template:function(a,n){a&1&&Ce(0,"div",0,1)}});let r=e;return r})();var Do=["*"];function r$(r,e){if(r&1&&Ce(0,"nz-avatar",3),r&2){let t=Jt();mt("nzSrc",t.nzSrc)}}function i$(r,e){r&1&&ze(0,0,["*ngIf","!nzSrc"])}function a$(r,e){if(r&1&&Ce(0,"nz-list-item-meta-avatar",3),r&2){let t=Jt();mt("nzSrc",t.avatarStr)}}function n$(r,e){if(r&1&&(Ft(0,"nz-list-item-meta-avatar"),wT(1,4),Wt()),r&2){let t=Jt();wt(),mt("ngTemplateOutlet",t.avatarTpl)}}function o$(r,e){if(r&1&&(ca(0),Re(1),ha()),r&2){let t=Jt(3);wt(),bn(t.nzTitle)}}function s$(r,e){if(r&1&&(Ft(0,"nz-list-item-meta-title"),qt(1,o$,2,1,"ng-container",6),Wt()),r&2){let t=Jt(2);wt(),mt("nzStringTemplateOutlet",t.nzTitle)}}function l$(r,e){if(r&1&&(ca(0),Re(1),ha()),r&2){let t=Jt(3);wt(),bn(t.nzDescription)}}function u$(r,e){if(r&1&&(Ft(0,"nz-list-item-meta-description"),qt(1,l$,2,1,"ng-container",6),Wt()),r&2){let t=Jt(2);wt(),mt("nzStringTemplateOutlet",t.nzDescription)}}function f$(r,e){if(r&1&&(Ft(0,"div",5),qt(1,s$,2,1,"nz-list-item-meta-title",1)(2,u$,2,1,"nz-list-item-meta-description",1),ze(3,1),ze(4,2),Wt()),r&2){let t=Jt();wt(),mt("ngIf",t.nzTitle&&!t.titleComponent),wt(),mt("ngIf",t.nzDescription&&!t.descriptionComponent)}}var p$=[[["nz-list-item-meta-avatar"]],[["nz-list-item-meta-title"]],[["nz-list-item-meta-description"]]],c$=["nz-list-item-meta-avatar","nz-list-item-meta-title","nz-list-item-meta-description"];function h$(r,e){r&1&&ze(0)}var v$=["nz-list-item-actions",""];function d$(r,e){}function m$(r,e){r&1&&Ce(0,"em",3)}function g$(r,e){if(r&1&&(Ft(0,"li"),qt(1,d$,0,0,"ng-template",1)(2,m$,1,0,"em",2),Wt()),r&2){let t=e.$implicit,i=e.last;wt(),mt("ngTemplateOutlet",t),wt(),mt("ngIf",!i)}}function y$(r,e){}var wB=(r,e)=>({$implicit:r,index:e});function x$(r,e){if(r&1&&(ca(0),qt(1,y$,0,0,"ng-template",9),ha()),r&2){let t=e.$implicit,i=e.index,a=Jt(2);wt(),mt("ngTemplateOutlet",a.nzRenderItem)("ngTemplateOutletContext",Gg(2,wB,t,i))}}function _$(r,e){if(r&1&&(Ft(0,"div",7),qt(1,x$,2,5,"ng-container",8),ze(2,4),Wt()),r&2){let t=Jt();wt(),mt("ngForOf",t.nzDataSource)}}function S$(r,e){if(r&1&&(ca(0),Re(1),ha()),r&2){let t=Jt(2);wt(),bn(t.nzHeader)}}function b$(r,e){if(r&1&&(Ft(0,"nz-list-header"),qt(1,S$,2,1,"ng-container",10),Wt()),r&2){let t=Jt();wt(),mt("nzStringTemplateOutlet",t.nzHeader)}}function w$(r,e){r&1&&Ce(0,"div"),r&2&&ST("min-height",53,"px")}function T$(r,e){}function C$(r,e){if(r&1&&(Ft(0,"div",13),qt(1,T$,0,0,"ng-template",9),Wt()),r&2){let t=e.$implicit,i=e.index,a=Jt(2);mt("nzSpan",a.nzGrid.span||null)("nzXs",a.nzGrid.xs||null)("nzSm",a.nzGrid.sm||null)("nzMd",a.nzGrid.md||null)("nzLg",a.nzGrid.lg||null)("nzXl",a.nzGrid.xl||null)("nzXXl",a.nzGrid.xxl||null),wt(),mt("ngTemplateOutlet",a.nzRenderItem)("ngTemplateOutletContext",Gg(9,wB,t,i))}}function A$(r,e){if(r&1&&(Ft(0,"div",11),qt(1,C$,2,12,"div",12),Wt()),r&2){let t=Jt();mt("nzGutter",t.nzGrid.gutter||null),wt(),mt("ngForOf",t.nzDataSource)}}function D$(r,e){if(r&1&&Ce(0,"nz-list-empty",14),r&2){let t=Jt();mt("nzNoResult",t.nzNoResult)}}function M$(r,e){if(r&1&&(ca(0),Re(1),ha()),r&2){let t=Jt(2);wt(),bn(t.nzFooter)}}function I$(r,e){if(r&1&&(Ft(0,"nz-list-footer"),qt(1,M$,2,1,"ng-container",10),Wt()),r&2){let t=Jt();wt(),mt("nzStringTemplateOutlet",t.nzFooter)}}function L$(r,e){}function E$(r,e){}function P$(r,e){if(r&1&&(Ft(0,"nz-list-pagination"),qt(1,E$,0,0,"ng-template",6),Wt()),r&2){let t=Jt();wt(),mt("ngTemplateOutlet",t.nzPagination)}}var z$=[[["nz-list-header"]],[["nz-list-footer"],["","nz-list-footer",""]],[["nz-list-load-more"],["","nz-list-load-more",""]],[["nz-list-pagination"],["","nz-list-pagination",""]],"*"],R$=["nz-list-header","nz-list-footer, [nz-list-footer]","nz-list-load-more, [nz-list-load-more]","nz-list-pagination, [nz-list-pagination]","*"];function N$(r,e){if(r&1&&Ce(0,"ul",6),r&2){let t=Jt(2);mt("nzActions",t.nzActions)}}function O$(r,e){if(r&1&&(qt(0,N$,1,1,"ul",5),ze(1)),r&2){let t=Jt();mt("ngIf",t.nzActions&&t.nzActions.length>0)}}function k$(r,e){if(r&1&&(ca(0),Re(1),ha()),r&2){let t=Jt(3);wt(),bn(t.nzContent)}}function V$(r,e){if(r&1&&(ca(0),qt(1,k$,2,1,"ng-container",8),ha()),r&2){let t=Jt(2);wt(),mt("nzStringTemplateOutlet",t.nzContent)}}function U$(r,e){if(r&1&&(ze(0,1),ze(1,2),qt(2,V$,2,1,"ng-container",7)),r&2){let t=Jt();wt(2),mt("ngIf",t.nzContent)}}function B$(r,e){r&1&&ze(0,3)}function F$(r,e){}function G$(r,e){}function H$(r,e){}function W$(r,e){}function Y$(r,e){if(r&1&&qt(0,F$,0,0,"ng-template",9)(1,G$,0,0,"ng-template",9)(2,H$,0,0,"ng-template",9)(3,W$,0,0,"ng-template",9),r&2){let t=Jt(),i=Wa(3),a=Wa(5),n=Wa(1);mt("ngTemplateOutlet",i),wt(),mt("ngTemplateOutlet",t.nzExtra),wt(),mt("ngTemplateOutlet",a),wt(),mt("ngTemplateOutlet",n)}}function Z$(r,e){}function X$(r,e){}function q$(r,e){}function j$(r,e){if(r&1&&(Ft(0,"nz-list-item-extra"),qt(1,q$,0,0,"ng-template",9),Wt()),r&2){let t=Jt(2);wt(),mt("ngTemplateOutlet",t.nzExtra)}}function K$(r,e){}function Q$(r,e){if(r&1&&(ca(0),Ft(1,"div",10),qt(2,Z$,0,0,"ng-template",9)(3,X$,0,0,"ng-template",9),Wt(),qt(4,j$,2,1,"nz-list-item-extra",7)(5,K$,0,0,"ng-template",9),ha()),r&2){let t=Jt(),i=Wa(3),a=Wa(1),n=Wa(5);wt(2),mt("ngTemplateOutlet",i),wt(),mt("ngTemplateOutlet",a),wt(),mt("ngIf",t.nzExtra),wt(),mt("ngTemplateOutlet",n)}}var $$=[[["nz-list-item-actions"],["","nz-list-item-actions",""]],[["nz-list-item-meta"],["","nz-list-item-meta",""]],"*",[["nz-list-item-extra"],["","nz-list-item-extra",""]]],J$=["nz-list-item-actions, [nz-list-item-actions]","nz-list-item-meta, [nz-list-item-meta]","*","nz-list-item-extra, [nz-list-item-extra]"],yB=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-item-meta-title"]],exportAs:["nzListItemMetaTitle"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:2,vars:0,consts:[[1,"ant-list-item-meta-title"]],template:function(a,n){a&1&&(hi(),Ft(0,"h4",0),ze(1),Wt())},encapsulation:2,changeDetection:0});let r=e;return r})(),xB=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-item-meta-description"]],exportAs:["nzListItemMetaDescription"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:2,vars:0,consts:[[1,"ant-list-item-meta-description"]],template:function(a,n){a&1&&(hi(),Ft(0,"div",0),ze(1),Wt())},encapsulation:2,changeDetection:0});let r=e;return r})(),TB=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-item-meta-avatar"]],inputs:{nzSrc:"nzSrc"},exportAs:["nzListItemMetaAvatar"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:3,vars:2,consts:[[1,"ant-list-item-meta-avatar"],[3,"nzSrc",4,"ngIf"],[4,"ngIf"],[3,"nzSrc"]],template:function(a,n){a&1&&(hi(),Ft(0,"div",0),qt(1,r$,1,1,"nz-avatar",1)(2,i$,1,0,"ng-content",2),Wt()),a&2&&(wt(),mt("ngIf",n.nzSrc),wt(),mt("ngIf",!n.nzSrc))},dependencies:[Cn,RT,va],encapsulation:2,changeDetection:0});let r=e;return r})(),tJ=(()=>{let e=class e{set nzAvatar(i){i instanceof Fg?(this.avatarStr="",this.avatarTpl=i):this.avatarStr=i}constructor(i){this.elementRef=i,this.avatarStr=""}};e.\u0275fac=function(a){return new(a||e)($r(xT))},e.\u0275cmp=Te({type:e,selectors:[["nz-list-item-meta"],["","nz-list-item-meta",""]],contentQueries:function(a,n,o){if(a&1&&(Sn(o,xB,5),Sn(o,yB,5)),a&2){let s;Ui(s=Bi())&&(n.descriptionComponent=s.first),Ui(s=Bi())&&(n.titleComponent=s.first)}},hostAttrs:[1,"ant-list-item-meta"],inputs:{nzAvatar:"nzAvatar",nzTitle:"nzTitle",nzDescription:"nzDescription"},exportAs:["nzListItemMeta"],standalone:!0,features:[Ae],ngContentSelectors:c$,decls:4,vars:3,consts:[[3,"nzSrc",4,"ngIf"],[4,"ngIf"],["class","ant-list-item-meta-content",4,"ngIf"],[3,"nzSrc"],[3,"ngTemplateOutlet"],[1,"ant-list-item-meta-content"],[4,"nzStringTemplateOutlet"]],template:function(a,n){a&1&&(hi(p$),qt(0,a$,1,1,"nz-list-item-meta-avatar",0)(1,n$,2,1,"nz-list-item-meta-avatar",1),ze(2),qt(3,f$,5,2,"div",2)),a&2&&(mt("ngIf",n.avatarStr),wt(),mt("ngIf",n.avatarTpl),wt(2),mt("ngIf",n.nzTitle||n.nzDescription||n.descriptionComponent||n.titleComponent))},dependencies:[TB,va,mf,yB,Yc,Wc,xB],encapsulation:2,changeDetection:0});let r=e;return r})(),_B=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-item-extra"],["","nz-list-item-extra",""]],hostAttrs:[1,"ant-list-item-extra"],exportAs:["nzListItemExtra"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:1,vars:0,template:function(a,n){a&1&&(hi(),ze(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),eJ=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-item-action"]],viewQuery:function(a,n){if(a&1&&Gc(Fg,5),a&2){let o;Ui(o=Bi())&&(n.templateRef=o.first)}},exportAs:["nzListItemAction"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:1,vars:0,template:function(a,n){a&1&&(hi(),qt(0,h$,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let r=e;return r})(),rJ=(()=>{let e=class e{constructor(i,a,n){this.ngZone=i,this.nzActions=[],this.actions=[],this.inputActionChanges$=new Rg,this.contentChildrenChanges$=pT(()=>this.nzListItemActions?fT(null):this.ngZone.onStable.pipe(hT(1),this.enterZone(),vT(()=>this.nzListItemActions.changes.pipe(dT(this.nzListItemActions))))),cT(this.contentChildrenChanges$,this.inputActionChanges$).pipe(Ng(n)).subscribe(()=>{this.nzActions.length?this.actions=this.nzActions:this.actions=this.nzListItemActions.map(o=>o.templateRef),a.detectChanges()})}ngOnChanges(){this.inputActionChanges$.next(null)}enterZone(){return i=>new lT(a=>i.subscribe({next:n=>this.ngZone.run(()=>a.next(n))}))}};e.\u0275fac=function(a){return new(a||e)($r(_T),$r(Og),$r(qc))},e.\u0275cmp=Te({type:e,selectors:[["ul","nz-list-item-actions",""]],contentQueries:function(a,n,o){if(a&1&&Sn(o,eJ,4),a&2){let s;Ui(s=Bi())&&(n.nzListItemActions=s)}},hostAttrs:[1,"ant-list-item-action"],inputs:{nzActions:"nzActions"},exportAs:["nzListItemActions"],standalone:!0,features:[CT([qc]),vf,Ae],attrs:v$,decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],[3,"ngTemplateOutlet"],["class","ant-list-item-action-split",4,"ngIf"],[1,"ant-list-item-action-split"]],template:function(a,n){a&1&&qt(0,g$,3,2,"li",0),a&2&&mt("ngForOf",n.actions)},dependencies:[df,mf,va],encapsulation:2,changeDetection:0});let r=e;return r})(),CB=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-empty"]],hostAttrs:[1,"ant-list-empty-text"],inputs:{nzNoResult:"nzNoResult"},exportAs:["nzListHeader"],standalone:!0,features:[Ae],decls:1,vars:2,consts:[[3,"nzComponentName","specificContent"]],template:function(a,n){a&1&&Ce(0,"nz-embed-empty",0),a&2&&mt("nzComponentName","list")("specificContent",n.nzNoResult)},dependencies:[PT,ET],encapsulation:2,changeDetection:0});let r=e;return r})(),iJ=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-header"]],hostAttrs:[1,"ant-list-header"],exportAs:["nzListHeader"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:1,vars:0,template:function(a,n){a&1&&(hi(),ze(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),SB=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-footer"]],hostAttrs:[1,"ant-list-footer"],exportAs:["nzListFooter"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:1,vars:0,template:function(a,n){a&1&&(hi(),ze(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),bB=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["nz-list-pagination"]],hostAttrs:[1,"ant-list-pagination"],exportAs:["nzListPagination"],standalone:!0,features:[Ae],ngContentSelectors:Do,decls:1,vars:0,template:function(a,n){a&1&&(hi(),ze(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),aJ=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275dir=yT({type:e,selectors:[["nz-list-load-more"]],exportAs:["nzListLoadMoreDirective"],standalone:!0});let r=e;return r})();var AB=(()=>{let e=class e{get itemLayoutNotify$(){return this.itemLayoutNotifySource.asObservable()}constructor(i){this.directionality=i,this.nzBordered=!1,this.nzGrid="",this.nzItemLayout="horizontal",this.nzRenderItem=null,this.nzLoading=!1,this.nzLoadMore=null,this.nzSize="default",this.nzSplit=!0,this.hasSomethingAfterLastItem=!1,this.dir="ltr",this.itemLayoutNotifySource=new uT(this.nzItemLayout),this.destroy$=new Rg}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(Ng(this.destroy$)).subscribe(i=>{this.dir=i})}getSomethingAfterLastItem(){return!!(this.nzLoadMore||this.nzPagination||this.nzFooter||this.nzListFooterComponent||this.nzListPaginationComponent||this.nzListLoadMoreDirective)}ngOnChanges(i){i.nzItemLayout&&this.itemLayoutNotifySource.next(this.nzItemLayout)}ngOnDestroy(){this.itemLayoutNotifySource.unsubscribe(),this.destroy$.next(),this.destroy$.complete()}ngAfterContentInit(){this.hasSomethingAfterLastItem=this.getSomethingAfterLastItem()}};e.\u0275fac=function(a){return new(a||e)($r(LT,8))},e.\u0275cmp=Te({type:e,selectors:[["nz-list"],["","nz-list",""]],contentQueries:function(a,n,o){if(a&1&&(Sn(o,SB,5),Sn(o,bB,5),Sn(o,aJ,5)),a&2){let s;Ui(s=Bi())&&(n.nzListFooterComponent=s.first),Ui(s=Bi())&&(n.nzListPaginationComponent=s.first),Ui(s=Bi())&&(n.nzListLoadMoreDirective=s.first)}},hostAttrs:[1,"ant-list"],hostVars:16,hostBindings:function(a,n){a&2&&kg("ant-list-rtl",n.dir==="rtl")("ant-list-vertical",n.nzItemLayout==="vertical")("ant-list-lg",n.nzSize==="large")("ant-list-sm",n.nzSize==="small")("ant-list-split",n.nzSplit)("ant-list-bordered",n.nzBordered)("ant-list-loading",n.nzLoading)("ant-list-something-after-last-item",n.hasSomethingAfterLastItem)},inputs:{nzDataSource:"nzDataSource",nzBordered:"nzBordered",nzGrid:"nzGrid",nzHeader:"nzHeader",nzFooter:"nzFooter",nzItemLayout:"nzItemLayout",nzRenderItem:"nzRenderItem",nzLoading:"nzLoading",nzLoadMore:"nzLoadMore",nzPagination:"nzPagination",nzSize:"nzSize",nzSplit:"nzSplit",nzNoResult:"nzNoResult"},exportAs:["nzList"],standalone:!0,features:[vf,Ae],ngContentSelectors:R$,decls:15,vars:9,consts:[["itemsTpl",""],[4,"ngIf"],[3,"nzSpinning"],[3,"min-height",4,"ngIf"],["nz-row","",3,"nzGutter",4,"ngIf","ngIfElse"],[3,"nzNoResult",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"ant-list-items"],[4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"nzStringTemplateOutlet"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzSpan","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl",4,"ngFor","ngForOf"],["nz-col","",3,"nzSpan","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],[3,"nzNoResult"]],template:function(a,n){if(a&1&&(hi(z$),qt(0,_$,3,1,"ng-template",null,0,Zs)(2,b$,2,1,"nz-list-header",1),ze(3),Ft(4,"nz-spin",2),ca(5),qt(6,w$,1,2,"div",3)(7,A$,2,2,"div",4)(8,D$,1,1,"nz-list-empty",5),ha(),Wt(),qt(9,I$,2,1,"nz-list-footer",1),ze(10,1),qt(11,L$,0,0,"ng-template",6),ze(12,2),qt(13,P$,2,1,"nz-list-pagination",1),ze(14,3)),a&2){let o=Wa(1);wt(2),mt("ngIf",n.nzHeader),wt(2),mt("nzSpinning",n.nzLoading),wt(2),mt("ngIf",n.nzLoading&&n.nzDataSource&&n.nzDataSource.length===0),wt(),mt("ngIf",n.nzGrid&&n.nzDataSource)("ngIfElse",o),wt(),mt("ngIf",!n.nzLoading&&n.nzDataSource&&n.nzDataSource.length===0),wt(),mt("ngIf",n.nzFooter),wt(2),mt("ngTemplateOutlet",n.nzLoadMore),wt(2),mt("ngIf",n.nzPagination)}},dependencies:[mf,df,iJ,va,Yc,Wc,wn,zT,Tn,Qc,Kc,CB,SB,bB],encapsulation:2,changeDetection:0});let r=e;return hf([gf()],r.prototype,"nzBordered",void 0),hf([gf()],r.prototype,"nzLoading",void 0),hf([gf()],r.prototype,"nzSplit",void 0),r})(),nJ=(()=>{let e=class e{get isVerticalAndExtra(){return this.itemLayout==="vertical"&&(!!this.listItemExtraDirective||!!this.nzExtra)}constructor(i,a){this.parentComp=i,this.cdr=a,this.nzActions=[],this.nzExtra=null,this.nzNoFlex=!1}ngAfterViewInit(){this.itemLayout$=this.parentComp.itemLayoutNotify$.subscribe(i=>{this.itemLayout=i,this.cdr.detectChanges()})}ngOnDestroy(){this.itemLayout$&&this.itemLayout$.unsubscribe()}};e.\u0275fac=function(a){return new(a||e)($r(AB),$r(Og))},e.\u0275cmp=Te({type:e,selectors:[["nz-list-item"],["","nz-list-item",""]],contentQueries:function(a,n,o){if(a&1&&Sn(o,_B,5),a&2){let s;Ui(s=Bi())&&(n.listItemExtraDirective=s.first)}},hostAttrs:[1,"ant-list-item"],hostVars:2,hostBindings:function(a,n){a&2&&kg("ant-list-item-no-flex",n.nzNoFlex)},inputs:{nzActions:"nzActions",nzContent:"nzContent",nzExtra:"nzExtra",nzNoFlex:"nzNoFlex"},exportAs:["nzListItem"],standalone:!0,features:[Ae],ngContentSelectors:J$,decls:9,vars:2,consts:[["actionsTpl",""],["contentTpl",""],["extraTpl",""],["simpleTpl",""],[4,"ngIf","ngIfElse"],["nz-list-item-actions","",3,"nzActions",4,"ngIf"],["nz-list-item-actions","",3,"nzActions"],[4,"ngIf"],[4,"nzStringTemplateOutlet"],[3,"ngTemplateOutlet"],[1,"ant-list-item-main"]],template:function(a,n){if(a&1&&(hi($$),qt(0,O$,2,1,"ng-template",null,0,Zs)(2,U$,3,1,"ng-template",null,1,Zs)(4,B$,1,0,"ng-template",null,2,Zs)(6,Y$,4,4,"ng-template",null,3,Zs)(8,Q$,6,4,"ng-container",4)),a&2){let o=Wa(7);wt(8),mt("ngIf",n.isVerticalAndExtra)("ngIfElse",o)}},dependencies:[rJ,va,Yc,Wc,mf,_B],encapsulation:2,changeDetection:0});let r=e;return hf([gf()],r.prototype,"nzNoFlex",void 0),r})();var Pg=(()=>{let e=class e{};e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=gT({type:e}),e.\u0275inj=mT({imports:[AB,CB,nJ,tJ,TB]});let r=e;return r})();var lJ=r=>({margin:r,width:"100%",height:"16rem"});function uJ(r,e){if(r&1&&Ce(0,"app-chart-component",28),r&2){let t=Jt(2).$implicit,i=Jt();bT(AT(3,lJ,"20px "+20/i.chartConfig.rowNumber+"px")),mt("options",t.options)}}function fJ(r,e){if(r&1&&(Ft(0,"div",26),qt(1,uJ,1,5,"app-chart-component",27),Wt()),r&2){let t=Jt().$implicit,i=Jt();mt("nzSpan",24/i.chartConfig.rowNumber),wt(),mt("ngIf",t.checked)}}function pJ(r,e){if(r&1&&qt(0,fJ,2,2,"div",25),r&2){let t=e.$implicit;mt("ngIf",t.checked)}}function cJ(r,e){if(r&1&&(Ft(0,"div",4)(1,"div",29),Ce(2,"app-chart-component",30),Wt()()),r&2){let t=e.$implicit;wt(2),mt("options",t)}}var rF=(()=>{let e=class e{handleCheckedItems(i){console.log("\u5F53\u524D\u9009\u4E2D\u7684\u9879\u76EE:",i)}constructor(i){this._mqttService=i,this.http=Ys(Xc),this.modal=Ys(Zc),this.chartConfig={rowNumber:1,optionsCheckList:[{label:"\u5168\u6C34",options:{},checked:!0},{label:"\u70ED\u503C",options:{},checked:!0},{label:"\u5168\u786B",options:{},checked:!1},{label:"\u5185\u6C34",options:{},checked:!1},{label:"\u7070\u5206",options:{},checked:!1},{label:"\u6325\u53D1\u5206",options:{},checked:!1}],optionBottomList:[{}],optionsList:[{label:"\u5168\u6C34",options:{},checked:!0},{label:"\u70ED\u503C",options:{},checked:!0}],tableList:[{coldef:[{headerName:"\u65F6\u95F4",field:"rwmc",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u7CFB\u7EDF/\u8BBE\u5907",field:"rwms",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u64CD\u4F5C\u63CF\u8FF0",field:"kssj",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u64CD\u4F5C\u4EBA\u5458",field:"jhwcsj",unSortIcon:!0,minWidth:void 0,flex:1}],rowData:[]},{coldef:[{headerName:"\u5E8F\u53F7",field:"rwmc",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u65F6\u95F4",field:"kssj",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",field:"rwms",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u7B49\u7EA7",field:"dqzt",unSortIcon:!0,minWidth:void 0,flex:1}],rowData:[]}]},this.chart_options={},this.chart_options0={},this.chart_options1={},this.chart_options2={},this.chart_options3={},this.chart_options4={},this.rowData=[],this.colDefs1=[{headerName:"\u65F6\u95F4",field:"rwmc",flex:1},{headerName:"\u7CFB\u7EDF/\u8BBE\u5907",field:"rwms",flex:1},{headerName:"\u64CD\u4F5C\u63CF\u8FF0",field:"kssj",flex:1},{headerName:"\u64CD\u4F5C\u4EBA\u5458",field:"jhwcsj",flex:1}],this.colDefs2=[{headerName:"\u5E8F\u53F7",field:"rwmc",flex:1},{headerName:"\u65F6\u95F4",field:"kssj",flex:2},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",field:"rwms",flex:1},{headerName:"\u7B49\u7EA7",field:"dqzt",flex:1.5}],this.subscription=this._mqttService.observe("s1").subscribe(a=>{let n=JSON.parse(a.payload.toString());console.log("Received message as object: ",n.msg),this.chart_options0=n.msg})}ngOnInit(){this.getServerConfig();for(var i=1;i<30;i++)this.rowData.push({rwmc:"\u4EFB\u52A1"+i,rwms:"\u4EFB\u52A1\u63CF\u8FF0"+i,kssj:"2024-1-"+i+" 13:38:"+i*11,jhwcsj:"2024-1-"+i+" 13:38:"+i*10,sfcq:"\u5426",dqzt:"\u6B63\u5E38",dqjd:"\u8282\u70B9"+i,sjwcsj:"2024-1-"+i+" 13:38:"+i*27,bjmc:"\u62A5\u8B665",bjms:"\u62A5\u8B66\u63CF\u8FF05",bjsj:"2024-1-"+i+" 13:38:"+i*12,gzyy:"-",clff:"-",tzsj:"2024-1-"+i+" 13:38:"+i*19,zycd:"\u4E00\u822C",tzmc:"\u7CFB\u7EDF\u63D0\u793A",tznr:"\u8D26\u6237\u767B\u5F55",fj:"-",cz:"\u64CD\u4F5C"});for(var a=[],n=[],o=[],s=100,i=0;i{this.chartConfig.optionsCheckList[0].options=i.data,console.log(i)})}};e.\u0275fac=function(a){return new(a||e)($r(VT))},e.\u0275cmp=Te({type:e,selectors:[["app-data-v-s1"]],standalone:!0,features:[Ae],decls:56,vars:13,consts:[["nz-row","",1,"s1-container",3,"nzGutter"],["nz-col","","nzSpan","8"],["title","\u7CFB\u7EDF\u72B6\u6001"],["nz-row","",2,"justify-content","center","align-items","center"],["nz-col","","nzSpan","12"],[1,"centered-element"],[2,"width","26rem","height","11rem",3,"options"],[1,"sys-status-title"],["title","\u7CFB\u7EDF\u64CD\u4F5C\u8BB0\u5F55",2,"margin-top","1rem"],[1,"ag-theme-datav",3,"rowData","columnDefs"],["title","\u7CFB\u7EDF\u62A5\u8B66\u4FE1\u606F",2,"margin-top","1rem"],["title","",2,"margin-top","1rem"],[1,"progress-container"],[1,"status-text"],[2,"width","100%",3,"nzPercent","nzStrokeColor"],[1,"status-ext-text"],[1,"progress-container","mt-sm"],["title",""],[2,"height","34.6rem"],["src","assets/dashboard/dashboard_ws_demo1.png",2,"width","100%"],["nz-row","",2,"justify-content","center","align-items","center","margin-top","0.5rem"],["nz-col","","nzSpan","12",1,"sys-status-title"],["title","\u5316\u9A8C\u7ED3\u679C",3,"showSetting","optionsList","onCheckedItemsChange"],["nz-row","",1,"scrollable-container"],["nz-row",""],["nz-col","","class","centered-element",3,"nzSpan",4,"ngIf"],["nz-col","",1,"centered-element",3,"nzSpan"],[3,"options","style",4,"ngIf"],[3,"options"],[1,"centered-element",2,"margin","2px"],[2,"width","26rem","height","11rem","margin-left","0.4rem",3,"options"],["nz-col","","class","centered-element",3,"nzSpan"]],template:function(a,n){a&1&&(Ft(0,"div",0)(1,"div",1)(2,"data-v-card",2)(3,"div",3)(4,"div",4)(5,"div",5),Ce(6,"app-chart-component",6),Wt(),Ft(7,"div",7),Re(8,"\u7CFB\u7EDF\u5065\u5EB7\u5EA6"),Wt()(),Ft(9,"div",4)(10,"div",5),Ce(11,"app-chart-component",6),Wt(),Ft(12,"div",7),Re(13,"\u8BBE\u5907\u6295\u8FD0\u5EA6"),Wt()()()(),Ft(14,"data-v-card",8),Ce(15,"ag-grid-angular",9),Wt(),Ft(16,"data-v-card",10),Ce(17,"ag-grid-angular",9),Wt(),Ft(18,"data-v-card",11)(19,"div",12)(20,"span",13),Re(21,"\u5316\u9A8C\u6548\u7387\uFF1A"),Wt(),Ce(22,"nz-progress",14),Ft(23,"span",15),Re(24,"\uFF0816/25\uFF09"),Wt()(),Ft(25,"div",16)(26,"span",13),Re(27,"\u5B8C \u6210 \u7387 \uFF1A"),Wt(),Ce(28,"nz-progress",14),Ft(29,"span",15),Re(30,"\uFF0812/20\uFF09"),Wt()()()(),Ft(31,"div",1)(32,"data-v-card",17)(33,"div",18),Ce(34,"img",19),Ft(35,"div",20)(36,"div",21),Re(37," \u673A\u5668\u4EBA "),Wt(),Ft(38,"div",21),Re(39," \u5168\u786B\u4EEA "),Wt(),Ft(40,"div",21),Re(41," \u5168\u6C34\u5206\u6790\u4EEA "),Wt(),Ft(42,"div",21),Re(43," \u6325\u53D1\u5206\u4EEA "),Wt(),Ft(44,"div",21),Re(45," \u91CF\u70ED\u4EEA "),Wt(),Ft(46,"div",21),Re(47," \u8C08\u60C5\u6C2E\u5143\u7D20 "),Wt()()()()(),Ft(48,"div",1)(49,"data-v-card",22),TT("onCheckedItemsChange",function(s){return n.handleCheckedItems(s)}),Ft(50,"div",23),Ug(51,pJ,1,1,"div",31,Vg),Wt(),Ft(53,"div",24),Ug(54,cJ,3,1,"div",4,Vg),Wt()()()()),a&2&&(mt("nzGutter",16),wt(6),mt("options",n.chart_options),wt(5),mt("options",n.chart_options0),wt(4),mt("rowData",n.rowData)("columnDefs",n.colDefs1),wt(2),mt("rowData",n.rowData)("columnDefs",n.colDefs2),wt(5),mt("nzPercent",64)("nzStrokeColor","#74FAFB"),wt(6),mt("nzPercent",60)("nzStrokeColor","#74FAFB"),wt(21),mt("showSetting",!0)("optionsList",n.chartConfig.optionsCheckList),wt(2),Bg(n.chartConfig.optionsCheckList),wt(3),Bg(n.chartConfig.optionBottomList))},dependencies:[Hc,va,jc,bl,NT,OT,kT,Pg,$s,Js,ml,fl,yl,xl,gl,vl,Qs,sl,ul,wl,hl,pl,Qc,Kc,Tn,qs,nl,ol,_l,il,Cn,cl,rl,ll,al,Sl,Ks,js,dl,el,Xs,tl,wn,gB],styles:[".dashboard-container[_ngcontent-%COMP%]{width:20rem;height:10rem;margin-top:-3rem;margin-bottom:-2rem}.sys-status-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#94ddf3;text-align:center}.ag-theme-datav[_ngcontent-%COMP%]{--ag-border-color: #74FAFB;--ag-foreground-color: #74FAFB;--ag-background-color: #0A1632;--ag-header-foreground-color: #74FAFB;--ag-header-background-color: #0A1632;--ag-odd-row-background-color: #0A1632;--ag-header-column-resize-handle-color: #7e2e84;--ag-font-size: 17px;--ag-font-family: monospace;height:5rem}.centered-element[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%}.status-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem}.status-circle[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:50%}.status-circle.red[_ngcontent-%COMP%]{background-color:red}.status-circle.green[_ngcontent-%COMP%]{background-color:green}.progress-container[_ngcontent-%COMP%]{display:flex;color:#fff}.progress-container[_ngcontent-%COMP%] .status-text[_ngcontent-%COMP%]{width:8rem;margin-left:6px;font-size:16px;font-weight:600;color:#74fafb}.progress-container[_ngcontent-%COMP%] .status-ext-text[_ngcontent-%COMP%]{margin-top:3px;font-size:12px}.progress-display[_ngcontent-%COMP%]{color:#fff;text-align:right}.statistic-item-container[_ngcontent-%COMP%]{display:flex;padding:1rem 0;color:#fff}.white-color-theme[_ngcontent-%COMP%]{color:#74fafb}.scrollable-container[_ngcontent-%COMP%]{scrollbar-color:auto;overflow-y:auto;width:100%;height:20rem} ::-webkit-scrollbar{width:10px} ::-webkit-scrollbar-track{background-color:#0a1632} ::-webkit-scrollbar-thumb{background-color:#74fafb;border-radius:2px} ::-webkit-scrollbar-thumb:hover{background-color:#74fafb}"]});let r=e;return r})();function hJ(r,e){if(r&1&&(Ft(0,"li")(1,"a",2),Re(2),Wt()()),r&2){let t=e.$implicit;wt(),mt("routerLink",t.link),wt(),bn(t.text)}}function vJ(r,e){if(r&1&&(Ft(0,"div")(1,"ul"),qt(2,hJ,3,2,"li",1),Wt()()),r&2){let t=Jt();wt(2),mt("ngForOf",t.children)}}var iF=(()=>{let e=class e{constructor(i,a){this.route=i,this.router=a,this.menu=null,this.children=null}ngOnInit(){let i=this.router.getCurrentNavigation();i?.extras.state&&(this.menu=i.extras.state.menu,this.children=this.menu?.children||null,console.log("\u7A7F\u5E26\u8FC7\u6765\u7684\u83DC\u5355\u53C2\u6570"),console.log(this.menu),console.log(this.children))}navigateToChild(i){i.link&&this.router.navigateByUrl(i.link)}};e.\u0275fac=function(a){return new(a||e)($r(DT),$r(MT))},e.\u0275cmp=Te({type:e,selectors:[["app-data-v-s1"]],standalone:!0,features:[Ae],decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"routerLink"]],template:function(a,n){a&1&&qt(0,vJ,3,1,"div",0),a&2&&mt("ngIf",n.children&&n.children.length)},dependencies:[Hc,df,va,jc,bl,Pg,$s,Js,IT,ml,fl,yl,xl,gl,vl,Qs,sl,ul,wl,hl,pl,Tn,qs,nl,ol,_l,il,Cn,cl,rl,ll,al,Sl,Ks,js,dl,el,Xs,tl,wn],styles:[".dashboard-container[_ngcontent-%COMP%]{width:20rem;height:10rem;margin-top:-3rem;margin-bottom:-2rem}.sys-status-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#94ddf3;text-align:center}.ag-theme-datav[_ngcontent-%COMP%]{--ag-border-color: #74FAFB;--ag-foreground-color: #74FAFB;--ag-background-color: #0A1632;--ag-header-foreground-color: #74FAFB;--ag-header-background-color: #0A1632;--ag-odd-row-background-color: #0A1632;--ag-header-column-resize-handle-color: #7e2e84;--ag-font-size: 17px;--ag-font-family: monospace;height:5rem}.scrollable-container[_ngcontent-%COMP%]{overflow-y:auto;width:100%;height:20rem}.centered-element[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%}.status-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem}.status-circle[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:50%}.status-circle.red[_ngcontent-%COMP%]{background-color:red}.status-circle.green[_ngcontent-%COMP%]{background-color:green}.progress-container[_ngcontent-%COMP%]{display:flex;color:#fff}.progress-container[_ngcontent-%COMP%] .status-text[_ngcontent-%COMP%]{width:8rem;margin-left:6px;font-size:16px;font-weight:600;color:#74fafb}.progress-container[_ngcontent-%COMP%] .status-ext-text[_ngcontent-%COMP%]{margin-top:3px;font-size:12px}.progress-display[_ngcontent-%COMP%]{color:#fff;text-align:right}.statistic-item-container[_ngcontent-%COMP%]{display:flex;padding:1rem 0;color:#fff}.white-color-theme[_ngcontent-%COMP%]{color:#74fafb}"]});let r=e;return r})();var aF=(()=>{let e=class e{constructor(){this.http=Ys(Xc),this.modal=Ys(Zc)}ngOnInit(){}};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=Te({type:e,selectors:[["app-data-v-threejs"]],standalone:!0,features:[Ae],decls:1,vars:0,consts:[["src","http://112.33.111.160:8083/","width","100%","height","650px",2,"border","0"]],template:function(a,n){a&1&&Ce(0,"iframe",0)},dependencies:[$s,Js,ml,fl,yl,xl,gl,vl,Qs,sl,ul,wl,hl,pl,Tn,qs,nl,ol,_l,bl,il,Cn,cl,rl,ll,al,Sl,Ks,js,dl,el,Xs,tl,wn]});let r=e;return r})();var tGt=[{path:"s1/:id",component:rF,data:{menu:null}},{path:"second1/:id",component:iF,data:{menu:null}},{path:"threejs/:id",component:aF}];export{tGt as routes}; diff --git a/dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js b/dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js new file mode 100644 index 0000000..5efab61 --- /dev/null +++ b/dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js @@ -0,0 +1 @@ +import{a as fe,e as he,j as Te}from"./chunk-HCPW2OGS.js";import{b as Ie}from"./chunk-2TNVIQ4O.js";import{$a as re,A as Ce,Aa as G,Ba as oe,C as _e,Ca as $,Da as q,Ea as j,Fa as W,Oa as ye,Pa as Ne,Sa as xe,Ta as Ee,Y as Se,Z as Fe,_ as be,ab as ne,bb as Me,cb as ke,d as ge,db as we,eb as De,fb as Be,gb as Ae,h as D,i as d,j as B,k as A,l as ze,la as O,lb as Pe,m as ve,na as U,o as P,oa as V,p as T,q as I,t as ie,v as R,za as L}from"./chunk-OOUNO2UZ.js";import{a as ee,b as w,c as te}from"./chunk-4FFPI7ZP.js";import{Db as S,Eb as u,Gb as K,Ge as de,He as F,Ib as X,Ie as b,Jb as C,Jc as M,Ka as r,Kb as ce,Kc as Q,Ke as y,Le as N,Ma as Y,Sb as _,Ta as f,V as H,Va as l,_a as ue,a as se,bb as h,gb as n,hb as s,ib as c,la as m,na as z,qb as v,rc as J,rf as k,sb as x,xf as Z}from"./chunk-VDRVUQCF.js";var Re=(()=>{let i=class i{constructor(){this.socialService=m(w),this.settingsSrv=m(k),this.type=""}ngOnInit(){this.mockModel()}mockModel(){let t={token:"123456789",name:"cipchk",email:`${this.type}@${this.type}.com`,id:1e4,time:+new Date};this.settingsSrv.setUser(se(se({},this.settingsSrv.user),t)),this.socialService.callback(t)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["app-callback"]],inputs:{type:"type"},standalone:!0,features:[X([w]),C],decls:0,vars:0,template:function(o,a){},encapsulation:2});let e=i;return e})();var Ge=(()=>{let i=class i{constructor(){this.tokenService=m(ee),this.settings=m(k),this.router=m(M),this.f=new ze({password:new ve("",{nonNullable:!0,validators:[d.required]})})}get user(){return this.settings.user}submit(){this.f.controls.password.markAsDirty(),this.f.controls.password.updateValueAndValidity(),this.f.valid&&(console.log("Valid!"),console.log(this.f.value),this.tokenService.set({token:"123"}),this.router.navigate(["dashboard"]))}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-lock"]],standalone:!0,features:[C],decls:13,vars:6,consts:[[1,"ant-card","width-lg",2,"margin","0 auto"],[1,"ant-card-body"],[1,"avatar"],["nzIcon","user","nzSize","large",3,"nzSrc"],["nz-form","","role","form",1,"mt-md",3,"formGroup","ngSubmit"],[3,"nzErrorTip"],["nzSuffixIcon","lock"],["type","password","nz-input","","formControlName","password"],["nz-row","","nzType","flex","nzAlign","middle"],["nz-col","",2,"text-align","right",3,"nzOffset","nzSpan"],["nz-button","","nzType","primary",3,"disabled"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-avatar",3),s(),n(4,"form",4),v("ngSubmit",function(){return a.submit()}),n(5,"nz-form-item")(6,"nz-form-control",5)(7,"nz-input-group",6),c(8,"input",7),s()()(),n(9,"div",8)(10,"div",9)(11,"button",10),u(12,"\u9501\u5C4F"),s()()()()()()),o&2&&(r(3),l("nzSrc",a.user.avatar),r(),l("formGroup",a.f),r(2),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(4),l("nzOffset",12)("nzSpan",12),r(),l("disabled",!a.f.valid))},dependencies:[R,P,D,B,A,T,I,ke,Me,W,G,L,q,$,j,oe,N,y,F,b,V,O,U],styles:["[_nghost-%COMP%] .ant-card-body{position:relative;margin-top:80px}[_nghost-%COMP%] .avatar{position:absolute;top:-20px;left:50%;margin-left:-20px}"]});let e=i;return e})();function Xe(e,i){if(e&1&&c(0,"nz-alert",15),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Je(e,i){e&1&&c(0,"img",16)}var $e=(()=>{let i=class i{constructor(){this.router=m(M),this.settingsService=m(k),this.socialService=m(w),this.reuseTabService=m(Ne,{optional:!0}),this.tokenService=m(ee),this.startupSrv=m(he),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({userName:["",[d.required]],password:["",[d.required]],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]],remember:[!0]}),this.error="",this.type=0,this.loading=!1,this.count=0}switch({index:t}){this.type=t}getCaptcha(){let t=this.form.controls.mobile;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.interval$=setInterval(()=>{this.count-=1,this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",this.type===0){let{userName:t,password:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}else{let{mobile:t,captcha:o}=this.form.controls;if(t.markAsDirty(),t.updateValueAndValidity(),o.markAsDirty(),o.updateValueAndValidity(),t.invalid||o.invalid)return}this.loading=!0,this.cdr.detectChanges(),this.http.post("/api/main/login/account",{type:this.type,userName:this.form.value.userName,password:this.form.value.password},null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(t=>{if(t.msg!=="ok"){this.error=t.msg,this.cdr.detectChanges();return}this.reuseTabService?.clear(),this.settingsService.setUser({name:t.user.name,avatar:"./assets/pai.svg",email:t.user.email,staffId:t.staff?.id,organs:t.organ,currentOrgan:t.organ.find(o=>!0)}),this.tokenService.set(t.user),this.startupSrv.load().subscribe(()=>{let o=this.tokenService.referrer.url||"/";o.includes("/passport")&&(o="/"),this.router.navigateByUrl(o)})})}open(t,o="href"){let a="",g="";switch(fe.production?g=`https://ng-alain.github.io/ng-alain/#/passport/callback/${t}`:g=`http://localhost:4200/#/passport/callback/${t}`,t){case"auth0":a=`//cipchk.auth0.com/login?client=8gcNydIDzGBYxzqV0Vm1CX_RXH-wsWo5&redirect_uri=${decodeURIComponent(g)}`;break;case"github":a=`//github.com/login/oauth/authorize?client_id=9d6baae4b04a23fcafa2&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break;case"weibo":a=`https://api.weibo.com/oauth2/authorize?client_id=1239507802&response_type=code&redirect_uri=${decodeURIComponent(g)}`;break}o==="window"?this.socialService.login(a,"/",{type:"window"}).subscribe(E=>{E&&(this.settingsService.setUser(E),this.router.navigateByUrl("/"))}):this.socialService.login(a,"/",{type:"href"})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-login"]],standalone:!0,features:[X([w]),C],decls:21,vars:3,consts:[[1,"login-container"],[1,"head"],["src","./assets/lh-logo.png",1,"logo"],[1,"title"],[1,"login-form"],["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],["nzErrorTip","Please enter user, admin"],["nzSize","large","nzPrefixIcon","user",2,"color","#515151"],["nz-input","","formControlName","userName","placeholder","\u767B\u5F55\u8D26\u6237",2,"color","#515151"],["nzErrorTip","Please enter password, 1q2w3E*"],["nzSize","large","nzPrefixIcon","lock",2,"color","#515151"],["nz-input","","type","password","formControlName","password","placeholder","\u767B\u5F55\u5BC6\u7801",2,"color","#515151"],["nz-button","","type","submit","nzType","primary","nzSize","large","nzBlock","",3,"nzLoading"],["coverTemplate",""],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],["alt","example","src","assets/bg2.jpg",2,"height","100px"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1),c(2,"img",2),n(3,"span",3),u(4,"\u56FD\u5BB6\u7535\u6295\u4E34\u6CB3\u7535\u5382\u5168\u8FC7\u7A0B\u667A\u80FD\u71C3\u6599\u7BA1\u7406\u7CFB\u7EDF"),s()(),n(5,"div",4)(6,"form",5),v("ngSubmit",function(){return a.submit()}),f(7,Xe,1,3,"nz-alert",6),n(8,"nz-form-item")(9,"nz-form-control",7)(10,"nz-input-group",8),c(11,"input",9),s()()(),n(12,"nz-form-item")(13,"nz-form-control",10)(14,"nz-input-group",11),c(15,"input",12),s()()(),n(16,"nz-form-item")(17,"button",13),u(18," \u767B\u5F55 "),s()()()()(),f(19,Je,1,0,"ng-template",null,14,_)),o&2&&(r(6),l("formGroup",a.form),r(),h(7,a.error?7:-1),r(10),l("nzLoading",a.loading))},dependencies:[R,P,D,B,A,T,I,Ce,ye,ne,re,W,G,L,q,$,j,V,O,U,N,y,F,b,_e,de,Pe],styles:["[_nghost-%COMP%]{display:block;width:538px;margin:0 auto}[_nghost-%COMP%] .ant-tabs .ant-tabs-bar{margin-bottom:24px;text-align:center;border-bottom:0}[_nghost-%COMP%] .ant-tabs-tab{font-size:16px;line-height:24px}[_nghost-%COMP%] .ant-input-affix-wrapper .ant-input:not(:first-child){padding-left:4px}[_nghost-%COMP%] .icon{cursor:pointer;margin-left:16px;font-size:24px;color:#0003;vertical-align:middle;transition:color .3s}[_nghost-%COMP%] .icon:hover{color:#1890ff}[_nghost-%COMP%] .other{margin-top:24px;line-height:22px;text-align:left}[_nghost-%COMP%] .other nz-tooltip{vertical-align:middle}[_nghost-%COMP%] .other .register{float:right}[_nghost-%COMP%] .login-container{border-radius:10px;background-image:url(/assets/bg2.jpg);background-size:100%;box-shadow:0 4px 6px #0000001a;padding:10px 0 0;height:300px}[_nghost-%COMP%] .head{margin:0 0 0 20px}[_nghost-%COMP%] .login-form{justify-content:center;padding:30px 120px 0}[_nghost-%COMP%] .header{height:46px;line-height:46px}[_nghost-%COMP%] .header a{text-decoration:none}[_nghost-%COMP%] .logo{height:46px;margin-right:6px}[_nghost-%COMP%] .title{position:relative;font-family:Myriad Pro,Helvetica Neue,Arial,Helvetica,sans-serif;font-size:20px;font-weight:400;color:#515151;vertical-align:middle}[_nghost-%COMP%] .color-515151[_ngcontent-%COMP%]{color:#515151}[data-theme=dark] [_nghost-%COMP%] {display:block;width:538px;margin:0 auto}[data-theme=dark] [_nghost-%COMP%] .icon{color:#fff3}[data-theme=dark] [_nghost-%COMP%] .icon:hover{color:#515151}"],changeDetection:0});let e=i;return e})();function Qe(e,i){if(e&1&&c(0,"nz-alert",23),e&2){let p=x();l("nzType","error")("nzMessage",p.error)("nzShowIcon",!0)}}function Ze(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740\uFF01 ")}function et(e,i){e&1&&u(0," \u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function tt(e,i){if(e&1&&f(0,Ze,1,0)(1,et,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.email?1:-1)}}function it(e,i){e&1&&(n(0,"div",27),u(1,"\u5F3A\u5EA6\uFF1A\u5F3A"),s())}function ot(e,i){e&1&&(n(0,"div",28),u(1,"\u5F3A\u5EA6\uFF1A\u4E2D"),s())}function rt(e,i){e&1&&(n(0,"div",29),u(1,"\u5F3A\u5EA6\uFF1A\u592A\u77ED"),s())}function nt(e,i){if(e&1&&(n(0,"div",24),f(1,it,2,0)(2,ot,2,0)(3,rt,2,0),n(4,"div"),c(5,"nz-progress",25),s(),n(6,"p",26),u(7,"\u8BF7\u81F3\u5C11\u8F93\u5165 6 \u4E2A\u5B57\u7B26\u3002\u8BF7\u4E0D\u8981\u4F7F\u7528\u5BB9\u6613\u88AB\u731C\u5230\u7684\u5BC6\u7801\u3002"),s()()),e&2){let p=x(),t;r(),h(1,(t=p.status)==="ok"?1:t==="pass"?2:3),r(3),ue("progress-",p.status,""),r(),l("nzPercent",p.progress)("nzStatus",p.passwordProgressMap[p.status])("nzStrokeWidth",6)("nzShowInfo",!1)}}function at(e,i){e&1&&u(0," \u8BF7\u786E\u8BA4\u5BC6\u7801\uFF01 ")}function st(e,i){e&1&&u(0," \u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u5339\u914D! ")}function lt(e,i){if(e&1&&f(0,at,1,0)(1,st,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.matchControl?1:-1)}}function pt(e,i){e&1&&(n(0,"nz-select",30),c(1,"nz-option",31)(2,"nz-option",31),s()),e&2&&(r(),l("nzLabel","+86")("nzValue","+86"),r(),l("nzLabel","+87")("nzValue","+87"))}function mt(e,i){e&1&&u(0," \u8BF7\u8F93\u5165\u624B\u673A\u53F7\uFF01 ")}function ut(e,i){e&1&&u(0," \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01 ")}function ct(e,i){if(e&1&&f(0,mt,1,0)(1,ut,1,0),e&2){let p=i.$implicit;h(0,p.errors!=null&&p.errors.required?0:-1),r(),h(1,p.errors!=null&&p.errors.pattern?1:-1)}}var dt=()=>({"width.px":240}),qe=(()=>{let i=class i{constructor(){this.router=m(M),this.http=m(Z),this.cdr=m(Y),this.form=m(ie).nonNullable.group({mail:["",[d.required,d.email]],password:["",[d.required,d.minLength(6),i.checkPassword.bind(this)]],confirm:["",[d.required,d.minLength(6)]],mobilePrefix:["+86"],mobile:["",[d.required,d.pattern(/^1\d{10}$/)]],captcha:["",[d.required]]},{validators:Ie("password","confirm")}),this.error="",this.type=0,this.loading=!1,this.visible=!1,this.status="pool",this.progress=0,this.passwordProgressMap={ok:"success",pass:"normal",pool:"exception"},this.count=0}static checkPassword(t){if(!t)return null;let o=this;o.visible=!!t.value,t.value&&t.value.length>9?o.status="ok":t.value&&t.value.length>5?o.status="pass":o.status="pool",o.visible&&(o.progress=t.value.length*10>100?100:t.value.length*10)}getCaptcha(){let{mobile:t}=this.form.controls;if(t.invalid){t.markAsDirty({onlySelf:!0}),t.updateValueAndValidity({onlySelf:!0});return}this.count=59,this.cdr.detectChanges(),this.interval$=setInterval(()=>{this.count-=1,this.cdr.detectChanges(),this.count<=0&&clearInterval(this.interval$)},1e3)}submit(){if(this.error="",Object.keys(this.form.controls).forEach(o=>{let a=this.form.controls[o];a.markAsDirty(),a.updateValueAndValidity()}),this.form.invalid)return;let t=this.form.value;this.loading=!0,this.cdr.detectChanges(),this.http.post("/register",t,null,{context:new J().set(te,!0)}).pipe(H(()=>{this.loading=!1,this.cdr.detectChanges()})).subscribe(()=>{this.router.navigate(["passport","register-result"],{queryParams:{email:t.mail}})})}ngOnDestroy(){this.interval$&&clearInterval(this.interval$)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register"]],standalone:!0,features:[C],decls:44,vars:19,consts:[["nz-form","","role","form",3,"formGroup","ngSubmit"],["class","mb-lg",3,"nzType","nzMessage","nzShowIcon"],[3,"nzErrorTip"],["nzSize","large","nzAddonBeforeIcon","user"],["nz-input","","formControlName","mail","placeholder","Email"],["mailErrorTip",""],["nzSize","large","nzAddonBeforeIcon","lock","nz-popover","","nzPopoverPlacement","right","nzPopoverTrigger","focus","nzPopoverOverlayClassName","register-password-cdk",3,"nzPopoverVisible","nzPopoverOverlayStyle","nzPopoverContent","nzPopoverVisibleChange"],["nz-input","","type","password","formControlName","password","placeholder","Password"],["pwdCdkTpl",""],["nzSize","large","nzAddonBeforeIcon","lock"],["nz-input","","type","password","formControlName","confirm","placeholder","Confirm Password"],["confirmErrorTip",""],["nzSize","large",3,"nzAddOnBefore"],["addOnBeforeTemplate",""],["formControlName","mobile","nz-input","","placeholder","Phone number"],["mobileErrorTip",""],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzSpan"],["nzSize","large","nzAddonBeforeIcon","mail"],["nz-input","","formControlName","captcha","placeholder","Captcha"],["type","button","nz-button","","nzSize","large","nzBlock","",3,"disabled","nzLoading","click"],["nz-button","","nzType","primary","nzSize","large","type","submit",1,"submit",3,"nzLoading"],["routerLink","/passport/login",1,"login"],[1,"mb-lg",3,"nzType","nzMessage","nzShowIcon"],[2,"padding","4px 0"],[3,"nzPercent","nzStatus","nzStrokeWidth","nzShowInfo"],[1,"mt-sm"],[1,"success"],[1,"warning"],[1,"error"],["formControlName","mobilePrefix",2,"width","100px"],[3,"nzLabel","nzValue"]],template:function(o,a){if(o&1&&(n(0,"h3"),u(1,"\u6CE8\u518C"),s(),n(2,"form",0),v("ngSubmit",function(){return a.submit()}),f(3,Qe,1,3,"nz-alert",1),n(4,"nz-form-item")(5,"nz-form-control",2)(6,"nz-input-group",3),c(7,"input",4),s(),f(8,tt,2,2,"ng-template",null,5,_),s()(),n(10,"nz-form-item")(11,"nz-form-control",2)(12,"nz-input-group",6),v("nzPopoverVisibleChange",function(E){return a.visible=E}),c(13,"input",7),s(),f(14,nt,8,8,"ng-template",null,8,_),s()(),n(16,"nz-form-item")(17,"nz-form-control",2)(18,"nz-input-group",9),c(19,"input",10),s(),f(20,lt,2,2,"ng-template",null,11,_),s()(),n(22,"nz-form-item")(23,"nz-form-control",2)(24,"nz-input-group",12),f(25,pt,3,4,"ng-template",null,13,_),c(27,"input",14),s(),f(28,ct,2,2,"ng-template",null,15,_),s()(),n(30,"nz-form-item")(31,"nz-form-control",2)(32,"div",16)(33,"div",17)(34,"nz-input-group",18),c(35,"input",19),s()(),n(36,"div",17)(37,"button",20),v("click",function(){return a.getCaptcha()}),u(38),s()()()()(),n(39,"nz-form-item")(40,"button",21),u(41," \u6CE8\u518C "),s(),n(42,"a",22),u(43,"\u4F7F\u7528\u5DF2\u6709\u8D26\u6237\u767B\u5F55"),s()()()),o&2){let g=S(9),E=S(15),We=S(21),He=S(26),Ye=S(29);r(2),l("formGroup",a.form),r(),h(3,a.error?3:-1),r(2),l("nzErrorTip",g),r(6),l("nzErrorTip","\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"),r(),l("nzPopoverVisible",a.visible)("nzPopoverOverlayStyle",ce(18,dt))("nzPopoverContent",E),r(5),l("nzErrorTip",We),r(6),l("nzErrorTip",Ye),r(),l("nzAddOnBefore",He),r(7),l("nzErrorTip","\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\uFF01"),r(),l("nzGutter",8),r(),l("nzSpan",16),r(3),l("nzSpan",8),r(),l("disabled",a.count>0)("nzLoading",a.loading),r(),K(" ",a.count?a.count+"s":"\u83B7\u53D6\u9A8C\u8BC1\u7801"," "),r(2),l("nzLoading",a.loading)}},dependencies:[R,P,D,B,A,T,I,Q,ne,re,W,G,L,q,$,j,V,O,U,De,we,Ae,Be,be,Se,Fe,oe,N,y,F,b],styles:["[_nghost-%COMP%]{display:block;width:368px;margin:0 auto}[_nghost-%COMP%] h3{margin-bottom:20px;font-size:16px}[_nghost-%COMP%] .submit{width:50%}[_nghost-%COMP%] .login{float:right;line-height:40px} .register-password-cdk .success, .register-password-cdk .warning, .register-password-cdk .error{transition:color .3s} .register-password-cdk .success{color:#52c41a} .register-password-cdk .warning{color:#faad14} .register-password-cdk .error{color:#ff4d4f} .register-password-cdk .progress-pass>.progress .ant-progress-bg{background-color:#faad14}"],changeDetection:0});let e=i;return e})();function ft(e,i){if(e&1&&(n(0,"div",4),u(1),s()),e&2){let p=x();r(),K(" \u4F60\u7684\u8D26\u6237\uFF1A",p.email," \u6CE8\u518C\u6210\u529F ")}}var je=(()=>{let i=class i{constructor(){this.msg=m(ge),this.email=""}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=z({type:i,selectors:[["passport-register-result"]],inputs:{email:"email"},standalone:!0,features:[C],decls:7,vars:2,consts:[["type","success","description","\u6FC0\u6D3B\u90AE\u4EF6\u5DF2\u53D1\u9001\u5230\u4F60\u7684\u90AE\u7BB1\u4E2D\uFF0C\u90AE\u4EF6\u6709\u6548\u671F\u4E3A24\u5C0F\u65F6\u3002\u8BF7\u53CA\u65F6\u767B\u5F55\u90AE\u7BB1\uFF0C\u70B9\u51FB\u90AE\u4EF6\u4E2D\u7684\u94FE\u63A5\u6FC0\u6D3B\u5E10\u6237\u3002",3,"title"],["title",""],["nz-button","","nzSize","large",3,"nzType","click"],["routerLink","/","nz-button","","nzSize","large"],[1,"title",2,"font-size","20px"]],template:function(o,a){if(o&1&&(n(0,"result",0),f(1,ft,2,1,"ng-template",null,1,_),n(3,"button",2),v("click",function(){return a.msg.success("email")}),u(4," \u67E5\u770B\u90AE\u7BB1 "),s(),n(5,"button",3),u(6," \u8FD4\u56DE\u9996\u9875 "),s()()),o&2){let g=S(2);l("title",g),r(3),l("nzType","primary")}},dependencies:[Q,N,y,F,b,Ee,xe],encapsulation:2});let e=i;return e})();var qi=[{path:"passport",component:Te,children:[{path:"login",component:$e,data:{title:"\u767B\u5F55",titleI18n:"app.login.login"}},{path:"register",component:qe,data:{title:"\u6CE8\u518C",titleI18n:"app.register.register"}},{path:"register-result",component:je,data:{title:"\u6CE8\u518C\u7ED3\u679C",titleI18n:"app.register.register"}},{path:"lock",component:Ge,data:{title:"\u9501\u5C4F",titleI18n:"app.lock"}}]},{path:"passport/callback/:type",component:Re}];export{qi as routes}; diff --git a/dist/himp.platform.angular/browser/chunk-UDOVALTH.js b/dist/himp.platform.angular/browser/chunk-GNH673QO.js similarity index 96% rename from dist/himp.platform.angular/browser/chunk-UDOVALTH.js rename to dist/himp.platform.angular/browser/chunk-GNH673QO.js index 22ae37a..6b05368 100644 --- a/dist/himp.platform.angular/browser/chunk-UDOVALTH.js +++ b/dist/himp.platform.angular/browser/chunk-GNH673QO.js @@ -1,4 +1,4 @@ -import{a as zn}from"./chunk-SZALJX3W.js";import{A as ae,Aa as Vs,Ba as Me,C as le,Da as mt,Fa as Se,Ga as Ps,Ha as Ce,Ia as Sn,Ja as Ge,Ka as Ne,Oa as ve,Qa as Ae,Ra as De,Ta as be,Ua as ct,V as ue,Va as ft,Wa as we,Xa as Is,Y as Ai,Ya as Ys,Z as Li,Za as Rs,_ as de,_a as Te,ab as xe,ca as me,cb as ke,d as bs,da as br,e as ne,ea as wr,eb as Ee,f as Dr,fa as Tr,ga as xr,gb as Fe,h as nt,ha as kr,hb as Vr,i as Ni,ia as Er,ib as Oe,j as st,ja as Fr,jb as As,k as ot,ka as ce,kb as Dt,l as Mn,la as dt,lb as $e,ma as Es,n as ws,na as Fs,o as at,oa as fe,p as lt,pa as Os,q as ut,qa as pe,r as Ts,ra as Or,s as xs,sa as he,t as Je,ta as _e,u as se,ua as Wi,v as oe,va as ge,wa as Re,xa as ye,z as ks}from"./chunk-XXGLJ63T.js";import{Ab as Q,Bb as P,Cb as C,Db as Z,De as Ds,Eb as zr,Ee as ee,Fe as He,Ge as Be,Hb as X,Ia as y,Ib as We,Ie as Ue,Jb as rt,Je as te,Kf as Ie,Lf as ze,Qb as B,Ra as O,Ta as M,Xc as Cr,a as gi,ac as yi,b as Pi,bc as Ri,c as Cs,df as Nr,e as ed,eb as p,ef as Mi,fa as vs,fb as f,ff as ie,g as td,gb as b,h as Qe,hb as Ii,hf as Ze,ia as Sr,ib as Yi,if as Ke,ja as v,jf as re,kb as L,la as J,ob as T,pf as vr,qa as k,qb as w,ra as E,tf as Pe,vf as K,x as Ns,yb as q,zb as j}from"./chunk-TV7RDLL7.js";var Ws=ed((vn,Hi)=>{"use strict";(function(c,l){typeof vn=="object"&&typeof Hi<"u"?Hi.exports=l():typeof define=="function"&&define.amd?define(l):c.moment=l()})(vn,function(){"use strict";var c;function l(){return c.apply(null,arguments)}function m(e){c=e}function n(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function o(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(a(e,t))return!1;return!0}function _(e){return e===void 0}function N(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function W(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function St(e,t){var i=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(i=0;i{"use strict";(function(c,l){typeof vn=="object"&&typeof Hi<"u"?Hi.exports=l():typeof define=="function"&&define.amd?define(l):c.moment=l()})(vn,function(){"use strict";var c;function l(){return c.apply(null,arguments)}function m(e){c=e}function n(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function o(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(a(e,t))return!1;return!0}function _(e){return e===void 0}function N(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function W(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function St(e,t){var i=[],r,s=e.length;for(r=0;r>>0,r;for(r=0;r0)for(i=0;i=0;return(u?i?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var qr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,er=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,jr={},bi={};function D(e,t,i,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(bi[e]=s),t&&(bi[t[0]]=function(){return Nt(s.apply(this,arguments),t[1],t[2])}),i&&(bi[i]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function no(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function so(e){var t=e.match(qr),i,r;for(i=0,r=t.length;i=0&&er.test(e);)e=e.replace(er,r),er.lastIndex=0,i-=1;return e}var oo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ao(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.match(qr).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var lo="Invalid date";function uo(){return this._invalidDate}var mo="%d",co=/\d{1,2}/;function fo(e){return this._ordinal.replace("%d",e)}var po={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ho(e,t,i,r){var s=this._relativeTime[i];return Ct(s)?s(e,t,i,r):s.replace(/%d/i,e)}function _o(e,t){var i=this._relativeTime[e>0?"future":"past"];return Ct(i)?i(t):i.replace(/%s/i,t)}var Fn={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function tt(e){return typeof e=="string"?Fn[e]||Fn[e.toLowerCase()]:void 0}function Qr(e){var t={},i,r;for(r in e)a(e,r)&&(i=tt(r),i&&(t[i]=e[r]));return t}var go={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function yo(e){var t=[],i;for(i in e)a(e,i)&&t.push({unit:i,priority:go[i]});return t.sort(function(r,s){return r.priority-s.priority}),t}var On=/\d/,Xe=/\d\d/,Vn=/\d{3}/,Zr=/\d{4}/,ir=/[+-]?\d{6}/,U=/\d\d?/,Pn=/\d\d\d\d?/,In=/\d\d\d\d\d\d?/,rr=/\d{1,3}/,Kr=/\d{1,4}/,nr=/[+-]?\d{1,6}/,wi=/\d+/,sr=/[+-]?\d+/,Mo=/Z|[+-]\d\d:?\d\d/gi,or=/Z|[+-]\d\d(?::?\d\d)?/gi,So=/[+-]?\d+(\.\d{1,3})?/,Ui=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ti=/^[1-9]\d?/,Jr=/^([1-9]\d|\d)/,ar;ar={};function z(e,t,i){ar[e]=Ct(t)?t:function(r,s){return r&&i?i:t}}function zo(e,t){return a(ar,e)?ar[e](t._strict,t._locale):new RegExp(Co(e))}function Co(e){return ni(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,i,r,s,u){return i||r||s||u}))}function ni(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function it(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function V(e){var t=+e,i=0;return t!==0&&isFinite(t)&&(i=it(t)),i}var Xr={};function H(e,t){var i,r=t,s;for(typeof e=="string"&&(e=[e]),N(t)&&(r=function(u,h){h[t]=V(u)}),s=e.length,i=0;i68?1900:2e3)};var Yn=xi("FullYear",!0);function bo(){return lr(this.year())}function xi(e,t){return function(i){return i!=null?(Rn(this,e,i),l.updateOffset(this,t),this):qi(this,e)}}function qi(e,t){if(!e.isValid())return NaN;var i=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return r?i.getUTCSeconds():i.getSeconds();case"Minutes":return r?i.getUTCMinutes():i.getMinutes();case"Hours":return r?i.getUTCHours():i.getHours();case"Date":return r?i.getUTCDate():i.getDate();case"Day":return r?i.getUTCDay():i.getDay();case"Month":return r?i.getUTCMonth():i.getMonth();case"FullYear":return r?i.getUTCFullYear():i.getFullYear();default:return NaN}}function Rn(e,t,i){var r,s,u,h,S;if(!(!e.isValid()||isNaN(i))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(i):r.setMilliseconds(i));case"Seconds":return void(s?r.setUTCSeconds(i):r.setSeconds(i));case"Minutes":return void(s?r.setUTCMinutes(i):r.setMinutes(i));case"Hours":return void(s?r.setUTCHours(i):r.setHours(i));case"Date":return void(s?r.setUTCDate(i):r.setDate(i));case"FullYear":break;default:return}u=i,h=e.month(),S=e.date(),S=S===29&&h===1&&!lr(u)?28:S,s?r.setUTCFullYear(u,h,S):r.setFullYear(u,h,S)}}function wo(e){return e=tt(e),Ct(this[e])?this[e]():this}function To(e,t){if(typeof e=="object"){e=Qr(e);var i=yo(e),r,s=i.length;for(r=0;r=0?(S=new Date(e+400,t,i,r,s,u,h),isFinite(S.getFullYear())&&S.setFullYear(e)):S=new Date(e,t,i,r,s,u,h),S}function ji(e){var t,i;return e<100&&e>=0?(i=Array.prototype.slice.call(arguments),i[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ur(e,t,i){var r=7+t-i,s=(7+ji(e,0,r).getUTCDay()-t)%7;return-s+r-1}function Un(e,t,i,r,s){var u=(7+i-r)%7,h=ur(e,r,s),S=1+7*(t-1)+u+h,x,I;return S<=0?(x=e-1,I=$i(x)+S):S>$i(e)?(x=e+1,I=S-$i(e)):(x=e,I=S),{year:x,dayOfYear:I}}function Qi(e,t,i){var r=ur(e.year(),t,i),s=Math.floor((e.dayOfYear()-r-1)/7)+1,u,h;return s<1?(h=e.year()-1,u=s+ai(h,t,i)):s>ai(e.year(),t,i)?(u=s-ai(e.year(),t,i),h=e.year()+1):(h=e.year(),u=s),{week:u,year:h}}function ai(e,t,i){var r=ur(e,t,i),s=ur(e+1,t,i);return($i(e)-r+s)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),z("w",U,Ti),z("ww",U,Xe),z("W",U,Ti),z("WW",U,Xe),Gi(["w","ww","W","WW"],function(e,t,i,r){t[r.substr(0,1)]=V(e)});function Wo(e){return Qi(e,this._week.dow,this._week.doy).week}var Ho={dow:0,doy:6};function Bo(){return this._week.dow}function Uo(){return this._week.doy}function Go(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function $o(e){var t=Qi(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),D("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),D("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),z("d",U),z("e",U),z("E",U),z("dd",function(e,t){return t.weekdaysMinRegex(e)}),z("ddd",function(e,t){return t.weekdaysShortRegex(e)}),z("dddd",function(e,t){return t.weekdaysRegex(e)}),Gi(["dd","ddd","dddd"],function(e,t,i,r){var s=i._locale.weekdaysParse(e,r,i._strict);s!=null?t.d=s:F(i).invalidWeekday=e}),Gi(["d","e","E"],function(e,t,i,r){t[r]=V(e)});function qo(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function jo(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function tn(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Qo="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Gn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Zo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ko=Ui,Jo=Ui,Xo=Ui;function ea(e,t){var i=n(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?tn(i,this._week.dow):e?i[e.day()]:i}function ta(e){return e===!0?tn(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ia(e){return e===!0?tn(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ra(e,t,i){var r,s,u,h=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)u=zt([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(u,"").toLocaleLowerCase();return i?t==="dddd"?(s=Ve.call(this._weekdaysParse,h),s!==-1?s:null):t==="ddd"?(s=Ve.call(this._shortWeekdaysParse,h),s!==-1?s:null):(s=Ve.call(this._minWeekdaysParse,h),s!==-1?s:null):t==="dddd"?(s=Ve.call(this._weekdaysParse,h),s!==-1||(s=Ve.call(this._shortWeekdaysParse,h),s!==-1)?s:(s=Ve.call(this._minWeekdaysParse,h),s!==-1?s:null)):t==="ddd"?(s=Ve.call(this._shortWeekdaysParse,h),s!==-1||(s=Ve.call(this._weekdaysParse,h),s!==-1)?s:(s=Ve.call(this._minWeekdaysParse,h),s!==-1?s:null)):(s=Ve.call(this._minWeekdaysParse,h),s!==-1||(s=Ve.call(this._weekdaysParse,h),s!==-1)?s:(s=Ve.call(this._shortWeekdaysParse,h),s!==-1?s:null))}function na(e,t,i){var r,s,u;if(this._weekdaysParseExact)return ra.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=zt([2e3,1]).day(r),i&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(u="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(u.replace(".",""),"i")),i&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(i&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(i&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!i&&this._weekdaysParse[r].test(e))return r}}function sa(e){if(!this.isValid())return e!=null?this:NaN;var t=qi(this,"Day");return e!=null?(e=qo(e,this.localeData()),this.add(e-t,"d")):t}function oa(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function aa(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=jo(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function la(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ko),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ua(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Jo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function da(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xo),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function rn(){function e(je,ci){return ci.length-je.length}var t=[],i=[],r=[],s=[],u,h,S,x,I;for(u=0;u<7;u++)h=zt([2e3,1]).day(u),S=ni(this.weekdaysMin(h,"")),x=ni(this.weekdaysShort(h,"")),I=ni(this.weekdays(h,"")),t.push(S),i.push(x),r.push(I),s.push(S),s.push(x),s.push(I);t.sort(e),i.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function nn(){return this.hours()%12||12}function ma(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,nn),D("k",["kk",2],0,ma),D("hmm",0,0,function(){return""+nn.apply(this)+Nt(this.minutes(),2)}),D("hmmss",0,0,function(){return""+nn.apply(this)+Nt(this.minutes(),2)+Nt(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+Nt(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+Nt(this.minutes(),2)+Nt(this.seconds(),2)});function $n(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}$n("a",!0),$n("A",!1);function qn(e,t){return t._meridiemParse}z("a",qn),z("A",qn),z("H",U,Jr),z("h",U,Ti),z("k",U,Ti),z("HH",U,Xe),z("hh",U,Xe),z("kk",U,Xe),z("hmm",Pn),z("hmmss",In),z("Hmm",Pn),z("Hmmss",In),H(["H","HH"],Ye),H(["k","kk"],function(e,t,i){var r=V(e);t[Ye]=r===24?0:r}),H(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),H(["h","hh"],function(e,t,i){t[Ye]=V(e),F(i).bigHour=!0}),H("hmm",function(e,t,i){var r=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r)),F(i).bigHour=!0}),H("hmmss",function(e,t,i){var r=e.length-4,s=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r,2)),t[oi]=V(e.substr(s)),F(i).bigHour=!0}),H("Hmm",function(e,t,i){var r=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r))}),H("Hmmss",function(e,t,i){var r=e.length-4,s=e.length-2;t[Ye]=V(e.substr(0,r)),t[ht]=V(e.substr(r,2)),t[oi]=V(e.substr(s))});function ca(e){return(e+"").toLowerCase().charAt(0)==="p"}var fa=/[ap]\.?m?\.?/i,pa=xi("Hours",!0);function ha(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}var jn={calendar:io,longDateFormat:oo,invalidDate:lo,ordinal:mo,dayOfMonthOrdinalParse:co,relativeTime:po,months:ko,monthsShort:An,week:Ho,weekdays:Qo,weekdaysMin:Zo,weekdaysShort:Gn,meridiemParse:fa},$={},Zi={},Ki;function _a(e,t){var i,r=Math.min(e.length,t.length);for(i=0;i0;){if(s=dr(u.slice(0,i).join("-")),s)return s;if(r&&r.length>=i&&_a(u,r)>=i-1)break;i--}t++}return Ki}function ya(e){return!!(e&&e.match("^[^/\\\\]*$"))}function dr(e){var t=null,i;if($[e]===void 0&&typeof Hi<"u"&&Hi&&Hi.exports&&ya(e))try{t=Ki._abbr,i=Cs,i("./locale/"+e),pi(t)}catch{$[e]=null}return $[e]}function pi(e,t){var i;return e&&(_(t)?i=li(e):i=sn(e,t),i?Ki=i:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ki._abbr}function sn(e,t){if(t!==null){var i,r=jn;if(t.abbr=e,$[e]!=null)kn("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=$[e]._config;else if(t.parentLocale!=null)if($[t.parentLocale]!=null)r=$[t.parentLocale]._config;else if(i=dr(t.parentLocale),i!=null)r=i._config;else return Zi[t.parentLocale]||(Zi[t.parentLocale]=[]),Zi[t.parentLocale].push({name:e,config:t}),null;return $[e]=new Gr(Ur(r,t)),Zi[e]&&Zi[e].forEach(function(s){sn(s.name,s.config)}),pi(e),$[e]}else return delete $[e],null}function Ma(e,t){if(t!=null){var i,r,s=jn;$[e]!=null&&$[e].parentLocale!=null?$[e].set(Ur($[e]._config,t)):(r=dr(e),r!=null&&(s=r._config),t=Ur(s,t),r==null&&(t.abbr=e),i=new Gr(t),i.parentLocale=$[e],$[e]=i),pi(e)}else $[e]!=null&&($[e].parentLocale!=null?($[e]=$[e].parentLocale,e===pi()&&pi(e)):$[e]!=null&&delete $[e]);return $[e]}function li(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ki;if(!n(e)){if(t=dr(e),t)return t;e=[e]}return ga(e)}function Sa(){return $r($)}function on(e){var t,i=e._a;return i&&F(e).overflow===-2&&(t=i[si]<0||i[si]>11?si:i[vt]<1||i[vt]>en(i[Le],i[si])?vt:i[Ye]<0||i[Ye]>24||i[Ye]===24&&(i[ht]!==0||i[oi]!==0||i[Si]!==0)?Ye:i[ht]<0||i[ht]>59?ht:i[oi]<0||i[oi]>59?oi:i[Si]<0||i[Si]>999?Si:-1,F(e)._overflowDayOfYear&&(tvt)&&(t=vt),F(e)._overflowWeeks&&t===-1&&(t=vo),F(e)._overflowWeekday&&t===-1&&(t=Do),F(e).overflow=t),e}var za=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ca=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Na=/Z|[+-]\d\d(?::?\d\d)?/,mr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],an=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],va=/^\/?Date\((-?\d+)/i,Da=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ba={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Zn(e){var t,i,r=e._i,s=za.exec(r)||Ca.exec(r),u,h,S,x,I=mr.length,je=an.length;if(s){for(F(e).iso=!0,t=0,i=I;t$i(h)||e._dayOfYear===0)&&(F(e)._overflowDayOfYear=!0),i=ji(h,0,e._dayOfYear),e._a[si]=i.getUTCMonth(),e._a[vt]=i.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Ye]===24&&e._a[ht]===0&&e._a[oi]===0&&e._a[Si]===0&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?ji:Lo).apply(null,r),u=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==u&&(F(e).weekdayMismatch=!0)}}function Va(e){var t,i,r,s,u,h,S,x,I;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(u=1,h=4,i=ki(t.GG,e._a[Le],Qi(G(),1,4).year),r=ki(t.W,1),s=ki(t.E,1),(s<1||s>7)&&(x=!0)):(u=e._locale._week.dow,h=e._locale._week.doy,I=Qi(G(),u,h),i=ki(t.gg,e._a[Le],I.year),r=ki(t.w,I.week),t.d!=null?(s=t.d,(s<0||s>6)&&(x=!0)):t.e!=null?(s=t.e+u,(t.e<0||t.e>6)&&(x=!0)):s=u),r<1||r>ai(i,u,h)?F(e)._overflowWeeks=!0:x!=null?F(e)._overflowWeekday=!0:(S=Un(i,r,s,u,h),e._a[Le]=S.year,e._dayOfYear=S.dayOfYear)}l.ISO_8601=function(){},l.RFC_2822=function(){};function un(e){if(e._f===l.ISO_8601){Zn(e);return}if(e._f===l.RFC_2822){Kn(e);return}e._a=[],F(e).empty=!0;var t=""+e._i,i,r,s,u,h,S=t.length,x=0,I,je;for(s=En(e._f,e._locale).match(qr)||[],je=s.length,i=0;i0&&F(e).unusedInput.push(h),t=t.slice(t.indexOf(r)+r.length),x+=r.length),bi[u]?(r?F(e).empty=!1:F(e).unusedTokens.push(u),No(u,r,e)):e._strict&&!r&&F(e).unusedTokens.push(u);F(e).charsLeftOver=S-x,t.length>0&&F(e).unusedInput.push(t),e._a[Ye]<=12&&F(e).bigHour===!0&&e._a[Ye]>0&&(F(e).bigHour=void 0),F(e).parsedDateParts=e._a.slice(0),F(e).meridiem=e._meridiem,e._a[Ye]=Pa(e._locale,e._a[Ye],e._meridiem),I=F(e).era,I!==null&&(e._a[Le]=e._locale.erasConvertYear(I,e._a[Le])),ln(e),on(e)}function Pa(e,t,i){var r;return i==null?t:e.meridiemHour!=null?e.meridiemHour(t,i):(e.isPM!=null&&(r=e.isPM(i),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Ia(e){var t,i,r,s,u,h,S=!1,x=e._f.length;if(x===0){F(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:Xi()});function es(e,t){var i,r;if(t.length===1&&n(t[0])&&(t=t[0]),!t.length)return G();for(i=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function rl(){if(!_(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Br(e,this),e=Jn(e),e._a?(t=e._isUTC?zt(e._a):G(e._a),this._isDSTShifted=this.isValid()&&ja(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function nl(){return this.isValid()?!this._isUTC:!1}function sl(){return this.isValid()?this._isUTC:!1}function is(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ol=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,al=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function _t(e,t){var i=e,r=null,s,u,h;return fr(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:N(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(r=ol.exec(e))?(s=r[1]==="-"?-1:1,i={y:0,d:V(r[vt])*s,h:V(r[Ye])*s,m:V(r[ht])*s,s:V(r[oi])*s,ms:V(dn(r[Si]*1e3))*s}):(r=al.exec(e))?(s=r[1]==="-"?-1:1,i={y:zi(r[2],s),M:zi(r[3],s),w:zi(r[4],s),d:zi(r[5],s),h:zi(r[6],s),m:zi(r[7],s),s:zi(r[8],s)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(h=ll(G(i.from),G(i.to)),i={},i.ms=h.milliseconds,i.M=h.months),u=new cr(i),fr(e)&&a(e,"_locale")&&(u._locale=e._locale),fr(e)&&a(e,"_isValid")&&(u._isValid=e._isValid),u}_t.fn=cr.prototype,_t.invalid=qa;function zi(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function rs(e,t){var i={};return i.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function ll(e,t){var i;return e.isValid()&&t.isValid()?(t=cn(t,e),e.isBefore(t)?i=rs(e,t):(i=rs(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ns(e,t){return function(i,r){var s,u;return r!==null&&!isNaN(+r)&&(kn(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=i,i=r,r=u),s=_t(i,r),ss(this,s,e),this}}function ss(e,t,i,r){var s=t._milliseconds,u=dn(t._days),h=dn(t._months);e.isValid()&&(r=r??!0,h&&Wn(e,qi(e,"Month")+h*i),u&&Rn(e,"Date",qi(e,"Date")+u*i),s&&e._d.setTime(e._d.valueOf()+s*i),r&&l.updateOffset(e,u||h))}var ul=ns(1,"add"),dl=ns(-1,"subtract");function os(e){return typeof e=="string"||e instanceof String}function ml(e){return pt(e)||W(e)||os(e)||N(e)||fl(e)||cl(e)||e===null||e===void 0}function cl(e){var t=o(e)&&!d(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,u,h=r.length;for(s=0;si.valueOf():i.valueOf()9999?tr(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ct(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",tr(i,"Z")):tr(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wl(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",i,r,s,u;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),i="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",u=t+'[")]',this.format(i+r+s+u)}function Tl(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=tr(this,e);return this.localeData().postformat(t)}function xl(e,t){return this.isValid()&&(pt(e)&&e.isValid()||G(e).isValid())?_t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function kl(e){return this.from(G(),e)}function El(e,t){return this.isValid()&&(pt(e)&&e.isValid()||G(e).isValid())?_t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Fl(e){return this.to(G(),e)}function as(e){var t;return e===void 0?this._locale._abbr:(t=li(e),t!=null&&(this._locale=t),this)}var ls=et("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function us(){return this._locale}var hr=1e3,Ei=60*hr,_r=60*Ei,ds=(365*400+97)*24*_r;function Fi(e,t){return(e%t+t)%t}function ms(e,t,i){return e<100&&e>=0?new Date(e+400,t,i)-ds:new Date(e,t,i).valueOf()}function cs(e,t,i){return e<100&&e>=0?Date.UTC(e+400,t,i)-ds:Date.UTC(e,t,i)}function Ol(e){var t,i;if(e=tt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?cs:ms,e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Fi(t+(this._isUTC?0:this.utcOffset()*Ei),_r);break;case"minute":t=this._d.valueOf(),t-=Fi(t,Ei);break;case"second":t=this._d.valueOf(),t-=Fi(t,hr);break}return this._d.setTime(t),l.updateOffset(this,!0),this}function Vl(e){var t,i;if(e=tt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?cs:ms,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=_r-Fi(t+(this._isUTC?0:this.utcOffset()*Ei),_r)-1;break;case"minute":t=this._d.valueOf(),t+=Ei-Fi(t,Ei)-1;break;case"second":t=this._d.valueOf(),t+=hr-Fi(t,hr)-1;break}return this._d.setTime(t),l.updateOffset(this,!0),this}function Pl(){return this._d.valueOf()-(this._offset||0)*6e4}function Il(){return Math.floor(this.valueOf()/1e3)}function Yl(){return new Date(this.valueOf())}function Rl(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Al(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ll(){return this.isValid()?this.toISOString():null}function Wl(){return Wr(this)}function Hl(){return fi({},F(this))}function Bl(){return F(this).overflow}function Ul(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),z("N",pn),z("NN",pn),z("NNN",pn),z("NNNN",tu),z("NNNNN",iu),H(["N","NN","NNN","NNNN","NNNNN"],function(e,t,i,r){var s=i._locale.erasParse(e,r,i._strict);s?F(i).era=s:F(i).invalidEra=e}),z("y",wi),z("yy",wi),z("yyy",wi),z("yyyy",wi),z("yo",ru),H(["y","yy","yyy","yyyy"],Le),H(["yo"],function(e,t,i,r){var s;i._locale._eraYearOrdinalRegex&&(s=e.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?t[Le]=i._locale.eraYearOrdinalParse(e,s):t[Le]=parseInt(e,10)});function Gl(e,t){var i,r,s,u=this._eras||li("en")._eras;for(i=0,r=u.length;i=0)return u[r]}function ql(e,t){var i=e.since<=e.until?1:-1;return t===void 0?l(e.since).year():l(e.since).year()+(t-e.offset)*i}function jl(){var e,t,i,r=this.localeData().eras();for(e=0,t=r.length;eu&&(t=u),du.call(this,e,t,i,r,s))}function du(e,t,i,r,s){var u=Un(e,t,i,r,s),h=ji(u.year,0,u.dayOfYear);return this.year(h.getUTCFullYear()),this.month(h.getUTCMonth()),this.date(h.getUTCDate()),this}D("Q",0,"Qo","quarter"),z("Q",On),H("Q",function(e,t){t[si]=(V(e)-1)*3});function mu(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),z("D",U,Ti),z("DD",U,Xe),z("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),H(["D","DD"],vt),H("Do",function(e,t){t[vt]=V(e.match(U)[0])});var ps=xi("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),z("DDD",rr),z("DDDD",Vn),H(["DDD","DDDD"],function(e,t,i){i._dayOfYear=V(e)});function cu(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}D("m",["mm",2],0,"minute"),z("m",U,Jr),z("mm",U,Xe),H(["m","mm"],ht);var fu=xi("Minutes",!1);D("s",["ss",2],0,"second"),z("s",U,Jr),z("ss",U,Xe),H(["s","ss"],oi);var pu=xi("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),z("S",rr,On),z("SS",rr,Xe),z("SSS",rr,Vn);var hi,hs;for(hi="SSSS";hi.length<=9;hi+="S")z(hi,wi);function hu(e,t){t[Si]=V(("0."+e)*1e3)}for(hi="S";hi.length<=9;hi+="S")H(hi,hu);hs=xi("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function _u(){return this._isUTC?"UTC":""}function gu(){return this._isUTC?"Coordinated Universal Time":""}var g=Bi.prototype;g.add=ul,g.calendar=_l,g.clone=gl,g.diff=vl,g.endOf=Vl,g.format=Tl,g.from=xl,g.fromNow=kl,g.to=El,g.toNow=Fl,g.get=wo,g.invalidAt=Bl,g.isAfter=yl,g.isBefore=Ml,g.isBetween=Sl,g.isSame=zl,g.isSameOrAfter=Cl,g.isSameOrBefore=Nl,g.isValid=Wl,g.lang=ls,g.locale=as,g.localeData=us,g.max=Wa,g.min=La,g.parsingFlags=Hl,g.set=To,g.startOf=Ol,g.subtract=dl,g.toArray=Rl,g.toObject=Al,g.toDate=Yl,g.toISOString=bl,g.inspect=wl,typeof Symbol<"u"&&Symbol.for!=null&&(g[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),g.toJSON=Ll,g.toString=Dl,g.unix=Il,g.valueOf=Pl,g.creationData=Ul,g.eraName=jl,g.eraNarrow=Ql,g.eraAbbr=Zl,g.eraYear=Kl,g.year=Yn,g.isLeapYear=bo,g.weekYear=nu,g.isoWeekYear=su,g.quarter=g.quarters=mu,g.month=Hn,g.daysInMonth=Yo,g.week=g.weeks=Go,g.isoWeek=g.isoWeeks=$o,g.weeksInYear=lu,g.weeksInWeekYear=uu,g.isoWeeksInYear=ou,g.isoWeeksInISOWeekYear=au,g.date=ps,g.day=g.days=sa,g.weekday=oa,g.isoWeekday=aa,g.dayOfYear=cu,g.hour=g.hours=pa,g.minute=g.minutes=fu,g.second=g.seconds=pu,g.millisecond=g.milliseconds=hs,g.utcOffset=Za,g.utc=Ja,g.local=Xa,g.parseZone=el,g.hasAlignedHourOffset=tl,g.isDST=il,g.isLocal=nl,g.isUtcOffset=sl,g.isUtc=is,g.isUTC=is,g.zoneAbbr=_u,g.zoneName=gu,g.dates=et("dates accessor is deprecated. Use date instead.",ps),g.months=et("months accessor is deprecated. Use month instead",Hn),g.years=et("years accessor is deprecated. Use year instead",Yn),g.zone=et("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ka),g.isDSTShifted=et("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",rl);function yu(e){return G(e*1e3)}function Mu(){return G.apply(null,arguments).parseZone()}function _s(e){return e}var R=Gr.prototype;R.calendar=ro,R.longDateFormat=ao,R.invalidDate=uo,R.ordinal=fo,R.preparse=_s,R.postformat=_s,R.relativeTime=ho,R.pastFuture=_o,R.set=to,R.eras=Gl,R.erasParse=$l,R.erasConvertYear=ql,R.erasAbbrRegex=Xl,R.erasNameRegex=Jl,R.erasNarrowRegex=eu,R.months=Oo,R.monthsShort=Vo,R.monthsParse=Io,R.monthsRegex=Ao,R.monthsShortRegex=Ro,R.week=Wo,R.firstDayOfYear=Uo,R.firstDayOfWeek=Bo,R.weekdays=ea,R.weekdaysMin=ia,R.weekdaysShort=ta,R.weekdaysParse=na,R.weekdaysRegex=la,R.weekdaysShortRegex=ua,R.weekdaysMinRegex=da,R.isPM=ca,R.meridiem=ha;function yr(e,t,i,r){var s=li(),u=zt().set(r,t);return s[i](u,e)}function gs(e,t,i){if(N(e)&&(t=e,e=void 0),e=e||"",t!=null)return yr(e,t,i,"month");var r,s=[];for(r=0;r<12;r++)s[r]=yr(e,r,i,"month");return s}function _n(e,t,i,r){typeof e=="boolean"?(N(t)&&(i=t,t=void 0),t=t||""):(t=e,i=t,e=!1,N(t)&&(i=t,t=void 0),t=t||"");var s=li(),u=e?s._week.dow:0,h,S=[];if(i!=null)return yr(t,(i+u)%7,r,"day");for(h=0;h<7;h++)S[h]=yr(t,(h+u)%7,r,"day");return S}function Su(e,t){return gs(e,t,"months")}function zu(e,t){return gs(e,t,"monthsShort")}function Cu(e,t,i){return _n(e,t,i,"weekdays")}function Nu(e,t,i){return _n(e,t,i,"weekdaysShort")}function vu(e,t,i){return _n(e,t,i,"weekdaysMin")}pi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=V(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+i}}),l.lang=et("moment.lang is deprecated. Use moment.locale instead.",pi),l.langData=et("moment.langData is deprecated. Use moment.localeData instead.",li);var ui=Math.abs;function Du(){var e=this._data;return this._milliseconds=ui(this._milliseconds),this._days=ui(this._days),this._months=ui(this._months),e.milliseconds=ui(e.milliseconds),e.seconds=ui(e.seconds),e.minutes=ui(e.minutes),e.hours=ui(e.hours),e.months=ui(e.months),e.years=ui(e.years),this}function ys(e,t,i,r){var s=_t(t,i);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function bu(e,t){return ys(this,e,t,1)}function wu(e,t){return ys(this,e,t,-1)}function Ms(e){return e<0?Math.floor(e):Math.ceil(e)}function Tu(){var e=this._milliseconds,t=this._days,i=this._months,r=this._data,s,u,h,S,x;return e>=0&&t>=0&&i>=0||e<=0&&t<=0&&i<=0||(e+=Ms(gn(i)+t)*864e5,t=0,i=0),r.milliseconds=e%1e3,s=it(e/1e3),r.seconds=s%60,u=it(s/60),r.minutes=u%60,h=it(u/60),r.hours=h%24,t+=it(h/24),x=it(Ss(t)),i+=x,t-=Ms(gn(x)),S=it(i/12),i%=12,r.days=t,r.months=i,r.years=S,this}function Ss(e){return e*4800/146097}function gn(e){return e*146097/4800}function xu(e){if(!this.isValid())return NaN;var t,i,r=this._milliseconds;if(e=tt(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,i=this._months+Ss(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(gn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function di(e){return function(){return this.as(e)}}var zs=di("ms"),ku=di("s"),Eu=di("m"),Fu=di("h"),Ou=di("d"),Vu=di("w"),Pu=di("M"),Iu=di("Q"),Yu=di("y"),Ru=zs;function Au(){return _t(this)}function Lu(e){return e=tt(e),this.isValid()?this[e+"s"]():NaN}function Ci(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wu=Ci("milliseconds"),Hu=Ci("seconds"),Bu=Ci("minutes"),Uu=Ci("hours"),Gu=Ci("days"),$u=Ci("months"),qu=Ci("years");function ju(){return it(this.days()/7)}var mi=Math.round,Oi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Qu(e,t,i,r,s){return s.relativeTime(t||1,!!i,e,r)}function Zu(e,t,i,r){var s=_t(e).abs(),u=mi(s.as("s")),h=mi(s.as("m")),S=mi(s.as("h")),x=mi(s.as("d")),I=mi(s.as("M")),je=mi(s.as("w")),ci=mi(s.as("y")),_i=u<=i.ss&&["s",u]||u0,_i[4]=r,Qu.apply(null,_i)}function Ku(e){return e===void 0?mi:typeof e=="function"?(mi=e,!0):!1}function Ju(e,t){return Oi[e]===void 0?!1:t===void 0?Oi[e]:(Oi[e]=t,e==="s"&&(Oi.ss=t-1),!0)}function Xu(e,t){if(!this.isValid())return this.localeData().invalidDate();var i=!1,r=Oi,s,u;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(i=e),typeof t=="object"&&(r=Object.assign({},Oi,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),u=Zu(this,!i,r,s),i&&(u=s.pastFuture(+this,u)),s.postformat(u)}var yn=Math.abs;function Vi(e){return(e>0)-(e<0)||+e}function Mr(){if(!this.isValid())return this.localeData().invalidDate();var e=yn(this._milliseconds)/1e3,t=yn(this._days),i=yn(this._months),r,s,u,h,S=this.asSeconds(),x,I,je,ci;return S?(r=it(e/60),s=it(r/60),e%=60,r%=60,u=it(i/12),i%=12,h=e?e.toFixed(3).replace(/\.?0+$/,""):"",x=S<0?"-":"",I=Vi(this._months)!==Vi(S)?"-":"",je=Vi(this._days)!==Vi(S)?"-":"",ci=Vi(this._milliseconds)!==Vi(S)?"-":"",x+"P"+(u?I+u+"Y":"")+(i?I+i+"M":"")+(t?je+t+"D":"")+(s||r||e?"T":"")+(s?ci+s+"H":"")+(r?ci+r+"M":"")+(e?ci+h+"S":"")):"P0D"}var Y=cr.prototype;Y.isValid=$a,Y.abs=Du,Y.add=bu,Y.subtract=wu,Y.as=xu,Y.asMilliseconds=zs,Y.asSeconds=ku,Y.asMinutes=Eu,Y.asHours=Fu,Y.asDays=Ou,Y.asWeeks=Vu,Y.asMonths=Pu,Y.asQuarters=Iu,Y.asYears=Yu,Y.valueOf=Ru,Y._bubble=Tu,Y.clone=Au,Y.get=Lu,Y.milliseconds=Wu,Y.seconds=Hu,Y.minutes=Bu,Y.hours=Uu,Y.days=Gu,Y.weeks=ju,Y.months=$u,Y.years=qu,Y.humanize=Xu,Y.toISOString=Mr,Y.toString=Mr,Y.toJSON=Mr,Y.locale=as,Y.localeData=us,Y.toIsoString=et("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Mr),Y.lang=ls,D("X",0,0,"unix"),D("x",0,0,"valueOf"),z("x",sr),z("X",So),H("X",function(e,t,i){i._d=new Date(parseFloat(e)*1e3)}),H("x",function(e,t,i){i._d=new Date(V(e))});return l.version="2.30.1",m(G),l.fn=g,l.min=Ha,l.max=Ba,l.now=Ua,l.utc=zt,l.unix=yu,l.months=Su,l.isDate=W,l.locale=pi,l.invalid=Xi,l.duration=_t,l.isMoment=pt,l.weekdays=Cu,l.parseZone=Mu,l.localeData=li,l.isDuration=fr,l.monthsShort=zu,l.weekdaysMin=vu,l.defineLocale=sn,l.updateLocale=Ma,l.locales=Sa,l.weekdaysShort=Nu,l.normalizeUnits=tt,l.relativeTimeRounding=Ku,l.relativeTimeThreshold=Ju,l.calendarFormat=hl,l.prototype=g,l.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},l})});function id(c,l){if(c&1){let m=L();p(0,"button",5),T("click",function(){k(m);let o=w();return E(o.get())}),C(1,"\u5237\u65B0"),f()}}function rd(c,l){if(c&1){let m=L();p(0,"tr")(1,"td",7),T("nzExpandChange",function(o){k(m);let a=w().$implicit;return E(a.expand=o)})("nzExpandChange",function(o){k(m);let a=w().$implicit,d=w().$implicit,_=w();return E(_.collapse(_.mapOfExpandedData[d.id],a,o))}),C(2),f(),p(3,"td"),C(4),f(),p(5,"td"),C(6),f(),p(7,"td"),C(8),f()()}if(c&2){let m=w().$implicit;y(),M("nzIndentSize",m.level*20)("nzShowExpand",!!m.children&&m.children.length!=0)("nzExpand",m.expand),y(),zr(" ",m.text," "),y(2),Z(m.menuCode),y(2),Z(m.srtno),y(2),Z(m.icon)}}function nd(c,l){if(c&1&&(Ii(0),O(1,rd,9,7,"tr",6),Yi()),c&2){let m=l.$implicit;y(),M("ngIf",m.parent&&m.parent.expand||!m.parent)}}function sd(c,l){if(c&1&&(Ii(0),O(1,nd,2,1,"ng-container",4),Yi()),c&2){let m=l.$implicit,n=w();y(),M("ngForOf",n.mapOfExpandedData[m.id])}}var Ls=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.url="/api/main/menu",this.menuList=[],this.mapOfExpandedData={}}ngOnInit(){this.getMenuList()}getMenuList(){this.http.get(this.url).subscribe(n=>{this.menuList=n,this.menuList.forEach(o=>{this.mapOfExpandedData[o.id]=this.convertTreeToList(o)})})}get(){this.getMenuList()}convertTreeToList(n){let o=[],a=[],d={};for(o.push(Pi(gi({},n),{level:0,expand:!1}));o.length!==0;){let _=o.pop();if(this.visitNode(_,d,a),_.children)for(let N=_.children.length-1;N>=0;N--)o.push(Pi(gi({},_.children[N]),{level:_.level+1,expand:!1,parent:_}))}return a}visitNode(n,o,a){o[n.id]||(o[n.id]=!0,a.push(n))}collapse(n,o,a){if(!a)if(o.children)o.children.forEach(d=>{let _=n.find(N=>N.id===d.id);_.expand=!1,this.collapse(n,_,!1)});else return}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-menu-manage"]],standalone:!0,features:[X],decls:18,vars:4,consts:[[3,"action"],["phActionTpl",""],["nzTableLayout","fixed",3,"nzData","nzSize"],["expandTable",""],[4,"ngFor","ngForOf"],["nz-button","","nzType","primary",3,"click"],[4,"ngIf"],[3,"nzIndentSize","nzShowExpand","nzExpand","nzExpandChange"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,id,2,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"nz-table",2,3)(6,"thead")(7,"tr")(8,"th"),C(9,"\u83DC\u5355\u540D\u79F0"),f(),p(10,"th"),C(11,"\u83DC\u5355\u4EE3\u7801"),f(),p(12,"th"),C(13,"\u6392\u5E8F\u53F7"),f(),p(14,"th"),C(15,"\u56FE\u6807"),f()()(),p(16,"tbody"),O(17,sd,2,1,"ng-container",4),f()()()),o&2){let d=P(2),_=P(5);M("action",d),y(4),M("nzData",a.menuList)("nzSize","small"),y(13),M("ngForOf",_.data)}},dependencies:[$e,yi,Ri,Ae,Ue,He,Be,Ie,xr,br,Tr,wr,Fr,kr,Er,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Cn={C0001:"\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u6761\u6570\u636E\u5417\uFF1F",C0002:"\u786E\u5B9A\u8981\u628A\u8FD9\u6761\u6570\u636E\u65E0\u6548\u5417\uFF1F",C0003:"\u4FDD\u5B58\u6210\u529F",C0004:"\u786E\u5B9A\u8981\u4F5C\u5E9F\u8BE5\u836F\u54C1\u53CA\u836F\u54C1\u76EE\u5F55\u4FE1\u606F\u5417\uFF1F",C0005:"\u786E\u5B9A\u8981\u542F\u7528\u8BE5\u836F\u54C1\u4FE1\u606F\u5417\uFF1F",C0006:"\u5220\u9664\u6210\u529F",C0007:"\u786E\u5B9A\u8981\u8FDB\u884C\u5BA1\u6838\u64CD\u4F5C\u5417\uFF1F",E0001:"\u8BF7\u8F93\u5165{0}",E0002:"{0}\u7684\u6700\u5927\u957F\u5EA6\u662F{1}",E0003:"{0}\u7684\u683C\u5F0F\u4E0D\u6B63\u786E",E0004:"\u8BF7\u8F93\u5165\u6570\u5B57",E0005:"\u8BF7\u8F93\u5165{0}",E0006:"{0}\u7684\u6700\u5C0F\u957F\u5EA6\u662F{1}",E0007:"",I0001:"",W0001:""},Nn=class{constructor(){this.devMode=!1}getMessage(l,m){let n=this.replaceMessage(l,m);return this.devMode?`${n}(${l})`:n}replaceMessage(l,m){let n=Cn[l]||l;return m&&m.forEach((o,a)=>{let d=new RegExp(`\\{${a}\\}`,"g");n=n.replace(d,o)}),n}convertToXML(){if(document.implementation&&document.implementation.createDocument){let l=document.implementation.createDocument("","",null),m=l.createElement("MessageList");for(let n in Cn){let o=l.createElement("Message"),a=l.createElement("Id");a.textContent=n;let d=l.createElement("Text");d.textContent=Cn[n],o.appendChild(a),o.appendChild(d),m.appendChild(o)}return m}return null}},Mt=new Nn;var Dn=td(Ws()),Ir=class{static dateFormat(l,m){return l?(0,Dn.default)(l).format(m):null}static convertDate(l,m,n){if(l){let o=(0,Dn.default)(n&&m?l.substring(0,m.length):l,m);if(o.isValid())return o.toDate()}return null}static calAge(l,m){let n;if(typeof l=="string"?n=this.convertDate(l,m):n=l,n){let o=new Date,a=o.getFullYear()-n.getFullYear();return(o.getMonth()Ir.isNull(o.value)?{}:zn.idCard(o)===null?null:{idcard:{errorTip:Mt.getMessage(l,n)}}}static maxLength(l,m,...n){let o=n.length===0?[l.toString()]:n;return a=>Ni.maxLength(l)(a)===null?null:{maxlength:{errorTip:Mt.getMessage(m,o)}}}static minLength(l,m,...n){let o=n.length===0?[l.toString()]:n;return a=>Ni.minLength(l)(a)===null?null:{minLength:{errorTip:Mt.getMessage(m,o)}}}static required(l,...m){let n=m.length===0?[]:m;return o=>Ni.required(o)===null?null:{required:{errorTip:Mt.getMessage(l,n)}}}static email(l,...m){let n=m.length===0?[]:m;return o=>Ni.required(o)!==null?{required:{errorTip:Mt.getMessage(l,n)}}:Ni.email(o)!==null?{email:{errorTip:Mt.getMessage(l,n)}}:null}static mobile(l,...m){let n=m.length===0?[]:m;return o=>!o.value||zn.mobile(o)===null?null:{mobile:{errorTip:Mt.getMessage(l,n)}}}static pattern(l,m,...n){let o=n.length===0?[]:n;return a=>(l.lastIndex=0,Ni.pattern(l)(a)===null?null:{pattern:{errorTip:Mt.getMessage(m,o)}})}static other(l){return m=>l(m)}};var qe=(()=>{let l=class l{constructor(n,o,a){this.http=n,this.modalService=o,this.message=a,this.drawerWidth=550,this.deptmentServiceUrl=""}hasError(...n){return this.hasErrorBase(n)}hasErrorBase(n){let o=!1;return n&&n.forEach(a=>{if(a instanceof Mn)for(let d in a.controls){let _=a.controls[d];_ instanceof Mn?o=this.hasErrorBase([_])||o:_ instanceof xs?_.controls.forEach(N=>{N.markAsDirty(),N.updateValueAndValidity(),o=N.invalid||o}):(_.markAsDirty(),_.updateValueAndValidity(),o=_.invalid||o)}else if(a instanceof Sn){let d=a.root.properties;if(d)for(let _ in d){let N=d[_];N instanceof Sn&&(N.updateValueAndValidity(),o=N.valid||o)}}}),o}getMessage(n,...o){return this.getMessageBase(n,o)}getMessageBase(n,o){return Mt.getMessage(n,o)}showMessage(n){this.message.info(this.getMessage(n.messageId))}showConfirm(n){this.modalService.create({nzTitle:n.title,nzContent:n.message,nzClosable:!1,nzBodyStyle:{"font-size":"1.5rem"},nzOnOk:()=>{n.okCallback&&n.okCallback()},nzOnCancel:()=>{n.cancelCallback&&n.cancelCallback()}})}showModal(n){let o=600;switch(n.widthClass){case"xxl":o=1200;break;case"xl":o=1e3;break;case"lg":o=800;break;case"sm":o=600;break;case"xs":o=400;break}return this.modalService.create({nzTitle:n.title,nzContent:n.component,nzData:n.componentParams,nzClosable:!0,nzWidth:o,nzOnOk:n.okCallBack,nzFooter:n.footer,nzStyle:n.style})}post(n,o,a){return Qe(this,null,function*(){switch(o){case"put":return this.http.put(n,a).subscribe(d=>{});case"post":return this.http.post(n,a).subscribe(d=>{});case"get":return this.http.get(n,a).subscribe(d=>{});case"delete":return this.http.delete(n,a).subscribe(d=>{})}})}};l.\u0275fac=function(o){return new(o||l)(Sr(K),Sr(Mi),Sr(bs))},l.\u0275prov=vs({token:l,factory:l.\u0275fac,providedIn:"root"});let c=l;return c})();var od=["sf"],ad=["st"];function ld(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}}function ud(c,l){c&1&&(p(0,"se",15),b(1,"input",16),f())}function dd(c,l){c&1&&(p(0,"se",17),b(1,"input",18),f())}function md(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),O(3,ud,2,0,"se",13)(4,dd,2,0,"se",14),f()),c&2){let m=w();M("formGroup",m.form),y(3),M("ngIf",m.isNew()),y(),M("ngIf",m.isNew())}}function cd(c,l){if(c&1){let m=L();p(0,"div",19)(1,"button",20),T("click",function(){k(m);let o=w();return E(o.save())}),C(2,"\u786E\u5B9A"),f()()}}var fd=()=>({front:!1}),Hs="\u65B0\u5EFA\u79DF\u6237",pd="\u7F16\u8F91\u79DF\u6237",Bs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.url="/api/multi-tenancy/tenants",this.drawerVisible=!1,this.defaultCheckedKeys=[],this.pageIndex=1,this.pageSize=10,this.total=0,this.filter="",this.title="",this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",click:n=>this.edit(n.id)},{text:"\u5220\u9664",pop:!0,click:n=>this.delete(n.id)}]},{title:"\u79DF\u6237\u540D\u79F0",index:"name"},{title:"\u79DF\u6237ID",index:"id"}],this.form=this.fb.group({id:[],name:["",A.required("E0001","\u79DF\u6237\u540D\u79F0")],adminEmailAddress:[,A.other(n=>this.isNew()?A.required("E0001","\u7BA1\u7406\u5458\u90AE\u7BB1")(n):null)],adminPassword:[,A.other(n=>this.isNew()?A.required("E0001","\u7BA1\u7406\u5458\u5BC6\u7801")(n):null)]})}ngOnInit(){this.getTenantList(this.pageIndex,this.pageSize,this.filter)}search(){this.pageIndex=1,this.pageSize=10,this.filter=this.sf.value.filter,this.getTenantList(this.pageIndex,this.pageSize,this.filter)}getTenantList(n,o,a){let d={skipCount:(n-1)*o,maxResultCount:o,filter:a??""};this.http.get(this.url,d).subscribe(_=>{this.tenantList=_.items,this.total=_.totalCount})}add(){this.title=Hs,this.drawerVisible=!0}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue(),o=this.form.getRawValue().id;o?this.http.put(`${this.url}/${o}`,n).subscribe(a=>Qe(this,null,function*(){this.drawerVisible=!1,this.form.reset(),this.baseService.showMessage({messageId:"C0003"}),this.st.reload()})):this.http.post(this.url,n).subscribe(a=>Qe(this,null,function*(){this.drawerVisible=!1,this.form.reset(),this.baseService.showMessage({messageId:"C0003"}),this.st.reload()}))}edit(n){this.title=pd,this.http.get(`${this.url}/${n}`).subscribe(o=>{this.form.patchValue(Object.assign(o,{})),this.drawerVisible=!0,this.st.reload()})}delete(n){this.http.delete(`${this.url}/${n}`).subscribe(o=>{this.st.reload()})}stPageChange(n){n.type=="pi"&&(this.pageIndex=n.pi,this.getTenantList(this.pageIndex,this.pageSize,this.filter))}isNew(){return this.title==Hs}close(){this.drawerVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-tenant-manage"]],viewQuery:function(o,a){if(o&1&&(q(od,5),q(ad,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:14,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["size","small",3,"data","columns","pi","ps","total","page","change"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u79DF\u6237\u540D\u79F0","autoErrorTip","","required",""],["nz-input","","formControlName","name","placeholder","\u79DF\u6237\u540D\u79F0"],["label","\u7BA1\u7406\u5458\u90AE\u7BB1","autoErrorTip","","required","",4,"ngIf"],["label","\u7BA1\u7406\u5458\u5BC6\u7801","autoErrorTip","","required","",4,"ngIf"],["label","\u7BA1\u7406\u5458\u90AE\u7BB1","autoErrorTip","","required",""],["nz-input","","formControlName","adminEmailAddress","placeholder","\u7BA1\u7406\u5458\u90AE\u7BB1"],["label","\u7BA1\u7406\u5458\u5BC6\u7801","autoErrorTip","","required",""],["nz-input","","type","password","formControlName","adminPassword","placeholder","\u7BA1\u7406\u5458\u5BC6\u7801"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,ld,2,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(){return a.search()}),f(),p(6,"st",4,5),T("change",function(_){return a.stPageChange(_)}),f()(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,md,5,3,"form",7)(10,cd,3,0,"ng-template",null,8,B),f()),o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.tenantList)("columns",a.columns)("pi",a.pageIndex)("ps",a.pageSize)("total",a.total)("page",We(13,fd)),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.drawerVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[$e,Dt,Ri,at,nt,st,ot,lt,ut,Ge,Ae,Re,ct,ft,mt,Ue,He,Be,dt,Ie,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var hd=["tree"],Rr=(()=>{let l=class l{constructor(){this.http=v(K),this.role=v(Nr),this.defaultCheckedKeys=[],this.defaultSelectedKeys=[],this.defaultExpandedKeys=[],this.nodes=[],this.permissions=[]}ngOnInit(){let n=`/api/permission-management/permissions?providerName=R&providerKey=${this.role}`;this.http.get(n).subscribe(o=>{console.log(o),this.nodes=[...o.groups.map(a=>({title:a.displayName,key:a.name,children:a.permissions.filter(d=>!d.parentName).map(d=>({title:d.displayName,key:d.name,children:a.permissions.filter(_=>_.parentName==d.name).map(_=>({title:_.displayName,key:_.name,isLeaf:!0}))}))}))],o.groups.forEach(a=>{a.permissions.forEach(d=>{d.isGranted==!0&&d.parentName!=null?this.defaultCheckedKeys.push(d.name):d.isGranted==!0&&d.parentName==null&&a.permissions.findIndex(N=>N.parentName==d.name&&N.isGranted==!1)==-1&&this.defaultCheckedKeys.push(d.name)})}),this.defaultCheckedKeys=[...this.defaultCheckedKeys]})}nzEvent(n){if(n.eventName=="check"){this.permissions=[];var o=[];n.checkedKeys?.forEach(a=>{a.level!=0&&o.push(a.key),a.children&&a.children.forEach(d=>{o.push(d.key),d.children&&d.children.forEach(_=>{o.push(_.key)})})}),o.forEach(a=>{this.defaultCheckedKeys.includes(a)||this.permissions.push({name:a,isGranted:!0})}),this.defaultCheckedKeys.forEach(a=>{o.includes(a)||this.permissions.push({name:a,isGranted:!1})})}}getPermissions(){let n=this.tree.getCheckedNodeList(),o=this.tree.getHalfCheckedNodeList();this.permissions=[];let a=[];return n.forEach(d=>{d.level!=0&&a.push(d.key),d.children&&d.children.forEach(_=>{a.push(_.key),_.children&&_.children.forEach(N=>{a.push(N.key)})})}),o.forEach(d=>{d.level!=0&&a.push(d.key)}),a.forEach(d=>{this.defaultCheckedKeys.includes(d)||this.permissions.push({name:d,isGranted:!0})}),this.defaultCheckedKeys.forEach(d=>{a.includes(d)||this.permissions.push({name:d,isGranted:!1})}),this.permissions}aaa(){console.log(this.tree.getCheckedNodeList()),console.log(this.tree.getHalfCheckedNodeList())}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-perms-setting"]],viewQuery:function(o,a){if(o&1&&q(hd,5),o&2){let d;j(d=Q())&&(a.tree=d.first)}},standalone:!0,features:[X],decls:3,vars:4,consts:[["nzCheckable","","nzMultiple","",3,"nzData","nzCheckedKeys","nzExpandedKeys","nzSelectedKeys","nzCheckBoxChange"],["tree",""]],template:function(o,a){o&1&&(p(0,"nz-card")(1,"nz-tree",0,1),T("nzCheckBoxChange",function(_){return a.nzEvent(_)}),f()()),o&2&&(y(),M("nzData",a.nodes)("nzCheckedKeys",a.defaultCheckedKeys)("nzExpandedKeys",a.defaultExpandedKeys)("nzSelectedKeys",a.defaultSelectedKeys))},dependencies:[$e,Vr,Ie,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var gd=["sf"],yd=["tree"],Md=["st"];function Sd(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}if(c&2){let m=w();M("acl",m.newAcl)}}function zd(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),p(3,"se",13),b(4,"label",14),f(),p(5,"se",15),b(6,"label",16),f()()),c&2){let m=w();M("formGroup",m.form)}}function Cd(c,l){if(c&1){let m=L();p(0,"div",17)(1,"button",18),T("click",function(){k(m);let o=w();return E(o.submit())}),C(2,"\u786E\u5B9A"),f()()}}var Nd=()=>({front:!1}),Us=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.modalService=v(Mi),this.newAcl={ability:["AbpIdentity.Roles.Create"]},this.url="/api/identity/roles",this.drawerVisible=!1,this.defaultCheckedKeys=[],this.pageIndex=1,this.pageSize=10,this.total=0,this.filter="",this.title="",this.form=this.fb.group({id:[],name:["",A.required("E0001","\u89D2\u8272\u540D\u79F0")],isDefault:[!1],isPublic:[!0]}),this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u6743\u9650",acl:{ability:["SettingSys.RolePermission"]},click:n=>this.permissionEdit(n.name)},{text:"\u7F16\u8F91",acl:{ability:["AbpIdentity.Roles.Update"]},iif:n=>!n.isStatic,click:n=>this.edit(n.id)},{text:"\u5220\u9664",acl:{ability:["AbpIdentity.Roles.Delete"]},iif:n=>!n.isStatic,click:n=>this.delete(n.id)}]},{title:"\u89D2\u8272\u540D\u79F0",index:"name"},{title:"\u9ED8\u8BA4",index:"isDefault",type:"yn"},{title:"\u516C\u5171",index:"isPublic",type:"yn"}]}ngOnInit(){this.getRoleList(this.pageIndex,this.pageSize,this.filter)}roleChange(n){n.type=="radio"&&(this.currentRole=n.radio)}getRoleList(n,o,a){let d={skipCount:(n-1)*o,maxResultCount:o,filter:a??""};this.http.get(this.url,d).subscribe(_=>{this.roleList=_.items,this.total=_.totalCount})}stPageChange(n){n.type=="pi"&&(this.pageIndex=n.pi,this.getRoleList(this.pageIndex,this.pageSize,this.filter))}reset(){this.pageIndex=1,this.pageSize=10,this.getRoleList(this.pageIndex,this.pageSize,this.filter)}search(){this.pageIndex=1,this.pageSize=10,this.filter=this.sf.value.filter,this.getRoleList(this.pageIndex,this.pageSize,this.filter)}add(){this.title="\u65B0\u589E\u89D2\u8272",this.drawerVisible=!0}refresh(){this.st.reload()}save(){var n=[],o=[];if(this.tree.getCheckedNodeList().forEach(a=>{o.push(a.key)}),this.tree.getHalfCheckedNodeList().forEach(a=>{n.push(a.key)}),this.currentRole){let a={roleValue:this.currentRole.name,checkedMenus:o,halfCheckedMenus:n};this.http.post("/api/main/menu/role-as-menu",a).subscribe(d=>{console.log(d),this.baseService.showMessage({messageId:"C0003"})})}}edit(n){this.title="\u7F16\u8F91\u89D2\u8272",this.http.get(`${this.url}/${n}`).subscribe(o=>{this.form.patchValue(Object.assign(o,{})),this.drawerVisible=!0,this.st.reload()})}delete(n){this.baseService.showConfirm({message:this.baseService.getMessage("C0001"),okCallback:()=>{this.http.delete(`${this.url}/${n}`).subscribe(o=>{this.st.reload()})}})}permissionEdit(n){let o=this.modalService.create({nzTitle:"\u6743\u9650\u7F16\u8F91",nzContent:Rr,nzWidth:480,nzData:n,nzOnOk:a=>{let d={permissions:a.getPermissions()};console.log(d),this.http.put(`/api/permission-management/permissions?providerName=R&providerKey=${n}`,d).subscribe(_=>{})}})}submit(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.form.reset({isDefault:!1,isPublic:!0}),this.drawerVisible=!1,this.st.reload()}):this.http.post(this.url,n).subscribe(o=>{this.form.reset({isDefault:!1,isPublic:!0}),this.drawerVisible=!1,this.st.reload()})}close(){this.drawerVisible=!1}nzEvent(n){this.selectedKeys=n.keys}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-role-manage"]],viewQuery:function(o,a){if(o&1&&(q(gd,5),q(yd,5),q(Md,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.tree=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:14,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["size","small",3,"data","columns","pi","ps","total","page","change"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"acl","click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u89D2\u8272","autoErrorTip","","required",""],["nz-input","","formControlName","name","placeholder","\u89D2\u8272\u540D\u79F0"],["label","\u9ED8\u8BA4"],["nz-checkbox","","formControlName","isDefault"],["label","\u516C\u5F00"],["nz-checkbox","","formControlName","isPublic"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,Sd,2,1,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(){return a.search()}),f(),p(6,"st",4,5),T("change",function(_){return a.stPageChange(_)}),f()(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,zd,7,1,"form",7)(10,Cd,3,0,"ng-template",null,8,B),f()),o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.roleList)("columns",a.columns)("pi",a.pageIndex)("ps",a.pageSize)("total",a.total)("page",We(13,Nd)),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.drawerVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[$e,Dt,at,nt,st,ot,lt,ut,Cr,Ge,Ae,Re,ct,ft,mt,Ue,He,Be,dt,Ie,Ke,Ze,ks,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var vd=["sf"],Dd=["st"];function bd(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}if(c&2){let m=w();M("acl",m.newAcl)}}function wd(c,l){if(c&1&&b(0,"nz-option",26),c&2){let m=l.$implicit,n=w(2);M("nzLabel",m.name)("nzValue",m.name)("nzHide",!n.isNotSelected(m))}}function Td(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),p(3,"se",13),b(4,"input",14),f(),p(5,"se",15),b(6,"input",16),f(),p(7,"se",17),b(8,"input",18),f(),p(9,"se",19),b(10,"input",20),f(),p(11,"se",21)(12,"nz-select",22),O(13,wd,1,3,"nz-option",23),f()(),p(14,"se",24),b(15,"nz-switch",25),f()()),c&2){let m=w();M("formGroup",m.form),y(3),M("required",m.isNew()),y(10),M("ngForOf",m.roleOfOption)}}function xd(c,l){if(c&1){let m=L();p(0,"div",27)(1,"button",28),T("click",function(){k(m);let o=w();return E(o.save())}),C(2,"\u786E\u5B9A"),f()()}}var kd=()=>({front:!1}),Ed="\u7F16\u8F91\u7528\u6237",bn="\u65B0\u589E\u7528\u6237",Gs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.notification=v(Dr),this.newAcl={ability:["AbpIdentity.Users.Create"]},this.editVisible=!1,this.title="",this.url="/api/identity/users",this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",acl:{ability:["AbpIdentity.Users.Update"]},click:n=>this.edit(n)},{text:"\u5220\u9664",acl:{ability:["AbpIdentity.Users.Delete"]},pop:!0,click:n=>this.delete(n)}]},{title:"\u767B\u5F55\u8D26\u6237",index:"userName"},{title:"\u59D3\u540D",index:"name"},{title:"\u90AE\u7BB1",index:"email"},{title:"\u624B\u673A\u53F7",index:"phoneNumber"},{title:"\u521B\u5EFA\u65F6\u95F4",index:"creationTime",type:"date",dateFormat:"yyyy-MM-dd",width:100},{title:"\u6709\u6548\u6027",index:"isActive",type:"badge",badge:{true:{text:"\u6709\u6548",color:"success"},false:{text:"\u65E0\u6548",color:"default"}}}],this.form=this.fb.group({id:[],userName:[,A.required("E0001","\u767B\u5F55\u8D26\u6237")],password:[,A.other(n=>this.isNew()?A.required("E0001","\u767B\u5F55\u8D26\u6237")(n):null)],name:[,A.required("E0001","\u59D3\u540D")],surname:[],email:[,A.email("E0003","\u90AE\u7BB1")],phoneNumber:[],lockoutEnabled:[!0],isActive:[!0],roleNames:[]}),this.loading=!1,this.pageIndex=1,this.pageSize=10,this.filter="",this.total=0,this.roleOfSelectedValue=[]}ngOnInit(){this.getRoles(),this.getUserList(this.pageIndex,this.pageSize,this.filter)}getRoles(){this.http.get("/api/identity/users/assignable-roles").subscribe(n=>{this.roleOfOption=n.items})}stPageChange(n){n.type=="pi"&&(this.pageIndex=n.pi,this.getUserList(this.pageIndex,this.pageSize,this.filter))}reset(){this.pageIndex=1,this.pageSize=10,this.getUserList(this.pageIndex,this.pageSize,"")}search(){this.pageIndex=1,this.pageSize=10,this.filter=this.sf.value.filter,this.getUserList(this.pageIndex,this.pageSize,this.filter)}getUserList(n,o,a){let d={skipCount:(n-1)*o,maxResultCount:o,filter:a??""};this.http.get(this.url,d).subscribe(_=>{this.userList=_.items,this.total=_.totalCount})}add(){this.title=bn,this.form.reset({lockoutEnabled:!0,isActive:!0}),this.editVisible=!0}edit(n){this.http.get(`${this.url}/${n.id}/roles`).subscribe(o=>{this.roleOfSelectedValue=o.items.map(a=>a.name),n.roleNames=this.roleOfSelectedValue,this.form.reset({}),this.form.patchValue(n),this.title=Ed,this.editVisible=!0})}delete(n){this.http.delete(`${this.url}/${n.id}`).subscribe(o=>{this.reset()})}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();this.title==bn?this.http.post(`${this.url}`,n).subscribe(o=>{this.form.reset({lockoutEnabled:!0,isActive:!0}),this.editVisible=!1,this.reset()}):this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.form.reset({lockoutEnabled:!0,isActive:!0}),this.editVisible=!1,this.reset()})}isNotSelected(n){return this.roleOfSelectedValue.indexOf(n)===-1}close(){this.editVisible=!1}isNew(){return this.title==bn}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-user-manage"]],viewQuery:function(o,a){if(o&1&&(q(vd,5),q(Dd,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:14,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["size","small",3,"data","columns","pi","ps","total","page","change"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"acl","click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u767B\u5F55\u8D26\u6237","autoErrorTip","","required",""],["nz-input","","formControlName","userName","placeholder","\u767B\u5F55\u8D26\u6237"],["label","\u767B\u5F55\u5BC6\u7801","autoErrorTip","",3,"required"],["nz-input","","type","password","formControlName","password","placeholder","\u767B\u5F55\u5BC6\u7801"],["label","\u90AE\u7BB1","autoErrorTip","","required",""],["nz-input","","formControlName","email","placeholder","\u90AE\u7BB1"],["label","\u59D3\u540D","autoErrorTip","","required",""],["nz-input","","formControlName","name","placeholder","\u59D3\u540D"],["label","\u624B\u673A\u53F7"],["nz-input","","formControlName","phoneNumber","placeholder","\u624B\u673A\u53F7"],["label","\u89D2\u8272"],["nzMode","multiple","nzPlaceHolder","\u6388\u6743\u89D2\u8272","formControlName","roleNames"],[3,"nzLabel","nzValue","nzHide",4,"ngFor","ngForOf"],["label","\u6709\u6548\u6027"],["formControlName","isActive"],[3,"nzLabel","nzValue","nzHide"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,bd,2,1,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(){return a.search()}),f(),p(6,"st",4,5),T("change",function(_){return a.stPageChange(_)}),f()(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,Td,16,3,"form",7)(10,xd,3,0,"ng-template",null,8,B),f()),o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.userList)("columns",a.columns)("pi",a.pageIndex)("ps",a.pageSize)("total",a.total)("page",We(13,kd)),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.editVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[$e,Dt,yi,at,nt,st,ot,lt,ut,Cr,Ge,Ae,Re,ct,ft,Ps,mt,Ue,He,Be,dt,Ai,Li,Ie,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Fd=["st"];function Od(c,l){if(c&1){let m=L();p(0,"button",9),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}}function Vd(c,l){if(c&1&&(p(0,"form",10)(1,"se",11),b(2,"input",12),f(),p(3,"se",13),b(4,"input",14),f(),p(5,"se",15),b(6,"input",16),f()()),c&2){let m=w();M("formGroup",m.form)}}function Pd(c,l){if(c&1){let m=L();p(0,"div",17)(1,"button",18),T("click",function(){k(m);let o=w();return E(o.save())}),C(2,"\u786E\u5B9A"),f()()}}var Id=()=>({list:"items",total:"totalCount"}),$s=c=>({reName:c}),Yd=()=>({pi:"skipCount",ps:"maxResultCount"}),qs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.modalService=v(Mi),this.url="/api/main/organ-info",this.searchSchema={properties:{type:{type:"number",title:"\u72B6\u6001",enum:[{label:"\u5168\u90E8",value:99},{label:"\u672A\u5BA1\u6838",value:0},{label:"\u5BA1\u6838\u672A\u901A\u8FC7",value:1},{label:"\u5BA1\u6838\u901A\u8FC7",value:9}],default:99},filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",click:n=>{this.edit(n)}},{text:"\u5220\u9664",pop:!0,click:n=>{this.delete(n)}}]},{title:"\u673A\u6784\u540D\u79F0",index:"organName"},{title:"\u7BA1\u7406\u5458\u8D26\u6237",index:"adminName"},{title:"\u7BA1\u7406\u5458\u90AE\u7BB1",index:"adminEmail"},{title:"\u7BA1\u7406\u5458\u7535\u8BDD",index:"adminTel"},{title:"\u7533\u8BF7\u65F6\u95F4",index:"begntime",type:"date",dateFormat:"yyyy-MM-dd",width:120},{title:"\u72B6\u6001",index:"organStatusDisplay"}],this.editVisible=!1,this.title="",this.loading=!1,this.form=this.fb.group({id:[],organName:[,A.required("E0001","\u673A\u6784\u540D\u79F0")],adminTel:[,A.required("E0001","\u7BA1\u7406\u5458\u7535\u8BDD")],adminEmail:[,A.required("E0001","\u7BA1\u7406\u5458\u90AE\u7BB1")]})}ngOnInit(){}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.reset()}):this.http.post(this.url,n).subscribe(o=>{this.reset()})}reset(){this.editVisible=!1,this.st.reload()}add(){this.editVisible=!0,this.form.reset()}edit(n){this.editVisible=!0,this.http.get(`${this.url}/${n.id}`).subscribe(o=>{this.form.patchValue(o)})}delete(n){this.http.delete(`${this.url}/${n.id}`).subscribe(o=>{this.st.reload()})}review(n){this.http.put(`/api/main/organ/${n.id}/review-organ`,{}).subscribe(o=>{this.st.reload()})}close(){this.editVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-organ-manage"]],viewQuery:function(o,a){if(o&1&&q(Fd,5),o&2){let d;j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:12,vars:17,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit","formReset"],["sf",""],["size","small",3,"data","columns","res","req"],["st",""],["nzPlacement","right",3,"nzClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u673A\u6784\u540D\u79F0","autoErrorTip","","required",""],["nz-input","","formControlName","organName","placeholder","\u673A\u6784\u540D\u79F0"],["label","\u7BA1\u7406\u5458\u7535\u8BDD","autoErrorTip","","required",""],["nz-input","","formControlName","adminTel","placeholder","\u7BA1\u7406\u5458\u7535\u8BDD"],["label","\u7BA1\u7406\u5458\u90AE\u7BB1","autoErrorTip","","required",""],["nz-input","","formControlName","adminEmail","placeholder","\u7BA1\u7406\u5458\u90AE\u7BB1"],[2,"float","right"],["nz-button","","nzType","primary","type","submit",3,"click"]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,Od,2,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(N){k(d);let W=P(7);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(7);return E(W.reset(N))}),f(),b(6,"st",4,5),f(),p(8,"nz-drawer",6),T("nzOnClose",function(){return a.close()}),O(9,Vd,7,1,"form",7)(10,Pd,3,0,"ng-template",null,8,B),f()}if(o&2){let d=P(2),_=P(11);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.url)("columns",a.columns)("res",rt(12,$s,We(11,Id)))("req",rt(15,$s,We(14,Yd))),y(2),M("nzClosable",!0)("nzWidth",460)("nzVisible",a.editVisible)("nzTitle",a.title)("nzFooter",_)}},dependencies:[se,at,nt,st,ot,oe,lt,ut,De,Ae,ye,Re,we,ct,ft,Te,be,Ne,Ge,ne,he,ge,Oe,Ce,Se,mt,Me,te,Ue,He,Be,fe,dt,pe,xe,Fe,de,ke,ze,Ie,ue,_e,ce,Ee,re,Ke,Ze,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Rd=["sf"];function Ad(c,l){if(c&1){let m=L();p(0,"button",11),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u5EFA"),f()}}function Ld(c,l){if(c&1&&b(0,"nz-option",34),c&2){let m=l.$implicit;M("nzValue",m.id)("nzLabel",m.organName)}}function Wd(c,l){if(c&1&&b(0,"nz-option",34),c&2){let m=l.$implicit;M("nzValue",m.dataDictCode)("nzLabel",m.dataDictName)}}var Hd=c=>({process:c});function Bd(c,l){if(c&1){let m=L();p(0,"form",12)(1,"se",13)(2,"nz-select",14),O(3,Ld,1,2,"nz-option",15),f()(),p(4,"se",16),b(5,"input",17),f(),p(6,"se",18),b(7,"input",19),f(),p(8,"se",20),b(9,"input",21),f(),p(10,"se",22),b(11,"nz-input-number",23),f(),p(12,"se",24)(13,"nz-select",25),T("ngModelChange",function(o){k(m);let a=w();return E(a.selecteOptionChange(o,0))}),O(14,Wd,1,2,"nz-option",15),f()(),p(15,"se",26),b(16,"nz-date-picker",27),f(),p(17,"se",28),b(18,"nz-date-picker",29),f(),p(19,"se",30),b(20,"input",31),f(),b(21,"nz-divider"),p(22,"st",32,33),T("change",function(o){k(m);let a=w();return E(a.propertyChange(o))}),f()()}if(c&2){let m=w();M("formGroup",m.editForm),y(3),M("ngForOf",m.organList),y(8),M("nzStep",1)("nzMin",0)("nzPrecision",2),y(3),M("ngForOf",m.catyList),y(8),M("data",m.propertyList)("columns",m.propertyColumns)("res",rt(9,Hd,m.dataProcess))}}function Ud(c,l){if(c&1){let m=L();p(0,"div",35)(1,"button",36),T("click",function(){k(m);let o=w();return E(o.close())}),C(2,"\u53D6\u6D88"),f(),p(3,"button",11),T("click",function(){k(m);let o=w();return E(o.save())}),C(4,"\u4FDD\u5B58"),f()()}}function Gd(c,l){if(c&1){let m=L();p(0,"tr")(1,"td")(2,"a",38),T("click",function(){k(m);let o=w().$implicit,a=w(2);return E(a.addChild(o))}),C(3,"\u65B0\u589E\u5B50\u9879"),f(),b(4,"nz-divider",39),p(5,"a",38),T("click",function(){k(m);let o=w().$implicit,a=w(2);return E(a.edit(o))}),C(6,"\u7F16\u8F91"),f(),b(7,"nz-divider",39),p(8,"a",38),T("click",function(){k(m);let o=w().$implicit,a=w(2);return E(a.del(o))}),C(9,"\u5220\u9664"),f()(),p(10,"td",40),T("nzExpandChange",function(o){k(m);let a=w().$implicit;return E(a.expand=o)})("nzExpandChange",function(o){k(m);let a=w().$implicit,d=w().$implicit,_=w();return E(_.collapse(_.mapOfExpandedData[d.id],a,o))}),C(11),f(),p(12,"td"),C(13),f(),p(14,"td"),C(15),f(),p(16,"td"),C(17),f()()}if(c&2){let m=w().$implicit;y(10),M("nzIndentSize",m.level*20)("nzShowExpand",!!m.children&&m.children.length!=0)("nzExpand",m.expand),y(),zr(" ",m.deptName," "),y(2),Z(m.deptCodg),y(2),Z(m.srtNo),y(2),Z(m.itro)}}function $d(c,l){if(c&1&&(Ii(0),O(1,Gd,18,7,"tr",37),Yi()),c&2){let m=l.$implicit;y(),M("ngIf",m.parent&&m.parent.expand||!m.parent)}}function qd(c,l){if(c&1&&(Ii(0),O(1,$d,2,1,"ng-container",10),Yi()),c&2){let m=l.$implicit,n=w();y(),M("ngForOf",n.mapOfExpandedData[m.id])}}var jd="\u65B0\u589E\u90E8\u95E8\u4FE1\u606F",Qd="\u4FEE\u6539\u90E8\u95E8\u4FE1\u606F",js=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.modalService=v(Mi),this.settings=v(vr),this.url="/api/main/dept-info",this.deptList=[],this.editVisible=!1,this.detailTitle="",this.filter="",this.mapOfExpandedData={},this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.editForm=this.fb.group({id:[],parentId:[""],parentName:[""],organId:[null,A.required("E0001","\u6240\u5C5E\u673A\u6784")],deptCodg:[null,A.required("E0001","\u90E8\u95E8\u7F16\u7801")],deptName:[null,A.required("E0001","\u90E8\u95E8\u540D\u79F0")],deptAssocAttrs:[],srtNo:[0],begntime:[,A.required("E0001","\u5F00\u59CB\u65F6\u95F4")],endtime:[],itro:[],catyCode:[,A.required("E0001","\u79D1\u522B")],catyName:[,A.required("E0001","\u79D1\u522B")],memo:[]}),this.propertyColumns=[{title:"\u7F16\u53F7",index:"value.id",type:"checkbox"},{title:"\u5C5E\u6027\u4EE3\u7801",index:"deptAttrCodg"},{title:"\u5C5E\u6027\u540D\u79F0",index:"deptAttrName"},{title:"\u8BF4\u660E",index:"exp"}]}ngOnInit(){this.getOrganList(),this.currentOrgan=this.settings.user.currentOrgan,this.getDeptmentProperty([]),this.getDataDictList(),this.editForm.get("parentName")?.disable(),this.editForm.get("organId")?.disable(),this.getDeptList(this.filter)}getDataDictList(){var n="/api/main/data-dict/grp-dict-list?DataDictTypeCode=caty";this.http.get(n).subscribe(o=>{this.catyList=o.caty})}getOrganList(){this.http.get("/api/main/organ-info").subscribe(n=>{this.organList=n.items})}search(){this.filter=this.sf.value.filter,this.getDeptList(this.filter)}getDeptList(n){let o={filter:n??"",organId:this.currentOrgan.id};this.http.get(this.url,o).subscribe(a=>{this.deptList=a,this.deptList.forEach(d=>{this.mapOfExpandedData[d.id]=this.convertTreeToList(d)})})}add(){this.currentOrgan!=null&&(this.editForm.reset({organId:this.currentOrgan.id}),this.editVisible=!0,this.detailTitle=jd)}addChild(n){this.add(),this.editForm.patchValue({parentId:n.id,parentName:n.deptName})}edit(n){this.http.get(`${this.url}/${n.id}`).subscribe(o=>{this.editForm.patchValue(o),this.editVisible=!0,this.detailTitle=Qd,this.getDeptmentProperty(o.deptAssocAttrs)})}save(){if(this.baseService.hasError(this.editForm))return;let n=this.editForm.getRawValue();n.deptAssocAttrs=this.propertyCheckedList?.map(o=>({deptAttrId:o.id})),n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>Qe(this,null,function*(){this.getDeptList(this.filter),this.getDeptmentProperty([]),this.close()})):this.http.post(this.url,n).subscribe(o=>Qe(this,null,function*(){this.getDeptList(this.filter),this.getDeptmentProperty([]),this.close()}))}del(n){this.http.delete(`${this.url}/${n.id}`).subscribe(o=>Qe(this,null,function*(){this.getDeptList(this.filter)}))}close(){this.editVisible=!1}convertTreeToList(n){let o=[],a=[],d={};for(o.push(Pi(gi({},n),{level:0,expand:!1}));o.length!==0;){let _=o.pop();if(this.visitNode(_,d,a),_.children)for(let N=_.children.length-1;N>=0;N--)o.push(Pi(gi({},_.children[N]),{level:_.level+1,expand:!1,parent:_}))}return a}visitNode(n,o,a){o[n.id]||(o[n.id]=!0,a.push(n))}collapse(n,o,a){if(!a)if(o.children)o.children.forEach(d=>{let _=n.find(N=>N.id===d.id);_.expand=!1,this.collapse(n,_,!1)});else return}selecteOptionChange(n,o){switch(o){case 0:if(this.catyList){let a=this.catyList.find(d=>d.dataDictCode==n);a&&this.editForm.patchValue({catyName:a.dataDictName})}break}}getDeptmentProperty(n){}dataProcess(n){return n.map((o,a)=>(o.checked=o.isChecked,o))}propertyChange(n){n.type=="checkbox"&&(this.propertyCheckedList=n.checkbox)}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-dept-manage"]],viewQuery:function(o,a){if(o&1&&q(Rd,5),o&2){let d;j(d=Q())&&(a.sf=d.first)}},standalone:!0,features:[X],decls:28,vars:10,consts:[[3,"action"],["phActionTpl",""],[3,"nzMaskClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-col","","nzXs","24","nzSm","24","nzMd","8"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["mode","search",3,"schema","formSubmit"],["sf",""],["nzTableLayout","fixed",2,"margin-top","1.5rem",3,"nzData","nzSize"],["expandTable",""],[4,"ngFor","ngForOf"],["nz-button","","nzType","primary",3,"click"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u6240\u5C5E\u673A\u6784","required","","autoErrorTip",""],["formControlName","organId","nzPlaceHolder","\u6240\u5C5E\u673A\u6784"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["label","\u4E0A\u7EA7\u90E8\u95E8"],["nz-input","","formControlName","parentName","placeholder","-"],["label","\u79D1\u5BA4\u7F16\u7801","required","","autoErrorTip",""],["nz-input","","formControlName","deptCodg","placeholder","\u79D1\u5BA4\u7F16\u7801"],["label","\u79D1\u5BA4\u540D\u79F0","required","","autoErrorTip",""],["nz-input","","formControlName","deptName","placeholder","\u79D1\u5BA4\u540D\u79F0"],["label","\u6392\u5E8F\u53F7","required","","autoErrorTip",""],["formControlName","srtNo","nzInputMode","decimal",1,"wp100",3,"nzStep","nzMin","nzPrecision"],["label","\u79D1\u522B","required","","autoErrorTip",""],["formControlName","catyCode","nzPlaceHolder","\u79D1\u522B",3,"ngModelChange"],["label","\u5F00\u59CB\u65F6\u95F4","required","","autoErrorTip",""],["formControlName","begntime","nzPlaceHolder","\u5F00\u59CB\u65F6\u95F4",1,"width-100"],["label","\u7ED3\u675F\u65F6\u95F4","autoErrorTip",""],["formControlName","endtime","nzPlaceHolder","\u7ED3\u675F\u65F6\u95F4",1,"width-100"],["label","\u7B80\u4ECB"],["nz-input","","formControlName","itro","placeholder","\u7B80\u4ECB"],["size","small",1,"width-100",3,"data","columns","res","change"],["propertySt",""],[3,"nzValue","nzLabel"],[2,"float","right"],["nz-button","",1,"mr8",3,"click"],[4,"ngIf"],[3,"click"],["nzType","vertical"],[3,"nzIndentSize","nzShowExpand","nzExpand","nzExpandChange"]],template:function(o,a){if(o&1&&(p(0,"page-header",0),O(1,Ad,2,0,"ng-template",null,1,B),f(),p(3,"div")(4,"nz-drawer",2),T("nzOnClose",function(){return a.close()}),p(5,"div",3),O(6,Bd,24,11,"form",4),f(),O(7,Ud,5,0,"ng-template",null,5,B),f()(),p(9,"nz-card")(10,"sf",6,7),T("formSubmit",function(){return a.search()}),f(),p(12,"nz-table",8,9)(14,"thead")(15,"tr")(16,"th"),C(17,"\u64CD\u4F5C"),f(),p(18,"th"),C(19,"\u90E8\u95E8\u540D\u79F0"),f(),p(20,"th"),C(21,"\u90E8\u95E8\u4EE3\u7801"),f(),p(22,"th"),C(23,"\u6392\u5E8F\u53F7"),f(),p(24,"th"),C(25,"\u7B80\u4ECB"),f()()(),p(26,"tbody"),O(27,qd,2,1,"ng-container",10),f()()()),o&2){let d=P(2),_=P(8),N=P(13);M("action",d),y(4),M("nzMaskClosable",!1)("nzWidth",650)("nzVisible",a.editVisible)("nzTitle",a.detailTitle)("nzFooter",_),y(6),M("schema",a.searchSchema),y(2),M("nzData",a.deptList)("nzSize","small"),y(15),M("ngForOf",N.data)}},dependencies:[$e,Dt,yi,Ri,at,nt,st,ot,lt,ut,Ge,Ae,Re,ct,ft,Or,Wi,Vs,mt,Ue,He,Be,dt,Os,Ai,Li,Ie,xr,br,Tr,wr,Fr,kr,Er,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Ar=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.auditlog=v(Nr),this.auditLogActionInfoColumns=[{title:"\u670D\u52A1\u7684\u540D\u79F0",index:"serviceName"},{title:"\u65B9\u6CD5\u7684\u540D\u79F0",index:"methodName"},{title:"\u53C2\u6570\u7684JSON",index:"parameters"},{title:"\u6267\u884C\u7684\u65F6\u95F4",index:"executionTime"},{title:"\u65B9\u6CD5\u6267\u884C\u65F6\u957F",index:"executionDuration"}],this.entityChangeInfoColumns=[{title:"\u5B9E\u4F53\u88AB\u6539\u53D8\u7684\u65F6\u95F4",index:"changeTime"},{title:"\u65B9\u6CD5\u7684\u540D\u79F0",index:"changeType"},{title:"\u66F4\u6539\u5B9E\u4F53\u7684Id",index:"entityId"},{title:"\u5B9E\u4F53\u6240\u5C5E\u7684\u79DF\u6237Id",index:"entityTenantId"},{title:"\u5B9E\u4F53\u7684\u7C7B\u578B",index:"entityTypeFullName"}]}ngOnInit(){}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-audit-log-detl"]],standalone:!0,features:[X],decls:42,vars:19,consts:[["labelWidth","120"],["label","\u5E94\u7528\u7A0B\u5E8F"],["label","\u7528\u6237\u7684Id"],["label","\u7528\u6237\u540D"],["label","\u5F53\u524D\u79DF\u6237"],["label","\u79DF\u6237\u7684\u540D\u79F0"],["label","\u521B\u5EFA\u7684\u65F6\u95F4"],["label","\u6267\u884C\u65F6\u95F4"],["label","\u5BA2\u6237\u7AEF\u7684Id"],["label","\u5BA2\u6237\u7AEF\u7684\u540D\u79F0"],["label","\u5BA2\u6237\u7AEFIP\u5730\u5740"],["label","\u5F53\u524D\u76F8\u5173Id"],["label","\u6D4F\u89C8\u5668\u540D\u79F0"],["label","HTTP\u8BF7\u6C42\u7684\u65B9\u6CD5"],["label","\u54CD\u5E94\u72B6\u6001\u7801"],["label","\u8BF7\u6C42\u7684URL"],["col","1","hideLabel",""],["size","small",2,"width","100%",3,"data","columns"],["hideLabel","","col","1"]],template:function(o,a){o&1&&(p(0,"sv-container",0)(1,"sv-title"),C(2,"AuditLogInfo"),f(),p(3,"sv",1),C(4),f(),p(5,"sv",2),C(6),f(),p(7,"sv",3),C(8),f(),p(9,"sv",4),C(10),f(),p(11,"sv",5),C(12),f(),p(13,"sv",6),C(14),f(),p(15,"sv",7),C(16),f(),p(17,"sv",8),C(18),f(),p(19,"sv",9),C(20),f(),p(21,"sv",10),C(22),f(),p(23,"sv",11),C(24),f(),p(25,"sv",12),C(26),f(),p(27,"sv",13),C(28),f(),p(29,"sv",14),C(30),f(),p(31,"sv",15),C(32),f(),b(33,"nz-divider"),p(34,"sv-title"),C(35,"AuditLogActionInfo"),f(),p(36,"sv",16),b(37,"st",17),f(),p(38,"sv-title"),C(39,"EntityChangeInfo"),f(),p(40,"sv",18),b(41,"st",17),f()()),o&2&&(y(4),Z(a.auditlog.applicationName),y(2),Z(a.auditlog.userId),y(2),Z(a.auditlog.userName),y(2),Z(a.auditlog.tenantId),y(2),Z(a.auditlog.tenantName),y(2),Z(a.auditlog.executionTime),y(2),Z(a.auditlog.executionDuration),y(2),Z(a.auditlog.clientId),y(2),Z(a.auditlog.clientName),y(2),Z(a.auditlog.clientIpAddress),y(2),Z(a.auditlog.correlationId),y(2),Z(a.auditlog.browserInfo),y(2),Z(a.auditlog.httpMethod),y(2),Z(a.auditlog.httpStatusCode),y(2),Z(a.auditlog.url),y(5),M("data",a.auditlog.actions)("columns",a.auditLogActionInfoColumns),y(4),M("data",a.auditlog.entityChanges)("columns",a.entityChangeInfoColumns))},dependencies:[se,oe,De,ye,Re,we,Te,Ys,Rs,Is,be,Ne,ne,he,ge,Wi,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var Zd=["sf"],Kd=["st"];function Jd(c,l){}var Xd=()=>({list:"items",total:"totalCount"}),em=c=>({reName:c}),Qs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.baseService=v(qe),this.notification=v(Dr),this.url="/api/main/audit-log",this.searchSchema={properties:{startTime:{type:"string",ui:{widget:"date",end:"endTime",separator:"\u5230"},format:"date",title:"\u65E5\u671F",default:new Date},endTime:{type:"string",default:new Date}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u67E5\u770B",click:n=>this.detl(n)}]},{title:"\u5E94\u7528\u7A0B\u5E8F",index:"applicationName"},{title:"URL",index:"url"},{title:"\u7528\u6237\u540D",index:"userName"},{title:"\u521B\u5EFA\u65F6\u95F4",index:"executionTime",type:"date",dateFormat:"yyyy-MM-dd HH:mm"},{title:"\u6267\u884C\u65F6\u95F4",index:"executionDuration"},{title:"IP\u5730\u5740",index:"clientIpAddress"},{title:"\u8BF7\u6C42\u7684\u65B9\u6CD5",index:"httpMethod"},{title:"\u72B6\u6001\u7801.",index:"httpStatusCode"}]}ngOnInit(){}detl(n){this.baseService.showModal({title:"\u5BA1\u8BA1\u65E5\u5FD7",widthClass:"xl",component:Ar,componentParams:n,footer:null,okCallBack:()=>{}})}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-audit-log"]],viewQuery:function(o,a){if(o&1&&(q(Zd,5),q(Kd,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:8,vars:8,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit","formReset"],["sf",""],["size","small",3,"data","columns","res"],["st",""]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,Jd,0,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2,3),T("formSubmit",function(N){k(d);let W=P(7);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(7);return E(W.reset(N))}),f(),b(6,"st",4,5),f()}if(o&2){let d=P(2);M("action",d),y(4),M("schema",a.searchSchema),y(2),M("data",a.url)("columns",a.columns)("res",rt(6,em,We(5,Xd)))}},dependencies:[se,oe,De,Ae,ye,Re,we,Te,be,Ne,Ge,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,Ie,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var tm=["st"];function im(c,l){}function rm(c,l){if(c&1&&(p(0,"div"),b(1,"ag-grid-angular",8),f()),c&2){let m=w();y(),M("rowData",m.dataDictionaryList)("columnDefs",m.colDefs)}}function nm(c,l){if(c&1){let m=L();p(0,"div",9)(1,"button",10),T("click",function(){k(m);let o=w();return E(o.close())}),C(2,"\u53D6\u6D88"),f(),p(3,"button",11),T("click",function(){k(m);let o=w();return E(o.save())}),C(4,"\u4FDD\u5B58"),f()()}}var sm=()=>({list:"items",total:"totalCount"}),om=c=>({reName:c}),Zs="\u65B0\u589E\u5B57\u5178\u4FE1\u606F",am="\u4FEE\u6539\u5B57\u5178\u4FE1\u606F",Ks=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.baseService=v(qe),this.fb=v(Je),this.url="/api/main/data-dict-type",this.searchSchema={properties:{filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u67E5\u770B",click:n=>this.detl(n)}]},{title:"\u7C7B\u578B\u4EE3\u7801",index:"dataDictTypeCode"},{title:"\u7C7B\u578B\u540D\u79F0",index:"dataDictTypeName"},{title:"\u6392\u5E8F\u53F7",index:"sotNo"},{title:"\u5206\u7EC4",index:"dataDictTypeModule"}],this.dataTypeNodes=[],this.editVisible=!1,this.detailTitle="",this.editForm=this.fb.group({dataDictionaryTypeValue:[],dataDictionaryTypeLabel:[],value:[],label:[],sort:[],valid:[]}),this.colDefs=[{headerName:"\u5B57\u5178\u7F16\u7801",width:120,field:"dataDictCode"},{headerName:"\u5B57\u5178\u540D\u79F0",field:"dataDictName"},{headerName:"\u6392\u5E8F\u53F7",field:"srtNo"}]}ngOnInit(){}treeGroupArr(n,o,a){var d=[],_=[];n.forEach(W=>{d.some(St=>St.id==W[o])||d.push({id:W[o],name:W[a]})});for(let W of d){var N=n.filter(St=>St[o]==W.id);_.push({key:W.id,title:W.name,children:N.map(St=>({title:`${St.dataDictTypeName}\uFF08${St.dataDictTypeCode}\uFF09`,key:St.dataDictTypeCode,isLeaf:!0}))})}return _}dataTypeChange(n){n.node.level==1?(this.dataTypeNode=n.node,this.getDataDictionaryList(this.dataTypeNode)):this.dataTypeNode=null}detl(n){this.editVisible=!0,this.detailTitle=n.dataDictTypeName+"\u5B57\u5178",this.getDataDictionaryList(n.dataDictTypeCode)}add(){this.dataTypeNode&&(this.editForm.reset(),this.editForm.patchValue({dataDictionaryTypeValue:this.dataTypeNode.key}),this.editVisible=!0,this.detailTitle=Zs,this.dataInfo=null)}edit(n){n.dataDictionaryTypeValue=this.dataTypeNode.key,this.editForm.patchValue(n),this.editVisible=!0,this.detailTitle=am,this.dataInfo=n}delete(n){}save(){if(this.baseService.hasError(this.editForm))return;let n="/api/main/data-dictionary",o=this.editForm.getRawValue();this.detailTitle==Zs?this.http.post(n,o).subscribe(a=>Qe(this,null,function*(){this.editVisible=!1,this.editForm.reset(),this.baseService.showMessage({messageId:"C0003"})})):this.http.put(`${n}/${this.dataInfo.id}`,o).subscribe(a=>Qe(this,null,function*(){this.editVisible=!1,this.editForm.reset(),this.baseService.showMessage({messageId:"C0003"})}))}getDataDictionaryList(n){var o={skipCount:1,maxResultCount:10,dataDictTypeValue:n};this.http.get("/api/main/data-dict",o).subscribe(a=>{this.dataDictionaryList=a.items})}close(){this.editVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-data-dict"]],viewQuery:function(o,a){if(o&1&&q(tm,5),o&2){let d;j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:11,vars:13,consts:[[3,"action"],["phActionTpl",""],["mode","search",3,"schema","formSubmit","formReset"],["size","small",3,"data","columns","res"],["st",""],[3,"nzMaskClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],[4,"nzDrawerContent"],["footerTpl",""],[1,"ag-theme-material",2,"height","500px",3,"rowData","columnDefs"],[2,"float","right"],["nz-button","",1,"mr8",3,"click"],["nz-button","","nzType","primary",3,"click"]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,im,0,0,"ng-template",null,1,B),f(),p(3,"nz-card")(4,"sf",2),T("formSubmit",function(N){k(d);let W=P(6);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(6);return E(W.reset(N))}),f(),b(5,"st",3,4),f(),p(7,"nz-drawer",5),T("nzOnClose",function(){return a.close()}),O(8,rm,2,2,"div",6)(9,nm,5,0,"ng-template",null,7,B),f()}if(o&2){let d=P(2),_=P(10);M("action",d),y(4),M("schema",a.searchSchema),y(),M("data",a.url)("columns",a.columns)("res",rt(11,om,We(10,sm))),y(2),M("nzMaskClosable",!1)("nzWidth",650)("nzVisible",a.editVisible)("nzTitle",a.detailTitle)("nzFooter",_)}},dependencies:[$e,As,Ge,Ae,Re,Ue,He,Be,Ie,Ke,Ze,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var lm=["sf"],um=["st"];function dm(c,l){if(c&1){let m=L();p(0,"button",17),T("click",function(){k(m);let o=w();return E(o.add())}),C(1,"\u65B0\u589E"),f()}}function mm(c,l){c&1&&b(0,"span",18)}function cm(c,l){if(c&1&&b(0,"nz-option",35),c&2){let m=l.$implicit;M("nzValue",m.Code)("nzLabel",m.Name)}}function fm(c,l){if(c&1&&b(0,"nz-option",35),c&2){let m=l.$implicit;M("nzValue",m.id)("nzLabel",m.userName)}}function pm(c,l){if(c&1&&(p(0,"form",19)(1,"se",20),b(2,"input",21),f(),p(3,"se",22),b(4,"input",23),f(),p(5,"se",24)(6,"nz-select",25),O(7,cm,1,2,"nz-option",26),f()(),p(8,"se",27),b(9,"nz-date-picker",28),f(),p(10,"se",29),b(11,"input",30),f(),p(12,"se",31),b(13,"input",32),f(),p(14,"se",33)(15,"nz-select",34),O(16,fm,1,2,"nz-option",26),f()(),b(17,"nz-divider"),f()),c&2){let m=w();M("formGroup",m.form),y(7),M("ngForOf",m.genderList),y(2),M("nzDisabledDate",m.disabledEndDate),y(7),M("ngForOf",m.userList)}}function hm(c,l){if(c&1){let m=L();p(0,"div",36)(1,"button",37),T("click",function(){k(m);let o=w();return E(o.close())}),C(2,"\u53D6\u6D88"),f(),p(3,"button",17),T("click",function(){k(m);let o=w();return E(o.save())}),C(4,"\u4FDD\u5B58"),f()()}}var _m=()=>({pi:"skipCount",ps:"maxResultCount"}),Js=c=>({reName:c}),gm=()=>({list:"items",total:"totalCount"}),Xs=(()=>{let l=class l{constructor(){this.http=v(K),this.modal=v(Pe),this.fb=v(Je),this.baseService=v(qe),this.settings=v(vr),this.url="/api/main/psn-info",this.deptUrl="/api/main/dept-info",this.accountSuffix="",this.searchSchema={properties:{deptId:{type:"string",title:"\u79D1\u5BA4id",visable:!1,ui:{hidden:!0},default:""},filter:{type:"string",title:"\u5173\u952E\u5B57\u8FC7\u6EE4"}}},this.columns=[{title:"\u64CD\u4F5C",buttons:[{text:"\u7F16\u8F91",click:n=>this.editStaff(n)},{text:"\u5220\u9664",pop:!0,click:n=>this.delete(n)}]},{title:"\u4EBA\u5458\u7F16\u7801",index:"psnCodg"},{title:"\u4EBA\u5458\u59D3\u540D",index:"psnName"},{title:"\u6027\u522B",index:"gend",type:"enum",enum:{1:"\u7537",2:"\u5973"}},{title:"\u51FA\u751F\u65E5\u671F",index:"brdy",type:"date",dateFormat:"yyyy-MM-dd",width:100},{title:"\u8054\u7CFB\u7535\u8BDD",index:"tel"},{title:"\u8BC1\u4EF6\u53F7\u7801",index:"certno"}],this.isAdd=!1,this.editVisible=!1,this.detailTitle="\u4EBA\u5458\u4FE1\u606F\u8BE6\u7EC6",this.genderList=[{Code:1,Name:"\u7537"},{Code:2,Name:"\u5973"}],this.disabledEndDate=n=>!(n.getTime()<=new Date().getTime())}ngAfterViewInit(){}ngOnInit(){this.createForm(),this.getUserList(),this.getDeptList()}get reqParams(){return this.sf?gi({},this.sf.value):{}}getDeptList(){let n={organId:this.settings.user.currentOrgan.id};this.http.get(this.deptUrl,n).subscribe(o=>{this.deptList=[],o.map(a=>{this.deptList.push({title:`${a.deptCodg} - ${a.deptName}`,key:a.id,level:1,isLeaf:a.children.length==0,expanded:!0,children:a.children.map(d=>({title:`${d.deptCodg} - ${d.deptName}`,key:d.id,level:2,isLeaf:d.children.length==0,expanded:!0,children:d.children.map(_=>({title:`${_.deptCodg} - ${_.deptName}`,key:_.id,level:3,isLeaf:!0}))}))})})})}createForm(){this.form=this.fb.group({id:[],psnCodg:[,A.required("E0001","\u4EBA\u5458\u7F16\u53F7")],psnName:[,A.required("E0001","\u59D3\u540D")],gend:[,A.required("E0001","\u6027\u522B")],brdy:[],psnCertTypeValue:[],certno:[],pracPsnCode:[],profttlName:[],pinYinCode:[],userId:[],deptId:[],tel:[]}),this.form.get("pinYinCode")?.disable(),this.form.get("userName")?.disable(),this.form.get("pracPsnName")?.valueChanges.subscribe(n=>{setTimeout(()=>{})}),this.form.get("pracPsnNo")?.valueChanges.subscribe(n=>{n&&this.form.patchValue({userName:n+this.accountSuffix})})}add(){this.currentNode&&(this.form.reset({deptId:this.currentNode.key}),this.form.get("pracPsnNo")?.enable(),this.isAdd=!0,this.editVisible=!0)}getUserList(){this.http.get("/api/identity/users").subscribe(n=>{this.userList=n.items})}editStaff(n,o=!1){this.isAdd=!1,this.form.get("pracPsnNo")?.disable(),this.form.patchValue(n),this.editVisible=!0}delete(n){return Qe(this,null,function*(){yield Ns(this.http.delete(`${this.url}/${n.id}`)),this.st.reload()})}save(){if(this.baseService.hasError(this.form))return;let n=this.form.getRawValue();n.id?this.http.put(`${this.url}/${n.id}`,n).subscribe(o=>{this.editVisible=!1,this.st.reload()}):this.http.post(this.url,n).subscribe(o=>{this.editVisible=!1,this.st.reload()})}deptChange(n){if(n.eventName="click"){this.currentNode=n.node,this.sf.setValue("/deptId",n.node.key);let o=this.sf.getValue("/filter");this.st.reset({deptId:n.node.key,filter:o})}}close(){this.editVisible=!1}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=J({type:l,selectors:[["app-sys-psn-manage"]],viewQuery:function(o,a){if(o&1&&(q(lm,5),q(um,5)),o&2){let d;j(d=Q())&&(a.sf=d.first),j(d=Q())&&(a.st=d.first)}},standalone:!0,features:[X],decls:21,vars:19,consts:[[3,"action"],["phActionTpl",""],[1,"dis-flex"],[1,"mr15"],[1,"card","default-min-height"],[2,"margin-bottom","1rem",3,"nzSuffix"],["type","text","nz-input","","placeholder","Search","ngModel",""],["suffixIcon",""],[3,"nzData","nzClick"],[1,"width-100"],["mode","search",3,"schema","formSubmit","formReset"],["sf",""],["size","small",3,"data","columns","req","res"],["st",""],[3,"nzMaskClosable","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-button","","nzType","primary",3,"click"],["nz-icon","","nzType","search"],["nz-form","","se-container","1","labelWidth","100",3,"formGroup"],["label","\u4EBA\u5458\u7F16\u53F7","autoErrorTip","","required",""],["nz-input","","formControlName","psnCodg"],["label","\u4EBA\u5458\u59D3\u540D","autoErrorTip","","required",""],["nz-input","","formControlName","psnName"],["label","\u6027\u522B","autoErrorTip","","required",""],["formControlName","gend"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["label","\u51FA\u751F\u65E5\u671F","error","\u8BF7\u8F93\u5165\u51FA\u751F\u65E5\u671F"],["formControlName","brdy","nzPlaceHolder","\u51FA\u751F\u65E5\u671F",1,"width-100",3,"nzDisabledDate"],["label","\u8054\u7CFB\u7535\u8BDD"],["nz-input","","formControlName","tel","maxlength","50"],["label","\u8BC1\u4EF6\u53F7\u7801"],["nz-input","","formControlName","certno","maxlength","50"],["label","\u767B\u5F55\u7528\u6237"],["formControlName","userId"],[3,"nzValue","nzLabel"],[2,"float","right"],["nz-button","",1,"mr8",3,"click"]],template:function(o,a){if(o&1){let d=L();p(0,"page-header",0),O(1,dm,2,0,"ng-template",null,1,B),f(),p(3,"div",2)(4,"div",3)(5,"nz-card",4)(6,"nz-input-group",5),b(7,"input",6),f(),O(8,mm,1,0,"ng-template",null,7,B),p(10,"nz-tree",8),T("nzClick",function(N){return a.deptChange(N)}),f()()(),p(11,"div",9)(12,"nz-card")(13,"sf",10,11),T("formSubmit",function(N){k(d);let W=P(16);return E(W.reset(N))})("formReset",function(N){k(d);let W=P(16);return E(W.reset(N))}),f(),b(15,"st",12,13),f()()(),p(17,"nz-drawer",14),T("nzOnClose",function(){return a.close()}),O(18,pm,18,4,"form",15)(19,hm,5,0,"ng-template",null,16,B),f()}if(o&2){let d=P(2),_=P(9),N=P(20);M("action",d),y(6),M("nzSuffix",_),y(4),M("nzData",a.deptList),y(3),M("schema",a.searchSchema),y(2),M("data",a.url)("columns",a.columns)("req",rt(14,Js,We(13,_m)))("res",rt(17,Js,We(16,gm))),y(2),M("nzMaskClosable",!1)("nzWidth",650)("nzVisible",a.editVisible)("nzTitle",a.detailTitle)("nzFooter",N)}},dependencies:[$e,Dt,yi,at,nt,st,ot,Ts,ws,lt,ut,Ge,Ae,Re,ct,ft,Or,Wi,Vr,mt,Ue,He,Be,dt,Fs,Es,Ai,Li,Ie,Ke,Ze,Ds,se,oe,De,ye,we,Te,be,Ne,ne,he,ge,Oe,Ce,Se,Me,te,fe,pe,xe,Fe,de,ke,ze,ue,_e,ce,Ee,re,ie,ve,le,ee,ae,me],encapsulation:2});let c=l;return c})();var ep=[{path:"menu-manage",component:Ls},{path:"tenant-manage",component:Bs},{path:"role-manage",component:Us},{path:"perms-setting",component:Rr},{path:"user-manage",component:Gs},{path:"organ-manage",component:qs},{path:"dept-manage",component:js},{path:"audit-log",component:Qs},{path:"audit-log-detl",component:Ar},{path:"data-dict",component:Ks},{path:"psn-manage",component:Xs}];export{ep as routes}; diff --git a/dist/himp.platform.angular/browser/chunk-T3OMXG5T.js b/dist/himp.platform.angular/browser/chunk-HCPW2OGS.js similarity index 50% rename from dist/himp.platform.angular/browser/chunk-T3OMXG5T.js rename to dist/himp.platform.angular/browser/chunk-HCPW2OGS.js index 184dbdf..c46c212 100644 --- a/dist/himp.platform.angular/browser/chunk-T3OMXG5T.js +++ b/dist/himp.platform.angular/browser/chunk-HCPW2OGS.js @@ -1,4 +1,4 @@ -import{$a as tn,B as Me,C as je,Ga as It,Ha as Yi,Ma as Ji,N as Ue,Na as Xi,O as ke,Oa as en,P as Fe,Q as $i,R as mt,S as Ne,U as Ae,V as ve,Y as ji,Z as Ui,_ as Wi,a as Li,ab as nn,bb as _t,c as Vi,cb as Oe,d as Ee,f as Ie,g as Ri,h as ut,j as ge,la as ft,lb as on,ma as ht,n as _e,na as qi,oa as gt,pa as Qi,qa as Gi,u as dt,ua as Zi,va as Ki,w as Bi,x as Hi,y as Pi}from"./chunk-XXGLJ63T.js";import{a as A}from"./chunk-ZRW2SW2G.js";import{$ as be,$a as v,$b as we,$d as xi,A as $t,Ab as Z,Ac as ui,B as xt,Ba as Jt,Bb as S,Bc as Tt,Ca as Xt,Cb as _,Cc as di,D as zt,Da as Se,Db as j,Dc as mi,De as E,Ea as Je,Eb as se,Ee as I,Fa as de,Fc as ot,Fe as lt,G as bt,Gb as ai,Ge as bi,Gf as Ai,H as q,Ha as De,Hb as T,Hc as U,Ia as s,Ib as Xe,Ic as rt,Ie as Si,J as jt,Ja as b,Jb as R,Je as Di,Jf as Oi,Ka as V,Ke as Ti,L as pe,La as me,Le as wi,Ma as B,N as Ut,Na as ne,O as He,Oc as at,Pa as Te,Q as Wt,Qa as ei,Qb as k,Qc as fi,R as qt,Ra as h,Sa as Q,Sb as et,Ta as l,Tc as hi,Ua as ti,Uc as gi,Va as D,Vb as tt,Vc as F,Wa as ii,Wb as K,Wc as _i,Xb as si,Ya as St,Yd as yi,Zb as te,Zc as vi,_ as ue,a as yt,aa as Ge,ab as H,ac as it,ad as le,ae as wt,cb as P,ce as zi,db as $,ea as Qt,eb as c,ef as Ei,fa as Ze,fb as p,fc as li,ga as J,gb as f,gc as fe,gf as ct,h as Ht,ha as Gt,hb as ni,hf as Et,ib as oi,if as Ii,j as qe,ja as d,jb as ee,jf as Mi,ka as L,kb as w,la as C,lc as he,m as Qe,ma as X,n as xe,na as Ke,nf as ki,ob as g,of as pt,pa as Zt,pf as N,qa as x,qb as u,qc as ci,ra as z,rb as oe,rc as $e,rf as Fi,s as Y,sa as Kt,sb as re,sc as nt,ta as Yt,u as ce,v as ze,vd as st,wb as ri,wc as pi,wf as Ni,xb as Pe,y as Pt,ya as Ye,yb as ae,yd as Ci,zb as G,zc as Dt}from"./chunk-TV7RDLL7.js";var rn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at]});let e=i;return e})();function On(e,i){if(e&1){let o=w();c(0,"li",7),g("click",function(){let r=x(o).$implicit,a=u();return z(a.onThemeChange(r.key))}),_(1),p()}if(e&2){let o=i.$implicit;s(),j(o.text)}}var Ln=new Gt("ALAIN_THEME_BTN_KEYS"),an=(()=>{let i=class i{constructor(){this.doc=d(te),this.platform=d(vi),this.renderer=d(De),this.configSrv=d(gi),this.directionality=d(le,{optional:!0}),this.cdr=d(V),this.destroy$=d(me),this.theme="default",this.isDev=tt(),this.types=[{key:"default",text:"Default Theme"},{key:"dark",text:"Dark Theme"},{key:"compact",text:"Compact Theme"}],this.devTips="When the dark.css file can't be found, you need to run it once: npm run theme",this.deployUrl="",this.themeChange=new B,this.dir="ltr",this.key=d(Ln,{optional:!0})??"site-theme"}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.initTheme()}initTheme(){this.platform.isBrowser&&(this.theme=localStorage.getItem(this.key)||"default",this.updateChartTheme(),this.onThemeChange(this.theme))}updateChartTheme(){this.configSrv.set("chart",{theme:this.theme==="dark"?"dark":""})}onThemeChange(t){if(!this.platform.isBrowser)return;this.theme=t,this.themeChange.emit(t),this.renderer.setAttribute(this.doc.body,"data-theme",t);let n=this.doc.getElementById(this.key);if(n&&n.remove(),localStorage.removeItem(this.key),t!=="default"){let r=this.doc.createElement("link");r.type="text/css",r.rel="stylesheet",r.id=this.key,r.href=`${this.deployUrl}assets/style.${t}.css`,localStorage.setItem(this.key,t),this.doc.body.append(r)}this.updateChartTheme()}ngOnDestroy(){let t=this.doc.getElementById(this.key);t!=null&&this.doc.body.removeChild(t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["theme-btn"]],hostVars:4,hostBindings:function(n,r){n&2&&D("theme-btn",!0)("theme-btn-rtl",r.dir==="rtl")},inputs:{types:"types",devTips:"devTips",deployUrl:"deployUrl"},outputs:{themeChange:"themeChange"},standalone:!0,features:[T],decls:10,vars:2,consts:[["nz-dropdown","","nzPlacement","topCenter",1,"ant-avatar","ant-avatar-circle","ant-avatar-icon",3,"nzDropdownMenu"],["nz-tooltip","","role","img","width","21","height","21","viewBox","0 0 21 21","fill","currentColor",1,"anticon",3,"nzTooltipTitle"],["fill-rule","evenodd"],["fill-rule","nonzero"],["d","M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",3,"click"],["nz-menu-item",""]],template:function(n,r){if(n&1&&(c(0,"div",0),Kt(),c(1,"svg",1)(2,"g",2)(3,"g",3),f(4,"path",4),p()()(),Yt(),c(5,"nz-dropdown-menu",null,5)(7,"ul",6),P(8,On,2,1,"li",8,H),p()()()),n&2){let a=S(6);l("nzDropdownMenu",r.types.length>0?a:null),s(),l("nzTooltipTitle",r.isDev?r.devTips:null),s(7),$(r.types)}},dependencies:[Ne,Ae,Fe,ke,Me],encapsulation:2,changeDetection:0});let e=i;return e})();var Xr=(()=>{let i=class i{constructor(){this.tokenService=d(A),this.links=[{title:"\u5E2E\u52A9",href:""},{title:"\u9690\u79C1",href:""},{title:"\u6761\u6B3E",href:""}]}ngOnInit(){this.tokenService.clear()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-passport"]],standalone:!0,features:[T],decls:7,vars:0,consts:[[1,"container"],[1,"wrap"],[1,"top"],[1,"desc"],[1,"footer"]],template:function(n,r){n&1&&(c(0,"div",0)(1,"div",1)(2,"div",2),f(3,"div",3),p(),f(4,"router-outlet"),c(5,"div",4),_(6," \u4E0A\u6D77\u53D1\u7535\u8BBE\u5907\u6210\u5957\u8BBE\u8BA1\u7814\u7A76\u9662\u6709\u9650\u8D23\u4EFB\u516C\u53F8 "),p()()())},dependencies:[ot,rn,I],styles:["[_nghost-%COMP%] .container{display:flex;flex-direction:column;min-height:100%;background:#f0f2f5}[_nghost-%COMP%] .langs{width:100%;height:40px;line-height:44px;text-align:right}[_nghost-%COMP%] .langs .anticon{cursor:pointer;margin-top:24px;margin-right:24px;font-size:14px;vertical-align:top}[_nghost-%COMP%] .wrap{flex:1;padding:32px 0}[_nghost-%COMP%] .ant-form-item{display:flex;justify-content:space-between;margin-bottom:24px}[_nghost-%COMP%] .top{margin-top:10rem;text-align:center}[_nghost-%COMP%] .footer{position:fixed;bottom:.8rem;left:50%;transform:translate(-50%,-50%);color:#f0f2f5}[_nghost-%COMP%] .desc{margin-top:12px;margin-bottom:40px;font-size:14px;color:#00000073}[_nghost-%COMP%] .container{background-image:url(/assets/bg.jpg);background-repeat:no-repeat;background-size:cover}@media (min-width: 768px){[_nghost-%COMP%] .wrap{padding:32px 0 24px}}[data-theme=dark] [_nghost-%COMP%] .container{background:#141414}[data-theme=dark] [_nghost-%COMP%] .title{color:#ffffffd9}[data-theme=dark] [_nghost-%COMP%] .desc{color:#ffffff73}@media (min-width: 768px){[data-theme=dark] [_nghost-%COMP%] .container{background-image:none}}[data-theme=compact] [_nghost-%COMP%] .ant-form-item{margin-bottom:16px}"]});let e=i;return e})();var Rn=["host"];function Bn(e,i){e&1&&re(0)}var ln=["*"];function Hn(e,i){if(e&1&&f(0,"i",3),e&2){let o=u(2).$implicit;l("nzType",o.value)("nzTheme",o.theme)("nzSpin",o.spin)("nzTwotoneColor",o.twoToneColor)("nzIconfont",o.iconfont)("nzRotate",o.rotate)}}function Pn(e,i){if(e&1&&f(0,"i",4),e&2){let o=u(2).$implicit;l("nzIconfont",o.iconfont)}}function $n(e,i){if(e&1&&f(0,"img",5),e&2){let o=u(2).$implicit;l("src",o.value,Je)}}function jn(e,i){if(e&1&&f(0,"span",6),e&2){let o=u(2).$implicit;l("innerHTML",o.value,Se)}}function Un(e,i){if(e&1&&f(0,"i"),e&2){let o=u(2).$implicit;St("sidebar-nav__item-icon ",o.value,"")}}function Wn(e,i){if(e&1&&h(0,Hn,1,6)(1,Pn,1,1)(2,$n,1,1)(3,jn,1,1)(4,Un,1,3),e&2){let o=u().$implicit,t;v(0,(t=o.type)==="icon"?0:t==="iconfont"?1:t==="img"?2:t==="svg"?3:4)}}function qn(e,i){if(e&1&&h(0,Wn,5,1),e&2){let o=i.$implicit;v(0,o?0:-1)}}function Qn(e,i){}var Ce=e=>({$implicit:e});function Gn(e,i){if(e&1&&(c(0,"span",15),h(1,Qn,0,0,"ng-template",16),p()),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("nzTooltipTitle",o.text),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.icon))}}function Zn(e,i){}function Kn(e,i){if(e&1&&h(0,Zn,0,0,"ng-template",16),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(2,Ce,o.icon))}}function Yn(e,i){if(e&1&&h(0,Gn,2,5,"span",15)(1,Kn,1,4),e&2){let o=u(5);v(0,o.collapsed?0:1)}}var Jn=e=>({"sidebar-nav__item-disabled":e});function Xn(e,i){if(e&1){let o=w();c(0,"a",13),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.to(n))})("mouseenter",function(){x(o);let n=u(4);return z(n.closeSubMenu())}),h(1,Yn,2,1),f(2,"span",14),p()}if(e&2){let o=u(2).$implicit;l("ngClass",R(5,Jn,o.disabled)),Q("data-id",o._id),s(),v(1,o._needIcon?1:-1),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function eo(e,i){}function to(e,i){if(e&1){let o=w();c(0,"a",17),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.toggleOpen(n))})("mouseenter",function(n){x(o);let r=u(2).$implicit,a=u(2);return z(a.showSubMenu(n,r))}),h(1,eo,0,0,"ng-template",16),f(2,"span",14)(3,"i",18),p()}if(e&2){let o=u(2).$implicit;u(2);let t=S(1);s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(4,Ce,o.icon)),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function io(e,i){if(e&1&&f(0,"nz-badge",11),e&2){let o=u(2).$implicit;l("nzCount",o.badge)("nzDot",o.badgeDot)("nzOverflowCount",9)}}function no(e,i){}function oo(e,i){if(e&1&&(c(0,"ul"),h(1,no,0,0,"ng-template",16),p()),e&2){let o=u(2).$implicit;u(2);let t=S(3);St("sidebar-nav sidebar-nav__sub sidebar-nav__depth",o._depth,""),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(5,Ce,o.children))}}function ro(e,i){if(e&1&&(c(0,"li",8),h(1,Xn,3,7,"a",9)(2,to,4,6,"a",10)(3,io,1,3,"nz-badge",11)(4,oo,2,7,"ul",12),p()),e&2){let o=u().$implicit;D("sidebar-nav__selected",o._selected)("sidebar-nav__open",o.open),s(),v(1,o.children.length===0?1:-1),s(),v(2,o.children.length>0?2:-1),s(),v(3,o.badge?3:-1),s(),v(4,o.children.length>0?4:-1)}}function ao(e,i){if(e&1&&h(0,ro,5,8,"li",7),e&2){let o=i.$implicit;v(0,o._hidden!==!0?0:-1)}}function so(e,i){if(e&1&&P(0,ao,1,1,null,null,H),e&2){let o=i.$implicit;$(o)}}function lo(e,i){if(e&1&&(c(0,"li",20),f(1,"span",21),p()),e&2){let o=u().$implicit;s(),l("innerHTML",o._text,Se)}}function co(e,i){}function po(e,i){if(e&1&&h(0,lo,2,1,"li",19)(1,co,0,0,"ng-template",16),e&2){let o=i.$implicit;u();let t=S(3);v(0,o.group?0:-1),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.children))}}function uo(e,i){e&1&&ee(0)}function mo(e,i){if(e&1&&(c(0,"li"),h(1,uo,1,0,"ng-container",6),p()),e&2){let o=i.$implicit;D("hidden-mobile",o.hidden==="mobile")("hidden-pc",o.hidden==="pc"),s(),l("ngTemplateOutlet",o.host)}}function fo(e,i){if(e&1&&P(0,mo,2,5,"li",7,H),e&2){let o=i.$implicit;$(o)}}function ho(e,i){e&1&&ee(0)}function go(e,i){if(e&1&&h(0,ho,1,0,"ng-container",6),e&2){let o=u();l("ngTemplateOutlet",o.opt.logo)}}function _o(e,i){if(e&1&&(c(0,"a",8),f(1,"img",9)(2,"img",10),p()),e&2){let o=u();l("routerLink",o.opt.logoLink),s(),Q("src",o.opt.logoExpanded,Je)("alt",o.app.name),s(),Q("src",o.opt.logoCollapsed,Je)("alt",o.app.name)}}function vo(e,i){if(e&1){let o=w();c(0,"li")(1,"div",11),g("click",function(){x(o);let n=u();return z(n.toggleCollapsed())}),f(2,"span",12),p()()}if(e&2){let o=u();s(2),l("nzType",o.collapsedIcon)}}function Co(e,i){}function yo(e,i){e&1&&ee(0)}function xo(e,i){if(e&1&&(c(0,"div",13),h(1,yo,1,0,"ng-container",6),p()),e&2){let o=u();s(),l("ngTemplateOutlet",o.middle[0].host)}}function zo(e,i){}function bo(e,i){e&1&&f(0,"div",5)}function So(e,i){if(e&1&&f(0,"layout-default-header",1),e&2){let o=u();l("items",o.headerItems)}}function Do(e,i){e&1&&ee(0)}function To(e,i){e&1&&ee(0)}function wo(e,i){e&1&&f(0,"layout-default-nav")}function Eo(e,i){e&1&&ee(0)}function Io(e,i){if(e&1&&h(0,Eo,1,0,"ng-container",4),e&2){let o=u(3);l("ngTemplateOutlet",o.asideBottom)}}function Mo(e,i){if(e&1){let o=w();c(0,"div",11),g("click",function(){x(o);let n=u(3);return z(n.toggleCollapsed())}),f(1,"span",12),p()}if(e&2){let o=u(3);s(),l("nzType",o.collapsedIcon)}}function ko(e,i){if(e&1&&(c(0,"div",10),h(1,Io,1,1,"ng-container")(2,Mo,2,1),p()),e&2){let o=u(2);s(),v(1,o.asideBottom?1:2)}}function Fo(e,i){if(e&1&&(c(0,"div",6)(1,"div",7)(2,"div",8),h(3,Do,1,0,"ng-container",4)(4,To,1,0,"ng-container",4)(5,wo,1,0,"layout-default-nav"),p(),h(6,ko,3,1,"div",9),p()()),e&2){let o=u();s(3),l("ngTemplateOutlet",o.asideUser),s(),l("ngTemplateOutlet",o.nav),s(),v(5,o.nav?-1:5),s(),v(6,o.opt.showSiderCollapse?6:-1)}}function No(e,i){e&1&&ee(0)}var Nt=(()=>{let i=class i{constructor(){this.hidden="none",this.direction="right"}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header-item"]],viewQuery:function(n,r){if(n&1&&ae(Rn,7),n&2){let a;G(a=Z())&&(r.host=a.first)}},inputs:{hidden:"hidden",direction:"direction"},ngContentSelectors:ln,decls:2,vars:0,consts:[["host",""]],template:function(n,r){n&1&&(oe(),h(0,Bn,1,0,"ng-template",null,0,k))},encapsulation:2});let e=i;return e})(),Mt={logoExpanded:"./assets/logo-full.svg",logoCollapsed:"./assets/logo.svg",logoLink:"/",showHeaderCollapse:!0,showSiderCollapse:!1,hideAside:!1,hideHeader:!1},cn=(()=>{let i=class i{constructor(){this.settings=d(N),this._options$=new xe(Mt),this._options=Mt}get options(){return this._options}get options$(){return this._options$.asObservable()}get collapsedIcon(){let t=this.settings.layout.collapsed,n=t?"unfold":"fold";return this.settings.layout.direction==="rtl"&&(n=t?"fold":"unfold"),`menu-${n}`}notify(){this._options$.next(this._options)}setOptions(t){this._options=yt(yt({},Mt),t),this.notify()}toggleCollapsed(t){this.settings.setLayout("collapsed",t??!this.settings.layout.collapsed),this.notify()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=Ze({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})(),kt="sidebar-nav__floating-show",Ft="sidebar-nav__floating",Ao=(()=>{let i=class i{constructor(){this.doc=d(te),this.win=d(Bi),this.router=d(U),this.render=d(De),this.menuSrv=d(pt),this.settings=d(N),this.cdr=d(V),this.ngZone=d(ne),this.sanitizer=d(pi),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.dir="ltr",this.list=[],this.disabledAcl=!1,this.autoCloseUnderPad=!0,this.recursivePath=!0,this.hideEmptyChildren=!0,this.maxLevelIcon=3,this.select=new B}set openStrictly(t){this.menuSrv.openStrictly=t}get collapsed(){return this.settings.layout.collapsed}getLinkNode(t){return t=t.nodeName==="A"?t:t.parentNode,t.nodeName!=="A"?null:t}floatingClickHandle(t){t.stopPropagation();let n=this.getLinkNode(t.target);if(n==null)return!1;let r=+n.dataset.id;if(isNaN(r))return!1;let a;return this.menuSrv.visit(this.list,m=>{!a&&m._id===r&&(a=m)}),this.to(a),this.hideAll(),t.preventDefault(),!1}clearFloating(){this.floatingEl&&(this.floatingEl.removeEventListener("click",this.floatingClickHandle.bind(this)),this.floatingEl.hasOwnProperty("remove")?this.floatingEl.remove():this.floatingEl.parentNode&&this.floatingEl.parentNode.removeChild(this.floatingEl))}genFloating(){this.clearFloating(),this.floatingEl=this.render.createElement("div"),this.floatingEl.classList.add(`${Ft}-container`),this.floatingEl.addEventListener("click",this.floatingClickHandle.bind(this),!1),this.bodyEl.appendChild(this.floatingEl)}genSubNode(t,n){let r=`_sidebar-nav-${n._id}`,m=(n.badge?t.nextElementSibling.nextElementSibling:t.nextElementSibling).cloneNode(!0);return m.id=r,m.classList.add(Ft),m.addEventListener("mouseleave",()=>{m.classList.remove(kt)},!1),this.floatingEl.appendChild(m),m}hideAll(){let t=this.floatingEl.querySelectorAll(`.${Ft}`);for(let n=0;nthis.router.navigateByUrl(t.link))}}toggleOpen(t){this.menuSrv.toggleOpen(t)}_click(){this.isPad&&this.collapsed&&(this.openAside(!1),this.hideAll())}closeSubMenu(){this.collapsed&&this.hideAll()}openByUrl(t){let{menuSrv:n,recursivePath:r}=this;this.menuSrv.open(n.find({url:t,recursive:r}))}ngOnInit(){let{doc:t,router:n,menuSrv:r,settings:a,cdr:m}=this;this.bodyEl=t.querySelector("body"),r.change.pipe(F(this.destroy$)).subscribe(y=>{r.visit(y,(M,Bt,An)=>{M._text=this.sanitizer.bypassSecurityTrustHtml(M.text),M._needIcon=An<=this.maxLevelIcon&&!!M.icon,M._aclResult||(this.disabledAcl?M.disabled=!0:M._hidden=!0);let Be=M.icon;Be&&Be.type==="svg"&&typeof Be.value=="string"&&(Be.value=this.sanitizer.bypassSecurityTrustHtml(Be.value))}),this.hideEmptyChildren&&this.fixHide(y),this.list=y.filter(M=>M._hidden!==!0),m.detectChanges()}),n.events.pipe(F(this.destroy$)).subscribe(y=>{y instanceof Dt&&(this.openByUrl(y.urlAfterRedirects),this.underPad(),this.cdr.detectChanges())}),a.notify.pipe(F(this.destroy$),q(y=>y.type==="layout"&&y.name==="collapsed")).subscribe(()=>this.clearFloating()),this.underPad(),this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(y=>{this.dir=y,this.cdr.detectChanges()}),this.openByUrl(n.url),this.ngZone.runOutsideAngular(()=>this.genFloating())}fixHide(t){let n=r=>{for(let a of r)a.children&&a.children.length>0&&(n(a.children),a._hidden||(a._hidden=a.children.every(m=>m._hidden)))};n(t)}ngOnDestroy(){this.clearFloating()}get isPad(){return this.doc.defaultView.innerWidth<768}underPad(){this.autoCloseUnderPad&&this.isPad&&!this.collapsed&&setTimeout(()=>this.openAside(!0))}openAside(t){this.settings.setLayout("collapsed",t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-nav"]],hostVars:2,hostBindings:function(n,r){n&1&&g("click",function(){return r._click()})("click",function(){return r.closeSubMenu()},!1,Xt),n&2&&D("d-block",!0)},inputs:{disabledAcl:[L.HasDecoratorInputTransform,"disabledAcl","disabledAcl",K],autoCloseUnderPad:[L.HasDecoratorInputTransform,"autoCloseUnderPad","autoCloseUnderPad",K],recursivePath:[L.HasDecoratorInputTransform,"recursivePath","recursivePath",K],hideEmptyChildren:[L.HasDecoratorInputTransform,"hideEmptyChildren","hideEmptyChildren",K],openStrictly:[L.HasDecoratorInputTransform,"openStrictly","openStrictly",K],maxLevelIcon:[L.HasDecoratorInputTransform,"maxLevelIcon","maxLevelIcon",si]},outputs:{select:"select"},features:[Te],decls:7,vars:0,consts:[["icon",""],["tree",""],[1,"sidebar-nav"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzType","nzTheme","nzSpin","nzTwotoneColor","nzIconfont","nzRotate"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzIconfont"],[1,"sidebar-nav__item-icon","sidebar-nav__item-img",3,"src"],[1,"sidebar-nav__item-icon","sidebar-nav__item-svg",3,"innerHTML"],["class","sidebar-nav__item",3,"sidebar-nav__selected","sidebar-nav__open"],[1,"sidebar-nav__item"],["class","sidebar-nav__item-link",3,"ngClass"],["class","sidebar-nav__item-link"],["nzStandalone","",3,"nzCount","nzDot","nzOverflowCount"],[3,"class"],[1,"sidebar-nav__item-link",3,"ngClass","click","mouseenter"],[1,"sidebar-nav__item-text",3,"innerHTML"],["nz-tooltip","","nzTooltipPlacement","right",3,"nzTooltipTitle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"sidebar-nav__item-link",3,"click","mouseenter"],[1,"sidebar-nav__sub-arrow"],["class","sidebar-nav__item sidebar-nav__group-title"],[1,"sidebar-nav__item","sidebar-nav__group-title"],[3,"innerHTML"]],template:function(n,r){n&1&&(h(0,qn,1,1,"ng-template",null,0,k)(2,so,2,0,"ng-template",null,1,k),c(4,"ul",2),P(5,po,2,5,null,16,H),p()),n&2&&(s(5),$(r.list))},dependencies:[we,fe,Me,E,Hi],encapsulation:2,changeDetection:0});let e=i;return Y([Ue()],e.prototype,"showSubMenu",null),e})(),Oo=(()=>{let i=class i{constructor(){this.settings=d(N),this.srv=d(cn),this.cdr=d(V),this.destroy$=d(me),this.left=[],this.middle=[],this.right=[]}get opt(){return this.srv.options}get app(){return this.settings.app}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}refresh(){let t=this.items.toArray();this.left=t.filter(n=>n.direction==="left"),this.middle=t.filter(n=>n.direction==="middle"),this.right=t.filter(n=>n.direction==="right"),this.cdr.detectChanges()}ngAfterViewInit(){this.items.changes.pipe(F(this.destroy$)).subscribe(()=>this.refresh()),this.srv.options$.pipe(F(this.destroy$)).subscribe(()=>this.cdr.detectChanges()),this.refresh()}toggleCollapsed(){this.srv.toggleCollapsed()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header"]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__header",!0)},inputs:{items:"items"},decls:12,vars:13,consts:[["render",""],[1,"alain-default__header-logo"],[1,"alain-default__nav-wrap"],[1,"alain-default__nav"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","alain-default__nav alain-default__nav-middle"],[4,"ngTemplateOutlet"],[3,"hidden-mobile","hidden-pc"],[1,"alain-default__header-logo-link",3,"routerLink"],[1,"alain-default__header-logo-expanded"],[1,"alain-default__header-logo-collapsed"],[1,"alain-default__nav-item","alain-default__nav-item--collapse",3,"click"],["nz-icon","",3,"nzType"],[1,"alain-default__nav","alain-default__nav-middle"]],template:function(n,r){if(n&1&&(h(0,fo,2,0,"ng-template",null,0,k),c(2,"div",1),h(3,go,1,1,"ng-container")(4,_o,3,5),p(),c(5,"div",2)(6,"ul",3),h(7,vo,3,1,"li")(8,Co,0,0,"ng-template",4),p(),h(9,xo,2,1,"div",5),c(10,"ul",3),h(11,zo,0,0,"ng-template",4),p()()),n&2){let a=S(1);s(2),ti("width",r.opt.logoFixWidth,"px"),s(),v(3,r.opt.logo?3:4),s(4),v(7,!r.opt.hideAside&&r.opt.showHeaderCollapse?7:-1),s(),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(9,Ce,r.left)),s(),v(9,r.middle.length>0?9:-1),s(2),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(11,Ce,r.right))}},dependencies:[fe,rt,E],encapsulation:2,changeDetection:0});let e=i;return e})(),pn=(()=>{let i=class i{get opt(){return this.srv.options}set options(t){this.srv.setOptions(t)}get showFetching(){return this.fetchingStrictly?this.fetching:this.isFetching}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}toggleCollapsed(){this.srv.toggleCollapsed()}constructor(t,n,r,a,m,y,M){this.msgSrv=n,this.settings=r,this.el=a,this.renderer=m,this.doc=y,this.srv=M,this.asideUser=null,this.asideBottom=null,this.nav=null,this.content=null,this.fetchingStrictly=!1,this.fetching=!1,this.isFetching=!1,t.events.pipe(F(),q(()=>!this.fetchingStrictly)).subscribe(Bt=>this.processEv(Bt)),this.srv.options$.pipe(F()).subscribe(()=>this.setClass()),this.settings.notify.pipe(F()).subscribe(()=>this.setClass())}processEv(t){if(!this.isFetching&&t instanceof di&&(this.isFetching=!0),t instanceof Tt||t instanceof ui){this.isFetching=!1;let n=this.customError===null?null:this.customError??`Could not load ${t.url} route`;n&&t instanceof Tt&&this.msgSrv.error(n,{nzDuration:1e3*3});return}(t instanceof Dt||t instanceof mi)&&this.isFetching&&setTimeout(()=>{this.isFetching=!1},100)}setClass(){let{el:t,doc:n,renderer:r,settings:a}=this,m=a.layout;Oi(t.nativeElement,r,{"alain-default":!0,"alain-default__fixed":m.fixed,"alain-default__collapsed":m.collapsed,"alain-default__hide-aside":this.opt.hideAside,"alain-default__hide-header":this.opt.hideHeader}),n.body.classList[m.colorWeak?"add":"remove"]("color-weak")}};i.\u0275fac=function(n){return new(n||i)(b(U),b(Ee),b(N),b(de),b(De),b(te),b(cn))},i.\u0275cmp=C({type:i,selectors:[["layout-default"]],contentQueries:function(n,r,a){if(n&1&&Pe(a,Nt,4),n&2){let m;G(m=Z())&&(r.headerItems=m)}},inputs:{options:"options",asideUser:"asideUser",asideBottom:"asideBottom",nav:"nav",content:"content",customError:"customError",fetchingStrictly:[L.HasDecoratorInputTransform,"fetchingStrictly","fetchingStrictly",K],fetching:[L.HasDecoratorInputTransform,"fetching","fetching",K]},exportAs:["layoutDefault"],features:[Te],ngContentSelectors:ln,decls:6,vars:4,consts:[["class","alain-default__progress-bar"],[3,"items"],["class","alain-default__aside"],[1,"alain-default__content"],[4,"ngTemplateOutlet"],[1,"alain-default__progress-bar"],[1,"alain-default__aside"],[1,"alain-default__aside-wrap"],[1,"alain-default__aside-inner"],["class","alain-default__aside-link"],[1,"alain-default__aside-link"],[1,"alain-default__aside-link-collapsed",3,"click"],["nz-icon","",3,"nzType"]],template:function(n,r){n&1&&(oe(),h(0,bo,1,0,"div",0)(1,So,1,1,"layout-default-header",1)(2,Fo,7,4,"div",2),c(3,"section",3),h(4,No,1,0,"ng-container",4),re(5),p()),n&2&&(v(0,r.showFetching?0:-1),s(),v(1,r.opt.hideHeader?-1:1),s(),v(2,r.opt.hideAside?-1:2),s(2),l("ngTemplateOutlet",r.content))},dependencies:[fe,E,Ao,Oo],encapsulation:2});let e=i;return e})(),un=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275dir=Ke({type:i,selectors:[["","layout-default-header-item-trigger",""]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__nav-item",!0)}});let e=i;return e})();var dn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at,je,I,Oe,ve,Vi,Pi]});let e=i;return e})();var Ot=()=>({standalone:!0});function Ro(e,i){if(e&1){let o=w();c(0,"input",1),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Bo(e,i){if(e&1){let o=w();c(0,"input",2),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Ho(e,i){if(e&1){let o=w();c(0,"nz-input-number",3),g("ngModelChange",function(n){x(o);let r=u();return z(r.pxVal=n)})("ngModelChange",function(n){x(o);let r=u();return z(r.pxChange(n))}),p()}if(e&2){let o=u();l("ngModel",o.pxVal)("nzMin",o.i.min)("nzMax",o.i.max)("nzStep",o.i.step||2)("nzFormatter",o.format)}}function Po(e,i){if(e&1){let o=w();c(0,"nz-switch",4),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function $o(e,i){}function jo(e,i){e&1&&h(0,$o,0,0,"ng-template",5)}function Uo(e,i){e&1&&f(0,"i",19)}var Wo=e=>({"background-color":e});function qo(e,i){if(e&1){let o=w();c(0,"span",18),g("click",function(){let r=x(o).$implicit,a=u(2);return z(a.changeColor(r.color))}),h(1,Uo,1,0,"i",19),p()}if(e&2){let o=i.$implicit,t=u(2);ii(R(4,Wo,o.color)),l("nzTooltipTitle",o.key),s(),v(1,t.color===o.color?1:-1)}}function Qo(e,i){if(e&1){let o=w();c(0,"div",4)(1,"div",5)(2,"h3",6),_(3,"\u4E3B\u9898\u8272"),p(),P(4,qo,2,6,"span",20,H),p(),f(6,"nz-divider"),c(7,"div",7)(8,"h3",6),_(9,"\u8BBE\u7F6E"),p(),c(10,"nz-tabset")(11,"nz-tab",8)(12,"div",7),f(13,"setting-drawer-item",9)(14,"setting-drawer-item",9)(15,"setting-drawer-item",9),p()(),c(16,"nz-tab",10),f(17,"setting-drawer-item",9)(18,"setting-drawer-item",9)(19,"setting-drawer-item",9)(20,"setting-drawer-item",9),p(),c(21,"nz-tab",11),f(22,"setting-drawer-item",9)(23,"setting-drawer-item",9)(24,"setting-drawer-item",9)(25,"setting-drawer-item",9),p(),c(26,"nz-tab",12),f(27,"setting-drawer-item",9)(28,"setting-drawer-item",9)(29,"setting-drawer-item",9)(30,"setting-drawer-item",9)(31,"setting-drawer-item",9)(32,"setting-drawer-item",9),p()()(),f(33,"nz-divider"),c(34,"div",7)(35,"div",13),_(36," \u56FA\u5B9A\u5934\u548C\u4FA7\u8FB9\u680F "),c(37,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.fixed=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("fixed",n.layout.fixed))}),p()(),c(38,"div",13),_(39," \u8272\u5F31\u6A21\u5F0F "),c(40,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.colorWeak=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("colorWeak",n.layout.colorWeak))}),p()()(),f(41,"nz-divider"),c(42,"button",15),g("click",function(){x(o);let n=u();return z(n.apply())}),_(43,"\u9884\u89C8"),p(),c(44,"button",16),g("click",function(){x(o);let n=u();return z(n.reset())}),_(45,"\u91CD\u7F6E"),p(),c(46,"button",16),g("click",function(){x(o);let n=u();return z(n.copyVar())}),_(47,"\u62F7\u8D1D"),p(),f(48,"nz-alert",17),p()}if(e&2){let o=u();s(4),$(o.colors),s(9),l("data",o.data["alain-default-header-hg"]),s(),l("data",o.data["alain-default-header-bg"]),s(),l("data",o.data["alain-default-header-padding"]),s(2),l("data",o.data["alain-default-aside-wd"]),s(),l("data",o.data["alain-default-aside-bg"]),s(),l("data",o.data["alain-default-aside-collapsed-wd"]),s(),l("data",o.data["alain-default-aside-nav-padding-top-bottom"]),s(2),l("data",o.data["alain-default-content-bg"]),s(),l("data",o.data["alain-default-content-heading-bg"]),s(),l("data",o.data["alain-default-content-heading-border"]),s(),l("data",o.data["alain-default-content-padding"]),s(2),l("data",o.data["form-state-visual-feedback-enabled"]),s(),l("data",o.data["preserve-white-spaces-enabled"]),s(),l("data",o.data["nz-table-img-radius"]),s(),l("data",o.data["nz-table-img-margin-right"]),s(),l("data",o.data["nz-table-img-max-width"]),s(),l("data",o.data["nz-table-img-max-height"]),s(5),l("ngModel",o.layout.fixed),s(3),l("ngModel",o.layout.colorWeak)}}var Go=e=>({"setting-drawer__handle-opened":e}),Zo=(()=>{let i=class i{constructor(){this.i={},this.pxVal=0,this.format=t=>`${t} px`}set data(t){this.i=t,t.type==="px"&&(this.pxVal=+t.value.replace("px",""))}pxChange(t){this.i.value=`${t}px`}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["setting-drawer-item"]],hostVars:2,hostBindings:function(n,r){n&2&&D("setting-drawer__body-item",!0)},inputs:{data:"data"},decls:9,vars:3,consts:[[1,"pl-sm","text-grey"],["nz-input","","type","color",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],["nz-input","",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],[3,"ngModel","nzMin","nzMax","nzStep","nzFormatter","ngModelChange"],["nzSize","small",3,"ngModel","ngModelOptions","ngModelChange"],["nzDrawerContent",""]],template:function(n,r){if(n&1&&(c(0,"span"),_(1),c(2,"span",0),_(3),p()(),h(4,Ro,1,3)(5,Bo,1,3)(6,Ho,1,5)(7,Po,1,3)(8,jo,1,0)),n&2){let a;s(),se(" ",r.i.label," "),s(2),j(r.i.tip),s(),v(4,(a=r.i.type)==="color"?4:a==="input"?5:a==="px"?6:a==="switch"?7:8)}},dependencies:[ut,ge,_e,Et,It,ft,Qi],encapsulation:2});let e=i;return e})(),At="alain-default-vars",Ko=[{key:"dust",color:"#F5222D"},{key:"volcano",color:"#FA541C"},{key:"sunset",color:"#FAAD14"},{key:"cyan",color:"#13C2C2"},{key:"green",color:"#52C41A"},{key:"daybreak",color:"#1890ff"},{key:"geekblue",color:"#2F54EB"},{key:"purple",color:"#722ED1"},{key:"black",color:"#001529"}],vt={"primary-color":{label:"\u4E3B\u989C\u8272",type:"color",default:"#1890ff"},"alain-default-header-hg":{label:"\u9AD8",type:"px",default:"64px",max:300,min:24},"alain-default-header-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-header-padding":{label:"\u9876\u90E8\u5DE6\u53F3\u5185\u8FB9\u8DDD",type:"px",default:"16px"},"alain-default-aside-wd":{label:"\u5BBD\u5EA6",type:"px",default:"200px"},"alain-default-aside-bg":{label:"\u80CC\u666F",type:"color",default:"#ffffff"},"alain-default-aside-collapsed-wd":{label:"\u6536\u7F29\u5BBD\u5EA6",type:"px",default:"64px"},"alain-default-aside-nav-padding-top-bottom":{label:"\u9879\u4E0A\u4E0B\u5185\u8FB9\u8DDD",type:"px",default:"8px",step:8},"alain-default-aside-nav-fs":{label:"\u83DC\u5355\u5B57\u53F7",type:"px",default:"14px",min:14,max:30},"alain-default-aside-collapsed-nav-fs":{label:"\u6536\u7F29\u83DC\u5355\u5B57\u53F7",type:"px",default:"24px",min:24,max:32},"alain-default-aside-nav-item-height":{label:"\u83DC\u5355\u9879\u9AD8\u5EA6",type:"px",default:"38px",min:24,max:64},"alain-default-aside-nav-text-color":{label:"\u83DC\u5355\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.65)",rgba:!0},"alain-default-aside-nav-text-hover-color":{label:"\u83DC\u5355\u6587\u672C\u60AC\u505C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-group-text-color":{label:"\u83DC\u5355\u5206\u7EC4\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.43)",rgba:!0},"alain-default-aside-nav-selected-text-color":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u6587\u672C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-selected-bg":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u80CC\u666F\u989C\u8272",type:"color",default:"#fcfcfc"},"alain-default-content-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"#f5f7fa"},"alain-default-content-heading-bg":{label:"\u6807\u9898\u80CC\u666F\u8272",type:"color",default:"#fafbfc"},"alain-default-content-heading-border":{label:"\u6807\u9898\u5E95\u90E8\u8FB9\u6846\u8272",type:"color",default:"#efe3e5"},"alain-default-content-padding":{label:"\u5185\u8FB9\u8DDD",type:"px",default:"24px",min:0,max:128,step:8},"form-state-visual-feedback-enabled":{label:"\u5F00\u542F\u8868\u5355\u5143\u7D20\u7684\u89C6\u89C9\u53CD\u9988",type:"switch",default:!0},"preserve-white-spaces-enabled":{label:"\u5F00\u542F preserveWhitespaces",type:"switch",default:!0},"nz-table-img-radius":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u5706\u89D2",type:"px",default:"4px",min:0,max:128},"nz-table-img-margin-right":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u53F3\u5916\u8FB9\u8DDD",type:"px",default:"4px",min:0,max:128},"nz-table-img-max-width":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u5BBD\u5EA6",type:"px",default:"32px",min:8,max:128},"nz-table-img-max-height":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u9AD8\u5EA6",type:"px",default:"32px",min:8,max:128}},hn=(()=>{let i=class i{get layout(){return this.settingSrv.layout}constructor(){this.cdr=d(V),this.msg=d(Ee),this.settingSrv=d(N),this.lazy=d(hi),this.ngZone=d(ne),this.doc=d(te),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.autoApplyColor=!0,this.compilingText="Compiling...",this.devTips="When the color can't be switched, you need to run it once: npm run color-less",this.lessJs="https://cdn.jsdelivr.net/npm/less",this.loadedLess=!1,this.dir="ltr",this.isDev=tt(),this.collapse=!1,this.data={},this.colors=Ko,this.color=this.cachedData["@primary-color"]||this.DEFAULT_PRIMARY,this.resetData(this.cachedData,!1)}get cachedData(){return this.settingSrv.layout[At]||{}}get DEFAULT_PRIMARY(){return vt["primary-color"].default}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.autoApplyColor&&this.color!==this.DEFAULT_PRIMARY&&(this.changeColor(this.color),this.runLess())}loadLess(){return Ht(this,null,function*(){return this.loadedLess?Promise.resolve():this.lazy.loadStyle("./assets/color.less",{rel:"stylesheet/less"}).then(()=>{let t=this.doc.createElement("script");t.innerHTML=` +import{$a as tn,B as Me,C as je,Ga as It,Ha as Yi,Ma as Ji,N as Ue,Na as Xi,O as ke,Oa as en,P as Fe,Q as $i,R as mt,S as Ne,U as Ae,V as ve,Y as ji,Z as Ui,_ as Wi,a as Li,ab as nn,bb as _t,c as Vi,cb as Oe,d as Ee,f as Ie,g as Ri,h as ut,j as ge,la as ft,lb as on,ma as ht,n as _e,na as qi,oa as gt,pa as Qi,qa as Gi,u as dt,ua as Zi,va as Ki,w as Bi,x as Hi,y as Pi}from"./chunk-OOUNO2UZ.js";import{a as A}from"./chunk-4FFPI7ZP.js";import{$b as te,$c as vi,A as Pt,Aa as Ye,Ab as ae,Ad as Ci,Bb as G,Bc as Dt,C as $t,Cb as Z,Cc as ui,D as xt,Da as Jt,Db as S,Dc as Tt,Ea as Xt,Eb as _,Ec as di,F as zt,Fa as Se,Fb as j,Fc as mi,Fe as E,Ga as Je,Gb as se,Ge as I,Ha as de,Hc as ot,He as lt,I as bt,Ib as ai,Ie as bi,If as Ai,J as q,Ja as De,Jb as T,Jc as U,Ka as s,Kb as Xe,Kc as rt,Ke as Si,L as jt,La as b,Lb as R,Le as Di,Lf as Oi,Ma as V,Me as Ti,N as pe,Na as me,Ne as wi,Oa as B,P as Ut,Pa as ne,Q as He,Qc as at,Ra as Te,S as Wt,Sa as ei,Sb as k,Sc as fi,T as qt,Ta as h,Ua as Q,Ub as et,Va as l,Vc as hi,Wa as ti,Wc as gi,Xa as D,Xb as tt,Xc as F,Ya as ii,Yb as K,Yc as _i,Zb as si,_a as St,_d as yi,a as yt,aa as ue,ba as be,bb as v,bc as we,be as xi,ca as Ge,cb as H,cc as it,cd as le,ce as wt,eb as P,ee as zi,fb as $,ga as Qt,gb as c,gf as Ei,ha as Ze,hb as p,hc as li,ia as J,ib as f,ic as fe,if as ct,j as Ht,ja as Gt,jb as ni,jf as Et,kb as oi,kf as Ii,l as qe,la as d,lb as ee,lf as Mi,ma as L,mb as w,na as C,nc as he,o as Qe,oa as X,p as xe,pa as Ke,pf as ki,qb as g,qf as pt,ra as Zt,rf as N,sa as x,sb as u,sc as ci,ta as z,tb as oe,tc as $e,tf as Fi,u as Y,ua as Kt,ub as re,uc as nt,va as Yt,w as ce,x as ze,xd as st,yb as ri,yc as pi,yf as Ni,zb as Pe}from"./chunk-VDRVUQCF.js";var rn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at]});let e=i;return e})();function On(e,i){if(e&1){let o=w();c(0,"li",7),g("click",function(){let r=x(o).$implicit,a=u();return z(a.onThemeChange(r.key))}),_(1),p()}if(e&2){let o=i.$implicit;s(),j(o.text)}}var Ln=new Gt("ALAIN_THEME_BTN_KEYS"),an=(()=>{let i=class i{constructor(){this.doc=d(te),this.platform=d(vi),this.renderer=d(De),this.configSrv=d(gi),this.directionality=d(le,{optional:!0}),this.cdr=d(V),this.destroy$=d(me),this.theme="default",this.isDev=tt(),this.types=[{key:"default",text:"Default Theme"},{key:"dark",text:"Dark Theme"},{key:"compact",text:"Compact Theme"}],this.devTips="When the dark.css file can't be found, you need to run it once: npm run theme",this.deployUrl="",this.themeChange=new B,this.dir="ltr",this.key=d(Ln,{optional:!0})??"site-theme"}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.initTheme()}initTheme(){this.platform.isBrowser&&(this.theme=localStorage.getItem(this.key)||"default",this.updateChartTheme(),this.onThemeChange(this.theme))}updateChartTheme(){this.configSrv.set("chart",{theme:this.theme==="dark"?"dark":""})}onThemeChange(t){if(!this.platform.isBrowser)return;this.theme=t,this.themeChange.emit(t),this.renderer.setAttribute(this.doc.body,"data-theme",t);let n=this.doc.getElementById(this.key);if(n&&n.remove(),localStorage.removeItem(this.key),t!=="default"){let r=this.doc.createElement("link");r.type="text/css",r.rel="stylesheet",r.id=this.key,r.href=`${this.deployUrl}assets/style.${t}.css`,localStorage.setItem(this.key,t),this.doc.body.append(r)}this.updateChartTheme()}ngOnDestroy(){let t=this.doc.getElementById(this.key);t!=null&&this.doc.body.removeChild(t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["theme-btn"]],hostVars:4,hostBindings:function(n,r){n&2&&D("theme-btn",!0)("theme-btn-rtl",r.dir==="rtl")},inputs:{types:"types",devTips:"devTips",deployUrl:"deployUrl"},outputs:{themeChange:"themeChange"},standalone:!0,features:[T],decls:10,vars:2,consts:[["nz-dropdown","","nzPlacement","topCenter",1,"ant-avatar","ant-avatar-circle","ant-avatar-icon",3,"nzDropdownMenu"],["nz-tooltip","","role","img","width","21","height","21","viewBox","0 0 21 21","fill","currentColor",1,"anticon",3,"nzTooltipTitle"],["fill-rule","evenodd"],["fill-rule","nonzero"],["d","M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",3,"click"],["nz-menu-item",""]],template:function(n,r){if(n&1&&(c(0,"div",0),Kt(),c(1,"svg",1)(2,"g",2)(3,"g",3),f(4,"path",4),p()()(),Yt(),c(5,"nz-dropdown-menu",null,5)(7,"ul",6),P(8,On,2,1,"li",8,H),p()()()),n&2){let a=S(6);l("nzDropdownMenu",r.types.length>0?a:null),s(),l("nzTooltipTitle",r.isDev?r.devTips:null),s(7),$(r.types)}},dependencies:[Ne,Ae,Fe,ke,Me],encapsulation:2,changeDetection:0});let e=i;return e})();var Xr=(()=>{let i=class i{constructor(){this.tokenService=d(A),this.links=[{title:"\u5E2E\u52A9",href:""},{title:"\u9690\u79C1",href:""},{title:"\u6761\u6B3E",href:""}]}ngOnInit(){this.tokenService.clear()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-passport"]],standalone:!0,features:[T],decls:7,vars:0,consts:[[1,"container"],[1,"wrap"],[1,"top"],[1,"desc"],[1,"footer"]],template:function(n,r){n&1&&(c(0,"div",0)(1,"div",1)(2,"div",2),f(3,"div",3),p(),f(4,"router-outlet"),c(5,"div",4),_(6," \u4E0A\u6D77\u53D1\u7535\u8BBE\u5907\u6210\u5957\u8BBE\u8BA1\u7814\u7A76\u9662\u6709\u9650\u8D23\u4EFB\u516C\u53F8 "),p()()())},dependencies:[ot,rn,I],styles:["[_nghost-%COMP%] .container{display:flex;flex-direction:column;min-height:100%;background:#f0f2f5}[_nghost-%COMP%] .langs{width:100%;height:40px;line-height:44px;text-align:right}[_nghost-%COMP%] .langs .anticon{cursor:pointer;margin-top:24px;margin-right:24px;font-size:14px;vertical-align:top}[_nghost-%COMP%] .wrap{flex:1;padding:32px 0}[_nghost-%COMP%] .ant-form-item{display:flex;justify-content:space-between;margin-bottom:24px}[_nghost-%COMP%] .top{margin-top:10rem;text-align:center}[_nghost-%COMP%] .footer{position:fixed;bottom:.8rem;left:50%;transform:translate(-50%,-50%);color:#f0f2f5}[_nghost-%COMP%] .desc{margin-top:12px;margin-bottom:40px;font-size:14px;color:#00000073}[_nghost-%COMP%] .container{background-image:url(/assets/bg.jpg);background-repeat:no-repeat;background-size:cover}@media (min-width: 768px){[_nghost-%COMP%] .wrap{padding:32px 0 24px}}[data-theme=dark] [_nghost-%COMP%] .container{background:#141414}[data-theme=dark] [_nghost-%COMP%] .title{color:#ffffffd9}[data-theme=dark] [_nghost-%COMP%] .desc{color:#ffffff73}@media (min-width: 768px){[data-theme=dark] [_nghost-%COMP%] .container{background-image:none}}[data-theme=compact] [_nghost-%COMP%] .ant-form-item{margin-bottom:16px}"]});let e=i;return e})();var Rn=["host"];function Bn(e,i){e&1&&re(0)}var ln=["*"];function Hn(e,i){if(e&1&&f(0,"i",3),e&2){let o=u(2).$implicit;l("nzType",o.value)("nzTheme",o.theme)("nzSpin",o.spin)("nzTwotoneColor",o.twoToneColor)("nzIconfont",o.iconfont)("nzRotate",o.rotate)}}function Pn(e,i){if(e&1&&f(0,"i",4),e&2){let o=u(2).$implicit;l("nzIconfont",o.iconfont)}}function $n(e,i){if(e&1&&f(0,"img",5),e&2){let o=u(2).$implicit;l("src",o.value,Je)}}function jn(e,i){if(e&1&&f(0,"span",6),e&2){let o=u(2).$implicit;l("innerHTML",o.value,Se)}}function Un(e,i){if(e&1&&f(0,"i"),e&2){let o=u(2).$implicit;St("sidebar-nav__item-icon ",o.value,"")}}function Wn(e,i){if(e&1&&h(0,Hn,1,6)(1,Pn,1,1)(2,$n,1,1)(3,jn,1,1)(4,Un,1,3),e&2){let o=u().$implicit,t;v(0,(t=o.type)==="icon"?0:t==="iconfont"?1:t==="img"?2:t==="svg"?3:4)}}function qn(e,i){if(e&1&&h(0,Wn,5,1),e&2){let o=i.$implicit;v(0,o?0:-1)}}function Qn(e,i){}var Ce=e=>({$implicit:e});function Gn(e,i){if(e&1&&(c(0,"span",15),h(1,Qn,0,0,"ng-template",16),p()),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("nzTooltipTitle",o.text),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.icon))}}function Zn(e,i){}function Kn(e,i){if(e&1&&h(0,Zn,0,0,"ng-template",16),e&2){let o=u(4).$implicit;u(2);let t=S(1);l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(2,Ce,o.icon))}}function Yn(e,i){if(e&1&&h(0,Gn,2,5,"span",15)(1,Kn,1,4),e&2){let o=u(5);v(0,o.collapsed?0:1)}}var Jn=e=>({"sidebar-nav__item-disabled":e});function Xn(e,i){if(e&1){let o=w();c(0,"a",13),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.to(n))})("mouseenter",function(){x(o);let n=u(4);return z(n.closeSubMenu())}),h(1,Yn,2,1),f(2,"span",14),p()}if(e&2){let o=u(2).$implicit;l("ngClass",R(5,Jn,o.disabled)),Q("data-id",o._id),s(),v(1,o._needIcon?1:-1),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function eo(e,i){}function to(e,i){if(e&1){let o=w();c(0,"a",17),g("click",function(){x(o);let n=u(2).$implicit,r=u(2);return z(r.toggleOpen(n))})("mouseenter",function(n){x(o);let r=u(2).$implicit,a=u(2);return z(a.showSubMenu(n,r))}),h(1,eo,0,0,"ng-template",16),f(2,"span",14)(3,"i",18),p()}if(e&2){let o=u(2).$implicit;u(2);let t=S(1);s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(4,Ce,o.icon)),s(),l("innerHTML",o._text,Se),Q("title",o.text)}}function io(e,i){if(e&1&&f(0,"nz-badge",11),e&2){let o=u(2).$implicit;l("nzCount",o.badge)("nzDot",o.badgeDot)("nzOverflowCount",9)}}function no(e,i){}function oo(e,i){if(e&1&&(c(0,"ul"),h(1,no,0,0,"ng-template",16),p()),e&2){let o=u(2).$implicit;u(2);let t=S(3);St("sidebar-nav sidebar-nav__sub sidebar-nav__depth",o._depth,""),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(5,Ce,o.children))}}function ro(e,i){if(e&1&&(c(0,"li",8),h(1,Xn,3,7,"a",9)(2,to,4,6,"a",10)(3,io,1,3,"nz-badge",11)(4,oo,2,7,"ul",12),p()),e&2){let o=u().$implicit;D("sidebar-nav__selected",o._selected)("sidebar-nav__open",o.open),s(),v(1,o.children.length===0?1:-1),s(),v(2,o.children.length>0?2:-1),s(),v(3,o.badge?3:-1),s(),v(4,o.children.length>0?4:-1)}}function ao(e,i){if(e&1&&h(0,ro,5,8,"li",7),e&2){let o=i.$implicit;v(0,o._hidden!==!0?0:-1)}}function so(e,i){if(e&1&&P(0,ao,1,1,null,null,H),e&2){let o=i.$implicit;$(o)}}function lo(e,i){if(e&1&&(c(0,"li",20),f(1,"span",21),p()),e&2){let o=u().$implicit;s(),l("innerHTML",o._text,Se)}}function co(e,i){}function po(e,i){if(e&1&&h(0,lo,2,1,"li",19)(1,co,0,0,"ng-template",16),e&2){let o=i.$implicit;u();let t=S(3);v(0,o.group?0:-1),s(),l("ngTemplateOutlet",t)("ngTemplateOutletContext",R(3,Ce,o.children))}}function uo(e,i){e&1&&ee(0)}function mo(e,i){if(e&1&&(c(0,"li"),h(1,uo,1,0,"ng-container",6),p()),e&2){let o=i.$implicit;D("hidden-mobile",o.hidden==="mobile")("hidden-pc",o.hidden==="pc"),s(),l("ngTemplateOutlet",o.host)}}function fo(e,i){if(e&1&&P(0,mo,2,5,"li",7,H),e&2){let o=i.$implicit;$(o)}}function ho(e,i){e&1&&ee(0)}function go(e,i){if(e&1&&h(0,ho,1,0,"ng-container",6),e&2){let o=u();l("ngTemplateOutlet",o.opt.logo)}}function _o(e,i){if(e&1&&(c(0,"a",8),f(1,"img",9)(2,"img",10),p()),e&2){let o=u();l("routerLink",o.opt.logoLink),s(),Q("src",o.opt.logoExpanded,Je)("alt",o.app.name),s(),Q("src",o.opt.logoCollapsed,Je)("alt",o.app.name)}}function vo(e,i){if(e&1){let o=w();c(0,"li")(1,"div",11),g("click",function(){x(o);let n=u();return z(n.toggleCollapsed())}),f(2,"span",12),p()()}if(e&2){let o=u();s(2),l("nzType",o.collapsedIcon)}}function Co(e,i){}function yo(e,i){e&1&&ee(0)}function xo(e,i){if(e&1&&(c(0,"div",13),h(1,yo,1,0,"ng-container",6),p()),e&2){let o=u();s(),l("ngTemplateOutlet",o.middle[0].host)}}function zo(e,i){}function bo(e,i){e&1&&f(0,"div",5)}function So(e,i){if(e&1&&f(0,"layout-default-header",1),e&2){let o=u();l("items",o.headerItems)}}function Do(e,i){e&1&&ee(0)}function To(e,i){e&1&&ee(0)}function wo(e,i){e&1&&f(0,"layout-default-nav")}function Eo(e,i){e&1&&ee(0)}function Io(e,i){if(e&1&&h(0,Eo,1,0,"ng-container",4),e&2){let o=u(3);l("ngTemplateOutlet",o.asideBottom)}}function Mo(e,i){if(e&1){let o=w();c(0,"div",11),g("click",function(){x(o);let n=u(3);return z(n.toggleCollapsed())}),f(1,"span",12),p()}if(e&2){let o=u(3);s(),l("nzType",o.collapsedIcon)}}function ko(e,i){if(e&1&&(c(0,"div",10),h(1,Io,1,1,"ng-container")(2,Mo,2,1),p()),e&2){let o=u(2);s(),v(1,o.asideBottom?1:2)}}function Fo(e,i){if(e&1&&(c(0,"div",6)(1,"div",7)(2,"div",8),h(3,Do,1,0,"ng-container",4)(4,To,1,0,"ng-container",4)(5,wo,1,0,"layout-default-nav"),p(),h(6,ko,3,1,"div",9),p()()),e&2){let o=u();s(3),l("ngTemplateOutlet",o.asideUser),s(),l("ngTemplateOutlet",o.nav),s(),v(5,o.nav?-1:5),s(),v(6,o.opt.showSiderCollapse?6:-1)}}function No(e,i){e&1&&ee(0)}var Nt=(()=>{let i=class i{constructor(){this.hidden="none",this.direction="right"}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header-item"]],viewQuery:function(n,r){if(n&1&&ae(Rn,7),n&2){let a;G(a=Z())&&(r.host=a.first)}},inputs:{hidden:"hidden",direction:"direction"},ngContentSelectors:ln,decls:2,vars:0,consts:[["host",""]],template:function(n,r){n&1&&(oe(),h(0,Bn,1,0,"ng-template",null,0,k))},encapsulation:2});let e=i;return e})(),Mt={logoExpanded:"./assets/logo-full.svg",logoCollapsed:"./assets/logo.svg",logoLink:"/",showHeaderCollapse:!0,showSiderCollapse:!1,hideAside:!1,hideHeader:!1},cn=(()=>{let i=class i{constructor(){this.settings=d(N),this._options$=new xe(Mt),this._options=Mt}get options(){return this._options}get options$(){return this._options$.asObservable()}get collapsedIcon(){let t=this.settings.layout.collapsed,n=t?"unfold":"fold";return this.settings.layout.direction==="rtl"&&(n=t?"fold":"unfold"),`menu-${n}`}notify(){this._options$.next(this._options)}setOptions(t){this._options=yt(yt({},Mt),t),this.notify()}toggleCollapsed(t){this.settings.setLayout("collapsed",t??!this.settings.layout.collapsed),this.notify()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=Ze({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})(),kt="sidebar-nav__floating-show",Ft="sidebar-nav__floating",Ao=(()=>{let i=class i{constructor(){this.doc=d(te),this.win=d(Bi),this.router=d(U),this.render=d(De),this.menuSrv=d(pt),this.settings=d(N),this.cdr=d(V),this.ngZone=d(ne),this.sanitizer=d(pi),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.dir="ltr",this.list=[],this.disabledAcl=!1,this.autoCloseUnderPad=!0,this.recursivePath=!0,this.hideEmptyChildren=!0,this.maxLevelIcon=3,this.select=new B}set openStrictly(t){this.menuSrv.openStrictly=t}get collapsed(){return this.settings.layout.collapsed}getLinkNode(t){return t=t.nodeName==="A"?t:t.parentNode,t.nodeName!=="A"?null:t}floatingClickHandle(t){t.stopPropagation();let n=this.getLinkNode(t.target);if(n==null)return!1;let r=+n.dataset.id;if(isNaN(r))return!1;let a;return this.menuSrv.visit(this.list,m=>{!a&&m._id===r&&(a=m)}),this.to(a),this.hideAll(),t.preventDefault(),!1}clearFloating(){this.floatingEl&&(this.floatingEl.removeEventListener("click",this.floatingClickHandle.bind(this)),this.floatingEl.hasOwnProperty("remove")?this.floatingEl.remove():this.floatingEl.parentNode&&this.floatingEl.parentNode.removeChild(this.floatingEl))}genFloating(){this.clearFloating(),this.floatingEl=this.render.createElement("div"),this.floatingEl.classList.add(`${Ft}-container`),this.floatingEl.addEventListener("click",this.floatingClickHandle.bind(this),!1),this.bodyEl.appendChild(this.floatingEl)}genSubNode(t,n){let r=`_sidebar-nav-${n._id}`,m=(n.badge?t.nextElementSibling.nextElementSibling:t.nextElementSibling).cloneNode(!0);return m.id=r,m.classList.add(Ft),m.addEventListener("mouseleave",()=>{m.classList.remove(kt)},!1),this.floatingEl.appendChild(m),m}hideAll(){let t=this.floatingEl.querySelectorAll(`.${Ft}`);for(let n=0;nthis.router.navigateByUrl(t.link))}}toggleOpen(t){this.menuSrv.toggleOpen(t)}_click(){this.isPad&&this.collapsed&&(this.openAside(!1),this.hideAll())}closeSubMenu(){this.collapsed&&this.hideAll()}openByUrl(t){let{menuSrv:n,recursivePath:r}=this;this.menuSrv.open(n.find({url:t,recursive:r}))}ngOnInit(){let{doc:t,router:n,menuSrv:r,settings:a,cdr:m}=this;this.bodyEl=t.querySelector("body"),r.change.pipe(F(this.destroy$)).subscribe(y=>{r.visit(y,(M,Bt,An)=>{M._text=this.sanitizer.bypassSecurityTrustHtml(M.text),M._needIcon=An<=this.maxLevelIcon&&!!M.icon,M._aclResult||(this.disabledAcl?M.disabled=!0:M._hidden=!0);let Be=M.icon;Be&&Be.type==="svg"&&typeof Be.value=="string"&&(Be.value=this.sanitizer.bypassSecurityTrustHtml(Be.value))}),this.hideEmptyChildren&&this.fixHide(y),this.list=y.filter(M=>M._hidden!==!0),m.detectChanges()}),n.events.pipe(F(this.destroy$)).subscribe(y=>{y instanceof Dt&&(this.openByUrl(y.urlAfterRedirects),this.underPad(),this.cdr.detectChanges())}),a.notify.pipe(F(this.destroy$),q(y=>y.type==="layout"&&y.name==="collapsed")).subscribe(()=>this.clearFloating()),this.underPad(),this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(y=>{this.dir=y,this.cdr.detectChanges()}),this.openByUrl(n.url),this.ngZone.runOutsideAngular(()=>this.genFloating())}fixHide(t){let n=r=>{for(let a of r)a.children&&a.children.length>0&&(n(a.children),a._hidden||(a._hidden=a.children.every(m=>m._hidden)))};n(t)}ngOnDestroy(){this.clearFloating()}get isPad(){return this.doc.defaultView.innerWidth<768}underPad(){this.autoCloseUnderPad&&this.isPad&&!this.collapsed&&setTimeout(()=>this.openAside(!0))}openAside(t){this.settings.setLayout("collapsed",t)}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-nav"]],hostVars:2,hostBindings:function(n,r){n&1&&g("click",function(){return r._click()})("click",function(){return r.closeSubMenu()},!1,Xt),n&2&&D("d-block",!0)},inputs:{disabledAcl:[L.HasDecoratorInputTransform,"disabledAcl","disabledAcl",K],autoCloseUnderPad:[L.HasDecoratorInputTransform,"autoCloseUnderPad","autoCloseUnderPad",K],recursivePath:[L.HasDecoratorInputTransform,"recursivePath","recursivePath",K],hideEmptyChildren:[L.HasDecoratorInputTransform,"hideEmptyChildren","hideEmptyChildren",K],openStrictly:[L.HasDecoratorInputTransform,"openStrictly","openStrictly",K],maxLevelIcon:[L.HasDecoratorInputTransform,"maxLevelIcon","maxLevelIcon",si]},outputs:{select:"select"},features:[Te],decls:7,vars:0,consts:[["icon",""],["tree",""],[1,"sidebar-nav"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzType","nzTheme","nzSpin","nzTwotoneColor","nzIconfont","nzRotate"],["nz-icon","",1,"sidebar-nav__item-icon",3,"nzIconfont"],[1,"sidebar-nav__item-icon","sidebar-nav__item-img",3,"src"],[1,"sidebar-nav__item-icon","sidebar-nav__item-svg",3,"innerHTML"],["class","sidebar-nav__item",3,"sidebar-nav__selected","sidebar-nav__open"],[1,"sidebar-nav__item"],["class","sidebar-nav__item-link",3,"ngClass"],["class","sidebar-nav__item-link"],["nzStandalone","",3,"nzCount","nzDot","nzOverflowCount"],[3,"class"],[1,"sidebar-nav__item-link",3,"ngClass","click","mouseenter"],[1,"sidebar-nav__item-text",3,"innerHTML"],["nz-tooltip","","nzTooltipPlacement","right",3,"nzTooltipTitle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"sidebar-nav__item-link",3,"click","mouseenter"],[1,"sidebar-nav__sub-arrow"],["class","sidebar-nav__item sidebar-nav__group-title"],[1,"sidebar-nav__item","sidebar-nav__group-title"],[3,"innerHTML"]],template:function(n,r){n&1&&(h(0,qn,1,1,"ng-template",null,0,k)(2,so,2,0,"ng-template",null,1,k),c(4,"ul",2),P(5,po,2,5,null,16,H),p()),n&2&&(s(5),$(r.list))},dependencies:[we,fe,Me,E,Hi],encapsulation:2,changeDetection:0});let e=i;return Y([Ue()],e.prototype,"showSubMenu",null),e})(),Oo=(()=>{let i=class i{constructor(){this.settings=d(N),this.srv=d(cn),this.cdr=d(V),this.destroy$=d(me),this.left=[],this.middle=[],this.right=[]}get opt(){return this.srv.options}get app(){return this.settings.app}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}refresh(){let t=this.items.toArray();this.left=t.filter(n=>n.direction==="left"),this.middle=t.filter(n=>n.direction==="middle"),this.right=t.filter(n=>n.direction==="right"),this.cdr.detectChanges()}ngAfterViewInit(){this.items.changes.pipe(F(this.destroy$)).subscribe(()=>this.refresh()),this.srv.options$.pipe(F(this.destroy$)).subscribe(()=>this.cdr.detectChanges()),this.refresh()}toggleCollapsed(){this.srv.toggleCollapsed()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["layout-default-header"]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__header",!0)},inputs:{items:"items"},decls:12,vars:13,consts:[["render",""],[1,"alain-default__header-logo"],[1,"alain-default__nav-wrap"],[1,"alain-default__nav"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","alain-default__nav alain-default__nav-middle"],[4,"ngTemplateOutlet"],[3,"hidden-mobile","hidden-pc"],[1,"alain-default__header-logo-link",3,"routerLink"],[1,"alain-default__header-logo-expanded"],[1,"alain-default__header-logo-collapsed"],[1,"alain-default__nav-item","alain-default__nav-item--collapse",3,"click"],["nz-icon","",3,"nzType"],[1,"alain-default__nav","alain-default__nav-middle"]],template:function(n,r){if(n&1&&(h(0,fo,2,0,"ng-template",null,0,k),c(2,"div",1),h(3,go,1,1,"ng-container")(4,_o,3,5),p(),c(5,"div",2)(6,"ul",3),h(7,vo,3,1,"li")(8,Co,0,0,"ng-template",4),p(),h(9,xo,2,1,"div",5),c(10,"ul",3),h(11,zo,0,0,"ng-template",4),p()()),n&2){let a=S(1);s(2),ti("width",r.opt.logoFixWidth,"px"),s(),v(3,r.opt.logo?3:4),s(4),v(7,!r.opt.hideAside&&r.opt.showHeaderCollapse?7:-1),s(),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(9,Ce,r.left)),s(),v(9,r.middle.length>0?9:-1),s(2),l("ngTemplateOutlet",a)("ngTemplateOutletContext",R(11,Ce,r.right))}},dependencies:[fe,rt,E],encapsulation:2,changeDetection:0});let e=i;return e})(),pn=(()=>{let i=class i{get opt(){return this.srv.options}set options(t){this.srv.setOptions(t)}get showFetching(){return this.fetchingStrictly?this.fetching:this.isFetching}get collapsed(){return this.settings.layout.collapsed}get collapsedIcon(){return this.srv.collapsedIcon}toggleCollapsed(){this.srv.toggleCollapsed()}constructor(t,n,r,a,m,y,M){this.msgSrv=n,this.settings=r,this.el=a,this.renderer=m,this.doc=y,this.srv=M,this.asideUser=null,this.asideBottom=null,this.nav=null,this.content=null,this.fetchingStrictly=!1,this.fetching=!1,this.isFetching=!1,t.events.pipe(F(),q(()=>!this.fetchingStrictly)).subscribe(Bt=>this.processEv(Bt)),this.srv.options$.pipe(F()).subscribe(()=>this.setClass()),this.settings.notify.pipe(F()).subscribe(()=>this.setClass())}processEv(t){if(!this.isFetching&&t instanceof di&&(this.isFetching=!0),t instanceof Tt||t instanceof ui){this.isFetching=!1;let n=this.customError===null?null:this.customError??`Could not load ${t.url} route`;n&&t instanceof Tt&&this.msgSrv.error(n,{nzDuration:1e3*3});return}(t instanceof Dt||t instanceof mi)&&this.isFetching&&setTimeout(()=>{this.isFetching=!1},100)}setClass(){let{el:t,doc:n,renderer:r,settings:a}=this,m=a.layout;Oi(t.nativeElement,r,{"alain-default":!0,"alain-default__fixed":m.fixed,"alain-default__collapsed":m.collapsed,"alain-default__hide-aside":this.opt.hideAside,"alain-default__hide-header":this.opt.hideHeader}),n.body.classList[m.colorWeak?"add":"remove"]("color-weak")}};i.\u0275fac=function(n){return new(n||i)(b(U),b(Ee),b(N),b(de),b(De),b(te),b(cn))},i.\u0275cmp=C({type:i,selectors:[["layout-default"]],contentQueries:function(n,r,a){if(n&1&&Pe(a,Nt,4),n&2){let m;G(m=Z())&&(r.headerItems=m)}},inputs:{options:"options",asideUser:"asideUser",asideBottom:"asideBottom",nav:"nav",content:"content",customError:"customError",fetchingStrictly:[L.HasDecoratorInputTransform,"fetchingStrictly","fetchingStrictly",K],fetching:[L.HasDecoratorInputTransform,"fetching","fetching",K]},exportAs:["layoutDefault"],features:[Te],ngContentSelectors:ln,decls:6,vars:4,consts:[["class","alain-default__progress-bar"],[3,"items"],["class","alain-default__aside"],[1,"alain-default__content"],[4,"ngTemplateOutlet"],[1,"alain-default__progress-bar"],[1,"alain-default__aside"],[1,"alain-default__aside-wrap"],[1,"alain-default__aside-inner"],["class","alain-default__aside-link"],[1,"alain-default__aside-link"],[1,"alain-default__aside-link-collapsed",3,"click"],["nz-icon","",3,"nzType"]],template:function(n,r){n&1&&(oe(),h(0,bo,1,0,"div",0)(1,So,1,1,"layout-default-header",1)(2,Fo,7,4,"div",2),c(3,"section",3),h(4,No,1,0,"ng-container",4),re(5),p()),n&2&&(v(0,r.showFetching?0:-1),s(),v(1,r.opt.hideHeader?-1:1),s(),v(2,r.opt.hideAside?-1:2),s(2),l("ngTemplateOutlet",r.content))},dependencies:[fe,E,Ao,Oo],encapsulation:2});let e=i;return e})(),un=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275dir=Ke({type:i,selectors:[["","layout-default-header-item-trigger",""]],hostVars:2,hostBindings:function(n,r){n&2&&D("alain-default__nav-item",!0)}});let e=i;return e})();var dn=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=X({type:i}),i.\u0275inj=J({imports:[he,at,je,I,Oe,ve,Vi,Pi]});let e=i;return e})();var Ot=()=>({standalone:!0});function Ro(e,i){if(e&1){let o=w();c(0,"input",1),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Bo(e,i){if(e&1){let o=w();c(0,"input",2),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function Ho(e,i){if(e&1){let o=w();c(0,"nz-input-number",3),g("ngModelChange",function(n){x(o);let r=u();return z(r.pxVal=n)})("ngModelChange",function(n){x(o);let r=u();return z(r.pxChange(n))}),p()}if(e&2){let o=u();l("ngModel",o.pxVal)("nzMin",o.i.min)("nzMax",o.i.max)("nzStep",o.i.step||2)("nzFormatter",o.format)}}function Po(e,i){if(e&1){let o=w();c(0,"nz-switch",4),g("ngModelChange",function(n){x(o);let r=u();return z(r.i.value=n)}),p()}if(e&2){let o=u();l("ngModel",o.i.value)("ngModelOptions",Xe(2,Ot))}}function $o(e,i){}function jo(e,i){e&1&&h(0,$o,0,0,"ng-template",5)}function Uo(e,i){e&1&&f(0,"i",19)}var Wo=e=>({"background-color":e});function qo(e,i){if(e&1){let o=w();c(0,"span",18),g("click",function(){let r=x(o).$implicit,a=u(2);return z(a.changeColor(r.color))}),h(1,Uo,1,0,"i",19),p()}if(e&2){let o=i.$implicit,t=u(2);ii(R(4,Wo,o.color)),l("nzTooltipTitle",o.key),s(),v(1,t.color===o.color?1:-1)}}function Qo(e,i){if(e&1){let o=w();c(0,"div",4)(1,"div",5)(2,"h3",6),_(3,"\u4E3B\u9898\u8272"),p(),P(4,qo,2,6,"span",20,H),p(),f(6,"nz-divider"),c(7,"div",7)(8,"h3",6),_(9,"\u8BBE\u7F6E"),p(),c(10,"nz-tabset")(11,"nz-tab",8)(12,"div",7),f(13,"setting-drawer-item",9)(14,"setting-drawer-item",9)(15,"setting-drawer-item",9),p()(),c(16,"nz-tab",10),f(17,"setting-drawer-item",9)(18,"setting-drawer-item",9)(19,"setting-drawer-item",9)(20,"setting-drawer-item",9),p(),c(21,"nz-tab",11),f(22,"setting-drawer-item",9)(23,"setting-drawer-item",9)(24,"setting-drawer-item",9)(25,"setting-drawer-item",9),p(),c(26,"nz-tab",12),f(27,"setting-drawer-item",9)(28,"setting-drawer-item",9)(29,"setting-drawer-item",9)(30,"setting-drawer-item",9)(31,"setting-drawer-item",9)(32,"setting-drawer-item",9),p()()(),f(33,"nz-divider"),c(34,"div",7)(35,"div",13),_(36," \u56FA\u5B9A\u5934\u548C\u4FA7\u8FB9\u680F "),c(37,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.fixed=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("fixed",n.layout.fixed))}),p()(),c(38,"div",13),_(39," \u8272\u5F31\u6A21\u5F0F "),c(40,"nz-switch",14),g("ngModelChange",function(n){x(o);let r=u();return z(r.layout.colorWeak=n)})("ngModelChange",function(){x(o);let n=u();return z(n.setLayout("colorWeak",n.layout.colorWeak))}),p()()(),f(41,"nz-divider"),c(42,"button",15),g("click",function(){x(o);let n=u();return z(n.apply())}),_(43,"\u9884\u89C8"),p(),c(44,"button",16),g("click",function(){x(o);let n=u();return z(n.reset())}),_(45,"\u91CD\u7F6E"),p(),c(46,"button",16),g("click",function(){x(o);let n=u();return z(n.copyVar())}),_(47,"\u62F7\u8D1D"),p(),f(48,"nz-alert",17),p()}if(e&2){let o=u();s(4),$(o.colors),s(9),l("data",o.data["alain-default-header-hg"]),s(),l("data",o.data["alain-default-header-bg"]),s(),l("data",o.data["alain-default-header-padding"]),s(2),l("data",o.data["alain-default-aside-wd"]),s(),l("data",o.data["alain-default-aside-bg"]),s(),l("data",o.data["alain-default-aside-collapsed-wd"]),s(),l("data",o.data["alain-default-aside-nav-padding-top-bottom"]),s(2),l("data",o.data["alain-default-content-bg"]),s(),l("data",o.data["alain-default-content-heading-bg"]),s(),l("data",o.data["alain-default-content-heading-border"]),s(),l("data",o.data["alain-default-content-padding"]),s(2),l("data",o.data["form-state-visual-feedback-enabled"]),s(),l("data",o.data["preserve-white-spaces-enabled"]),s(),l("data",o.data["nz-table-img-radius"]),s(),l("data",o.data["nz-table-img-margin-right"]),s(),l("data",o.data["nz-table-img-max-width"]),s(),l("data",o.data["nz-table-img-max-height"]),s(5),l("ngModel",o.layout.fixed),s(3),l("ngModel",o.layout.colorWeak)}}var Go=e=>({"setting-drawer__handle-opened":e}),Zo=(()=>{let i=class i{constructor(){this.i={},this.pxVal=0,this.format=t=>`${t} px`}set data(t){this.i=t,t.type==="px"&&(this.pxVal=+t.value.replace("px",""))}pxChange(t){this.i.value=`${t}px`}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=C({type:i,selectors:[["setting-drawer-item"]],hostVars:2,hostBindings:function(n,r){n&2&&D("setting-drawer__body-item",!0)},inputs:{data:"data"},decls:9,vars:3,consts:[[1,"pl-sm","text-grey"],["nz-input","","type","color",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],["nz-input","",2,"width","88px",3,"ngModel","ngModelOptions","ngModelChange"],[3,"ngModel","nzMin","nzMax","nzStep","nzFormatter","ngModelChange"],["nzSize","small",3,"ngModel","ngModelOptions","ngModelChange"],["nzDrawerContent",""]],template:function(n,r){if(n&1&&(c(0,"span"),_(1),c(2,"span",0),_(3),p()(),h(4,Ro,1,3)(5,Bo,1,3)(6,Ho,1,5)(7,Po,1,3)(8,jo,1,0)),n&2){let a;s(),se(" ",r.i.label," "),s(2),j(r.i.tip),s(),v(4,(a=r.i.type)==="color"?4:a==="input"?5:a==="px"?6:a==="switch"?7:8)}},dependencies:[ut,ge,_e,Et,It,ft,Qi],encapsulation:2});let e=i;return e})(),At="alain-default-vars",Ko=[{key:"dust",color:"#F5222D"},{key:"volcano",color:"#FA541C"},{key:"sunset",color:"#FAAD14"},{key:"cyan",color:"#13C2C2"},{key:"green",color:"#52C41A"},{key:"daybreak",color:"#1890ff"},{key:"geekblue",color:"#2F54EB"},{key:"purple",color:"#722ED1"},{key:"black",color:"#001529"}],vt={"primary-color":{label:"\u4E3B\u989C\u8272",type:"color",default:"#1890ff"},"alain-default-header-hg":{label:"\u9AD8",type:"px",default:"64px",max:300,min:24},"alain-default-header-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-header-padding":{label:"\u9876\u90E8\u5DE6\u53F3\u5185\u8FB9\u8DDD",type:"px",default:"16px"},"alain-default-aside-wd":{label:"\u5BBD\u5EA6",type:"px",default:"200px"},"alain-default-aside-bg":{label:"\u80CC\u666F",type:"color",default:"#ffffff"},"alain-default-aside-collapsed-wd":{label:"\u6536\u7F29\u5BBD\u5EA6",type:"px",default:"64px"},"alain-default-aside-nav-padding-top-bottom":{label:"\u9879\u4E0A\u4E0B\u5185\u8FB9\u8DDD",type:"px",default:"8px",step:8},"alain-default-aside-nav-fs":{label:"\u83DC\u5355\u5B57\u53F7",type:"px",default:"14px",min:14,max:30},"alain-default-aside-collapsed-nav-fs":{label:"\u6536\u7F29\u83DC\u5355\u5B57\u53F7",type:"px",default:"24px",min:24,max:32},"alain-default-aside-nav-item-height":{label:"\u83DC\u5355\u9879\u9AD8\u5EA6",type:"px",default:"38px",min:24,max:64},"alain-default-aside-nav-text-color":{label:"\u83DC\u5355\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.65)",rgba:!0},"alain-default-aside-nav-text-hover-color":{label:"\u83DC\u5355\u6587\u672C\u60AC\u505C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-group-text-color":{label:"\u83DC\u5355\u5206\u7EC4\u6587\u672C\u989C\u8272",type:"color",default:"rgba(0, 0, 0, 0.43)",rgba:!0},"alain-default-aside-nav-selected-text-color":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u6587\u672C\u989C\u8272",type:"color",default:"@primary-color",tip:"\u9ED8\u8BA4\u540C\u4E3B\u8272\u7CFB"},"alain-default-aside-nav-selected-bg":{label:"\u83DC\u5355\u6FC0\u6D3B\u65F6\u80CC\u666F\u989C\u8272",type:"color",default:"#fcfcfc"},"alain-default-content-bg":{label:"\u80CC\u666F\u8272",type:"color",default:"#f5f7fa"},"alain-default-content-heading-bg":{label:"\u6807\u9898\u80CC\u666F\u8272",type:"color",default:"#fafbfc"},"alain-default-content-heading-border":{label:"\u6807\u9898\u5E95\u90E8\u8FB9\u6846\u8272",type:"color",default:"#efe3e5"},"alain-default-content-padding":{label:"\u5185\u8FB9\u8DDD",type:"px",default:"24px",min:0,max:128,step:8},"form-state-visual-feedback-enabled":{label:"\u5F00\u542F\u8868\u5355\u5143\u7D20\u7684\u89C6\u89C9\u53CD\u9988",type:"switch",default:!0},"preserve-white-spaces-enabled":{label:"\u5F00\u542F preserveWhitespaces",type:"switch",default:!0},"nz-table-img-radius":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u5706\u89D2",type:"px",default:"4px",min:0,max:128},"nz-table-img-margin-right":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u53F3\u5916\u8FB9\u8DDD",type:"px",default:"4px",min:0,max:128},"nz-table-img-max-width":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u5BBD\u5EA6",type:"px",default:"32px",min:8,max:128},"nz-table-img-max-height":{label:"\u8868\u683C\u4E2D\uFF1A\u56FE\u7247\u6700\u5927\u9AD8\u5EA6",type:"px",default:"32px",min:8,max:128}},hn=(()=>{let i=class i{get layout(){return this.settingSrv.layout}constructor(){this.cdr=d(V),this.msg=d(Ee),this.settingSrv=d(N),this.lazy=d(hi),this.ngZone=d(ne),this.doc=d(te),this.directionality=d(le,{optional:!0}),this.destroy$=d(me),this.autoApplyColor=!0,this.compilingText="Compiling...",this.devTips="When the color can't be switched, you need to run it once: npm run color-less",this.lessJs="https://cdn.jsdelivr.net/npm/less",this.loadedLess=!1,this.dir="ltr",this.isDev=tt(),this.collapse=!1,this.data={},this.colors=Ko,this.color=this.cachedData["@primary-color"]||this.DEFAULT_PRIMARY,this.resetData(this.cachedData,!1)}get cachedData(){return this.settingSrv.layout[At]||{}}get DEFAULT_PRIMARY(){return vt["primary-color"].default}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.autoApplyColor&&this.color!==this.DEFAULT_PRIMARY&&(this.changeColor(this.color),this.runLess())}loadLess(){return Ht(this,null,function*(){return this.loadedLess?Promise.resolve():this.lazy.loadStyle("./assets/color.less",{rel:"stylesheet/less"}).then(()=>{let t=this.doc.createElement("script");t.innerHTML=` window.less = { async: true, env: 'production', diff --git a/dist/himp.platform.angular/browser/chunk-BRRG4SER.js b/dist/himp.platform.angular/browser/chunk-MUTNAUEH.js similarity index 89% rename from dist/himp.platform.angular/browser/chunk-BRRG4SER.js rename to dist/himp.platform.angular/browser/chunk-MUTNAUEH.js index e0234ab..5ea0098 100644 --- a/dist/himp.platform.angular/browser/chunk-BRRG4SER.js +++ b/dist/himp.platform.angular/browser/chunk-MUTNAUEH.js @@ -1 +1 @@ -import{a as st}from"./chunk-ZRW2SW2G.js";import{$a as j,Ab as Q,Cb as g,Da as b,Eb as C,Ec as q,Fe as tt,Ge as et,Hb as u,Hf as rt,Ia as s,Ic as G,Ie as v,Ja as M,Je as _,Ka as w,Kf as ct,La as R,Lf as pt,Nd as X,Oc as U,Od as J,Ra as L,Ta as d,Ua as N,Uc as W,Va as I,Vc as k,ab as H,ad as Z,cb as B,db as F,eb as c,fb as p,ga as T,gb as h,ja as r,kb as O,la as l,lc as K,ma as E,ob as f,qa as z,qb as y,ra as S,rb as V,sb as $,vf as it,wc as Y,yb as A,yf as nt,zb as P,zf as ot}from"./chunk-TV7RDLL7.js";var dt=["conTpl"];function ut(n,t){if(n&1&&(c(0,"button",8),g(1),p()),n&2){let a=y();d("routerLink",a.backRouterLink)("nzType","primary"),s(),C(" ",a.locale.backToHome," ")}}var ht=["*"],D=(()=>{let t=class t{set type(e){let i=this.typeDict[e];i&&(this.fixImg(i.img),this._type=e,this._title=i.title,this._desc="")}fixImg(e){this._img=this.dom.bypassSecurityTrustStyle(`url('${e}')`)}set img(e){this.fixImg(e)}set title(e){this._title=this.dom.bypassSecurityTrustHtml(e)}set desc(e){this._desc=this.dom.bypassSecurityTrustHtml(e)}checkContent(){this.hasCon=!rt(this.conTpl.nativeElement),this.cdr.detectChanges()}constructor(e){this.i18n=r(nt),this.dom=r(Y),this.directionality=r(Z,{optional:!0}),this.cdr=r(w),this.destroy$=r(R),this.locale={},this.hasCon=!1,this.dir="ltr",this._img="",this._title="",this._desc="",this.backRouterLink="/",e.attach(this,"exception",{typeDict:{403:{img:"https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg",title:"403"},404:{img:"https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg",title:"404"},500:{img:"https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg",title:"500"}}})}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(k(this.destroy$)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.i18n.change.pipe(k(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getData("exception"),this.cdr.detectChanges()}),this.checkContent()}};t.\u0275fac=function(i){return new(i||t)(M(W))},t.\u0275cmp=l({type:t,selectors:[["exception"]],viewQuery:function(i,o){if(i&1&&A(dt,7),i&2){let m;P(m=Q())&&(o.conTpl=m.first)}},hostVars:4,hostBindings:function(i,o){i&2&&I("exception",!0)("exception-rtl",o.dir==="rtl")},inputs:{type:"type",img:"img",title:"title",desc:"desc",backRouterLink:"backRouterLink"},exportAs:["exception"],standalone:!0,features:[u],ngContentSelectors:ht,decls:10,vars:5,consts:[[1,"exception__img-block"],[1,"exception__img"],[1,"exception__cont"],[1,"exception__cont-title",3,"innerHTML"],[1,"exception__cont-desc",3,"innerHTML"],[1,"exception__cont-actions"],[3,"cdkObserveContent"],["conTpl",""],["nz-button","",3,"routerLink","nzType"]],template:function(i,o){i&1&&(V(),c(0,"div",0),h(1,"div",1),p(),c(2,"div",2),h(3,"h1",3)(4,"div",4),c(5,"div",5)(6,"div",6,7),f("cdkObserveContent",function(){return o.checkContent()}),$(8),p(),L(9,ut,2,3,"button",8),p()()),i&2&&(s(),N("background-image",o._img),s(2),d("innerHTML",o._title,b),s(),d("innerHTML",o._desc||o.locale[o._type],b),s(5),j(9,o.hasCon?-1:9))},dependencies:[X,v,G],encapsulation:2,changeDetection:0});let n=t;return n})(),ft=[D],mt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=E({type:t}),t.\u0275inj=T({imports:[K,J,U,ot,_,ft]});let n=t;return n})();var x=(()=>{let t=class t{constructor(){this.route=r(q)}get type(){return this.route.snapshot.data.type}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=l({type:t,selectors:[["app-exception"]],standalone:!0,features:[u],decls:1,vars:1,consts:[[2,"min-height","500px","height","80%",3,"type"]],template:function(i,o){i&1&&h(0,"exception",0),i&2&&d("type",o.type)},dependencies:[mt,D],encapsulation:2,changeDetection:0});let n=t;return n})();function yt(n,t){if(n&1){let a=O();c(0,"button",2),f("click",function(){let o=z(a).$implicit,m=y();return S(m.go(o))}),g(1),p()}if(n&2){let a=t.$implicit;s(),C("\u89E6\u53D1",a,"")}}var lt=(()=>{let t=class t{constructor(){this.http=r(it),this.tokenService=r(st),this.types=[401,403,404,500]}go(e){this.http.get(`/api/${e}`).subscribe()}refresh(){this.tokenService.set({token:"invalid-token"}),this.http.post("https://localhost:5001/auth").subscribe({next:e=>console.warn("\u6210\u529F",e),error:e=>{console.log("\u6700\u540E\u7ED3\u679C\u5931\u8D25",e)}})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=l({type:t,selectors:[["exception-trigger"]],standalone:!0,features:[u],decls:6,vars:0,consts:[[1,"pt-lg"],["nz-button","","nzType","link",3,"click"],["nz-button","","nzDanger","",3,"click"],["nz-button","","nzDanger",""]],template:function(i,o){i&1&&(c(0,"div",0)(1,"nz-card"),B(2,yt,2,1,"button",3,H),c(4,"button",1),f("click",function(){return o.refresh()}),g(5,"\u89E6\u53D1\u5237\u65B0Token"),p()()()),i&2&&(s(2),F(o.types))},dependencies:[pt,ct,_,v,tt,et],encapsulation:2});let n=t;return n})();var te=[{path:"403",component:x,data:{type:403}},{path:"404",component:x,data:{type:404}},{path:"500",component:x,data:{type:500}},{path:"trigger",component:lt}];export{te as routes}; +import{a as st}from"./chunk-4FFPI7ZP.js";import{Ab as A,Af as nt,Bb as P,Bf as ot,Cb as Q,Eb as g,Fa as b,Gb as C,Gc as q,He as tt,Ie as et,Jb as u,Jf as rt,Ka as s,Kc as G,Ke as v,La as M,Le as _,Ma as w,Mf as ct,Na as R,Nf as pt,Pd as X,Qc as U,Qd as J,Ta as L,Va as d,Wa as N,Wc as W,Xa as I,Xc as k,bb as j,cb as H,cd as Z,eb as B,fb as F,gb as c,hb as p,ia as T,ib as h,la as r,mb as O,na as l,nc as K,oa as E,qb as f,sa as z,sb as y,ta as S,tb as V,ub as $,xf as it,yc as Y}from"./chunk-VDRVUQCF.js";var dt=["conTpl"];function ut(n,t){if(n&1&&(c(0,"button",8),g(1),p()),n&2){let a=y();d("routerLink",a.backRouterLink)("nzType","primary"),s(),C(" ",a.locale.backToHome," ")}}var ht=["*"],D=(()=>{let t=class t{set type(e){let i=this.typeDict[e];i&&(this.fixImg(i.img),this._type=e,this._title=i.title,this._desc="")}fixImg(e){this._img=this.dom.bypassSecurityTrustStyle(`url('${e}')`)}set img(e){this.fixImg(e)}set title(e){this._title=this.dom.bypassSecurityTrustHtml(e)}set desc(e){this._desc=this.dom.bypassSecurityTrustHtml(e)}checkContent(){this.hasCon=!rt(this.conTpl.nativeElement),this.cdr.detectChanges()}constructor(e){this.i18n=r(nt),this.dom=r(Y),this.directionality=r(Z,{optional:!0}),this.cdr=r(w),this.destroy$=r(R),this.locale={},this.hasCon=!1,this.dir="ltr",this._img="",this._title="",this._desc="",this.backRouterLink="/",e.attach(this,"exception",{typeDict:{403:{img:"https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg",title:"403"},404:{img:"https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg",title:"404"},500:{img:"https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg",title:"500"}}})}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(k(this.destroy$)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.i18n.change.pipe(k(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getData("exception"),this.cdr.detectChanges()}),this.checkContent()}};t.\u0275fac=function(i){return new(i||t)(M(W))},t.\u0275cmp=l({type:t,selectors:[["exception"]],viewQuery:function(i,o){if(i&1&&A(dt,7),i&2){let m;P(m=Q())&&(o.conTpl=m.first)}},hostVars:4,hostBindings:function(i,o){i&2&&I("exception",!0)("exception-rtl",o.dir==="rtl")},inputs:{type:"type",img:"img",title:"title",desc:"desc",backRouterLink:"backRouterLink"},exportAs:["exception"],standalone:!0,features:[u],ngContentSelectors:ht,decls:10,vars:5,consts:[[1,"exception__img-block"],[1,"exception__img"],[1,"exception__cont"],[1,"exception__cont-title",3,"innerHTML"],[1,"exception__cont-desc",3,"innerHTML"],[1,"exception__cont-actions"],[3,"cdkObserveContent"],["conTpl",""],["nz-button","",3,"routerLink","nzType"]],template:function(i,o){i&1&&(V(),c(0,"div",0),h(1,"div",1),p(),c(2,"div",2),h(3,"h1",3)(4,"div",4),c(5,"div",5)(6,"div",6,7),f("cdkObserveContent",function(){return o.checkContent()}),$(8),p(),L(9,ut,2,3,"button",8),p()()),i&2&&(s(),N("background-image",o._img),s(2),d("innerHTML",o._title,b),s(),d("innerHTML",o._desc||o.locale[o._type],b),s(5),j(9,o.hasCon?-1:9))},dependencies:[X,v,G],encapsulation:2,changeDetection:0});let n=t;return n})(),ft=[D],mt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=E({type:t}),t.\u0275inj=T({imports:[K,J,U,ot,_,ft]});let n=t;return n})();var x=(()=>{let t=class t{constructor(){this.route=r(q)}get type(){return this.route.snapshot.data.type}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=l({type:t,selectors:[["app-exception"]],standalone:!0,features:[u],decls:1,vars:1,consts:[[2,"min-height","500px","height","80%",3,"type"]],template:function(i,o){i&1&&h(0,"exception",0),i&2&&d("type",o.type)},dependencies:[mt,D],encapsulation:2,changeDetection:0});let n=t;return n})();function yt(n,t){if(n&1){let a=O();c(0,"button",2),f("click",function(){let o=z(a).$implicit,m=y();return S(m.go(o))}),g(1),p()}if(n&2){let a=t.$implicit;s(),C("\u89E6\u53D1",a,"")}}var lt=(()=>{let t=class t{constructor(){this.http=r(it),this.tokenService=r(st),this.types=[401,403,404,500]}go(e){this.http.get(`/api/${e}`).subscribe()}refresh(){this.tokenService.set({token:"invalid-token"}),this.http.post("https://localhost:5001/auth").subscribe({next:e=>console.warn("\u6210\u529F",e),error:e=>{console.log("\u6700\u540E\u7ED3\u679C\u5931\u8D25",e)}})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=l({type:t,selectors:[["exception-trigger"]],standalone:!0,features:[u],decls:6,vars:0,consts:[[1,"pt-lg"],["nz-button","","nzType","link",3,"click"],["nz-button","","nzDanger","",3,"click"],["nz-button","","nzDanger",""]],template:function(i,o){i&1&&(c(0,"div",0)(1,"nz-card"),B(2,yt,2,1,"button",3,H),c(4,"button",1),f("click",function(){return o.refresh()}),g(5,"\u89E6\u53D1\u5237\u65B0Token"),p()()()),i&2&&(s(2),F(o.types))},dependencies:[pt,ct,_,v,tt,et],encapsulation:2});let n=t;return n})();var te=[{path:"403",component:x,data:{type:403}},{path:"404",component:x,data:{type:404}},{path:"500",component:x,data:{type:500}},{path:"trigger",component:lt}];export{te as routes}; diff --git a/dist/himp.platform.angular/browser/chunk-XXGLJ63T.js b/dist/himp.platform.angular/browser/chunk-OOUNO2UZ.js similarity index 99% rename from dist/himp.platform.angular/browser/chunk-XXGLJ63T.js rename to dist/himp.platform.angular/browser/chunk-OOUNO2UZ.js index 282f41c..a1eee41 100644 --- a/dist/himp.platform.angular/browser/chunk-XXGLJ63T.js +++ b/dist/himp.platform.angular/browser/chunk-OOUNO2UZ.js @@ -1,4 +1,4 @@ -import{$ as F,$a as ie,$b as St,$c as BS,$d as aw,$e as Di,A as zo,Aa as TS,Ab as ue,Ad as XS,Af as Hl,Bb as te,Bd as im,Bf as vw,C as gS,Cb as Y,Cd as mp,Cf as Op,D as Ke,Da as Dt,Db as ye,Dd as vi,De as Fe,Df as cm,E as nu,Ea as Do,Eb as Ne,Ec as dp,Ee as Ge,Fa as de,Fd as st,Fe as yi,G as _t,Ga as ES,Gb as Ve,Gc as VS,Gd as De,Ge as hr,H as Qe,Ha as He,Hb as K,Hc as mi,Hd as Fl,He as lw,Hf as Bl,Ia as f,Ib as ii,Ic as Po,Id as ZS,Ie as eo,If as yw,Ja as w,Jb as yt,Jd as ur,Je as Hi,Jf as Cw,K as zs,Ka as fe,Kb as ri,Kd as Al,Ke as Ue,Kf as um,L as lp,La as rs,Lb as iu,Ld as JS,Le as Ye,Lf as $l,M as mS,Ma as O,Mb as Xn,Md as Nl,Me as sm,N as Sa,Na as $e,Nb as Vi,Nd as Ll,Ne as to,O as Zr,Oa as Xe,Ob as up,Oc as Il,Od as vp,P as Tl,Pa as fi,Pb as DS,Pc as ou,Pd as yp,Pe as lu,Q as Os,Qa as Tn,Qb as _e,Qc as Jr,Qd as ew,R as Bt,Ra as _,Rc as Pl,Rd as tw,Sa as ze,Sc as GS,Sd as Oi,T as El,Ta as h,Tb as RS,Tc as HS,Td as nw,U as xl,Ua as Re,Ub as IS,Uc as In,Ud as Cp,Va as k,Vb as PS,Vc as li,Vd as iw,Ve as Sp,Wa as Ol,Wb as it,Wc as pp,Wd as rw,We as am,X as vS,Xa as cr,Xb as fn,Xd as kl,Xe as cw,Y as yS,Ya as Ae,Yb as qg,Yc as su,Yd as au,Ye as Vl,Z as Ot,Za as Dl,Zb as gi,Zc as gn,Zd as ow,Ze as Ln,_ as on,_a as xS,_b as MS,_c as hp,_d as sw,a as V,aa as CS,ab as yn,ac as lt,ad as Me,ae as ln,af as wp,b as ot,ba as _S,bc as we,bd as $S,be as _p,bf as bp,ca as zl,cb as Cn,cc as jn,cd as jS,ce as ss,cf as no,d as op,da as cp,db as _n,dc as Wn,dd as WS,de as dr,e as ke,ea as pn,eb as C,ec as Gi,ed as fp,ee as oi,fa as qe,fb as S,fc as Zt,fd as US,fe as Fr,ff as Gl,g as cS,ga as ge,gb as R,gc as Be,gd as KS,ge as Ar,gf as ft,h as xo,ha as hn,hb as H,hc as ru,hd as gp,he as mn,ia as nt,ib as B,id as qS,ie as pt,j as lr,ja as ae,jb as Xt,jc as Rl,jd as Qg,je as pr,jf as Tp,k as sp,ka as le,kb as Q,kc as FS,kd as YS,ke as Sn,kf as Ep,la as j,lb as Ug,lc as Zn,ld as QS,le as rm,lf as uw,m as J,ma as me,mb as Ta,mc as AS,md as ht,me as om,n as ct,na as Se,nb as zS,nc as Yg,nd as Ml,nf as Rs,o as tn,oa as SS,ob as A,od as Xg,of as xp,p as ap,pa as oe,pb as OS,pd as Zg,pf as dw,q as uS,qa as I,qb as m,qd as Jg,qf as zp,r as xs,ra as P,rb as Pe,rd as os,rf as pw,s as N,sa as Oo,sb as Ie,sc as NS,sd as em,sf as hw,t as dS,tb as Vt,td as Ea,tf as fw,u as Mn,ua as Ut,ud as Ds,uf as gw,v as pS,va as wS,vb as Kg,vd as W,vf as mw,w as hS,wa,wb as En,wc as Ro,wd as ci,x as fS,xa as ba,xb as Ft,xc as LS,xd as tm,y as We,ya as $n,yb as xe,yc as kS,yf as cu,z as Fn,za as bS,zb as ce,zc as Io,zd as nm,zf as lm}from"./chunk-TV7RDLL7.js";var Mu=ke($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.regexpCode=$t.getEsmExportName=$t.getProperty=$t.safeStringify=$t.stringify=$t.strConcat=$t.addCodeArg=$t.str=$t._=$t.nil=$t._Code=$t.Name=$t.IDENTIFIER=$t._CodeOrName=void 0;var Iu=class{};$t._CodeOrName=Iu;$t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var La=class extends Iu{constructor(n){if(super(),!$t.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$t.Name=La;var Vr=class extends Iu{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((e,t)=>(t instanceof La&&(e[t.str]=(e[t.str]||0)+1),e),{})}};$t._Code=Vr;$t.nil=new Vr("");function $T(o,...n){let e=[o[0]],t=0;for(;t{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.ValueScope=Pi.ValueScopeName=Pi.Scope=Pi.varKinds=Pi.UsedValueState=void 0;var Wi=Mu(),Ev=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},xv;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(xv=Pi.UsedValueState||(Pi.UsedValueState={}));Pi.varKinds={const:new Wi.Name("const"),let:new Wi.Name("let"),var:new Wi.Name("var")};var Sh=class{constructor({prefixes:n,parent:e}={}){this._names={},this._prefixes=n,this._parent=e}toName(n){return n instanceof Wi.Name?n:this.name(n)}name(n){return new Wi.Name(this._newName(n))}_newName(n){let e=this._names[n]||this._nameGroup(n);return`${n}${e.index++}`}_nameGroup(n){var e,t;if(!((t=(e=this._parent)===null||e===void 0?void 0:e._prefixes)===null||t===void 0)&&t.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Pi.Scope=Sh;var wh=class extends Wi.Name{constructor(n,e){super(e),this.prefix=n}setValue(n,{property:e,itemIndex:t}){this.value=n,this.scopePath=(0,Wi._)`.${new Wi.Name(e)}[${t}]`}};Pi.ValueScopeName=wh;var oB=(0,Wi._)`\n`,zv=class extends Sh{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=ot(V({},n),{_n:n.lines?oB:Wi.nil})}get(){return this._scope}name(n){return new wh(n,this._newName(n))}value(n,e){var t;if(e.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(n),{prefix:r}=i,s=(t=e.key)!==null&&t!==void 0?t:e.ref,a=this._values[r];if(a){let u=a.get(s);if(u)return u}else a=this._values[r]=new Map;a.set(s,i);let l=this._scope[r]||(this._scope[r]=[]),c=l.length;return l[c]=e.ref,i.setValue(e,{property:r,itemIndex:c}),i}getValue(n,e){let t=this._values[n];if(t)return t.get(e)}scopeRefs(n,e=this._values){return this._reduceValues(e,t=>{if(t.scopePath===void 0)throw new Error(`CodeGen: name "${t}" has no value`);return(0,Wi._)`${n}${t.scopePath}`})}scopeCode(n=this._values,e,t){return this._reduceValues(n,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},e,t)}_reduceValues(n,e,t={},i){let r=Wi.nil;for(let s in n){let a=n[s];if(!a)continue;let l=t[s]=t[s]||new Map;a.forEach(c=>{if(l.has(c))return;l.set(c,xv.Started);let u=e(c);if(u){let d=this.opts.es5?Pi.varKinds.var:Pi.varKinds.const;r=(0,Wi._)`${r}${d} ${c} = ${u};${this.opts._n}`}else if(u=i?.(c))r=(0,Wi._)`${r}${u}${this.opts._n}`;else throw new Ev(c);l.set(c,xv.Completed)})}return r}};Pi.ValueScope=zv});var wt=ke(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.or=Tt.and=Tt.not=Tt.CodeGen=Tt.operators=Tt.varKinds=Tt.ValueScopeName=Tt.ValueScope=Tt.Scope=Tt.Name=Tt.regexpCode=Tt.stringify=Tt.getProperty=Tt.nil=Tt.strConcat=Tt.str=Tt._=void 0;var At=Mu(),uo=Ov(),js=Mu();Object.defineProperty(Tt,"_",{enumerable:!0,get:function(){return js._}});Object.defineProperty(Tt,"str",{enumerable:!0,get:function(){return js.str}});Object.defineProperty(Tt,"strConcat",{enumerable:!0,get:function(){return js.strConcat}});Object.defineProperty(Tt,"nil",{enumerable:!0,get:function(){return js.nil}});Object.defineProperty(Tt,"getProperty",{enumerable:!0,get:function(){return js.getProperty}});Object.defineProperty(Tt,"stringify",{enumerable:!0,get:function(){return js.stringify}});Object.defineProperty(Tt,"regexpCode",{enumerable:!0,get:function(){return js.regexpCode}});Object.defineProperty(Tt,"Name",{enumerable:!0,get:function(){return js.Name}});var zh=Ov();Object.defineProperty(Tt,"Scope",{enumerable:!0,get:function(){return zh.Scope}});Object.defineProperty(Tt,"ValueScope",{enumerable:!0,get:function(){return zh.ValueScope}});Object.defineProperty(Tt,"ValueScopeName",{enumerable:!0,get:function(){return zh.ValueScopeName}});Object.defineProperty(Tt,"varKinds",{enumerable:!0,get:function(){return zh.varKinds}});Tt.operators={GT:new At._Code(">"),GTE:new At._Code(">="),LT:new At._Code("<"),LTE:new At._Code("<="),EQ:new At._Code("==="),NEQ:new At._Code("!=="),NOT:new At._Code("!"),OR:new At._Code("||"),AND:new At._Code("&&"),ADD:new At._Code("+")};var hs=class{optimizeNodes(){return this}optimizeNames(n,e){return this}},Dv=class extends hs{constructor(n,e,t){super(),this.varKind=n,this.name=e,this.rhs=t}render({es5:n,_n:e}){let t=n?uo.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${t} ${this.name}${i};`+e}optimizeNames(n,e){if(n[this.name.str])return this.rhs&&(this.rhs=cc(this.rhs,n,e)),this}get names(){return this.rhs instanceof At._CodeOrName?this.rhs.names:{}}},Th=class extends hs{constructor(n,e,t){super(),this.lhs=n,this.rhs=e,this.sideEffects=t}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,e){if(!(this.lhs instanceof At.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=cc(this.rhs,n,e),this}get names(){let n=this.lhs instanceof At.Name?{}:V({},this.lhs.names);return xh(n,this.rhs)}},Rv=class extends Th{constructor(n,e,t,i){super(n,t,i),this.op=e}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},Iv=class extends hs{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Pv=class extends hs{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Mv=class extends hs{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Fv=class extends hs{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,e){return this.code=cc(this.code,n,e),this}get names(){return this.code instanceof At._CodeOrName?this.code.names:{}}},Fu=class extends hs{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((e,t)=>e+t.render(n),"")}optimizeNodes(){let{nodes:n}=this,e=n.length;for(;e--;){let t=n[e].optimizeNodes();Array.isArray(t)?n.splice(e,1,...t):t?n[e]=t:n.splice(e,1)}return n.length>0?this:void 0}optimizeNames(n,e){let{nodes:t}=this,i=t.length;for(;i--;){let r=t[i];r.optimizeNames(n,e)||(sB(n,r.names),t.splice(i,1))}return t.length>0?this:void 0}get names(){return this.nodes.reduce((n,e)=>ka(n,e.names),{})}},fs=class extends Fu{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},Av=class extends Fu{},Nv=(()=>{class o extends fs{}return o.kind="else",o})(),bh=(()=>{class o extends fs{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let i=t.optimizeNodes();t=this.else=Array.isArray(i)?new Nv(i):i}if(t)return e===!1?t instanceof o?t:t.nodes:this.nodes.length?this:new o(YT(e),t instanceof o?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=cc(this.condition,e,t),this}get names(){let e=super.names;return xh(e,this.condition),this.else&&ka(e,this.else.names),e}}return o.kind="if",o})(),Oh=(()=>{class o extends fs{}return o.kind="for",o})(),Lv=class extends Oh{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,e){if(super.optimizeNames(n,e))return this.iteration=cc(this.iteration,n,e),this}get names(){return ka(super.names,this.iteration.names)}},kv=class extends Oh{constructor(n,e,t,i){super(),this.varKind=n,this.name=e,this.from=t,this.to=i}render(n){let e=n.es5?uo.varKinds.var:this.varKind,{name:t,from:i,to:r}=this;return`for(${e} ${t}=${i}; ${t}<${r}; ${t}++)`+super.render(n)}get names(){let n=xh(super.names,this.from);return xh(n,this.to)}},Eh=class extends Oh{constructor(n,e,t,i){super(),this.loop=n,this.varKind=e,this.name=t,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,e){if(super.optimizeNames(n,e))return this.iterable=cc(this.iterable,n,e),this}get names(){return ka(super.names,this.iterable.names)}},WT=(()=>{class o extends fs{constructor(e,t,i){super(),this.name=e,this.args=t,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}return o.kind="func",o})(),UT=(()=>{class o extends Fu{render(e){return"return "+super.render(e)}}return o.kind="return",o})(),Vv=class extends fs{render(n){let e="try"+super.render(n);return this.catch&&(e+=this.catch.render(n)),this.finally&&(e+=this.finally.render(n)),e}optimizeNodes(){var n,e;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(e=this.finally)===null||e===void 0||e.optimizeNodes(),this}optimizeNames(n,e){var t,i;return super.optimizeNames(n,e),(t=this.catch)===null||t===void 0||t.optimizeNames(n,e),(i=this.finally)===null||i===void 0||i.optimizeNames(n,e),this}get names(){let n=super.names;return this.catch&&ka(n,this.catch.names),this.finally&&ka(n,this.finally.names),n}},KT=(()=>{class o extends fs{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}return o.kind="catch",o})(),qT=(()=>{class o extends fs{render(e){return"finally"+super.render(e)}}return o.kind="finally",o})(),Gv=class{constructor(n,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts=ot(V({},e),{_n:e.lines?` +import{$ as Ot,$a as Dl,$b as gi,$c as gn,$d as ow,$e as Ln,A as We,Aa as $n,Ab as xe,Ac as kS,Af as cu,B as Fn,Ba as bS,Bb as ce,Bc as Io,Bd as nm,Bf as lm,C as zo,Ca as TS,Cb as ue,Cd as XS,Cf as Hl,Db as te,Dd as im,Df as vw,E as gS,Eb as Y,Ed as mp,Ef as Op,F as Ke,Fa as Dt,Fb as ye,Fd as vi,Fe,Ff as cm,G as nu,Ga as Do,Gb as Ne,Gc as dp,Ge,Ha as de,Hd as st,He as yi,I as _t,Ia as ES,Ib as Ve,Ic as VS,Id as De,Ie as hr,J as Qe,Ja as He,Jb as K,Jc as mi,Jd as Fl,Je as lw,Jf as Bl,Ka as f,Kb as ii,Kc as Po,Kd as ZS,Ke as eo,Kf as yw,La as w,Lb as yt,Ld as ur,Le as Hi,Lf as Cw,M as zs,Ma as fe,Mb as ri,Md as Al,Me as Ue,Mf as um,N as lp,Na as rs,Nb as iu,Nd as JS,Ne as Ye,Nf as $l,O as mS,Oa as O,Ob as Xn,Od as Nl,Oe as sm,P as Sa,Pa as $e,Pb as Vi,Pd as Ll,Pe as to,Q as Zr,Qa as Xe,Qb as up,Qc as Il,Qd as vp,R as Tl,Ra as fi,Rb as DS,Rc as ou,Rd as yp,Re as lu,S as Os,Sa as Tn,Sb as _e,Sc as Jr,Sd as ew,T as Bt,Ta as _,Tc as Pl,Td as tw,Ua as ze,Uc as GS,Ud as Oi,V as El,Va as h,Vb as RS,Vc as HS,Vd as nw,W as xl,Wa as Re,Wb as IS,Wc as In,Wd as Cp,Xa as k,Xb as PS,Xc as li,Xd as iw,Xe as Sp,Ya as Ol,Yb as it,Yc as pp,Yd as rw,Ye as am,Z as vS,Za as cr,Zb as fn,Zd as kl,Ze as cw,_ as yS,_a as Ae,_b as qg,_c as su,_d as au,_e as Vl,a as V,aa as on,ab as xS,ac as MS,ad as hp,ae as sw,b as ot,ba as F,bb as ie,bc as St,bd as BS,be as aw,bf as Di,ca as CS,cb as yn,cc as lt,cd as Me,ce as ln,cf as wp,d as op,da as _S,dc as we,dd as $S,de as _p,df as bp,ea as zl,eb as Cn,ec as jn,ed as jS,ee as ss,ef as no,f as ke,fa as cp,fb as _n,fc as Wn,fd as WS,fe as dr,ga as pn,gb as C,gc as Gi,gd as fp,ge as oi,h as cS,ha as qe,hb as S,hc as Zt,hd as US,he as Fr,hf as Gl,ia as ge,ib as R,ic as Be,id as KS,ie as Ar,if as ft,j as xo,ja as hn,jb as H,jc as ru,jd as gp,je as mn,ka as nt,kb as B,kd as qS,ke as pt,l as lr,la as ae,lb as Xt,lc as Rl,ld as Qg,le as pr,lf as Tp,m as sp,ma as le,mb as Q,mc as FS,md as YS,me as Sn,mf as Ep,na as j,nb as Ug,nc as Zn,nd as QS,ne as rm,nf as uw,o as J,oa as me,ob as Ta,oc as AS,od as ht,oe as om,p as ct,pa as Se,pb as zS,pc as Yg,pd as Ml,pf as Rs,q as tn,qa as SS,qb as A,qd as Xg,qf as xp,r as ap,ra as oe,rb as OS,rd as Zg,rf as dw,s as uS,sa as I,sb as m,sd as Jg,sf as zp,t as xs,ta as P,tb as Pe,td as os,tf as pw,u as N,ua as Oo,ub as Ie,uc as NS,ud as em,uf as hw,v as dS,vb as Vt,vd as Ea,vf as fw,w as Mn,wa as Ut,wd as Ds,wf as gw,x as pS,xa as wS,xb as Kg,xd as W,xf as mw,y as hS,ya as wa,yb as En,yc as Ro,yd as ci,z as fS,za as ba,zb as Ft,zc as LS,zd as tm}from"./chunk-VDRVUQCF.js";var Mu=ke($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.regexpCode=$t.getEsmExportName=$t.getProperty=$t.safeStringify=$t.stringify=$t.strConcat=$t.addCodeArg=$t.str=$t._=$t.nil=$t._Code=$t.Name=$t.IDENTIFIER=$t._CodeOrName=void 0;var Iu=class{};$t._CodeOrName=Iu;$t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var La=class extends Iu{constructor(n){if(super(),!$t.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};$t.Name=La;var Vr=class extends Iu{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((e,t)=>(t instanceof La&&(e[t.str]=(e[t.str]||0)+1),e),{})}};$t._Code=Vr;$t.nil=new Vr("");function $T(o,...n){let e=[o[0]],t=0;for(;t{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.ValueScope=Pi.ValueScopeName=Pi.Scope=Pi.varKinds=Pi.UsedValueState=void 0;var Wi=Mu(),Ev=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},xv;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(xv=Pi.UsedValueState||(Pi.UsedValueState={}));Pi.varKinds={const:new Wi.Name("const"),let:new Wi.Name("let"),var:new Wi.Name("var")};var Sh=class{constructor({prefixes:n,parent:e}={}){this._names={},this._prefixes=n,this._parent=e}toName(n){return n instanceof Wi.Name?n:this.name(n)}name(n){return new Wi.Name(this._newName(n))}_newName(n){let e=this._names[n]||this._nameGroup(n);return`${n}${e.index++}`}_nameGroup(n){var e,t;if(!((t=(e=this._parent)===null||e===void 0?void 0:e._prefixes)===null||t===void 0)&&t.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Pi.Scope=Sh;var wh=class extends Wi.Name{constructor(n,e){super(e),this.prefix=n}setValue(n,{property:e,itemIndex:t}){this.value=n,this.scopePath=(0,Wi._)`.${new Wi.Name(e)}[${t}]`}};Pi.ValueScopeName=wh;var oB=(0,Wi._)`\n`,zv=class extends Sh{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=ot(V({},n),{_n:n.lines?oB:Wi.nil})}get(){return this._scope}name(n){return new wh(n,this._newName(n))}value(n,e){var t;if(e.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(n),{prefix:r}=i,s=(t=e.key)!==null&&t!==void 0?t:e.ref,a=this._values[r];if(a){let u=a.get(s);if(u)return u}else a=this._values[r]=new Map;a.set(s,i);let l=this._scope[r]||(this._scope[r]=[]),c=l.length;return l[c]=e.ref,i.setValue(e,{property:r,itemIndex:c}),i}getValue(n,e){let t=this._values[n];if(t)return t.get(e)}scopeRefs(n,e=this._values){return this._reduceValues(e,t=>{if(t.scopePath===void 0)throw new Error(`CodeGen: name "${t}" has no value`);return(0,Wi._)`${n}${t.scopePath}`})}scopeCode(n=this._values,e,t){return this._reduceValues(n,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},e,t)}_reduceValues(n,e,t={},i){let r=Wi.nil;for(let s in n){let a=n[s];if(!a)continue;let l=t[s]=t[s]||new Map;a.forEach(c=>{if(l.has(c))return;l.set(c,xv.Started);let u=e(c);if(u){let d=this.opts.es5?Pi.varKinds.var:Pi.varKinds.const;r=(0,Wi._)`${r}${d} ${c} = ${u};${this.opts._n}`}else if(u=i?.(c))r=(0,Wi._)`${r}${u}${this.opts._n}`;else throw new Ev(c);l.set(c,xv.Completed)})}return r}};Pi.ValueScope=zv});var wt=ke(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.or=Tt.and=Tt.not=Tt.CodeGen=Tt.operators=Tt.varKinds=Tt.ValueScopeName=Tt.ValueScope=Tt.Scope=Tt.Name=Tt.regexpCode=Tt.stringify=Tt.getProperty=Tt.nil=Tt.strConcat=Tt.str=Tt._=void 0;var At=Mu(),uo=Ov(),js=Mu();Object.defineProperty(Tt,"_",{enumerable:!0,get:function(){return js._}});Object.defineProperty(Tt,"str",{enumerable:!0,get:function(){return js.str}});Object.defineProperty(Tt,"strConcat",{enumerable:!0,get:function(){return js.strConcat}});Object.defineProperty(Tt,"nil",{enumerable:!0,get:function(){return js.nil}});Object.defineProperty(Tt,"getProperty",{enumerable:!0,get:function(){return js.getProperty}});Object.defineProperty(Tt,"stringify",{enumerable:!0,get:function(){return js.stringify}});Object.defineProperty(Tt,"regexpCode",{enumerable:!0,get:function(){return js.regexpCode}});Object.defineProperty(Tt,"Name",{enumerable:!0,get:function(){return js.Name}});var zh=Ov();Object.defineProperty(Tt,"Scope",{enumerable:!0,get:function(){return zh.Scope}});Object.defineProperty(Tt,"ValueScope",{enumerable:!0,get:function(){return zh.ValueScope}});Object.defineProperty(Tt,"ValueScopeName",{enumerable:!0,get:function(){return zh.ValueScopeName}});Object.defineProperty(Tt,"varKinds",{enumerable:!0,get:function(){return zh.varKinds}});Tt.operators={GT:new At._Code(">"),GTE:new At._Code(">="),LT:new At._Code("<"),LTE:new At._Code("<="),EQ:new At._Code("==="),NEQ:new At._Code("!=="),NOT:new At._Code("!"),OR:new At._Code("||"),AND:new At._Code("&&"),ADD:new At._Code("+")};var hs=class{optimizeNodes(){return this}optimizeNames(n,e){return this}},Dv=class extends hs{constructor(n,e,t){super(),this.varKind=n,this.name=e,this.rhs=t}render({es5:n,_n:e}){let t=n?uo.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${t} ${this.name}${i};`+e}optimizeNames(n,e){if(n[this.name.str])return this.rhs&&(this.rhs=cc(this.rhs,n,e)),this}get names(){return this.rhs instanceof At._CodeOrName?this.rhs.names:{}}},Th=class extends hs{constructor(n,e,t){super(),this.lhs=n,this.rhs=e,this.sideEffects=t}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,e){if(!(this.lhs instanceof At.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=cc(this.rhs,n,e),this}get names(){let n=this.lhs instanceof At.Name?{}:V({},this.lhs.names);return xh(n,this.rhs)}},Rv=class extends Th{constructor(n,e,t,i){super(n,t,i),this.op=e}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},Iv=class extends hs{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Pv=class extends hs{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Mv=class extends hs{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Fv=class extends hs{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,e){return this.code=cc(this.code,n,e),this}get names(){return this.code instanceof At._CodeOrName?this.code.names:{}}},Fu=class extends hs{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((e,t)=>e+t.render(n),"")}optimizeNodes(){let{nodes:n}=this,e=n.length;for(;e--;){let t=n[e].optimizeNodes();Array.isArray(t)?n.splice(e,1,...t):t?n[e]=t:n.splice(e,1)}return n.length>0?this:void 0}optimizeNames(n,e){let{nodes:t}=this,i=t.length;for(;i--;){let r=t[i];r.optimizeNames(n,e)||(sB(n,r.names),t.splice(i,1))}return t.length>0?this:void 0}get names(){return this.nodes.reduce((n,e)=>ka(n,e.names),{})}},fs=class extends Fu{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},Av=class extends Fu{},Nv=(()=>{class o extends fs{}return o.kind="else",o})(),bh=(()=>{class o extends fs{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let i=t.optimizeNodes();t=this.else=Array.isArray(i)?new Nv(i):i}if(t)return e===!1?t instanceof o?t:t.nodes:this.nodes.length?this:new o(YT(e),t instanceof o?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=cc(this.condition,e,t),this}get names(){let e=super.names;return xh(e,this.condition),this.else&&ka(e,this.else.names),e}}return o.kind="if",o})(),Oh=(()=>{class o extends fs{}return o.kind="for",o})(),Lv=class extends Oh{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,e){if(super.optimizeNames(n,e))return this.iteration=cc(this.iteration,n,e),this}get names(){return ka(super.names,this.iteration.names)}},kv=class extends Oh{constructor(n,e,t,i){super(),this.varKind=n,this.name=e,this.from=t,this.to=i}render(n){let e=n.es5?uo.varKinds.var:this.varKind,{name:t,from:i,to:r}=this;return`for(${e} ${t}=${i}; ${t}<${r}; ${t}++)`+super.render(n)}get names(){let n=xh(super.names,this.from);return xh(n,this.to)}},Eh=class extends Oh{constructor(n,e,t,i){super(),this.loop=n,this.varKind=e,this.name=t,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,e){if(super.optimizeNames(n,e))return this.iterable=cc(this.iterable,n,e),this}get names(){return ka(super.names,this.iterable.names)}},WT=(()=>{class o extends fs{constructor(e,t,i){super(),this.name=e,this.args=t,this.async=i}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}return o.kind="func",o})(),UT=(()=>{class o extends Fu{render(e){return"return "+super.render(e)}}return o.kind="return",o})(),Vv=class extends fs{render(n){let e="try"+super.render(n);return this.catch&&(e+=this.catch.render(n)),this.finally&&(e+=this.finally.render(n)),e}optimizeNodes(){var n,e;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(e=this.finally)===null||e===void 0||e.optimizeNodes(),this}optimizeNames(n,e){var t,i;return super.optimizeNames(n,e),(t=this.catch)===null||t===void 0||t.optimizeNames(n,e),(i=this.finally)===null||i===void 0||i.optimizeNames(n,e),this}get names(){let n=super.names;return this.catch&&ka(n,this.catch.names),this.finally&&ka(n,this.finally.names),n}},KT=(()=>{class o extends fs{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}return o.kind="catch",o})(),qT=(()=>{class o extends fs{render(e){return"finally"+super.render(e)}}return o.kind="finally",o})(),Gv=class{constructor(n,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts=ot(V({},e),{_n:e.lines?` `:""}),this._extScope=n,this._scope=new uo.Scope({parent:n}),this._nodes=[new Av]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,e){let t=this._extScope.value(n,e);return(this._values[t.prefix]||(this._values[t.prefix]=new Set)).add(t),t}getScopeValue(n,e){return this._extScope.getValue(n,e)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,e,t,i){let r=this._scope.toName(e);return t!==void 0&&i&&(this._constants[r.str]=t),this._leafNode(new Dv(n,r,t)),r}const(n,e,t){return this._def(uo.varKinds.const,n,e,t)}let(n,e,t){return this._def(uo.varKinds.let,n,e,t)}var(n,e,t){return this._def(uo.varKinds.var,n,e,t)}assign(n,e,t){return this._leafNode(new Th(n,e,t))}add(n,e){return this._leafNode(new Rv(n,Tt.operators.ADD,e))}code(n){return typeof n=="function"?n():n!==At.nil&&this._leafNode(new Fv(n)),this}object(...n){let e=["{"];for(let[t,i]of n)e.length>1&&e.push(","),e.push(t),(t!==i||this.opts.es5)&&(e.push(":"),(0,At.addCodeArg)(e,i));return e.push("}"),new At._Code(e)}if(n,e,t){if(this._blockNode(new bh(n)),e&&t)this.code(e).else().code(t).endIf();else if(e)this.code(e).endIf();else if(t)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new bh(n))}else(){return this._elseNode(new Nv)}endIf(){return this._endBlockNode(bh,Nv)}_for(n,e){return this._blockNode(n),e&&this.code(e).endFor(),this}for(n,e){return this._for(new Lv(n),e)}forRange(n,e,t,i,r=this.opts.es5?uo.varKinds.var:uo.varKinds.let){let s=this._scope.toName(n);return this._for(new kv(r,s,e,t),()=>i(s))}forOf(n,e,t,i=uo.varKinds.const){let r=this._scope.toName(n);if(this.opts.es5){let s=e instanceof At.Name?e:this.var("_arr",e);return this.forRange("_i",0,(0,At._)`${s}.length`,a=>{this.var(r,(0,At._)`${s}[${a}]`),t(r)})}return this._for(new Eh("of",i,r,e),()=>t(r))}forIn(n,e,t,i=this.opts.es5?uo.varKinds.var:uo.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,At._)`Object.keys(${e})`,t);let r=this._scope.toName(n);return this._for(new Eh("in",i,r,e),()=>t(r))}endFor(){return this._endBlockNode(Oh)}label(n){return this._leafNode(new Iv(n))}break(n){return this._leafNode(new Pv(n))}return(n){let e=new UT;if(this._blockNode(e),this.code(n),e.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(UT)}try(n,e,t){if(!e&&!t)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Vv;if(this._blockNode(i),this.code(n),e){let r=this.name("e");this._currNode=i.catch=new KT(r),e(r)}return t&&(this._currNode=i.finally=new qT,this.code(t)),this._endBlockNode(KT,qT)}throw(n){return this._leafNode(new Mv(n))}block(n,e){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(e),this}endBlock(n){let e=this._blockStarts.pop();if(e===void 0)throw new Error("CodeGen: not in self-balancing block");let t=this._nodes.length-e;if(t<0||n!==void 0&&t!==n)throw new Error(`CodeGen: wrong number of nodes: ${t} vs ${n} expected`);return this._nodes.length=e,this}func(n,e=At.nil,t,i){return this._blockNode(new WT(n,e,t)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(WT)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,e){let t=this._currNode;if(t instanceof n||e&&t instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${n.kind}/${e.kind}`:n.kind}"`)}_elseNode(n){let e=this._currNode;if(!(e instanceof bh))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=n,this}get _root(){return this._nodes[0]}get _currNode(){let n=this._nodes;return n[n.length-1]}set _currNode(n){let e=this._nodes;e[e.length-1]=n}};Tt.CodeGen=Gv;function ka(o,n){for(let e in n)o[e]=(o[e]||0)+(n[e]||0);return o}function xh(o,n){return n instanceof At._CodeOrName?ka(o,n.names):o}function cc(o,n,e){if(o instanceof At.Name)return t(o);if(!i(o))return o;return new At._Code(o._items.reduce((r,s)=>(s instanceof At.Name&&(s=t(s)),s instanceof At._Code?r.push(...s._items):r.push(s),r),[]));function t(r){let s=e[r.str];return s===void 0||n[r.str]!==1?r:(delete n[r.str],s)}function i(r){return r instanceof At._Code&&r._items.some(s=>s instanceof At.Name&&n[s.str]===1&&e[s.str]!==void 0)}}function sB(o,n){for(let e in n)o[e]=(o[e]||0)-(n[e]||0)}function YT(o){return typeof o=="boolean"||typeof o=="number"||o===null?!o:(0,At._)`!${Hv(o)}`}Tt.not=YT;var aB=QT(Tt.operators.AND);function lB(...o){return o.reduce(aB)}Tt.and=lB;var cB=QT(Tt.operators.OR);function uB(...o){return o.reduce(cB)}Tt.or=uB;function QT(o){return(n,e)=>n===At.nil?e:e===At.nil?n:(0,At._)`${Hv(n)} ${o} ${Hv(e)}`}function Hv(o){return o instanceof At.Name?o:(0,At._)`(${o})`}});var jt=ke(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.checkStrictMode=Et.getErrorPath=Et.Type=Et.useFunc=Et.setEvaluated=Et.evaluatedPropsToName=Et.mergeEvaluated=Et.eachItem=Et.unescapeJsonPointer=Et.escapeJsonPointer=Et.escapeFragment=Et.unescapeFragment=Et.schemaRefOrVal=Et.schemaHasRulesButRef=Et.schemaHasRules=Et.checkUnknownRules=Et.alwaysValidSchema=Et.toHash=void 0;var un=wt(),dB=Mu();function pB(o){let n={};for(let e of o)n[e]=!0;return n}Et.toHash=pB;function hB(o,n){return typeof n=="boolean"?n:Object.keys(n).length===0?!0:(JT(o,n),!eE(n,o.self.RULES.all))}Et.alwaysValidSchema=hB;function JT(o,n=o.schema){let{opts:e,self:t}=o;if(!e.strictSchema||typeof n=="boolean")return;let i=t.RULES.keywords;for(let r in n)i[r]||rE(o,`unknown keyword: "${r}"`)}Et.checkUnknownRules=JT;function eE(o,n){if(typeof o=="boolean")return!o;for(let e in o)if(n[e])return!0;return!1}Et.schemaHasRules=eE;function fB(o,n){if(typeof o=="boolean")return!o;for(let e in o)if(e!=="$ref"&&n.all[e])return!0;return!1}Et.schemaHasRulesButRef=fB;function gB({topSchemaRef:o,schemaPath:n},e,t,i){if(!i){if(typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return(0,un._)`${e}`}return(0,un._)`${o}${n}${(0,un.getProperty)(t)}`}Et.schemaRefOrVal=gB;function mB(o){return tE(decodeURIComponent(o))}Et.unescapeFragment=mB;function vB(o){return encodeURIComponent(Bv(o))}Et.escapeFragment=vB;function Bv(o){return typeof o=="number"?`${o}`:o.replace(/~/g,"~0").replace(/\//g,"~1")}Et.escapeJsonPointer=Bv;function tE(o){return o.replace(/~1/g,"/").replace(/~0/g,"~")}Et.unescapeJsonPointer=tE;function yB(o,n){if(Array.isArray(o))for(let e of o)n(e);else n(o)}Et.eachItem=yB;function XT({mergeNames:o,mergeToName:n,mergeValues:e,resultToName:t}){return(i,r,s,a)=>{let l=s===void 0?r:s instanceof un.Name?(r instanceof un.Name?o(i,r,s):n(i,r,s),s):r instanceof un.Name?(n(i,s,r),r):e(r,s);return a===un.Name&&!(l instanceof un.Name)?t(i,l):l}}Et.mergeEvaluated={props:XT({mergeNames:(o,n,e)=>o.if((0,un._)`${e} !== true && ${n} !== undefined`,()=>{o.if((0,un._)`${n} === true`,()=>o.assign(e,!0),()=>o.assign(e,(0,un._)`${e} || {}`).code((0,un._)`Object.assign(${e}, ${n})`))}),mergeToName:(o,n,e)=>o.if((0,un._)`${e} !== true`,()=>{n===!0?o.assign(e,!0):(o.assign(e,(0,un._)`${e} || {}`),$v(o,e,n))}),mergeValues:(o,n)=>o===!0?!0:V(V({},o),n),resultToName:nE}),items:XT({mergeNames:(o,n,e)=>o.if((0,un._)`${e} !== true && ${n} !== undefined`,()=>o.assign(e,(0,un._)`${n} === true ? true : ${e} > ${n} ? ${e} : ${n}`)),mergeToName:(o,n,e)=>o.if((0,un._)`${e} !== true`,()=>o.assign(e,n===!0?!0:(0,un._)`${e} > ${n} ? ${e} : ${n}`)),mergeValues:(o,n)=>o===!0?!0:Math.max(o,n),resultToName:(o,n)=>o.var("items",n)})};function nE(o,n){if(n===!0)return o.var("props",!0);let e=o.var("props",(0,un._)`{}`);return n!==void 0&&$v(o,e,n),e}Et.evaluatedPropsToName=nE;function $v(o,n,e){Object.keys(e).forEach(t=>o.assign((0,un._)`${n}${(0,un.getProperty)(t)}`,!0))}Et.setEvaluated=$v;var ZT={};function CB(o,n){return o.scopeValue("func",{ref:n,code:ZT[n.code]||(ZT[n.code]=new dB._Code(n.code))})}Et.useFunc=CB;var iE;(function(o){o[o.Num=0]="Num",o[o.Str=1]="Str"})(iE=Et.Type||(Et.Type={}));function _B(o,n,e){if(o instanceof un.Name){let t=n===iE.Num;return e?t?(0,un._)`"[" + ${o} + "]"`:(0,un._)`"['" + ${o} + "']"`:t?(0,un._)`"/" + ${o}`:(0,un._)`"/" + ${o}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return e?(0,un.getProperty)(o).toString():"/"+Bv(o)}Et.getErrorPath=_B;function rE(o,n,e=o.opts.strictSchema){if(e){if(n=`strict mode: ${n}`,e===!0)throw new Error(n);o.self.logger.warn(n)}}Et.checkStrictMode=rE});var gs=ke(jv=>{"use strict";Object.defineProperty(jv,"__esModule",{value:!0});var wi=wt(),SB={data:new wi.Name("data"),valCxt:new wi.Name("valCxt"),instancePath:new wi.Name("instancePath"),parentData:new wi.Name("parentData"),parentDataProperty:new wi.Name("parentDataProperty"),rootData:new wi.Name("rootData"),dynamicAnchors:new wi.Name("dynamicAnchors"),vErrors:new wi.Name("vErrors"),errors:new wi.Name("errors"),this:new wi.Name("this"),self:new wi.Name("self"),scope:new wi.Name("scope"),json:new wi.Name("json"),jsonPos:new wi.Name("jsonPos"),jsonLen:new wi.Name("jsonLen"),jsonPart:new wi.Name("jsonPart")};jv.default=SB});var Au=ke(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.extendErrors=bi.resetErrorsCount=bi.reportExtraError=bi.reportError=bi.keyword$DataError=bi.keywordError=void 0;var Gt=wt(),Dh=jt(),Mi=gs();bi.keywordError={message:({keyword:o})=>(0,Gt.str)`must pass "${o}" keyword validation`};bi.keyword$DataError={message:({keyword:o,schemaType:n})=>n?(0,Gt.str)`"${o}" keyword must be ${n} ($data)`:(0,Gt.str)`"${o}" keyword is invalid ($data)`};function wB(o,n=bi.keywordError,e,t){let{it:i}=o,{gen:r,compositeRule:s,allErrors:a}=i,l=aE(o,n,e);t??(s||a)?oE(r,l):sE(i,(0,Gt._)`[${l}]`)}bi.reportError=wB;function bB(o,n=bi.keywordError,e){let{it:t}=o,{gen:i,compositeRule:r,allErrors:s}=t,a=aE(o,n,e);oE(i,a),r||s||sE(t,Mi.default.vErrors)}bi.reportExtraError=bB;function TB(o,n){o.assign(Mi.default.errors,n),o.if((0,Gt._)`${Mi.default.vErrors} !== null`,()=>o.if(n,()=>o.assign((0,Gt._)`${Mi.default.vErrors}.length`,n),()=>o.assign(Mi.default.vErrors,null)))}bi.resetErrorsCount=TB;function EB({gen:o,keyword:n,schemaValue:e,data:t,errsCount:i,it:r}){if(i===void 0)throw new Error("ajv implementation error");let s=o.name("err");o.forRange("i",i,Mi.default.errors,a=>{o.const(s,(0,Gt._)`${Mi.default.vErrors}[${a}]`),o.if((0,Gt._)`${s}.instancePath === undefined`,()=>o.assign((0,Gt._)`${s}.instancePath`,(0,Gt.strConcat)(Mi.default.instancePath,r.errorPath))),o.assign((0,Gt._)`${s}.schemaPath`,(0,Gt.str)`${r.errSchemaPath}/${n}`),r.opts.verbose&&(o.assign((0,Gt._)`${s}.schema`,e),o.assign((0,Gt._)`${s}.data`,t))})}bi.extendErrors=EB;function oE(o,n){let e=o.const("err",n);o.if((0,Gt._)`${Mi.default.vErrors} === null`,()=>o.assign(Mi.default.vErrors,(0,Gt._)`[${e}]`),(0,Gt._)`${Mi.default.vErrors}.push(${e})`),o.code((0,Gt._)`${Mi.default.errors}++`)}function sE(o,n){let{gen:e,validateName:t,schemaEnv:i}=o;i.$async?e.throw((0,Gt._)`new ${o.ValidationError}(${n})`):(e.assign((0,Gt._)`${t}.errors`,n),e.return(!1))}var Va={keyword:new Gt.Name("keyword"),schemaPath:new Gt.Name("schemaPath"),params:new Gt.Name("params"),propertyName:new Gt.Name("propertyName"),message:new Gt.Name("message"),schema:new Gt.Name("schema"),parentSchema:new Gt.Name("parentSchema")};function aE(o,n,e){let{createErrors:t}=o.it;return t===!1?(0,Gt._)`{}`:xB(o,n,e)}function xB(o,n,e={}){let{gen:t,it:i}=o,r=[zB(i,e),OB(o,e)];return DB(o,n,r),t.object(...r)}function zB({errorPath:o},{instancePath:n}){let e=n?(0,Gt.str)`${o}${(0,Dh.getErrorPath)(n,Dh.Type.Str)}`:o;return[Mi.default.instancePath,(0,Gt.strConcat)(Mi.default.instancePath,e)]}function OB({keyword:o,it:{errSchemaPath:n}},{schemaPath:e,parentSchema:t}){let i=t?n:(0,Gt.str)`${n}/${o}`;return e&&(i=(0,Gt.str)`${i}${(0,Dh.getErrorPath)(e,Dh.Type.Str)}`),[Va.schemaPath,i]}function DB(o,{params:n,message:e},t){let{keyword:i,data:r,schemaValue:s,it:a}=o,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:d}=a;t.push([Va.keyword,i],[Va.params,typeof n=="function"?n(o):n||(0,Gt._)`{}`]),l.messages&&t.push([Va.message,typeof e=="function"?e(o):e]),l.verbose&&t.push([Va.schema,s],[Va.parentSchema,(0,Gt._)`${u}${d}`],[Mi.default.data,r]),c&&t.push([Va.propertyName,c])}});var cE=ke(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.boolOrEmptySchema=uc.topBoolOrEmptySchema=void 0;var RB=Au(),IB=wt(),PB=gs(),MB={message:"boolean schema is false"};function FB(o){let{gen:n,schema:e,validateName:t}=o;e===!1?lE(o,!1):typeof e=="object"&&e.$async===!0?n.return(PB.default.data):(n.assign((0,IB._)`${t}.errors`,null),n.return(!0))}uc.topBoolOrEmptySchema=FB;function AB(o,n){let{gen:e,schema:t}=o;t===!1?(e.var(n,!1),lE(o)):e.var(n,!0)}uc.boolOrEmptySchema=AB;function lE(o,n){let{gen:e,data:t}=o,i={gen:e,keyword:"false schema",data:t,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,RB.reportError)(i,MB,void 0,n)}});var Wv=ke(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.getRules=dc.isJSONType=void 0;var NB=["string","number","integer","boolean","null","object","array"],LB=new Set(NB);function kB(o){return typeof o=="string"&&LB.has(o)}dc.isJSONType=kB;function VB(){let o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:ot(V({},o),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}dc.getRules=VB});var Uv=ke(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.shouldUseRule=Ws.shouldUseGroup=Ws.schemaHasRulesForType=void 0;function GB({schema:o,self:n},e){let t=n.RULES.types[e];return t&&t!==!0&&uE(o,t)}Ws.schemaHasRulesForType=GB;function uE(o,n){return n.rules.some(e=>dE(o,e))}Ws.shouldUseGroup=uE;function dE(o,n){var e;return o[n.keyword]!==void 0||((e=n.definition.implements)===null||e===void 0?void 0:e.some(t=>o[t]!==void 0))}Ws.shouldUseRule=dE});var Lu=ke(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.reportTypeError=ui.checkDataTypes=ui.checkDataType=ui.coerceAndCheckDataType=ui.getJSONTypes=ui.getSchemaTypes=ui.DataType=void 0;var HB=Wv(),BB=Uv(),$B=Au(),Ct=wt(),pE=jt(),Nu;(function(o){o[o.Correct=0]="Correct",o[o.Wrong=1]="Wrong"})(Nu=ui.DataType||(ui.DataType={}));function jB(o){let n=hE(o.type);if(n.includes("null")){if(o.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!n.length&&o.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');o.nullable===!0&&n.push("null")}return n}ui.getSchemaTypes=jB;function hE(o){let n=Array.isArray(o)?o:o?[o]:[];if(n.every(HB.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}ui.getJSONTypes=hE;function WB(o,n){let{gen:e,data:t,opts:i}=o,r=UB(n,i.coerceTypes),s=n.length>0&&!(r.length===0&&n.length===1&&(0,BB.schemaHasRulesForType)(o,n[0]));if(s){let a=qv(n,t,i.strictNumbers,Nu.Wrong);e.if(a,()=>{r.length?KB(o,n,r):Yv(o)})}return s}ui.coerceAndCheckDataType=WB;var fE=new Set(["string","number","integer","boolean","null"]);function UB(o,n){return n?o.filter(e=>fE.has(e)||n==="array"&&e==="array"):[]}function KB(o,n,e){let{gen:t,data:i,opts:r}=o,s=t.let("dataType",(0,Ct._)`typeof ${i}`),a=t.let("coerced",(0,Ct._)`undefined`);r.coerceTypes==="array"&&t.if((0,Ct._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>t.assign(i,(0,Ct._)`${i}[0]`).assign(s,(0,Ct._)`typeof ${i}`).if(qv(n,i,r.strictNumbers),()=>t.assign(a,i))),t.if((0,Ct._)`${a} !== undefined`);for(let c of e)(fE.has(c)||c==="array"&&r.coerceTypes==="array")&&l(c);t.else(),Yv(o),t.endIf(),t.if((0,Ct._)`${a} !== undefined`,()=>{t.assign(i,a),qB(o,a)});function l(c){switch(c){case"string":t.elseIf((0,Ct._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Ct._)`"" + ${i}`).elseIf((0,Ct._)`${i} === null`).assign(a,(0,Ct._)`""`);return;case"number":t.elseIf((0,Ct._)`${s} == "boolean" || ${i} === null || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Ct._)`+${i}`);return;case"integer":t.elseIf((0,Ct._)`${s} === "boolean" || ${i} === null || (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Ct._)`+${i}`);return;case"boolean":t.elseIf((0,Ct._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Ct._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":t.elseIf((0,Ct._)`${i} === "" || ${i} === 0 || ${i} === false`),t.assign(a,null);return;case"array":t.elseIf((0,Ct._)`${s} === "string" || ${s} === "number" diff --git a/dist/himp.platform.angular/browser/chunk-R3OIOWDW.js b/dist/himp.platform.angular/browser/chunk-R3OIOWDW.js new file mode 100644 index 0000000..3840424 --- /dev/null +++ b/dist/himp.platform.angular/browser/chunk-R3OIOWDW.js @@ -0,0 +1,12543 @@ +import{a as CV,b as RV}from"./chunk-2D265ORJ.js";import{A as Nc,Aa as JM,Ba as Tl,C as Uc,Fa as Xc,Ha as qc,Ka as Zc,Oa as jc,Ra as Kc,Ta as Jc,V as Oc,W as MV,Wa as $c,X as bV,_ as Fc,_a as Qc,ab as ef,b as ZM,ba as wV,bb as TV,ca as wl,cb as El,e as Pc,eb as tf,fb as EV,gb as rf,ib as nf,jb as AV,ka as zc,oa as Bc,qa as kc,sa as Vc,ta as Gc,u as Dc,v as Ic,va as Hc,xa as Wc,y as jM,za as KM}from"./chunk-OOUNO2UZ.js";import{$ as aV,Ab as vm,Bb as co,Cb as fo,D as tV,Db as gu,Eb as Pi,Fb as Ec,Gc as gV,Ge as Ac,Ha as uV,I as rV,Ib as mV,Jb as ui,Jc as yV,Ka as Ot,Kc as _V,La as uo,Lb as vV,Le as Cc,Ma as jR,Mb as tL,Me as YM,Ne as qM,Nf as Yc,Pa as cV,Q as iV,Sb as gm,Ta as br,U as nV,Va as Rt,Wa as fV,Xa as KR,Ya as hV,a as E0,ba as ZR,cc as R0,cd as xV,db as JR,dc as bl,e as Dse,eb as $R,f as Ise,fb as QR,g as YR,gb as tr,h as Nse,hb as lr,hf as Rc,i as Use,ia as oV,ib as li,ic as L0,j as WM,jb as Sl,kb as Ml,la as xl,lb as pV,lf as Lc,m as $k,na as si,nc as XM,o as qR,oa as sV,p as Qk,pa as lV,qb as dV,ra as C0,sb as Lr,tb as Ho,tf as SV,u as A0,ub as Li,vf as ym,w as eV,xd as P0,xf as _m,yb as eL,zb as Tc}from"./chunk-VDRVUQCF.js";var $ne={};YR($ne,{AddEquation:()=>Vz,AddOperation:()=>sne,AdditiveBlending:()=>Fz,AlphaFormat:()=>yne,AlwaysDepth:()=>ene,AmbientLight:()=>aC,AnimationClip:()=>No,AnimationMixer:()=>cB,AnimationObjectGroup:()=>wz,AnimationUtils:()=>Jn,ArcCurve:()=>gC,ArrowHelper:()=>$d,Audio:()=>by,AudioAnalyser:()=>uB,AudioContext:()=>sB,AudioListener:()=>Mz,AudioLoader:()=>lB,AxisHelper:()=>vC,BackSide:()=>yh,BasicDepthPacking:()=>Dne,BasicShadowMap:()=>JEe,BinaryTextureLoader:()=>eB,BlendingMode:()=>Vie,Bone:()=>jA,BooleanKeyframeTrack:()=>cC,BoundingBoxHelper:()=>TLe,Box2:()=>PS,Box3:()=>lu,BoxBufferGeometry:()=>Ud,BoxGeometry:()=>oM,BoxHelper:()=>Iy,BufferAttribute:()=>gt,BufferGeometry:()=>Bt,BufferGeometryLoader:()=>rB,ByteType:()=>hne,Cache:()=>xz,Camera:()=>Qn,CameraHelper:()=>mM,CanvasRenderer:()=>DLe,CanvasTexture:()=>$A,CatmullRomCurve3:()=>fB,CineonToneMapping:()=>cne,CircleBufferGeometry:()=>yy,CircleGeometry:()=>aM,ClampToEdgeWrapping:()=>Uo,Clock:()=>Rz,ClosedSplineCurve3:()=>Jne,Color:()=>Gt,ColorKeyframeTrack:()=>fC,CompressedTexture:()=>ny,CompressedTextureLoader:()=>Xne,ConeBufferGeometry:()=>nM,ConeGeometry:()=>iM,CubeCamera:()=>hC,CubeGeometry:()=>oM,CubeReflectionMapping:()=>xC,CubeRefractionMapping:()=>HA,CubeTexture:()=>_h,CubeTextureLoader:()=>tB,CubeUVReflectionMapping:()=>SC,CubeUVRefractionMapping:()=>MC,CubicBezierCurve:()=>jd,CubicBezierCurve3:()=>eLe,CubicInterpolant:()=>oC,CullFaceBack:()=>wS,CullFaceFront:()=>Dz,CullFaceFrontBack:()=>jEe,CullFaceNone:()=>zie,Curve:()=>ea,CurvePath:()=>cM,CurveUtils:()=>_M,CustomBlending:()=>kz,CylinderBufferGeometry:()=>sc,CylinderGeometry:()=>Vd,Cylindrical:()=>Pz,DataTexture:()=>Nd,DataTextureLoader:()=>JRe,DefaultLoadingManager:()=>zo,DepthFormat:()=>Cd,DepthStencilFormat:()=>Jg,DepthTexture:()=>GS,DirectionalLight:()=>nC,DirectionalLightHelper:()=>Dy,DirectionalLightShadow:()=>iC,DiscreteInterpolant:()=>sC,DodecahedronBufferGeometry:()=>uy,DodecahedronGeometry:()=>qS,DoubleSide:()=>Ny,DstAlphaFactor:()=>Zie,DstColorFactor:()=>Kie,DynamicBufferAttribute:()=>mLe,EdgesGeometry:()=>gy,EdgesHelper:()=>ELe,EllipseCurve:()=>lc,EqualDepth:()=>rne,EquirectangularReflectionMapping:()=>Xz,EquirectangularRefractionMapping:()=>WA,Euler:()=>bh,EventDispatcher:()=>Ms,ExtrudeGeometry:()=>ws,Face3:()=>Fo,Face4:()=>nLe,FaceColors:()=>Oz,FaceNormalsHelper:()=>dM,FileLoader:()=>Ts,FlatShading:()=>Nz,Float32Attribute:()=>bLe,Float32BufferAttribute:()=>gr,Float64Attribute:()=>wLe,Float64BufferAttribute:()=>zS,FloatType:()=>jg,Fog:()=>ry,FogExp2:()=>ty,Font:()=>oB,FontLoader:()=>qne,FrontFaceDirectionCCW:()=>KEe,FrontFaceDirectionCW:()=>Bie,FrontSide:()=>Zg,Frustum:()=>DS,GammaEncoding:()=>Kz,Geometry:()=>or,GeometryIdCount:()=>Jz,GeometryUtils:()=>RLe,GreaterDepth:()=>nne,GreaterEqualDepth:()=>ine,GridHelper:()=>pM,Group:()=>VS,HalfFloatType:()=>YA,HemisphereLight:()=>QA,HemisphereLightHelper:()=>Py,IcosahedronBufferGeometry:()=>ly,IcosahedronGeometry:()=>YS,ImageLoader:()=>yM,ImageUtils:()=>LLe,ImmediateRenderObject:()=>fM,InstancedBufferAttribute:()=>Ey,InstancedBufferGeometry:()=>Jd,InstancedInterleavedBuffer:()=>Ty,Int16Attribute:()=>_Le,Int16BufferAttribute:()=>OS,Int32Attribute:()=>SLe,Int32BufferAttribute:()=>FS,Int8Attribute:()=>vLe,Int8BufferAttribute:()=>IS,IntType:()=>dne,InterleavedBuffer:()=>wy,InterleavedBufferAttribute:()=>Ez,Interpolant:()=>ro,InterpolateDiscrete:()=>CS,InterpolateLinear:()=>bS,InterpolateSmooth:()=>VA,JSONLoader:()=>iB,KeyframeTrack:()=>qd,LOD:()=>kS,LatheBufferGeometry:()=>dy,LatheGeometry:()=>rM,Layers:()=>qA,LensFlare:()=>_z,LessDepth:()=>tne,LessEqualDepth:()=>GA,Light:()=>Oi,LightShadow:()=>em,Line:()=>oc,Line3:()=>Rd,LineBasicMaterial:()=>Ui,LineCurve:()=>cu,LineCurve3:()=>rLe,LineDashedMaterial:()=>Yd,LinePieces:()=>oLe,LineSegments:()=>di,LineStrip:()=>aLe,LinearEncoding:()=>LS,LinearFilter:()=>to,LinearInterpolant:()=>lM,LinearMipMapLinearFilter:()=>gM,LinearMipMapNearestFilter:()=>qz,LinearToneMapping:()=>Wz,Loader:()=>Ld,LoadingManager:()=>Qz,LogLuvEncoding:()=>QEe,LoopOnce:()=>Mne,LoopPingPong:()=>wne,LoopRepeat:()=>bne,LuminanceAlphaFormat:()=>xne,LuminanceFormat:()=>_ne,MOUSE:()=>ZEe,Material:()=>mr,MaterialLoader:()=>EC,Math:()=>cr,Matrix3:()=>bs,Matrix4:()=>qt,MaxEquation:()=>sz,Mesh:()=>mn,MeshBasicMaterial:()=>io,MeshDepthMaterial:()=>Sh,MeshFaceMaterial:()=>sLe,MeshLambertMaterial:()=>Xd,MeshNormalMaterial:()=>Wd,MeshPhongMaterial:()=>ml,MeshPhysicalMaterial:()=>Gd,MeshStandardMaterial:()=>uu,MeshToonMaterial:()=>Hd,MinEquation:()=>oz,MirroredRepeatWrapping:()=>Dd,MixOperation:()=>one,MorphBlendMesh:()=>Pn,MultiMaterial:()=>sM,MultiplyBlending:()=>Bz,MultiplyOperation:()=>vM,NearestFilter:()=>Oo,NearestMipMapLinearFilter:()=>wC,NearestMipMapNearestFilter:()=>bC,NeverDepth:()=>Qie,NoBlending:()=>TS,NoColors:()=>yC,NoToneMapping:()=>kA,NormalBlending:()=>Uy,NotEqualDepth:()=>ane,NumberKeyframeTrack:()=>My,Object3D:()=>Et,ObjectLoader:()=>Yne,OctahedronBufferGeometry:()=>Bd,OctahedronGeometry:()=>XS,OneFactor:()=>Xie,OneMinusDstAlphaFactor:()=>jie,OneMinusDstColorFactor:()=>Jie,OneMinusSrcAlphaFactor:()=>Hz,OneMinusSrcColorFactor:()=>qie,OrthographicCamera:()=>ey,PCFShadowMap:()=>Iz,PCFSoftShadowMap:()=>kie,ParametricBufferGeometry:()=>oy,ParametricGeometry:()=>HS,Particle:()=>uLe,ParticleBasicMaterial:()=>hLe,ParticleSystem:()=>cLe,ParticleSystemMaterial:()=>pLe,Path:()=>xM,PerspectiveCamera:()=>Kn,Plane:()=>Io,PlaneBufferGeometry:()=>Od,PlaneGeometry:()=>tM,PointCloud:()=>lLe,PointCloudMaterial:()=>fLe,PointLight:()=>rC,PointLightHelper:()=>Ry,Points:()=>iy,PointsMaterial:()=>dl,PolarGridHelper:()=>mC,PolyhedronBufferGeometry:()=>no,PolyhedronGeometry:()=>ZS,PositionalAudio:()=>bz,Projector:()=>PLe,PropertyBinding:()=>Ri,PropertyMixer:()=>pC,QuadraticBezierCurve:()=>Kd,QuadraticBezierCurve3:()=>tLe,Quaternion:()=>on,QuaternionKeyframeTrack:()=>uM,QuaternionLinearInterpolant:()=>lC,REVISION:()=>Fie,RGBADepthPacking:()=>Ine,RGBAFormat:()=>su,RGBA_PVRTC_2BPPV1_Format:()=>gz,RGBA_PVRTC_4BPPV1_Format:()=>vz,RGBA_S3TC_DXT1_Format:()=>fz,RGBA_S3TC_DXT3_Format:()=>hz,RGBA_S3TC_DXT5_Format:()=>pz,RGBDEncoding:()=>Pne,RGBEEncoding:()=>Cne,RGBEFormat:()=>$Ee,RGBFormat:()=>Kg,RGBM16Encoding:()=>Lne,RGBM7Encoding:()=>Rne,RGB_ETC1_Format:()=>Sne,RGB_PVRTC_2BPPV1_Format:()=>mz,RGB_PVRTC_4BPPV1_Format:()=>dz,RGB_S3TC_DXT1_Format:()=>cz,RawShaderMaterial:()=>xy,Ray:()=>Mh,Raycaster:()=>Az,RectAreaLight:()=>Sz,RectAreaLightHelper:()=>Ly,ReinhardToneMapping:()=>lne,RepeatWrapping:()=>ic,ReverseSubtractEquation:()=>Hie,RingBufferGeometry:()=>py,RingGeometry:()=>eM,Scene:()=>Fd,SceneUtils:()=>iLe,ShaderChunk:()=>Xr,ShaderLib:()=>Qg,ShaderMaterial:()=>_a,ShadowMaterial:()=>_y,Shape:()=>Pd,ShapeBufferGeometry:()=>my,ShapeGeometry:()=>vy,ShapePath:()=>aB,ShapeUtils:()=>Ln,ShortType:()=>pne,Skeleton:()=>ZA,SkeletonHelper:()=>Cy,SkinnedMesh:()=>KA,SmoothShading:()=>Uz,Sphere:()=>$n,SphereBufferGeometry:()=>kd,SphereGeometry:()=>QS,Spherical:()=>Lz,SphericalReflectionMapping:()=>Yz,Spline:()=>$Re,SplineCurve:()=>Zd,SplineCurve3:()=>QRe,SpotLight:()=>tC,SpotLightHelper:()=>Ay,SpotLightShadow:()=>eC,Sprite:()=>BS,SpriteMaterial:()=>zd,SrcAlphaFactor:()=>Gz,SrcAlphaSaturateFactor:()=>$ie,SrcColorFactor:()=>Yie,StereoCamera:()=>Zne,StringKeyframeTrack:()=>uC,SubtractEquation:()=>Gie,SubtractiveBlending:()=>zz,TetrahedronBufferGeometry:()=>sy,TetrahedronGeometry:()=>WS,TextGeometry:()=>$S,Texture:()=>ni,TextureFilter:()=>uz,TextureLoader:()=>TC,TextureMapping:()=>fne,TextureWrapping:()=>lz,TorusBufferGeometry:()=>hy,TorusGeometry:()=>JS,TorusKnotBufferGeometry:()=>fy,TorusKnotGeometry:()=>KS,Triangle:()=>Ss,TriangleFanDrawMode:()=>Ene,TriangleStripDrawMode:()=>Tne,TrianglesDrawMode:()=>jz,TubeBufferGeometry:()=>cy,TubeGeometry:()=>jS,UVMapping:()=>_C,Uint16Attribute:()=>xLe,Uint16BufferAttribute:()=>nc,Uint32Attribute:()=>MLe,Uint32BufferAttribute:()=>ac,Uint8Attribute:()=>gLe,Uint8BufferAttribute:()=>NS,Uint8ClampedAttribute:()=>yLe,Uint8ClampedBufferAttribute:()=>US,Uncharted2ToneMapping:()=>une,Uniform:()=>dC,UniformsLib:()=>hr,UniformsUtils:()=>eo,UnsignedByteType:()=>XA,UnsignedInt248Type:()=>AS,UnsignedIntType:()=>Zz,UnsignedShort4444Type:()=>mne,UnsignedShort5551Type:()=>vne,UnsignedShort565Type:()=>gne,UnsignedShortType:()=>ES,Vector2:()=>St,Vector3:()=>oe,Vector4:()=>Qr,VectorKeyframeTrack:()=>Sy,Vertex:()=>dLe,VertexColors:()=>Qd,VertexNormalsHelper:()=>hM,VideoTexture:()=>JA,WebGLRenderTarget:()=>Oy,WebGLRenderTargetCube:()=>$g,WebGLRenderer:()=>$z,WireframeGeometry:()=>ay,WireframeHelper:()=>ALe,WrapAroundEnding:()=>RS,XHRLoader:()=>CLe,ZeroCurvatureEnding:()=>Id,ZeroFactor:()=>Wie,ZeroSlopeEnding:()=>Ad,sRGBEncoding:()=>Ane});function Ms(){}function St(r,e){this.x=r||0,this.y=e||0}function ni(r,e,t,i,n,a,o,s,l,u){Object.defineProperty(this,"id",{value:eAe++}),this.uuid=cr.generateUUID(),this.name="",this.image=r!==void 0?r:ni.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=e!==void 0?e:ni.DEFAULT_MAPPING,this.wrapS=t!==void 0?t:Uo,this.wrapT=i!==void 0?i:Uo,this.magFilter=n!==void 0?n:to,this.minFilter=a!==void 0?a:gM,this.anisotropy=l!==void 0?l:1,this.format=o!==void 0?o:su,this.type=s!==void 0?s:XA,this.offset=new St(0,0),this.repeat=new St(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u!==void 0?u:LS,this.version=0,this.onUpdate=null}function Qr(r,e,t,i){this.x=r||0,this.y=e||0,this.z=t||0,this.w=i!==void 0?i:1}function Oy(r,e,t){this.uuid=cr.generateUUID(),this.width=r,this.height=e,this.scissor=new Qr(0,0,r,e),this.scissorTest=!1,this.viewport=new Qr(0,0,r,e),t=t||{},t.minFilter===void 0&&(t.minFilter=to),this.texture=new ni(void 0,void 0,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.depthBuffer=t.depthBuffer!==void 0?t.depthBuffer:!0,this.stencilBuffer=t.stencilBuffer!==void 0?t.stencilBuffer:!0,this.depthTexture=t.depthTexture!==void 0?t.depthTexture:null}function $g(r,e,t){Oy.call(this,r,e,t),this.activeCubeFace=0,this.activeMipMapLevel=0}function on(r,e,t,i){this._x=r||0,this._y=e||0,this._z=t||0,this._w=i!==void 0?i:1}function oe(r,e,t){this.x=r||0,this.y=e||0,this.z=t||0}function qt(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function _h(r,e,t,i,n,a,o,s,l,u){r=r!==void 0?r:[],e=e!==void 0?e:xC,ni.call(this,r,e,t,i,n,a,o,s,l,u),this.flipY=!1}function One(){this.seq=[],this.map={}}function Fy(r,e,t){var i=r[0];if(i<=0||i>0)return r;var n=e*t,a=Lie[n];if(a===void 0&&(a=new Float32Array(n),Lie[n]=a),e!==0){i.toArray(a,0);for(var o=1,s=0;o!==e;++o)s+=t,r[o].toArray(a,s)}return a}function Fne(r,e){var t=Pie[e];t===void 0&&(t=new Int32Array(e),Pie[e]=t);for(var i=0;i!==e;++i)t[i]=r.allocTextureUnit();return t}function tAe(r,e){r.uniform1f(this.addr,e)}function rAe(r,e){r.uniform1i(this.addr,e)}function iAe(r,e){e.x===void 0?r.uniform2fv(this.addr,e):r.uniform2f(this.addr,e.x,e.y)}function nAe(r,e){e.x!==void 0?r.uniform3f(this.addr,e.x,e.y,e.z):e.r!==void 0?r.uniform3f(this.addr,e.r,e.g,e.b):r.uniform3fv(this.addr,e)}function aAe(r,e){e.x===void 0?r.uniform4fv(this.addr,e):r.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function oAe(r,e){r.uniformMatrix2fv(this.addr,!1,e.elements||e)}function sAe(r,e){r.uniformMatrix3fv(this.addr,!1,e.elements||e)}function lAe(r,e){r.uniformMatrix4fv(this.addr,!1,e.elements||e)}function uAe(r,e,t){var i=t.allocTextureUnit();r.uniform1i(this.addr,i),t.setTexture2D(e||Nne,i)}function cAe(r,e,t){var i=t.allocTextureUnit();r.uniform1i(this.addr,i),t.setTextureCube(e||Une,i)}function zne(r,e){r.uniform2iv(this.addr,e)}function Bne(r,e){r.uniform3iv(this.addr,e)}function kne(r,e){r.uniform4iv(this.addr,e)}function fAe(r){switch(r){case 5126:return tAe;case 35664:return iAe;case 35665:return nAe;case 35666:return aAe;case 35674:return oAe;case 35675:return sAe;case 35676:return lAe;case 35678:return uAe;case 35680:return cAe;case 5124:case 35670:return rAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function hAe(r,e){r.uniform1fv(this.addr,e)}function pAe(r,e){r.uniform1iv(this.addr,e)}function dAe(r,e){r.uniform2fv(this.addr,Fy(e,this.size,2))}function mAe(r,e){r.uniform3fv(this.addr,Fy(e,this.size,3))}function vAe(r,e){r.uniform4fv(this.addr,Fy(e,this.size,4))}function gAe(r,e){r.uniformMatrix2fv(this.addr,!1,Fy(e,this.size,4))}function yAe(r,e){r.uniformMatrix3fv(this.addr,!1,Fy(e,this.size,9))}function _Ae(r,e){r.uniformMatrix4fv(this.addr,!1,Fy(e,this.size,16))}function xAe(r,e,t){var i=e.length,n=Fne(t,i);r.uniform1iv(this.addr,n);for(var a=0;a!==i;++a)t.setTexture2D(e[a]||Nne,n[a])}function SAe(r,e,t){var i=e.length,n=Fne(t,i);r.uniform1iv(this.addr,n);for(var a=0;a!==i;++a)t.setTextureCube(e[a]||Une,n[a])}function MAe(r){switch(r){case 5126:return hAe;case 35664:return dAe;case 35665:return mAe;case 35666:return vAe;case 35674:return gAe;case 35675:return yAe;case 35676:return _Ae;case 35678:return xAe;case 35680:return SAe;case 5124:case 35670:return pAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function bAe(r,e,t){this.id=r,this.addr=t,this.setValue=fAe(e.type)}function wAe(r,e,t){this.id=r,this.addr=t,this.size=e.size,this.setValue=MAe(e.type)}function Vne(r){this.id=r,One.call(this)}function Die(r,e){r.seq.push(e),r.map[e.id]=e}function TAe(r,e,t){var i=r.name,n=i.length;for(nz.lastIndex=0;;){var a=nz.exec(i),o=nz.lastIndex,s=a[1],l=a[2]==="]",u=a[3];if(l&&(s=s|0),u===void 0||u==="["&&o+2===n){Die(t,u===void 0?new bAe(s,r,e):new wAe(s,r,e));break}else{var c=t.map,f=c[s];f===void 0&&(f=new Vne(s),Die(t,f)),t=f}}}function xh(r,e,t){One.call(this),this.renderer=t;for(var i=r.getProgramParameter(e,r.ACTIVE_UNIFORMS),n=0;n!==i;++n){var a=r.getActiveUniform(e,n),o=a.name,s=r.getUniformLocation(e,o);TAe(a,s,this)}}function Gt(r,e,t){return e===void 0&&t===void 0?this.set(r):this.setRGB(r,e,t)}function Nd(r,e,t,i,n,a,o,s,l,u,c,f){ni.call(this,null,a,o,s,l,u,i,n,c,f),this.image={data:r,width:e,height:t},this.magFilter=l!==void 0?l:Oo,this.minFilter=u!==void 0?u:Oo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function PS(r,e){this.min=r!==void 0?r:new St(1/0,1/0),this.max=e!==void 0?e:new St(-1/0,-1/0)}function TRe(r,e){var t=r.context,i=r.state,n,a,o,s,l,u,c,f;function h(){var d=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),g=new Uint16Array([0,1,2,0,2,3]);n=t.createBuffer(),a=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,d,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.bufferData(t.ELEMENT_ARRAY_BUFFER,g,t.STATIC_DRAW),c=t.createTexture(),f=t.createTexture(),i.bindTexture(t.TEXTURE_2D,c),t.texImage2D(t.TEXTURE_2D,0,t.RGB,16,16,0,t.RGB,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),i.bindTexture(t.TEXTURE_2D,f),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,16,16,0,t.RGBA,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),o={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility = visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *= visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join(` +`),fragmentShader:["uniform lowp int renderType;","uniform sampler2D map;","uniform float opacity;","uniform vec3 color;","varying vec2 vUV;","varying float vVisibility;","void main() {","if ( renderType == 0 ) {","gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );","} else if ( renderType == 1 ) {","gl_FragColor = texture2D( map, vUV );","} else {","vec4 texture = texture2D( map, vUV );","texture.a *= opacity * vVisibility;","gl_FragColor = texture;","gl_FragColor.rgb *= color;","}","}"].join(` +`)},s=p(o),l={vertex:t.getAttribLocation(s,"position"),uv:t.getAttribLocation(s,"uv")},u={renderType:t.getUniformLocation(s,"renderType"),map:t.getUniformLocation(s,"map"),occlusionMap:t.getUniformLocation(s,"occlusionMap"),opacity:t.getUniformLocation(s,"opacity"),color:t.getUniformLocation(s,"color"),scale:t.getUniformLocation(s,"scale"),rotation:t.getUniformLocation(s,"rotation"),screenPosition:t.getUniformLocation(s,"screenPosition")}}this.render=function(d,g,m){if(e.length!==0){var v=new oe,_=m.w/m.z,y=m.z*.5,x=m.w*.5,M=16/m.w,S=new St(M*_,M),w=new oe(1,1,0),T=new St(1,1),C=new PS;C.min.set(m.x,m.y),C.max.set(m.x+(m.z-16),m.y+(m.w-16)),s===void 0&&h(),t.useProgram(s),i.initAttributes(),i.enableAttribute(l.vertex),i.enableAttribute(l.uv),i.disableUnusedAttributes(),t.uniform1i(u.occlusionMap,0),t.uniform1i(u.map,1),t.bindBuffer(t.ARRAY_BUFFER,n),t.vertexAttribPointer(l.vertex,2,t.FLOAT,!1,2*8,0),t.vertexAttribPointer(l.uv,2,t.FLOAT,!1,2*8,8),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),i.disable(t.CULL_FACE),i.setDepthWrite(!1);for(var b=0,E=e.length;b.001&&D.scale>.001&&(w.x=D.x,w.y=D.y,w.z=D.z,M=D.size*D.scale/m.w,S.x=M*_,S.y=M,t.uniform3f(u.screenPosition,w.x,w.y,w.z),t.uniform2f(u.scale,S.x,S.y),t.uniform1f(u.rotation,D.rotation),t.uniform1f(u.opacity,D.opacity),t.uniform3f(u.color,D.color.r,D.color.g,D.color.b),i.setBlending(D.blending,D.blendEquation,D.blendSrc,D.blendDst),r.setTexture2D(D.texture,1),t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0))}}}i.enable(t.CULL_FACE),i.enable(t.DEPTH_TEST),i.setDepthWrite(!0),r.resetGLState()}};function p(d){var g=t.createProgram(),m=t.createShader(t.FRAGMENT_SHADER),v=t.createShader(t.VERTEX_SHADER),_="precision "+r.getPrecision()+` float; +`;return t.shaderSource(m,_+d.fragmentShader),t.shaderSource(v,_+d.vertexShader),t.compileShader(m),t.compileShader(v),t.attachShader(g,m),t.attachShader(g,v),t.linkProgram(g),g}}function ERe(r,e){var t=r.context,i=r.state,n,a,o,s,l,u,c=new oe,f=new on,h=new oe;function p(){var m=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),v=new Uint16Array([0,1,2,0,2,3]);n=t.createBuffer(),a=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,m,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.bufferData(t.ELEMENT_ARRAY_BUFFER,v,t.STATIC_DRAW),o=d(),s={position:t.getAttribLocation(o,"position"),uv:t.getAttribLocation(o,"uv")},l={uvOffset:t.getUniformLocation(o,"uvOffset"),uvScale:t.getUniformLocation(o,"uvScale"),rotation:t.getUniformLocation(o,"rotation"),scale:t.getUniformLocation(o,"scale"),color:t.getUniformLocation(o,"color"),map:t.getUniformLocation(o,"map"),opacity:t.getUniformLocation(o,"opacity"),modelViewMatrix:t.getUniformLocation(o,"modelViewMatrix"),projectionMatrix:t.getUniformLocation(o,"projectionMatrix"),fogType:t.getUniformLocation(o,"fogType"),fogDensity:t.getUniformLocation(o,"fogDensity"),fogNear:t.getUniformLocation(o,"fogNear"),fogFar:t.getUniformLocation(o,"fogFar"),fogColor:t.getUniformLocation(o,"fogColor"),alphaTest:t.getUniformLocation(o,"alphaTest")};var _=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");_.width=8,_.height=8;var y=_.getContext("2d");y.fillStyle="white",y.fillRect(0,0,8,8),u=new ni(_),u.needsUpdate=!0}this.render=function(m,v){if(e.length!==0){o===void 0&&p(),t.useProgram(o),i.initAttributes(),i.enableAttribute(s.position),i.enableAttribute(s.uv),i.disableUnusedAttributes(),i.disable(t.CULL_FACE),i.enable(t.BLEND),t.bindBuffer(t.ARRAY_BUFFER,n),t.vertexAttribPointer(s.position,2,t.FLOAT,!1,2*8,0),t.vertexAttribPointer(s.uv,2,t.FLOAT,!1,2*8,8),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,a),t.uniformMatrix4fv(l.projectionMatrix,!1,v.projectionMatrix.elements),i.activeTexture(t.TEXTURE0),t.uniform1i(l.map,0);var _=0,y=0,x=m.fog;x?(t.uniform3f(l.fogColor,x.color.r,x.color.g,x.color.b),x.isFog?(t.uniform1f(l.fogNear,x.near),t.uniform1f(l.fogFar,x.far),t.uniform1i(l.fogType,1),_=1,y=1):x.isFogExp2&&(t.uniform1f(l.fogDensity,x.density),t.uniform1i(l.fogType,2),_=2,y=2)):(t.uniform1i(l.fogType,0),_=0,y=0);for(var M=0,S=e.length;M 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join(` +`)),t.compileShader(v),t.compileShader(_),t.attachShader(m,v),t.attachShader(m,_),t.linkProgram(m),m}function g(m,v){return m.renderOrder!==v.renderOrder?m.renderOrder-v.renderOrder:m.z!==v.z?v.z-m.z:v.id-m.id}}function mr(){Object.defineProperty(this,"id",{value:ARe++}),this.uuid=cr.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=Uy,this.side=Zg,this.shading=Uz,this.vertexColors=yC,this.opacity=1,this.transparent=!1,this.blendSrc=Gz,this.blendDst=Hz,this.blendEquation=Vz,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=GA,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this._needsUpdate=!0}function _a(r){mr.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=`void main() { + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); +}`,this.fragmentShader=`void main() { + gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); +}`,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,r!==void 0&&(r.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(r))}function Sh(r){mr.call(this),this.type="MeshDepthMaterial",this.depthPacking=Dne,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(r)}function lu(r,e){this.min=r!==void 0?r:new oe(1/0,1/0,1/0),this.max=e!==void 0?e:new oe(-1/0,-1/0,-1/0)}function $n(r,e){this.center=r!==void 0?r:new oe,this.radius=e!==void 0?e:0}function bs(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function Io(r,e){this.normal=r!==void 0?r:new oe(1,0,0),this.constant=e!==void 0?e:0}function DS(r,e,t,i,n,a){this.planes=[r!==void 0?r:new Io,e!==void 0?e:new Io,t!==void 0?t:new Io,i!==void 0?i:new Io,n!==void 0?n:new Io,a!==void 0?a:new Io]}function Gne(r,e,t,i){var n=r.context,a=r.state,o=new DS,s=new qt,l=e.shadows,u=new St,c=new St(i.maxTextureSize,i.maxTextureSize),f=new oe,h=new oe,p=[],d=1,g=2,m=(d|g)+1,v=new Array(m),_=new Array(m),y={},x=[new oe(1,0,0),new oe(-1,0,0),new oe(0,0,1),new oe(0,0,-1),new oe(0,1,0),new oe(0,-1,0)],M=[new oe(0,1,0),new oe(0,1,0),new oe(0,1,0),new oe(0,1,0),new oe(0,0,1),new oe(0,0,-1)],S=[new Qr,new Qr,new Qr,new Qr,new Qr,new Qr],w=new Sh;w.depthPacking=Ine,w.clipping=!0;for(var T=Qg.distanceRGBA,C=eo.clone(T.uniforms),b=0;b!==m;++b){var E=(b&d)!==0,I=(b&g)!==0,R=w.clone();R.morphTargets=E,R.skinning=I,v[b]=R;var A=new _a({defines:{USE_SHADOWMAP:""},uniforms:C,vertexShader:T.vertexShader,fragmentShader:T.fragmentShader,morphTargets:E,skinning:I,clipping:!0});_[b]=A}var D=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Iz,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(F,k){if(D.enabled!==!1&&!(D.autoUpdate===!1&&D.needsUpdate===!1)&&l.length!==0){a.buffers.color.setClear(1,1,1,1),a.disable(n.BLEND),a.setDepthTest(!0),a.setScissorTest(!1);for(var G,Y,J=0,Q=l.length;J0:J&&J.isGeometry&&(ae=J.morphTargets&&J.morphTargets.length>0));var ve=F.isSkinnedMesh&&k.skinning,ue=0;ae&&(ue|=d),ve&&(ue|=g),Q=V[ue]}if(r.localClippingEnabled&&k.clipShadows===!0&&k.clippingPlanes.length!==0){var se=Q.uuid,Ee=k.uuid,q=y[se];q===void 0&&(q={},y[se]=q);var H=q[Ee];H===void 0&&(H=Q.clone(),q[Ee]=H),Q=H}Q.visible=k.visible,Q.wireframe=k.wireframe;var We=k.side;return D.renderSingleSided&&We==Ny&&(We=Zg),D.renderReverseSided&&(We===Zg?We=yh:We===yh&&(We=Zg)),Q.side=We,Q.clipShadows=k.clipShadows,Q.clippingPlanes=k.clippingPlanes,Q.wireframeLinewidth=k.wireframeLinewidth,Q.linewidth=k.linewidth,G&&Q.uniforms.lightPos!==void 0&&Q.uniforms.lightPos.value.copy(Y),Q}function B(F,k,G){if(F.visible!==!1){var Y=(F.layers.mask&k.layers.mask)!==0;if(Y&&(F.isMesh||F.isLine||F.isPoints)&&F.castShadow&&(F.frustumCulled===!1||o.intersectsObject(F)===!0)){var J=F.material;J.visible===!0&&(F.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse,F.matrixWorld),p.push(F))}for(var Q=F.children,V=0,K=Q.length;V65535?Uint32Array:Uint16Array)(l),c=new Float32Array(s*3),f=new Float32Array(s*3),h=new Float32Array(s*2),p=0,d=0,g=0,m=0,v=0;x("z","y","x",-1,-1,t,e,r,a,n,0),x("z","y","x",1,-1,t,e,-r,a,n,1),x("x","z","y",1,1,r,t,e,i,a,2),x("x","z","y",1,-1,r,t,-e,i,a,3),x("x","y","z",1,-1,r,e,t,i,n,4),x("x","y","z",-1,-1,r,e,-t,i,n,5),this.setIndex(new gt(u,1)),this.addAttribute("position",new gt(c,3)),this.addAttribute("normal",new gt(f,3)),this.addAttribute("uv",new gt(h,2));function _(M,S,w){var T=0;return T+=(M+1)*(S+1)*2,T+=(M+1)*(w+1)*2,T+=(w+1)*(S+1)*2,T}function y(M,S,w){var T=0;return T+=M*S*2,T+=M*w*2,T+=w*S*2,T*6}function x(M,S,w,T,C,b,E,I,R,A,D){for(var U=b/R,B=E/A,F=b/2,k=E/2,G=I/2,Y=R+1,J=A+1,Q=0,V=0,K=new oe,ae=0;ae0?1:-1,f[p]=K.x,f[p+1]=K.y,f[p+2]=K.z,h[d]=ue/R,h[d+1]=1-ae/A,p+=3,d+=2,Q+=1}for(ae=0;ae65535?Uint32Array:Uint16Array)(o*s*6),v=0;v/g;function t(i,n){var a=Xr[n];if(a===void 0)throw new Error("Can not resolve #include <"+n+">");return yz(a)}return r.replace(e,t)}function Uie(r){var e=/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function t(i,n,a,o){for(var s="",l=parseInt(n);l0?r.gammaFactor:1,d=FRe(a,i,r.extensions),g=zRe(o),m=n.createProgram(),v,_;t.isRawShaderMaterial?(v=[g,` +`].filter(MS).join(` +`),_=[d,g,` +`].filter(MS).join(` +`)):(v=["precision "+i.precision+" float;","precision "+i.precision+" int;","#define SHADER_NAME "+t.__webglShader.name,g,i.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+i.maxBones,i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+f:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.displacementMap&&i.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.vertexColors?"#define USE_COLOR":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.useVertexTexture?"#define BONE_TEXTURE":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&i.flatShading===!1?"#define USE_MORPHNORMALS":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+i.numClippingPlanes,i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+u:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&r.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR"," attribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(MS).join(` +`),_=[d,"precision "+i.precision+" float;","precision "+i.precision+" int;","#define SHADER_NAME "+t.__webglShader.name,g,i.alphaTest?"#define ALPHATEST "+i.alphaTest:"","#define GAMMA_FACTOR "+p,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+c:"",i.envMap?"#define "+f:"",i.envMap?"#define "+h:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.vertexColors?"#define USE_COLOR":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+i.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(i.numClippingPlanes-i.numClipIntersection),i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+u:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&r.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",i.envMap&&r.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",i.toneMapping!==kA?"#define TONE_MAPPING":"",i.toneMapping!==kA?Xr.tonemapping_pars_fragment:"",i.toneMapping!==kA?ORe("toneMapping",i.toneMapping):"",i.outputEncoding||i.mapEncoding||i.envMapEncoding||i.emissiveMapEncoding?Xr.encodings_pars_fragment:"",i.mapEncoding?az("mapTexelToLinear",i.mapEncoding):"",i.envMapEncoding?az("envMapTexelToLinear",i.envMapEncoding):"",i.emissiveMapEncoding?az("emissiveMapTexelToLinear",i.emissiveMapEncoding):"",i.outputEncoding?URe("linearToOutputTexel",i.outputEncoding):"",i.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(MS).join(` +`)),s=yz(s,i),s=Nie(s,i),l=yz(l,i),l=Nie(l,i),t.isShaderMaterial||(s=Uie(s),l=Uie(l));var y=v+s,x=_+l,M=Iie(n,n.VERTEX_SHADER,y),S=Iie(n,n.FRAGMENT_SHADER,x);n.attachShader(m,M),n.attachShader(m,S),t.index0AttributeName!==void 0?n.bindAttribLocation(m,0,t.index0AttributeName):i.morphTargets===!0&&n.bindAttribLocation(m,0,"position"),n.linkProgram(m);var w=n.getProgramInfoLog(m),T=n.getShaderInfoLog(M),C=n.getShaderInfoLog(S),b=!0,E=!0;n.getProgramParameter(m,n.LINK_STATUS)===!1?(b=!1,console.error("THREE.WebGLProgram: shader error: ",n.getError(),"gl.VALIDATE_STATUS",n.getProgramParameter(m,n.VALIDATE_STATUS),"gl.getProgramInfoLog",w,T,C)):w!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",w):(T===""||C==="")&&(E=!1),E&&(this.diagnostics={runnable:b,material:t,programLog:w,vertexShader:{log:T,prefix:v},fragmentShader:{log:C,prefix:_}}),n.deleteShader(M),n.deleteShader(S);var I;this.getUniforms=function(){return I===void 0&&(I=new xh(n,m,r)),I};var R;return this.getAttributes=function(){return R===void 0&&(R=BRe(n,m)),R},this.destroy=function(){n.deleteProgram(m),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=NRe++,this.code=e,this.usedTimes=1,this.program=m,this.vertexShader=M,this.fragmentShader=S,this}function VRe(r,e){var t=[],i={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},n=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking"];function a(s){if(e.floatVertexTextures&&s&&s.skeleton&&s.skeleton.useVertexTexture)return 1024;var l=e.maxVertexUniforms,u=Math.floor((l-20)/4),c=u;return s!==void 0&&s&&s.isSkinnedMesh&&(c=Math.min(s.skeleton.bones.length,c),c0,shadowMapType:r.shadowMap.type,toneMapping:r.toneMapping,physicallyCorrectLights:r.physicallyCorrectLights,premultipliedAlpha:s.premultipliedAlpha,alphaTest:s.alphaTest,doubleSided:s.side===Ny,flipSided:s.side===yh,depthPacking:s.depthPacking!==void 0?s.depthPacking:!1};return v},this.getProgramCode=function(s,l){var u=[];if(l.shaderID?u.push(l.shaderID):(u.push(s.fragmentShader),u.push(s.vertexShader)),s.defines!==void 0)for(var c in s.defines)u.push(c),u.push(s.defines[c]);for(var f=0;f65535?Uint32Array:Uint16Array,C=new gt(new T(p),1);return a(C,r.ELEMENT_ARRAY_BUFFER),h.wireframe=C,C}return{getAttributeBuffer:l,getAttributeProperties:u,getWireframeAttribute:c,update:n}}function WRe(r,e,t,i,n,a,o){var s=o.memory,l=typeof WebGL2RenderingContext<"u"&&r instanceof WebGL2RenderingContext;function u(R,A){if(R.width>A||R.height>A){var D=A/Math.max(R.width,R.height),U=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");U.width=Math.floor(R.width*D),U.height=Math.floor(R.height*D);var B=U.getContext("2d");return B.drawImage(R,0,0,R.width,R.height,0,0,U.width,U.height),console.warn("THREE.WebGLRenderer: image is too big ("+R.width+"x"+R.height+"). Resized to "+U.width+"x"+U.height,R),U}return R}function c(R){return cr.isPowerOfTwo(R.width)&&cr.isPowerOfTwo(R.height)}function f(R){if(R instanceof HTMLImageElement||R instanceof HTMLCanvasElement){var A=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");A.width=cr.nearestPowerOfTwo(R.width),A.height=cr.nearestPowerOfTwo(R.height);var D=A.getContext("2d");return D.drawImage(R,0,0,A.width,A.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+R.width+"x"+R.height+"). Resized to "+A.width+"x"+A.height,R),A}return R}function h(R){return R.wrapS!==Uo||R.wrapT!==Uo||R.minFilter!==Oo&&R.minFilter!==to}function p(R){return R===Oo||R===bC||R===wC?r.NEAREST:r.LINEAR}function d(R){var A=R.target;A.removeEventListener("dispose",d),m(A),s.textures--}function g(R){var A=R.target;A.removeEventListener("dispose",g),v(A),s.textures--}function m(R){var A=i.get(R);if(R.image&&A.__image__webglTextureCube)r.deleteTexture(A.__image__webglTextureCube);else{if(A.__webglInit===void 0)return;r.deleteTexture(A.__webglTexture)}i.delete(R)}function v(R){var A=i.get(R),D=i.get(R.texture);if(R){if(D.__webglTexture!==void 0&&r.deleteTexture(D.__webglTexture),R.depthTexture&&R.depthTexture.dispose(),R.isWebGLRenderTargetCube)for(var U=0;U<6;U++)r.deleteFramebuffer(A.__webglFramebuffer[U]),A.__webglDepthbuffer&&r.deleteRenderbuffer(A.__webglDepthbuffer[U]);else r.deleteFramebuffer(A.__webglFramebuffer),A.__webglDepthbuffer&&r.deleteRenderbuffer(A.__webglDepthbuffer);i.delete(R.texture),i.delete(R)}}function _(R,A){var D=i.get(R);if(R.version>0&&D.__version!==R.version){var U=R.image;if(U===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",R);else if(U.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",R);else{S(D,R,A);return}}t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_2D,D.__webglTexture)}function y(R,A){var D=i.get(R);if(R.image.length===6)if(R.version>0&&D.__version!==R.version){D.__image__webglTextureCube||(R.addEventListener("dispose",d),D.__image__webglTextureCube=r.createTexture(),s.textures++),t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_CUBE_MAP,D.__image__webglTextureCube),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,R.flipY);for(var U=R&&R.isCompressedTexture,B=R.image[0]&&R.image[0].isDataTexture,F=[],k=0;k<6;k++)!U&&!B?F[k]=u(R.image[k],n.maxCubemapSize):F[k]=B?R.image[k].image:R.image[k];var G=F[0],Y=c(G),J=a(R.format),Q=a(R.type);M(r.TEXTURE_CUBE_MAP,R,Y);for(var k=0;k<6;k++)if(!U)B?t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,J,F[k].width,F[k].height,0,J,Q,F[k].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,J,J,Q,F[k]);else for(var V,K=F[k].mipmaps,ae=0,ve=K.length;ae-1?t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,ae,J,V.width,V.height,0,V.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+k,ae,J,V.width,V.height,0,J,Q,V.data);R.generateMipmaps&&Y&&r.generateMipmap(r.TEXTURE_CUBE_MAP),D.__version=R.version,R.onUpdate&&R.onUpdate(R)}else t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_CUBE_MAP,D.__image__webglTextureCube)}function x(R,A){t.activeTexture(r.TEXTURE0+A),t.bindTexture(r.TEXTURE_CUBE_MAP,i.get(R).__webglTexture)}function M(R,A,D){var U;if(D?(r.texParameteri(R,r.TEXTURE_WRAP_S,a(A.wrapS)),r.texParameteri(R,r.TEXTURE_WRAP_T,a(A.wrapT)),r.texParameteri(R,r.TEXTURE_MAG_FILTER,a(A.magFilter)),r.texParameteri(R,r.TEXTURE_MIN_FILTER,a(A.minFilter))):(r.texParameteri(R,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(R,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(A.wrapS!==Uo||A.wrapT!==Uo)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",A),r.texParameteri(R,r.TEXTURE_MAG_FILTER,p(A.magFilter)),r.texParameteri(R,r.TEXTURE_MIN_FILTER,p(A.minFilter)),A.minFilter!==Oo&&A.minFilter!==to&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",A)),U=e.get("EXT_texture_filter_anisotropic"),U){if(A.type===jg&&e.get("OES_texture_float_linear")===null||A.type===YA&&e.get("OES_texture_half_float_linear")===null)return;(A.anisotropy>1||i.get(A).__currentAnisotropy)&&(r.texParameterf(R,U.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,n.getMaxAnisotropy())),i.get(A).__currentAnisotropy=A.anisotropy)}}function S(R,A,D){R.__webglInit===void 0&&(R.__webglInit=!0,A.addEventListener("dispose",d),R.__webglTexture=r.createTexture(),s.textures++),t.activeTexture(r.TEXTURE0+D),t.bindTexture(r.TEXTURE_2D,R.__webglTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,A.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,A.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,A.unpackAlignment);var U=u(A.image,n.maxTextureSize);h(A)&&c(U)===!1&&(U=f(U));var B=c(U),F=a(A.format),k=a(A.type);M(r.TEXTURE_2D,A,B);var G,Y=A.mipmaps;if(A.isDepthTexture){var J=r.DEPTH_COMPONENT;if(A.type===jg){if(!l)throw new Error("Float Depth Texture only supported in WebGL2.0");J=r.DEPTH_COMPONENT32F}else l&&(J=r.DEPTH_COMPONENT16);A.format===Cd&&J===r.DEPTH_COMPONENT&&A.type!==ES&&A.type!==Zz&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=ES,k=a(A.type)),A.format===Jg&&(J=r.DEPTH_STENCIL,A.type!==AS&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=AS,k=a(A.type))),t.texImage2D(r.TEXTURE_2D,0,J,U.width,U.height,0,F,k,null)}else if(A.isDataTexture)if(Y.length>0&&B){for(var Q=0,V=Y.length;Q-1?t.compressedTexImage2D(r.TEXTURE_2D,Q,F,G.width,G.height,0,G.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):t.texImage2D(r.TEXTURE_2D,Q,F,G.width,G.height,0,F,k,G.data);else if(Y.length>0&&B){for(var Q=0,V=Y.length;Q=1,U=null,B={},F=new Qr,k=new Qr;function G($,it,Xe){var ze=new Uint8Array(4),we=r.createTexture();r.bindTexture($,we),r.texParameteri($,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri($,r.TEXTURE_MAG_FILTER,r.NEAREST);for(var Ie=0;Ie0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";x="mediump"}return x==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o=t.precision!==void 0?t.precision:"highp",s=a(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var l=t.logarithmicDepthBuffer===!0&&!!e.get("EXT_frag_depth"),u=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),c=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=r.getParameter(r.MAX_TEXTURE_SIZE),h=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),p=r.getParameter(r.MAX_VERTEX_ATTRIBS),d=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),g=r.getParameter(r.MAX_VARYING_VECTORS),m=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),v=c>0,_=!!e.get("OES_texture_float"),y=v&&_;return{getMaxAnisotropy:n,getMaxPrecision:a,precision:o,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:c,maxTextureSize:f,maxCubemapSize:h,maxAttributes:p,maxVertexUniforms:d,maxVaryings:g,maxFragmentUniforms:m,vertexTextures:v,floatFragmentTextures:_,floatVertexTextures:y}}function ZRe(r){var e={};return{get:function(t){if(e[t]!==void 0)return e[t];var i;switch(t){case"WEBGL_depth_texture":i=r.getExtension("WEBGL_depth_texture")||r.getExtension("MOZ_WEBGL_depth_texture")||r.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=r.getExtension("WEBGL_compressed_texture_s3tc")||r.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":i=r.getExtension("WEBGL_compressed_texture_etc1");break;default:i=r.getExtension(t)}return i===null&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e[t]=i,i}}}function jRe(){var r=this,e=null,t=0,i=!1,n=!1,a=new Io,o=new bs,s={value:null,needsUpdate:!1};this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(c,f,h){var p=c.length!==0||f||t!==0||i;return i=f,e=u(c,h,0),t=c.length,p},this.beginShadows=function(){n=!0,u(null)},this.endShadows=function(){n=!1,l()},this.setState=function(c,f,h,p,d,g){if(!i||c===null||c.length===0||n&&!h)n?u(null):l();else{var m=n?0:t,v=m*4,_=d.clippingState||null;s.value=_,_=u(c,p,v,g);for(var y=0;y!==v;++y)_[y]=e[y];d.clippingState=_,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=m}};function l(){s.value!==e&&(s.value=e,s.needsUpdate=t>0),r.numPlanes=t,r.numIntersection=0}function u(c,f,h,p){var d=c!==null?c.length:0,g=null;if(d!==0){if(g=s.value,p!==!0||g===null){var m=h+d*4,v=f.matrixWorldInverse;o.getNormalMatrix(v),(g===null||g.length8&&($e.length=8);for(var mi=ee.morphAttributes,at=0,wt=$e.length;at0&&Mi.renderInstances(ee,jh,WR):Mi.render(jh,WR)}};function st(P,W,ee,ge){var ce;if(ee&&ee.isInstancedBufferGeometry&&(ce=We.get("ANGLE_instanced_arrays"),ce===null)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}ge===void 0&&(ge=0),xe.initAttributes();var Oe=ee.attributes,Ge=W.getAttributes(),Re=P.defaultAttributeValues;for(var pt in Ge){var mt=Ge[pt];if(mt>=0){var $e=Oe[pt];if($e!==void 0){var at=$e.normalized,wt=$e.itemSize,je=Ne.getAttributeProperties($e),mi=je.__webglBuffer,Ut=je.type,Rr=je.bytesPerElement;if($e.isInterleavedBufferAttribute){var Wi=$e.data,Mt=Wi.stride,Mi=$e.offset;Wi&&Wi.isInstancedInterleavedBuffer?(xe.enableAttributeAndDivisor(mt,Wi.meshPerAttribute,ce),ee.maxInstancedCount===void 0&&(ee.maxInstancedCount=Wi.meshPerAttribute*Wi.count)):xe.enableAttribute(mt),q.bindBuffer(q.ARRAY_BUFFER,mi),q.vertexAttribPointer(mt,wt,Ut,at,Mt*Rr,(ge*Mt+Mi)*Rr)}else $e.isInstancedBufferAttribute?(xe.enableAttributeAndDivisor(mt,$e.meshPerAttribute,ce),ee.maxInstancedCount===void 0&&(ee.maxInstancedCount=$e.meshPerAttribute*$e.count)):xe.enableAttribute(mt),q.bindBuffer(q.ARRAY_BUFFER,mi),q.vertexAttribPointer(mt,wt,Ut,at,0,ge*wt*Rr)}else if(Re!==void 0){var sr=Re[pt];if(sr!==void 0)switch(sr.length){case 2:q.vertexAttrib2fv(mt,sr);break;case 3:q.vertexAttrib3fv(mt,sr);break;case 4:q.vertexAttrib4fv(mt,sr);break;default:q.vertexAttrib1fv(mt,sr)}}}}xe.disableUnusedAttributes()}function Je(P,W){return Math.abs(W[0])-Math.abs(P[0])}function kt(P,W){return P.object.renderOrder!==W.object.renderOrder?P.object.renderOrder-W.object.renderOrder:P.material.program&&W.material.program&&P.material.program!==W.material.program?P.material.program.id-W.material.program.id:P.material.id!==W.material.id?P.material.id-W.material.id:P.z!==W.z?P.z-W.z:P.id-W.id}function X(P,W){return P.object.renderOrder!==W.object.renderOrder?P.object.renderOrder-W.object.renderOrder:P.z!==W.z?W.z-P.z:P.id-W.id}this.render=function(P,W,ee,ge){if(W!==void 0&&W.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}S="",M=-1,w=null,P.autoUpdate===!0&&P.updateMatrixWorld(),W.parent===null&&W.updateMatrixWorld(),W.matrixWorldInverse.getInverse(W.matrixWorld),K.multiplyMatrices(W.projectionMatrix,W.matrixWorldInverse),G.setFromMatrix(K),u.length=0,f=-1,p=-1,g.length=0,m.length=0,Q=this.localClippingEnabled,J=Y.init(this.clippingPlanes,Q,W),xt(P,W),c.length=f+1,h.length=p+1,v.sortObjects===!0&&(c.sort(kt),h.sort(X)),J&&Y.beginShadows(),O(u),nt.render(P,W),j(u,W),J&&Y.endShadows(),Ee.calls=0,Ee.vertices=0,Ee.faces=0,Ee.points=0,ee===void 0&&(ee=null),this.setRenderTarget(ee);var ce=P.background;if(ce===null?xe.buffers.color.setClear(I.r,I.g,I.b,R,s):ce&&ce.isColor&&(xe.buffers.color.setClear(ce.r,ce.g,ce.b,1,s),ge=!0),(this.autoClear||ge)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),ce&&ce.isCubeTexture?(le.projectionMatrix.copy(W.projectionMatrix),le.matrixWorld.extractRotation(W.matrixWorld),le.matrixWorldInverse.getInverse(le.matrixWorld),et.material.uniforms.tCube.value=ce,et.modelViewMatrix.multiplyMatrices(le.matrixWorldInverse,et.matrixWorld),Ne.update(et),v.renderBufferDirect(le,null,et.geometry,et.material,et,null)):ce&&ce.isTexture&&(me.material.map=ce,Ne.update(me),v.renderBufferDirect(ne,null,me.geometry,me.material,me,null)),P.overrideMaterial){var Oe=P.overrideMaterial;zt(c,P,W,Oe),zt(h,P,W,Oe)}else xe.setBlending(TS),zt(c,P,W),zt(h,P,W);$.render(P,W),it.render(P,W,b),ee&&Ue.updateRenderTargetMipmap(ee),xe.setDepthTest(!0),xe.setDepthWrite(!0),xe.setColorWrite(!0)};function Te(P,W,ee,ge,ce){var Oe,Ge;ee.transparent?(Oe=h,Ge=++p):(Oe=c,Ge=++f);var Re=Oe[Ge];Re!==void 0?(Re.id=P.id,Re.object=P,Re.geometry=W,Re.material=ee,Re.z=ae.z,Re.group=ce):(Re={id:P.id,object:P,geometry:W,material:ee,z:ae.z,group:ce},Oe.push(Re))}function te(P){var W=P.geometry;return W.boundingSphere===null&&W.computeBoundingSphere(),V.copy(W.boundingSphere).applyMatrix4(P.matrixWorld),Pe(V)}function Me(P){return V.center.set(0,0,0),V.radius=.7071067811865476,V.applyMatrix4(P.matrixWorld),Pe(V)}function Pe(P){if(!G.intersectsSphere(P))return!1;var W=Y.numPlanes;if(W===0)return!0;var ee=v.clippingPlanes,ge=P.center,ce=-P.radius,Oe=0;do if(ee[Oe].distanceToPoint(ge)=0&&P.numSupportedMorphTargets++}if(P.morphNormals){P.numSupportedMorphNormals=0;for(var $e=0;$e=0&&P.numSupportedMorphNormals++}var at=ge.__webglShader.uniforms;(!P.isShaderMaterial&&!P.isRawShaderMaterial||P.clipping===!0)&&(ge.numClippingPlanes=Y.numPlanes,ge.numIntersection=Y.numIntersection,at.clippingPlanes=Y.uniform),ge.fog=W,ge.lightsHash=se.hash,P.lights&&(at.ambientLightColor.value=se.ambient,at.directionalLights.value=se.directional,at.spotLights.value=se.spot,at.rectAreaLights.value=se.rectArea,at.pointLights.value=se.point,at.hemisphereLights.value=se.hemi,at.directionalShadowMap.value=se.directionalShadowMap,at.directionalShadowMatrix.value=se.directionalShadowMatrix,at.spotShadowMap.value=se.spotShadowMap,at.spotShadowMatrix.value=se.spotShadowMatrix,at.pointShadowMap.value=se.pointShadowMap,at.pointShadowMatrix.value=se.pointShadowMatrix);var wt=ge.program.getUniforms(),je=xh.seqWithValue(wt.seq,at);ge.uniformsList=je}function Zr(P){P.side===Ny?xe.disable(q.CULL_FACE):xe.enable(q.CULL_FACE),xe.setFlipSided(P.side===yh),P.transparent===!0?xe.setBlending(P.blending,P.blendEquation,P.blendSrc,P.blendDst,P.blendEquationAlpha,P.blendSrcAlpha,P.blendDstAlpha,P.premultipliedAlpha):xe.setBlending(TS),xe.setDepthFunc(P.depthFunc),xe.setDepthTest(P.depthTest),xe.setDepthWrite(P.depthWrite),xe.setColorWrite(P.colorWrite),xe.setPolygonOffset(P.polygonOffset,P.polygonOffsetFactor,P.polygonOffsetUnits)}function Vt(P,W,ee,ge){E=0;var ce=Le.get(ee);if(J&&(Q||P!==w)){var Oe=P===w&&ee.id===M;Y.setState(ee.clippingPlanes,ee.clipIntersection,ee.clipShadows,P,ce,Oe)}ee.needsUpdate===!1&&(ce.program===void 0||ee.fog&&ce.fog!==W||ee.lights&&ce.lightsHash!==se.hash||ce.numClippingPlanes!==void 0&&(ce.numClippingPlanes!==Y.numPlanes||ce.numIntersection!==Y.numIntersection))&&(ee.needsUpdate=!0),ee.needsUpdate&&(Mr(ee,W,ge),ee.needsUpdate=!1);var Ge=!1,Re=!1,pt=!1,mt=ce.program,$e=mt.getUniforms(),at=ce.__webglShader.uniforms;if(mt.id!==_&&(q.useProgram(mt.program),_=mt.id,Ge=!0,Re=!0,pt=!0),ee.id!==M&&(M=ee.id,Re=!0),Ge||P!==w){if($e.set(q,P,"projectionMatrix"),_e.logarithmicDepthBuffer&&$e.setValue(q,"logDepthBufFC",2/(Math.log(P.far+1)/Math.LN2)),P!==w&&(w=P,Re=!0,pt=!0),ee.isShaderMaterial||ee.isMeshPhongMaterial||ee.isMeshStandardMaterial||ee.envMap){var wt=$e.map.cameraPosition;wt!==void 0&&wt.setValue(q,ae.setFromMatrixPosition(P.matrixWorld))}(ee.isMeshPhongMaterial||ee.isMeshLambertMaterial||ee.isMeshBasicMaterial||ee.isMeshStandardMaterial||ee.isShaderMaterial||ee.skinning)&&$e.setValue(q,"viewMatrix",P.matrixWorldInverse),$e.set(q,v,"toneMappingExposure"),$e.set(q,v,"toneMappingWhitePoint")}if(ee.skinning){$e.setOptional(q,ge,"bindMatrix"),$e.setOptional(q,ge,"bindMatrixInverse");var je=ge.skeleton;je&&(_e.floatVertexTextures&&je.useVertexTexture?($e.set(q,je,"boneTexture"),$e.set(q,je,"boneTextureWidth"),$e.set(q,je,"boneTextureHeight")):$e.setOptional(q,je,"boneMatrices"))}return Re&&(ee.lights&&T0(at,pt),W&&ee.fog&&Ds(at,W),(ee.isMeshBasicMaterial||ee.isMeshLambertMaterial||ee.isMeshPhongMaterial||ee.isMeshStandardMaterial||ee.isMeshNormalMaterial||ee.isMeshDepthMaterial)&&Dr(at,ee),ee.isLineBasicMaterial?oi(at,ee):ee.isLineDashedMaterial?(oi(at,ee),Yh(at,ee)):ee.isPointsMaterial?M0(at,ee):ee.isMeshLambertMaterial?qh(at,ee):ee.isMeshToonMaterial?Zh(at,ee):ee.isMeshPhongMaterial?Go(at,ee):ee.isMeshPhysicalMaterial?b0(at,ee):ee.isMeshStandardMaterial?wc(at,ee):ee.isMeshDepthMaterial?ee.displacementMap&&(at.displacementMap.value=ee.displacementMap,at.displacementScale.value=ee.displacementScale,at.displacementBias.value=ee.displacementBias):ee.isMeshNormalMaterial&&w0(at,ee),at.ltcMat!==void 0&&(at.ltcMat.value=THREE.UniformsLib.LTC_MAT_TEXTURE),at.ltcMag!==void 0&&(at.ltcMag.value=THREE.UniformsLib.LTC_MAG_TEXTURE),xh.upload(q,ce.uniformsList,at,v)),$e.set(q,ge,"modelViewMatrix"),$e.set(q,ge,"normalMatrix"),$e.setValue(q,"modelMatrix",ge.matrixWorld),mt}function Dr(P,W){P.opacity.value=W.opacity,P.diffuse.value=W.color,W.emissive&&P.emissive.value.copy(W.emissive).multiplyScalar(W.emissiveIntensity),P.map.value=W.map,P.specularMap.value=W.specularMap,P.alphaMap.value=W.alphaMap,W.lightMap&&(P.lightMap.value=W.lightMap,P.lightMapIntensity.value=W.lightMapIntensity),W.aoMap&&(P.aoMap.value=W.aoMap,P.aoMapIntensity.value=W.aoMapIntensity);var ee;if(W.map?ee=W.map:W.specularMap?ee=W.specularMap:W.displacementMap?ee=W.displacementMap:W.normalMap?ee=W.normalMap:W.bumpMap?ee=W.bumpMap:W.roughnessMap?ee=W.roughnessMap:W.metalnessMap?ee=W.metalnessMap:W.alphaMap?ee=W.alphaMap:W.emissiveMap&&(ee=W.emissiveMap),ee!==void 0){ee.isWebGLRenderTarget&&(ee=ee.texture);var ge=ee.offset,ce=ee.repeat;P.offsetRepeat.value.set(ge.x,ge.y,ce.x,ce.y)}P.envMap.value=W.envMap,P.flipEnvMap.value=W.envMap&&W.envMap.isCubeTexture?-1:1,P.reflectivity.value=W.reflectivity,P.refractionRatio.value=W.refractionRatio}function oi(P,W){P.diffuse.value=W.color,P.opacity.value=W.opacity}function Yh(P,W){P.dashSize.value=W.dashSize,P.totalSize.value=W.dashSize+W.gapSize,P.scale.value=W.scale}function M0(P,W){if(P.diffuse.value=W.color,P.opacity.value=W.opacity,P.size.value=W.size*U,P.scale.value=D*.5,P.map.value=W.map,W.map!==null){var ee=W.map.offset,ge=W.map.repeat;P.offsetRepeat.value.set(ee.x,ee.y,ge.x,ge.y)}}function Ds(P,W){P.fogColor.value=W.color,W.isFog?(P.fogNear.value=W.near,P.fogFar.value=W.far):W.isFogExp2&&(P.fogDensity.value=W.density)}function qh(P,W){W.emissiveMap&&(P.emissiveMap.value=W.emissiveMap)}function Go(P,W){P.specular.value=W.specular,P.shininess.value=Math.max(W.shininess,1e-4),W.emissiveMap&&(P.emissiveMap.value=W.emissiveMap),W.bumpMap&&(P.bumpMap.value=W.bumpMap,P.bumpScale.value=W.bumpScale),W.normalMap&&(P.normalMap.value=W.normalMap,P.normalScale.value.copy(W.normalScale)),W.displacementMap&&(P.displacementMap.value=W.displacementMap,P.displacementScale.value=W.displacementScale,P.displacementBias.value=W.displacementBias)}function Zh(P,W){Go(P,W),W.gradientMap&&(P.gradientMap.value=W.gradientMap)}function wc(P,W){P.roughness.value=W.roughness,P.metalness.value=W.metalness,W.roughnessMap&&(P.roughnessMap.value=W.roughnessMap),W.metalnessMap&&(P.metalnessMap.value=W.metalnessMap),W.emissiveMap&&(P.emissiveMap.value=W.emissiveMap),W.bumpMap&&(P.bumpMap.value=W.bumpMap,P.bumpScale.value=W.bumpScale),W.normalMap&&(P.normalMap.value=W.normalMap,P.normalScale.value.copy(W.normalScale)),W.displacementMap&&(P.displacementMap.value=W.displacementMap,P.displacementScale.value=W.displacementScale,P.displacementBias.value=W.displacementBias),W.envMap&&(P.envMapIntensity.value=W.envMapIntensity)}function b0(P,W){P.clearCoat.value=W.clearCoat,P.clearCoatRoughness.value=W.clearCoatRoughness,wc(P,W)}function w0(P,W){W.bumpMap&&(P.bumpMap.value=W.bumpMap,P.bumpScale.value=W.bumpScale),W.normalMap&&(P.normalMap.value=W.normalMap,P.normalScale.value.copy(W.normalScale)),W.displacementMap&&(P.displacementMap.value=W.displacementMap,P.displacementScale.value=W.displacementScale,P.displacementBias.value=W.displacementBias)}function T0(P,W){P.ambientLightColor.needsUpdate=W,P.directionalLights.needsUpdate=W,P.pointLights.needsUpdate=W,P.spotLights.needsUpdate=W,P.rectAreaLights.needsUpdate=W,P.hemisphereLights.needsUpdate=W}function O(P){for(var W=0,ee=0,ge=P.length;ee=_e.maxTextures&&console.warn("WebGLRenderer: trying to use "+P+" texture units while this GPU supports only "+_e.maxTextures),E+=1,P}this.allocTextureUnit=re,this.setTexture2D=function(){var P=!1;return function(ee,ge){ee&&ee.isWebGLRenderTarget&&(P||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),P=!0),ee=ee.texture),Ue.setTexture2D(ee,ge)}}(),this.setTexture=function(){var P=!1;return function(ee,ge){P||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),P=!0),Ue.setTexture2D(ee,ge)}}(),this.setTextureCube=function(){var P=!1;return function(ee,ge){ee&&ee.isWebGLRenderTargetCube&&(P||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),P=!0),ee=ee.texture),ee&&ee.isCubeTexture||Array.isArray(ee.image)&&ee.image.length===6?Ue.setTextureCube(ee,ge):Ue.setTextureCubeDynamic(ee,ge)}}(),this.getCurrentRenderTarget=function(){return y},this.setRenderTarget=function(P){y=P,P&&Le.get(P).__webglFramebuffer===void 0&&Ue.setupRenderTarget(P);var W=P&&P.isWebGLRenderTargetCube,ee;if(P){var ge=Le.get(P);W?ee=ge.__webglFramebuffer[P.activeCubeFace]:ee=ge.__webglFramebuffer,T.copy(P.scissor),C=P.scissorTest,b.copy(P.viewport)}else ee=null,T.copy(B).multiplyScalar(U),C=F,b.copy(k).multiplyScalar(U);if(x!==ee&&(q.bindFramebuffer(q.FRAMEBUFFER,ee),x=ee),xe.scissor(T),xe.setScissorTest(C),xe.viewport(b),W){var ce=Le.get(P.texture);q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_CUBE_MAP_POSITIVE_X+P.activeCubeFace,ce.__webglTexture,P.activeMipMapLevel)}},this.readRenderTargetPixels=function(P,W,ee,ge,ce,Oe){if((P&&P.isWebGLRenderTarget)===!1){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}var Ge=Le.get(P).__webglFramebuffer;if(Ge){var Re=!1;Ge!==x&&(q.bindFramebuffer(q.FRAMEBUFFER,Ge),Re=!0);try{var pt=P.texture,mt=pt.format,$e=pt.type;if(mt!==su&&ie(mt)!==q.getParameter(q.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if($e!==XA&&ie($e)!==q.getParameter(q.IMPLEMENTATION_COLOR_READ_TYPE)&&!($e===jg&&(We.get("OES_texture_float")||We.get("WEBGL_color_buffer_float")))&&!($e===YA&&We.get("EXT_color_buffer_half_float"))){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}q.checkFramebufferStatus(q.FRAMEBUFFER)===q.FRAMEBUFFER_COMPLETE?W>=0&&W<=P.width-ge&&ee>=0&&ee<=P.height-ce&&q.readPixels(W,ee,ge,ce,ie(mt),ie($e),Oe):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{Re&&q.bindFramebuffer(q.FRAMEBUFFER,x)}}};function ie(P){var W;if(P===ic)return q.REPEAT;if(P===Uo)return q.CLAMP_TO_EDGE;if(P===Dd)return q.MIRRORED_REPEAT;if(P===Oo)return q.NEAREST;if(P===bC)return q.NEAREST_MIPMAP_NEAREST;if(P===wC)return q.NEAREST_MIPMAP_LINEAR;if(P===to)return q.LINEAR;if(P===qz)return q.LINEAR_MIPMAP_NEAREST;if(P===gM)return q.LINEAR_MIPMAP_LINEAR;if(P===XA)return q.UNSIGNED_BYTE;if(P===mne)return q.UNSIGNED_SHORT_4_4_4_4;if(P===vne)return q.UNSIGNED_SHORT_5_5_5_1;if(P===gne)return q.UNSIGNED_SHORT_5_6_5;if(P===hne)return q.BYTE;if(P===pne)return q.SHORT;if(P===ES)return q.UNSIGNED_SHORT;if(P===dne)return q.INT;if(P===Zz)return q.UNSIGNED_INT;if(P===jg)return q.FLOAT;if(P===YA&&(W=We.get("OES_texture_half_float"),W!==null))return W.HALF_FLOAT_OES;if(P===yne)return q.ALPHA;if(P===Kg)return q.RGB;if(P===su)return q.RGBA;if(P===_ne)return q.LUMINANCE;if(P===xne)return q.LUMINANCE_ALPHA;if(P===Cd)return q.DEPTH_COMPONENT;if(P===Jg)return q.DEPTH_STENCIL;if(P===Vz)return q.FUNC_ADD;if(P===Gie)return q.FUNC_SUBTRACT;if(P===Hie)return q.FUNC_REVERSE_SUBTRACT;if(P===Wie)return q.ZERO;if(P===Xie)return q.ONE;if(P===Yie)return q.SRC_COLOR;if(P===qie)return q.ONE_MINUS_SRC_COLOR;if(P===Gz)return q.SRC_ALPHA;if(P===Hz)return q.ONE_MINUS_SRC_ALPHA;if(P===Zie)return q.DST_ALPHA;if(P===jie)return q.ONE_MINUS_DST_ALPHA;if(P===Kie)return q.DST_COLOR;if(P===Jie)return q.ONE_MINUS_DST_COLOR;if(P===$ie)return q.SRC_ALPHA_SATURATE;if((P===cz||P===fz||P===hz||P===pz)&&(W=We.get("WEBGL_compressed_texture_s3tc"),W!==null)){if(P===cz)return W.COMPRESSED_RGB_S3TC_DXT1_EXT;if(P===fz)return W.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(P===hz)return W.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(P===pz)return W.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((P===dz||P===mz||P===vz||P===gz)&&(W=We.get("WEBGL_compressed_texture_pvrtc"),W!==null)){if(P===dz)return W.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(P===mz)return W.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(P===vz)return W.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(P===gz)return W.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(P===Sne&&(W=We.get("WEBGL_compressed_texture_etc1"),W!==null))return W.COMPRESSED_RGB_ETC1_WEBGL;if((P===oz||P===sz)&&(W=We.get("EXT_blend_minmax"),W!==null)){if(P===oz)return W.MIN_EXT;if(P===sz)return W.MAX_EXT}return P===AS&&(W=We.get("WEBGL_depth_texture"),W!==null)?W.UNSIGNED_INT_24_8_WEBGL:0}}function ty(r,e){this.name="",this.color=new Gt(r),this.density=e!==void 0?e:25e-5}function ry(r,e,t){this.name="",this.color=new Gt(r),this.near=e!==void 0?e:1,this.far=t!==void 0?t:1e3}function Fd(){Et.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function _z(r,e,t,i,n){Et.call(this),this.lensFlares=[],this.positionScreen=new oe,this.customUpdateCallback=void 0,r!==void 0&&this.add(r,e,t,i,n)}function zd(r){mr.call(this),this.type="SpriteMaterial",this.color=new Gt(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(r)}function BS(r){Et.call(this),this.type="Sprite",this.material=r!==void 0?r:new zd}function kS(){Et.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ZA(r,e,t){if(this.useVertexTexture=t!==void 0?t:!0,this.identityMatrix=new qt,r=r||[],this.bones=r.slice(0),this.useVertexTexture){var i=Math.sqrt(this.bones.length*4);i=cr.nextPowerOfTwo(Math.ceil(i)),i=Math.max(i,4),this.boneTextureWidth=i,this.boneTextureHeight=i,this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new Nd(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,su,jg)}else this.boneMatrices=new Float32Array(16*this.bones.length);if(e===void 0)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[];for(var n=0,a=this.bones.length;n=r.HAVE_CURRENT_DATA&&(u.needsUpdate=!0)}c()}function ny(r,e,t,i,n,a,o,s,l,u,c,f){ni.call(this,null,a,o,s,l,u,i,n,c,f),this.image={width:e,height:t},this.mipmaps=r,this.flipY=!1,this.generateMipmaps=!1}function $A(r,e,t,i,n,a,o,s,l){ni.call(this,r,e,t,i,n,a,o,s,l),this.needsUpdate=!0}function GS(r,e,t,i,n,a,o,s,l,u){if(u=u!==void 0?u:Cd,u!==Cd&&u!==Jg)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");t===void 0&&u===Cd&&(t=ES),t===void 0&&u===Jg&&(t=AS),ni.call(this,null,i,n,a,o,s,u,t,l),this.image={width:r,height:e},this.magFilter=o!==void 0?o:Oo,this.minFilter=s!==void 0?s:Oo,this.flipY=!1,this.generateMipmaps=!1}function ay(r){Bt.call(this);var e=[0,0],t={};function i(I,R){return I-R}var n=["a","b","c"];if(r&&r.isGeometry){for(var a=r.vertices,o=r.faces,s=0,l=new Uint32Array(6*o.length),u=0,c=o.length;u65535?ac:nc)(f,1)),this.addAttribute("position",new gr(i,3)),this.addAttribute("uv",new gr(n,2)),this.computeVertexNormals()}function HS(r,e,t){or.call(this),this.type="ParametricGeometry",this.parameters={func:r,slices:e,stacks:t},this.fromBufferGeometry(new oy(r,e,t)),this.mergeVertices()}function no(r,e,t,i){Bt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:r,indices:e,radius:t,detail:i},t=t||1,i=i||0;var n=[],a=[];o(i),l(t),u(),this.addAttribute("position",new gr(n,3)),this.addAttribute("normal",new gr(n.slice(),3)),this.addAttribute("uv",new gr(a,2)),this.normalizeNormals(),this.boundingSphere=new $n(new oe,t);function o(v){for(var _=new oe,y=new oe,x=new oe,M=0;M.9&&S<.1&&(_<.2&&(a[v+0]+=1),y<.2&&(a[v+2]+=1),x<.2&&(a[v+4]+=1))}}function f(v){n.push(v.x,v.y,v.z)}function h(v,_){var y=v*3;_.x=r[y+0],_.y=r[y+1],_.z=r[y+2]}function p(){for(var v=new oe,_=new oe,y=new oe,x=new oe,M=new St,S=new St,w=new St,T=0,C=0;T65535?ac:nc)(d,1)),this.addAttribute("position",new gr(f,3)),this.addAttribute("normal",new gr(h,3)),this.addAttribute("uv",new gr(p,2));function g(){for(u=0;u65535?Uint32Array:Uint16Array)(s),1),u=new gt(new Float32Array(o*3),3),c=new gt(new Float32Array(o*3),3),f=new gt(new Float32Array(o*2),2),h,p,d=0,g=0,m=new oe,v=new oe,_=new St,y=new oe,x=new oe,M=new oe,S=new oe,w=new oe;for(h=0;h<=t;++h){var T=h/t*n*Math.PI*2;for(U(T,n,a,r,y),U(T+.01,n,a,r,x),S.subVectors(x,y),w.addVectors(x,y),M.crossVectors(S,w),w.crossVectors(M,S),M.normalize(),w.normalize(),p=0;p<=i;++p){var C=p/i*Math.PI*2,b=-e*Math.cos(C),E=e*Math.sin(C);m.x=y.x+(b*w.x+E*M.x),m.y=y.y+(b*w.y+E*M.y),m.z=y.z+(b*w.z+E*M.z),u.setXYZ(d,m.x,m.y,m.z),v.subVectors(m,y).normalize(),c.setXYZ(d,v.x,v.y,v.z),_.x=h/t,_.y=p/i,f.setXY(d,_.x,_.y),d++}}for(p=1;p<=t;p++)for(h=1;h<=i;h++){var I=(i+1)*(p-1)+(h-1),R=(i+1)*p+(h-1),A=(i+1)*p+h,D=(i+1)*(p-1)+h;l.setX(g,I),g++,l.setX(g,R),g++,l.setX(g,D),g++,l.setX(g,R),g++,l.setX(g,A),g++,l.setX(g,D),g++}this.setIndex(l),this.addAttribute("position",u),this.addAttribute("normal",c),this.addAttribute("uv",f);function U(B,F,k,G,Y){var J=Math.cos(B),Q=Math.sin(B),V=k/F*B,K=Math.cos(V);Y.x=G*(2+K)*.5*J,Y.y=G*(2+K)*Q*.5,Y.z=G*Math.sin(V)*.5}}function KS(r,e,t,i,n,a,o){or.call(this),this.type="TorusKnotGeometry",this.parameters={radius:r,tube:e,tubularSegments:t,radialSegments:i,p:n,q:a},o!==void 0&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new fy(r,e,t,i,n,a)),this.mergeVertices()}function hy(r,e,t,i,n){Bt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:r,tube:e,radialSegments:t,tubularSegments:i,arc:n},r=r||100,e=e||40,t=Math.floor(t)||8,i=Math.floor(i)||6,n=n||Math.PI*2;var a=(t+1)*(i+1),o=t*i*2*3,s=new(o>65535?Uint32Array:Uint16Array)(o),l=new Float32Array(a*3),u=new Float32Array(a*3),c=new Float32Array(a*2),f=0,h=0,p=0,d=new oe,g=new oe,m=new oe,v,_;for(v=0;v<=t;v++)for(_=0;_<=i;_++){var y=_/i*n,x=v/t*Math.PI*2;g.x=(r+e*Math.cos(x))*Math.cos(y),g.y=(r+e*Math.cos(x))*Math.sin(y),g.z=e*Math.sin(x),l[f]=g.x,l[f+1]=g.y,l[f+2]=g.z,d.x=r*Math.cos(y),d.y=r*Math.sin(y),m.subVectors(g,d).normalize(),u[f]=m.x,u[f+1]=m.y,u[f+2]=m.z,c[h]=_/i,c[h+1]=v/t,f+=3,h+=2}for(v=1;v<=t;v++)for(_=1;_<=i;_++){var M=(i+1)*v+_-1,S=(i+1)*(v-1)+_-1,w=(i+1)*(v-1)+_,T=(i+1)*v+_;s[p]=M,s[p+1]=S,s[p+2]=T,s[p+3]=S,s[p+4]=w,s[p+5]=T,p+=6}this.setIndex(new gt(s,1)),this.addAttribute("position",new gt(l,3)),this.addAttribute("normal",new gt(u,3)),this.addAttribute("uv",new gt(c,2))}function JS(r,e,t,i,n){or.call(this),this.type="TorusGeometry",this.parameters={radius:r,tube:e,radialSegments:t,tubularSegments:i,arc:n},this.fromBufferGeometry(new hy(r,e,t,i,n))}function ws(r,e){if(typeof r>"u"){r=[];return}or.call(this),this.type="ExtrudeGeometry",r=Array.isArray(r)?r:[r],this.addShapeList(r,e),this.computeFaceNormals()}function $S(r,e){e=e||{};var t=e.font;if((t&&t.isFont)===!1)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new or;var i=t.generateShapes(r,e.size,e.curveSegments);e.amount=e.height!==void 0?e.height:50,e.bevelThickness===void 0&&(e.bevelThickness=10),e.bevelSize===void 0&&(e.bevelSize=8),e.bevelEnabled===void 0&&(e.bevelEnabled=!1),ws.call(this,i,e),this.type="TextGeometry"}function kd(r,e,t,i,n,a,o){Bt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:r,widthSegments:e,heightSegments:t,phiStart:i,phiLength:n,thetaStart:a,thetaLength:o},r=r||50,e=Math.max(3,Math.floor(e)||8),t=Math.max(2,Math.floor(t)||6),i=i!==void 0?i:0,n=n!==void 0?n:Math.PI*2,a=a!==void 0?a:0,o=o!==void 0?o:Math.PI;for(var s=a+o,l=(e+1)*(t+1),u=new gt(new Float32Array(l*3),3),c=new gt(new Float32Array(l*3),3),f=new gt(new Float32Array(l*2),2),h=0,p=[],d=new oe,g=0;g<=t;g++){for(var m=[],v=g/t,_=0;_<=e;_++){var y=_/e,x=-r*Math.cos(i+y*n)*Math.sin(a+v*o),M=r*Math.cos(a+v*o),S=r*Math.sin(i+y*n)*Math.sin(a+v*o);d.set(x,M,S).normalize(),u.setXYZ(h,x,M,S),c.setXYZ(h,d.x,d.y,d.z),f.setXY(h,y,1-v),m.push(h),h++}p.push(m)}for(var w=[],g=0;g0)&&w.push(T,C,E),(g!==t-1||s65535?ac:nc)(w,1)),this.addAttribute("position",u),this.addAttribute("normal",c),this.addAttribute("uv",f),this.boundingSphere=new $n(new oe,r)}function QS(r,e,t,i,n,a,o){or.call(this),this.type="SphereGeometry",this.parameters={radius:r,widthSegments:e,heightSegments:t,phiStart:i,phiLength:n,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new kd(r,e,t,i,n,a,o))}function py(r,e,t,i,n,a){Bt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:r,outerRadius:e,thetaSegments:t,phiSegments:i,thetaStart:n,thetaLength:a},r=r||20,e=e||50,n=n!==void 0?n:0,a=a!==void 0?a:Math.PI*2,t=t!==void 0?Math.max(3,t):8,i=i!==void 0?Math.max(1,i):1;var o=(t+1)*(i+1),s=t*i*2*3,l=new gt(new(s>65535?Uint32Array:Uint16Array)(s),1),u=new gt(new Float32Array(o*3),3),c=new gt(new Float32Array(o*3),3),f=new gt(new Float32Array(o*2),2),h=0,p=0,d,g=r,m=(e-r)/i,v=new oe,_=new St,y,x;for(y=0;y<=i;y++){for(x=0;x<=t;x++)d=n+x/t*a,v.x=g*Math.cos(d),v.y=g*Math.sin(d),u.setXYZ(h,v.x,v.y,v.z),c.setXYZ(h,0,0,1),_.x=(v.x/e+1)/2,_.y=(v.y/e+1)/2,f.setXY(h,_.x,_.y),h++;g+=m}for(y=0;y65535?Uint32Array:Uint16Array)(a),1),s=new gt(new Float32Array(n*3),3),l=new gt(new Float32Array(n*2),2),u=0,c=0,f,h=1/e,p=new oe,d=new St,g,m;for(g=0;g<=e;g++){var v=t+g*h*i,_=Math.sin(v),y=Math.cos(v);for(m=0;m<=r.length-1;m++)p.x=r[m].x*_,p.y=r[m].y,p.z=r[m].x*y,s.setXYZ(u,p.x,p.y,p.z),d.x=g/e,d.y=m/(r.length-1),l.setXY(u,d.x,d.y),u++}for(g=0;g65535?ac:nc)(a,1)),this.addAttribute("position",new gr(t,3)),this.addAttribute("normal",new gr(i,3)),this.addAttribute("uv",new gr(n,2));function u(c){var f,h,p,d=t.length/3,g=c.extractPoints(e),m=g.shape,v=g.holes;if(Ln.isClockWise(m)===!1)for(m=m.reverse(),f=0,h=v.length;f0&&u++,e>0&&u++);var c=M(),f=S(),h=new gt(new(f>65535?Uint32Array:Uint16Array)(f),1),p=new gt(new Float32Array(c*3),3),d=new gt(new Float32Array(c*3),3),g=new gt(new Float32Array(c*2),2),m=0,v=0,_=[],y=t/2,x=0;w(),a===!1&&(r>0&&T(!0),e>0&&T(!1)),this.setIndex(h),this.addAttribute("position",p),this.addAttribute("normal",d),this.addAttribute("uv",g);function M(){var C=(i+1)*(n+1);return a===!1&&(C+=(i+1)*u+i*u),C}function S(){var C=i*n*2*3;return a===!1&&(C+=i*u*3),C}function w(){var C,b,E=new oe,I=new oe,R=0,A=(e-r)/t;for(b=0;b<=n;b++){var D=[],U=b/n,B=U*(e-r)+r;for(C=0;C<=i;C++){var F=C/i,k=F*s+o,G=Math.sin(k),Y=Math.cos(k);I.x=B*G,I.y=-U*t+y,I.z=B*Y,p.setXYZ(m,I.x,I.y,I.z),E.set(G,A,Y).normalize(),d.setXYZ(m,E.x,E.y,E.z),g.setXY(m,F,1-U),D.push(m),m++}_.push(D)}for(C=0;Cthis.points.length-2?this.points.length-1:n+1,e[3]=n>this.points.length-3?this.points.length-1:n+2,l=this.points[e[0]],u=this.points[e[1]],c=this.points[e[2]],f=this.points[e[3]],o=a*a,s=a*o,t.x=h(l.x,u.x,c.x,f.x,a,o,s),t.y=h(l.y,u.y,c.y,f.y,a,o,s),t.z=h(l.z,u.z,c.z,f.z,a,o,s),t},this.getControlPointsArray=function(){var p,d,g=this.points.length,m=[];for(p=0;p{"use strict";Number.EPSILON===void 0&&(Number.EPSILON=Math.pow(2,-52));Math.sign===void 0&&(Math.sign=function(r){return r<0?-1:r>0?1:+r});Function.prototype.name===void 0&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}});Object.assign===void 0&&function(){Object.assign=function(r){"use strict";if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(r),t=1;t>4,e[a]=r[a===19?i&3|8:i]);return e.join("")}}(),clamp:function(r,e,t){return Math.max(e,Math.min(t,r))},euclideanModulo:function(r,e){return(r%e+e)%e},mapLinear:function(r,e,t,i,n){return i+(r-e)*(n-i)/(t-e)},lerp:function(r,e,t){return(1-t)*r+t*e},smoothstep:function(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))},smootherstep:function(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))},randInt:function(r,e){return r+Math.floor(Math.random()*(e-r+1))},randFloat:function(r,e){return r+Math.random()*(e-r)},randFloatSpread:function(r){return r*(.5-Math.random())},degToRad:function(r){return r*cr.DEG2RAD},radToDeg:function(r){return r*cr.RAD2DEG},isPowerOfTwo:function(r){return(r&r-1)===0&&r!==0},nearestPowerOfTwo:function(r){return Math.pow(2,Math.round(Math.log(r)/Math.LN2))},nextPowerOfTwo:function(r){return r--,r|=r>>1,r|=r>>2,r|=r>>4,r|=r>>8,r|=r>>16,r++,r}};St.prototype={constructor:St,isVector2:!0,get width(){return this.x},set width(r){this.x=r},get height(){return this.y},set height(r){this.y=r},set:function(r,e){return this.x=r,this.y=e,this},setScalar:function(r){return this.x=r,this.y=r,this},setX:function(r){return this.x=r,this},setY:function(r){return this.y=r,this},setComponent:function(r,e){switch(r){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+r)}return this},getComponent:function(r){switch(r){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+r)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(r){return this.x=r.x,this.y=r.y,this},add:function(r,e){return e!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(r,e)):(this.x+=r.x,this.y+=r.y,this)},addScalar:function(r){return this.x+=r,this.y+=r,this},addVectors:function(r,e){return this.x=r.x+e.x,this.y=r.y+e.y,this},addScaledVector:function(r,e){return this.x+=r.x*e,this.y+=r.y*e,this},sub:function(r,e){return e!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(r,e)):(this.x-=r.x,this.y-=r.y,this)},subScalar:function(r){return this.x-=r,this.y-=r,this},subVectors:function(r,e){return this.x=r.x-e.x,this.y=r.y-e.y,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this},multiplyScalar:function(r){return isFinite(r)?(this.x*=r,this.y*=r):(this.x=0,this.y=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this},divideScalar:function(r){return this.multiplyScalar(1/r)},min:function(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this},max:function(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this},clamp:function(r,e){return this.x=Math.max(r.x,Math.min(e.x,this.x)),this.y=Math.max(r.y,Math.min(e.y,this.y)),this},clampScalar:function(){var r,e;return function(i,n){return r===void 0&&(r=new St,e=new St),r.set(i,i),e.set(n,n),this.clamp(r,e)}}(),clampLength:function(r,e){var t=this.length();return this.multiplyScalar(Math.max(r,Math.min(e,t))/t)},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(r){return this.x*r.x+this.y*r.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var r=Math.atan2(this.y,this.x);return r<0&&(r+=2*Math.PI),r},distanceTo:function(r){return Math.sqrt(this.distanceToSquared(r))},distanceToSquared:function(r){var e=this.x-r.x,t=this.y-r.y;return e*e+t*t},distanceToManhattan:function(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)},setLength:function(r){return this.multiplyScalar(r/this.length())},lerp:function(r,e){return this.x+=(r.x-this.x)*e,this.y+=(r.y-this.y)*e,this},lerpVectors:function(r,e,t){return this.subVectors(e,r).multiplyScalar(t).add(r)},equals:function(r){return r.x===this.x&&r.y===this.y},fromArray:function(r,e){return e===void 0&&(e=0),this.x=r[e],this.y=r[e+1],this},toArray:function(r,e){return r===void 0&&(r=[]),e===void 0&&(e=0),r[e]=this.x,r[e+1]=this.y,r},fromAttribute:function(r,e,t){return t!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromAttribute()."),this.x=r.getX(e),this.y=r.getY(e),this},rotateAround:function(r,e){var t=Math.cos(e),i=Math.sin(e),n=this.x-r.x,a=this.y-r.y;return this.x=n*t-a*i+r.x,this.y=n*i+a*t+r.y,this}};eAe=0;ni.DEFAULT_IMAGE=void 0;ni.DEFAULT_MAPPING=_C;ni.prototype={constructor:ni,isTexture:!0,set needsUpdate(r){r===!0&&this.version++},clone:function(){return new this.constructor().copy(this)},copy:function(r){return this.image=r.image,this.mipmaps=r.mipmaps.slice(0),this.mapping=r.mapping,this.wrapS=r.wrapS,this.wrapT=r.wrapT,this.magFilter=r.magFilter,this.minFilter=r.minFilter,this.anisotropy=r.anisotropy,this.format=r.format,this.type=r.type,this.offset.copy(r.offset),this.repeat.copy(r.repeat),this.generateMipmaps=r.generateMipmaps,this.premultiplyAlpha=r.premultiplyAlpha,this.flipY=r.flipY,this.unpackAlignment=r.unpackAlignment,this.encoding=r.encoding,this},toJSON:function(r){if(r.textures[this.uuid]!==void 0)return r.textures[this.uuid];function e(n){var a;return n.toDataURL!==void 0?a=n:(a=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),a.width=n.width,a.height=n.height,a.getContext("2d").drawImage(n,0,0,n.width,n.height)),a.width>2048||a.height>2048?a.toDataURL("image/jpeg",.6):a.toDataURL("image/png")}var t={metadata:{version:4.4,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(this.image!==void 0){var i=this.image;i.uuid===void 0&&(i.uuid=cr.generateUUID()),r.images[i.uuid]===void 0&&(r.images[i.uuid]={uuid:i.uuid,url:e(i)}),t.image=i.uuid}return r.textures[this.uuid]=t,t},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(r){if(this.mapping===_C){if(r.multiply(this.repeat),r.add(this.offset),r.x<0||r.x>1)switch(this.wrapS){case ic:r.x=r.x-Math.floor(r.x);break;case Uo:r.x=r.x<0?0:1;break;case Dd:Math.abs(Math.floor(r.x)%2)===1?r.x=Math.ceil(r.x)-r.x:r.x=r.x-Math.floor(r.x);break}if(r.y<0||r.y>1)switch(this.wrapT){case ic:r.y=r.y-Math.floor(r.y);break;case Uo:r.y=r.y<0?0:1;break;case Dd:Math.abs(Math.floor(r.y)%2)===1?r.y=Math.ceil(r.y)-r.y:r.y=r.y-Math.floor(r.y);break}this.flipY&&(r.y=1-r.y)}}};Object.assign(ni.prototype,Ms.prototype);Qr.prototype={constructor:Qr,isVector4:!0,set:function(r,e,t,i){return this.x=r,this.y=e,this.z=t,this.w=i,this},setScalar:function(r){return this.x=r,this.y=r,this.z=r,this.w=r,this},setX:function(r){return this.x=r,this},setY:function(r){return this.y=r,this},setZ:function(r){return this.z=r,this},setW:function(r){return this.w=r,this},setComponent:function(r,e){switch(r){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+r)}return this},getComponent:function(r){switch(r){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: "+r)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(r){return this.x=r.x,this.y=r.y,this.z=r.z,this.w=r.w!==void 0?r.w:1,this},add:function(r,e){return e!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(r,e)):(this.x+=r.x,this.y+=r.y,this.z+=r.z,this.w+=r.w,this)},addScalar:function(r){return this.x+=r,this.y+=r,this.z+=r,this.w+=r,this},addVectors:function(r,e){return this.x=r.x+e.x,this.y=r.y+e.y,this.z=r.z+e.z,this.w=r.w+e.w,this},addScaledVector:function(r,e){return this.x+=r.x*e,this.y+=r.y*e,this.z+=r.z*e,this.w+=r.w*e,this},sub:function(r,e){return e!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(r,e)):(this.x-=r.x,this.y-=r.y,this.z-=r.z,this.w-=r.w,this)},subScalar:function(r){return this.x-=r,this.y-=r,this.z-=r,this.w-=r,this},subVectors:function(r,e){return this.x=r.x-e.x,this.y=r.y-e.y,this.z=r.z-e.z,this.w=r.w-e.w,this},multiplyScalar:function(r){return isFinite(r)?(this.x*=r,this.y*=r,this.z*=r,this.w*=r):(this.x=0,this.y=0,this.z=0,this.w=0),this},applyMatrix4:function(r){var e=this.x,t=this.y,i=this.z,n=this.w,a=r.elements;return this.x=a[0]*e+a[4]*t+a[8]*i+a[12]*n,this.y=a[1]*e+a[5]*t+a[9]*i+a[13]*n,this.z=a[2]*e+a[6]*t+a[10]*i+a[14]*n,this.w=a[3]*e+a[7]*t+a[11]*i+a[15]*n,this},divideScalar:function(r){return this.multiplyScalar(1/r)},setAxisAngleFromQuaternion:function(r){this.w=2*Math.acos(r.w);var e=Math.sqrt(1-r.w*r.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=r.x/e,this.y=r.y/e,this.z=r.z/e),this},setAxisAngleFromRotationMatrix:function(r){var e,t,i,n,a=.01,o=.1,s=r.elements,l=s[0],u=s[4],c=s[8],f=s[1],h=s[5],p=s[9],d=s[2],g=s[6],m=s[10];if(Math.abs(u-f)_&&v>y?vy?_0?(h=.5/Math.sqrt(f+1),this._w=.25/h,this._x=(u-s)*h,this._y=(n-l)*h,this._z=(a-i)*h):t>o&&t>c?(h=2*Math.sqrt(1+t-o-c),this._w=(u-s)/h,this._x=.25*h,this._y=(i+a)/h,this._z=(n+l)/h):o>c?(h=2*Math.sqrt(1+o-t-c),this._w=(n-l)/h,this._x=(i+a)/h,this._y=.25*h,this._z=(s+u)/h):(h=2*Math.sqrt(1+c-t-o),this._w=(a-i)/h,this._x=(n+l)/h,this._y=(s+u)/h,this._z=.25*h),this.onChangeCallback(),this},setFromUnitVectors:function(){var r,e,t=1e-6;return function(n,a){return r===void 0&&(r=new oe),e=n.dot(a)+1,eMath.abs(n.z)?r.set(-n.y,n.x,0):r.set(0,-n.z,n.y)):r.crossVectors(n,a),this._x=r.x,this._y=r.y,this._z=r.z,this._w=e,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(r){return this._x*r._x+this._y*r._y+this._z*r._z+this._w*r._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var r=this.length();return r===0?(this._x=0,this._y=0,this._z=0,this._w=1):(r=1/r,this._x=this._x*r,this._y=this._y*r,this._z=this._z*r,this._w=this._w*r),this.onChangeCallback(),this},multiply:function(r,e){return e!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(r,e)):this.multiplyQuaternions(this,r)},premultiply:function(r){return this.multiplyQuaternions(r,this)},multiplyQuaternions:function(r,e){var t=r._x,i=r._y,n=r._z,a=r._w,o=e._x,s=e._y,l=e._z,u=e._w;return this._x=t*u+a*o+i*l-n*s,this._y=i*u+a*s+n*o-t*l,this._z=n*u+a*l+t*s-i*o,this._w=a*u-t*o-i*s-n*l,this.onChangeCallback(),this},slerp:function(r,e){if(e===0)return this;if(e===1)return this.copy(r);var t=this._x,i=this._y,n=this._z,a=this._w,o=a*r._w+t*r._x+i*r._y+n*r._z;if(o<0?(this._w=-r._w,this._x=-r._x,this._y=-r._y,this._z=-r._z,o=-o):this.copy(r),o>=1)return this._w=a,this._x=t,this._y=i,this._z=n,this;var s=Math.sqrt(1-o*o);if(Math.abs(s)<.001)return this._w=.5*(a+this._w),this._x=.5*(t+this._x),this._y=.5*(i+this._y),this._z=.5*(n+this._z),this;var l=Math.atan2(s,o),u=Math.sin((1-e)*l)/s,c=Math.sin(e*l)/s;return this._w=a*u+this._w*c,this._x=t*u+this._x*c,this._y=i*u+this._y*c,this._z=n*u+this._z*c,this.onChangeCallback(),this},equals:function(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._w===this._w},fromArray:function(r,e){return e===void 0&&(e=0),this._x=r[e],this._y=r[e+1],this._z=r[e+2],this._w=r[e+3],this.onChangeCallback(),this},toArray:function(r,e){return r===void 0&&(r=[]),e===void 0&&(e=0),r[e]=this._x,r[e+1]=this._y,r[e+2]=this._z,r[e+3]=this._w,r},onChange:function(r){return this.onChangeCallback=r,this},onChangeCallback:function(){}};Object.assign(on,{slerp:function(r,e,t,i){return t.copy(r).slerp(e,i)},slerpFlat:function(r,e,t,i,n,a,o){var s=t[i+0],l=t[i+1],u=t[i+2],c=t[i+3],f=n[a+0],h=n[a+1],p=n[a+2],d=n[a+3];if(c!==d||s!==f||l!==h||u!==p){var g=1-o,m=s*f+l*h+u*p+c*d,v=m>=0?1:-1,_=1-m*m;if(_>Number.EPSILON){var y=Math.sqrt(_),x=Math.atan2(y,m*v);g=Math.sin(g*x)/y,o=Math.sin(o*x)/y}var M=o*v;if(s=s*g+f*M,l=l*g+h*M,u=u*g+p*M,c=c*g+d*M,g===1-o){var S=1/Math.sqrt(s*s+l*l+u*u+c*c);s*=S,l*=S,u*=S,c*=S}}r[e]=s,r[e+1]=l,r[e+2]=u,r[e+3]=c}});oe.prototype={constructor:oe,isVector3:!0,set:function(r,e,t){return this.x=r,this.y=e,this.z=t,this},setScalar:function(r){return this.x=r,this.y=r,this.z=r,this},setX:function(r){return this.x=r,this},setY:function(r){return this.y=r,this},setZ:function(r){return this.z=r,this},setComponent:function(r,e){switch(r){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+r)}return this},getComponent:function(r){switch(r){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+r)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(r){return this.x=r.x,this.y=r.y,this.z=r.z,this},add:function(r,e){return e!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(r,e)):(this.x+=r.x,this.y+=r.y,this.z+=r.z,this)},addScalar:function(r){return this.x+=r,this.y+=r,this.z+=r,this},addVectors:function(r,e){return this.x=r.x+e.x,this.y=r.y+e.y,this.z=r.z+e.z,this},addScaledVector:function(r,e){return this.x+=r.x*e,this.y+=r.y*e,this.z+=r.z*e,this},sub:function(r,e){return e!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(r,e)):(this.x-=r.x,this.y-=r.y,this.z-=r.z,this)},subScalar:function(r){return this.x-=r,this.y-=r,this.z-=r,this},subVectors:function(r,e){return this.x=r.x-e.x,this.y=r.y-e.y,this.z=r.z-e.z,this},multiply:function(r,e){return e!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(r,e)):(this.x*=r.x,this.y*=r.y,this.z*=r.z,this)},multiplyScalar:function(r){return isFinite(r)?(this.x*=r,this.y*=r,this.z*=r):(this.x=0,this.y=0,this.z=0),this},multiplyVectors:function(r,e){return this.x=r.x*e.x,this.y=r.y*e.y,this.z=r.z*e.z,this},applyEuler:function(){var r;return function(t){return(t&&t.isEuler)===!1&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),r===void 0&&(r=new on),this.applyQuaternion(r.setFromEuler(t))}}(),applyAxisAngle:function(){var r;return function(t,i){return r===void 0&&(r=new on),this.applyQuaternion(r.setFromAxisAngle(t,i))}}(),applyMatrix3:function(r){var e=this.x,t=this.y,i=this.z,n=r.elements;return this.x=n[0]*e+n[3]*t+n[6]*i,this.y=n[1]*e+n[4]*t+n[7]*i,this.z=n[2]*e+n[5]*t+n[8]*i,this},applyMatrix4:function(r){var e=this.x,t=this.y,i=this.z,n=r.elements;return this.x=n[0]*e+n[4]*t+n[8]*i+n[12],this.y=n[1]*e+n[5]*t+n[9]*i+n[13],this.z=n[2]*e+n[6]*t+n[10]*i+n[14],this},applyProjection:function(r){var e=this.x,t=this.y,i=this.z,n=r.elements,a=1/(n[3]*e+n[7]*t+n[11]*i+n[15]);return this.x=(n[0]*e+n[4]*t+n[8]*i+n[12])*a,this.y=(n[1]*e+n[5]*t+n[9]*i+n[13])*a,this.z=(n[2]*e+n[6]*t+n[10]*i+n[14])*a,this},applyQuaternion:function(r){var e=this.x,t=this.y,i=this.z,n=r.x,a=r.y,o=r.z,s=r.w,l=s*e+a*i-o*t,u=s*t+o*e-n*i,c=s*i+n*t-a*e,f=-n*e-a*t-o*i;return this.x=l*s+f*-n+u*-o-c*-a,this.y=u*s+f*-a+c*-n-l*-o,this.z=c*s+f*-o+l*-a-u*-n,this},project:function(){var r;return function(t){return r===void 0&&(r=new qt),r.multiplyMatrices(t.projectionMatrix,r.getInverse(t.matrixWorld)),this.applyProjection(r)}}(),unproject:function(){var r;return function(t){return r===void 0&&(r=new qt),r.multiplyMatrices(t.matrixWorld,r.getInverse(t.projectionMatrix)),this.applyProjection(r)}}(),transformDirection:function(r){var e=this.x,t=this.y,i=this.z,n=r.elements;return this.x=n[0]*e+n[4]*t+n[8]*i,this.y=n[1]*e+n[5]*t+n[9]*i,this.z=n[2]*e+n[6]*t+n[10]*i,this.normalize()},divide:function(r){return this.x/=r.x,this.y/=r.y,this.z/=r.z,this},divideScalar:function(r){return this.multiplyScalar(1/r)},min:function(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this},max:function(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this},clamp:function(r,e){return this.x=Math.max(r.x,Math.min(e.x,this.x)),this.y=Math.max(r.y,Math.min(e.y,this.y)),this.z=Math.max(r.z,Math.min(e.z,this.z)),this},clampScalar:function(){var r,e;return function(i,n){return r===void 0&&(r=new oe,e=new oe),r.set(i,i,i),e.set(n,n,n),this.clamp(r,e)}}(),clampLength:function(r,e){var t=this.length();return this.multiplyScalar(Math.max(r,Math.min(e,t))/t)},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(r){return this.x*r.x+this.y*r.y+this.z*r.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(r){return this.multiplyScalar(r/this.length())},lerp:function(r,e){return this.x+=(r.x-this.x)*e,this.y+=(r.y-this.y)*e,this.z+=(r.z-this.z)*e,this},lerpVectors:function(r,e,t){return this.subVectors(e,r).multiplyScalar(t).add(r)},cross:function(r,e){if(e!==void 0)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(r,e);var t=this.x,i=this.y,n=this.z;return this.x=i*r.z-n*r.y,this.y=n*r.x-t*r.z,this.z=t*r.y-i*r.x,this},crossVectors:function(r,e){var t=r.x,i=r.y,n=r.z,a=e.x,o=e.y,s=e.z;return this.x=i*s-n*o,this.y=n*a-t*s,this.z=t*o-i*a,this},projectOnVector:function(r){var e=r.dot(this)/r.lengthSq();return this.copy(r).multiplyScalar(e)},projectOnPlane:function(){var r;return function(t){return r===void 0&&(r=new oe),r.copy(this).projectOnVector(t),this.sub(r)}}(),reflect:function(){var r;return function(t){return r===void 0&&(r=new oe),this.sub(r.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(r){var e=this.dot(r)/Math.sqrt(this.lengthSq()*r.lengthSq());return Math.acos(cr.clamp(e,-1,1))},distanceTo:function(r){return Math.sqrt(this.distanceToSquared(r))},distanceToSquared:function(r){var e=this.x-r.x,t=this.y-r.y,i=this.z-r.z;return e*e+t*t+i*i},distanceToManhattan:function(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)+Math.abs(this.z-r.z)},setFromSpherical:function(r){var e=Math.sin(r.phi)*r.radius;return this.x=e*Math.sin(r.theta),this.y=Math.cos(r.phi)*r.radius,this.z=e*Math.cos(r.theta),this},setFromCylindrical:function(r){return this.x=r.radius*Math.sin(r.theta),this.y=r.y,this.z=r.radius*Math.cos(r.theta),this},setFromMatrixPosition:function(r){return this.setFromMatrixColumn(r,3)},setFromMatrixScale:function(r){var e=this.setFromMatrixColumn(r,0).length(),t=this.setFromMatrixColumn(r,1).length(),i=this.setFromMatrixColumn(r,2).length();return this.x=e,this.y=t,this.z=i,this},setFromMatrixColumn:function(r,e){if(typeof r=="number"){console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");var t=r;r=e,e=t}return this.fromArray(r.elements,e*4)},equals:function(r){return r.x===this.x&&r.y===this.y&&r.z===this.z},fromArray:function(r,e){return e===void 0&&(e=0),this.x=r[e],this.y=r[e+1],this.z=r[e+2],this},toArray:function(r,e){return r===void 0&&(r=[]),e===void 0&&(e=0),r[e]=this.x,r[e+1]=this.y,r[e+2]=this.z,r},fromAttribute:function(r,e,t){return t!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromAttribute()."),this.x=r.getX(e),this.y=r.getY(e),this.z=r.getZ(e),this}};qt.prototype={constructor:qt,isMatrix4:!0,set:function(r,e,t,i,n,a,o,s,l,u,c,f,h,p,d,g){var m=this.elements;return m[0]=r,m[4]=e,m[8]=t,m[12]=i,m[1]=n,m[5]=a,m[9]=o,m[13]=s,m[2]=l,m[6]=u,m[10]=c,m[14]=f,m[3]=h,m[7]=p,m[11]=d,m[15]=g,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return new qt().fromArray(this.elements)},copy:function(r){return this.elements.set(r.elements),this},copyPosition:function(r){var e=this.elements,t=r.elements;return e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractBasis:function(r,e,t){return r.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),t.setFromMatrixColumn(this,2),this},makeBasis:function(r,e,t){return this.set(r.x,e.x,t.x,0,r.y,e.y,t.y,0,r.z,e.z,t.z,0,0,0,0,1),this},extractRotation:function(){var r;return function(t){r===void 0&&(r=new oe);var i=this.elements,n=t.elements,a=1/r.setFromMatrixColumn(t,0).length(),o=1/r.setFromMatrixColumn(t,1).length(),s=1/r.setFromMatrixColumn(t,2).length();return i[0]=n[0]*a,i[1]=n[1]*a,i[2]=n[2]*a,i[4]=n[4]*o,i[5]=n[5]*o,i[6]=n[6]*o,i[8]=n[8]*s,i[9]=n[9]*s,i[10]=n[10]*s,this}}(),makeRotationFromEuler:function(r){(r&&r.isEuler)===!1&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,t=r.x,i=r.y,n=r.z,a=Math.cos(t),o=Math.sin(t),s=Math.cos(i),l=Math.sin(i),u=Math.cos(n),c=Math.sin(n);if(r.order==="XYZ"){var f=a*u,h=a*c,p=o*u,d=o*c;e[0]=s*u,e[4]=-s*c,e[8]=l,e[1]=h+p*l,e[5]=f-d*l,e[9]=-o*s,e[2]=d-f*l,e[6]=p+h*l,e[10]=a*s}else if(r.order==="YXZ"){var g=s*u,m=s*c,v=l*u,_=l*c;e[0]=g+_*o,e[4]=v*o-m,e[8]=a*l,e[1]=a*c,e[5]=a*u,e[9]=-o,e[2]=m*o-v,e[6]=_+g*o,e[10]=a*s}else if(r.order==="ZXY"){var g=s*u,m=s*c,v=l*u,_=l*c;e[0]=g-_*o,e[4]=-a*c,e[8]=v+m*o,e[1]=m+v*o,e[5]=a*u,e[9]=_-g*o,e[2]=-a*l,e[6]=o,e[10]=a*s}else if(r.order==="ZYX"){var f=a*u,h=a*c,p=o*u,d=o*c;e[0]=s*u,e[4]=p*l-h,e[8]=f*l+d,e[1]=s*c,e[5]=d*l+f,e[9]=h*l-p,e[2]=-l,e[6]=o*s,e[10]=a*s}else if(r.order==="YZX"){var y=a*s,x=a*l,M=o*s,S=o*l;e[0]=s*u,e[4]=S-y*c,e[8]=M*c+x,e[1]=c,e[5]=a*u,e[9]=-o*u,e[2]=-l*u,e[6]=x*c+M,e[10]=y-S*c}else if(r.order==="XZY"){var y=a*s,x=a*l,M=o*s,S=o*l;e[0]=s*u,e[4]=-c,e[8]=l*u,e[1]=y*c+S,e[5]=a*u,e[9]=x*c-M,e[2]=M*c-x,e[6]=o*u,e[10]=S*c+y}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(r){var e=this.elements,t=r.x,i=r.y,n=r.z,a=r.w,o=t+t,s=i+i,l=n+n,u=t*o,c=t*s,f=t*l,h=i*s,p=i*l,d=n*l,g=a*o,m=a*s,v=a*l;return e[0]=1-(h+d),e[4]=c-v,e[8]=f+m,e[1]=c+v,e[5]=1-(u+d),e[9]=p-g,e[2]=f-m,e[6]=p+g,e[10]=1-(u+h),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var r,e,t;return function(n,a,o){r===void 0&&(r=new oe,e=new oe,t=new oe);var s=this.elements;return t.subVectors(n,a).normalize(),t.lengthSq()===0&&(t.z=1),r.crossVectors(o,t).normalize(),r.lengthSq()===0&&(t.z+=1e-4,r.crossVectors(o,t).normalize()),e.crossVectors(t,r),s[0]=r.x,s[4]=e.x,s[8]=t.x,s[1]=r.y,s[5]=e.y,s[9]=t.y,s[2]=r.z,s[6]=e.z,s[10]=t.z,this}}(),multiply:function(r,e){return e!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(r,e)):this.multiplyMatrices(this,r)},premultiply:function(r){return this.multiplyMatrices(r,this)},multiplyMatrices:function(r,e){var t=r.elements,i=e.elements,n=this.elements,a=t[0],o=t[4],s=t[8],l=t[12],u=t[1],c=t[5],f=t[9],h=t[13],p=t[2],d=t[6],g=t[10],m=t[14],v=t[3],_=t[7],y=t[11],x=t[15],M=i[0],S=i[4],w=i[8],T=i[12],C=i[1],b=i[5],E=i[9],I=i[13],R=i[2],A=i[6],D=i[10],U=i[14],B=i[3],F=i[7],k=i[11],G=i[15];return n[0]=a*M+o*C+s*R+l*B,n[4]=a*S+o*b+s*A+l*F,n[8]=a*w+o*E+s*D+l*k,n[12]=a*T+o*I+s*U+l*G,n[1]=u*M+c*C+f*R+h*B,n[5]=u*S+c*b+f*A+h*F,n[9]=u*w+c*E+f*D+h*k,n[13]=u*T+c*I+f*U+h*G,n[2]=p*M+d*C+g*R+m*B,n[6]=p*S+d*b+g*A+m*F,n[10]=p*w+d*E+g*D+m*k,n[14]=p*T+d*I+g*U+m*G,n[3]=v*M+_*C+y*R+x*B,n[7]=v*S+_*b+y*A+x*F,n[11]=v*w+_*E+y*D+x*k,n[15]=v*T+_*I+y*U+x*G,this},multiplyToArray:function(r,e,t){var i=this.elements;return this.multiplyMatrices(r,e),t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this},multiplyScalar:function(r){var e=this.elements;return e[0]*=r,e[4]*=r,e[8]*=r,e[12]*=r,e[1]*=r,e[5]*=r,e[9]*=r,e[13]*=r,e[2]*=r,e[6]*=r,e[10]*=r,e[14]*=r,e[3]*=r,e[7]*=r,e[11]*=r,e[15]*=r,this},applyToVector3Array:function(){var r;return function(t,i,n){r===void 0&&(r=new oe),i===void 0&&(i=0),n===void 0&&(n=t.length);for(var a=0,o=i;a 0.0 ) { +#if defined ( PHYSICALLY_CORRECT_LIGHTS ) + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + float maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + return distanceFalloff * maxDistanceCutoffFactor; +#else + return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent ); +#endif + } + return 1.0; +} +vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) { + float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH ); + return ( 1.0 - specularColor ) * fresnel + specularColor; +} +float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + return 1.0 / ( gl * gv ); +} +float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) { + float alpha = pow2( roughness ); + vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir ); + float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) ); + float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) ); + float dotNH = saturate( dot( geometry.normal, halfDir ) ); + float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); + vec3 F = F_Schlick( specularColor, dotLH ); + float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( G * D ); +} +vec2 ltcTextureCoords( const in GeometricContext geometry, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = (LUT_SIZE - 1.0)/LUT_SIZE; + const float LUT_BIAS = 0.5/LUT_SIZE; + vec3 N = geometry.normal; + vec3 V = geometry.viewDir; + vec3 P = geometry.position; + float theta = acos( dot( N, V ) ); + vec2 uv = vec2( + sqrt( saturate( roughness ) ), + saturate( theta / ( 0.5 * PI ) ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +void clipQuadToHorizon( inout vec3 L[5], out int n ) { + int config = 0; + if ( L[0].z > 0.0 ) config += 1; + if ( L[1].z > 0.0 ) config += 2; + if ( L[2].z > 0.0 ) config += 4; + if ( L[3].z > 0.0 ) config += 8; + n = 0; + if ( config == 0 ) { + } else if ( config == 1 ) { + n = 3; + L[1] = -L[1].z * L[0] + L[0].z * L[1]; + L[2] = -L[3].z * L[0] + L[0].z * L[3]; + } else if ( config == 2 ) { + n = 3; + L[0] = -L[0].z * L[1] + L[1].z * L[0]; + L[2] = -L[2].z * L[1] + L[1].z * L[2]; + } else if ( config == 3 ) { + n = 4; + L[2] = -L[2].z * L[1] + L[1].z * L[2]; + L[3] = -L[3].z * L[0] + L[0].z * L[3]; + } else if ( config == 4 ) { + n = 3; + L[0] = -L[3].z * L[2] + L[2].z * L[3]; + L[1] = -L[1].z * L[2] + L[2].z * L[1]; + } else if ( config == 5 ) { + n = 0; + } else if ( config == 6 ) { + n = 4; + L[0] = -L[0].z * L[1] + L[1].z * L[0]; + L[3] = -L[3].z * L[2] + L[2].z * L[3]; + } else if ( config == 7 ) { + n = 5; + L[4] = -L[3].z * L[0] + L[0].z * L[3]; + L[3] = -L[3].z * L[2] + L[2].z * L[3]; + } else if ( config == 8 ) { + n = 3; + L[0] = -L[0].z * L[3] + L[3].z * L[0]; + L[1] = -L[2].z * L[3] + L[3].z * L[2]; + L[2] = L[3]; + } else if ( config == 9 ) { + n = 4; + L[1] = -L[1].z * L[0] + L[0].z * L[1]; + L[2] = -L[2].z * L[3] + L[3].z * L[2]; + } else if ( config == 10 ) { + n = 0; + } else if ( config == 11 ) { + n = 5; + L[4] = L[3]; + L[3] = -L[2].z * L[3] + L[3].z * L[2]; + L[2] = -L[2].z * L[1] + L[1].z * L[2]; + } else if ( config == 12 ) { + n = 4; + L[1] = -L[1].z * L[2] + L[2].z * L[1]; + L[0] = -L[0].z * L[3] + L[3].z * L[0]; + } else if ( config == 13 ) { + n = 5; + L[4] = L[3]; + L[3] = L[2]; + L[2] = -L[1].z * L[2] + L[2].z * L[1]; + L[1] = -L[1].z * L[0] + L[0].z * L[1]; + } else if ( config == 14 ) { + n = 5; + L[4] = -L[0].z * L[3] + L[3].z * L[0]; + L[0] = -L[0].z * L[1] + L[1].z * L[0]; + } else if ( config == 15 ) { + n = 4; + } + if ( n == 3 ) + L[3] = L[0]; + if ( n == 4 ) + L[4] = L[0]; +} +float integrateLtcBrdfOverRectEdge( vec3 v1, vec3 v2 ) { + float cosTheta = dot( v1, v2 ); + float theta = acos( cosTheta ); + float res = cross( v1, v2 ).z * ( ( theta > 0.001 ) ? theta / sin( theta ) : 1.0 ); + return res; +} +void initRectPoints( const in vec3 pos, const in vec3 halfWidth, const in vec3 halfHeight, out vec3 rectPoints[4] ) { + rectPoints[0] = pos - halfWidth - halfHeight; + rectPoints[1] = pos + halfWidth - halfHeight; + rectPoints[2] = pos + halfWidth + halfHeight; + rectPoints[3] = pos - halfWidth + halfHeight; +} +vec3 integrateLtcBrdfOverRect( const in GeometricContext geometry, const in mat3 brdfMat, const in vec3 rectPoints[4] ) { + vec3 N = geometry.normal; + vec3 V = geometry.viewDir; + vec3 P = geometry.position; + vec3 T1, T2; + T1 = normalize(V - N * dot( V, N )); + T2 = - cross( N, T1 ); + mat3 brdfWrtSurface = brdfMat * transpose( mat3( T1, T2, N ) ); + vec3 clippedRect[5]; + clippedRect[0] = brdfWrtSurface * ( rectPoints[0] - P ); + clippedRect[1] = brdfWrtSurface * ( rectPoints[1] - P ); + clippedRect[2] = brdfWrtSurface * ( rectPoints[2] - P ); + clippedRect[3] = brdfWrtSurface * ( rectPoints[3] - P ); + int n; + clipQuadToHorizon(clippedRect, n); + if ( n == 0 ) + return vec3( 0, 0, 0 ); + clippedRect[0] = normalize( clippedRect[0] ); + clippedRect[1] = normalize( clippedRect[1] ); + clippedRect[2] = normalize( clippedRect[2] ); + clippedRect[3] = normalize( clippedRect[3] ); + clippedRect[4] = normalize( clippedRect[4] ); + float sum = 0.0; + sum += integrateLtcBrdfOverRectEdge( clippedRect[0], clippedRect[1] ); + sum += integrateLtcBrdfOverRectEdge( clippedRect[1], clippedRect[2] ); + sum += integrateLtcBrdfOverRectEdge( clippedRect[2], clippedRect[3] ); + if (n >= 4) + sum += integrateLtcBrdfOverRectEdge( clippedRect[3], clippedRect[4] ); + if (n == 5) + sum += integrateLtcBrdfOverRectEdge( clippedRect[4], clippedRect[0] ); + sum = max( 0.0, sum ); + vec3 Lo_i = vec3( sum, sum, sum ); + return Lo_i; +} +vec3 Rect_Area_Light_Specular_Reflectance( + const in GeometricContext geometry, + const in vec3 lightPos, const in vec3 lightHalfWidth, const in vec3 lightHalfHeight, + const in float roughness, + const in sampler2D ltcMat, const in sampler2D ltcMag ) { + vec3 rectPoints[4]; + initRectPoints( lightPos, lightHalfWidth, lightHalfHeight, rectPoints ); + vec2 uv = ltcTextureCoords( geometry, roughness ); + vec4 brdfLtcApproxParams, t; + brdfLtcApproxParams = texture2D( ltcMat, uv ); + t = texture2D( ltcMat, uv ); + float brdfLtcScalar = texture2D( ltcMag, uv ).a; + mat3 brdfLtcApproxMat = mat3( + vec3( 1, 0, t.y ), + vec3( 0, t.z, 0 ), + vec3( t.w, 0, t.x ) + ); + vec3 specularReflectance = integrateLtcBrdfOverRect( geometry, brdfLtcApproxMat, rectPoints ); + specularReflectance *= brdfLtcScalar; + return specularReflectance; +} +vec3 Rect_Area_Light_Diffuse_Reflectance( + const in GeometricContext geometry, + const in vec3 lightPos, const in vec3 lightHalfWidth, const in vec3 lightHalfHeight ) { + vec3 rectPoints[4]; + initRectPoints( lightPos, lightHalfWidth, lightHalfHeight, rectPoints ); + mat3 diffuseBrdfMat = mat3(1); + vec3 diffuseReflectance = integrateLtcBrdfOverRect( geometry, diffuseBrdfMat, rectPoints ); + return diffuseReflectance; +} +vec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) { + float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw; + return specularColor * AB.x + AB.y; +} +float G_BlinnPhong_Implicit( ) { + return 0.25; +} +float D_BlinnPhong( const in float shininess, const in float dotNH ) { + return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); +} +vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) { + vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir ); + float dotNH = saturate( dot( geometry.normal, halfDir ) ); + float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); + vec3 F = F_Schlick( specularColor, dotLH ); + float G = G_BlinnPhong_Implicit( ); + float D = D_BlinnPhong( shininess, dotNH ); + return F * ( G * D ); +} +float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) { + return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 ); +} +float BlinnExponentToGGXRoughness( const in float blinnExponent ) { + return sqrt( 2.0 / ( blinnExponent + 2.0 ) ); +} +`,NAe=`#ifdef USE_BUMPMAP + uniform sampler2D bumpMap; + uniform float bumpScale; + vec2 dHdxy_fwd() { + vec2 dSTdx = dFdx( vUv ); + vec2 dSTdy = dFdy( vUv ); + float Hll = bumpScale * texture2D( bumpMap, vUv ).x; + float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; + float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; + return vec2( dBx, dBy ); + } + vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) { + vec3 vSigmaX = dFdx( surf_pos ); + vec3 vSigmaY = dFdy( surf_pos ); + vec3 vN = surf_norm; + vec3 R1 = cross( vSigmaY, vN ); + vec3 R2 = cross( vN, vSigmaX ); + float fDet = dot( vSigmaX, R1 ); + vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); + return normalize( abs( fDet ) * surf_norm - vGrad ); + } +#endif +`,UAe=`#if NUM_CLIPPING_PLANES > 0 + for ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) { + vec4 plane = clippingPlanes[ i ]; + if ( dot( vViewPosition, plane.xyz ) > plane.w ) discard; + } + + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) { + vec4 plane = clippingPlanes[ i ]; + clipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped; + } + if ( clipped ) discard; + + #endif +#endif +`,OAe=`#if NUM_CLIPPING_PLANES > 0 + #if ! defined( PHYSICAL ) && ! defined( PHONG ) + varying vec3 vViewPosition; + #endif + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif +`,FAe=`#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) + varying vec3 vViewPosition; +#endif +`,zAe=`#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) + vViewPosition = - mvPosition.xyz; +#endif +`,BAe=`#ifdef USE_COLOR + diffuseColor.rgb *= vColor; +#endif`,kAe=`#ifdef USE_COLOR + varying vec3 vColor; +#endif +`,VAe=`#ifdef USE_COLOR + varying vec3 vColor; +#endif`,GAe=`#ifdef USE_COLOR + vColor.xyz = color.xyz; +#endif`,HAe=`#define PI 3.14159265359 +#define PI2 6.28318530718 +#define PI_HALF 1.5707963267949 +#define RECIPROCAL_PI 0.31830988618 +#define RECIPROCAL_PI2 0.15915494 +#define LOG2 1.442695 +#define EPSILON 1e-6 +#define saturate(a) clamp( a, 0.0, 1.0 ) +#define whiteCompliment(a) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract(sin(sn) * c); +} +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +struct GeometricContext { + vec3 position; + vec3 normal; + vec3 viewDir; +}; +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { + float distance = dot( planeNormal, point - pointOnPlane ); + return - distance * planeNormal + point; +} +float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { + return sign( dot( point - pointOnPlane, planeNormal ) ); +} +vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) { + return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine; +} +mat3 transpose( const in mat3 v ) { + mat3 tmp; + tmp[0] = vec3(v[0].x, v[1].x, v[2].x); + tmp[1] = vec3(v[0].y, v[1].y, v[2].y); + tmp[2] = vec3(v[0].z, v[1].z, v[2].z); + return tmp; +} +`,WAe=`#ifdef ENVMAP_TYPE_CUBE_UV +#define cubeUV_textureSize (1024.0) +int getFaceFromDirection(vec3 direction) { + vec3 absDirection = abs(direction); + int face = -1; + if( absDirection.x > absDirection.z ) { + if(absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0 : 3; + else + face = direction.y > 0.0 ? 1 : 4; + } + else { + if(absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2 : 5; + else + face = direction.y > 0.0 ? 1 : 4; + } + return face; +} +#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0) +#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0)) +vec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) { + float scale = exp2(cubeUV_maxLods1 - roughnessLevel); + float dxRoughness = dFdx(roughness); + float dyRoughness = dFdy(roughness); + vec3 dx = dFdx( vec * scale * dxRoughness ); + vec3 dy = dFdy( vec * scale * dyRoughness ); + float d = max( dot( dx, dx ), dot( dy, dy ) ); + d = clamp(d, 1.0, cubeUV_rangeClamp); + float mipLevel = 0.5 * log2(d); + return vec2(floor(mipLevel), fract(mipLevel)); +} +#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0) +#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize) +vec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) { + mipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel; + float a = 16.0 * cubeUV_rcpTextureSize; + vec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) ); + vec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed; + float powScale = exp2_packed.x * exp2_packed.y; + float scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25; + float mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x; + bool bRes = mipLevel == 0.0; + scale = bRes && (scale < a) ? a : scale; + vec3 r; + vec2 offset; + int face = getFaceFromDirection(direction); + float rcpPowScale = 1.0 / powScale; + if( face == 0) { + r = vec3(direction.x, -direction.z, direction.y); + offset = vec2(0.0+mipOffset,0.75 * rcpPowScale); + offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y; + } + else if( face == 1) { + r = vec3(direction.y, direction.x, direction.z); + offset = vec2(scale+mipOffset, 0.75 * rcpPowScale); + offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y; + } + else if( face == 2) { + r = vec3(direction.z, direction.x, direction.y); + offset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale); + offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y; + } + else if( face == 3) { + r = vec3(direction.x, direction.z, direction.y); + offset = vec2(0.0+mipOffset,0.5 * rcpPowScale); + offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y; + } + else if( face == 4) { + r = vec3(direction.y, direction.x, -direction.z); + offset = vec2(scale+mipOffset, 0.5 * rcpPowScale); + offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y; + } + else { + r = vec3(direction.z, -direction.x, direction.y); + offset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale); + offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y; + } + r = normalize(r); + float texelOffset = 0.5 * cubeUV_rcpTextureSize; + vec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5; + vec2 base = offset + vec2( texelOffset ); + return base + s * ( scale - 2.0 * texelOffset ); +} +#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0) +vec4 textureCubeUV(vec3 reflectedDirection, float roughness ) { + float roughnessVal = roughness* cubeUV_maxLods3; + float r1 = floor(roughnessVal); + float r2 = r1 + 1.0; + float t = fract(roughnessVal); + vec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness); + float s = mipInfo.y; + float level0 = mipInfo.x; + float level1 = level0 + 1.0; + level1 = level1 > 5.0 ? 5.0 : level1; + level0 += min( floor( s + 0.5 ), 5.0 ); + vec2 uv_10 = getCubeUV(reflectedDirection, r1, level0); + vec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10)); + vec2 uv_20 = getCubeUV(reflectedDirection, r2, level0); + vec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20)); + vec4 result = mix(color10, color20, t); + return vec4(result.rgb, 1.0); +} +#endif +`,XAe=`#ifdef FLIP_SIDED + objectNormal = -objectNormal; +#endif +vec3 transformedNormal = normalMatrix * objectNormal; +`,YAe=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif +`,qAe=`#ifdef USE_DISPLACEMENTMAP + transformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias ); +#endif +`,ZAe=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vUv ); + emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; + totalEmissiveRadiance *= emissiveColor.rgb; +#endif +`,jAe=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif +`,KAe=` gl_FragColor = linearToOutputTexel( gl_FragColor ); +`,JAe=` +vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 GammaToLinear( in vec4 value, in float gammaFactor ) { + return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w ); +} +vec4 LinearToGamma( in vec4 value, in float gammaFactor ) { + return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w ); +} +vec4 sRGBToLinear( in vec4 value ) { + return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w ); +} +vec4 LinearTosRGB( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w ); +} +vec4 RGBEToLinear( in vec4 value ) { + return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 ); +} +vec4 LinearToRGBE( in vec4 value ) { + float maxComponent = max( max( value.r, value.g ), value.b ); + float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); + return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); +} +vec4 RGBMToLinear( in vec4 value, in float maxRange ) { + return vec4( value.xyz * value.w * maxRange, 1.0 ); +} +vec4 LinearToRGBM( in vec4 value, in float maxRange ) { + float maxRGB = max( value.x, max( value.g, value.b ) ); + float M = clamp( maxRGB / maxRange, 0.0, 1.0 ); + M = ceil( M * 255.0 ) / 255.0; + return vec4( value.rgb / ( M * maxRange ), M ); +} +vec4 RGBDToLinear( in vec4 value, in float maxRange ) { + return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 ); +} +vec4 LinearToRGBD( in vec4 value, in float maxRange ) { + float maxRGB = max( value.x, max( value.g, value.b ) ); + float D = max( maxRange / maxRGB, 1.0 ); + D = min( floor( D ) / 255.0, 1.0 ); + return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); +} +const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 ); +vec4 LinearToLogLuv( in vec4 value ) { + vec3 Xp_Y_XYZp = value.rgb * cLogLuvM; + Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6)); + vec4 vResult; + vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z; + float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0; + vResult.w = fract(Le); + vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0; + return vResult; +} +const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 ); +vec4 LogLuvToLinear( in vec4 value ) { + float Le = value.z * 255.0 + value.w; + vec3 Xp_Y_XYZp; + Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0); + Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y; + Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z; + vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM; + return vec4( max(vRGB, 0.0), 1.0 ); +} +`,$Ae=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) + vec3 cameraToVertex = normalize( vWorldPosition - cameraPosition ); + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToVertex, worldNormal ); + #else + vec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #elif defined( ENVMAP_TYPE_EQUIREC ) + vec2 sampleUV; + sampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 ); + sampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5; + vec4 envColor = texture2D( envMap, sampleUV ); + #elif defined( ENVMAP_TYPE_SPHERE ) + vec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) ); + vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + envColor = envMapTexelToLinear( envColor ); + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif +`,QAe=`#if defined( USE_ENVMAP ) || defined( PHYSICAL ) + uniform float reflectivity; + uniform float envMapIntensity; +#endif +#ifdef USE_ENVMAP + #if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) ) + varying vec3 vWorldPosition; + #endif + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + uniform float flipEnvMap; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL ) + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif +`,eCe=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif +`,tCe=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif +`,rCe=`#ifdef USE_FOG + #ifdef USE_LOGDEPTHBUF_EXT + float depth = gl_FragDepthEXT / gl_FragCoord.w; + #else + float depth = gl_FragCoord.z / gl_FragCoord.w; + #endif + #ifdef FOG_EXP2 + float fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) ); + #else + float fogFactor = smoothstep( fogNear, fogFar, depth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif +`,iCe=`#ifdef USE_FOG + uniform vec3 fogColor; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,nCe=`#ifdef TOON + uniform sampler2D gradientMap; + vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return texture2D( gradientMap, coord ).rgb; + #else + return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); + #endif + } +#endif +`,aCe=`#ifdef USE_LIGHTMAP + reflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; +#endif +`,oCe=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,sCe=`vec3 diffuse = vec3( 1.0 ); +GeometricContext geometry; +geometry.position = mvPosition.xyz; +geometry.normal = normalize( transformedNormal ); +geometry.viewDir = normalize( -mvPosition.xyz ); +GeometricContext backGeometry; +backGeometry.position = geometry.position; +backGeometry.normal = -geometry.normal; +backGeometry.viewDir = geometry.viewDir; +vLightFront = vec3( 0.0 ); +#ifdef DOUBLE_SIDED + vLightBack = vec3( 0.0 ); +#endif +IncidentLight directLight; +float dotNL; +vec3 directLightColor_Diffuse; +#if NUM_POINT_LIGHTS > 0 + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = PI * directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; + #endif + } +#endif +#if NUM_SPOT_LIGHTS > 0 + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = PI * directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; + #endif + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + } +#endif +#if NUM_DIR_LIGHTS > 0 + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = PI * directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; + #endif + } +#endif +#if NUM_HEMI_LIGHTS > 0 + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + vLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); + #ifdef DOUBLE_SIDED + vLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry ); + #endif + } +#endif +`,lCe=`uniform vec3 ambientLightColor; +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + #ifndef PHYSICALLY_CORRECT_LIGHTS + irradiance *= PI; + #endif + return irradiance; +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + int shadow; + float shadowBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) { + directLight.color = directionalLight.color; + directLight.direction = directionalLight.direction; + directLight.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + int shadow; + float shadowBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) { + vec3 lVector = pointLight.position - geometry.position; + directLight.direction = normalize( lVector ); + float lightDistance = length( lVector ); + directLight.color = pointLight.color; + directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay ); + directLight.visible = ( directLight.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + int shadow; + float shadowBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) { + vec3 lVector = spotLight.position - geometry.position; + directLight.direction = normalize( lVector ); + float lightDistance = length( lVector ); + float angleCos = dot( directLight.direction, spotLight.direction ); + if ( angleCos > spotLight.coneCos ) { + float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + directLight.color = spotLight.color; + directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay ); + directLight.visible = true; + } else { + directLight.color = vec3( 0.0 ); + directLight.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltcMat; uniform sampler2D ltcMag; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) { + float dotNL = dot( geometry.normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + #ifndef PHYSICALLY_CORRECT_LIGHTS + irradiance *= PI; + #endif + return irradiance; + } +#endif +#if defined( USE_ENVMAP ) && defined( PHYSICAL ) + vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) { + vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix ); + #ifdef ENVMAP_TYPE_CUBE + vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz ); + #ifdef TEXTURE_LOD_EXT + vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) ); + #else + vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) ); + #endif + envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz ); + vec4 envMapColor = textureCubeUV( queryVec, 1.0 ); + #else + vec4 envMapColor = vec4( 0.0 ); + #endif + return PI * envMapColor.rgb * envMapIntensity; + } + float getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) { + float maxMIPLevelScalar = float( maxMIPLevel ); + float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 ); + return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar ); + } + vec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) { + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( -geometry.viewDir, geometry.normal ); + #else + vec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio ); + #endif + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + float specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel ); + #ifdef ENVMAP_TYPE_CUBE + vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz ); + #ifdef TEXTURE_LOD_EXT + vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel ); + #else + vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel ); + #endif + envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz ); + vec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent)); + #elif defined( ENVMAP_TYPE_EQUIREC ) + vec2 sampleUV; + sampleUV.y = saturate( reflectVec.y * 0.5 + 0.5 ); + sampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5; + #ifdef TEXTURE_LOD_EXT + vec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel ); + #else + vec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel ); + #endif + envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; + #elif defined( ENVMAP_TYPE_SPHERE ) + vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) ); + #ifdef TEXTURE_LOD_EXT + vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel ); + #else + vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel ); + #endif + envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; + #endif + return envMapColor.rgb * envMapIntensity; + } +#endif +`,uCe=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength; +`,cCe=`varying vec3 vViewPosition; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_BlinnPhong( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + vec3 matDiffColor = material.diffuseColor; + vec3 matSpecColor = material.specularColor; + vec3 lightColor = rectAreaLight.color; + float roughness = BlinnExponentToGGXRoughness( material.specularShininess ); + vec3 spec = Rect_Area_Light_Specular_Reflectance( + geometry, + rectAreaLight.position, rectAreaLight.halfWidth, rectAreaLight.halfHeight, + roughness, + ltcMat, ltcMag ); + vec3 diff = Rect_Area_Light_Diffuse_Reflectance( + geometry, + rectAreaLight.position, rectAreaLight.halfWidth, rectAreaLight.halfHeight ); + reflectedLight.directSpecular += lightColor * matSpecColor * spec / PI2; + reflectedLight.directDiffuse += lightColor * matDiffColor * diff / PI2; + } +#endif +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + #ifdef TOON + vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; + #else + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #endif + #ifndef PHYSICALLY_CORRECT_LIGHTS + irradiance *= PI; + #endif + reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_Direct_RectArea RE_Direct_RectArea_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong +#define Material_LightProbeLOD( material ) (0) +`,fCe=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 ); +#ifdef STANDARD + material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor ); + material.clearCoat = saturate( clearCoat ); material.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 ); +#endif +`,hCe=`struct PhysicalMaterial { + vec3 diffuseColor; + float specularRoughness; + vec3 specularColor; + #ifndef STANDARD + float clearCoat; + float clearCoatRoughness; + #endif +}; +#define MAXIMUM_SPECULAR_COEFFICIENT 0.16 +#define DEFAULT_SPECULAR_COEFFICIENT 0.04 +float clearCoatDHRApprox( const in float roughness, const in float dotNL ) { + return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) ); +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 matDiffColor = material.diffuseColor; + vec3 matSpecColor = material.specularColor; + vec3 lightColor = rectAreaLight.color; + float roughness = material.specularRoughness; + vec3 spec = Rect_Area_Light_Specular_Reflectance( + geometry, + rectAreaLight.position, rectAreaLight.halfWidth, rectAreaLight.halfHeight, + roughness, + ltcMat, ltcMag ); + vec3 diff = Rect_Area_Light_Diffuse_Reflectance( + geometry, + rectAreaLight.position, rectAreaLight.halfWidth, rectAreaLight.halfHeight ); + reflectedLight.directSpecular += lightColor * matSpecColor * spec; + reflectedLight.directDiffuse += lightColor * matDiffColor * diff; + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifndef PHYSICALLY_CORRECT_LIGHTS + irradiance *= PI; + #endif + #ifndef STANDARD + float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL ); + #else + float clearCoatDHR = 0.0; + #endif + reflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness ); + reflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); + #ifndef STANDARD + reflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness ); + #endif +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + #ifndef STANDARD + float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) ); + float dotNL = dotNV; + float clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL ); + #else + float clearCoatDHR = 0.0; + #endif + reflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness ); + #ifndef STANDARD + reflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness ); + #endif +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness ) +#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness ) +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +} +`,pCe=` +GeometricContext geometry; +geometry.position = - vViewPosition; +geometry.normal = normal; +geometry.viewDir = normalize( vViewPosition ); +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointDirectLightIrradiance( pointLight, geometry, directLight ); + #ifdef USE_SHADOWMAP + directLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotDirectLightIrradiance( spotLight, geometry, directLight ); + #ifdef USE_SHADOWMAP + directLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight ); + #ifdef USE_SHADOWMAP + directLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); + } +#endif +#if defined( RE_IndirectDiffuse ) + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #ifdef USE_LIGHTMAP + vec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; + #ifndef PHYSICALLY_CORRECT_LIGHTS + lightMapIrradiance *= PI; + #endif + irradiance += lightMapIrradiance; + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); + } + #endif + #if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV ) + irradiance += getLightProbeIndirectIrradiance( geometry, 8 ); + #endif + RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + vec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 ); + #ifndef STANDARD + vec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 ); + #else + vec3 clearCoatRadiance = vec3( 0.0 ); + #endif + + RE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight ); +#endif +`,dCe=`#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT) + gl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5; +#endif`,mCe=`#ifdef USE_LOGDEPTHBUF + uniform float logDepthBufFC; + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + #endif +#endif +`,vCe=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + #endif + uniform float logDepthBufFC; +#endif`,gCe=`#ifdef USE_LOGDEPTHBUF + gl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC; + #ifdef USE_LOGDEPTHBUF_EXT + vFragDepth = 1.0 + gl_Position.w; + #else + gl_Position.z = (gl_Position.z - 1.0) * gl_Position.w; + #endif +#endif +`,yCe=`#ifdef USE_MAP + vec4 texelColor = texture2D( map, vUv ); + texelColor = mapTexelToLinear( texelColor ); + diffuseColor *= texelColor; +#endif +`,_Ce=`#ifdef USE_MAP + uniform sampler2D map; +#endif +`,xCe=`#ifdef USE_MAP + vec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy ); + diffuseColor *= mapTexelToLinear( mapTexel ); +#endif +`,SCe=`#ifdef USE_MAP + uniform vec4 offsetRepeat; + uniform sampler2D map; +#endif +`,MCe=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vUv ); + metalnessFactor *= texelMetalness.r; +#endif +`,bCe=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,wCe=`#ifdef USE_MORPHNORMALS + objectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ]; + objectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ]; + objectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ]; + objectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ]; +#endif +`,TCe=`#ifdef USE_MORPHTARGETS + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif +#endif`,ECe=`#ifdef USE_MORPHTARGETS + transformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ]; + transformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ]; + transformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ]; + transformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ]; + transformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ]; + transformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ]; + transformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ]; + #endif +#endif +`,ACe=`#ifdef DOUBLE_SIDED + float flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 ); +#else + float flipNormal = 1.0; +#endif +`,CCe=`#ifdef FLAT_SHADED + vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); + vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ) * flipNormal; +#endif +#ifdef USE_NORMALMAP + normal = perturbNormal2Arb( -vViewPosition, normal ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() ); +#endif +`,RCe=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; + vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( vUv.st ); + vec2 st1 = dFdy( vUv.st ); + vec3 S = normalize( q0 * st1.t - q1 * st0.t ); + vec3 T = normalize( -q0 * st1.s + q1 * st0.s ); + vec3 N = normalize( surf_norm ); + vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; + mapN.xy = normalScale * mapN.xy; + mat3 tsn = mat3( S, T, N ); + return normalize( tsn * mapN ); + } +#endif +`,LCe=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 1.0 - 2.0 * rgb.xyz; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { + return linearClipZ * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return (( near + viewZ ) * far ) / (( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * invClipZ - far ); +} +`,PCe=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif +`,DCe=`#ifdef USE_SKINNING + vec4 mvPosition = modelViewMatrix * skinned; +#else + vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 ); +#endif +gl_Position = projectionMatrix * mvPosition; +`,ICe=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vUv ); + roughnessFactor *= texelRoughness.r; +#endif +`,NCe=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,UCe=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHTS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ]; + #endif + #if NUM_SPOT_LIGHTS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ]; + varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ]; + #endif + #if NUM_POINT_LIGHTS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ]; + #endif + #if NUM_RECT_AREA_LIGHTS > 0 + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + float texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) { + const vec2 offset = vec2( 0.0, 1.0 ); + vec2 texelSize = vec2( 1.0 ) / size; + vec2 centroidUV = floor( uv * size + 0.5 ) / size; + float lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare ); + float lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare ); + float rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare ); + float rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare ); + vec2 f = fract( uv * size + 0.5 ); + float a = mix( lb, lt, f.y ); + float b = mix( rb, rt, f.y ); + float c = mix( a, b, f.x ); + return c; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 ); + bool inFrustum = all( inFrustumVec ); + bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 ); + bool frustumTest = all( frustumTestVec ); + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + return ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + return ( + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return 1.0; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + vec3 lightToPosition = shadowCoord.xyz; + vec3 bd3D = normalize( lightToPosition ); + float dp = ( length( lightToPosition ) - shadowBias ) / 1000.0; + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } +#endif +`,OCe=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHTS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ]; + #endif + #if NUM_SPOT_LIGHTS > 0 + uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ]; + varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ]; + #endif + #if NUM_POINT_LIGHTS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ]; + #endif + #if NUM_RECT_AREA_LIGHTS > 0 + #endif +#endif +`,FCe=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHTS > 0 + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition; + } + #endif + #if NUM_SPOT_LIGHTS > 0 + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition; + } + #endif + #if NUM_POINT_LIGHTS > 0 + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition; + } + #endif + #if NUM_RECT_AREA_LIGHTS > 0 + #endif +#endif +`,zCe=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHTS > 0 + DirectionalLight directionalLight; + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + shadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #endif + #if NUM_SPOT_LIGHTS > 0 + SpotLight spotLight; + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + shadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; + } + #endif + #if NUM_POINT_LIGHTS > 0 + PointLight pointLight; + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + shadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0; + } + #endif + #if NUM_RECT_AREA_LIGHTS > 0 + #endif + #endif + return shadow; +} +`,BCe=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,kCe=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + #ifdef BONE_TEXTURE + uniform sampler2D boneTexture; + uniform int boneTextureWidth; + uniform int boneTextureHeight; + mat4 getBoneMatrix( const in float i ) { + float j = i * 4.0; + float x = mod( j, float( boneTextureWidth ) ); + float y = floor( j / float( boneTextureWidth ) ); + float dx = 1.0 / float( boneTextureWidth ); + float dy = 1.0 / float( boneTextureHeight ); + y = dy * ( y + 0.5 ); + vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); + vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); + vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); + vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); + mat4 bone = mat4( v1, v2, v3, v4 ); + return bone; + } + #else + uniform mat4 boneMatrices[ MAX_BONES ]; + mat4 getBoneMatrix( const in float i ) { + mat4 bone = boneMatrices[ int(i) ]; + return bone; + } + #endif +#endif +`,VCe=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + skinned = bindMatrixInverse * skinned; +#endif +`,GCe=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; +#endif +`,HCe=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,WCe=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,XCe=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif +`,YCe=`#define saturate(a) clamp( a, 0.0, 1.0 ) +uniform float toneMappingExposure; +uniform float toneMappingWhitePoint; +vec3 LinearToneMapping( vec3 color ) { + return toneMappingExposure * color; +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) ) +vec3 Uncharted2ToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +`,qCe=`#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP ) + varying vec2 vUv; +#endif`,ZCe=`#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP ) + varying vec2 vUv; + uniform vec4 offsetRepeat; +#endif +`,jCe=`#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP ) + vUv = uv * offsetRepeat.zw + offsetRepeat.xy; +#endif`,KCe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + varying vec2 vUv2; +#endif`,JCe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + attribute vec2 uv2; + varying vec2 vUv2; +#endif`,$Ce=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + vUv2 = uv2; +#endif`,QCe=`#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP ) + #ifdef USE_SKINNING + vec4 worldPosition = modelMatrix * skinned; + #else + vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 ); + #endif +#endif +`,eRe=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldPosition; +#include +void main() { + gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) ); + gl_FragColor.a *= opacity; +} +`,tRe=`varying vec3 vWorldPosition; +#include +void main() { + vWorldPosition = transformDirection( position, modelMatrix ); + #include + #include +} +`,rRe=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( 1.0 ); + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( gl_FragCoord.z ); + #endif +} +`,iRe=`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include +} +`,nRe=`uniform vec3 lightPos; +varying vec4 vWorldPosition; +#include +#include +#include +void main () { + #include + gl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 ); +} +`,aRe=`varying vec4 vWorldPosition; +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition; +} +`,oRe=`uniform sampler2D tEquirect; +uniform float tFlip; +varying vec3 vWorldPosition; +#include +void main() { + vec3 direction = normalize( vWorldPosition ); + vec2 sampleUV; + sampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 ); + sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5; + gl_FragColor = texture2D( tEquirect, sampleUV ); +} +`,sRe=`varying vec3 vWorldPosition; +#include +void main() { + vWorldPosition = transformDirection( position, modelMatrix ); + #include + #include +} +`,lRe=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +void main() { + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + outgoingLight = diffuseColor.rgb; + gl_FragColor = vec4( outgoingLight, diffuseColor.a ); + #include + #include + #include + #include +} +`,uRe=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +void main() { + #include + vLineDistance = scale * lineDistance; + vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); + gl_Position = projectionMatrix * mvPosition; + #include + #include +} +`,cRe=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + reflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + gl_FragColor = vec4( outgoingLight, diffuseColor.a ); + #include + #include + #include + #include +} +`,fRe=`#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #ifdef USE_ENVMAP + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include +} +`,hRe=`uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +varying vec3 vLightFront; +#ifdef DOUBLE_SIDED + varying vec3 vLightBack; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + reflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor ); + #include + reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ); + #ifdef DOUBLE_SIDED + reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack; + #else + reflectedLight.directDiffuse = vLightFront; + #endif + reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask(); + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + gl_FragColor = vec4( outgoingLight, diffuseColor.a ); + #include + #include + #include + #include +} +`,pRe=`#define LAMBERT +varying vec3 vLightFront; +#ifdef DOUBLE_SIDED + varying vec3 vLightBack; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +} +`,dRe=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + gl_FragColor = vec4( outgoingLight, diffuseColor.a ); + #include + #include + #include + #include +} +`,mRe=`#define PHONG +varying vec3 vViewPosition; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include +#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); +#endif + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +} +`,vRe=`#define PHYSICAL +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifndef STANDARD + uniform float clearCoat; + uniform float clearCoatRoughness; +#endif +varying vec3 vViewPosition; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + gl_FragColor = vec4( outgoingLight, diffuseColor.a ); + #include + #include + #include + #include +} +`,gRe=`#define PHYSICAL +varying vec3 vViewPosition; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include +#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); +#endif + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include +} +`,yRe=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) + varying vec3 vViewPosition; +#endif +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); + #include + #include +} +`,_Re=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) + varying vec3 vViewPosition; +#endif +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include +#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); +#endif + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) + vViewPosition = - mvPosition.xyz; +#endif +} +`,xRe=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + gl_FragColor = vec4( outgoingLight, diffuseColor.a ); + #include + #include + #include + #include +} +`,SRe=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #ifdef USE_SIZEATTENUATION + gl_PointSize = size * ( scale / - mvPosition.z ); + #else + gl_PointSize = size; + #endif + #include + #include + #include + #include +} +`,MRe=`uniform float opacity; +#include +#include +#include +#include +#include +#include +void main() { + gl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) ); +} +`,bRe=`#include +void main() { + #include + #include + #include + #include +} +`,Xr={alphamap_fragment:EAe,alphamap_pars_fragment:AAe,alphatest_fragment:CAe,aomap_fragment:RAe,aomap_pars_fragment:LAe,begin_vertex:PAe,beginnormal_vertex:DAe,bsdfs:IAe,bumpmap_pars_fragment:NAe,clipping_planes_fragment:UAe,clipping_planes_pars_fragment:OAe,clipping_planes_pars_vertex:FAe,clipping_planes_vertex:zAe,color_fragment:BAe,color_pars_fragment:kAe,color_pars_vertex:VAe,color_vertex:GAe,common:HAe,cube_uv_reflection_fragment:WAe,defaultnormal_vertex:XAe,displacementmap_pars_vertex:YAe,displacementmap_vertex:qAe,emissivemap_fragment:ZAe,emissivemap_pars_fragment:jAe,encodings_fragment:KAe,encodings_pars_fragment:JAe,envmap_fragment:$Ae,envmap_pars_fragment:QAe,envmap_pars_vertex:eCe,envmap_vertex:tCe,fog_fragment:rCe,fog_pars_fragment:iCe,gradientmap_pars_fragment:nCe,lightmap_fragment:aCe,lightmap_pars_fragment:oCe,lights_lambert_vertex:sCe,lights_pars:lCe,lights_phong_fragment:uCe,lights_phong_pars_fragment:cCe,lights_physical_fragment:fCe,lights_physical_pars_fragment:hCe,lights_template:pCe,logdepthbuf_fragment:dCe,logdepthbuf_pars_fragment:mCe,logdepthbuf_pars_vertex:vCe,logdepthbuf_vertex:gCe,map_fragment:yCe,map_pars_fragment:_Ce,map_particle_fragment:xCe,map_particle_pars_fragment:SCe,metalnessmap_fragment:MCe,metalnessmap_pars_fragment:bCe,morphnormal_vertex:wCe,morphtarget_pars_vertex:TCe,morphtarget_vertex:ECe,normal_flip:ACe,normal_fragment:CCe,normalmap_pars_fragment:RCe,packing:LCe,premultiplied_alpha_fragment:PCe,project_vertex:DCe,roughnessmap_fragment:ICe,roughnessmap_pars_fragment:NCe,shadowmap_pars_fragment:UCe,shadowmap_pars_vertex:OCe,shadowmap_vertex:FCe,shadowmask_pars_fragment:zCe,skinbase_vertex:BCe,skinning_pars_vertex:kCe,skinning_vertex:VCe,skinnormal_vertex:GCe,specularmap_fragment:HCe,specularmap_pars_fragment:WCe,tonemapping_fragment:XCe,tonemapping_pars_fragment:YCe,uv_pars_fragment:qCe,uv_pars_vertex:ZCe,uv_vertex:jCe,uv2_pars_fragment:KCe,uv2_pars_vertex:JCe,uv2_vertex:$Ce,worldpos_vertex:QCe,cube_frag:eRe,cube_vert:tRe,depth_frag:rRe,depth_vert:iRe,distanceRGBA_frag:nRe,distanceRGBA_vert:aRe,equirect_frag:oRe,equirect_vert:sRe,linedashed_frag:lRe,linedashed_vert:uRe,meshbasic_frag:cRe,meshbasic_vert:fRe,meshlambert_frag:hRe,meshlambert_vert:pRe,meshphong_frag:dRe,meshphong_vert:mRe,meshphysical_frag:vRe,meshphysical_vert:gRe,normal_frag:yRe,normal_vert:_Re,points_frag:xRe,points_vert:SRe,shadow_frag:MRe,shadow_vert:bRe};Gt.prototype={constructor:Gt,isColor:!0,r:1,g:1,b:1,set:function(r){return r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r),this},setScalar:function(r){return this.r=r,this.g=r,this.b=r,this},setHex:function(r){return r=Math.floor(r),this.r=(r>>16&255)/255,this.g=(r>>8&255)/255,this.b=(r&255)/255,this},setRGB:function(r,e,t){return this.r=r,this.g=e,this.b=t,this},setHSL:function(){function r(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*6*(2/3-i):e}return function(t,i,n){if(t=cr.euclideanModulo(t,1),i=cr.clamp(i,0,1),n=cr.clamp(n,0,1),i===0)this.r=this.g=this.b=n;else{var a=n<=.5?n*(1+i):n+i-n*i,o=2*n-a;this.r=r(o,a,t+1/3),this.g=r(o,a,t),this.b=r(o,a,t-1/3)}return this}}(),setStyle:function(r){function e(f){f!==void 0&&parseFloat(f)<1&&console.warn("THREE.Color: Alpha component of "+r+" will be ignored.")}var t;if(t=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(r)){var i,n=t[1],a=t[2];switch(n){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(i[1])/360,s=parseInt(i[2],10)/100,l=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(o,s,l)}break}}else if(t=/^\#([A-Fa-f0-9]+)$/.exec(r)){var u=t[1],c=u.length;if(c===3)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(c===6)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}if(r&&r.length>0){var u=wRe[r];u!==void 0?this.setHex(u):console.warn("THREE.Color: Unknown color "+r)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(r){return this.r=r.r,this.g=r.g,this.b=r.b,this},copyGammaToLinear:function(r,e){return e===void 0&&(e=2),this.r=Math.pow(r.r,e),this.g=Math.pow(r.g,e),this.b=Math.pow(r.b,e),this},copyLinearToGamma:function(r,e){e===void 0&&(e=2);var t=e>0?1/e:1;return this.r=Math.pow(r.r,t),this.g=Math.pow(r.g,t),this.b=Math.pow(r.b,t),this},convertGammaToLinear:function(){var r=this.r,e=this.g,t=this.b;return this.r=r*r,this.g=e*e,this.b=t*t,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return this.r*255<<16^this.g*255<<8^this.b*255<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(r){var e=r||{h:0,s:0,l:0},t=this.r,i=this.g,n=this.b,a=Math.max(t,i,n),o=Math.min(t,i,n),s,l,u=(o+a)/2;if(o===a)s=0,l=0;else{var c=a-o;switch(l=u<=.5?c/(a+o):c/(2-a-o),a){case t:s=(i-n)/c+(ithis.max.x||r.ythis.max.y)},containsBox:function(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y},getParameter:function(r,e){var t=e||new St;return t.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(r){return!(r.max.xthis.max.x||r.max.ythis.max.y)},clampPoint:function(r,e){var t=e||new St;return t.copy(r).clamp(this.min,this.max)},distanceToPoint:function(){var r=new St;return function(t){var i=r.copy(t).clamp(this.min,this.max);return i.sub(t).length()}}(),intersect:function(r){return this.min.max(r.min),this.max.min(r.max),this},union:function(r){return this.min.min(r.min),this.max.max(r.max),this},translate:function(r){return this.min.add(r),this.max.add(r),this},equals:function(r){return r.min.equals(this.min)&&r.max.equals(this.max)}};ARe=0;mr.prototype={constructor:mr,isMaterial:!0,get needsUpdate(){return this._needsUpdate},set needsUpdate(r){r===!0&&this.update(),this._needsUpdate=r},setValues:function(r){if(r!==void 0)for(var e in r){var t=r[e];if(t===void 0){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}var i=this[e];if(i===void 0){console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.");continue}i&&i.isColor?i.set(t):i&&i.isVector3&&t&&t.isVector3?i.copy(t):e==="overdraw"?this[e]=Number(t):this[e]=t}},toJSON:function(r){var e=r===void 0;e&&(r={textures:{},images:{}});var t={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),this.color&&this.color.isColor&&(t.color=this.color.getHex()),this.roughness!==void 0&&(t.roughness=this.roughness),this.metalness!==void 0&&(t.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(t.emissive=this.emissive.getHex()),this.specular&&this.specular.isColor&&(t.specular=this.specular.getHex()),this.shininess!==void 0&&(t.shininess=this.shininess),this.clearCoat!==void 0&&(t.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(t.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(t.map=this.map.toJSON(r).uuid),this.alphaMap&&this.alphaMap.isTexture&&(t.alphaMap=this.alphaMap.toJSON(r).uuid),this.lightMap&&this.lightMap.isTexture&&(t.lightMap=this.lightMap.toJSON(r).uuid),this.bumpMap&&this.bumpMap.isTexture&&(t.bumpMap=this.bumpMap.toJSON(r).uuid,t.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(t.normalMap=this.normalMap.toJSON(r).uuid,t.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(t.displacementMap=this.displacementMap.toJSON(r).uuid,t.displacementScale=this.displacementScale,t.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(t.roughnessMap=this.roughnessMap.toJSON(r).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(t.metalnessMap=this.metalnessMap.toJSON(r).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(t.emissiveMap=this.emissiveMap.toJSON(r).uuid),this.specularMap&&this.specularMap.isTexture&&(t.specularMap=this.specularMap.toJSON(r).uuid),this.envMap&&this.envMap.isTexture&&(t.envMap=this.envMap.toJSON(r).uuid,t.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(t.gradientMap=this.gradientMap.toJSON(r).uuid),this.size!==void 0&&(t.size=this.size),this.sizeAttenuation!==void 0&&(t.sizeAttenuation=this.sizeAttenuation),this.blending!==Uy&&(t.blending=this.blending),this.shading!==Uz&&(t.shading=this.shading),this.side!==Zg&&(t.side=this.side),this.vertexColors!==yC&&(t.vertexColors=this.vertexColors),this.opacity<1&&(t.opacity=this.opacity),this.transparent===!0&&(t.transparent=this.transparent),t.depthFunc=this.depthFunc,t.depthTest=this.depthTest,t.depthWrite=this.depthWrite,this.alphaTest>0&&(t.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(t.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(t.wireframe=this.wireframe),this.wireframeLinewidth>1&&(t.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(t.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(t.wireframeLinejoin=this.wireframeLinejoin),t.skinning=this.skinning,t.morphTargets=this.morphTargets;function i(o){var s=[];for(var l in o){var u=o[l];delete u.metadata,s.push(u)}return s}if(e){var n=i(r.textures),a=i(r.images);n.length>0&&(t.textures=n),a.length>0&&(t.images=a)}return t},clone:function(){return new this.constructor().copy(this)},copy:function(r){this.name=r.name,this.fog=r.fog,this.lights=r.lights,this.blending=r.blending,this.side=r.side,this.shading=r.shading,this.vertexColors=r.vertexColors,this.opacity=r.opacity,this.transparent=r.transparent,this.blendSrc=r.blendSrc,this.blendDst=r.blendDst,this.blendEquation=r.blendEquation,this.blendSrcAlpha=r.blendSrcAlpha,this.blendDstAlpha=r.blendDstAlpha,this.blendEquationAlpha=r.blendEquationAlpha,this.depthFunc=r.depthFunc,this.depthTest=r.depthTest,this.depthWrite=r.depthWrite,this.colorWrite=r.colorWrite,this.precision=r.precision,this.polygonOffset=r.polygonOffset,this.polygonOffsetFactor=r.polygonOffsetFactor,this.polygonOffsetUnits=r.polygonOffsetUnits,this.alphaTest=r.alphaTest,this.premultipliedAlpha=r.premultipliedAlpha,this.overdraw=r.overdraw,this.visible=r.visible,this.clipShadows=r.clipShadows,this.clipIntersection=r.clipIntersection;var e=r.clippingPlanes,t=null;if(e!==null){var i=e.length;t=new Array(i);for(var n=0;n!==i;++n)t[n]=e[n].clone()}return this.clippingPlanes=t,this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}};Object.assign(mr.prototype,Ms.prototype);_a.prototype=Object.create(mr.prototype);_a.prototype.constructor=_a;_a.prototype.isShaderMaterial=!0;_a.prototype.copy=function(r){return mr.prototype.copy.call(this,r),this.fragmentShader=r.fragmentShader,this.vertexShader=r.vertexShader,this.uniforms=eo.clone(r.uniforms),this.defines=r.defines,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.lights=r.lights,this.clipping=r.clipping,this.skinning=r.skinning,this.morphTargets=r.morphTargets,this.morphNormals=r.morphNormals,this.extensions=r.extensions,this};_a.prototype.toJSON=function(r){var e=mr.prototype.toJSON.call(this,r);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e};Sh.prototype=Object.create(mr.prototype);Sh.prototype.constructor=Sh;Sh.prototype.isMeshDepthMaterial=!0;Sh.prototype.copy=function(r){return mr.prototype.copy.call(this,r),this.depthPacking=r.depthPacking,this.skinning=r.skinning,this.morphTargets=r.morphTargets,this.map=r.map,this.alphaMap=r.alphaMap,this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this};lu.prototype={constructor:lu,isBox3:!0,set:function(r,e){return this.min.copy(r),this.max.copy(e),this},setFromArray:function(r){for(var e=1/0,t=1/0,i=1/0,n=-1/0,a=-1/0,o=-1/0,s=0,l=r.length;sn&&(n=u),c>a&&(a=c),f>o&&(o=f)}this.min.set(e,t,i),this.max.set(n,a,o)},setFromBufferAttribute:function(r){for(var e=1/0,t=1/0,i=1/0,n=-1/0,a=-1/0,o=-1/0,s=0,l=r.count;sn&&(n=u),c>a&&(a=c),f>o&&(o=f)}this.min.set(e,t,i),this.max.set(n,a,o)},setFromPoints:function(r){this.makeEmpty();for(var e=0,t=r.length;ethis.max.x||r.ythis.max.y||r.zthis.max.z)},containsBox:function(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y&&this.min.z<=r.min.z&&r.max.z<=this.max.z},getParameter:function(r,e){var t=e||new oe;return t.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y),(r.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(r){return!(r.max.xthis.max.x||r.max.ythis.max.y||r.max.zthis.max.z)},intersectsSphere:function(){var r;return function(t){return r===void 0&&(r=new oe),this.clampPoint(t.center,r),r.distanceToSquared(t.center)<=t.radius*t.radius}}(),intersectsPlane:function(r){var e,t;return r.normal.x>0?(e=r.normal.x*this.min.x,t=r.normal.x*this.max.x):(e=r.normal.x*this.max.x,t=r.normal.x*this.min.x),r.normal.y>0?(e+=r.normal.y*this.min.y,t+=r.normal.y*this.max.y):(e+=r.normal.y*this.max.y,t+=r.normal.y*this.min.y),r.normal.z>0?(e+=r.normal.z*this.min.z,t+=r.normal.z*this.max.z):(e+=r.normal.z*this.max.z,t+=r.normal.z*this.min.z),e<=r.constant&&t>=r.constant},clampPoint:function(r,e){var t=e||new oe;return t.copy(r).clamp(this.min,this.max)},distanceToPoint:function(){var r=new oe;return function(t){var i=r.copy(t).clamp(this.min,this.max);return i.sub(t).length()}}(),getBoundingSphere:function(){var r=new oe;return function(t){var i=t||new $n;return this.getCenter(i.center),i.radius=this.getSize(r).length()*.5,i}}(),intersect:function(r){return this.min.max(r.min),this.max.min(r.max),this.isEmpty()&&this.makeEmpty(),this},union:function(r){return this.min.min(r.min),this.max.max(r.max),this},applyMatrix4:function(){var r=[new oe,new oe,new oe,new oe,new oe,new oe,new oe,new oe];return function(t){return this.isEmpty()?this:(r[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),r[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),r[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),r[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),r[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),r[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),r[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),r[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(r),this)}}(),translate:function(r){return this.min.add(r),this.max.add(r),this},equals:function(r){return r.min.equals(this.min)&&r.max.equals(this.max)}};$n.prototype={constructor:$n,set:function(r,e){return this.center.copy(r),this.radius=e,this},setFromPoints:function(){var r=new lu;return function(t,i){var n=this.center;i!==void 0?n.copy(i):r.setFromPoints(t).getCenter(n);for(var a=0,o=0,s=t.length;othis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i},getBoundingBox:function(r){var e=r||new lu;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(r){return this.center.applyMatrix4(r),this.radius=this.radius*r.getMaxScaleOnAxis(),this},translate:function(r){return this.center.add(r),this},equals:function(r){return r.center.equals(this.center)&&r.radius===this.radius}};bs.prototype={constructor:bs,isMatrix3:!0,set:function(r,e,t,i,n,a,o,s,l){var u=this.elements;return u[0]=r,u[1]=i,u[2]=o,u[3]=e,u[4]=n,u[5]=s,u[6]=t,u[7]=a,u[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return new this.constructor().fromArray(this.elements)},copy:function(r){var e=r.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this},setFromMatrix4:function(r){var e=r.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToVector3Array:function(){var r;return function(t,i,n){r===void 0&&(r=new oe),i===void 0&&(i=0),n===void 0&&(n=t.length);for(var a=0,o=i;a1))return n.copy(a).multiplyScalar(s).add(t.start)}}(),intersectsLine:function(r){var e=this.distanceToPoint(r.start),t=this.distanceToPoint(r.end);return e<0&&t>0||t<0&&e>0},intersectsBox:function(r){return r.intersectsPlane(this)},intersectsSphere:function(r){return r.intersectsPlane(this)},coplanarPoint:function(r){var e=r||new oe;return e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var r=new oe,e=new bs;return function(i,n){var a=this.coplanarPoint(r).applyMatrix4(i),o=n||e.getNormalMatrix(i),s=this.normal.applyMatrix3(o).normalize();return this.constant=-a.dot(s),this}}(),translate:function(r){return this.constant=this.constant-r.dot(this.normal),this},equals:function(r){return r.normal.equals(this.normal)&&r.constant===this.constant}};DS.prototype={constructor:DS,set:function(r,e,t,i,n,a){var o=this.planes;return o[0].copy(r),o[1].copy(e),o[2].copy(t),o[3].copy(i),o[4].copy(n),o[5].copy(a),this},clone:function(){return new this.constructor().copy(this)},copy:function(r){for(var e=this.planes,t=0;t<6;t++)e[t].copy(r.planes[t]);return this},setFromMatrix:function(r){var e=this.planes,t=r.elements,i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],p=t[10],d=t[11],g=t[12],m=t[13],v=t[14],_=t[15];return e[0].setComponents(o-i,c-s,d-f,_-g).normalize(),e[1].setComponents(o+i,c+s,d+f,_+g).normalize(),e[2].setComponents(o+n,c+l,d+h,_+m).normalize(),e[3].setComponents(o-n,c-l,d-h,_-m).normalize(),e[4].setComponents(o-a,c-u,d-p,_-v).normalize(),e[5].setComponents(o+a,c+u,d+p,_+v).normalize(),this},intersectsObject:function(){var r=new $n;return function(t){var i=t.geometry;return i.boundingSphere===null&&i.computeBoundingSphere(),r.copy(i.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(r)}}(),intersectsSprite:function(){var r=new $n;return function(t){return r.center.set(0,0,0),r.radius=.7071067811865476,r.applyMatrix4(t.matrixWorld),this.intersectsSphere(r)}}(),intersectsSphere:function(r){for(var e=this.planes,t=r.center,i=-r.radius,n=0;n<6;n++){var a=e[n].distanceToPoint(t);if(a0?i.min.x:i.max.x,e.x=o.normal.x>0?i.max.x:i.min.x,r.y=o.normal.y>0?i.min.y:i.max.y,e.y=o.normal.y>0?i.max.y:i.min.y,r.z=o.normal.z>0?i.min.z:i.max.z,e.z=o.normal.z>0?i.max.z:i.min.z;var s=o.distanceToPoint(r),l=o.distanceToPoint(e);if(s<0&&l<0)return!1}return!0}}(),containsPoint:function(r){for(var e=this.planes,t=0;t<6;t++)if(e[t].distanceToPoint(r)<0)return!1;return!0}};Mh.prototype={constructor:Mh,set:function(r,e){return this.origin.copy(r),this.direction.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(r){return this.origin.copy(r.origin),this.direction.copy(r.direction),this},at:function(r,e){var t=e||new oe;return t.copy(this.direction).multiplyScalar(r).add(this.origin)},lookAt:function(r){return this.direction.copy(r).sub(this.origin).normalize(),this},recast:function(){var r=new oe;return function(t){return this.origin.copy(this.at(t,r)),this}}(),closestPointToPoint:function(r,e){var t=e||new oe;t.subVectors(r,this.origin);var i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)},distanceToPoint:function(r){return Math.sqrt(this.distanceSqToPoint(r))},distanceSqToPoint:function(){var r=new oe;return function(t){var i=r.subVectors(t,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(t):(r.copy(this.direction).multiplyScalar(i).add(this.origin),r.distanceToSquared(t))}}(),distanceSqToSegment:function(){var r=new oe,e=new oe,t=new oe;return function(n,a,o,s){r.copy(n).add(a).multiplyScalar(.5),e.copy(a).sub(n).normalize(),t.copy(this.origin).sub(r);var l=n.distanceTo(a)*.5,u=-this.direction.dot(e),c=t.dot(this.direction),f=-t.dot(e),h=t.lengthSq(),p=Math.abs(1-u*u),d,g,m,v;if(p>0)if(d=u*f-c,g=u*c-f,v=l*p,d>=0)if(g>=-v)if(g<=v){var _=1/p;d*=_,g*=_,m=d*(d+u*g+2*c)+g*(u*d+g+2*f)+h}else g=l,d=Math.max(0,-(u*g+c)),m=-d*d+g*(g+2*f)+h;else g=-l,d=Math.max(0,-(u*g+c)),m=-d*d+g*(g+2*f)+h;else g<=-v?(d=Math.max(0,-(-u*l+c)),g=d>0?-l:Math.min(Math.max(-l,-f),l),m=-d*d+g*(g+2*f)+h):g<=v?(d=0,g=Math.min(Math.max(-l,-f),l),m=g*(g+2*f)+h):(d=Math.max(0,-(u*l+c)),g=d>0?l:Math.min(Math.max(-l,-f),l),m=-d*d+g*(g+2*f)+h);else g=u>0?-l:l,d=Math.max(0,-(u*g+c)),m=-d*d+g*(g+2*f)+h;return o&&o.copy(this.direction).multiplyScalar(d).add(this.origin),s&&s.copy(e).multiplyScalar(g).add(r),m}}(),intersectSphere:function(){var r=new oe;return function(t,i){r.subVectors(t.center,this.origin);var n=r.dot(this.direction),a=r.dot(r)-n*n,o=t.radius*t.radius;if(a>o)return null;var s=Math.sqrt(o-a),l=n-s,u=n+s;return l<0&&u<0?null:l<0?this.at(u,i):this.at(l,i)}}(),intersectsSphere:function(r){return this.distanceToPoint(r.center)<=r.radius},distanceToPlane:function(r){var e=r.normal.dot(this.direction);if(e===0)return r.distanceToPoint(this.origin)===0?0:null;var t=-(this.origin.dot(r.normal)+r.constant)/e;return t>=0?t:null},intersectPlane:function(r,e){var t=this.distanceToPlane(r);return t===null?null:this.at(t,e)},intersectsPlane:function(r){var e=r.distanceToPoint(this.origin);if(e===0)return!0;var t=r.normal.dot(this.direction);return t*e<0},intersectBox:function(r,e){var t,i,n,a,o,s,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,f=this.origin;return l>=0?(t=(r.min.x-f.x)*l,i=(r.max.x-f.x)*l):(t=(r.max.x-f.x)*l,i=(r.min.x-f.x)*l),u>=0?(n=(r.min.y-f.y)*u,a=(r.max.y-f.y)*u):(n=(r.max.y-f.y)*u,a=(r.min.y-f.y)*u),t>a||n>i||((n>t||t!==t)&&(t=n),(a=0?(o=(r.min.z-f.z)*c,s=(r.max.z-f.z)*c):(o=(r.max.z-f.z)*c,s=(r.min.z-f.z)*c),t>s||o>i)||((o>t||t!==t)&&(t=o),(s=0?t:i,e)},intersectsBox:function(){var r=new oe;return function(t){return this.intersectBox(t,r)!==null}}(),intersectTriangle:function(){var r=new oe,e=new oe,t=new oe,i=new oe;return function(a,o,s,l,u){e.subVectors(o,a),t.subVectors(s,a),i.crossVectors(e,t);var c=this.direction.dot(i),f;if(c>0){if(l)return null;f=1}else if(c<0)f=-1,c=-c;else return null;r.subVectors(this.origin,a);var h=f*this.direction.dot(t.crossVectors(r,t));if(h<0)return null;var p=f*this.direction.dot(e.cross(r));if(p<0||h+p>c)return null;var d=-f*r.dot(i);return d<0?null:this.at(d/c,u)}}(),applyMatrix4:function(r){return this.direction.add(this.origin).applyMatrix4(r),this.origin.applyMatrix4(r),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(r){return r.origin.equals(this.origin)&&r.direction.equals(this.direction)}};bh.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];bh.DefaultOrder="XYZ";bh.prototype={constructor:bh,isEuler:!0,get x(){return this._x},set x(r){this._x=r,this.onChangeCallback()},get y(){return this._y},set y(r){this._y=r,this.onChangeCallback()},get z(){return this._z},set z(r){this._z=r,this.onChangeCallback()},get order(){return this._order},set order(r){this._order=r,this.onChangeCallback()},set:function(r,e,t,i){return this._x=r,this._y=e,this._z=t,this._order=i||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(r){return this._x=r._x,this._y=r._y,this._z=r._z,this._order=r._order,this.onChangeCallback(),this},setFromRotationMatrix:function(r,e,t){var i=cr.clamp,n=r.elements,a=n[0],o=n[4],s=n[8],l=n[1],u=n[5],c=n[9],f=n[2],h=n[6],p=n[10];return e=e||this._order,e==="XYZ"?(this._y=Math.asin(i(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(h,u),this._z=0)):e==="YXZ"?(this._x=Math.asin(-i(c,-1,1)),Math.abs(c)<.99999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-f,a),this._z=0)):e==="ZXY"?(this._x=Math.asin(i(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,a))):e==="ZYX"?(this._y=Math.asin(-i(f,-1,1)),Math.abs(f)<.99999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-o,u))):e==="YZX"?(this._z=Math.asin(i(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-f,a)):(this._x=0,this._y=Math.atan2(s,p))):e==="XZY"?(this._z=Math.asin(-i(o,-1,1)),Math.abs(o)<.99999?(this._x=Math.atan2(h,u),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-c,p),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,t!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var r;return function(t,i,n){return r===void 0&&(r=new qt),r.makeRotationFromQuaternion(t),this.setFromRotationMatrix(r,i,n)}}(),setFromVector3:function(r,e){return this.set(r.x,r.y,r.z,e||this._order)},reorder:function(){var r=new on;return function(t){return r.setFromEuler(this),this.setFromQuaternion(r,t)}}(),equals:function(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._order===this._order},fromArray:function(r){return this._x=r[0],this._y=r[1],this._z=r[2],r[3]!==void 0&&(this._order=r[3]),this.onChangeCallback(),this},toArray:function(r,e){return r===void 0&&(r=[]),e===void 0&&(e=0),r[e]=this._x,r[e+1]=this._y,r[e+2]=this._z,r[e+3]=this._order,r},toVector3:function(r){return r?r.set(this._x,this._y,this._z):new oe(this._x,this._y,this._z)},onChange:function(r){return this.onChangeCallback=r,this},onChangeCallback:function(){}};qA.prototype={constructor:qA,set:function(r){this.mask=1<1){for(var e=0;e1)for(var e=0;e0){i.children=[];for(var n=0;n0&&(t.geometries=a),o.length>0&&(t.materials=o),s.length>0&&(t.textures=s),l.length>0&&(t.images=l)}return t.object=i,t;function u(c){var f=[];for(var h in c){var p=c[h];delete p.metadata,f.push(p)}return f}},clone:function(r){return new this.constructor().copy(this,r)},copy:function(r,e){if(e===void 0&&(e=!0),this.name=r.name,this.up.copy(r.up),this.position.copy(r.position),this.quaternion.copy(r.quaternion),this.scale.copy(r.scale),this.matrix.copy(r.matrix),this.matrixWorld.copy(r.matrixWorld),this.matrixAutoUpdate=r.matrixAutoUpdate,this.matrixWorldNeedsUpdate=r.matrixWorldNeedsUpdate,this.layers.mask=r.layers.mask,this.visible=r.visible,this.castShadow=r.castShadow,this.receiveShadow=r.receiveShadow,this.frustumCulled=r.frustumCulled,this.renderOrder=r.renderOrder,this.userData=JSON.parse(JSON.stringify(r.userData)),e===!0)for(var t=0;t0?o.multiplyScalar(1/Math.sqrt(s)):o.set(0,0,0)}}();Ss.barycoordFromPoint=function(){var r=new oe,e=new oe,t=new oe;return function(n,a,o,s,l){r.subVectors(s,a),e.subVectors(o,a),t.subVectors(n,a);var u=r.dot(r),c=r.dot(e),f=r.dot(t),h=e.dot(e),p=e.dot(t),d=u*h-c*c,g=l||new oe;if(d===0)return g.set(-2,-1,-1);var m=1/d,v=(h*f-c*p)*m,_=(u*p-c*f)*m;return g.set(1-v-_,_,v)}}();Ss.containsPoint=function(){var r=new oe;return function(t,i,n,a){var o=Ss.barycoordFromPoint(t,i,n,a,r);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}();Ss.prototype={constructor:Ss,set:function(r,e,t){return this.a.copy(r),this.b.copy(e),this.c.copy(t),this},setFromPointsAndIndices:function(r,e,t,i){return this.a.copy(r[e]),this.b.copy(r[t]),this.c.copy(r[i]),this},clone:function(){return new this.constructor().copy(this)},copy:function(r){return this.a.copy(r.a),this.b.copy(r.b),this.c.copy(r.c),this},area:function(){var r=new oe,e=new oe;return function(){return r.subVectors(this.c,this.b),e.subVectors(this.a,this.b),r.cross(e).length()*.5}}(),midpoint:function(r){var e=r||new oe;return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(r){return Ss.normal(this.a,this.b,this.c,r)},plane:function(r){var e=r||new Io;return e.setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(r,e){return Ss.barycoordFromPoint(r,this.a,this.b,this.c,e)},containsPoint:function(r){return Ss.containsPoint(r,this.a,this.b,this.c)},closestPointToPoint:function(){var r,e,t,i;return function(a,o){r===void 0&&(r=new Io,e=[new Rd,new Rd,new Rd],t=new oe,i=new oe);var s=o||new oe,l=1/0;if(r.setFromCoplanarPoints(this.a,this.b,this.c),r.projectPoint(a,t),this.containsPoint(t)===!0)s.copy(t);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var u=0;u0,a=i[1]&&i[1].length>0,o=r.morphTargets,s=o.length,l;if(s>0){l=[];for(var u=0;u0){h=[];for(var u=0;u0)for(var h=0;h0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var r,e,t;for(this.computeFaceNormals(),r=0,e=this.faces.length;r0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var r,e,t,i,n;for(t=0,i=this.faces.length;t0&&(r+=e[t].distanceTo(e[t-1])),this.lineDistances[t]=r},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new lu),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new $n),this.boundingSphere.setFromPoints(this.vertices)},merge:function(r,e,t){if((r&&r.isGeometry)===!1){console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",r);return}var i,n=this.vertices.length,a=this.vertices,o=r.vertices,s=this.faces,l=r.faces,u=this.faceVertexUvs[0],c=r.faceVertexUvs[0],f=this.colors,h=r.colors;t===void 0&&(t=0),e!==void 0&&(i=new bs().getNormalMatrix(e));for(var p=0,d=o.length;p=0;s--){var m=p[s];for(this.faces.splice(m,1),f=0,h=this.faceVertexUvs.length;f0,_=p.vertexNormals.length>0,y=p.color.r!==1||p.color.g!==1||p.color.b!==1,x=p.vertexColors.length>0,M=0;if(M=C(M,0,0),M=C(M,1,d),M=C(M,2,g),M=C(M,3,m),M=C(M,4,v),M=C(M,5,_),M=C(M,6,y),M=C(M,7,x),o.push(M),o.push(p.a,p.b,p.c),o.push(p.materialIndex),m){var S=this.faceVertexUvs[0][n];o.push(I(S[0]),I(S[1]),I(S[2]))}if(v&&o.push(b(p.normal)),_){var w=p.vertexNormals;o.push(b(w[0]),b(w[1]),b(w[2]))}if(y&&o.push(E(p.color)),x){var T=p.vertexColors;o.push(E(T[0]),E(T[1]),E(T[2]))}}function C(R,A,D){return D?R|1<0&&(r.data.colors=u),f.length>0&&(r.data.uvs=[f]),r.data.faces=o,r},clone:function(){return new or().copy(this)},copy:function(r){this.vertices=[],this.faces=[],this.faceVertexUvs=[[]],this.colors=[];for(var e=r.vertices,t=0,i=e.length;t0){var t=new Float32Array(r.normals.length*3);this.addAttribute("normal",new gt(t,3).copyVector3sArray(r.normals))}if(r.colors.length>0){var i=new Float32Array(r.colors.length*3);this.addAttribute("color",new gt(i,3).copyColorsArray(r.colors))}if(r.uvs.length>0){var n=new Float32Array(r.uvs.length*2);this.addAttribute("uv",new gt(n,2).copyVector2sArray(r.uvs))}if(r.uvs2.length>0){var a=new Float32Array(r.uvs2.length*2);this.addAttribute("uv2",new gt(a,2).copyVector2sArray(r.uvs2))}if(r.indices.length>0){var o=r.vertices.length>65535?Uint32Array:Uint16Array,s=new o(r.indices.length*3);this.setIndex(new gt(s,1).copyIndicesArray(r.indices))}this.groups=r.groups;for(var l in r.morphTargets){for(var u=[],c=r.morphTargets[l],f=0,h=c.length;f0){var g=new gr(r.skinIndices.length*4,4);this.addAttribute("skinIndex",g.copyVector4sArray(r.skinIndices))}if(r.skinWeights.length>0){var m=new gr(r.skinWeights.length*4,4);this.addAttribute("skinWeight",m.copyVector4sArray(r.skinWeights))}return r.boundingSphere!==null&&(this.boundingSphere=r.boundingSphere.clone()),r.boundingBox!==null&&(this.boundingBox=r.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new lu);var r=this.attributes.position;r!==void 0?this.boundingBox.setFromBufferAttribute(r):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var r=new lu,e=new oe;return function(){this.boundingSphere===null&&(this.boundingSphere=new $n);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;r.setFromBufferAttribute(i),r.getCenter(n);for(var a=0,o=0,s=i.count;o0&&(r.data.groups=JSON.parse(JSON.stringify(s)));var l=this.boundingSphere;return l!==null&&(r.data.boundingSphere={center:l.center.toArray(),radius:l.radius}),r},clone:function(){return new Bt().copy(this)},copy:function(r){var e=r.index;e!==null&&this.setIndex(e.clone());var t=r.attributes;for(var i in t){var n=t[i];this.addAttribute(i,n.clone())}for(var a=r.groups,o=0,s=a.length;o0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var e=0,t=r.length;ey.far?null:{distance:E,point:d.clone(),object:_}}function v(_,y,x,M,S,w,T,C){i.fromArray(M,w*3),n.fromArray(M,T*3),a.fromArray(M,C*3);var b=m(_,y,x,i,n,a,p);return b&&(S&&(u.fromArray(S,w*2),c.fromArray(S,T*2),f.fromArray(S,C*2),b.uv=g(p,i,n,a,u,c,f)),b.face=new Fo(w,T,C,Ss.normal(i,n,a)),b.faceIndex=w),b}return function(y,x){var M=this.geometry,S=this.material,w=this.matrixWorld;if(S!==void 0&&(M.boundingSphere===null&&M.computeBoundingSphere(),t.copy(M.boundingSphere),t.applyMatrix4(w),y.ray.intersectsSphere(t)!==!1&&(r.getInverse(w),e.copy(y.ray).applyMatrix4(r),!(M.boundingBox!==null&&e.intersectsBox(M.boundingBox)===!1)))){var T,C;if(M.isBufferGeometry){var b,E,I,R=M.index,A=M.attributes,D=A.position.array;if(A.uv!==void 0&&(T=A.uv.array),R!==null)for(var U=R.array,B=0,F=U.length;B0&&(T=ae);for(var ve=0,ue=K.length;vea||i.push({distance:Math.sqrt(n),point:this.position,face:null,object:this})}}(),clone:function(){return new this.constructor(this.material).copy(this)}});kS.prototype=Object.assign(Object.create(Et.prototype),{constructor:kS,copy:function(r){Et.prototype.copy.call(this,r,!1);for(var e=r.levels,t=0,i=e.length;t1){r.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var a=r.distanceTo(e);n[0].object.visible=!0;for(var o=1,s=n.length;o=n[o].distance;o++)n[o-1].object.visible=!1,n[o].object.visible=!0;for(;os)){p.applyMatrix4(this.matrixWorld);var T=n.ray.origin.distanceTo(p);Tn.far||a.push({distance:T,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else for(var y=0,x=v.length/3-1;ys)){p.applyMatrix4(this.matrixWorld);var T=n.ray.origin.distanceTo(p);Tn.far||a.push({distance:T,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}else if(l.isGeometry)for(var C=l.vertices,b=C.length,y=0;ys)){p.applyMatrix4(this.matrixWorld);var T=n.ray.origin.distanceTo(p);Tn.far||a.push({distance:T,point:h.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});di.prototype=Object.assign(Object.create(oc.prototype),{constructor:di,isLineSegments:!0});dl.prototype=Object.create(mr.prototype);dl.prototype.constructor=dl;dl.prototype.isPointsMaterial=!0;dl.prototype.copy=function(r){return mr.prototype.copy.call(this,r),this.color.copy(r.color),this.map=r.map,this.size=r.size,this.sizeAttenuation=r.sizeAttenuation,this};iy.prototype=Object.assign(Object.create(Et.prototype),{constructor:iy,isPoints:!0,raycast:function(){var r=new qt,e=new Mh,t=new $n;return function(n,a){var o=this,s=this.geometry,l=this.matrixWorld,u=n.params.Points.threshold;if(s.boundingSphere===null&&s.computeBoundingSphere(),t.copy(s.boundingSphere),t.applyMatrix4(l),n.ray.intersectsSphere(t)===!1)return;r.getInverse(l),e.copy(n.ray).applyMatrix4(r);var c=u/((this.scale.x+this.scale.y+this.scale.z)/3),f=c*c,h=new oe;function p(w,T){var C=e.distanceSqToPoint(w);if(Cn.far)return;a.push({distance:E,distanceToRay:Math.sqrt(C),point:b.clone(),index:T,face:null,object:o})}}if(s.isBufferGeometry){var d=s.index,g=s.attributes,m=g.position.array;if(d!==null)for(var v=d.array,_=0,y=v.length;_=-Number.EPSILON&&R>=-Number.EPSILON&&I>=-Number.EPSILON))return!1;return!0}return function(t,i){var n=t.length;if(n<3)return null;var a=[],o=[],s=[],l,u,c;if(Ln.area(t)>0)for(u=0;u2;){if(h--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),i?s:a;if(l=u,f<=l&&(l=0),u=l+1,f<=u&&(u=0),c=u+1,f<=c&&(c=0),r(t,l,u,c,f,o)){var p,d,g,m,v;for(p=o[l],d=o[u],g=o[c],a.push([t[p],t[d],t[g]]),s.push([o[l],o[u],o[c]]),m=u,v=u+1;v2&&y[x-1].equals(y[0])&&y.pop()}t(r),e.forEach(t);function i(y,x,M){return y.x!==x.x?y.xNumber.EPSILON){var U;if(A>0){if(D<0||D>A)return[];if(U=E*I-b*R,U<0||U>A)return[]}else{if(D>0||D0||Uve?[]:J===ve?w?[]:[G]:Q<=ve?[G,Y]:[G,K]}}function a(y,x,M,S){var w=x.x-y.x,T=x.y-y.y,C=M.x-y.x,b=M.y-y.y,E=S.x-y.x,I=S.y-y.y,R=w*b-T*C,A=w*I-T*E;if(Math.abs(R)>Number.EPSILON){var D=E*b-I*C;return R>0?A>=0&&D>=0:A>=0||D>=0}else return A>0}function o(y,x){var M=y.concat(),S;function w(ve,ue){var se=M.length-1,Ee=ve-1;Ee<0&&(Ee=se);var q=ve+1;q>se&&(q=0);var H=a(M[ve],M[Ee],M[q],S[ue]);if(!H)return!1;var We=S.length-1,_e=ue-1;_e<0&&(_e=We);var xe=ue+1;return xe>We&&(xe=0),H=a(S[ue],S[_e],S[xe],M[ve]),!!H}function T(ve,ue){var se,Ee,q;for(se=0;se0)return!0;return!1}var C=[];function b(ve,ue){var se,Ee,q,H,We;for(se=0;se0)return!0;return!1}for(var E,I,R,A,D,U,B=[],F,k,G,Y,J=0,Q=x.length;J0;){if(K--,K<0){console.log("Infinite Loop! Holes left:"+C.length+", Probably Hole outside Shape!");break}for(I=V;I=0)break;B[U]=!0}if(E>=0)break}}return M}for(var s,l,u,c,f,h,p={},d=r.concat(),g=0,m=e.length;gNumber.EPSILON){var Se=Math.sqrt(et),Ae=Math.sqrt(me*me+he*he),nt=Ne.x-le/Se,$=Ne.y+ne/Se,it=Ve.x-he/Ae,Xe=Ve.y+me/Ae,ze=((it-nt)*he-(Xe-$)*me)/(ne*he-le*me);ct=nt+ne*ze-Ue.x,z=$+le*ze-Ue.y;var we=ct*ct+z*z;if(we<=2)return new St(ct,z);L=Math.sqrt(we/2)}else{var Ie=!1;ne>Number.EPSILON?me>Number.EPSILON&&(Ie=!0):ne<-Number.EPSILON?me<-Number.EPSILON&&(Ie=!0):Math.sign(le)===Math.sign(he)&&(Ie=!0),Ie?(ct=-le,z=ne,L=Math.sqrt(et)):(ct=ne,z=le,L=Math.sqrt(et/2))}return new St(ct/L,z/L)}for(var J=[],Q=0,V=E.length,K=V-1,ae=Q+1;Q=0;R--){for(D=R/a,U=i*Math.cos(D*Math.PI/2),A=n*Math.sin(D*Math.PI/2),Q=0,V=E.length;Q=0;){Ve=Q,ct=Q-1,ct<0&&(ct=Ue.length-1);var z=0,L=l+a*2;for(z=0;z0||r.search(/^data\:image\/jpeg/)===0;n.format=s?Kg:su,n.image=o,n.needsUpdate=!0,e!==void 0&&e(n)},t,i),n},setCrossOrigin:function(r){return this.crossOrigin=r,this},setWithCredentials:function(r){return this.withCredentials=r,this},setPath:function(r){return this.path=r,this}});Oi.prototype=Object.assign(Object.create(Et.prototype),{constructor:Oi,isLight:!0,copy:function(r){return Et.prototype.copy.call(this,r),this.color.copy(r.color),this.intensity=r.intensity,this},toJSON:function(r){var e=Et.prototype.toJSON.call(this,r);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),e}});QA.prototype=Object.assign(Object.create(Oi.prototype),{constructor:QA,isHemisphereLight:!0,copy:function(r){return Oi.prototype.copy.call(this,r),this.groundColor.copy(r.groundColor),this}});Object.assign(em.prototype,{copy:function(r){return this.camera=r.camera.clone(),this.bias=r.bias,this.radius=r.radius,this.mapSize.copy(r.mapSize),this},clone:function(){return new this.constructor().copy(this)},toJSON:function(){var r={};return this.bias!==0&&(r.bias=this.bias),this.radius!==1&&(r.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(r.mapSize=this.mapSize.toArray()),r.camera=this.camera.toJSON(!1).object,delete r.camera.matrix,r}});eC.prototype=Object.assign(Object.create(em.prototype),{constructor:eC,isSpotLightShadow:!0,update:function(r){var e=cr.RAD2DEG*2*r.angle,t=this.mapSize.width/this.mapSize.height,i=r.distance||500,n=this.camera;(e!==n.fov||t!==n.aspect||i!==n.far)&&(n.fov=e,n.aspect=t,n.far=i,n.updateProjectionMatrix())}});tC.prototype=Object.assign(Object.create(Oi.prototype),{constructor:tC,isSpotLight:!0,copy:function(r){return Oi.prototype.copy.call(this,r),this.distance=r.distance,this.angle=r.angle,this.penumbra=r.penumbra,this.decay=r.decay,this.target=r.target.clone(),this.shadow=r.shadow.clone(),this}});rC.prototype=Object.assign(Object.create(Oi.prototype),{constructor:rC,isPointLight:!0,copy:function(r){return Oi.prototype.copy.call(this,r),this.distance=r.distance,this.decay=r.decay,this.shadow=r.shadow.clone(),this}});iC.prototype=Object.assign(Object.create(em.prototype),{constructor:iC});nC.prototype=Object.assign(Object.create(Oi.prototype),{constructor:nC,isDirectionalLight:!0,copy:function(r){return Oi.prototype.copy.call(this,r),this.target=r.target.clone(),this.shadow=r.shadow.clone(),this}});aC.prototype=Object.assign(Object.create(Oi.prototype),{constructor:aC,isAmbientLight:!0});Jn={arraySlice:function(r,e,t){return Jn.isTypedArray(r)?new r.constructor(r.subarray(e,t)):r.slice(e,t)},convertArray:function(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)},isTypedArray:function(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)},getKeyframeOrder:function(r){function e(a,o){return r[a]-r[o]}for(var t=r.length,i=new Array(t),n=0;n!==t;++n)i[n]=n;return i.sort(e),i},sortedArray:function(r,e,t){for(var i=r.length,n=new r.constructor(i),a=0,o=0;o!==i;++a)for(var s=t[a]*e,l=0;l!==e;++l)n[o++]=r[s+l];return n},flattenJSON:function(r,e,t,i){for(var n=1,a=r[0];a!==void 0&&a[i]===void 0;)a=r[n++];if(a!==void 0){var o=a[i];if(o!==void 0)if(Array.isArray(o))do o=a[i],o!==void 0&&(e.push(a.time),t.push.apply(t,o)),a=r[n++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[i],o!==void 0&&(e.push(a.time),o.toArray(t,t.length)),a=r[n++];while(a!==void 0);else do o=a[i],o!==void 0&&(e.push(a.time),t.push(o)),a=r[n++];while(a!==void 0)}}};ro.prototype={constructor:ro,evaluate:function(r){var e=this.parameterPositions,t=this._cachedIndex,i=e[t],n=e[t-1];e:{t:{var a;r:{i:if(!(r=n)){var s=e[1];r=n)break t}a=t,t=0;break r}break e}for(;t>>1;re;)--a;if(++a,n!==0||a!==i){n>=a&&(a=Math.max(a,1),n=a-1);var o=this.getValueSize();this.times=Jn.arraySlice(t,n,a),this.values=Jn.arraySlice(this.values,n*o,a*o)}return this},validate:function(){var r=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("invalid value size in track",this),r=!1);var t=this.times,i=this.values,n=t.length;n===0&&(console.error("track is empty",this),r=!1);for(var a=null,o=0;o!==n;o++){var s=t[o];if(typeof s=="number"&&isNaN(s)){console.error("time is not a valid number",this,o,s),r=!1;break}if(a!==null&&a>s){console.error("out of order keys",this,o,s,a),r=!1;break}a=s}if(i!==void 0&&Jn.isTypedArray(i))for(var o=0,l=i.length;o!==l;++o){var u=i[o];if(isNaN(u)){console.error("value is not a valid number",this,o,u),r=!1;break}}return r},optimize:function(){for(var r=this.times,e=this.values,t=this.getValueSize(),i=this.getInterpolation()===VA,n=1,a=r.length-1,o=1;o0){r[n]=r[a];for(var g=a*t,m=n*t,p=0;p!==t;++p)e[m+p]=e[g+p];++n}return n!==r.length&&(this.times=Jn.arraySlice(r,0,n),this.values=Jn.arraySlice(e,0,n*t)),this}};Sy.prototype=Object.assign(Object.create(uc),{constructor:Sy,ValueTypeName:"vector"});lC.prototype=Object.assign(Object.create(ro.prototype),{constructor:lC,interpolate_:function(r,e,t,i){for(var n=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=r*o,l=(t-e)/(i-e),u=s+o;s!==u;s+=4)on.slerpFlat(n,0,a,s-o,a,s,l);return n}});uM.prototype=Object.assign(Object.create(uc),{constructor:uM,ValueTypeName:"quaternion",DefaultInterpolation:bS,InterpolantFactoryMethodLinear:function(r){return new lC(this.times,this.values,this.getValueSize(),r)},InterpolantFactoryMethodSmooth:void 0});My.prototype=Object.assign(Object.create(uc),{constructor:My,ValueTypeName:"number"});uC.prototype=Object.assign(Object.create(uc),{constructor:uC,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:CS,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});cC.prototype=Object.assign(Object.create(uc),{constructor:cC,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:CS,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});fC.prototype=Object.assign(Object.create(uc),{constructor:fC,ValueTypeName:"color"});qd.prototype=uc;uc.constructor=qd;Object.assign(qd,{parse:function(r){if(r.type===void 0)throw new Error("track type undefined, can not parse");var e=qd._getTrackTypeForValueTypeName(r.type);if(r.times===void 0){var t=[],i=[];Jn.flattenJSON(r.keys,t,i,"value"),r.times=t,r.values=i}return e.parse!==void 0?e.parse(r):new e(r.name,r.times,r.values,r.interpolation)},toJSON:function(r){var e=r.constructor,t;if(e.toJSON!==void 0)t=e.toJSON(r);else{t={name:r.name,times:Jn.convertArray(r.times,Array),values:Jn.convertArray(r.values,Array)};var i=r.getInterpolation();i!==r.DefaultInterpolation&&(t.interpolation=i)}return t.type=r.ValueTypeName,t},_getTrackTypeForValueTypeName:function(r){switch(r.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return My;case"vector":case"vector2":case"vector3":case"vector4":return Sy;case"color":return fC;case"quaternion":return uM;case"bool":case"boolean":return cC;case"string":return uC}throw new Error("Unsupported typeName: "+r)}});No.prototype={constructor:No,resetDuration:function(){for(var r=this.tracks,e=0,t=0,i=r.length;t!==i;++t){var n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}this.duration=e},trim:function(){for(var r=0;r1){var u=l[1],c=i[u];c||(i[u]=c=[]),c.push(s)}}var f=[];for(var u in i)f.push(No.CreateFromMorphTargetSequence(u,i[u],e,t));return f},parseAnimation:function(r,e){if(!r)return console.error(" no animation in JSONLoader data"),null;for(var t=function(y,x,M,S,w){if(M.length!==0){var T=[],C=[];Jn.flattenJSON(M,T,C,S),T.length!==0&&w.push(new y(x,T,C))}},i=[],n=r.name||"default",a=r.length||-1,o=r.fps||30,s=r.hierarchy||[],l=0;l1?r.skinWeights[c+1]:0,d=u>2?r.skinWeights[c+2]:0,g=u>3?r.skinWeights[c+3]:0;t.skinWeights.push(new Qr(h,p,d,g))}if(r.skinIndices)for(var c=0,f=r.skinIndices.length;c1?r.skinIndices[c+1]:0,_=u>2?r.skinIndices[c+2]:0,y=u>3?r.skinIndices[c+3]:0;t.skinIndices.push(new Qr(m,v,_,y))}t.bones=r.bones,t.bones&&t.bones.length>0&&(t.skinWeights.length!==t.skinIndices.length||t.skinIndices.length!==t.vertices.length)&&console.warn("When skinning, number of vertices ("+t.vertices.length+"), skinIndices ("+t.skinIndices.length+"), and skinWeights ("+t.skinWeights.length+") should match.")}function o(u){if(r.morphTargets!==void 0)for(var c=0,f=r.morphTargets.length;c0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var v=t.faces,_=r.morphColors[0].colors,c=0,f=v.length;c0&&(t.animations=u)}if(r.materials===void 0||r.materials.length===0)return{geometry:t};var l=Ld.prototype.initMaterials(r.materials,e,this.crossOrigin);return{geometry:t,materials:l}}});Object.assign(Yne.prototype,{load:function(r,e,t,i){this.texturePath===""&&(this.texturePath=r.substring(0,r.lastIndexOf("/")+1));var n=this,a=new Ts(n.manager);a.load(r,function(o){var s=null;try{s=JSON.parse(o)}catch(u){console.error("THREE:ObjectLoader: Can't parse "+r+".",u.message);return}var l=s.metadata;if(l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry"){console.error("THREE.ObjectLoader: Can't load "+r+". Use THREE.JSONLoader instead.");return}n.parse(s,e)},t,i)},setTexturePath:function(r){this.texturePath=r},setCrossOrigin:function(r){this.crossOrigin=r},parse:function(r,e){var t=this.parseGeometries(r.geometries),i=this.parseImages(r.images,function(){e!==void 0&&e(o)}),n=this.parseTextures(r.textures,i),a=this.parseMaterials(r.materials,n),o=this.parseObject(r.object,t,a);return r.animations&&(o.animations=this.parseAnimations(r.animations)),(r.images===void 0||r.images.length===0)&&e!==void 0&&e(o),o},parseGeometries:function(r){var e={};if(r!==void 0)for(var t=new iB,i=new rB,n=0,a=r.length;n0){var a=new Qz(e),o=new yM(a);o.setCrossOrigin(this.crossOrigin);for(var s=0,l=r.length;s0?a=new KA(l,u):a=new mn(l,u);break;case"LOD":a=new kS;break;case"Line":a=new oc(o(t.geometry),s(t.material),t.mode);break;case"LineSegments":a=new di(o(t.geometry),s(t.material));break;case"PointCloud":case"Points":a=new iy(o(t.geometry),s(t.material));break;case"Sprite":a=new BS(s(t.material));break;case"Group":a=new VS;break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh type. Instantiates Object3D instead.");default:a=new Et}if(a.uuid=t.uuid,t.name!==void 0&&(a.name=t.name),t.matrix!==void 0?(r.fromArray(t.matrix),r.decompose(a.position,a.quaternion,a.scale)):(t.position!==void 0&&a.position.fromArray(t.position),t.rotation!==void 0&&a.rotation.fromArray(t.rotation),t.quaternion!==void 0&&a.quaternion.fromArray(t.quaternion),t.scale!==void 0&&a.scale.fromArray(t.scale)),t.castShadow!==void 0&&(a.castShadow=t.castShadow),t.receiveShadow!==void 0&&(a.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(a.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(a.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(a.visible=t.visible),t.userData!==void 0&&(a.userData=t.userData),t.children!==void 0)for(var c in t.children)a.add(this.parseObject(t.children[c],i,n));if(t.type==="LOD")for(var f=t.levels,h=0;h0)s=i-1;else{s=i;break}if(i=s,t[i]===a){var p=i/(n-1);return p}var u=t[i],c=t[i+1],f=c-u,h=(a-u)/f,p=(i+h)/(n-1);return p},getTangent:function(r){var e=1e-4,t=r-e,i=r+e;t<0&&(t=0),i>1&&(i=1);var n=this.getPoint(t),a=this.getPoint(i),o=a.clone().sub(n);return o.normalize()},getTangentAt:function(r){var e=this.getUtoTmapping(r);return this.getTangent(e)},computeFrenetFrames:function(r,e){var t=new oe,i=[],n=[],a=[],o=new oe,s=new qt,l,u,c;for(l=0;l<=r;l++)u=l/r,i[l]=this.getTangentAt(u),i[l].normalize();n[0]=new oe,a[0]=new oe;var f=Number.MAX_VALUE,h=Math.abs(i[0].x),p=Math.abs(i[0].y),d=Math.abs(i[0].z);for(h<=f&&(f=h,t.set(1,0,0)),p<=f&&(f=p,t.set(0,1,0)),d<=f&&t.set(0,0,1),o.crossVectors(i[0],t).normalize(),n[0].crossVectors(i[0],o),a[0].crossVectors(i[0],n[0]),l=1;l<=r;l++)n[l]=n[l-1].clone(),a[l]=a[l-1].clone(),o.crossVectors(i[l-1],i[l]),o.length()>Number.EPSILON&&(o.normalize(),c=Math.acos(cr.clamp(i[l-1].dot(i[l]),-1,1)),n[l].applyMatrix4(s.makeRotationAxis(o,c))),a[l].crossVectors(i[l],n[l]);if(e===!0)for(c=Math.acos(cr.clamp(n[0].dot(n[r]),-1,1)),c/=r,i[0].dot(o.crossVectors(n[0],n[r]))>0&&(c=-c),l=1;l<=r;l++)n[l].applyMatrix4(s.makeRotationAxis(i[l],c*l)),a[l].crossVectors(i[l],n[l]);return{tangents:i,normals:n,binormals:a}}};ea.create=function(r,e){return r.prototype=Object.create(ea.prototype),r.prototype.constructor=r,r.prototype.getPoint=e,r};cu.prototype=Object.create(ea.prototype);cu.prototype.constructor=cu;cu.prototype.isLineCurve=!0;cu.prototype.getPoint=function(r){if(r===1)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(r).add(this.v1),e};cu.prototype.getPointAt=function(r){return this.getPoint(r)};cu.prototype.getTangent=function(r){var e=this.v2.clone().sub(this.v1);return e.normalize()};cM.prototype=Object.assign(Object.create(ea.prototype),{constructor:cM,add:function(r){this.curves.push(r)},closePath:function(){var r=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);r.equals(e)||this.curves.push(new cu(e,r))},getPoint:function(r){for(var e=r*this.getLength(),t=this.getCurveLengths(),i=0;i=e){var n=t[i]-e,a=this.curves[i],o=a.getLength(),s=o===0?0:1-n/o;return a.getPointAt(s)}i++}return null},getLength:function(){var r=this.getCurveLengths();return r[r.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var r=[],e=0,t=0,i=this.curves.length;t1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},createPointsGeometry:function(r){var e=this.getPoints(r);return this.createGeometry(e)},createSpacedPointsGeometry:function(r){var e=this.getSpacedPoints(r);return this.createGeometry(e)},createGeometry:function(r){for(var e=new or,t=0,i=r.length;te;)t-=e;te.length-2?e.length-1:i+1],l=e[i>e.length-3?e.length-1:i+2],u=_M.interpolate;return new St(u(a.x,o.x,s.x,l.x,n),u(a.y,o.y,s.y,l.y,n))};jd.prototype=Object.create(ea.prototype);jd.prototype.constructor=jd;jd.prototype.getPoint=function(r){var e=Ln.b3;return new St(e(r,this.v0.x,this.v1.x,this.v2.x,this.v3.x),e(r,this.v0.y,this.v1.y,this.v2.y,this.v3.y))};jd.prototype.getTangent=function(r){var e=_M.tangentCubicBezier;return new St(e(r,this.v0.x,this.v1.x,this.v2.x,this.v3.x),e(r,this.v0.y,this.v1.y,this.v2.y,this.v3.y)).normalize()};Kd.prototype=Object.create(ea.prototype);Kd.prototype.constructor=Kd;Kd.prototype.getPoint=function(r){var e=Ln.b2;return new St(e(r,this.v0.x,this.v1.x,this.v2.x),e(r,this.v0.y,this.v1.y,this.v2.y))};Kd.prototype.getTangent=function(r){var e=_M.tangentQuadraticBezier;return new St(e(r,this.v0.x,this.v1.x,this.v2.x),e(r,this.v0.y,this.v1.y,this.v2.y)).normalize()};nB=Object.assign(Object.create(cM.prototype),{fromPoints:function(r){this.moveTo(r[0].x,r[0].y);for(var e=1,t=r.length;e0){var u=l.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(l);var c=l.getPoint(1);this.currentPoint.copy(c)}});Pd.prototype=Object.assign(Object.create(nB),{constructor:Pd,getPointsHoles:function(r){for(var e=[],t=0,i=this.holes.length;tNumber.EPSILON){if(V<0&&(Y=U[G],Q=-Q,J=U[k],V=-V),D.yJ.y)continue;if(D.y===Y.y){if(D.x===Y.x)return!0}else{var K=V*(D.x-Y.x)-Q*(D.y-Y.y);if(K===0)return!0;if(K<0)continue;F=!F}}else{if(D.y!==Y.y)continue;if(J.x<=D.x&&D.x<=Y.x||Y.x<=D.x&&D.x<=J.x)return!0}}return F}var n=Ln.isClockWise,a=this.subPaths;if(a.length===0)return[];if(e===!0)return t(a);var o,s,l,u=[];if(a.length===1)return s=a[0],l=new Pd,l.curves=s.curves,u.push(l),u;var c=!n(a[0].getPoints());c=r?!c:c;var f=[],h=[],p=[],d=0,g;h[d]=void 0,p[d]=[];for(var m=0,v=a.length;m1){for(var _=!1,y=[],x=0,M=h.length;x0&&(_||(p=f))}for(var E,m=0,I=h.length;m0){this.source.connect(this.filters[0]);for(var r=1,e=this.filters.length;r0){this.source.disconnect(this.filters[0]);for(var r=1,e=this.filters.length;r=.5)for(var a=0;a!==n;++a)r[e+a]=r[t+a]},_slerp:function(r,e,t,i,n){on.slerpFlat(r,e,r,e,r,t,i)},_lerp:function(r,e,t,i,n){for(var a=1-i,o=0;o!==n;++o){var s=e+o;r[s]=r[s]*a+r[t+o]*i}}};Ri.prototype={constructor:Ri,getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var r=this.node,e=this.parsedPath,t=e.objectName,i=e.propertyName,n=e.propertyIndex;if(r||(r=Ri.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=r),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!r){console.error(" trying to update node for track: "+this.path+" but it wasn't found.");return}if(t){var a=e.objectIndex;switch(t){case"materials":if(!r.material){console.error(" can not bind to material as node does not have a material",this);return}if(!r.material.materials){console.error(" can not bind to material.materials as node.material does not have a materials array",this);return}r=r.material.materials;break;case"bones":if(!r.skeleton){console.error(" can not bind to bones as node does not have a skeleton",this);return}r=r.skeleton.bones;for(var o=0;o=t){var f=t++,h=e[f];i[h.uuid]=c,e[c]=h,i[u]=f,e[f]=l;for(var p=0,d=a;p!==d;++p){var g=n[p],m=g[f],v=g[c];g[c]=m,g[f]=v}}}this.nCachedObjects_=t},uncache:function(r){for(var e=this._objects,t=e.length,i=this.nCachedObjects_,n=this._indicesByUUID,a=this._bindings,o=a.length,s=0,l=arguments.length;s!==l;++s){var u=arguments[s],c=u.uuid,f=n[c];if(f!==void 0)if(delete n[c],f0)for(var l=this._interpolants,u=this._propertyBindings,c=0,f=l.length;c!==f;++c)l[c].evaluate(o),u[c].accumulate(i,s)},_updateWeight:function(r){var e=0;if(this.enabled){e=this.weight;var t=this._weightInterpolant;if(t!==null){var i=t.evaluate(r)[0];e*=i,r>t.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(r){var e=0;if(!this.paused){e=this.timeScale;var t=this._timeScaleInterpolant;if(t!==null){var i=t.evaluate(r)[0];e*=i,r>t.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e},_updateTime:function(r){var e=this.time+r;if(r===0)return e;var t=this._clip.duration,i=this.loop,n=this._loopCount;if(i===Mne){n===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(e>=t)e=t;else if(e<0)e=0;else break e;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:r<0?-1:1})}}else{var a=i===wne;if(n===-1&&(r>=0?(n=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),e>=t||e<0){var o=Math.floor(e/t);e-=t*o,n+=Math.abs(o);var s=this.repetitions-n;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=r>0?t:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:r>0?1:-1});else{if(s===0){var l=r<0;this._setEndings(l,!l,a)}else this._setEndings(!1,!1,a);this._loopCount=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}if(a&&(n&1)===1)return this.time=e,t-e}return this.time=e,e},_setEndings:function(r,e,t){var i=this._interpolantSettings;t?(i.endingStart=Ad,i.endingEnd=Ad):(r?i.endingStart=this.zeroSlopeAtStart?Ad:Id:i.endingStart=RS,e?i.endingEnd=this.zeroSlopeAtEnd?Ad:Id:i.endingEnd=RS)},_scheduleFading:function(r,e,t){var i=this._mixer,n=i.time,a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=n,s[0]=e,o[1]=n+r,s[1]=t,this}};Object.assign(cB.prototype,Ms.prototype,{clipAction:function(r,e){var t=e||this._root,i=t.uuid,n=typeof r=="string"?No.findByName(t,r):r,a=n!==null?n.uuid:r,o=this._actionsByClip[a],s=null;if(o!==void 0){var l=o.actionByRoot[i];if(l!==void 0)return l;s=o.knownActions[0],n===null&&(n=s._clip)}if(n===null)return null;var u=new Tz(this,n,e);return this._bindAction(u,s),this._addInactiveAction(u,a,i),u},existingAction:function(r,e){var t=e||this._root,i=t.uuid,n=typeof r=="string"?No.findByName(t,r):r,a=n?n.uuid:r,o=this._actionsByClip[a];return o!==void 0&&o.actionByRoot[i]||null},stopAllAction:function(){var r=this._actions,e=this._nActiveActions,t=this._bindings,i=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var n=0;n!==e;++n)r[n].reset();for(var n=0;n!==i;++n)t[n].useCount=0;return this},update:function(r){r*=this.timeScale;for(var e=this._actions,t=this._nActiveActions,i=this.time+=r,n=Math.sign(r),a=this._accuIndex^=1,o=0;o!==t;++o){var s=e[o];s.enabled&&s._update(i,r,n,a)}for(var l=this._bindings,u=this._nActiveBindings,o=0;o!==u;++o)l[o].apply(a);return this},getRoot:function(){return this._root},uncacheClip:function(r){var e=this._actions,t=r.uuid,i=this._actionsByClip,n=i[t];if(n!==void 0){for(var a=n.knownActions,o=0,s=a.length;o!==s;++o){var l=a[o];this._deactivateAction(l);var u=l._cacheIndex,c=e[e.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,c._cacheIndex=u,e[u]=c,e.pop(),this._removeInactiveBindingsForAction(l)}delete i[t]}},uncacheRoot:function(r){var e=r.uuid,t=this._actionsByClip;for(var i in t){var n=t[i].actionByRoot,a=n[e];a!==void 0&&(this._deactivateAction(a),this._removeInactiveAction(a))}var o=this._bindingsByRootAndName,s=o[e];if(s!==void 0)for(var l in s){var u=s[l];u.restoreOriginalState(),this._removeInactiveBinding(u)}},uncacheAction:function(r,e){var t=this.existingAction(r,e);t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}});Object.assign(cB.prototype,{_bindAction:function(r,e){var t=r._localRoot||this._root,i=r._clip.tracks,n=i.length,a=r._propertyBindings,o=r._interpolants,s=t.uuid,l=this._bindingsByRootAndName,u=l[s];u===void 0&&(u={},l[s]=u);for(var c=0;c!==n;++c){var f=i[c],h=f.name,p=u[h];if(p!==void 0)a[c]=p;else{if(p=a[c],p!==void 0){p._cacheIndex===null&&(++p.referenceCount,this._addInactiveBinding(p,s,h));continue}var d=e&&e._propertyBindings[c].binding.parsedPath;p=new pC(Ri.create(t,h,d),f.ValueTypeName,f.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,s,h),a[c]=p}o[c].resultBuffer=p.buffer}},_activateAction:function(r){if(!this._isActiveAction(r)){if(r._cacheIndex===null){var e=(r._localRoot||this._root).uuid,t=r._clip.uuid,i=this._actionsByClip[t];this._bindAction(r,i&&i.knownActions[0]),this._addInactiveAction(r,t,e)}for(var n=r._propertyBindings,a=0,o=n.length;a!==o;++a){var s=n[a];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(r)}},_deactivateAction:function(r){if(this._isActiveAction(r)){for(var e=r._propertyBindings,t=0,i=e.length;t!==i;++t){var n=e[t];--n.useCount===0&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(r)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var r=this;this.stats={actions:{get total(){return r._actions.length},get inUse(){return r._nActiveActions}},bindings:{get total(){return r._bindings.length},get inUse(){return r._nActiveBindings}},controlInterpolants:{get total(){return r._controlInterpolants.length},get inUse(){return r._nActiveControlInterpolants}}}},_isActiveAction:function(r){var e=r._cacheIndex;return e!==null&&e1){var u=l[1];i[u]||(i[u]={start:1/0,end:-1/0});var c=i[u];ac.end&&(c.end=a),t||(t=u)}}for(var u in i){var c=i[u];this.createAnimation(u,c.start,c.end,r)}this.firstAnimation=t};Pn.prototype.setAnimationDirectionForward=function(r){var e=this.animationsMap[r];e&&(e.direction=1,e.directionBackwards=!1)};Pn.prototype.setAnimationDirectionBackward=function(r){var e=this.animationsMap[r];e&&(e.direction=-1,e.directionBackwards=!0)};Pn.prototype.setAnimationFPS=function(r,e){var t=this.animationsMap[r];t&&(t.fps=e,t.duration=(t.end-t.start)/t.fps)};Pn.prototype.setAnimationDuration=function(r,e){var t=this.animationsMap[r];t&&(t.duration=e,t.fps=(t.end-t.start)/t.duration)};Pn.prototype.setAnimationWeight=function(r,e){var t=this.animationsMap[r];t&&(t.weight=e)};Pn.prototype.setAnimationTime=function(r,e){var t=this.animationsMap[r];t&&(t.time=e)};Pn.prototype.getAnimationTime=function(r){var e=0,t=this.animationsMap[r];return t&&(e=t.time),e};Pn.prototype.getAnimationDuration=function(r){var e=-1,t=this.animationsMap[r];return t&&(e=t.duration),e};Pn.prototype.playAnimation=function(r){var e=this.animationsMap[r];e?(e.time=0,e.active=!0):console.warn("THREE.MorphBlendMesh: animation["+r+"] undefined in .playAnimation()")};Pn.prototype.stopAnimation=function(r){var e=this.animationsMap[r];e&&(e.active=!1)};Pn.prototype.update=function(r){for(var e=0,t=this.animationsList.length;ei.duration||i.time<0)&&(i.direction*=-1,i.time>i.duration&&(i.time=i.duration,i.directionBackwards=!0),i.time<0&&(i.time=0,i.directionBackwards=!1)):(i.time=i.time%i.duration,i.time<0&&(i.time+=i.duration));var a=i.start+cr.clamp(Math.floor(i.time/n),0,i.length-1),o=i.weight;a!==i.currentFrame&&(this.morphTargetInfluences[i.lastFrame]=0,this.morphTargetInfluences[i.currentFrame]=1*o,this.morphTargetInfluences[a]=0,i.lastFrame=i.currentFrame,i.currentFrame=a);var s=i.time%n/n;i.directionBackwards&&(s=1-s),i.currentFrame!==i.lastFrame?(this.morphTargetInfluences[i.currentFrame]=s*o,this.morphTargetInfluences[i.lastFrame]=(1-s)*o):this.morphTargetInfluences[i.currentFrame]=o}}};fM.prototype=Object.create(Et.prototype);fM.prototype.constructor=fM;fM.prototype.isImmediateRenderObject=!0;hM.prototype=Object.create(di.prototype);hM.prototype.constructor=hM;hM.prototype.update=function(){var r=new oe,e=new oe,t=new bs;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),t.getNormalMatrix(this.object.matrixWorld);var a=this.object.matrixWorld,o=this.geometry.attributes.position,s=this.object.geometry;if(s&&s.isGeometry)for(var l=s.vertices,u=s.faces,c=0,f=0,h=u.length;f.99999?this.quaternion.set(0,0,0,1):i.y<-.99999?this.quaternion.set(1,0,0,0):(r.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(r,e))}}();$d.prototype.setLength=function(r,e,t){e===void 0&&(e=.2*r),t===void 0&&(t=.2*e),this.line.scale.set(1,Math.max(0,r-e),1),this.line.updateMatrix(),this.cone.scale.set(t,e,t),this.cone.position.y=r,this.cone.updateMatrix()};$d.prototype.setColor=function(r){this.line.material.color.copy(r),this.cone.material.color.copy(r)};vC.prototype=Object.create(di.prototype);vC.prototype.constructor=vC;fB=function(){var r=new oe,e=new n,t=new n,i=new n;function n(){}return n.prototype.init=function(a,o,s,l){this.c0=a,this.c1=s,this.c2=-3*a+3*o-2*s-l,this.c3=2*a-2*o+s+l},n.prototype.initNonuniformCatmullRom=function(a,o,s,l,u,c,f){var h=(o-a)/u-(s-a)/(u+c)+(s-o)/c,p=(s-o)/c-(l-o)/(c+f)+(l-s)/f;h*=c,p*=c,this.init(o,s,h,p)},n.prototype.initCatmullRom=function(a,o,s,l,u){this.init(o,s,u*(s-a),u*(l-o))},n.prototype.calc=function(a){var o=a*a,s=o*a;return this.c0+this.c1*a+this.c2*o+this.c3*s},ea.create(function(a){this.points=a||[],this.closed=!1},function(a){var o=this.points,s,l,u,c;c=o.length,c<2&&console.log("duh, you need at least 2 points"),s=(c-(this.closed?0:1))*a,l=Math.floor(s),u=s-l,this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/o.length)+1)*o.length:u===0&&l===c-1&&(l=c-2,u=1);var f,h,p,d;if(this.closed||l>0?f=o[(l-1)%c]:(r.subVectors(o[0],o[1]).add(o[0]),f=r),h=o[l%c],p=o[(l+1)%c],this.closed||l+2e.length-2?e.length-1:i+1],l=e[i>e.length-3?e.length-1:i+2],u=_M.interpolate;return new oe(u(a.x,o.x,s.x,l.x,n),u(a.y,o.y,s.y,l.y,n),u(a.z,o.z,s.z,l.z,n))}),eLe=ea.create(function(r,e,t,i){this.v0=r,this.v1=e,this.v2=t,this.v3=i},function(r){var e=Ln.b3;return new oe(e(r,this.v0.x,this.v1.x,this.v2.x,this.v3.x),e(r,this.v0.y,this.v1.y,this.v2.y,this.v3.y),e(r,this.v0.z,this.v1.z,this.v2.z,this.v3.z))}),tLe=ea.create(function(r,e,t){this.v0=r,this.v1=e,this.v2=t},function(r){var e=Ln.b2;return new oe(e(r,this.v0.x,this.v1.x,this.v2.x),e(r,this.v0.y,this.v1.y,this.v2.y),e(r,this.v0.z,this.v1.z,this.v2.z))}),rLe=ea.create(function(r,e){this.v1=r,this.v2=e},function(r){if(r===1)return this.v2.clone();var e=new oe;return e.subVectors(this.v2,this.v1),e.multiplyScalar(r),e.add(this.v1),e});gC.prototype=Object.create(lc.prototype);gC.prototype.constructor=gC;iLe={createMultiMaterialObject:function(r,e){for(var t=new VS,i=0,n=e.length;i{"use strict";var ILe=AC&&AC.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function i(){this.constructor=r}r.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)},Fr=(Qne(),Use($ne)),xi={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},eae={type:"change"},hB={type:"start"},pB={type:"end"},tae=1e-6,NLe=function(r){ILe(e,r);function e(t,i,n){var a=r.call(this)||this;return a.object=t,a.domElement=i!==void 0?i:document,a.window=n!==void 0?n:window,a.enabled=!0,a.target=new Fr.Vector3,a.minDistance=0,a.maxDistance=1/0,a.minZoom=0,a.maxZoom=1/0,a.minPolarAngle=0,a.maxPolarAngle=Math.PI,a.minAzimuthAngle=-1/0,a.maxAzimuthAngle=1/0,a.enableDamping=!1,a.dampingFactor=.25,a.enableZoom=!0,a.zoomSpeed=1,a.enableRotate=!0,a.rotateSpeed=1,a.enablePan=!0,a.keyPanSpeed=7,a.autoRotate=!1,a.autoRotateSpeed=2,a.enableKeys=!0,a.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},a.mouseButtons={ORBIT:Fr.MOUSE.LEFT,ZOOM:Fr.MOUSE.MIDDLE,PAN:Fr.MOUSE.RIGHT},a.target0=a.target.clone(),a.position0=a.object.position.clone(),a.zoom0=a.object.zoom,a.updateOffset=new Fr.Vector3,a.updateQuat=new Fr.Quaternion().setFromUnitVectors(t.up,new Fr.Vector3(0,1,0)),a.updateQuatInverse=a.updateQuat.clone().inverse(),a.updateLastPosition=new Fr.Vector3,a.updateLastQuaternion=new Fr.Quaternion,a.state=xi.NONE,a.scale=1,a.spherical=new Fr.Spherical,a.sphericalDelta=new Fr.Spherical,a.panOffset=new Fr.Vector3,a.zoomChanged=!1,a.rotateStart=new Fr.Vector2,a.rotateEnd=new Fr.Vector2,a.rotateDelta=new Fr.Vector2,a.panStart=new Fr.Vector2,a.panEnd=new Fr.Vector2,a.panDelta=new Fr.Vector2,a.dollyStart=new Fr.Vector2,a.dollyEnd=new Fr.Vector2,a.dollyDelta=new Fr.Vector2,a.panLeftV=new Fr.Vector3,a.panUpV=new Fr.Vector3,a.panInternalOffset=new Fr.Vector3,a.onMouseDown=function(o){if(a.enabled!==!1){if(o.preventDefault(),o.button===a.mouseButtons.ORBIT){if(a.enableRotate===!1)return;a.rotateStart.set(o.clientX,o.clientY),a.state=xi.ROTATE}else if(o.button===a.mouseButtons.ZOOM){if(a.enableZoom===!1)return;a.dollyStart.set(o.clientX,o.clientY),a.state=xi.DOLLY}else if(o.button===a.mouseButtons.PAN){if(a.enablePan===!1)return;a.panStart.set(o.clientX,o.clientY),a.state=xi.PAN}a.state!==xi.NONE&&(document.addEventListener("mousemove",a.onMouseMove,!1),document.addEventListener("mouseup",a.onMouseUp,!1),a.dispatchEvent(hB))}},a.onMouseMove=function(o){if(a.enabled!==!1){if(o.preventDefault(),a.state===xi.ROTATE){if(a.enableRotate===!1)return;a.rotateEnd.set(o.clientX,o.clientY),a.rotateDelta.subVectors(a.rotateEnd,a.rotateStart);var s=a.domElement===document?a.domElement.body:a.domElement;a.rotateLeft(2*Math.PI*a.rotateDelta.x/s.clientWidth*a.rotateSpeed),a.rotateUp(2*Math.PI*a.rotateDelta.y/s.clientHeight*a.rotateSpeed),a.rotateStart.copy(a.rotateEnd),a.update()}else if(a.state===xi.DOLLY){if(a.enableZoom===!1)return;a.dollyEnd.set(o.clientX,o.clientY),a.dollyDelta.subVectors(a.dollyEnd,a.dollyStart),a.dollyDelta.y>0?a.dollyIn(a.getZoomScale()):a.dollyDelta.y<0&&a.dollyOut(a.getZoomScale()),a.dollyStart.copy(a.dollyEnd),a.update()}else if(a.state===xi.PAN){if(a.enablePan===!1)return;a.panEnd.set(o.clientX,o.clientY),a.panDelta.subVectors(a.panEnd,a.panStart),a.pan(a.panDelta.x,a.panDelta.y),a.panStart.copy(a.panEnd),a.update()}}},a.onMouseUp=function(o){a.enabled!==!1&&(document.removeEventListener("mousemove",a.onMouseMove,!1),document.removeEventListener("mouseup",a.onMouseUp,!1),a.dispatchEvent(pB),a.state=xi.NONE)},a.onMouseWheel=function(o){a.enabled===!1||a.enableZoom===!1||a.state!==xi.NONE&&a.state!==xi.ROTATE||(o.preventDefault(),o.stopPropagation(),o.deltaY<0?a.dollyOut(a.getZoomScale()):o.deltaY>0&&a.dollyIn(a.getZoomScale()),a.update(),a.dispatchEvent(hB),a.dispatchEvent(pB))},a.onKeyDown=function(o){if(!(a.enabled===!1||a.enableKeys===!1||a.enablePan===!1))switch(o.keyCode){case a.keys.UP:a.pan(0,a.keyPanSpeed),a.update();break;case a.keys.BOTTOM:a.pan(0,-a.keyPanSpeed),a.update();break;case a.keys.LEFT:a.pan(a.keyPanSpeed,0),a.update();break;case a.keys.RIGHT:a.pan(-a.keyPanSpeed,0),a.update();break}},a.onTouchStart=function(o){if(a.enabled!==!1){switch(o.touches.length){case 1:{if(a.enableRotate===!1)return;a.rotateStart.set(o.touches[0].pageX,o.touches[0].pageY),a.state=xi.TOUCH_ROTATE}break;case 2:{if(a.enableZoom===!1)return;var s=o.touches[0].pageX-o.touches[1].pageX,l=o.touches[0].pageY-o.touches[1].pageY,u=Math.sqrt(s*s+l*l);a.dollyStart.set(0,u),a.state=xi.TOUCH_DOLLY}break;case 3:{if(a.enablePan===!1)return;a.panStart.set(o.touches[0].pageX,o.touches[0].pageY),a.state=xi.TOUCH_PAN}break;default:a.state=xi.NONE}a.state!==xi.NONE&&a.dispatchEvent(hB)}},a.onTouchMove=function(o){if(a.enabled!==!1)switch(o.preventDefault(),o.stopPropagation(),o.touches.length){case 1:{if(a.enableRotate===!1||a.state!==xi.TOUCH_ROTATE)return;a.rotateEnd.set(o.touches[0].pageX,o.touches[0].pageY),a.rotateDelta.subVectors(a.rotateEnd,a.rotateStart);var s=a.domElement===document?a.domElement.body:a.domElement;a.rotateLeft(2*Math.PI*a.rotateDelta.x/s.clientWidth*a.rotateSpeed),a.rotateUp(2*Math.PI*a.rotateDelta.y/s.clientHeight*a.rotateSpeed),a.rotateStart.copy(a.rotateEnd),a.update()}break;case 2:{if(a.enableZoom===!1||a.state!==xi.TOUCH_DOLLY)return;var l=o.touches[0].pageX-o.touches[1].pageX,u=o.touches[0].pageY-o.touches[1].pageY,c=Math.sqrt(l*l+u*u);a.dollyEnd.set(0,c),a.dollyDelta.subVectors(a.dollyEnd,a.dollyStart),a.dollyDelta.y>0?a.dollyOut(a.getZoomScale()):a.dollyDelta.y<0&&a.dollyIn(a.getZoomScale()),a.dollyStart.copy(a.dollyEnd),a.update()}break;case 3:{if(a.enablePan===!1||a.state!==xi.TOUCH_PAN)return;a.panEnd.set(o.touches[0].pageX,o.touches[0].pageY),a.panDelta.subVectors(a.panEnd,a.panStart),a.pan(a.panDelta.x,a.panDelta.y),a.panStart.copy(a.panEnd),a.update()}break;default:a.state=xi.NONE}},a.onTouchEnd=function(o){a.enabled!==!1&&(a.dispatchEvent(pB),a.state=xi.NONE)},a.onContextMenu=function(o){o.preventDefault()},a.domElement.addEventListener("contextmenu",a.onContextMenu,!1),a.domElement.addEventListener("mousedown",a.onMouseDown,!1),a.domElement.addEventListener("wheel",a.onMouseWheel,!1),a.domElement.addEventListener("touchstart",a.onTouchStart,!1),a.domElement.addEventListener("touchend",a.onTouchEnd,!1),a.domElement.addEventListener("touchmove",a.onTouchMove,!1),a.window.addEventListener("keydown",a.onKeyDown,!1),a.update(),a}return e.prototype.update=function(){var t=this.object.position;return this.updateOffset.copy(t).sub(this.target),this.updateOffset.applyQuaternion(this.updateQuat),this.spherical.setFromVector3(this.updateOffset),this.autoRotate&&this.state===xi.NONE&&this.rotateLeft(this.getAutoRotationAngle()),this.spherical.theta+=this.sphericalDelta.theta,this.spherical.phi+=this.sphericalDelta.phi,this.spherical.theta=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,this.spherical.theta)),this.spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this.spherical.phi)),this.spherical.makeSafe(),this.spherical.radius*=this.scale,this.spherical.radius=Math.max(this.minDistance,Math.min(this.maxDistance,this.spherical.radius)),this.target.add(this.panOffset),this.updateOffset.setFromSpherical(this.spherical),this.updateOffset.applyQuaternion(this.updateQuatInverse),t.copy(this.target).add(this.updateOffset),this.object.lookAt(this.target),this.enableDamping===!0?(this.sphericalDelta.theta*=1-this.dampingFactor,this.sphericalDelta.phi*=1-this.dampingFactor):this.sphericalDelta.set(0,0,0),this.scale=1,this.panOffset.set(0,0,0),this.zoomChanged||this.updateLastPosition.distanceToSquared(this.object.position)>tae||8*(1-this.updateLastQuaternion.dot(this.object.quaternion))>tae?(this.dispatchEvent(eae),this.updateLastPosition.copy(this.object.position),this.updateLastQuaternion.copy(this.object.quaternion),this.zoomChanged=!1,!0):!1},e.prototype.panLeft=function(t,i){this.panLeftV.setFromMatrixColumn(i,0),this.panLeftV.multiplyScalar(-t),this.panOffset.add(this.panLeftV)},e.prototype.panUp=function(t,i){this.panUpV.setFromMatrixColumn(i,1),this.panUpV.multiplyScalar(t),this.panOffset.add(this.panUpV)},e.prototype.pan=function(t,i){var n=this.domElement===document?this.domElement.body:this.domElement;if(this.object instanceof Fr.PerspectiveCamera){var a=this.object.position;this.panInternalOffset.copy(a).sub(this.target);var o=this.panInternalOffset.length();o*=Math.tan(this.object.fov/2*Math.PI/180),this.panLeft(2*t*o/n.clientHeight,this.object.matrix),this.panUp(2*i*o/n.clientHeight,this.object.matrix)}else this.object instanceof Fr.OrthographicCamera?(this.panLeft(t*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this.panUp(i*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)},e.prototype.dollyIn=function(t){this.object instanceof Fr.PerspectiveCamera?this.scale/=t:this.object instanceof Fr.OrthographicCamera?(this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom*t)),this.object.updateProjectionMatrix(),this.zoomChanged=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)},e.prototype.dollyOut=function(t){this.object instanceof Fr.PerspectiveCamera?this.scale*=t:this.object instanceof Fr.OrthographicCamera?(this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/t)),this.object.updateProjectionMatrix(),this.zoomChanged=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)},e.prototype.getAutoRotationAngle=function(){return 2*Math.PI/60/60*this.autoRotateSpeed},e.prototype.getZoomScale=function(){return Math.pow(.95,this.zoomSpeed)},e.prototype.rotateLeft=function(t){this.sphericalDelta.theta-=t},e.prototype.rotateUp=function(t){this.sphericalDelta.phi-=t},e.prototype.getPolarAngle=function(){return this.spherical.phi},e.prototype.getAzimuthalAngle=function(){return this.spherical.theta},e.prototype.dispose=function(){this.domElement.removeEventListener("contextmenu",this.onContextMenu,!1),this.domElement.removeEventListener("mousedown",this.onMouseDown,!1),this.domElement.removeEventListener("wheel",this.onMouseWheel,!1),this.domElement.removeEventListener("touchstart",this.onTouchStart,!1),this.domElement.removeEventListener("touchend",this.onTouchEnd,!1),this.domElement.removeEventListener("touchmove",this.onTouchMove,!1),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),this.window.removeEventListener("keydown",this.onKeyDown,!1)},e.prototype.reset=function(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(eae),this.update(),this.state=xi.NONE},Object.defineProperty(e.prototype,"center",{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"noZoom",{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t},enumerable:!0,configurable:!0}),e}(Fr.EventDispatcher);AC.OrbitControls=NLe});var rL=function(r,e){return rL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},rL(r,e)};function Z(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");rL(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Ose=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Fse=function(){function r(){this.browser=new Ose,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),Jh=new Fse;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Jh.wxa=!0,Jh.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Jh.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(Jh.node=!0,Jh.svgSupported=!0):zse(navigator.userAgent,Jh);function zse(r,e){var t=e.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(t.firefox=!0,t.version=i[1]),n&&(t.ie=!0,t.version=n[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var Ft=Jh;var $M=12,iL="sans-serif",ho=$M+"px "+iL,Bse=20,kse=100,Vse="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Gse(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function nle(r,e,t){for(var i=t?"invTrans":"trans",n=e[i],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,p=c.top;o.push(h,p),l=l&&a&&h===a[f]&&p===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[i]=t?uL(s,o):uL(o,s))}function fL(r){return r.nodeName.toUpperCase()==="CANVAS"}var ale=/([&<>"'])/g,ole={"&":"&","<":"<",">":">",'"':""","'":"'"};function yn(r){return r==null?"":(r+"").replace(ale,function(e,t){return ole[t]})}var sle=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,hL=[],lle=Ft.browser.firefox&&+Ft.browser.version.split(".")[0]<39;function sb(r,e,t,i){return t=t||{},i?WV(r,e,t):lle&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):WV(r,e,t),t}function WV(r,e,t){if(Ft.domSupported&&r.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(fL(r)){var a=r.getBoundingClientRect();t.zrX=i-a.left,t.zrY=n-a.top;return}else if(ob(hL,r,i,n)){t.zrX=hL[0],t.zrY=hL[1];return}}t.zrX=t.zrY=0}function lb(r){return r||window.event}function Ta(r,e,t){if(e=lb(e),e.zrX!=null)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&sb(r,o,e,t)}else{sb(r,e,e,t);var a=ule(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&sle.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function ule(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,i=r.deltaY;if(t==null||i==null)return e;var n=Math.abs(i!==0?i:t),a=i>0?-1:i<0?1:t>0?-1:1;return 3*n*a}function U0(r,e,t,i){r.addEventListener(e,t,i)}function XV(r,e,t,i){r.removeEventListener(e,t,i)}var Ea=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function pL(r){return r.which===2||r.which===3}var qV=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,i){var n=e.touches;if(n){for(var a={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&i&&i.length>1){var a=YV(i)/YV(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=cle(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function wi(){return[1,0,0,1,0,0]}function uf(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function O0(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Aa(r,e,t){var i=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function _n(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Ca(r,e,t,i){i===void 0&&(i=[0,0]);var n=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=n*f+s*c,r[1]=-n*c+s*f,r[2]=a*f+l*c,r[3]=-a*c+f*l,r[4]=f*(o-i[0])+c*(u-i[1])+i[0],r[5]=f*(u-i[1])-c*(o-i[0])+i[1],r}function Cm(r,e,t){var i=t[0],n=t[1];return r[0]=e[0]*i,r[1]=e[1]*n,r[2]=e[2]*i,r[3]=e[3]*n,r[4]=e[4]*i,r[5]=e[5]*n,r}function Yo(r,e){var t=e[0],i=e[2],n=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=t*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-t*s)*l,r):null}function ZV(r){var e=wi();return O0(e,r),e}var fle=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,i=this.y-e.y;return Math.sqrt(t*t+i*i)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,i=this.y;return this.x=e[0]*t+e[2]*i+e[4],this.y=e[1]*t+e[3]*i+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,i){e.x=t,e.y=i},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,i){e.x=t.x+i.x,e.y=t.y+i.y},r.sub=function(e,t,i){e.x=t.x-i.x,e.y=t.y-i.y},r.scale=function(e,t,i){e.x=t.x*i,e.y=t.y*i},r.scaleAndAdd=function(e,t,i,n){e.x=t.x+i.x*n,e.y=t.y+i.y*n},r.lerp=function(e,t,i,n){var a=1-n;e.x=a*t.x+n*i.x,e.y=a*t.y+n*i.y},r}(),Nt=fle;var ub=Math.min,cb=Math.max,tp=new Nt,rp=new Nt,ip=new Nt,np=new Nt,F0=new Nt,z0=new Nt,hle=function(){function r(e,t,i,n){i<0&&(e=e+i,i=-i),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=i,this.height=n}return r.prototype.union=function(e){var t=ub(e.x,this.x),i=ub(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=cb(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=cb(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=t,this.y=i},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,i=e.width/t.width,n=e.height/t.height,a=wi();return _n(a,a,[-t.x,-t.y]),Cm(a,a,[i,n]),_n(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,f=e.y+e.height,h=!(ad&&(d=y,gd&&(d=x,v<_?Nt.set(z0,0,-v):Nt.set(z0,0,_)):y=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,i){if(!i){e!==t&&r.copy(e,t);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];e.x=t.x*n+o,e.y=t.y*a+s,e.width=t.width*n,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}tp.x=ip.x=t.x,tp.y=np.y=t.y,rp.x=np.x=t.x+t.width,rp.y=ip.y=t.y+t.height,tp.transform(i),np.transform(i),rp.transform(i),ip.transform(i),e.x=ub(tp.x,rp.x,ip.x,np.x),e.y=ub(tp.y,rp.y,ip.y,np.y);var l=cb(tp.x,rp.x,ip.x,np.x),u=cb(tp.y,rp.y,ip.y,np.y);e.width=l-e.x,e.height=u-e.y},r}(),lt=hle;var KV="silent";function ple(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:dle}}function dle(){Ea(this.event)}var mle=function(r){Xt(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Di),B0=function(){function r(e,t){this.x=e,this.y=t}return r}(),vle=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],mL=new lt(0,0,0,0),JV=function(r){Xt(e,r);function e(t,i,n,a,o){var s=r.call(this)||this;return s._hovered=new B0(0,0),s.storage=t,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new mle,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new VV(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(N(vle,function(i){t.on&&t.on(i,this[i],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var i=t.zrX,n=t.zrY,a=$V(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new B0(i,n):this.findHover(i,n),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var i=t.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new B0(0,0)},e.prototype.dispatch=function(t,i){var n=this[t];n&&n.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)},e.prototype.dispatchToElement=function(t,i,n){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+i,s=ple(i,t,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},e.prototype.findHover=function(t,i,n){var a=this.storage.getDisplayList(),o=new B0(t,i);if(jV(a,o,t,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new lt(t-u,i-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==n&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(mL.copy(h.getBoundingRect()),h.transform&&mL.applyTransform(h.transform),mL.intersect(c)&&s.push(h))}if(s.length)for(var p=4,d=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function gle(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(e,t))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?KV:!0}return!1}function jV(r,e,t,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=gle(o,t,i))&&(!e.topTarget&&(e.topTarget=o),s!==KV)){e.target=o;break}}}function $V(r,e,t){var i=r.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var QV=JV;var rG=32,k0=7;function yle(r){for(var e=0;r>=rG;)e|=r&1,r>>=1;return r+e}function eG(r,e,t,i){var n=e+1;if(n===t)return 1;if(i(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function _le(r,e,t){for(t--;e>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function vL(r,e,t,i,n,a){var o=0,s=0,l=1;if(a(r,e[t+n])>0){for(s=i-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);a(r,e[t+c])>0?o=c+1:l=c}return l}function gL(r,e,t,i,n,a){var o=0,s=0,l=1;if(a(r,e[t+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);a(r,e[t+c])<0?l=c:o=c+1}return l}function xle(r,e){var t=k0,i,n,a=0,o=[];i=[],n=[];function s(p,d){i[a]=p,n[a]=d,a+=1}function l(){for(;a>1;){var p=a-2;if(p>=1&&n[p-1]<=n[p]+n[p+1]||p>=2&&n[p-2]<=n[p]+n[p-1])n[p-1]n[p+1])break;c(p)}}function u(){for(;a>1;){var p=a-2;p>0&&n[p-1]=k0||w>=k0);if(T)break;M<0&&(M=0),M+=2}if(t=M,t<1&&(t=1),d===1){for(v=0;v=0;v--)r[S+v]=r[M+v];r[x]=o[y];return}for(var w=t;;){var T=0,C=0,b=!1;do if(e(o[y],r[_])<0){if(r[x--]=r[_--],T++,C=0,--d===0){b=!0;break}}else if(r[x--]=o[y--],C++,T=0,--m===1){b=!0;break}while((T|C)=0;v--)r[S+v]=r[M+v];if(d===0){b=!0;break}}if(r[x--]=o[y--],--m===1){b=!0;break}if(C=m-vL(r[_],o,0,m,m-1,e),C!==0){for(x-=C,y-=C,m-=C,S=x+1,M=y+1,v=0;v=k0||C>=k0);if(b)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),m===1){for(x-=d,_-=d,S=x+1,M=_+1,v=d-1;v>=0;v--)r[S+v]=r[M+v];r[x]=o[y]}else{if(m===0)throw new Error;for(M=x-(m-1),v=0;vs&&(l=s),tG(r,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),n-=a,t+=a}while(n!==0);o.forceMergeRuns()}}var zi=1,op=2,cf=4;var iG=!1;function yL(){iG||(iG=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function nG(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Sle=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nG}return r.prototype.traverse=function(e,t){for(var i=0;i0&&(c.__clipPaths=[]),isNaN(c.z)&&(yL(),c.z=0),isNaN(c.z2)&&(yL(),c.z2=0),isNaN(c.zlevel)&&(yL(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,t,i);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,i);var p=e.getTextContent();p&&this._updateAndAddDisplayable(p,t,i)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,i=e.length;t=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),aG=Sle;var oG;oG=Ft.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var V0=oG;var fb={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)))},elasticOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var e,t=.1,i=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=i/4):e=i*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-fb.bounceOut(1-r)},bounceOut:function(r){return r<.36363636363636365?7.5625*r*r:r<.7272727272727273?7.5625*(r-=.5454545454545454)*r+.75:r<.9090909090909091?7.5625*(r-=.8181818181818182)*r+.9375:7.5625*(r-=.9545454545454546)*r+.984375},bounceInOut:function(r){return r<.5?fb.bounceIn(r*2)*.5:fb.bounceOut(r*2-1)*.5+.5}},hb=fb;var pb=Math.pow,hf=Math.sqrt,mb=1e-8,lG=1e-4,sG=hf(3),db=1/3,Cl=Al(),qo=Al(),Rm=Al();function ff(r){return r>-mb&&rmb||r<-mb}function hi(r,e,t,i,n){var a=1-n;return a*a*(a*r+3*n*e)+n*n*(n*i+3*a*t)}function _L(r,e,t,i,n){var a=1-n;return 3*(((e-r)*a+2*(t-e)*n)*a+(i-t)*n*n)}function sp(r,e,t,i,n,a){var o=i+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,p=0;if(ff(c)&&ff(f))if(ff(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[p++]=d)}else{var g=f*f-4*c*h;if(ff(g)){var m=f/c,d=-s/o+m,v=-m/2;d>=0&&d<=1&&(a[p++]=d),v>=0&&v<=1&&(a[p++]=v)}else if(g>0){var _=hf(g),y=c*s+1.5*o*(-f+_),x=c*s+1.5*o*(-f-_);y<0?y=-pb(-y,db):y=pb(y,db),x<0?x=-pb(-x,db):x=pb(x,db);var d=(-s-(y+x))/(3*o);d>=0&&d<=1&&(a[p++]=d)}else{var M=(2*c*s-3*o*f)/(2*hf(c*c*c)),S=Math.acos(M)/3,w=hf(c),T=Math.cos(S),d=(-s-2*w*T)/(3*o),v=(-s+w*(T+sG*Math.sin(S)))/(3*o),C=(-s+w*(T-sG*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[p++]=d),v>=0&&v<=1&&(a[p++]=v),C>=0&&C<=1&&(a[p++]=C)}}return p}function vb(r,e,t,i,n){var a=6*t-12*e+6*r,o=9*e+3*i-3*r-9*t,s=3*e-3*r,l=0;if(ff(o)){if(uG(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var c=a*a-4*o*s;if(ff(c))n[0]=-a/(2*o);else if(c>0){var f=hf(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function Zo(r,e,t,i,n,a){var o=(e-r)*n+r,s=(t-e)*n+e,l=(i-t)*n+t,u=(s-o)*n+o,c=(l-s)*n+s,f=(c-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=i}function gb(r,e,t,i,n,a,o,s,l,u,c){var f,h=.005,p=1/0,d,g,m,v;Cl[0]=l,Cl[1]=u;for(var _=0;_<1;_+=.05)qo[0]=hi(r,t,n,o,_),qo[1]=hi(e,i,a,s,_),m=yu(Cl,qo),m=0&&m=0&&u<=1&&(n[l++]=u)}}else{var c=o*o-4*a*s;if(ff(c)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(c>0){var f=hf(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function yb(r,e,t){var i=r+t-2*e;return i===0?.5:(r-e)/i}function pf(r,e,t,i,n){var a=(e-r)*i+r,o=(t-e)*i+e,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function _b(r,e,t,i,n,a,o,s,l){var u,c=.005,f=1/0;Cl[0]=o,Cl[1]=s;for(var h=0;h<1;h+=.05){qo[0]=vi(r,t,n,h),qo[1]=vi(e,i,a,h);var p=yu(Cl,qo);p=0&&p=1?1:sp(0,i,a,1,l,s)&&hi(0,n,o,1,s[0])}}}var ble=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ir,this.ondestroy=e.ondestroy||Ir,this.onrestart=e.onrestart||Ir,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var i=this._life,n=e-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=He(e)?e:hb[e]||Lm(e)},r}(),pG=ble;var dG=function(){function r(e){this.value=e}return r}();var wle=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new dG(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}();var Tle=function(){function r(e){this._list=new wle,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var i=this._list,n=this._map,a=null;if(n[e]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new dG(t),s.key=e,i.insertEntry(s),n[e]=s}return a},r.prototype.get=function(e){var t=this._map[e],i=this._list;if(t!=null)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),_u=Tle;var mG={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ns(r){return r=Math.round(r),r<0?0:r>255?255:r}function Ele(r){return r=Math.round(r),r<0?0:r>360?360:r}function W0(r){return r<0?0:r>1?1:r}function xL(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Ns(parseFloat(e)/100*255):Ns(parseInt(e,10))}function lp(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?W0(parseFloat(e)/100):W0(parseFloat(e))}function SL(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function df(r,e,t){return r+(e-r)*t}function jo(r,e,t,i,n){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}function ML(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var gG=new _u(20),xb=null;function Pm(r,e){xb&&ML(xb,e),xb=gG.put(r,xb||e.slice())}function cn(r,e){if(r){e=e||[];var t=gG.get(r);if(t)return ML(e,t);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in mG)return ML(e,mG[i]),Pm(r,e),e;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){jo(e,0,0,0,1);return}return jo(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Pm(r,e),e}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){jo(e,0,0,0,1);return}return jo(e,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Pm(r,e),e}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?jo(e,+u[0],+u[1],+u[2],1):jo(e,0,0,0,1);c=lp(u.pop());case"rgb":if(u.length>=3)return jo(e,xL(u[0]),xL(u[1]),xL(u[2]),u.length===3?c:lp(u[3])),Pm(r,e),e;jo(e,0,0,0,1);return;case"hsla":if(u.length!==4){jo(e,0,0,0,1);return}return u[3]=lp(u[3]),bL(u,e),Pm(r,e),e;case"hsl":if(u.length!==3){jo(e,0,0,0,1);return}return bL(u,e),Pm(r,e),e;default:return}}jo(e,0,0,0,1)}}function bL(r,e){var t=(parseFloat(r[0])%360+360)%360/360,i=lp(r[1]),n=lp(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return e=e||[],jo(e,Ns(SL(o,a,t+1/3)*255),Ns(SL(o,a,t)*255),Ns(SL(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Ale(r){if(r){var e=r[0]/255,t=r[1]/255,i=r[2]/255,n=Math.min(e,t,i),a=Math.max(e,t,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var c=((a-e)/6+o/2)/o,f=((a-t)/6+o/2)/o,h=((a-i)/6+o/2)/o;e===a?l=h-f:t===a?l=1/3+c-h:i===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var p=[l*360,u,s];return r[3]!=null&&p.push(r[3]),p}}function Sb(r,e){var t=cn(r);if(t){for(var i=0;i<3;i++)e<0?t[i]=t[i]*(1-e)|0:t[i]=(255-t[i])*e+t[i]|0,t[i]>255?t[i]=255:t[i]<0&&(t[i]=0);return Ko(t,t.length===4?"rgba":"rgb")}}function Mb(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=e[n],s=e[a],l=i-n;return t[0]=Ns(df(o[0],s[0],l)),t[1]=Ns(df(o[1],s[1],l)),t[2]=Ns(df(o[2],s[2],l)),t[3]=W0(df(o[3],s[3],l)),t}}function yG(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var i=r*(e.length-1),n=Math.floor(i),a=Math.ceil(i),o=cn(e[n]),s=cn(e[a]),l=i-n,u=Ko([Ns(df(o[0],s[0],l)),Ns(df(o[1],s[1],l)),Ns(df(o[2],s[2],l)),W0(df(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function up(r,e,t,i){var n=cn(r);if(r)return n=Ale(n),e!=null&&(n[0]=Ele(e)),t!=null&&(n[1]=lp(t)),i!=null&&(n[2]=lp(i)),Ko(bL(n),"rgba")}function cp(r,e){var t=cn(r);if(t&&e!=null)return t[3]=W0(e),Ko(t,"rgba")}function Ko(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Dm(r,e){var t=cn(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var vG=new _u(100);function X0(r){if(Ce(r)){var e=vG.get(r);return e||(e=Sb(r,-.1),vG.put(r,e)),e}else if(of(r)){var t=fe({},r);return t.colorStops=de(r.colorStops,function(i){return{offset:i.offset,color:Sb(i.color,-.1)}}),t}return r}var wb=Math.round;function mf(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=cn(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var _G=1e-4;function Rl(r){return r<_G&&r>-_G}function bb(r){return wb(r*1e3)/1e3}function Tb(r){return wb(r*1e4)/1e4}function xG(r){return"matrix("+bb(r[0])+","+bb(r[1])+","+bb(r[2])+","+bb(r[3])+","+Tb(r[4])+","+Tb(r[5])+")"}var SG={left:"start",right:"end",center:"middle",middle:"middle"};function MG(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function bG(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function wG(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function TL(r){return r&&!!r.image}function Cle(r){return r&&!!r.svgElement}function Y0(r){return TL(r)||Cle(r)}function Eb(r){return r.type==="linear"}function Ab(r){return r.type==="radial"}function Cb(r){return r&&(r.type==="linear"||r.type==="radial")}function q0(r){return"url(#"+r+")"}function Rb(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function Lb(r){var e=r.x||0,t=r.y||0,i=(r.rotation||0)*bm,n=ft(r.scaleX,1),a=ft(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),i&&l.push("rotate("+i+")"),(n!==1||a!==1)&&l.push("scale("+n+","+a+")"),(o||s)&&l.push("skew("+wb(o*bm)+"deg, "+wb(s*bm)+"deg)"),l.join(" ")}var TG=function(){return Ft.hasGlobalWindow&&He(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}();var AL=Array.prototype.slice;function xu(r,e,t){return(e-r)*t+r}function EL(r,e,t,i){for(var n=e.length,a=0;ai?e:r,a=Math.min(t,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)i.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=AG,l=t;if(ci(t)){var u=Dle(t);s=u,(u===1&&!At(t[0])||u===2&&!At(t[0][0]))&&(o=!0)}else if(At(t)&&!sf(t))s=Db;else if(Ce(t))if(!isNaN(+t))s=Db;else{var c=cn(t);c&&(l=c,s=j0)}else if(of(t)){var f=fe({},l);f.colorStops=de(t.colorStops,function(p){return{offset:p.offset,color:cn(p.color)}}),Eb(t)?s=CL:Ab(t)&&(s=RL),l=f}a===0?this.valType=s:(s!==this.valType||s===AG)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return i&&(h.easing=i,h.easingFunc=He(i)?i:hb[i]||Lm(i)),n.push(h),h},r.prototype.prepare=function(e,t){var i=this.keyframes;this._needsSort&&i.sort(function(g,m){return g.time-m.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=Ib(n),u=CG(n),c=0;c=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=f;ct);c++);c=h(c-1,s-2)}d=o[c+1],p=o[c]}if(p&&d){this._lastFr=c,this._lastFrP=t;var m=d.percent-p.percent,v=m===0?1:h((t-p.percent)/m,1);d.easingFunc&&(v=d.easingFunc(v));var _=i?this._additiveValue:u?Z0:e[l];if((Ib(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=v<1?p.rawValue:d.rawValue;else if(Ib(a))a===Ub?EL(_,p[n],d[n],v):Rle(_,p[n],d[n],v);else if(CG(a)){var y=p[n],x=d[n],M=a===CL;e[l]={type:M?"linear":"radial",x:xu(y.x,x.x,v),y:xu(y.y,x.y,v),colorStops:de(y.colorStops,function(w,T){var C=x.colorStops[T];return{offset:xu(w.offset,C.offset,v),color:Nb(EL([],w.color,C.color,v))}}),global:x.global},M?(e[l].x2=xu(y.x2,x.x2,v),e[l].y2=xu(y.y2,x.y2,v)):e[l].r=xu(y.r,x.r,v)}else if(u)EL(_,p[n],d[n],v),i||(e[l]=Nb(_));else{var S=xu(p[n],d[n],v);i?this._additiveValue=S:e[l]=S}i&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,i=this.propName,n=this._additiveValue;t===Db?e[i]=e[i]+n:t===j0?(cn(e[i],Z0),Pb(Z0,Z0,n,1),e[i]=Nb(Z0)):t===Ub?Pb(e[i],e[i],n,1):t===RG&&EG(e[i],e[i],n,1)},r}(),Nle=function(){function r(e,t,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){$h("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,i){return this.whenWithKeys(e,t,bt(t),i)},r.prototype.whenWithKeys=function(e,t,i,n){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,fp(u),n),this._trackKeys.push(s)}l.addKeyframe(e,fp(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,i=0;i0)){this._started=1;for(var t=this,i=[],n=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}(),K0=Nle;function hp(){return new Date().getTime()}var Ule=function(r){Xt(e,r);function e(t){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,t=t||{},i.stage=t.stage||{},i}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var i=t.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(t){if(t.animation){var i=t.prev,n=t.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var i=t.getClip();i&&this.removeClip(i),t.animation=null},e.prototype.update=function(t){for(var i=hp()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function i(){t._running&&(V0(i),!t._paused&&t.update())}V0(i)},e.prototype.start=function(){this._running||(this._time=hp(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=hp(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=hp()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var i=t.next;t.prev=t.next=t.animation=null,t=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,i){i=i||{},this.start();var n=new K0(t,i.loop);return this.addAnimator(n),n},e}(Di),LG=Ule;var Ole=300,LL=Ft.domSupported,PL=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=de(r,function(n){var a=n.replace("mouse","pointer");return t.hasOwnProperty(a)?a:n});return{mouse:r,touch:e,pointer:i}}(),PG={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},DG=!1;function NL(r){var e=r.pointerType;return e==="pen"||e==="touch"}function Fle(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function DL(r){r&&(r.zrByTouch=!0)}function zle(r,e){return Ta(r.dom,new Ble(r,e),!0)}function NG(r,e){for(var t=e,i=!1;t&&t.nodeType!==9&&!(i=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return i}var Ble=function(){function r(e,t){this.stopPropagation=Ir,this.stopImmediatePropagation=Ir,this.preventDefault=Ir,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Us={mousedown:function(r){r=Ta(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Ta(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Ta(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Ta(this.dom,r);var e=r.toElement||r.relatedTarget;NG(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){DG=!0,r=Ta(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){DG||(r=Ta(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ta(this.dom,r),DL(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Us.mousemove.call(this,r),Us.mousedown.call(this,r)},touchmove:function(r){r=Ta(this.dom,r),DL(r),this.handler.processGesture(r,"change"),Us.mousemove.call(this,r)},touchend:function(r){r=Ta(this.dom,r),DL(r),this.handler.processGesture(r,"end"),Us.mouseup.call(this,r),+new Date-+this.__lastTouchMomentBG||r<-BG}var mp=[],Im=[],OL=wi(),FL=Math.abs,Hle=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return dp(this.rotation)||dp(this.x)||dp(this.y)||dp(this.scaleX-1)||dp(this.scaleY-1)||dp(this.skewX)||dp(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),i=this.transform;if(!(t||e)){i&&(zG(i),this.invTransform=null);return}i=i||wi(),t?this.getLocalTransform(i):zG(i),e&&(t?Aa(i,e,i):O0(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(mp);var i=mp[0]<0?-1:1,n=mp[1]<0?-1:1,a=((mp[0]-i)*t+i)/mp[0]||0,o=((mp[1]-n)*t+n)/mp[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||wi(),Yo(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),a=Math.PI/2+n-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||wi(),Aa(Im,e.invTransform,t),t=Im);var i=this.originX,n=this.originY;(i||n)&&(OL[4]=i,OL[5]=n,Aa(Im,t,OL),Im[4]-=i,Im[5]-=n,t=Im),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var i=[e,t],n=this.invTransform;return n&&fi(i,i,n),i},r.prototype.transformCoordToGlobal=function(e,t){var i=[e,t],n=this.transform;return n&&fi(i,i,n),i},r.prototype.getLineScale=function(){var e=this.transform;return e&&FL(e[0]-1)>1e-10&&FL(e[3]-1)>1e-10?Math.sqrt(FL(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){zL(this,e)},r.getLocalTransform=function(e,t){t=t||[];var i=e.originX||0,n=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,p=e.skewY?Math.tan(-e.skewY):0;if(i||n||s||l){var d=i+s,g=n+l;t[4]=-d*a-h*g*o,t[5]=-g*o-p*d*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=p*a,t[2]=h*o,u&&Ca(t,t,u),t[4]+=i+c,t[5]+=n+f,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),go=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function zL(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function gp(r,e,t){var i=e.position||"inside",n=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",f="top";if(i instanceof Array)l+=xn(i[0],t.width),u+=xn(i[1],t.height),c=null,f=null;else switch(i){case"left":l-=n,u+=s,c="right",f="middle";break;case"right":l+=n+o,u+=s,f="middle";break;case"top":l+=o/2,u-=n,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+n,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=n,u+=s,f="middle";break;case"insideRight":l+=o-n,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=n,c="center";break;case"insideBottom":l+=o/2,u+=a-n,c="center",f="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,c="right";break;case"insideBottomLeft":l+=n,u+=a-n,f="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var BL="__zr_normal__",kL=go.concat(["ignore"]),Wle=gn(go,function(r,e){return r[e]=!0,r},{ignore:!1}),Om={},Xle=new lt(0,0,0,0),HL=function(){function r(e){this.id=tb(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,i){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(t),i.position!=null){var c=Xle;i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),n||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Om,i,c):gp(Om,i,c),a.x=Om.x,a.y=Om.y,o=Om.align,s=Om.verticalAlign;var f=i.origin;if(f&&i.rotation!=null){var h=void 0,p=void 0;f==="center"?(h=c.width*.5,p=c.height*.5):(h=xn(f[0],c.width),p=xn(f[1],c.height)),u=!0,a.originX=-a.x+h+(n?0:c.x),a.originY=-a.y+p+(n?0:c.y)}}i.rotation!=null&&(a.rotation=i.rotation);var d=i.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var g=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,_=void 0,y=void 0;g&&this.canBeInsideText()?(v=i.insideFill,_=i.insideStroke,(v==null||v==="auto")&&(v=this.getInsideTextFill()),(_==null||_==="auto")&&(_=this.getInsideTextStroke(v),y=!0)):(v=i.outsideFill,_=i.outsideStroke,(v==null||v==="auto")&&(v=this.getOutsideFill()),(_==null||_==="auto")&&(_=this.getOutsideStroke(v),y=!0)),v=v||"#000",(v!==m.fill||_!==m.stroke||y!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=v,m.stroke=_,m.autoStroke=y,m.align=o,m.verticalAlign=s,t.setDefaultTextStyle(m)),t.__dirty|=zi,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Q0:$0},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),i=typeof t=="string"&&cn(t);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,Ko(i,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},fe(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(qe(e))for(var i=e,n=bt(i),a=0;a0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(BL,!1,e)},r.prototype.useState=function(e,t,i,n){var a=e===BL,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(dt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){$h("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!i&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,t,i,c),h&&h.useState(e,t,i,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~zi),u}}},r.prototype.useStates=function(e,t,i){if(!e.length)this.clearStates();else{var n=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,d);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,t,h),m&&m.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~zi)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var i=this.currentStates.slice();i.splice(t,1),this.useStates(i)}},r.prototype.replaceState=function(e,t,i){var n=this.currentStates.slice(),a=dt(n,e),o=dt(n,t)>=0;a>=0?o?n.splice(a,1):n[a]=t:i&&!o&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},i,n=0;n=0&&a.splice(o,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var i=this.animators,n=i.length,a=[],o=0;o0&&t.during&&a[0].during(function(d,g){t.during(g)});for(var h=0;h0||n.force&&!o.length){var T=void 0,C=void 0,b=void 0;if(s){C={},h&&(T={});for(var x=0;x=0&&(n.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,i){var n=dt(this._children,t);return n>=0&&this.replaceAt(i,n),this},e.prototype.replaceAt=function(t,i){var n=this._children,a=n[i];if(t&&t!==this&&t.parent!==this&&t!==a){n[i]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var i=this.__zr;i&&i!==t.__zr&&t.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(t){var i=this.__zr,n=this._children,a=dt(n,t);return a<0?this:(n.splice(a,1),t.parent=null,i&&t.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,i=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,i){return this._disposed||this.handler.on(e,t,i),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}function Fe(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Ce(r)?eue(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Ar(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),jG),r=(+r).toFixed(e),t?r:+r}function Ti(r){return r.sort(function(e,t){return e-t}),r}function Sn(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return YL(r)}function YL(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),i=t>0?+e.slice(t+1):0,n=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function Fm(r,e){var t=Math.log,i=Math.LN10,n=Math.floor(t(r[1]-r[0])/i),a=Math.round(t(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function KG(r,e,t){if(!r[e])return 0;var i=qL(r,t);return i[e]||0}function qL(r,e){var t=gn(r,function(p,d){return p+(isNaN(d)?0:d)},0);if(t===0)return[];for(var i=Math.pow(10,e),n=de(r,function(p){return(isNaN(p)?0:p)/t*i*100}),a=i*100,o=de(n,function(p){return Math.floor(p)}),s=gn(o,function(p,d){return p+d},0),l=de(n,function(p,d){return p-o[d]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return de(o,function(p){return p/i})}function JG(r,e){var t=Math.max(Sn(r),Sn(e)),i=r+e;return t>jG?i:Ar(i,t)}var e_=9007199254740991;function t_(r){var e=Math.PI*2;return(r%e+e)%e}function Su(r){return r>-ZG&&r=10&&e++,e}function Bm(r,e){var t=zm(r),i=Math.pow(10,t),n=r/i,a;return e?n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10:n<1?a=1:n<2?a=2:n<3?a=3:n<5?a=5:a=10,r=a*i,t>=-20?+r.toFixed(t<0?-t:0):r}function km(r,e){var t=(r.length-1)*e+1,i=Math.floor(t),n=+r[i-1],a=t-i;return a?n+a*(r[i]-n):n}function r_(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,i=0;i=0||a&&dt(a,l)<0)){var u=i.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var _ue=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],xue=Na(_ue),mH=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return xue(this,e,t)},r}();var $L=new _u(50);function gH(r){if(typeof r=="string"){var e=$L.get(r);return e&&e.image}else return r}function o_(r,e,t,i,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=$L.get(r),o={hostEl:t,cb:i,cbPayload:n};return a?(e=a.image,!Wm(e)&&a.pending.push(o)):(e=zn.loadImage(r,vH,vH),e.__zrImageSrc=r,$L.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function vH(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=La(t,e);return u>s&&(t="",u=0),s=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function xH(r,e){var t=e.containerWidth,i=e.font,n=e.contentWidth;if(!t)return"";var a=La(r,i);if(a<=t)return r;for(var o=0;;o++){if(a<=n||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?bue(r,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(r.length*n/a):0;r=r.substr(0,s),a=La(r,i)}return r===""&&(r=e.placeholder),r}function bue(r,e,t,i){for(var n=0,a=0,o=r.length;ap&&u){var d=Math.floor(p/s);f=f.slice(0,d)}if(r&&a&&c!=null)for(var g=_H(c,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m=0;ms&&eP(t,r.substring(s,u),e,o),eP(t,l[2],e,o,l[1]),s=QL.lastIndex}sn){M>0?(_.tokens=_.tokens.slice(0,M),m(_,x,y),t.lines=t.lines.slice(0,v+1)):t.lines=t.lines.slice(0,v);break e}var I=w.width,R=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")S.percentWidth=I,c.push(S),S.contentWidth=La(S.text,b);else{if(R){var A=w.backgroundColor,D=A&&A.image;D&&(D=gH(D),Wm(D)&&(S.width=Math.max(S.width,D.width*E/D.height)))}var U=d&&i!=null?i-x:null;U!=null&&U0&&d+i.accumWidth>i.width&&(c=e.split(` +`),u=!0),i.accumWidth=d}else{var g=bH(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+p,f=g.linesWidths,c=g.lines}}else c=e.split(` +`);for(var m=0;m=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Aue=gn(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function Cue(r){return Eue(r)?!!Aue[r]:!0}function bH(r,e,t,i,n){for(var a=[],o=[],s="",l="",u=0,c=0,f=0;ft:n+c+p>t){c?(s||l)&&(d?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=p)):d?(a.push(l),o.push(u),l=h,u=p):(a.push(h),o.push(p));continue}c+=p,d?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=n),{accumWidth:c,lines:a,linesWidths:o}}var iP="__zr_style_"+Math.round(Math.random()*10),Pl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xp={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Pl[iP]=!0;var wH=["z","z2","invisible"],Rue=["invisible"],Lue=function(r){Xt(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var i=bt(t),n=0;n1e-4){s[0]=r-t,s[1]=e-i,l[0]=r+t,l[1]=e+i;return}if(Xb[0]=aP(n)*t+r,Xb[1]=nP(n)*i+e,Yb[0]=aP(a)*t+r,Yb[1]=nP(a)*i+e,u(s,Xb,Yb),c(l,Xb,Yb),n=n%Sp,n<0&&(n=n+Sp),a=a%Sp,a<0&&(a=a+Sp),n>a&&!o?a+=Sp:nn&&(qb[0]=aP(p)*t+r,qb[1]=nP(p)*i+e,u(s,qb,s),c(l,qb,l))}var Vr={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},bp=[],wp=[],Dl=[],_f=[],Il=[],Nl=[],sP=Math.min,lP=Math.max,Tp=Math.cos,Ep=Math.sin,Mu=Math.abs,fP=Math.PI,xf=fP*2,uP=typeof Float32Array<"u",s_=[];function cP(r){var e=Math.round(r/fP*1e8)/1e8;return e%2*fP}function l_(r,e){var t=cP(r[0]);t<0&&(t+=xf);var i=t-r[0],n=r[1];n+=i,!e&&n-t>=xf?n=t+xf:e&&t-n>=xf?n=t-xf:!e&&t>n?n=t+(xf-cP(t-n)):e&&t0&&(this._ux=Mu(i/pp/e)||0,this._uy=Mu(i/pp/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Vr.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var i=Mu(e-this._xi),n=Mu(t-this._yi),a=i>this._ux||n>this._uy;if(this.addData(Vr.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,i,n,a,o){return this._drawPendingPt(),this.addData(Vr.C,e,t,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,i,n){return this._drawPendingPt(),this.addData(Vr.Q,e,t,i,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(e,t,i,n,a,o){this._drawPendingPt(),s_[0]=n,s_[1]=a,l_(s_,o),n=s_[0],a=s_[1];var s=a-n;return this.addData(Vr.A,e,t,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,i,n,a,o),this._xi=Tp(a)*i+e,this._yi=Ep(a)*i+t,this},r.prototype.arcTo=function(e,t,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,i,n,a),this},r.prototype.rect=function(e,t,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,i,n),this.addData(Vr.R,e,t,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Vr.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&e.closePath(),this._xi=t,this._yi=i,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&uP&&(this.data=new Float32Array(t));for(var i=0;ic.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Dl[0]=Dl[1]=Il[0]=Il[1]=Number.MAX_VALUE,_f[0]=_f[1]=Nl[0]=Nl[1]=-Number.MAX_VALUE;var e=this.data,t=0,i=0,n=0,a=0,o;for(o=0;oi||Mu(y)>n||h===t-1)&&(g=Math.sqrt(_*_+y*y),a=m,o=v);break}case Vr.C:{var x=e[h++],M=e[h++],m=e[h++],v=e[h++],S=e[h++],w=e[h++];g=cG(a,o,x,M,m,v,S,w,10),a=S,o=w;break}case Vr.Q:{var x=e[h++],M=e[h++],m=e[h++],v=e[h++];g=hG(a,o,x,M,m,v,10),a=m,o=v;break}case Vr.A:var T=e[h++],C=e[h++],b=e[h++],E=e[h++],I=e[h++],R=e[h++],A=R+I;h+=1,d&&(s=Tp(I)*b+T,l=Ep(I)*E+C),g=lP(b,E)*sP(xf,Math.abs(R)),a=Tp(A)*b+T,o=Ep(A)*E+C;break;case Vr.R:{s=a=e[h++],l=o=e[h++];var D=e[h++],U=e[h++];g=D*2+U*2;break}case Vr.Z:{var _=s-a,y=l-o;g=Math.sqrt(_*_+y*y),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,p=t<1,d,g,m=0,v=0,_,y=0,x,M;if(!(p&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,g=this._pathLen,_=t*g,!_)))e:for(var S=0;S0&&(e.lineTo(x,M),y=0),w){case Vr.M:s=u=i[S++],l=c=i[S++],e.moveTo(u,c);break;case Vr.L:{f=i[S++],h=i[S++];var C=Mu(f-u),b=Mu(h-c);if(C>n||b>a){if(p){var E=d[v++];if(m+E>_){var I=(_-m)/E;e.lineTo(u*(1-I)+f*I,c*(1-I)+h*I);break e}m+=E}e.lineTo(f,h),u=f,c=h,y=0}else{var R=C*C+b*b;R>y&&(x=f,M=h,y=R)}break}case Vr.C:{var A=i[S++],D=i[S++],U=i[S++],B=i[S++],F=i[S++],k=i[S++];if(p){var E=d[v++];if(m+E>_){var I=(_-m)/E;Zo(u,A,U,F,I,bp),Zo(c,D,B,k,I,wp),e.bezierCurveTo(bp[1],wp[1],bp[2],wp[2],bp[3],wp[3]);break e}m+=E}e.bezierCurveTo(A,D,U,B,F,k),u=F,c=k;break}case Vr.Q:{var A=i[S++],D=i[S++],U=i[S++],B=i[S++];if(p){var E=d[v++];if(m+E>_){var I=(_-m)/E;pf(u,A,U,I,bp),pf(c,D,B,I,wp),e.quadraticCurveTo(bp[1],wp[1],bp[2],wp[2]);break e}m+=E}e.quadraticCurveTo(A,D,U,B),u=U,c=B;break}case Vr.A:var G=i[S++],Y=i[S++],J=i[S++],Q=i[S++],V=i[S++],K=i[S++],ae=i[S++],ve=!i[S++],ue=J>Q?J:Q,se=Mu(J-Q)>.001,Ee=V+K,q=!1;if(p){var E=d[v++];m+E>_&&(Ee=V+K*(_-m)/E,q=!0),m+=E}if(se&&e.ellipse?e.ellipse(G,Y,J,Q,ae,V,Ee,ve):e.arc(G,Y,ue,V,Ee,ve),q)break e;T&&(s=Tp(V)*J+G,l=Ep(V)*Q+Y),u=Tp(Ee)*J+G,c=Ep(Ee)*Q+Y;break;case Vr.R:s=u=i[S],l=c=i[S+1],f=i[S++],h=i[S++];var H=i[S++],We=i[S++];if(p){var E=d[v++];if(m+E>_){var _e=_-m;e.moveTo(f,h),e.lineTo(f+sP(_e,H),h),_e-=H,_e>0&&e.lineTo(f+H,h+sP(_e,We)),_e-=We,_e>0&&e.lineTo(f+lP(H-_e,0),h+We),_e-=H,_e>0&&e.lineTo(f,h+lP(We-_e,0));break e}m+=E}e.rect(f,h,H,We);break;case Vr.Z:if(p){var E=d[v++];if(m+E>_){var I=(_-m)/E;e.lineTo(u*(1-I)+s*I,c*(1-I)+l*I);break e}m+=E}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=Vr,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}(),Ki=Due;function Ul(r,e,t,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>e+s&&o>i+s||or+s&&a>t+s||ae+f&&c>i+f&&c>a+f&&c>s+f||cr+f&&u>t+f&&u>n+f&&u>o+f||ue+u&&l>i+u&&l>a+u||lr+u&&s>t+u&&s>n+u||st||c+un&&(n+=u_);var h=Math.atan2(l,s);return h<0&&(h+=u_),h>=i&&h<=n||h+u_>=i&&h+u_<=n}function $o(r,e,t,i,n,a){if(a>e&&a>i||an?s:0}var Sf=Ki.CMD,Ap=Math.PI*2,Uue=1e-4;function Oue(r,e){return Math.abs(r-e)e&&u>i&&u>a&&u>s||u1&&Fue(),p=hi(e,i,a,s,Qo[0]),h>1&&(d=hi(e,i,a,s,Qo[1]))),h===2?me&&s>i&&s>a||s=0&&u<=1){for(var c=0,f=vi(e,i,a,u),h=0;ht||s<-t)return 0;var l=Math.sqrt(t*t-s*s);aa[0]=-l,aa[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=Ap-1e-4){i=0,n=Ap;var c=a?1:-1;return o>=aa[0]+r&&o<=aa[1]+r?c:0}if(i>n){var f=i;i=n,n=f}i<0&&(i+=Ap,n+=Ap);for(var h=0,p=0;p<2;p++){var d=aa[p];if(d+r>o){var g=Math.atan2(s,d),c=a?1:-1;g<0&&(g=Ap+g),(g>=i&&g<=n||g+Ap>=i&&g+Ap<=n)&&(g>Math.PI/2&&g1&&(t||(s+=$o(l,u,c,f,i,n))),m&&(l=a[d],u=a[d+1],c=l,f=u),g){case Sf.M:c=a[d++],f=a[d++],l=c,u=f;break;case Sf.L:if(t){if(Ul(l,u,a[d],a[d+1],e,i,n))return!0}else s+=$o(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case Sf.C:if(t){if(DH(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,n))return!0}else s+=zue(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case Sf.Q:if(t){if(Zb(l,u,a[d++],a[d++],a[d],a[d+1],e,i,n))return!0}else s+=Bue(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case Sf.A:var v=a[d++],_=a[d++],y=a[d++],x=a[d++],M=a[d++],S=a[d++];d+=1;var w=!!(1-a[d++]);h=Math.cos(M)*y+v,p=Math.sin(M)*x+_,m?(c=h,f=p):s+=$o(l,u,h,p,i,n);var T=(i-v)*x/y+v;if(t){if(UH(v,_,x,M,M+S,w,e,T,n))return!0}else s+=kue(v,_,x,M,M+S,w,T,n);l=Math.cos(M+S)*y+v,u=Math.sin(M+S)*x+_;break;case Sf.R:c=l=a[d++],f=u=a[d++];var C=a[d++],b=a[d++];if(h=c+C,p=f+b,t){if(Ul(c,f,h,f,e,i,n)||Ul(h,f,h,p,e,i,n)||Ul(h,p,c,p,e,i,n)||Ul(c,p,c,f,e,i,n))return!0}else s+=$o(h,f,h,p,i,n),s+=$o(c,p,c,f,i,n);break;case Sf.Z:if(t){if(Ul(l,u,c,f,e,i,n))return!0}else s+=$o(l,u,c,f,i,n);l=c,u=f;break}}return!t&&!Oue(u,f)&&(s+=$o(l,u,c,f,i,n)||0),s!==0}function FH(r,e,t){return OH(r,0,!1,e,t)}function zH(r,e,t,i){return OH(r,e,!0,t,i)}var Xm=Ye({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Pl),Gue={style:Ye({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xp.style)},hP=go.concat(["invisible","culling","z","z2","zlevel","parent"]),Hue=function(r){Xt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s.5?$0:i>.2?FG:Q0}else if(t)return Q0}return $0},e.prototype.getInsideTextStroke=function(t){var i=this.style.fill;if(Ce(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=Dm(t,0)0))},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,i=this.style,n=!t;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&cf)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){s.copy(t);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect(),o=this.style;if(t=n[0],i=n[1],a.contain(t,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),zH(s,l/u,t,i)))return!0}if(this.hasFill())return FH(s,t,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=cf,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,i){t==="shape"?this.setShape(i):r.prototype.attrKV.call(this,t,i)},e.prototype.setShape=function(t,i){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=i:fe(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&cf)},e.prototype.createStyle=function(t){return lf(Xm,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var i=this._normalState;t.shape&&!i.shape&&(i.shape=fe({},this.shape))},e.prototype._applyStateObj=function(t,i,n,a,o,s){r.prototype._applyStateObj.call(this,t,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=fe({},n.shape),fe(u,i.shape)):(u=fe({},a?this.shape:n.shape),fe(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=fe({},this.shape);for(var c={},f=bt(u),h=0;h0},e.prototype.hasFill=function(){var t=this.style,i=t.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(t){return lf(Wue,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var i=t.text;i!=null?i+="":i="";var n=Ll(i,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(gi);BH.prototype.type="tspan";var bu=BH;var Xue=Ye({x:0,y:0},Pl),Yue={style:Ye({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xp.style)};function que(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var kH=function(r){Xt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return lf(Xue,t)},e.prototype._getSize=function(t){var i=this.style,n=i[t];if(n!=null)return n;var a=que(i.image)?i.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=i[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Yue},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new lt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(gi);kH.prototype.type="image";var Ur=kH;function VH(r,e){var t=e.x,i=e.y,n=e.width,a=e.height,o=e.r,s,l,u,c;n<0&&(t=t+n,n=-n),a<0&&(i=i+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>n&&(f=s+l,s*=n/f,l*=n/f),u+c>n&&(f=u+c,u*=n/f,c*=n/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),r.moveTo(t+s,i),r.lineTo(t+n-l,i),l!==0&&r.arc(t+n-l,i+l,l,-Math.PI/2,0),r.lineTo(t+n,i+a-u),u!==0&&r.arc(t+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(t+c,i+a),c!==0&&r.arc(t+c,i+a-c,c,Math.PI/2,Math.PI),r.lineTo(t,i+s),s!==0&&r.arc(t+s,i+s,s,Math.PI,Math.PI*1.5)}var Ym=Math.round;function jb(r,e,t){if(e){var i=e.x1,n=e.x2,a=e.y1,o=e.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=t&&t.lineWidth;return s&&(Ym(i*2)===Ym(n*2)&&(r.x1=r.x2=Mf(i,s,!0)),Ym(a*2)===Ym(o*2)&&(r.y1=r.y2=Mf(a,s,!0))),r}}function Kb(r,e,t){if(e){var i=e.x,n=e.y,a=e.width,o=e.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Mf(i,s,!0),r.y=Mf(n,s,!0),r.width=Math.max(Mf(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(Mf(n+o,s,!1)-r.y,o===0?0:1)),r}}function Mf(r,e,t){if(!e)return r;var i=Ym(r*2);return(i+Ym(e))%2===0?i/2:(i+(t?1:-1))/2}var Kue=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}();var Jue={},GH=function(r){Xt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Kue},e.prototype.buildPath=function(t,i){var n,a,o,s;if(this.subPixelOptimize){var l=Kb(Jue,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?VH(t,i):t.rect(n,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ut);GH.prototype.type="rect";var Tt=GH;var HH={fill:"#000"},WH=2,$ue={style:Ye({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},xp.style)},$H=function(r){Xt(e,r);function e(t){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=HH,i.attr(t),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,I=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),R=o.calculatedLineHeight,A=0;A=0&&(A=S[R],A.align==="right");)this._placeToken(A,t,T,v,I,"right",y),C-=A.width,I-=A.width,R--;for(E+=(a-(E-m)-(_-I)-C)/2;b<=R;)A=S[b],this._placeToken(A,t,T,v,E+A.width/2,"center",y),E+=A.width,b++;v+=T}},e.prototype._placeToken=function(t,i,n,a,o,s,l){var u=i.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=a+n/2;c==="top"?f=a+t.height/2:c==="bottom"&&(f=a+n-t.height/2);var h=!t.isLineHolder&&pP(u);h&&this._renderBackground(u,i,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var p=!!u.backgroundColor,d=t.textPadding;d&&(o=KH(o,s,d),f-=t.height/2-d[0]-t.innerHeight/2);var g=this._getOrCreateChild(bu),m=g.createStyle();g.useStyle(m);var v=this._defaultStyle,_=!1,y=0,x=jH("fill"in u?u.fill:"fill"in i?i.fill:(_=!0,v.fill)),M=ZH("stroke"in u?u.stroke:"stroke"in i?i.stroke:!p&&!l&&(!v.autoStroke||_)?(y=WH,v.stroke):null),S=u.textShadowBlur>0||i.textShadowBlur>0;m.text=t.text,m.x=o,m.y=f,S&&(m.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,m.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=t.font||ho,m.opacity=Xi(u.opacity,i.opacity,1),YH(m,u),M&&(m.lineWidth=Xi(u.lineWidth,i.lineWidth,y),m.lineDash=ft(u.lineDash,i.lineDash),m.lineDashOffset=i.lineDashOffset||0,m.stroke=M),x&&(m.fill=x);var w=t.contentWidth,T=t.contentHeight;g.setBoundingRect(new lt(Nm(m.x,w,m.textAlign),vp(m.y,T,m.textBaseline),w,T))},e.prototype._renderBackground=function(t,i,n,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,h=l&&!f,p=t.borderRadius,d=this,g,m;if(h||t.lineHeight||u&&c){g=this._getOrCreateChild(Tt),g.useStyle(g.createStyle()),g.style.fill=null;var v=g.shape;v.x=n,v.y=a,v.width=o,v.height=s,v.r=p,g.dirtyShape()}if(h){var _=g.style;_.fill=l||null,_.fillOpacity=ft(t.fillOpacity,1)}else if(f){m=this._getOrCreateChild(Ur),m.onload=function(){d.dirtyStyle()};var y=m.style;y.image=l.image,y.x=n,y.y=a,y.width=o,y.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=ft(t.strokeOpacity,1),_.lineDash=t.borderDash,_.lineDashOffset=t.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var x=(g||m).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=Xi(t.opacity,i.opacity,1)},e.makeFont=function(t){var i="";return mP(t)&&(i=[t.fontStyle,t.fontWeight,dP(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&Yi(i)||t.textFont||t.font},e}(gi),Que={left:!0,right:1,center:1},ece={top:1,bottom:1,middle:1},XH=["fontStyle","fontWeight","fontSize","fontFamily"];function dP(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?$M+"px":r+"px"}function YH(r,e){for(var t=0;t=0,a=!1;if(r instanceof ut){var o=a4(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(qm(s)||qm(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=fe({},i),u=fe({},u),u.fill=s):!qm(u.fill)&&qm(s)?(a=!0,i=fe({},i),u=fe({},u),u.fill=X0(s)):!qm(u.stroke)&&qm(l)&&(a||(i=fe({},i),u=fe({},u)),u.stroke=X0(l)),i.style=u}}if(i&&i.z2==null){a||(i=fe({},i));var c=r.z2EmphasisLift;i.z2=r.z2+(c??wu)}return i}function sce(r,e,t){if(t&&t.z2==null){t=fe({},t);var i=r.z2SelectLift;t.z2=r.z2+(i??rce)}return t}function lce(r,e,t){var i=dt(r.currentStates,e)>=0,n=r.style.opacity,a=i?null:ace(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=fe({},t),o=fe({opacity:i?n:a.opacity*.1},o),t.style=o),t}function vP(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return oce(this,r,e,t);if(r==="blur")return lce(this,r,t);if(r==="select")return sce(this,r,t)}return t}function Fs(r){r.stateProxy=vP;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=vP),t&&(t.stateProxy=vP)}function r4(r,e){!u4(r,e)&&!r.__highByOuter&&Tu(r,o4)}function i4(r,e){!u4(r,e)&&!r.__highByOuter&&Tu(r,s4)}function Bn(r,e){r.__highByOuter|=1<<(e||0),Tu(r,o4)}function kn(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Tu(r,s4)}function Qb(r){Tu(r,xP)}function d_(r){Tu(r,l4)}function SP(r){Tu(r,ice)}function MP(r){Tu(r,nce)}function u4(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function bP(r){var e=r.getModel(),t=[],i=[];e.eachComponent(function(n,a){var o=yP(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){l4(u)}),s&&t.push(a)),o.isBlured=!1}),N(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function gP(r,e,t,i){var n=i.getModel();t=t||"coordinateSystem";function a(u,c){for(var f=0;f0){var l={dataIndex:s,seriesIndex:t.seriesIndex};o!=null&&(l.dataType=o),e.push(l)}})}),e}function Ol(r,e,t){Eu(r,!0),Tu(r,Fs),tw(r,e,t)}function uce(r){Eu(r,!1)}function nr(r,e,t,i){i?uce(r):Ol(r,e,t)}function tw(r,e,t){var i=rt(r);e!=null?(i.focus=e,i.blurScope=t):i.focus&&(i.focus=null)}var n4=["emphasis","blur","select"],cce={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Gr(r,e,t,i){t=t||"itemStyle";for(var n=0;n__,BezierCurve:()=>Dp,BoundingRect:()=>lt,Circle:()=>oa,CompoundPath:()=>Qm,Ellipse:()=>v_,Group:()=>Ze,Image:()=>Ur,IncrementalDisplayable:()=>V4,Line:()=>Kr,LinearGradient:()=>zl,OrientedBoundingRect:()=>ev,Path:()=>ut,Point:()=>Nt,Polygon:()=>ei,Polyline:()=>$r,RadialGradient:()=>cw,Rect:()=>Tt,Ring:()=>Pp,Sector:()=>yi,Text:()=>Lt,applyTransform:()=>wn,clipPointsByRect:()=>NP,clipRectByRect:()=>Hce,createIcon:()=>Pu,extendPath:()=>kce,extendShape:()=>zce,getShapeClass:()=>x_,getTransform:()=>ks,groupTransition:()=>Lu,initProps:()=>ar,isElementRemoved:()=>Au,lineLineIntersect:()=>j4,linePolygonIntersect:()=>rv,makeImage:()=>IP,makePath:()=>tv,mergePath:()=>Gn,registerShape:()=>Bs,removeElement:()=>es,removeElementWithFadeOut:()=>Cu,resizePath:()=>Z4,setTooltipConfig:()=>Vs,subPixelOptimize:()=>S_,subPixelOptimizeLine:()=>Ru,subPixelOptimizeRect:()=>Vce,transformDirection:()=>Up,traverseElements:()=>sa,updateProps:()=>Dt});var Km=Ki.CMD,fce=[[],[],[]],y4=Math.sqrt,hce=Math.atan2;function iw(r,e){if(e){var t=r.data,i=r.len(),n,a,o,s,l,u,c=Km.M,f=Km.C,h=Km.L,p=Km.R,d=Km.A,g=Km.Q;for(o=0,s=0;o1&&(o*=EP(d),s*=EP(d));var g=(n===a?-1:1)*EP((o*o*(s*s)-o*o*(p*p)-s*s*(h*h))/(o*o*(p*p)+s*s*(h*h)))||0,m=g*o*p/s,v=g*-s*h/o,_=(r+t)/2+aw(f)*m-nw(f)*v,y=(e+i)/2+nw(f)*m+aw(f)*v,x=x4([1,0],[(h-m)/o,(p-v)/s]),M=[(h-m)/o,(p-v)/s],S=[(-1*h-m)/o,(-1*p-v)/s],w=x4(M,S);if(AP(M,S)<=-1&&(w=m_),AP(M,S)>=1&&(w=0),w<0){var T=Math.round(w/m_*1e6)/1e6;w=m_*2+T%2*m_}c.addData(u,_,y,o,s,x,w,f,a)}var pce=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,dce=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function mce(r){var e=new Ki;if(!r)return e;var t=0,i=0,n=t,a=i,o,s=Ki.CMD,l=r.match(pce);if(!l)return e;for(var u=0;uA*A+D*D&&(T=b,C=E),{cx:T,cy:C,x0:-c,y0:-f,x1:T*(n/M-1),y1:C*(n/M-1)}}function Sce(r){var e;if(pe(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function P4(r,e){var t,i=g_(e.r,0),n=g_(e.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,p=R4(u-l),d=p>CP&&p%CP;if(d>zs&&(p=d),!(i>zs))r.moveTo(c,f);else if(p>CP-zs)r.moveTo(c+i*$m(l),f+i*Lp(l)),r.arc(c,f,i,l,u,!h),n>zs&&(r.moveTo(c+n*$m(u),f+n*Lp(u)),r.arc(c,f,n,u,l,h));else{var g=void 0,m=void 0,v=void 0,_=void 0,y=void 0,x=void 0,M=void 0,S=void 0,w=void 0,T=void 0,C=void 0,b=void 0,E=void 0,I=void 0,R=void 0,A=void 0,D=i*$m(l),U=i*Lp(l),B=n*$m(u),F=n*Lp(u),k=p>zs;if(k){var G=e.cornerRadius;G&&(t=Sce(G),g=t[0],m=t[1],v=t[2],_=t[3]);var Y=R4(i-n)/2;if(y=Fl(Y,v),x=Fl(Y,_),M=Fl(Y,g),S=Fl(Y,m),C=w=g_(y,x),b=T=g_(M,S),(w>zs||T>zs)&&(E=i*$m(u),I=i*Lp(u),R=n*$m(l),A=n*Lp(l),pzs){var se=Fl(v,C),Ee=Fl(_,C),q=sw(R,A,D,U,i,se,h),H=sw(E,I,B,F,i,Ee,h);r.moveTo(c+q.cx+q.x0,f+q.cy+q.y0),C0&&r.arc(c+q.cx,f+q.cy,se,Vn(q.y0,q.x0),Vn(q.y1,q.x1),!h),r.arc(c,f,i,Vn(q.cy+q.y1,q.cx+q.x1),Vn(H.cy+H.y1,H.cx+H.x1),!h),Ee>0&&r.arc(c+H.cx,f+H.cy,Ee,Vn(H.y1,H.x1),Vn(H.y0,H.x0),!h))}else r.moveTo(c+D,f+U),r.arc(c,f,i,l,u,!h);if(!(n>zs)||!k)r.lineTo(c+B,f+F);else if(b>zs){var se=Fl(g,b),Ee=Fl(m,b),q=sw(B,F,E,I,n,-Ee,h),H=sw(D,U,R,A,n,-se,h);r.lineTo(c+q.cx+q.x0,f+q.cy+q.y0),b0&&r.arc(c+q.cx,f+q.cy,Ee,Vn(q.y0,q.x0),Vn(q.y1,q.x1),!h),r.arc(c,f,n,Vn(q.cy+q.y1,q.cx+q.x1),Vn(H.cy+H.y1,H.cx+H.x1),h),se>0&&r.arc(c+H.cx,f+H.cy,se,Vn(H.y1,H.x1),Vn(H.y0,H.x0),!h))}else r.lineTo(c+B,f+F),r.arc(c,f,n,u,l,h)}r.closePath()}}}var bce=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}();var D4=function(r){Xt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new bce},e.prototype.buildPath=function(t,i){P4(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ut);D4.prototype.type="sector";var yi=D4;var wce=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}();var I4=function(r){Xt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new wce},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,o=Math.PI*2;t.moveTo(n+i.r,a),t.arc(n,a,i.r,0,o,!1),t.moveTo(n+i.r0,a),t.arc(n,a,i.r0,0,o,!0)},e}(ut);I4.prototype.type="ring";var Pp=I4;function RP(r,e,t,i){var n=[],a=[],o=[],s=[],l,u,c,f;if(i){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,p=r.length;h=2){if(i){var a=RP(n,i,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,f=n.length;sNp[1]){if(s=!1,a)return s;var c=Math.abs(Np[0]-Ip[1]),f=Math.abs(Ip[0]-Np[1]);Math.min(c,f)>n.len()&&(c0){var f=c.duration,h=c.delay,p=c.easing,d={duration:f,delay:h||0,easing:p,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function Dt(r,e,t,i,n,a){LP("update",r,e,t,i,n,a)}function ar(r,e,t,i,n,a){LP("enter",r,e,t,i,n,a)}function Au(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function X4(r){return!r.isGroup}function Gce(r){return r.shape!=null}function Lu(r,e,t){if(!r||!e)return;function i(o){var s={};return o.traverse(function(l){X4(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Gce(o)&&(s.shape=fe({},o.shape)),s}var a=i(r);e.traverse(function(o){if(X4(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),Dt(o,l,t,rt(o).dataIndex)}}})}function NP(r,e){return de(r,function(t){var i=t[0];i=pw(i,e.x),i=dw(i,e.x+e.width);var n=t[1];return n=pw(n,e.y),n=dw(n,e.y+e.height),[i,n]})}function Hce(r,e){var t=pw(r.x,e.x),i=dw(r.x+r.width,e.x+e.width),n=pw(r.y,e.y),a=dw(r.y+r.height,e.y+e.height);if(i>=t&&a>=n)return{x:t,y:n,width:i-t,height:a-n}}function Pu(r,e,t){var i=fe({rectHover:!0},e),n=i.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),Ye(n,t),new Ur(i)):tv(r.replace("path://",""),i,t,"center")}function rv(r,e,t,i,n){for(var a=0,o=n[n.length-1];a1)return!1;var m=PP(p,d,c,f)/h;return!(m<0||m>1)}function PP(r,e,t,i){return r*i-t*e}function Wce(r){return r<=1e-6&&r>=-1e-6}function Vs(r){var e=r.itemTooltipOption,t=r.componentModel,i=r.itemName,n=Ce(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&N(bt(l),function(c){tt(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=rt(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:Ye({content:i,formatterParams:s},n)}}function Y4(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function sa(r,e){if(r)if(pe(r))for(var t=0;t=0&&s.push(l)}),s}}function Hn(r,e){return _t(_t({},r,!0),e,!0)}var o5={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}};var s5={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var _w="ZH",VP="EN",nv=VP,yw={},GP={},xw=Ft.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||nv).toUpperCase();return r.indexOf(_w)>-1?_w:nv}():nv;function l5(r,e){r=r.toUpperCase(),GP[r]=new Zt(e),yw[r]=e}function u5(r){if(Ce(r)){var e=yw[r.toUpperCase()]||{};return r===_w||r===VP?Qe(e):_t(Qe(e),Qe(yw[nv]),!1)}else return _t(Qe(r),Qe(yw[nv]),!1)}function b_(r){return GP[r]}function c5(){return GP[nv]}l5(VP,o5);l5(_w,s5);var Mw=1e3,bw=Mw*60,ov=bw*60,_o=ov*24,WP=_o*365,w_={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Sw="{yyyy}-{MM}-{dd}",XP={year:"{yyyy}",month:"{yyyy}-{MM}",day:Sw,hour:Sw+" "+w_.hour,minute:Sw+" "+w_.minute,second:Sw+" "+w_.second,millisecond:w_.none},HP=["year","month","day","hour","minute","second","millisecond"],YP=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Iu(r,e){return r+="","0000".substr(0,e-r.length)+r}function zp(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function f5(r){return r===zp(r)}function h5(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Bp(r,e,t,i){var n=Mn(r),a=n[ww(t)](),o=n[Fp(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[T_(t)](),u=n["get"+(t?"UTC":"")+"Day"](),c=n[av(t)](),f=(c-1)%12+1,h=n[E_(t)](),p=n[A_(t)](),d=n[C_(t)](),g=i instanceof Zt?i:b_(i||xw)||c5(),m=g.getModel("time"),v=m.get("month"),_=m.get("monthAbbr"),y=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Iu(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,Iu(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Iu(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,y[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Iu(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Iu(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Iu(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Iu(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Iu(d,3)).replace(/{S}/g,d+"")}function p5(r,e,t,i,n){var a=null;if(Ce(t))a=t;else if(He(t))a=t(r.value,e,{level:r.level});else{var o=fe({},w_);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(pe(a)){var f=r.level==null?0:r.level>=0?r.level:a.length+r.level;f=Math.min(f,a.length-1),a=a[f]}}return Bp(new Date(r.value),a,n,i)}function d5(r,e){var t=Mn(r),i=t[Fp(e)]()+1,n=t[T_(e)](),a=t[av(e)](),o=t[E_(e)](),s=t[A_(e)](),l=t[C_(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,p=h&&n===1,d=p&&i===1;return d?"year":p?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function qP(r,e,t){var i=At(r)?Mn(r):r;switch(e=e||d5(r,t),e){case"year":return i[ww(t)]();case"half-year":return i[Fp(t)]()>=6?1:0;case"quarter":return Math.floor((i[Fp(t)]()+1)/4);case"month":return i[Fp(t)]();case"day":return i[T_(t)]();case"half-day":return i[av(t)]()/24;case"hour":return i[av(t)]();case"minute":return i[E_(t)]();case"second":return i[A_(t)]();case"millisecond":return i[C_(t)]()}}function ww(r){return r?"getUTCFullYear":"getFullYear"}function Fp(r){return r?"getUTCMonth":"getMonth"}function T_(r){return r?"getUTCDate":"getDate"}function av(r){return r?"getUTCHours":"getHours"}function E_(r){return r?"getUTCMinutes":"getMinutes"}function A_(r){return r?"getUTCSeconds":"getSeconds"}function C_(r){return r?"getUTCMilliseconds":"getMilliseconds"}function m5(r){return r?"setUTCFullYear":"setFullYear"}function ZP(r){return r?"setUTCMonth":"setMonth"}function jP(r){return r?"setUTCDate":"setDate"}function KP(r){return r?"setUTCHours":"setHours"}function JP(r){return r?"setUTCMinutes":"setMinutes"}function $P(r){return r?"setUTCSeconds":"setSeconds"}function QP(r){return r?"setUTCMilliseconds":"setMilliseconds"}function tD(r){if(!yp(r))return Ce(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Tw(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,i){return i.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Gs=Mm;function Ew(r,e,t){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&Yi(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Mn(r):r;if(isNaN(+l)){if(s)return"-"}else return Bp(l,i,t)}if(e==="ordinal")return I0(r)?n(r):At(r)&&a(r)?r+"":"-";var u=Pa(r);return a(u)?tD(u):I0(r)?n(r):typeof r=="boolean"?r+"":"-"}var v5=["a","b","c","d","e","f","g"],eD=function(r,e){return"{"+r+(e??"")+"}"};function Aw(r,e,t){pe(e)||(e=[e]);var i=e.length;if(!i)return"";for(var n=e[0].$vars||[],a=0;a':'';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Hs(r,e){return e=e||"transparent",Ce(r)?r:qe(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function kp(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Cw=N,rD=["left","right","top","bottom","width","height"],Vp=[["width","left","right"],["height","top","bottom"]];function iD(r,e,t,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),p,d;if(r==="horizontal"){var g=c.width+(h?-h.x+c.x:0);p=a+g,p>i||l.newline?(a=0,p=g,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);d=o+m,d>n||l.newline?(a+=s+t,o=0,d=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=p+t:o=d+t)})}var Ws=iD,yVe=ot(iD,"vertical"),_Ve=ot(iD,"horizontal");function _5(r,e,t){var i=e.width,n=e.height,a=Fe(r.left,i),o=Fe(r.top,n),s=Fe(r.right,i),l=Fe(r.bottom,n);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=i),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=Gs(t||0),{width:Math.max(s-a-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function xr(r,e,t){t=Gs(t||0);var i=e.width,n=e.height,a=Fe(r.left,i),o=Fe(r.top,n),s=Fe(r.right,i),l=Fe(r.bottom,n),u=Fe(r.width,i),c=Fe(r.height,n),f=t[2]+t[0],h=t[1]+t[3],p=r.aspect;switch(isNaN(u)&&(u=i-s-h-a),isNaN(c)&&(c=n-l-f-o),p!=null&&(isNaN(u)&&isNaN(c)&&(p>i/n?u=i*.8:c=n*.8),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(a)&&(a=i-s-u-h),isNaN(o)&&(o=n-l-c-f),r.left||r.right){case"center":a=i/2-u/2-t[3];break;case"right":a=i-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-c/2-t[0];break;case"bottom":o=n-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=i-h-a-(s||0)),isNaN(c)&&(c=n-f-o-(l||0));var d=new lt(a+t[3],o+t[0],u,c);return d.margin=t,d}function Ef(r,e,t,i,n,a){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new lt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=xr(Ye({width:u.width,height:u.height},e),t,i),h=o?f.x-u.x:0,p=s?f.y-u.y:0;return l==="raw"?(a.x=h,a.y=p):(a.x+=h,a.y+=p),a===r&&r.markRedraw(),!0}function x5(r,e){return r[Vp[e][0]]!=null||r[Vp[e][1]]!=null&&r[Vp[e][2]]!=null}function Af(r){var e=r.layoutMode||r.constructor.layoutMode;return qe(e)?e:e?{type:e}:null}function za(r,e,t){var i=t&&t.ignoreSize;!pe(i)&&(i=[i,i]);var n=o(Vp[0],0),a=o(Vp[1],1);u(Vp[0],r,n),u(Vp[1],r,a);function o(c,f){var h={},p=0,d={},g=0,m=2;if(Cw(c,function(y){d[y]=r[y]}),Cw(c,function(y){s(e,y)&&(h[y]=d[y]=e[y]),l(h,y)&&p++,l(d,y)&&g++}),i[f])return l(e,c[1])?d[c[2]]=null:l(e,c[2])&&(d[c[1]]=null),d;if(g===m||!p)return d;if(p>=m)return h;for(var v=0;v=0;l--)s=_t(s,n[l],!0);i.defaultOption=s}return i.defaultOption},e.prototype.getReferringComponents=function(t,i){var n=t+"Index",a=t+"Id";return gf(this.ecModel,t,{index:this.get(n,!0),id:this.get(a,!0)},i)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Zt);Wb(sv,Zt);yf(sv);n5(sv);a5(sv,efe);function efe(r){var e=[];return N(sv.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=de(e,function(t){return Ia(t).main}),r!=="dataset"&&dt(e,"dataset")<=0&&e.unshift("dataset"),e}var Pt=sv;var S5="";typeof navigator<"u"&&(S5=navigator.platform||"");var lv="rgba(0, 0, 0, 0.2)",M5={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:lv,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:lv,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:lv,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:lv,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:lv,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:lv,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:S5.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Rw=ke(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),fn="original",Ei="arrayRows",En="objectRows",xo="keyedColumns",So="typedArray",aD="unknown",Ba="column",Nu="row";var Ji={Must:1,Might:2,Not:3},b5=vt();function w5(r){b5(r).datasetMap=ke()}function Lw(r,e,t){var i={},n=Pw(e);if(!n||!r)return i;var a=[],o=[],s=e.ecModel,l=b5(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),N(r,function(g,m){var v=qe(g)?g:r[m]={name:g};v.type==="ordinal"&&c==null&&(c=m,f=d(v)),i[v.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});N(r,function(g,m){var v=g.name,_=d(g);if(c==null){var y=h.valueWayDim;p(i[v],y,_),p(o,y,_),h.valueWayDim+=_}else if(c===m)p(i[v],0,_),p(a,0,_);else{var y=h.categoryWayDim;p(i[v],y,_),p(o,y,_),h.categoryWayDim+=_}});function p(g,m,v){for(var _=0;_e)return r[i];return r[t-1]}function L5(r,e,t,i,n,a,o){a=a||r;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!i?t:rfe(i,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return n&&(u[n]=f),s.paletteIdx=(l+1)%c.length,f}}function ife(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Iw,D_,P5,D5="\0_ec_inner",nfe=1;var O5=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Zt(a),this._locale=new Zt(o),this._optionManager=s},e.prototype.setOption=function(t,i,n){var a=U5(i);this._optionManager.setOption(t,n,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,i){return this._resetOption(t,U5(i))},e.prototype._resetOption=function(t,i){var n=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?P5(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&N(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=ke(),u=i&&i.replaceMergeMainTypeMap;w5(this),N(t,function(f,h){f!=null&&(Pt.hasClass(h)?h&&(s.push(h),l.set(h,!0)):n[h]=n[h]==null?Qe(f):_t(n[h],f,!0))}),u&&u.each(function(f,h){Pt.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Pt.topologicalTravel(s,Pt.getAllClassMainTypes(),c,this);function c(f){var h=C5(this,f,Jt(t[f])),p=a.get(f),d=p?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=Gb(p,h,d);sH(g,f,Pt),n[f]=null,a.set(f,null),o.set(f,0);var m=[],v=[],_=0,y,x;N(g,function(M,S){var w=M.existing,T=M.newOption;if(!T)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=f==="series",b=Pt.getClass(f,M.keyInfo.subType,!C);if(!b){if(0)var E,I;return}if(f==="tooltip"){if(y)return;y=!0}if(w&&w.constructor===b)w.name=M.keyInfo.name,w.mergeOption(T,this),w.optionUpdated(T,!1);else{var R=fe({componentIndex:S},M.keyInfo);w=new b(T,this,this,R),fe(w,R),M.brandNew&&(w.__requireNewView=!0),w.init(T,this,this),w.optionUpdated(null,!0)}}w?(m.push(w.option),v.push(w),_++):(m.push(void 0),v.push(void 0))},this),n[f]=m,a.set(f,v),o.set(f,_),f==="series"&&Iw(this)}this._seriesIndices||Iw(this)},e.prototype.getOption=function(){var t=Qe(this.option);return N(t,function(i,n){if(Pt.hasClass(n)){for(var a=Jt(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Vm(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[n]=a}}),delete t[D5],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,i){var n=this._componentsMap.get(t);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function mfe(r,e){return r.join(",")===e.join(",")}var F5=ffe;var Xs=N,N_=qe,z5=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function lD(r){var e=r&&r.itemStyle;if(e)for(var t=0,i=z5.length;t=0;m--){var v=r[m];if(s||(d=v.data.rawIndexOf(v.stackedByDimension,p)),d>=0){var _=v.data.getByRawIndex(v.stackResultDimension,d);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=JG(h,_),g=_;break}}}return i[0]=h,i[1]=g,i})})}var Fw=function(){function r(e){this.data=e.data||(e.sourceFormat===xo?{}:[]),this.sourceFormat=e.sourceFormat||aD,this.seriesLayoutBy=e.seriesLayoutBy||Ba,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var i=0;ig&&(g=y)}p[0]=d,p[1]=g}},n=function(){return this._data?this._data.length/this._dimSize:0};q5=(e={},e[Ei+"_"+Ba]={pure:!0,appendData:a},e[Ei+"_"+Nu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[En]={pure:!0,appendData:a},e[xo]={pure:!0,appendData:function(o){var s=this._data;N(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[fn]={appendData:a},e[So]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(e,t){return Fu(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,i){},r}();function yD(r){var e,t;return qe(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Cf(r){return new Rfe(r)}var Rfe=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,i=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(f||p1&&i>0?s:o}};return a;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},Pfe=function(){function r(e,t){if(!At(t)){var i="";ur(i)}this._opFn=$5[e],this._rvalFloat=Pa(t)}return r.prototype.evaluate=function(e){return At(e)?this._opFn(e,this._rvalFloat):this._opFn(Pa(e),this._rvalFloat)},r}(),Vw=function(){function r(e,t){var i=e==="desc";this._resultLT=i?1:-1,t==null&&(t=i?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var i=At(e)?e:Pa(e),n=At(t)?t:Pa(t),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=Ce(e),l=Ce(t);s&&(i=l?e:0),l&&(n=s?t:0)}return in?-this._resultLT:0},r}();var Dfe=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Pa(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var i=typeof e;i!==this._rvalTypeof&&(i==="number"||this._rvalTypeof==="number")&&(t=Pa(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function Q5(r,e){return r==="eq"||r==="ne"?new Dfe(r==="eq",e):tt($5,r)?new Pfe(r,e):null}var Ife=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return ns(e,t)},r}();function Nfe(r,e){var t=new Ife,i=r.data,n=t.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Ba&&ur(o);var s=[],l={},u=r.dimensionsDefine;if(u)N(u,function(g,m){var v=g.name,_={index:m,name:v,displayName:g.displayName};if(s.push(_),v!=null){var y="";tt(l,v)&&ur(y),l[v]=_}});else for(var c=0;c65535?kfe:Vfe}function pv(){return[1/0,-1/0]}function Gfe(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function nW(r,e,t,i,n){var a=aW[t||"float"];if(n){var o=r[e],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=de(o,function(_){return _.property}),c=0;cv[1]&&(v[1]=m)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(i!=null&&ie)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,i){var n=this._chunks,a=n[e],o=[];if(!a)return o;i==null&&(i=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c=0&&l<0)&&(s=d,l=p,u=0),p===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var i=t.constructor,n=this._count;if(i===Array){e=new i(n);for(var a=0;a=f&&_<=h||isNaN(_))&&(l[u++]=g),g++}d=!0}else if(a===2){for(var m=p[n[0]],y=p[n[1]],x=e[n[1]][0],M=e[n[1]][1],v=0;v=f&&_<=h||isNaN(_))&&(S>=x&&S<=M||isNaN(S))&&(l[u++]=g),g++}d=!0}}if(!d)if(a===1)for(var v=0;v=f&&_<=h||isNaN(_))&&(l[u++]=w)}else for(var v=0;ve[b][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(v))}return uv[1]&&(v[1]=m)}}}},r.prototype.lttbDownSample=function(e,t){var i=this.clone([e],!0),n=i._chunks,a=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,h,p=new(F_(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));p[s++]=u;for(var d=1;dc&&(c=f,h=x)}E>0&&Ec-d&&(l=c-d,s.length=l);for(var g=0;gf[1]&&(f[1]=v),h[p++]=_}return a._count=p,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var i=e.length,n=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var i=[],n=this._chunks,a=0;a=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,i,n,a){return ns(t[a],this._dimensions[a])}xD={arrayRows:e,objectRows:function(t,i,n,a){return ns(t[i],this._dimensions[a])},keyedColumns:e,original:function(t,i,n,a){var o=t&&(t.value==null?t:t.value);return ns(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,i,n,a){return t[a]}}}(),r}(),z_=Hfe;var Ww=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),i=!!t.length,n,a;if(Hw(e)){var o=e,s=void 0,l=void 0,u=void 0;if(i){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=bi(s)?So:fn,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},p=ft(f.seriesLayoutBy,h.seriesLayoutBy)||null,d=ft(f.sourceHeader,h.sourceHeader),g=ft(f.dimensions,h.dimensions),m=p!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||g;n=m?[O_(s,{seriesLayoutBy:p,sourceHeader:d,dimensions:g},l)]:[]}else{var v=e;if(i){var _=this._applyTransform(t);n=_.sourceList,a=_.upstreamSignList}else{var y=v.get("source",!0);n=[O_(y,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,i=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var a="";e.length!==1&&oW(a)}var o,s=[],l=[];return N(e,function(u){u.prepareSource();var c=u.getSource(n||0),f="";n!=null&&!c&&oW(f),s.push(c),l.push(u._getVersionSign())}),i?o=rW(i,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[Y5(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return N(r.blocks,function(n){var a=cW(n);a>=e&&(e=a+ +(i&&(!a||bD(n)&&!n.noHeader)))}),e}return 0}function Yfe(r,e,t,i){var n=e.noHeader,a=Zfe(cW(e)),o=[],s=e.blocks||[];kr(!s||pe(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(tt(u,l)){var c=new Vw(u[l],null);s.sort(function(d,g){return c.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}N(s,function(d,g){var m=e.valueFormatter,v=uW(d)(m?fe(fe({},r),{valueFormatter:m}):r,d,g>0?a.html:0,i);v!=null&&o.push(v)});var f=r.renderMode==="richText"?o.join(a.richText):wD(o.join(""),n?t:a.html);if(n)return f;var h=Ew(e.header,"ordinal",r.useUTC),p=lW(i,r.renderMode).nameStyle;return r.renderMode==="richText"?fW(r,h,p)+a.richText+f:wD('
'+yn(h)+"
"+f,t)}function qfe(r,e,t,i){var n=r.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(x){return x=pe(x)?x:[x],de(x,function(M,S){return Ew(M,pe(p)?p[S]:p,u)})};if(!(a&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),h=a?"":Ew(l,"ordinal",u),p=e.valueType,d=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,v=lW(i,n),_=v.nameStyle,y=v.valueStyle;return n==="richText"?(s?"":f)+(a?"":fW(r,h,_))+(o?"":Jfe(r,d,g,m,y)):wD((s?"":f)+(a?"":jfe(h,!s,_))+(o?"":Kfe(d,g,m,y)),t)}}function TD(r,e,t,i,n,a){if(r){var o=uW(r),s={useUTC:n,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function Zfe(r){return{html:Wfe[r],richText:Xfe[r]}}function wD(r,e){var t='
',i="margin: "+e+"px 0 0";return'
'+r+t+"
"}function jfe(r,e,t){var i=e?"margin-left:2px":"";return''+yn(r)+""}function Kfe(r,e,t,i){var n=t?"10px":"20px",a=e?"float:right;margin-left:"+n:"";return r=pe(r)?r:[r],''+de(r,function(o){return yn(o)}).join("  ")+""}function fW(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function Jfe(r,e,t,i,n){var a=[n],o=i?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(pe(e)?e.join(" "):e,a)}function Xw(r,e){var t=r.getData().getItemVisual(e,"style"),i=t[r.visualDrawType];return Hs(i)}function Yw(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var qw=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Vb()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,i){var n=i==="richText"?this._generateStyleName():null,a=y5({color:t,type:e,renderMode:i,markerId:n});return Ce(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var i={};pe(t)?N(t,function(a){return fe(i,a)}):fe(i,t);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+e+"}"},r}();function Zw(r){var e=r.series,t=r.dataIndex,i=r.multipleSeries,n=e.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=pe(s),u=Xw(e,t),c,f,h,p;if(o>1||l&&!o){var d=$fe(s,e,t,a,u);c=d.inlineValues,f=d.inlineValueTypes,h=d.blocks,p=d.inlineValues[0]}else if(o){var g=n.getDimensionInfo(a[0]);p=c=Fu(n,t,a[0]),f=g.type}else p=c=l?s[0]:s;var m=Gm(e),v=m&&e.name||"",_=n.getName(t),y=i?v:_;return Or("section",{header:v,noHeader:i||!m,sortParam:p,blocks:[Or("nameValue",{markerType:"item",markerColor:u,name:y,noName:!Yi(y),value:c,valueType:f,dataIndex:t})].concat(h||[])})}function $fe(r,e,t,i,n){var a=e.getData(),o=gn(r,function(f,h,p){var d=a.getDimensionInfo(p);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?N(i,function(f){c(Fu(a,t,f),f)}):N(r,c);function c(f,h){var p=a.getDimensionInfo(h);!p||p.otherDims.tooltip===!1||(o?u.push(Or("nameValue",{markerType:"subItem",markerColor:n,name:p.displayName,value:f,valueType:p.type})):(s.push(f),l.push(p.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Rf=vt();function jw(r,e){return r.getName(e)||r.getId(e)}var B_="__universalTransitionEnabled",Kw=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Cf({count:ehe,reset:the}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var a=Rf(this).sourceManager=new Ww(this);a.prepareSource();var o=this.getInitialData(t,n);pW(o,this),this.dataTask.context.data=o,Rf(this).dataBeforeProcessed=o,hW(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,i){var n=Af(this),a=n?rs(t):{},o=this.subType;Pt.hasClass(o)&&(o+="Series"),_t(t,i.getTheme().get(this.subType)),_t(t,this.getDefaultOption()),yo(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&za(t,a,n)},e.prototype.mergeOption=function(t,i){t=_t(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Af(this);n&&za(this.option,t,n);var a=Rf(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,i);pW(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Rf(this).dataBeforeProcessed=o,hW(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!bi(t))for(var i=["show"],n=0;nthis.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,i,n){var a=this.ecModel,o=L_.prototype.getColorFromPalette.call(this,t,i,n);return o||(o=a.getColorFromPalette(t,i,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,i){this._innerSelect(this.getData(i),t)},e.prototype.unselect=function(t,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(t,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[jw(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[B_])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){qe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,i)}},e.registerClass=function(t){return Pt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Pt);wr(Kw,hv);wr(Kw,L_);Wb(Kw,Pt);function hW(r){var e=r.name;Gm(r)||(r.name=Qfe(r)||e)}function Qfe(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),i=[];return N(t,function(n){var a=e.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function ehe(r){return r.model.getRawData().count()}function the(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),rhe}function rhe(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function pW(r,e){N(ep(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ot(ihe,e))})}function ihe(r,e){var t=ED(r);return t&&t.setOutputEnd((e||this).count()),e}function ED(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var i=t.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var jt=Kw;var AD=function(){function r(){this.group=new Ze,this.uid=ts("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){},r.prototype.updateLayout=function(e,t,i,n){},r.prototype.updateVisual=function(e,t,i,n){},r.prototype.toggleBlurSeries=function(e,t,i){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();Hm(AD);yf(AD);var Qt=AD;function Mo(){var r=vt();return function(e){var t=r(e),i=e.pipelineContext,n=!!t.large,a=!!t.progressiveRender,o=t.large=!!(i&&i.large),s=t.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var vW=vt(),nhe=Mo(),CD=function(){function r(){this.group=new Ze,this.uid=ts("viewChart"),this.renderTask=Cf({plan:ahe,reset:ohe}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,i,n){},r.prototype.highlight=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&mW(a,n,"emphasis")},r.prototype.downplay=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&mW(a,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateLayout=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.updateVisual=function(e,t,i,n){this.render(e,t,i,n)},r.prototype.eachRendered=function(e){sa(this.group,e)},r.markUpdateMethod=function(e,t){vW(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function dW(r,e,t){r&&Tf(r)&&(e==="emphasis"?Bn:kn)(r,t)}function mW(r,e,t){var i=Jo(r,e),n=e&&e.highlightKey!=null?v4(e.highlightKey):null;i!=null?N(Jt(i),function(a){dW(r.getItemGraphicEl(a),t,n)}):r.eachItemGraphicEl(function(a){dW(a,t,n)})}Hm(CD,["dispose"]);yf(CD);function ahe(r){return nhe(r.model)}function ohe(r){var e=r.model,t=r.ecModel,i=r.api,n=r.payload,a=e.pipelineContext.progressiveRender,o=r.view,s=n&&vW(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,i,n),she[l]}var she={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Yt=CD;var Jw="\0__throttleOriginMethod",gW="\0__throttleRate",yW="\0__throttleType";function k_(r,e,t){var i,n=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var p=[],d=0;d=0?f():o=setTimeout(f,-s),n=i};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(p){c=p},h}function as(r,e,t,i){var n=r[e];if(n){var a=n[Jw]||n,o=n[yW],s=n[gW];if(s!==t||o!==i){if(t==null||!i)return r[e]=a;n=r[e]=k_(a,t,i==="debounce"),n[Jw]=a,n[yW]=i,n[gW]=t}return n}}function zu(r,e){var t=r[e];t&&t[Jw]&&(t.clear&&t.clear(),r[e]=t[Jw])}var _W=vt(),xW={itemStyle:Na(BP,!0),lineStyle:Na(zP,!0)},lhe={lineStyle:"stroke",itemStyle:"fill"};function SW(r,e){var t=r.visualStyleMapper||xW[e];return t||(console.warn("Unknown style type '"+e+"'."),xW.itemStyle)}function MW(r,e){var t=r.visualDrawType||lhe[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var bW={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=SW(r,i),o=a(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=MW(r,i),u=o[l],c=He(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||He(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||He(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(p,d){var g=r.getDataParams(d),m=fe({},o);m[l]=c(g),p.setItemVisual(d,"style",m)}}}},V_=new Zt,wW={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=SW(r,i),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){V_.option=l[i];var u=n(V_),c=o.ensureUniqueItemVisual(s,"style");fe(c,u),V_.option.decal&&(o.setItemVisual(s,"decal",V_.option.decal),V_.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},TW={performRawSeries:!0,overallReset:function(r){var e=ke();r.eachSeries(function(t){var i=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+i,a=e.get(n);a||(a={},e.set(n,a)),_W(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var i=t.getRawData(),n={},a=t.getData(),o=_W(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=MW(t,s);a.each(function(u){var c=a.getRawIndex(u);n[c]=u}),i.each(function(u){var c=n[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),p=i.getName(u)||u+"",d=i.count();h[l]=t.getColorFromPalette(p,o,d)}})}})}};var Qw=Math.PI;function RD(r,e){e=e||{},Ye(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Ze,i=new Tt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(i);var n=new Lt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Tt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new __({shape:{startAngle:-Qw/2,endAngle:-Qw/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qw*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qw*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var uhe=function(){function r(e,t,i,n){this._stageTaskMap=ke(),this.ecInstance=e,this.api=t,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,a=!t&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),n=e.getData(),a=n.count(),o=i.progressiveEnabled&&t.incrementalPrepareRender&&a>=i.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,i=t._pipelineMap=ke();e.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),i=this.api;N(this._allHandlers,function(n){var a=e.get(n.uid)||e.set(n.uid,{}),o="";kr(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,t,i),n.overallReset&&this._createOverallStageTask(n,a,t,i)},this)},r.prototype.prepareView=function(e,t,i,n){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=i,o.api=n,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,i){this._performStageTasks(this._visualHandlers,e,t,i)},r.prototype._performStageTasks=function(e,t,i,n){n=n||{};var a=!1,o=this;N(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var p,d=h.agentStubMap;d.each(function(m){s(n,m)&&(m.dirty(),p=!0)}),p&&h.dirty(),o.updatePayload(h,i);var g=o.getPerformArgs(h,n.block);d.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(m,v){s(n,m)&&m.dirty();var _=o.getPerformArgs(m,n.block);_.skip=!l.performRawSeries&&t.isSeriesFiltered(m.context.model),o.updatePayload(m,i),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(i){t=i.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,i,n){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=ke(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,n).each(c);function c(f){var h=f.uid,p=s.set(h,o&&o.get(h)||Cf({plan:dhe,reset:mhe,count:ghe}));p.context={model:f,ecModel:i,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,p)}},r.prototype._createOverallStageTask=function(e,t,i,n){var a=this,o=t.overallTask=t.overallTask||Cf({reset:che});o.context={ecModel:i,api:n,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=ke(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,p="";kr(!e.createOnAllSeries,p),u?i.eachRawSeriesByType(u,d):c?c(i,n).each(d):(f=!1,N(i.getSeries(),d));function d(g){var m=g.uid,v=l.set(m,s&&s.get(m)||(h=!0,Cf({reset:fhe,onDirty:phe})));v.context={model:g,overallProgress:f},v.agent=o,v.__block=f,a._pipe(g,v)}h&&o.dirty()},r.prototype._pipe=function(e,t){var i=e.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return He(e)&&(e={overallReset:e,seriesType:yhe(e)}),e.uid=ts("stageHandler"),t&&(e.visualType=t),e},r}();function che(r){r.overallReset(r.ecModel,r.api,r.payload)}function fhe(r){return r.overallProgress&&hhe}function hhe(){this.agent.dirty(),this.getDownstream().dirty()}function phe(){this.agent&&this.agent.dirty()}function dhe(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function mhe(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Jt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?de(e,function(t,i){return EW(i)}):vhe}var vhe=EW(0);function EW(r){return function(e,t){var i=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var a=e.start;a0&&p===u.length-h.length){var d=u.slice(0,p);d!=="data"&&(t.mainType=d,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:t,dataQuery:i,otherQuery:n}},r.prototype.filter=function(e,t){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,a));function c(f,h,p,d){return f[p]==null||h[d||p]===f[p]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}();var PD=["symbol","symbolSize","symbolRotate","symbolOffset"],OW=PD.concat(["symbolKeepAspect"]),FW={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o=0&&Xp(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function X_(r,e,t){for(var i=e.type==="radial"?Phe(r,e,t):Lhe(r,e,t),n=e.colorStops,a=0;a0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:At(r)?[r]:pe(r)?r:null}function Y_(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&Dhe(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=de(t,function(a){return a/n}),i/=n)}return[t,i]}var Ihe=new Ki(!0);function n1(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function HW(r){return typeof r=="string"&&r!=="none"}function a1(r){var e=r.fill;return e!=null&&e!=="none"}function WW(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function XW(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function o1(r,e,t){var i=o_(e.image,e.__image,t);if(Wm(i)){var n=r.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*bm),a.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(a)}return n}}function Nhe(r,e,t,i){var n,a=n1(t),o=a1(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||Ihe,f=e.__dirty;if(!i){var h=t.fill,p=t.stroke,d=o&&!!h.colorStops,g=a&&!!p.colorStops,m=o&&!!h.image,v=a&&!!p.image,_=void 0,y=void 0,x=void 0,M=void 0,S=void 0;(d||g)&&(S=e.getBoundingRect()),d&&(_=f?X_(r,h,S):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(y=f?X_(r,p,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=y),m&&(x=f||!e.__canvasFillPattern?o1(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=x),v&&(M=f||!e.__canvasStrokePattern?o1(r,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),d?r.fillStyle=_:m&&(x?r.fillStyle=x:o=!1),g?r.strokeStyle=y:v&&(M?r.strokeStyle=M:a=!1)}var w=e.getGlobalScale();c.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(n=Y_(e),T=n[0],C=n[1]);var b=!0;(u||f&cf)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),b=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),b&&c.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),i||(t.strokeFirst?(a&&XW(r,t),o&&WW(r,t)):(o&&WW(r,t),a&&XW(r,t))),T&&r.setLineDash([])}function Uhe(r,e,t){var i=e.__image=o_(t.image,e.__image,e,e.onload);if(!(!i||!Wm(i))){var n=t.x||0,a=t.y||0,o=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(i,u,c,t.sWidth,t.sHeight,n,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,h=s-c;r.drawImage(i,u,c,f,h,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function Ohe(r,e,t){var i,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||ho,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,o=void 0;r.setLineDash&&t.lineDash&&(i=Y_(e),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),t.strokeFirst?(n1(t)&&r.strokeText(n,t.x,t.y),a1(t)&&r.fillText(n,t.x,t.y)):(a1(t)&&r.fillText(n,t.x,t.y),n1(t)&&r.strokeText(n,t.x,t.y)),a&&r.setLineDash([])}}var YW=["shadowBlur","shadowOffsetX","shadowOffsetY"],qW=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function QW(r,e,t,i,n){var a=!1;if(!i&&(t=t||{},e===t))return!1;if(i||e.opacity!==t.opacity){ka(r,n),a=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Pl.opacity:o}(i||e.blend!==t.blend)&&(a||(ka(r,n),a=!0),r.globalCompositeOperation=e.blend||Pl.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,i,n){if(!this[Xn]){if(this._disposed){this.id;return}var a,o,s;if(qe(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Xn]=!0,!this._model||i){var l=new F5(this._api),u=this._theme,c=this._model=new Nw;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},HD);var f={seriesTransition:s,optionChanged:!0};if(n)this[Va]={silent:a,updateParams:f},this[Xn]=!1,this.getZr().wakeUp();else{try{mv(this),Df.update.call(this,null,f)}catch(h){throw this[Va]=null,this[Xn]=!1,h}this._ssr||this._zr.flush(),this[Va]=null,this[Xn]=!1,Z_.call(this,a),j_.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ft.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var i=this._zr.painter;return i.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(Ft.svgSupported){var t=this._zr,i=t.storage.getDisplayList();return N(i,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var i=t.excludeComponents,n=this._model,a=[],o=this;N(i,function(l){n.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return N(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var i=t.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(v6[n]){var l=s,u=s,c=-s,f=-s,h=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();N(J_,function(y,x){if(y.group===n){var M=i?y.getZr().painter.getSvgDom().innerHTML:y.renderToCanvas(Qe(t)),S=y.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),f=o(S.bottom,f),h.push({dom:M,left:S.left,top:S.top})}}),l*=p,u*=p,c*=p,f*=p;var d=c-l,g=f-u,m=zn.createCanvas(),v=XL(m,{renderer:i?"svg":"canvas"});if(v.resize({width:d,height:g}),i){var _="";return N(h,function(y){var x=y.left-l,M=y.top-u;_+=''+y.dom+""}),v.painter.getSvgRoot().innerHTML=_,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}else return t.connectedBackgroundColor&&v.add(new Tt({shape:{x:0,y:0,width:d,height:g},style:{fill:t.connectedBackgroundColor}})),N(h,function(y){var x=new Ur({style:{x:y.left*p-l,y:y.top*p-u,image:y.dom}});v.add(x)}),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,i){return zD(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return zD(this,"convertFromPixel",t,i)},e.prototype.containPixel=function(t,i){if(this._disposed){this.id;return}var n=this._model,a,o=vf(n,t);return N(o,function(s,l){l.indexOf("Models")>=0&&N(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(i);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(i,u))}},this)},this),!!a},e.prototype.getVisual=function(t,i){var n=this._model,a=vf(n,t,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?H_(s,l,i):kl(s,i)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;N(npe,function(i){var n=function(a){var o=t.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&Ys(s,function(d){var g=rt(d);if(g&&g.dataIndex!=null){var m=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=m&&m.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=fe({},g.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),p=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=i,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:p},t.trigger(i,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(i,n,t)}),N(K_,function(i,n){t._messageCenter.on(n,function(a){this.trigger(n,a)},t)}),N(["selectchanged"],function(i){t._messageCenter.on(i,function(n){this.trigger(i,n)},t)}),BW(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&KL(this.getDom(),qD,"");var i=this,n=i._api,a=i._model;N(i._componentsViews,function(o){o.dispose(a,n)}),N(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete J_[i.id]},e.prototype.resize=function(t){if(!this[Xn]){if(this._disposed){this.id;return}this._zr.resize(t);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=t&&t.silent;this[Va]&&(a==null&&(a=this[Va].silent),n=!0,this[Va]=null),this[Xn]=!0;try{n&&mv(this),Df.update.call(this,{type:"resize",animation:fe({duration:0},t&&t.animation)})}catch(o){throw this[Xn]=!1,o}this[Xn]=!1,Z_.call(this,a),j_.call(this,a)}}},e.prototype.showLoading=function(t,i){if(this._disposed){this.id;return}if(qe(t)&&(i=t,t=""),t=t||"default",this.hideLoading(),!!WD[t]){var n=WD[t](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var i=fe({},t);return i.type=K_[t.type],i},e.prototype.dispatchAction=function(t,i){if(this._disposed){this.id;return}if(qe(i)||(i={silent:!!i}),!!c1[t.type]&&this._model){if(this[Xn]){this._pendingActions.push(t);return}var n=i.silent;kD.call(this,t,n);var a=i.flush;a?this._zr.flush():a!==!1&&Ft.browser.weChat&&this._throttledZrFlush(),Z_.call(this,n),j_.call(this,n)}},e.prototype.updateLabelLayout=function(){os.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var i=t.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){mv=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),FD(f,!0),FD(f,!1),h.plan()},FD=function(f,h){for(var p=f._model,d=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,v=f._zr,_=f._api,y=0;yh.get("hoverLayerThreshold")&&!Ft.node&&!Ft.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var v=f._chartsMap[m.__viewId];v.__alive&&v.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var p=f.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=p)})}function s(f,h){if(!f.preventAutoZ){var p=f.get("z")||0,d=f.get("zlevel")||0;h.eachRendered(function(g){return l(g,p,d,-1/0),!0})}}function l(f,h,p,d){var g=f.getTextContent(),m=f.getTextGuideLine(),v=f.isGroup;if(v)for(var _=f.childrenRef(),y=0;y<_.length;y++)d=Math.max(l(_[y],h,p,d),d);else f.z=h,f.zlevel=p,d=Math.max(f.z2,d);if(g&&(g.z=h,g.zlevel=p,isFinite(d)&&(g.z2=d+2)),m){var x=f.textGuideLineConfig;m.z=h,m.zlevel=p,isFinite(d)&&(m.z2=d+(x&&x.showAbove?1:-1))}return d}function u(f,h){h.eachRendered(function(p){if(!Au(p)){var d=p.getTextContent(),g=p.getTextGuideLine();p.stateTransition&&(p.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),p.hasState()?(p.prevStates=p.currentStates,p.clearStates()):p.prevStates&&(p.prevStates=null)}})}function c(f,h){var p=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),g=p.get("duration"),m=g>0?{duration:g,delay:p.get("delay"),easing:p.get("easing")}:null;h.eachRendered(function(v){if(v.states&&v.states.emphasis){if(Au(v))return;if(v instanceof ut&&g4(v),v.__dirty){var _=v.prevStates;_&&v.useStates(_)}if(d){v.stateTransition=m;var y=v.getTextContent(),x=v.getTextGuideLine();y&&(y.stateTransition=m),x&&(x.stateTransition=m)}v.__dirty&&n(v)}})}d6=function(f){return new(function(h){Z(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},p.prototype.getComponentByElement=function(d){for(;d;){var g=d.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);d=d.parent}},p.prototype.enterEmphasis=function(d,g){Bn(d,g),ss(f)},p.prototype.leaveEmphasis=function(d,g){kn(d,g),ss(f)},p.prototype.enterBlur=function(d){Qb(d),ss(f)},p.prototype.leaveBlur=function(d){d_(d),ss(f)},p.prototype.enterSelect=function(d){SP(d),ss(f)},p.prototype.leaveSelect=function(d){MP(d),ss(f)},p.prototype.getModel=function(){return f.getModel()},p.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},p.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},p}(Uw))(f)},A6=function(f){function h(p,d){for(var g=0;g=0)){g6.push(t);var a=LD.wrapStageHandler(t,n);a.__prio=e,a.__raw=t,r.push(a)}}function $D(r,e){WD[r]=e}function U6(r,e,t){var i=l6("registerMap");i&&i(r,e,t)}var O6=tW;If(XD,bW);If(h1,wW);If(h1,TW);If(XD,FW);If(h1,zW);If(x6,ND);jD(Ow);KD(qhe,fD);$D("default",RD);ua({type:wf,event:wf,update:wf},Ir);ua({type:h_,event:h_,update:h_},Ir);ua({type:Zm,event:Zm,update:Zm},Ir);ua({type:p_,event:p_,update:p_},Ir);ua({type:jm,event:jm,update:jm},Ir);L6("light",LW);L6("dark",NW);var F6=[],spe={registerPreprocessor:jD,registerProcessor:KD,registerPostInit:P6,registerPostUpdate:D6,registerUpdateLifecycle:p1,registerAction:ua,registerCoordinateSystem:I6,registerLayout:N6,registerVisual:If,registerTransform:O6,registerLoading:$D,registerMap:U6,registerImpl:s6,PRIORITY:S6,ComponentModel:Pt,ComponentView:Qt,SeriesModel:jt,ChartView:Yt,registerComponentModel:function(r){Pt.registerClass(r)},registerComponentView:function(r){Qt.registerClass(r)},registerSeriesModel:function(r){jt.registerClass(r)},registerChartView:function(r){Yt.registerClass(r)},registerSubTypeDefaulter:function(r,e){Pt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){XG(r,e)}};function It(r){if(pe(r)){N(r,function(e){It(e)});return}dt(F6,r)>=0||(F6.push(r),He(r)&&(r={install:r}),r.install(spe))}function $_(r){return r==null?0:r.length||1}function z6(r){return r}var lpe=function(){function r(e,t,i,n,a,o){this._old=e,this._new=t,this._oldKeyGetter=i||z6,this._newKeyGetter=n||z6,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,i={},n=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,i,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(c,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,i={},n={},a=[],o=[];this._initIndexMap(e,i,a,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),n[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(f>1)for(var p=0;p1)for(var s=0;s30}var Q_=qe,Nf=de,dpe=typeof Int32Array>"u"?Array:Int32Array,mpe="e\0\0",k6=-1,vpe=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],gpe=["_approximateExtent"],V6,v1,ex,tx,n2,g1,a2,ype=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i,n=!1;m1(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,i=e),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=t)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===fn;if(l&&!n.pure)for(var u=[],c=e;c0},r.prototype.ensureUniqueItemVisual=function(e,t){var i=this._itemVisuals,n=i[e];n||(n=i[e]={});var a=n[t];return a==null&&(a=this.getVisual(t),pe(a)?a=a.slice():Q_(a)&&(a=fe({},a)),n[t]=a),a},r.prototype.setItemVisual=function(e,t,i){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Q_(t)?fe(n,t):n[t]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Q_(e)?fe(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?fe(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var i=this.hostModel&&this.hostModel.seriesIndex;c_(i,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){N(this._graphicEls,function(i,n){i&&e&&e.call(t,i,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Nf(this.dimensions,this._getDimInfo,this),this.hostModel)),n2(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var i=this[e];He(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=i.apply(this,arguments);return t.apply(this,[n].concat(rb(arguments)))})},r.internalField=function(){V6=function(e){var t=e._invertedIndicesMap;N(t,function(i,n){var a=e._dimInfos[n],o=a.ordinalMeta,s=e._store;if(o){i=t[n]=new dpe(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),n[t]=l}}}(),r}(),ti=ype;function js(r,e){cv(r)||(r=fv(r)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||r.dimensionsDefine||[],n=ke(),a=[],o=xpe(r,t,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&i2(o),l=i===r.dimensionsDefine,u=l?r2(r):t2(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=ke(c),h=new SD(o),p=0;p0&&(i.name=n+(a-1)),a++,e.set(n,a)}}function xpe(r,e,t,i){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,i||0);return N(e,function(a){var o;qe(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function Spe(r,e,t){if(t||e.hasKey(r)){for(var i=0;e.hasKey(r+i);)i++;r+=i}return e.set(r,!0),r}var Mpe=function(){function r(e){this.coordSysDims=[],this.axisMap=ke(),this.categoryAxisMap=ke(),this.coordSysName=e}return r}();function G6(r){var e=r.get("coordinateSystem"),t=new Mpe(e),i=bpe[e];if(i)return i(r,t,t.axisMap,t.categoryAxisMap),t}var bpe={cartesian2d:function(r,e,t,i){var n=r.getReferringComponents("xAxis",Cr).models[0],a=r.getReferringComponents("yAxis",Cr).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",a),gv(n)&&(i.set("x",n),e.firstCategoryDimIndex=0),gv(a)&&(i.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,i){var n=r.getReferringComponents("singleAxis",Cr).models[0];e.coordSysDims=["single"],t.set("single",n),gv(n)&&(i.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,i){var n=r.getReferringComponents("polar",Cr).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),gv(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),gv(o)&&(i.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,i){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];t.set(c,u),gv(u)&&(i.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function gv(r){return r.get("type")==="category"}function H6(r,e,t){t=t||{};var i=t.byIndex,n=t.stackedCoordDimension,a,o,s;wpe(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(N(a,function(_,y){Ce(_)&&(a[y]=_={name:_}),l&&!_.isExtraCoord&&(!i&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!n||n===_.coordDim)&&(c=_))}),c&&!i&&!u&&(i=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var p=c.coordDim,d=c.type,g=0;N(a,function(_){_.coordDim===p&&g++});var m={name:f,coordDim:p,coordDimIndex:g,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},v={name:h,coordDim:h,coordDimIndex:g+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,d),v.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(m),o.appendCalculationDimension(v)):(a.push(m),a.push(v))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:h,stackResultDimension:f}}function wpe(r){return!m1(r.schema)}function wo(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function y1(r,e){return wo(r,e)?r.getCalculationInfo("stackResultDimension"):e}function Tpe(r,e){var t=r.get("coordinateSystem"),i=Uu.get(t),n;return e&&e.coordSysDims&&(n=de(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Yp(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function Epe(r,e,t){var i,n;return t&&N(r,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function Ape(r,e,t){t=t||{};var i=e.getSourceManager(),n,a=!1;r?(a=!0,n=fv(r)):(n=i.getSource(),a=n.sourceFormat===fn);var o=G6(e),s=Tpe(e,o),l=t.useEncodeDefaulter,u=He(l)?l:l?ot(Lw,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=js(n,c),h=Epe(f.dimensions,t.createInvertedIndices,o),p=a?null:i.getSharedDataStore(f),d=H6(e,{schema:f,store:p}),g=new ti(f,e);g.setCalculationInfo(d);var m=h!=null&&Cpe(n)?function(v,_,y,x){return x===h?y:this.defaultDimValueGetter(v,_,y,x)}:null;return g.hasItemOption=!1,g.initData(a?n:p,null,m),g}function Cpe(r){if(r.sourceFormat===fn){var e=Rpe(r.data||[]);return!pe(Os(e))}}function Rpe(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();yf(W6);var Ga=W6;var Lpe=0,Ppe=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Lpe}return r.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&de(i,Dpe);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,i=this._needCollect;if(!Ce(e)&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(i?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=ke(this.categories))},r}();function Dpe(r){return qe(r)&&r.value!=null?r.value:r+""}var rx=Ppe;function ix(r){return r.type==="interval"||r.type==="log"}function Y6(r,e,t,i){var n={},a=r[1]-r[0],o=n.interval=Bm(a/e,!0);t!=null&&oi&&(o=n.interval=i);var s=n.intervalPrecision=o2(o),l=n.niceTickExtent=[Ar(Math.ceil(r[0]/o)*o,s),Ar(Math.floor(r[1]/o)*o,s)];return Ipe(l,r),n}function _1(r){var e=Math.pow(10,zm(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ar(t*e)}function o2(r){return Sn(r)+2}function X6(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function Ipe(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),X6(r,0,e),X6(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Uf(r,e){return r>=e[0]&&r<=e[1]}function Of(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Ff(r,e){return r*(e[1]-e[0])+e[0]}var q6=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new rx({})),pe(n)&&(n=new rx({categories:de(n,function(a){return qe(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return e.prototype.parse=function(t){return t==null?NaN:Ce(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Uf(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Of(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Ff(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],i=this._extent,n=i[0];n<=i[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ga);Ga.registerClass(q6);var nx=q6;var qp=Ar,Z6=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Uf(t,this._extent)},e.prototype.normalize=function(t){return Of(t,this._extent)},e.prototype.scale=function(t){return Ff(t,this._extent)},e.prototype.setExtent=function(t,i){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(i)||(n[1]=parseFloat(i))},e.prototype.unionExtent=function(t){var i=this._extent;t[0]i[1]&&(i[1]=t[1]),this.setExtent(i[0],i[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=o2(t)},e.prototype.getTicks=function(t){var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]l)return[];var c=s.length?s[s.length-1].value:a[1];return n[1]>c&&(t?s.push({value:qp(c+i,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}t[i]=a}}return t}function f2(r){var e=Upe(r),t=[];return N(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var p=i.getData();s=Math.abs(o[1]-o[0])/p.count()}var d=Fe(i.get("barWidth"),s),g=Fe(i.get("barMaxWidth"),s),m=Fe(i.get("barMinWidth")||(e8(i)?.5:1),s),v=i.get("barGap"),_=i.get("barCategoryGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:m,barGap:v,barCategoryGap:_,axisKey:u2(a),stackId:l2(i)})}),J6(t)}function J6(r){var e={};N(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=i.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=i.barMaxWidth;f&&(l[u].maxWidth=f);var h=i.barMinWidth;h&&(l[u].minWidth=h);var p=i.barGap;p!=null&&(s.gap=p);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return N(e,function(i,n){t[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=bt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Fe(s,o),c=Fe(i.gap,1),f=i.remainedWidth,h=i.autoWidthCount,p=(f-u)/(h+(h-1)*c);p=Math.max(p,0),N(a,function(v){var _=v.maxWidth,y=v.minWidth;if(v.width){var x=v.width;_&&(x=Math.min(x,_)),y&&(x=Math.max(x,y)),v.width=x,f-=x+c*x,h--}else{var x=p;_&&_x&&(x=y),x!==p&&(v.width=x,f-=x+c*x,h--)}}),p=(f-u)/(h+(h-1)*c),p=Math.max(p,0);var d=0,g;N(a,function(v,_){v.width||(v.width=p),g=v,d+=v.width*(1+c)}),g&&(d-=g.width*c);var m=-d/2;N(a,function(v,_){t[n][_]=t[n][_]||{bandWidth:o,offset:m,width:v.width},m+=v.width*(1+c)})}),t}function $6(r,e,t){if(r&&e){var i=r[u2(e)];return i!=null&&t!=null?i[l2(t)]:i}}function S1(r,e){var t=c2(r,e),i=f2(t);N(t,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=l2(n),u=i[u2(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function M1(r){return{seriesType:r,plan:Mo(),reset:function(e){if(Q6(e)){var t=e.getData(),i=e.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),f=wo(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),p=Ope(n,a),d=e8(e),g=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),v=t.getLayout("size"),_=t.getLayout("offset");return{progress:function(y,x){for(var M=y.count,S=d&&ca(M*3),w=d&&l&&ca(M*3),T=d&&ca(M),C=i.master.getRect(),b=h?C.width:C.height,E,I=x.getStore(),R=0;(E=y.next())!=null;){var A=I.get(f?m:o,E),D=I.get(s,E),U=p,B=void 0;f&&(B=+A-I.get(o,E));var F=void 0,k=void 0,G=void 0,Y=void 0;if(h){var J=i.dataToPoint([A,D]);if(f){var Q=i.dataToPoint([B,D]);U=Q[0]}F=U,k=J[1]+_,G=J[0]-U,Y=v,Math.abs(G)>>1;r[n][1]n&&(this._approxInterval=n);var s=b1.length,l=Math.min(Fpe(b1,this._approxInterval,0,s),s-1);this._interval=b1[l][1],this._minLevelUnit=b1[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return At(t)?t:+Mn(t)},e.prototype.contain=function(t){return Uf(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Of(this.parse(t),this._extent)},e.prototype.scale=function(t){return Ff(t,this._extent)},e.type="time",e}(Ha),b1=[["second",Mw],["minute",bw],["hour",ov],["quarter-day",ov*6],["half-day",ov*12],["day",_o*1.2],["half-week",_o*3.5],["week",_o*7],["month",_o*31],["quarter",_o*95],["half-year",WP/2],["year",WP]];function zpe(r,e,t,i){var n=Mn(e),a=Mn(t),o=function(d){return qP(n,d,i)===qP(a,d,i)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},p=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return p()}}function Bpe(r,e){return r/=_o,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function kpe(r){var e=30*_o;return r/=e,r>6?6:r>3?3:r>2?2:1}function Vpe(r){return r/=ov,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function t8(r,e){return r/=e?bw:Mw,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function Gpe(r){return Bm(r,!0)}function Hpe(r,e,t){var i=new Date(r);switch(zp(e)){case"year":case"month":i[ZP(t)](0);case"day":i[jP(t)](1);case"hour":i[KP(t)](0);case"minute":i[JP(t)](0);case"second":i[$P(t)](0),i[QP(t)](0)}return i.getTime()}function Wpe(r,e,t,i){var n=1e4,a=YP,o=0;function s(b,E,I,R,A,D,U){for(var B=new Date(E),F=E,k=B[R]();F1&&D===0&&I.unshift({value:I[0].value-F})}}for(var D=0;D=i[0]&&_<=i[1]&&f++)}var y=(i[1]-i[0])/e;if(f>y*1.5&&h>y/1.5||(u.push(m),f>y||r===a[p]))break}c=[]}}}for(var x=Wt(de(u,function(b){return Wt(b,function(E){return E.value>=i[0]&&E.value<=i[1]&&!E.notAdd})}),function(b){return b.length>0}),M=[],S=x.length-1,p=0;p0;)a*=10;var s=[Ar(qpe(i[0]/a)*a),Ar(Ype(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){ax.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=Ks(t)/Ks(this.base),Uf(t,this._extent)},e.prototype.normalize=function(t){return t=Ks(t)/Ks(this.base),Of(t,this._extent)},e.prototype.scale=function(t){return t=Ff(t,this._extent),T1(this.base,t)},e.type="log",e}(Ga),n8=h2.prototype;n8.getMinorTicks=ax.getMinorTicks;n8.getLabel=ax.getLabel;function E1(r,e){return Xpe(r,Sn(e))}Ga.registerClass(h2);var a8=h2;var Zpe=function(){function r(e,t,i){this._prepareParams(e,t,i)}return r.prototype._prepareParams=function(e,t,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,p=this._determinedMax;return h!=null&&(s=h,u=!0),p!=null&&(l=p,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[Kpe[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var i=jpe[e];this[i]=t},r.prototype.freeze=function(){this.frozen=!0},r}();var jpe={min:"_determinedMin",max:"_determinedMax"},Kpe={min:"_dataMin",max:"_dataMax"};function C1(r,e,t){var i=r.rawExtentInfo;return i||(i=new Zpe(r,e,t),r.rawExtentInfo=i,i)}function A1(r,e){return e==null?null:sf(e)?NaN:r.parse(e)}function p2(r,e){var t=r.type,i=C1(r,e,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=e.ecModel;if(o&&t==="time"){var s=c2("bar",o),l=!1;if(N(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=f2(s),c=Jpe(n,a,e,u);n=c.min,a=c.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function Jpe(r,e,t,i){var n=t.axis.getExtent(),a=n[1]-n[0],o=$6(i,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;N(o,function(p){s=Math.min(p.offset,s)});var l=-1/0;N(o,function(p){l=Math.max(p.offset+p.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function Vl(r,e){var t=e,i=p2(r,t),n=i.extent,a=t.get("splitNumber");r instanceof a8&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function zf(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new nx({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new w1({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Ga.getClass(e)||Ha)}}function o8(r){var e=r.scale.getExtent(),t=e[0],i=e[1];return!(t>0&&i>0||t<0&&i<0)}function yv(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}}(e):Ce(e)?function(i){return function(n){var a=r.scale.getLabel(n),o=i.replace("{value}",a??"");return o}}(e):He(e)?function(i){return function(n,a){return t!=null&&(a=n.value-t),i(ox(r,n),a,n.level!=null?{level:n.level}:null)}}(e):function(i){return r.scale.getLabel(i)}}function ox(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function s8(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var i,n,a=t.getExtent();t instanceof nx?n=t.count():(i=t.getTicks(),n=i.length);var o=r.getLabelModel(),s=yv(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;cr[1]&&(r[1]=n[1])})}var Gl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}();var Qpe=1e-8;function u8(r,e){return Math.abs(r-e)n&&(i=o,n=l)}if(i)return tde(i.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var i=this._rect;if(i&&!t)return i;var n=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return N(o,function(s){s.type==="polygon"?f8(s.exterior,n,a,t):N(s.points,function(l){f8(l,n,a,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(a[0])&&isFinite(a[1])||(n[0]=n[1]=a[0]=a[1]=0),i=new lt(n[0],n[1],a[0]-n[0],a[1]-n[1]),t||(this._rect=i),i},e.prototype.contain=function(t){var i=this.getBoundingRect(),n=this.geometries;if(!i.contain(t[0],t[1]))return!1;e:for(var a=0,o=n.length;a>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=a,n=s,a=l,i.push([s/t,l/t])}return i}function y2(r,e){return r=rde(r),de(Wt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var i=t.properties,n=t.geometry,a=[];switch(n.type){case"Polygon":var o=n.coordinates;a.push(new m2(o[0],o.slice(1)));break;case"MultiPolygon":N(n.coordinates,function(l){l[0]&&a.push(new m2(l[0],l.slice(1)))});break;case"LineString":a.push(new v2([n.coordinates]));break;case"MultiLineString":a.push(new v2(n.coordinates))}var s=new D1(i[e||"name"],a,i.cp);return s.properties=i,s})}var xv={};YR(xv,{MAX_SAFE_INTEGER:()=>e_,asc:()=>Ti,getPercentWithPrecision:()=>KG,getPixelPrecision:()=>Fm,getPrecision:()=>Sn,getPrecisionSafe:()=>YL,isNumeric:()=>yp,isRadianAroundZero:()=>Su,linearMap:()=>rr,nice:()=>Bm,numericToNumber:()=>Pa,parseDate:()=>Mn,quantile:()=>km,quantity:()=>kb,quantityExponent:()=>zm,reformIntervals:()=>r_,remRadian:()=>t_,round:()=>Ar});var sx=vt();function m8(r){return r.type==="category"?ide(r):ade(r)}function v8(r,e){return r.type==="category"?nde(r,e):{ticks:de(r.scale.getTicks(),function(t){return t.value})}}function ide(r){var e=r.getLabelModel(),t=g8(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function g8(r,e){var t=y8(r,"labels"),i=R1(e),n=_8(t,i);if(n)return n;var a,o;return He(i)?a=b8(r,i):(o=i==="auto"?ode(r):i,a=M8(r,o)),x8(t,i,{labels:a,labelCategoryInterval:o})}function nde(r,e){var t=y8(r,"ticks"),i=R1(e),n=_8(t,i);if(n)return n;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),He(i))a=b8(r,i,!0);else if(i==="auto"){var s=g8(r,r.getLabelModel());o=s.labelCategoryInterval,a=de(s.labels,function(l){return l.tickValue})}else o=i,a=M8(r,o,!0);return x8(t,i,{ticks:a,tickCategoryInterval:o})}function ade(r){var e=r.scale.getTicks(),t=yv(r);return{labels:de(e,function(i,n){return{level:i.level,formattedLabel:t(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function y8(r,e){return sx(r)[e]||(sx(r)[e]=[])}function _8(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(i)),f=Math.abs(u*Math.sin(i)),h=0,p=0;l<=a[1];l+=s){var d=0,g=0,m=Ll(t({value:l}),e.font,"center","top");d=m.width*1.3,g=m.height*1.3,h=Math.max(h,d,7),p=Math.max(p,g,7)}var v=h/c,_=p/f;isNaN(v)&&(v=1/0),isNaN(_)&&(_=1/0);var y=Math.max(0,Math.floor(Math.min(v,_))),x=sx(r.model),M=r.getExtent(),S=x.lastAutoInterval,w=x.lastTickCount;return S!=null&&w!=null&&Math.abs(S-y)<=1&&Math.abs(w-o)<=1&&S>y&&x.axisExtent0===M[0]&&x.axisExtent1===M[1]?y=S:(x.lastTickCount=o,x.lastAutoInterval=y,x.axisExtent0=M[0],x.axisExtent1=M[1]),y}function sde(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function M8(r,e,t){var i=yv(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=L1(r),h=o.get("showMinLabel")||f,p=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var d=u;d<=a[1];d+=l)g(d);p&&d-l!==a[1]&&g(a[1]);function g(m){var v={value:m};s.push(t?m:{formattedLabel:i(v),rawLabel:n.getLabel(v),tickValue:m})}return s}function b8(r,e,t){var i=r.scale,n=yv(r),a=[];return N(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),a}var w8=[0,1],lde=function(){function r(e,t,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=i||[0,0]}return r.prototype.contain=function(e){var t=this._extent,i=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=i&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Fm(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var i=this._extent;i[0]=e,i[1]=t},r.prototype.dataToCoord=function(e,t){var i=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(i=i.slice(),T8(i,n.count())),rr(e,w8,i,t)},r.prototype.coordToData=function(e,t){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),T8(i,n.count()));var a=rr(e,i,w8,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),i=v8(this,t),n=i.ticks,a=de(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return ude(this,a,o,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var i=this.scale.getMinorTicks(t),n=de(i,function(a){return de(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return m8(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return S8(this)},r}();function T8(r,e){var t=r[1]-r[0],i=e,n=t/i/2;r[0]+=n,r[1]-=n}function ude(r,e,t,i){var n=e.length;if(!r.onBand||t||!n)return;var a=r.getExtent(),o,s;if(n===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;N(e,function(p){p.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(i?o.coord=a[1]:e.pop()),i&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(p,d){return p=Ar(p),d=Ar(d),f?p>d:pn&&(n+=lx);var p=Math.atan2(s,o);if(p<0&&(p+=lx),p>=i&&p<=n||p+lx>=i&&p+lx<=n)return l[0]=c,l[1]=f,u-t;var d=t*Math.cos(i)+r,g=t*Math.sin(i)+e,m=t*Math.cos(n)+r,v=t*Math.sin(n)+e,_=(d-o)*(d-o)+(g-s)*(g-s),y=(m-o)*(m-o)+(v-s)*(v-s);return _0){e=e/180*Math.PI,$s.fromArray(r[0]),qr.fromArray(r[1]),Ai.fromArray(r[2]),Nt.sub(Wl,$s,qr),Nt.sub(Hl,Ai,qr);var t=Wl.len(),i=Hl.len();if(!(t<.001||i<.001)){Wl.scale(1/t),Hl.scale(1/i);var n=Wl.dot(Hl),a=Math.cos(e);if(a1&&Nt.copy(fa,Ai),fa.toArray(r[1])}}}}function A8(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,$s.fromArray(r[0]),qr.fromArray(r[1]),Ai.fromArray(r[2]),Nt.sub(Wl,qr,$s),Nt.sub(Hl,Ai,qr);var i=Wl.len(),n=Hl.len();if(!(i<.001||n<.001)){Wl.scale(1/i),Hl.scale(1/n);var a=Wl.dot(e),o=Math.cos(t);if(a=l)Nt.copy(fa,Ai);else{fa.scaleAndAdd(Hl,s/Math.tan(Math.PI/2-c));var f=Ai.x!==qr.x?(fa.x-qr.x)/(Ai.x-qr.x):(fa.y-qr.y)/(Ai.y-qr.y);if(isNaN(f))return;f<0?Nt.copy(fa,qr):f>1&&Nt.copy(fa,Ai)}fa.toArray(r[1])}}}}function _2(r,e,t,i){var n=t==="normal",a=n?r:r.ensureState(t);a.ignore=e;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();n?r.useStyle(s):a.style=s}function mde(r,e){var t=e.smooth,i=e.points;if(i)if(r.moveTo(i[0][0],i[0][1]),t>0&&i.length>=3){var n=Xo(i[0],i[1]),a=Xo(i[1],i[2]);if(!n||!a){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var o=Math.min(n,a)*t,s=Tm([],i[1],i[0],o/n),l=Tm([],i[1],i[2],o/a),u=Tm([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&a&&S(-f/o,0,o);var m=r[0],v=r[o-1],_,y;x(),_<0&&w(-_,.8),y<0&&w(y,.8),x(),M(_,y,1),M(y,_,-1),x(),_<0&&T(-_),y<0&&T(y);function x(){_=m.rect[e]-i,y=n-v.rect[e]-v.rect[t]}function M(C,b,E){if(C<0){var I=Math.min(b,-C);if(I>0){S(I*E,0,o);var R=I+C;R<0&&w(-R*E,1)}else w(-C*E,1)}}function S(C,b,E){C!==0&&(u=!0);for(var I=b;I0)for(var R=0;R0;R--){var B=E[R-1]*U;S(-B,R,o)}}}function T(C){var b=C<0?-1:1;C=Math.abs(C);for(var E=Math.ceil(C/(o-1)),I=0;I0?S(E,0,I+1):S(-E,o-I-1,o),C-=E,C<=0)return}return u}function R8(r,e,t,i){return C8(r,"x","width",e,t,i)}function O1(r,e,t,i){return C8(r,"y","height",e,t,i)}function F1(r){var e=[];r.sort(function(g,m){return m.priority-g.priority});var t=new lt(0,0,0,0);function i(g){if(!g.ignore){var m=g.ensureState("emphasis");m.ignore==null&&(m.ignore=!1)}g.ignore=!0}for(var n=0;n=0&&i.attr(a.oldLayoutSelect),dt(h,"emphasis")>=0&&i.attr(a.oldLayoutEmphasis)),Dt(i,u,t,l)}else if(i.attr(u),!Du(i).valueAnimation){var f=ft(i.style.opacity,1);i.style.opacity=0,ar(i,{style:{opacity:f}},t,l)}if(a.oldLayout=u,i.states.select){var p=a.oldLayoutSelect={};z1(p,u,B1),z1(p,i.states.select,B1)}if(i.states.emphasis){var d=a.oldLayoutEmphasis={};z1(d,u,B1),z1(d,i.states.emphasis,B1)}gw(i,l,c,t,t)}if(n&&!n.ignore&&!n.invisible){var a=yde(n),o=a.oldLayout,g={points:n.shape.points};o?(n.attr({shape:o}),Dt(n,{shape:g},t)):(n.setShape(g),n.style.strokePercent=0,ar(n,{style:{strokePercent:1}},t)),a.oldLayout=g}},r}(),P8=_de;var b2=vt();function w2(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var n=b2(t).labelManager;n||(n=b2(t).labelManager=new P8),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var n=b2(t).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var T2=Math.sin,E2=Math.cos,D8=Math.PI,jp=Math.PI*2,xde=180/D8,Sde=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,i,n,a,o){this._add("C",e,t,i,n,a,o)},r.prototype.quadraticCurveTo=function(e,t,i,n){this._add("Q",e,t,i,n)},r.prototype.arc=function(e,t,i,n,a,o){this.ellipse(e,t,i,i,0,n,a,o)},r.prototype.ellipse=function(e,t,i,n,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Rl(f-jp)||(c?u>=jp:-u>=jp),p=u>0?u%jp:u%jp+jp,d=!1;h?d=!0:Rl(f)?d=!1:d=p>=D8==!!c;var g=e+i*E2(o),m=t+n*T2(o);this._start&&this._add("M",g,m);var v=Math.round(a*xde);if(h){var _=1/this._p,y=(c?1:-1)*(jp-_);this._add("A",i,n,v,1,+c,e+i*E2(o+y),t+n*T2(o+y)),_>.01&&this._add("A",i,n,v,0,+c,g,m)}else{var x=e+i*E2(s),M=t+n*T2(s);this._add("A",i,n,v,+d,+c,x,M)}},r.prototype.rect=function(e,t,i,n){this._add("M",e,t),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,i,n,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function Ade(r){return""}function cx(r,e){e=e||{};var t=e.newline?` +`:"";function i(n){var a=n.children,o=n.tag,s=n.attrs,l=n.text;return Ede(o,s)+(o!=="style"?yn(l):l||"")+(a?""+t+de(a,function(u){return i(u)}).join(t)+t:"")+Ade(o)}return i(r)}function O8(r,e,t){t=t||{};var i=t.newline?` +`:"",n=" {"+i,a=i+"}",o=de(bt(r),function(l){return l+n+de(bt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(i)+a}).join(i),s=de(bt(e),function(l){return"@keyframes "+l+n+de(bt(e[l]),function(u){return u+n+de(bt(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(i)+a}).join(i)+a}).join(i);return!o&&!s?"":[""].join(i)}function fx(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function P2(r,e,t,i){return Ci("svg","root",{width:r,height:e,xmlns:I8,"xmlns:xlink":R2,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+e:!1},t)}var Cde=0;function G1(){return Cde++}var F8={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Kp="transform-origin";function Rde(r,e,t){var i=fe({},r.shape);fe(i,e),r.buildPath(t,i);var n=new k1;return n.reset(Rb(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function Lde(r,e){var t=e.originX,i=e.originY;(t||i)&&(r[Kp]=t+"px "+i+"px")}var Pde={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function B8(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function Dde(r,e,t){var i=r.shape.paths,n={},a,o;if(N(i,function(l){var u=fx(t.zrId);u.animation=!0,hx(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=bt(c),p=h.length;if(p){o=h[p-1];var d=c[o];for(var g in d){var m=d[g];n[g]=n[g]||{d:""},n[g].d+=m.d||""}for(var v in f){var _=f[v].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=B8(n,t);return a.replace(o,s)}}function z8(r){return Ce(r)?F8[r]?"cubic-bezier("+F8[r]+")":Lm(r)?r:"":""}function hx(r,e,t,i){var n=r.animators,a=n.length,o=[];if(r instanceof Qm){var s=Dde(r,e,t);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var ve=B8(w,t);return ve+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var v=t.zrId+"-cls-"+G1();t.cssNodes["."+v]={animation:o.join(",")},e.class=v}}function V8(r,e,t){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};k8(i,e,t,!0)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=n.fill;if(!a){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(a=X0(l))}var u=n.lineWidth;if(u){var c=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var i={cursor:"pointer"};a&&(i.fill=a),n.stroke&&(i.stroke=n.stroke),u&&(i["stroke-width"]=u),k8(i,e,t,!0)}}function k8(r,e,t,i){var n=JSON.stringify(r),a=t.cssStyleCache[n];a||(a=t.zrId+"-cls-"+G1(),t.cssStyleCache[n]=a,t.cssNodes["."+a+(i?":hover":"")]=r),e.class=e.class?e.class+" "+a:a}var px=Math.round;function X8(r){return r&&Ce(r.src)}function Y8(r){return r&&He(r.toDataURL)}function D2(r,e,t,i){C2(function(n,a){var o=n==="fill"||n==="stroke";o&&Cb(a)?O2(e,r,n,i):o&&Y0(a)?F2(t,r,n,i):o&&a==="none"?r[n]="transparent":r[n]=a},e,t,!1),Bde(t,r,i)}function I2(r,e){var t=YG(e);t&&(t.each(function(i,n){i!=null&&(r[(L2+n).toLowerCase()]=i+"")}),e.isSilent()&&(r[L2+"silent"]="true"))}function G8(r){return Rl(r[0]-1)&&Rl(r[1])&&Rl(r[2])&&Rl(r[3]-1)}function Ide(r){return Rl(r[4])&&Rl(r[5])}function N2(r,e,t){if(e&&!(Ide(e)&&G8(e))){var i=t?10:1e4;r.transform=G8(e)?"translate("+px(e[4]*i)/i+" "+px(e[5]*i)/i+")":xG(e)}}function H8(r,e,t){for(var i=r.points,n=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";kr(h,m),kr(p,m)}else if(h==null||p==null){var v=function(b,E){if(b){var I=b.elm,R=h||E.width,A=p||E.height;b.tag==="pattern"&&(u?(A=1,R/=a.width):c&&(R=1,A/=a.height)),b.attrs.width=R,b.attrs.height=A,I&&(I.setAttribute("width",R),I.setAttribute("height",A))}},_=o_(d,null,r,function(b){l||v(S,b),v(f,b)});_&&_.width&&_.height&&(h=h||_.width,p=p||_.height)}f=Ci("image","img",{href:d,width:h,height:p}),o.width=h,o.height=p}else n.svgElement&&(f=Qe(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(f){var y,x;l?y=x=1:u?(x=1,y=o.width/a.width):c?(y=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",y!=null&&!isNaN(y)&&(o.width=y),x!=null&&!isNaN(x)&&(o.height=x);var M=Lb(n);M&&(o.patternTransform=M);var S=Ci("pattern","",o,[f]),w=cx(S),T=i.patternCache,C=T[w];C||(C=i.zrId+"-p"+i.patternIdx++,T[w]=C,o.id=C,S=i.defs[C]=Ci("pattern",C,o,[f])),e[t]=q0(C)}}function Z8(r,e,t){var i=t.clipPathCache,n=t.defs,a=i[r.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var o={id:a};i[r.id]=a,n[a]=Ci("clipPath",a,o,[q8(r,t)])}e["clip-path"]=q0(a)}function z2(r){return document.createTextNode(r)}function Bf(r,e,t){r.insertBefore(e,t)}function B2(r,e){r.removeChild(e)}function k2(r,e){r.appendChild(e)}function V2(r){return r.parentNode}function G2(r){return r.nextSibling}function H1(r,e){r.textContent=e}var j8=58,Vde=120,Gde=Ci("","");function H2(r){return r===void 0}function Xl(r){return r!==void 0}function Hde(r,e,t){for(var i={},n=e;n<=t;++n){var a=r[n].key;a!==void 0&&(i[a]=n)}return i}function dx(r,e){var t=r.key===e.key,i=r.tag===e.tag;return i&&t}function mx(r){var e,t=r.children,i=r.tag;if(Xl(i)){var n=r.elm=V1(i);if(X1(Gde,r),pe(t))for(e=0;ea?(d=t[l+1]==null?null:t[l+1].elm,K8(r,d,t,n,l)):W1(r,e,i,a))}function bv(r,e){var t=e.elm=r.elm,i=r.children,n=e.children;r!==e&&(X1(r,e),H2(e.text)?Xl(i)&&Xl(n)?i!==n&&Wde(t,i,n):Xl(n)?(Xl(r.text)&&H1(t,""),K8(t,null,n,0,n.length-1)):Xl(i)?W1(t,i,0,i.length-1):Xl(r.text)&&H1(t,""):r.text!==e.text&&(Xl(i)&&W1(t,i,0,i.length-1),H1(t,e.text)))}function W2(r,e){if(dx(r,e))bv(r,e);else{var t=r.elm,i=V2(t);mx(e),i!==null&&(Bf(i,e.elm,G2(t)),W1(i,[r],0,0))}return e}var Xde=0,Yde=function(){function r(e,t,i){if(this.type="svg",this.refreshHover=J8("refreshHover"),this.configLayer=J8("configLayer"),this.storage=t,this._opts=i=fe({},i),this.root=e,this._id="zr"+Xde++,this._oldVNode=P2(i.width,i.height),e&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=V1("svg");X1(null,this._oldVNode),n.appendChild(a),e.appendChild(n)}this.resize(i.width,i.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",W2(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return U2(e,fx(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),i=this._width,n=this._height,a=fx(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis;var o=[],s=this._bgVNode=qde(i,n,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=Ci("g","main",{},[]);this._paintList(t,a,l?l.children:o),l&&o.push(l);var u=de(bt(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(Ci("defs","defs",{},u)),e.animation){var c=O8(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=Ci("style","stl",{},[],c);o.push(f)}}return P2(i,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},cx(this.renderToVNode({animation:ft(e.cssAnimation,!0),emphasis:ft(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ft(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,i){for(var n=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var m=d-1;m>g;m--)o--,s=a[o-1];for(var v=g+1;v=s)}}for(var f=this.__startIndex;f15)break}}A.prevElClipPaths&&v.restore()};if(_)if(_.length===0)T=m.__endIndex;else for(var b=p.dpr,E=0;E<_.length;++E){var I=_[E];v.save(),v.beginPath(),v.rect(I.x*b,I.y*b,I.width*b,I.height*b),v.clip(),C(I),v.restore()}else v.save(),C(),v.restore();m.__drawIndex=T,m.__drawIndex0&&e>n[0]){for(l=0;le);l++);s=i[n[l]]}if(n.splice(l+1,0,e),i[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var i=this._zlevelList,n=0;n0?q1:0),this._needsManuallyCompositing),c.__builtin__||$h("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),n.__dirty&zi&&!n.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var i=this._layerConfig;i[e]?_t(i[e],t,!0):i[e]=t;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(jt),rX=Qde;function Qs(r,e){var t=r.mapDimensionsAll("defaultedLabel"),i=t.length;if(i===1){var n=Fu(r,e,t[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o=0&&i.push(e[a])}return i.join(" ")}var eme=function(r){Z(e,r);function e(t,i,n,a){var o=r.call(this)||this;return o.updateData(t,i,n,a),o}return e.prototype._createSymbol=function(t,i,n,a,o){this.removeAll();var s=Sr(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=tme,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Bn(this.childAt(0))},e.prototype.downplay=function(){kn(this.childAt(0))},e.prototype.setZ=function(t,i){var n=this.childAt(0);n.zlevel=t,n.z=i},e.prototype.setDraggable=function(t,i){var n=this.childAt(0);n.draggable=t,n.cursor=!i&&t?"move":n.cursor},e.prototype.updateData=function(t,i,n,a){this.silent=!1;var o=t.getItemVisual(i,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,i),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var f=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,t,i,l,f)}else{var h=this.childAt(0);h.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(p):Dt(h,p,s,i),Ii(h)}if(this._updateCommon(t,i,l,n,a),u){var h=this.childAt(0);if(!c){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,ar(h,p,s,i)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,i,n,a,o){var s=this.childAt(0),l=t.hostModel,u,c,f,h,p,d,g,m,v;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,p=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,v=a.cursorStyle,d=a.emphasisDisabled),!a||t.hasItemOption){var _=a&&a.itemModel?a.itemModel:t.getItemModel(i),y=_.getModel("emphasis");u=y.getModel("itemStyle").getItemStyle(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=y.get("focus"),p=y.get("blurScope"),d=y.get("disabled"),g=Tr(_),m=y.getShallow("scale"),v=_.getShallow("cursor")}var x=t.getItemVisual(i,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var M=bo(t.getItemVisual(i,"symbolOffset"),n);M&&(s.x=M[0],s.y=M[1]),v&&s.attr("cursor",v);var S=t.getItemVisual(i,"style"),w=S.fill;if(s instanceof Ur){var T=s.style;s.useStyle(fe({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(fe({},S)):s.useStyle(S),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(i,"liftZ"),b=this._z2;C!=null?b==null&&(this._z2=s.z2,s.z2+=C):b!=null&&(s.z2=b,this._z2=null);var E=o&&o.useNameLabel;Nr(s,g,{labelFetcher:l,labelDataIndex:i,defaultText:I,inheritColor:w,defaultOpacity:S.opacity});function I(D){return E?t.getName(D):Qs(t,D)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var R=s.ensureState("emphasis");R.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var A=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;R.scaleX=this._sizeX*A,R.scaleY=this._sizeY*A,this.setSymbolScale(1),nr(this,h,p,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,i,n){var a=this.childAt(0),o=rt(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&es(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();es(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,i){return qs(t.getItemVisual(i,"symbolSize"))},e}(Ze);function tme(r,e){this.parent.drift(r,e)}var ku=eme;function q2(r,e,t,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(t))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function iX(r){return r!=null&&!qe(r)&&(r={isIgnore:r}),r||{}}function nX(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Tr(e),cursorStyle:e.get("cursor")}}var rme=function(){function r(e){this.group=new Ze,this._SymbolCtor=e||ku}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=iX(t);var i=this.group,n=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=nX(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};a||i.removeAll(),e.diff(a).add(function(f){var h=c(f);if(q2(e,h,f,t)){var p=new o(e,f,l,u);p.setPosition(h),e.setItemGraphicEl(f,p),i.add(p)}}).update(function(f,h){var p=a.getItemGraphicEl(h),d=c(f);if(!q2(e,d,f,t)){i.remove(p);return}var g=e.getItemVisual(f,"symbol")||"circle",m=p&&p.getSymbolType&&p.getSymbolType();if(!p||m&&m!==g)i.remove(p),p=new o(e,f,l,u),p.setPosition(d);else{p.updateData(e,f,l,u);var v={x:d[0],y:d[1]};s?p.attr(v):Dt(p,v,n)}i.add(p),e.setItemGraphicEl(f,p)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){i.remove(h)},n)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(i,n){var a=e._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=nX(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=iX(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?t=i[0]:i[1]<0&&(t=i[1]),t}function K1(r,e,t,i){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=t.get(r.baseDim,i),o[1-a]=n,e.dataToPoint(o)}function nme(r,e){var t=[];return e.diff(r).add(function(i){t.push({cmd:"+",idx:i})}).update(function(i,n){t.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){t.push({cmd:"-",idx:i})}).execute(),t}function Z2(r,e,t,i,n,a,o,s){for(var l=nme(r,e),u=[],c=[],f=[],h=[],p=[],d=[],g=[],m=j1(n,e,o),v=r.getLayout("points")||[],_=e.getLayout("points")||[],y=0;y=n||g<0)break;if($p(v,_)){if(l){g+=a;continue}break}if(g===t)r[a>0?"moveTo":"lineTo"](v,_),f=v,h=_;else{var y=v-u,x=_-c;if(y*y+x*x<.5){g+=a;continue}if(o>0){for(var M=g+a,S=e[M*2],w=e[M*2+1];S===v&&w===_&&m=i||$p(S,w))p=v,d=_;else{b=S-u,E=w-c;var A=v-u,D=S-v,U=_-c,B=w-_,F=void 0,k=void 0;if(s==="x"){F=Math.abs(A),k=Math.abs(D);var G=b>0?1:-1;p=v-G*F*o,d=_,I=v+G*k*o,R=_}else if(s==="y"){F=Math.abs(U),k=Math.abs(B);var Y=E>0?1:-1;p=v,d=_-Y*F*o,I=v,R=_+Y*k*o}else F=Math.sqrt(A*A+U*U),k=Math.sqrt(D*D+B*B),C=k/(k+F),p=v-b*o*(1-C),d=_-E*o*(1-C),I=v+b*o*C,R=_+E*o*C,I=kf(I,Vf(S,v)),R=kf(R,Vf(w,_)),I=Vf(I,kf(S,v)),R=Vf(R,kf(w,_)),b=I-v,E=R-_,p=v-b*F/k,d=_-E*F/k,p=kf(p,Vf(u,v)),d=kf(d,Vf(c,_)),p=Vf(p,kf(u,v)),d=Vf(d,kf(c,_)),b=v-p,E=_-d,I=v+b*k/F,R=_+E*k/F}r.bezierCurveTo(f,h,p,d,v,_),f=I,h=R}else r.lineTo(v,_)}u=v,c=_,g+=a}return m}var aX=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),oX=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new aX},e.prototype.buildPath=function(t,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&$p(n[o*2-2],n[o*2-1]);o--);for(;a=0){var x=u?(d-l)*y+l:(p-s)*y+s;return u?[t,x]:[x,t]}s=p,l=d;break;case o.C:p=a[f++],d=a[f++],g=a[f++],m=a[f++],v=a[f++],_=a[f++];var M=u?sp(s,p,g,v,t,c):sp(l,d,m,_,t,c);if(M>0)for(var S=0;S=0){var x=u?hi(l,d,m,_,w):hi(s,p,g,v,w);return u?[t,x]:[x,t]}}s=v,l=_;break}}},e}(ut);var ame=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(aX),J1=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new ame},e.prototype.buildPath=function(t,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&$p(n[s*2-2],n[s*2-1]);s--);for(;oe){a?t.push(o(a,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),a=l}return t}function lme(r,e,t){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&e.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=e.getAxis(n),u=de(a.stops,function(y){return{coord:l.toGlobalCoord(l.dataToCoord(y.value)),color:y.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=sme(u,n==="x"?t.getWidth():t.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,g=h[0].coord-d,m=h[p-1].coord+d,v=m-g;if(v<.001)return"transparent";N(h,function(y){y.offset=(y.coord-g)/v}),h.push({offset:p?h[p-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:f[0]||"transparent"});var _=new zl(0,0,0,0,h,!0);return _[n]=g,_[n+"2"]=m,_}}}function ume(r,e,t){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(n&&cme(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function cme(r,e){var t=r.getExtent(),i=Math.abs(t[1]-t[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=e.count(),a=Math.max(1,Math.round(n/5)),o=0;oi)return!1;return!0}function fme(r,e){return isNaN(r)||isNaN(e)}function hme(r){for(var e=r.length/2;e>0&&fme(r[e*2-2],r[e*2-1]);e--);return e-1}function fX(r,e){return[r[e*2],r[e*2+1]]}function pme(r,e,t){for(var i=r.length/2,n=t==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function hX(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var G=g.getState("emphasis").style;G.lineWidth=+g.style.lineWidth+1}rt(g).seriesIndex=t.seriesIndex,nr(g,B,F,k);var Y=cX(t.get("smooth")),J=t.get("smoothMonotone");if(g.setShape({smooth:Y,smoothMonotone:J,connectNulls:T}),m){var Q=l.getCalculationInfo("stackedOnSeries"),V=0;m.useStyle(Ye(c.getAreaStyle(),{fill:R,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),Q&&(V=cX(Q.get("smooth"))),m.setShape({smooth:Y,stackedOnSmooth:V,smoothMonotone:J,connectNulls:T}),Gr(m,t,"areaStyle"),rt(m).seriesIndex=t.seriesIndex,nr(m,B,F,k)}var K=function(ae){a._changePolyState(ae)};l.eachItemGraphicEl(function(ae){ae&&(ae.onHoverStateChange=K)}),this._polyline.onHoverStateChange=K,this._data=l,this._coordSys=o,this._stackedOnPoints=S,this._points=f,this._step=E,this._valueOrigin=x,t.get("triggerLineEvent")&&(this.packEventData(t,g),m&&this.packEventData(t,m))},e.prototype.packEventData=function(t,i){rt(i).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,i,n,a){var o=t.getData(),s=Jo(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=t.get("zlevel")||0,p=t.get("z")||0;u=new ku(o,s),u.x=c,u.y=f,u.setZ(h,p);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=p,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Yt.prototype.highlight.call(this,t,i,n,a)},e.prototype.downplay=function(t,i,n,a){var o=t.getData(),s=Jo(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Yt.prototype.downplay.call(this,t,i,n,a)},e.prototype._changePolyState=function(t){var i=this._polygon;Rp(this._polyline,t),i&&Rp(i,t)},e.prototype._newPolyline=function(t){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new oX({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(t,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new J1({shape:{points:t,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");He(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=He(f)?f(null):f;t.eachItemGraphicEl(function(p,d){var g=p;if(g){var m=[p.x,p.y],v=void 0,_=void 0,y=void 0;if(n)if(o){var x=n,M=i.pointToCoord(m);a?(v=x.startAngle,_=x.endAngle,y=-M[1]/180*Math.PI):(v=x.r0,_=x.r,y=M[0])}else{var S=n;a?(v=S.x,_=S.x+S.width,y=p.x):(v=S.y+S.height,_=S.y,y=p.y)}var w=_===v?0:(y-v)/(_-v);l&&(w=1-w);var T=He(f)?f(d):c*w+h,C=g.getSymbolPath(),b=C.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,i,n){var a=t.getModel("endLabel");if(hX(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Lt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=hme(l);c>=0&&(Nr(s,Tr(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,p){return p!=null?Z1(o,p):Qs(o,f)},enableTextSetter:!0},dme(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,i,n,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=n.getLayout("points"),h=n.hostModel,p=h.get("connectNulls"),d=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),v=m.isHorizontal(),_=m.inverse,y=i.shape,x=_?v?y.x:y.y+y.height:v?y.x+y.width:y.y,M=(v?g:0)*(_?-1:1),S=(v?0:-g)*(_?-1:1),w=v?"x":"y",T=pme(f,x,w),C=T.range,b=C[1]-C[0],E=void 0;if(b>=1){if(b>1&&!p){var I=fX(f,C[0]);u.attr({x:I[0]+M,y:I[1]+S}),o&&(E=h.getRawValue(C[0]))}else{var I=c.getPointOn(x,w);I&&u.attr({x:I[0]+M,y:I[1]+S});var R=h.getRawValue(C[0]),A=h.getRawValue(C[1]);o&&(E=Hb(n,d,R,A,T.t))}a.lastFrameIndex=C[0]}else{var D=t===1||a.lastFrameIndex>0?C[0]:0,I=fX(f,D);o&&(E=h.getRawValue(D)),u.attr({x:I[0]+M,y:I[1]+S})}if(o){var U=Du(u);typeof U.setLabelText=="function"&&U.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(t,i,n,a,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,h=Z2(this._data,t,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin,s),p=h.current,d=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(p=Gf(h.current,n,o,l),d=Gf(h.stackedOnCurrent,n,o,l),g=Gf(h.next,n,o,l),m=Gf(h.stackedOnNext,n,o,l)),uX(p,g)>3e3||c&&uX(d,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=p;var v={shape:{points:g}};h.current!==p&&(v.shape.__points=h.next),u.stopAnimation(),Dt(u,v,f),c&&(c.setShape({points:p,stackedOnPoints:d}),c.stopAnimation(),Dt(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],y=h.status,x=0;xe&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;te&&(e=a,t=n)}return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},gme=function(r){return Math.round(r.length/2)};function vx(r){return{seriesType:r,reset:function(e,t,i){var n=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=i.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),p=Math.round(s/h);if(isFinite(p)&&p>1){a==="lttb"&&e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/p));var d=void 0;Ce(a)?d=vme[a]:He(a)&&(d=a),d&&e.setData(n.downSample(n.mapDimension(u.dim),1/p,d,gme))}}}}}function Q2(r){r.registerChartView(pX),r.registerSeriesModel(rX),r.registerLayout(el("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,vx("line"))}var dX=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return hn(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(n)N(a.getAxes(),function(h,p){if(h.type==="category"&&i!=null){var d=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),m=o[p],v=i[p]==="x1"||i[p]==="y1";if(v&&!g&&(m+=1),d.length<2)return;if(d.length===2){s[p]=h.toGlobalCoord(h.getExtent()[v?1:0]);return}for(var _=void 0,y=void 0,x=1,M=0;Mm){y=(S+_)/2;break}M===1&&(x=w-d[0].tickValue)}y==null&&(_?_&&(y=d[d.length-1].coord):y=d[0].coord),s[p]=h.toGlobalCoord(y)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(jt);jt.registerClass(dX);var wv=dX;var yme=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return hn(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>t&&(t=i),t},e.prototype.brushSelector=function(t,i,n){return n.rect(i.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Hn(wv.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(wv),mX=yme;var _me=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),xme=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i.type="sausage",i}return e.prototype.getDefaultShape=function(){return new _me},e.prototype.buildPath=function(t,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,c=i.startAngle,f=i.endAngle,h=i.clockwise,p=Math.PI*2,d=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,i,n,a){if(this._isOrderChangedWithinSameData(t,i,n)){var o=this._dataSort(t,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,i,n){var a=i.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,i){this._clear(this._model),this._removeOnRenderedListener(i)},e.prototype.dispose=function(t,i){this._removeOnRenderedListener(i)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var i=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){Cu(a,t,rt(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Yt),yX={cartesian2d:function(r,e){var t=e.width<0?-1:1,i=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,a=r.y+r.height,o=eI(e.x,r.x),s=tI(e.x+e.width,n),l=eI(e.y,r.y),u=tI(e.y+e.height,a),c=sn?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}var n=tI(e.r,r.r),a=eI(e.r0,r.r0);e.r=n,e.r0=a;var o=n-a<0;if(t<0){var i=e.r;e.r=e.r0,e.r0=i}return o}},_X={cartesian2d:function(r,e,t,i,n,a,o,s,l){var u=new Tt({shape:fe({},i),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,f=n?"height":"width";c[f]=0}return u},polar:function(r,e,t,i,n,a,o,s,l){var u=!n&&l?Tv:yi,c=new u({shape:i,z2:1});c.name="item";var f=AX(n);if(c.calculateTextPosition=vX(f,{isRoundCap:u===Tv}),a){var h=c.shape,p=n?"r":"endAngle",d={};h[p]=n?i.r0:i.startAngle,d[p]=i[p],(s?Dt:ar)(c,{shape:d},a)}return c}};function bme(r,e){var t=r.get("realtimeSort",!0),i=e.getBaseAxis();if(t&&i.type==="category"&&e.type==="cartesian2d")return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}function xX(r,e,t,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Dt:ar)(t,{shape:l},e,n,null);var c=e?r.baseAxis.model:null;(o?Dt:ar)(t,{shape:u},c,n)}function SX(r,e){for(var t=0;t0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,e,t){var i=r.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function Eme(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function AX(r){return function(e){var t=e?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+t;default:return i}}}(r)}function bX(r,e,t,i,n,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=r.shape,f=Zl(i.getModel("itemStyle"),c,!0);fe(c,f),r.setShape(c)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=i.getShallow("cursor");h&&r.attr("cursor",h);var p=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=Tr(i);Nr(r,d,{labelFetcher:a,labelDataIndex:t,defaultText:Qs(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var g=r.getTextContent();if(s&&g){var m=i.get(["label","position"]);r.textConfig.inside=m==="middle"?!0:null,gX(r,m==="outside"?p:m,AX(o),i.get(["label","rotate"]))}vw(g,d,a.getRawValue(t),function(_){return Z1(e,_)});var v=i.getModel(["emphasis"]);nr(r,v.get("focus"),v.get("blurScope"),v.get("disabled")),Gr(r,i),Eme(n)&&(r.style.fill="none",r.style.stroke="none",N(r.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function Ame(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,a)}var Cme=function(){function r(){}return r}(),wX=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i.type="largeBar",i}return e.prototype.getDefaultShape=function(){return new Cme},e.prototype.buildPath=function(t,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function Rme(r,e,t){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=a.length/3;c=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function CX(r,e,t){if(ls(t,"cartesian2d")){var i=e,n=t.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=t.getArea(),a=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function Lme(r,e,t){var i=r.type==="polar"?yi:Tt;return new i({shape:CX(e,t,r),silent:!0,z2:0})}var RX=Mme;function rI(r){r.registerChartView(RX),r.registerSeriesModel(mX),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ot(S1,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,M1("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,vx("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var LX=Math.PI*2,tT=Math.PI/180;function PX(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function iI(r,e){var t=PX(r,e),i=r.get("center"),n=r.get("radius");pe(n)||(n=[0,n]);var a=Fe(t.width,e.getWidth()),o=Fe(t.height,e.getHeight()),s=Math.min(a,o),l=Fe(n[0],s/2),u=Fe(n[1],s/2),c,f,h=r.coordinateSystem;if(h){var p=h.dataToPoint(i);c=p[0]||0,f=p[1]||0}else pe(i)||(i=[i,i]),c=Fe(i[0],a)+t.x,f=Fe(i[1],o)+t.y;return{cx:c,cy:f,r0:l,r:u}}function nI(r,e,t){e.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),o=PX(i,t),s=iI(i,t),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-i.get("startAngle")*tT,p=i.get("endAngle"),d=i.get("padAngle")*tT;p=p==="auto"?h-LX:-p*tT;var g=i.get("minAngle")*tT,m=g+d,v=0;n.each(a,function(U){!isNaN(U)&&v++});var _=n.getSum(a),y=Math.PI/(_||v)*2,x=i.get("clockwise"),M=i.get("roseType"),S=i.get("stillShowZeroSum"),w=n.getDataExtent(a);w[0]=0;var T=x?1:-1,C=[h,p],b=T*d/2;l_(C,!x),h=C[0],p=C[1];var E=Math.abs(p-h),I=E,R=0,A=h;if(n.setLayout({viewRect:o,r:c}),n.each(a,function(U,B){var F;if(isNaN(U)){n.setItemLayout(B,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:f,r:M?NaN:c});return}M!=="area"?F=_===0&&S?y:U*y:F=E/v,FF?(G=A+T*F/2,Y=G):(G=A+b,Y=k-b),n.setItemLayout(B,{angle:F,startAngle:G,endAngle:Y,clockwise:x,cx:l,cy:u,r0:f,r:M?rr(U,w,[f,c]):c}),A=k}),It?v:m,M=Math.abs(y.label.y-t);if(M>=x.maxY){var S=y.label.x-e-y.len2*n,w=i+y.len,T=Math.abs(S)r.unconstrainedWidth?null:p:null;i.setStyle("width",d)}var g=i.getBoundingRect();a.width=g.width;var m=(i.style.margin||0)+2.1;a.height=g.height+m,a.y-=(a.height-f)/2}}}function aI(r){return r.position==="center"}function oI(r){var e=r.getData(),t=[],i,n,a=!1,o=(r.get("minShowLabelAngle")||0)*Pme,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function p(S){S.ignore=!0}function d(S){if(!S.ignore)return!0;for(var w in S.states)if(S.states[w].ignore===!1)return!0;return!1}e.each(function(S){var w=e.getItemGraphicEl(S),T=w.shape,C=w.getTextContent(),b=w.getTextGuideLine(),E=e.getItemModel(S),I=E.getModel("label"),R=I.get("position")||E.get(["emphasis","label","position"]),A=I.get("distanceToLabelLine"),D=I.get("alignTo"),U=Fe(I.get("edgeDistance"),u),B=I.get("bleedMargin"),F=E.getModel("labelLine"),k=F.get("length");k=Fe(k,u);var G=F.get("length2");if(G=Fe(G,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":J>0?"left":"right"}var xe=Math.PI,Le=0,Ue=I.get("rotate");if(At(Ue))Le=Ue*(xe/180);else if(R==="center")Le=0;else if(Ue==="radial"||Ue===!0){var Ne=J<0?-Y+xe:-Y;Le=Ne}else if(Ue==="tangential"&&R!=="outside"&&R!=="outer"){var Ve=Math.atan2(J,Q);Ve<0&&(Ve=xe*2+Ve);var ct=Q>0;ct&&(Ve=xe+Ve),Le=Ve-xe}if(a=!!Le,C.x=V,C.y=K,C.rotation=Le,C.setStyle({verticalAlign:"middle"}),ue){C.setStyle({align:ve});var ne=C.states.select;ne&&(ne.x+=C.x,ne.y+=C.y)}else{var z=C.getBoundingRect().clone();z.applyTransform(C.getComputedTransform());var L=(C.style.margin||0)+2.1;z.y-=L/2,z.height+=L,t.push({label:C,labelLine:b,position:R,len:k,len2:G,minTurnAngle:F.get("minTurnAngle"),maxSurfaceAngle:F.get("maxSurfaceAngle"),surfaceNormal:new Nt(J,Q),linePoints:ae,textAlign:ve,labelDistance:A,labelAlignTo:D,edgeDistance:U,bleedMargin:B,rect:z,unconstrainedWidth:z.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:ue})}}),!a&&r.get("avoidLabelOverlap")&&Dme(t,i,n,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(Yt),NX=Nme;function To(r,e,t){e=pe(e)&&{coordDimensions:e}||fe({encodeDefine:r.getEncode()},e);var i=r.getSource(),n=js(i,e).dimensions,a=new ti(n,r);return a.initData(i,t),a}var Ume=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var i=this._getDataWithEncodedVisual();return i.getItemVisual(e,t)},r}(),jl=Ume;var Ome=vt(),Fme=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new jl(Be(this.getData,this),Be(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return To(this,{coordDimensions:["value"],encodeDefaulter:ot(uv,this)})},e.prototype.getDataParams=function(t){var i=this.getData(),n=Ome(i),a=n.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=n.seats=qL(o,i.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){yo(t,"labelLine",["show"]);var i=t.labelLine,n=t.emphasis.labelLine;i.show=i.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(jt),UX=Fme;function sI(r){return{seriesType:r,reset:function(e,t){var i=e.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),o=i.get(a,n);return!(At(o)&&!isNaN(o)&&o<0)})}}}function lI(r){r.registerChartView(NX),r.registerSeriesModel(UX),r1("pie",r.registerAction),r.registerLayout(ot(nI,"pie")),r.registerProcessor(tl("pie")),r.registerProcessor(sI("pie"))}var zme=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,i){return hn(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,i,n){return n.point(i.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(jt),OX=zme;var FX=4,Bme=function(){function r(){}return r}(),kme=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.getDefaultShape=function(){return new Bme},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,i){var n=i.points,a=i.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(t>=f&&i>=h&&t<=f+s&&i<=h+l)return u}return-1},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=n[0],i=n[1],a.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,n=i.points,a=i.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),zX=Vme;var Gme=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,n){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,i,n){this._symbolDraw.incrementalUpdate(t,i.getData(),{clipShape:this._getClipShape(i)}),this._finished=t.end===i.getData().count()},e.prototype.updateTransform=function(t,i,n){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=el("").reset(t,i,n);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var i=t.coordinateSystem;return i&&i.getArea&&i.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,i){var n=this._symbolDraw,a=i.pipelineContext,o=a.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new zX:new Yl,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,i){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Yt),BX=Gme;var Hme=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Pt),kX=Hme;var rT=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Cr).models[0]},e.type="cartesian2dAxis",e}(Pt);wr(rT,Gl);var VX={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Wme=_t({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},VX),uI=_t({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},VX),Xme=_t({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},uI),Yme=Ye({logBase:10},uI),iT={category:Wme,value:uI,time:Xme,log:Yme};var GX={value:1,category:1,time:1,log:1};function rl(r,e,t,i){N(GX,function(n,a){var o=_t(_t({},iT[a],!0),i,!0),s=function(l){Z(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Af(this),p=h?rs(c):{},d=f.getTheme();_t(c,d.get(a+"Axis")),_t(c,this.getDefaultOption()),c.type=HX(c),h&&za(c,p,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=rx.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",HX)}function HX(r){return r.type||(r.data?"category":"value")}var qme=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return de(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Wt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),WX=qme;var nT=["x","y"];function XX(r){return r.type==="interval"||r.type==="time"}var Zme=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=nT,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!XX(t)||!XX(i))){var n=t.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-n[0]*c,p=o[1]-a[0]*f,d=this._transform=[c,0,0,f,h,p];this._invTransform=Yo([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,i){var n=this.dataToPoint(t),a=this.dataToPoint(i),o=this.getArea(),s=new lt(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,i,n){n=n||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return fi(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},e.prototype.clampData=function(t,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(t[0]),u=a.parse(t[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},e.prototype.pointToData=function(t,i){var n=[];if(this._invTransform)return fi(n,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(t[0]),i),n[1]=o.coordToData(o.toLocalCoord(t[1]),i),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(i[0],i[1])-a+t,l=Math.max(n[0],n[1])-o+t;return new lt(a,o,s,l)},e}(WX),YX=Zme;var jme=function(r){Z(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),t&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(t,i){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(pn),qX=jme;function gx(r,e,t){t=t||{};var i=r.coordinateSystem,n=e.axis,a={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,c=i.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,d=u==="x"?[f[2]-p,f[3]+p]:[f[0]-p,f[1]+p];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));d[h.onZero]=Math.max(Math.min(g,d[1]),d[0])}a.position=[u==="y"?d[h[l]]:f[0],u==="x"?d[h[l]]:f[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[s],a.labelOffset=o?d[h[s]]-d[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Br(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-v:v,a.z2=1,a}function cI(r){return r.get("coordinateSystem")==="cartesian2d"}function fI(r){var e={xAxisModel:null,yAxisModel:null};return N(e,function(t,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,Cr).models[0];e[i]=a}),e}var hI=Math.log;function aT(r,e,t){var i=Ha.prototype,n=i.getTicks.call(t),a=i.getTicks.call(t,!0),o=n.length-1,s=i.getInterval.call(t),l=p2(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=hI(r.base);u=[hI(u[0])/h,hI(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var p=i.getExtent.call(r);c&&(u[0]=p[0]),f&&(u[1]=p[1]);var d=i.getInterval.call(r),g=u[0],m=u[1];if(c&&f)d=(m-g)/o;else if(c)for(m=u[0]+d*o;mu[0]&&isFinite(g)&&isFinite(u[0]);)d=_1(d),g=u[1]-d*o;else{var v=r.getTicks().length-1;v>o&&(d=_1(d));var _=d*o;m=Math.ceil(u[1]/d)*d,g=Ar(m-_),g<0&&u[0]>=0?(g=0,m=Ar(_)):m>0&&u[1]<=0&&(m=0,g=-Ar(_))}var y=(n[0].value-a[0].value)/s,x=(n[o].value-a[o].value)/s;if(i.setExtent.call(r,g+d*y,m+d*x),i.setInterval.call(r,d),(y||x)&&i.setNiceExtent.call(r,g+d,m-d),0)var M}var Kme=function(){function r(e,t,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=nT,this._initCartesian(e,t,i),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=bt(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],p=o[h],d=p.model,g=p.scale;ix(g)&&d.get("alignTicks")&&d.get("interval")==null?c.push(p):(Vl(g,d),ix(g)&&(s=p))}c.length&&(s||(s=c.pop(),Vl(s.scale,s.model)),N(c,function(m){aT(m.scale,m.model,s.scale)}))}}n(i.x),n(i.y);var a={};N(i.x,function(o){jX(i,"y",o,a)}),N(i.y,function(o){jX(i,"x",o,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,i){var n=e.getBoxLayoutParams(),a=!i&&e.get("containLabel"),o=xr(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(N(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=s8(u);if(c){var f=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),N(this._coordsList,function(u){u.calcAffineTransform()});function l(){N(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(f[h],f[1-h]),Jme(u,c?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var i=this._axesMap[e];if(i!=null)return i[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var i="x"+e+"y"+t;return this._coordsMap[i]}qe(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,a=this._coordsList;n0?"top":"bottom",a="center"):Su(n-Hf)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),$X={axisLine:function(r,e,t,i){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=e.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(fi(s,s,o),fi(l,l,o));var c=fe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new Kr({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Ru(f.shape,f.style.lineWidth),f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var p=e.get(["axisLine","symbolSize"]);Ce(h)&&(h=[h,h]),(Ce(p)||At(p))&&(p=[p,p]);var d=bo(e.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];N([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(v,_){if(h[_]!=="none"&&h[_]!=null){var y=Sr(h[_],-g/2,-m/2,g,m,c.stroke,!0),x=v.r+v.offset,M=u?l:s;y.attr({rotation:v.rotate,x:M[0]+x*Math.cos(r.rotation),y:M[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),t.add(y)}})}}},axisTickLabel:function(r,e,t,i){var n=eve(t,i,e,r),a=rve(t,i,e,r);if(Qme(e,a,n),tve(t,i,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=U1(de(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));F1(o)}},axisName:function(r,e,t,i){var n=Br(r.axisName,e.get("name"));if(n){var a=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,e9(a)?r.labelOffset+o*l:0],h,p=e.get("nameRotate");p!=null&&(p=p*Hf/180);var d;e9(a)?h=Qp.innerTextLayout(r.rotation,p??r.rotation,o):(h=$me(r.rotation,a,p||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var g=s.getFont(),m=e.get("nameTruncate",!0)||{},v=m.ellipsis,_=Br(r.nameTruncateMaxWidth,m.maxWidth,d),y=new Lt({x:f[0],y:f[1],rotation:h.rotation,silent:Qp.isLabelSilent(e),style:fr(s,{text:n,font:g,overflow:"truncate",width:_,ellipsis:v,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Vs({el:y,componentModel:e,itemName:n}),y.__fullText=n,y.anid="name",e.get("triggerEvent")){var x=Qp.makeAxisEventDataBase(e);x.targetType="axisName",x.name=n,rt(y).eventData=x}i.add(y),y.updateTransform(),t.add(y),y.decomposeTransform()}}};function $me(r,e,t,i){var n=t_(t-r),a,o,s=i[0]>i[1],l=e==="start"&&!s||e!=="start"&&s;return Su(n-Hf/2)?(o=l?"bottom":"top",a="center"):Su(n-Hf*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",nHf/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function Qme(r,e,t){if(!L1(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],f=t[t.length-1],h=t[t.length-2];i===!1?(us(a),us(u)):QX(a,o)&&(i?(us(o),us(c)):(us(a),us(u))),n===!1?(us(s),us(f)):QX(l,s)&&(n?(us(l),us(h)):(us(s),us(f)))}}function us(r){r&&(r.ignore=!0)}function QX(r,e){var t=r&&r.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!t||!i)){var n=uf([]);return Ca(n,n,-r.rotation),t.applyTransform(Aa([],n,r.getLocalTransform())),i.applyTransform(Aa([],n,e.getLocalTransform())),t.intersect(i)}}function e9(r){return r==="middle"||r==="center"}function t9(r,e,t,i,n){for(var a=[],o=[],s=[],l=0;l=0||r===e}function i9(r){var e=oT(r);if(e){var t=e.axisPointerModel,i=e.axis.scale,n=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=i.parse(o));var s=mI(t);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var g=l;d.color!=null&&(g=Ye({color:d.color},l));var m=_t(Qe(d),{boundaryGap:t,splitNumber:i,scale:n,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(Ce(c)){var v=m.name;m.name=c.replace("{value}",v??"")}else He(c)&&(m.name=c(m.name,m));var _=new Zt(m,null,this.ecModel);return wr(_,Gl.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=p},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:_t({lineStyle:{color:"#bbb"}},yx.axisLine),axisLabel:cT(yx.axisLabel,!1),axisTick:cT(yx.axisTick,!1),splitLine:cT(yx.splitLine,!0),splitArea:cT(yx.splitArea,!0),indicator:[]},e}(Pt),p9=dve;var mve=["axisLine","axisTickLabel","axisName"],vve=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes(),a=de(n,function(o){var s=o.model.get("showName")?o.name:"",l=new Cn(o.model,{axisName:s,position:[i.cx,i.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});N(a,function(o){N(mve,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var i=t.coordinateSystem,n=i.getIndicatorAxes();if(!n.length)return;var a=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),p=u.get("color"),d=pe(h)?h:[h],g=pe(p)?p:[p],m=[],v=[];function _(D,U,B){var F=B%U.length;return D[F]=D[F]||[],F}if(a==="circle")for(var y=n[0].getTicksCoords(),x=i.cx,M=i.cy,S=0;S3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;TI(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);TI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!bI(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;TI(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Di);function TI(r,e,t,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&(Ea(i.event),M9(r,e,t,i,n))}function M9(r,e,t,i,n){n.isAvailableBehavior=Be(fT,null,t,i),r.trigger(e,n)}function fT(r,e,t){var i=t[r];return!r||i&&(!Ce(i)||e.event[i+"Key"])}var Kl=_ve;function Av(r,e,t){var i=r.target;i.x+=e,i.y+=t,i.dirty()}function Cv(r,e,t,i){var n=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(i-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var xve={axisPointer:1,tooltip:1,brush:1};function Wf(r,e,t){var i=e.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==t&&!xve.hasOwnProperty(i.mainType)&&n&&n.model!==t}function hT(r){if(Ce(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var AI,pT={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},b9=bt(pT),dT={"alignment-baseline":"textBaseline","stop-color":"stopColor"},w9=bt(dT),Sve=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var i=hT(e);this._defsUsePending=[];var n=new Ze;this._root=n;var a=[],o=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||t.width),l=parseFloat(i.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Eo(i,n,null,!0,!1);for(var u=i.firstChild;u;)this._parseNode(u,n,a,null,!1,!1),u=u.nextSibling;wve(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=mT(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=RI(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var p=n;n=new Ze,n.add(p),p.scaleX=p.scaleY=f.scale,p.x=f.x,p.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new Tt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},r.prototype._parseNode=function(e,t,i,n,a,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var c=AI[s];if(c&&tt(AI,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};i.push(h),s==="g"&&(u=h)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var p=T9[s];if(p&&tt(T9,s)){var d=p.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=d)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,i,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},r.prototype._parseText=function(e,t){var i=new bu({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});cs(t,i),Eo(e,i,this._defsUsePending,!1,!1),Mve(i,t);var n=i.style,a=n.fontSize;a&&a<9&&(n.fontSize=9,i.scaleX*=a/9,i.scaleY*=a/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=i.getBoundingRect();return this._textX+=s.width,t.add(i),i},r.internalField=function(){AI={g:function(e,t){var i=new Ze;return cs(t,i),Eo(e,i,this._defsUsePending,!1,!1),i},rect:function(e,t){var i=new Tt;return cs(t,i),Eo(e,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(e,t){var i=new oa;return cs(t,i),Eo(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),i.silent=!0,i},line:function(e,t){var i=new Kr;return cs(t,i),Eo(e,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(e,t){var i=new v_;return cs(t,i),Eo(e,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(e,t){var i=e.getAttribute("points"),n;i&&(n=C9(i));var a=new ei({shape:{points:n||[]},silent:!0});return cs(t,a),Eo(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var i=e.getAttribute("points"),n;i&&(n=C9(i));var a=new $r({shape:{points:n||[]},silent:!0});return cs(t,a),Eo(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var i=new Ur;return cs(t,i),Eo(e,i,this._defsUsePending,!1,!1),i.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),i.silent=!0,i},text:function(e,t){var i=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var s=new Ze;return cs(t,s),Eo(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),n!=null&&(this._textY=parseFloat(n));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new Ze;return cs(t,s),Eo(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var i=e.getAttribute("d")||"",n=ow(i);return cs(t,n),Eo(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),T9={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),i=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),a=new zl(e,t,i,n);return E9(r,a),A9(r,a),a},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),i=parseInt(r.getAttribute("r")||"0",10),n=new cw(e,t,i);return E9(r,n),A9(r,n),n}};function E9(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function A9(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var i=t.getAttribute("offset"),n=void 0;i&&i.indexOf("%")>0?n=parseInt(i,10)/100:i?n=parseFloat(i):n=0;var a={};P9(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function cs(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Ye(e.__inheritedStyle,r.__inheritedStyle))}function C9(r){for(var e=mT(r),t=[],i=0;i0;a-=2){var o=i[a],s=i[a-1],l=mT(o);switch(n=n||wi(),s){case"translate":_n(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Cm(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ca(n,n,-parseFloat(l[0])*CI,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*CI);Aa(n,[1,0,u,1,0,0],n);break;case"skewY":var c=Math.tan(parseFloat(l[0])*CI);Aa(n,[1,c,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var L9=/([^\s:;]+)\s*:\s*([^:;]+)/g;function P9(r,e,t){var i=r.getAttribute("style");if(i){L9.lastIndex=0;for(var n;(n=L9.exec(i))!=null;){var a=n[1],o=tt(pT,a)?pT[a]:null;o&&(e[o]=n[2]);var s=tt(dT,a)?dT[a]:null;s&&(t[s]=n[2])}}}function Cve(r,e,t){for(var i=0;i0,m={api:i,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,t,i),this._updateMapSelectHandler(e,u,i,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=ke(),i=ke(),n=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(p,d){return d&&(p=d(p)),p&&[p[0]*a.scaleX+a.x,p[1]*a.scaleY+a.y]}function f(p){for(var d=[],g=!u&&l&&l.project,m=0;m=0)&&(h=n);var p=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Nr(e,Tr(i),{labelFetcher:h,labelDataIndex:f,defaultText:t},p);var d=e.getTextContent();if(d&&(H9(d).ignore=d.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function B9(r,e,t,i,n,a){r.data?r.data.setItemGraphicEl(a,e):rt(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:i&&i.option||{}}}function k9(r,e,t,i,n){r.data||Vs({el:e,componentModel:n,itemName:t,itemTooltipOption:i.get("tooltip")})}function V9(r,e,t,i,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var a=i.getModel("emphasis"),o=a.get("focus");return nr(e,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&m4(e,n,t),o}function G9(r,e,t){var i=[],n;function a(){n=[]}function o(){n.length&&(i.push(n),n=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),N(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(jt),X9=Gve;function Hve(r,e){var t={};return N(r,function(i){i.each(i.mapDimension("value"),function(n,a){var o="ec-"+i.getName(a);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(i,n){for(var a="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[a].length,c=0;c1?(x.width=y,x.height=y/m):(x.height=y,x.width=y*m),x.y=_[1]-x.height/2,x.x=_[0]-x.width/2;else{var M=r.getBoxLayoutParams();M.aspect=m,x=xr(M,{width:d,height:g})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function Yve(r,e){N(e.get("geoCoord"),function(t,i){r.addGeoCoord(i,t)})}var qve=function(){function r(){this.dimensions=FI}return r.prototype.create=function(e,t){var i=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new zI(l+s,l,fe({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),i.push(u),o.coordinateSystem=u,u.model=o,u.resize=K9,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=i[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),N(a,function(o,s){var l=de(o,function(c){return c.get("nameMap")}),u=new zI(s,s,fe({nameMap:Sm(l)},n(o[0])));u.zoomLimit=Br.apply(null,de(o,function(c){return c.get("scaleLimit")})),i.push(u),u.resize=K9,u.resize(o[0],t),N(o,function(c){c.coordinateSystem=u,Yve(u,c)})}),i},r.prototype.getFilledRegions=function(e,t,i,n){for(var a=(e||[]).slice(),o=ke(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function t7(r,e){var t=r.isExpand?r.children:[],i=r.parentNode.children,n=r.hierNode.i?i[r.hierNode.i-1]:null;if(t.length){$ve(r);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=Qve(r,n,r.parentNode.hierNode.defaultAncestor||i[0],e)}function r7(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function GI(r){return arguments.length?r:rge}function rd(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function i7(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function $ve(r){for(var e=r.children,t=e.length,i=0,n=0;--t>=0;){var a=e[t];a.hierNode.prelim+=i,a.hierNode.modifier+=i,n+=a.hierNode.change,i+=a.hierNode.shift+n}}function Qve(r,e,t,i){if(e){for(var n=r,a=r,o=a.parentNode.children[0],s=e,l=n.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=kI(s),a=VI(a),s&&a;){n=kI(n),o=VI(o),n.hierNode.ancestor=r;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+i(s,a);h>0&&(tge(ege(s,r,t),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=n.hierNode.modifier,c+=o.hierNode.modifier}s&&!kI(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=f-l),a&&!VI(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=r)}return t}function kI(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function VI(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function ege(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function tge(r,e,t){var i=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=i}function rge(r,e){return r.parentNode===e.parentNode?1:2}var ige=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),nge=function(r){Z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ige},e.prototype.buildPath=function(t,i){var n=i.childPoints,a=n.length,o=i.parentPoint,s=n[0],l=n[a-1];if(a===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=i.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=Fe(i.forkPosition,1),p=[];p[c]=o[c],p[f]=o[f]+(l[f]-o[f])*h,t.moveTo(o[0],o[1]),t.lineTo(p[0],p[1]),t.moveTo(s[0],s[1]),p[c]=s[c],t.lineTo(p[0],p[1]),p[c]=l[c],t.lineTo(p[0],p[1]),t.lineTo(l[0],l[1]);for(var d=1;d_.x,M||(x=x-Math.PI));var w=M?"left":"right",T=s.getModel("label"),C=T.get("rotate"),b=C*(Math.PI/180),E=m.getTextContent();E&&(m.setTextConfig({position:T.get("position")||w,rotation:C==null?-x:b,origin:"center"}),E.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),R=I==="relative"?ep(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;R&&(rt(t).focus=R),oge(n,o,c,t,d,p,g,i),t.__edge&&(t.onHoverStateChange=function(A){if(A!=="blur"){var D=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);D&&D.hoverState===Cp||Rp(t.__edge,A)}})}function oge(r,e,t,i,n,a,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),p=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(g||(g=i.__edge=new Dp({shape:HI(c,f,h,n,n)})),Dt(g,{shape:HI(c,f,h,a,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,v=[],_=0;_t&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,n=i.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,i=t.data.getItemModel(this.dataIndex);return i.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var i=t.getData().tree.root,n=r.targetNode;if(Ce(n)&&(n=i.getNodeById(n)),n&&i.contains(n))return{node:n};var a=r.targetNodeId;if(a!=null&&(n=i.getNodeById(a)))return{node:n}}}function XI(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Pv(r,e){var t=XI(r);return dt(t,e)>=0}function Yf(r,e){for(var t=[];r;){var i=r.dataIndex;t.push({name:r.name,dataIndex:i,value:e.getRawValue(i)}),r=r.parentNode}return t.reverse(),t}var gge=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var i={name:t.name,children:t.data},n=t.leaves||{},a=new Zt(n,this,this.ecModel),o=Lv.createTree(i,this,s);function s(f){f.wrapMethod("getItemModel",function(h,p){var d=o.getNodeByDataIndex(p);return d&&d.children.length&&d.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,i,n){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Or("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=Yf(n,this),i.collapsed=!n.isExpand,i},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(jt),f7=gge;function h7(r,e,t){for(var i=[r],n=[],a;a=i.pop();)if(n.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)t.push(n[a])}}function qI(r,e){r.eachSeriesByType("tree",function(t){yge(t,e)})}function yge(r,e){var t=i7(r,e);r.layoutInfo=t;var i=r.get("layout"),n=0,a=0,o=null;i==="radial"?(n=2*Math.PI,a=Math.min(t.height,t.width)/2,o=GI(function(y,x){return(y.parentNode===x.parentNode?1:2)/y.depth})):(n=t.width,a=t.height,o=GI());var s=r.getData().tree.root,l=s.children[0];if(l){e7(s),h7(l,t7,o),s.hierNode.modifier=-l.hierNode.prelim,Dv(l,r7);var u=l,c=l,f=l;Dv(l,function(y){var x=y.getLayout().x;xc.getLayout().x&&(c=y),y.depth>f.depth&&(f=y)});var h=u===c?1:o(u,c)/2,p=h-u.getLayout().x,d=0,g=0,m=0,v=0;if(i==="radial")d=n/(c.getLayout().x+h+p),g=a/(f.depth-1||1),Dv(l,function(y){m=(y.getLayout().x+p)*d,v=(y.depth-1)*g;var x=rd(m,v);y.setLayout({x:x.x,y:x.y,rawX:m,rawY:v},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=a/(c.getLayout().x+h+p),d=n/(f.depth-1||1),Dv(l,function(y){v=(y.getLayout().x+p)*g,m=_==="LR"?(y.depth-1)*d:n-(y.depth-1)*d,y.setLayout({x:m,y:v},!0)})):(_==="TB"||_==="BT")&&(d=n/(c.getLayout().x+h+p),g=a/(f.depth-1||1),Dv(l,function(y){m=(y.getLayout().x+p)*d,v=_==="TB"?(y.depth-1)*g:a-(y.depth-1)*g,y.setLayout({x:m,y:v},!0)}))}}}function ZI(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),i=t.tree;i.eachNode(function(n){var a=n.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");fe(s,o)})})}function p7(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=e.dataIndex,a=i.getData().tree,o=a.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,i){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=n.coordinateSystem,o=Rv(a,e,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function jI(r){r.registerChartView(u7),r.registerSeriesModel(f7),r.registerLayout(qI),r.registerVisual(ZI),p7(r)}var d7=["treemapZoomToNode","treemapRender","treemapMove"];function m7(r){for(var e=0;e1;)a=a.parentNode;var o=P_(r.ecModel,a.name||a.dataIndex+"",i);n.setVisual("decal",o)})}var _ge=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,i){var n={name:t.name,children:t.data};v7(n);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new Zt({itemStyle:o},this,i);a=t.levels=xge(a,i);var l=de(a||[],function(f){return new Zt(f,s,i)},this),u=Lv.createTree(n,this,c);function c(f){f.wrapMethod("getItemModel",function(h,p){var d=u.getNodeByDataIndex(p),g=d?l[d.depth]:null;return h.parentModel=g||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return Or("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treeAncestors=Yf(n,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},fe(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var i=this._idIndexMap;i||(i=this._idIndexMap=ke(),this._idIndexMapCount=0);var n=i.get(t);return n==null&&i.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){Sx(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(jt);function v7(r){var e=0;N(r.children,function(i){v7(i);var n=i.value;pe(n)&&(n=n[0]),e+=n});var t=r.value;pe(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),pe(r.value)?r.value[0]=t:r.value=t}function xge(r,e){var t=Jt(e.get("color")),i=Jt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,a;N(r,function(s){var l=new Zt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!a&&i&&(o.decal=i.slice()),r}}var g7=_ge;var Sge=8,y7=8,KI=5,Mge=function(){function r(e){this.group=new Ze,e.add(this.group)}return r.prototype.render=function(e,t,i,n){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!i)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,f,u),this._renderContent(e,f,s,l,u,c,n),Ef(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,i){for(var n=e;n;n=n.parentNode){var a=Yr(n.getModel().get("name"),""),o=i.getTextRect(a),s=Math.max(o.width+Sge*2,t.emptyItemWidth);t.totalWidth+=s+y7,t.renderList.push({node:n,text:a,width:s})}},r.prototype._renderContent=function(e,t,i,n,a,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),f=_5(t.pos,t.box),h=t.totalWidth,p=t.renderList,d=n.getModel("itemStyle").getItemStyle(),g=p.length-1;g>=0;g--){var m=p[g],v=m.node,_=m.width,y=m.text;h>f.width&&(h-=_-u,_=u,y=null);var x=new ei({shape:{points:bge(l,0,_,c,g===p.length-1,g===0)},style:Ye(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Lt({style:fr(a,{text:y})}),textConfig:{position:"inside"},z2:wu*1e4,onclick:ot(s,v)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=fr(o,{text:y}),x.ensureState("emphasis").style=d,nr(x,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(x),wge(x,e,v),l+=_+y7}},r.prototype.remove=function(){this.group.removeAll()},r}();function bge(r,e,t,i,n,a){var o=[[n?r:r-KI,e],[r+t,e],[r+t,e+i],[n?r:r-KI,e+i]];return!a&&o.splice(2,0,[r+t+KI,e+i/2]),!n&&o.push([r,e+i/2]),o}function wge(r,e,t){rt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Yf(t,e)}}var _7=Mge;var Tge=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,i,n,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:i,delay:n,easing:a}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,i=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,a=this._storage.length;nM7||Math.abs(t.dy)>M7)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var i=t.originX,n=t.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new lt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;i-=l.x,n-=l.y;var u=wi();_n(u,u,[-i,-n]),Cm(u,u,[t.scale,t.scale]),_n(u,u,[i,n]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var i=this;t.on("click",function(n){if(i._state==="ready"){var a=i.seriesModel.get("nodeClick",!0);if(a){var o=i.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)i._rootToNode(o);else if(a==="zoomToNode")i._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&kp(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,i,n){var a=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(i.getWidth()/2,i.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new _7(this.group))).render(t,i,n.node,function(o){a._state!=="animating"&&(Pv(t.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Mx(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,i){var n,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,i),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Yt);function Mx(){return{nodeGroup:[],background:[],content:[]}}function Pge(r,e,t,i,n,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var p=c.width,d=c.height,g=c.borderWidth,m=c.invisible,v=o.getRawIndex(),_=s&&s.getRawIndex(),y=o.viewChildren,x=c.upperHeight,M=y&&y.length,S=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),C=h.getModel(["select","itemStyle"]),b=S.get("borderRadius")||0,E=V("nodeGroup",JI);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),xT(E).nodeWidth=p,xT(E).nodeHeight=d,c.isAboveViewRoot)return E;var I=V("background",S7,u,Cge);I&&k(E,I,M&&c.upperLabelHeight);var R=h.getModel("emphasis"),A=R.get("focus"),D=R.get("blurScope"),U=R.get("disabled"),B=A==="ancestor"?o.getAncestorsIndices():A==="descendant"?o.getDescendantIndices():A;if(M)Tf(E)&&Eu(E,!1),I&&(Eu(I,!U),f.setItemGraphicEl(o.dataIndex,I),tw(I,B,D));else{var F=V("content",S7,u,Rge);F&&G(E,F),I.disableMorphing=!0,I&&Tf(I)&&Eu(I,!1),Eu(E,!U),f.setItemGraphicEl(o.dataIndex,E),tw(E,B,D)}return E;function k(ve,ue,se){var Ee=rt(ue);if(Ee.dataIndex=o.dataIndex,Ee.seriesIndex=r.seriesIndex,ue.setShape({x:0,y:0,width:p,height:d,r:b}),m)Y(ue);else{ue.invisible=!1;var q=o.getVisual("style"),H=q.stroke,We=T7(S);We.fill=H;var _e=id(w);_e.fill=w.get("borderColor");var xe=id(T);xe.fill=T.get("borderColor");var Le=id(C);if(Le.fill=C.get("borderColor"),se){var Ue=p-2*g;J(ue,H,q.opacity,{x:g,y:0,width:Ue,height:x})}else ue.removeTextContent();ue.setStyle(We),ue.ensureState("emphasis").style=_e,ue.ensureState("blur").style=xe,ue.ensureState("select").style=Le,Fs(ue)}ve.add(ue)}function G(ve,ue){var se=rt(ue);se.dataIndex=o.dataIndex,se.seriesIndex=r.seriesIndex;var Ee=Math.max(p-2*g,0),q=Math.max(d-2*g,0);if(ue.culling=!0,ue.setShape({x:g,y:g,width:Ee,height:q,r:b}),m)Y(ue);else{ue.invisible=!1;var H=o.getVisual("style"),We=H.fill,_e=T7(S);_e.fill=We,_e.decal=H.decal;var xe=id(w),Le=id(T),Ue=id(C);J(ue,We,H.opacity,null),ue.setStyle(_e),ue.ensureState("emphasis").style=xe,ue.ensureState("blur").style=Le,ue.ensureState("select").style=Ue,Fs(ue)}ve.add(ue)}function Y(ve){!ve.invisible&&a.push(ve)}function J(ve,ue,se,Ee){var q=h.getModel(Ee?w7:b7),H=Yr(h.get("name"),null),We=q.getShallow("show");Nr(ve,Tr(h,Ee?w7:b7),{defaultText:We?H:null,inheritColor:ue,defaultOpacity:se,labelFetcher:r,labelDataIndex:o.dataIndex});var _e=ve.getTextContent();if(_e){var xe=_e.style,Le=Mm(xe.padding||0);Ee&&(ve.setTextConfig({layoutRect:Ee}),_e.disableLabelLayout=!0),_e.beforeUpdate=function(){var Ne=Math.max((Ee?Ee.width:ve.shape.width)-Le[1]-Le[3],0),Ve=Math.max((Ee?Ee.height:ve.shape.height)-Le[0]-Le[2],0);(xe.width!==Ne||xe.height!==Ve)&&_e.setStyle({width:Ne,height:Ve})},xe.truncateMinChar=2,xe.lineOverflow="truncate",Q(xe,Ee,c);var Ue=_e.getState("emphasis");Q(Ue?Ue.style:null,Ee,c)}}function Q(ve,ue,se){var Ee=ve?ve.text:null;if(!ue&&se.isLeafRoot&&Ee!=null){var q=r.get("drillDownIcon",!0);ve.text=q?q+" "+Ee:Ee}}function V(ve,ue,se,Ee){var q=_!=null&&t[ve][_],H=n[ve];return q?(t[ve][_]=null,K(H,q)):m||(q=new ue,q instanceof gi&&(q.z2=Dge(se,Ee)),ae(H,q)),e[ve][v]=q}function K(ve,ue){var se=ve[v]={};ue instanceof JI?(se.oldX=ue.x,se.oldY=ue.y):se.oldShape=fe({},ue.shape)}function ae(ve,ue){var se=ve[v]={},Ee=o.parentNode,q=ue instanceof Ze;if(Ee&&(!i||i.direction==="drillDown")){var H=0,We=0,_e=n.background[Ee.getRawIndex()];!i&&_e&&_e.oldShape&&(H=_e.oldShape.width,We=_e.oldShape.height),q?(se.oldX=0,se.oldY=We):se.oldShape={x:H,y:We,width:0,height:0}}se.fadein=!q}}function Dge(r,e){return r*Age+e}var E7=Lge;var Ex=N,Ige=qe,bT=-1,tN=function(){function r(e){var t=e.mappingMethod,i=e.type,n=this.option=Qe(e);this.type=i,this.mappingMethod=t,this._normalizeData=Oge[t];var a=r.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?($I(n),Nge(n)):t==="category"?n.categories?Uge(n):$I(n,!0):(kr(t!=="linear"||n.dataExtent),$I(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Be(this._normalizeData,this)},r.listVisualTypes=function(){return bt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,i){qe(e)?N(e,t,i):t.call(i,e)},r.mapVisual=function(e,t,i){var n,a=pe(e)?[]:qe(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(i,o,s);n?a=l:a[s]=l}),a},r.retrieveVisuals=function(e){var t={},i;return e&&Ex(r.visualHandlers,function(n,a){e.hasOwnProperty(a)&&(t[a]=e[a],i=!0)}),i?t:null},r.prepareVisualTypes=function(e){if(pe(e))e=e.slice();else if(Ige(e)){var t=[];Ex(e,function(i,n){t.push(n)}),e=t}else return[];return e.sort(function(i,n){return n==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,i){for(var n,a=1/0,o=0,s=t.length;o=0;a--)i[a]==null&&(delete t[e[a]],e.pop())}function $I(r,e){var t=r.visual,i=[];qe(t)?Ex(t,function(a){i.push(a)}):t!=null&&i.push(t);var n={color:1,symbol:1};!e&&i.length===1&&!n.hasOwnProperty(r.type)&&(i[1]=i[0]),C7(r,i)}function ST(r){return{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);i("color",r(t("color"),n))},_normalizedToVisual:QI([0,1])}}function A7(r){var e=this.option.visual;return e[Math.round(rr(r,[0,1],[0,e.length-1],!0))]||{}}function bx(r){return function(e,t,i){i(r,this.mapValueToVisual(e))}}function Tx(r){var e=this.option.visual;return e[this.option.loop&&r!==bT?r%e.length:r]}function nd(){return this.option.visual[0]}function QI(r){return{linear:function(e){return rr(e,r,this.option.visual,!0)},category:Tx,piecewise:function(e,t){var i=eN.call(this,t);return i==null&&(i=rr(e,r,this.option.visual,!0)),i},fixed:nd}}function eN(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=tN.findPieceIndex(r,t),n=t[i];if(n&&n.visual)return n.visual[this.type]}}function C7(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=de(e,function(t){var i=cn(t);return i||[0,0,0,1]})),e}var Oge={linear:function(r){return rr(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=tN.findPieceIndex(r,e,!0);if(t!=null)return rr(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??bT},fixed:Ir};function MT(r,e,t){return r?e<=t:e=t.length||g===t[g.depth]){var v=Vge(n,l,g,m,d,i);D7(g,v,t,i)}})}}}function zge(r,e,t){var i=fe({},e),n=t.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(a){n[a]=e[a];var o=r.get(a);n[a]=null,o!=null&&(i[a]=o)}),i}function R7(r){var e=rN(r,"color");if(e){var t=rN(r,"colorAlpha"),i=rN(r,"colorSaturation");return i&&(e=up(e,null,null,i)),t&&(e=cp(e,t)),e}}function Bge(r,e){return e!=null?up(e,null,null,r):null}function rN(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function kge(r,e,t,i,n,a){if(!(!a||!a.length)){var o=iN(e,"color")||n.color!=null&&n.color!=="none"&&(iN(e,"colorAlpha")||iN(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new pi(f);return L7(h).drColorMappingBy=c,h}}}function iN(r,e){var t=r.get(e);return pe(t)&&t.length?{name:e,range:t}:null}function Vge(r,e,t,i,n,a){var o=fe({},e);if(n){var s=n.type,l=s==="color"&&L7(n).drColorMappingBy,u=l==="index"?i:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Ax=Math.max,wT=Math.min,I7=Br,nN=N,U7=["itemStyle","borderWidth"],Gge=["itemStyle","gapWidth"],Hge=["upperLabel","show"],Wge=["upperLabel","height"],O7={seriesType:"treemap",reset:function(r,e,t,i){var n=t.getWidth(),a=t.getHeight(),o=r.option,s=xr(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=Fe(I7(s.width,l[0]),n),c=Fe(I7(s.height,l[1]),a),f=i&&i.type,h=["treemapZoomToNode","treemapRootToNode"],p=Gu(i,h,r),d=f==="treemapRender"||f==="treemapMove"?i.rootRect:null,g=r.getViewRoot(),m=XI(g);if(f!=="treemapMove"){var v=f==="treemapZoomToNode"?Kge(r,p,g,u,c):d?[d.width,d.height]:[u,c],_=o.sort;_&&_!=="asc"&&_!=="desc"&&(_="desc");var y={squareRatio:o.squareRatio,sort:_,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var x={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};g.setLayout(x),F7(g,y,!1,0),x=g.getLayout(),nN(m,function(S,w){var T=(m[w+1]||g).getValue();S.setLayout(fe({dataExtent:[T,T],borderWidth:0,upperHeight:0},x))})}var M=r.getData().tree.root;M.setLayout(Jge(s,d,p),!0),r.setLayoutInfo(s),z7(M,new lt(-s.x,-s.y,n,a),m,g,0)}};function F7(r,e,t,i){var n,a;if(!r.isRemoved()){var o=r.getLayout();n=o.width,a=o.height;var s=r.getModel(),l=s.get(U7),u=s.get(Gge)/2,c=B7(s),f=Math.max(l,c),h=l-u,p=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),n=Ax(n-2*h,0),a=Ax(a-h-p,0);var d=n*a,g=Xge(r,s,d,e,t,i);if(g.length){var m={x:h,y:p,width:n,height:a},v=wT(n,a),_=1/0,y=[];y.area=0;for(var x=0,M=g.length;x=0;l--){var u=n[i==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:i,dataExtent:s}}function jge(r,e,t){for(var i=0,n=1/0,a=0,o=void 0,s=r.length;ai&&(i=o));var l=r.area*r.area,u=e*e*t;return l?Ax(u*i/l,l/(u*n)):1/0}function N7(r,e,t,i,n){var a=e===t.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=t[s[a]],c=e?r.area/e:0;(n||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,h=r.length;fe_&&(u=e_),a=s}ui&&(i=e);var a=i%2?i+2:i+3;n=[];for(var o=0;o0&&(M[0]=-M[0],M[1]=-M[1]);var w=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(x[1],x[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*v+c[0],a.y=-h[1]*_+c[1],d=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=v*w+c[0],a.y=c[1]+C,d=x[0]<0?"right":"left",a.originX=-v*w,a.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+C,d="center",a.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-v*w+f[0],a.y=f[1]+C,d=x[0]>=0?"right":"left",a.originX=v*w,a.originY=-C;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||d})}},e}(Ze),Ov=nye;var aye=function(){function r(e){this.group=new Ze,this._LineCtor=e||Ov}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=e,a||n.removeAll();var o=$7(e);e.diff(a).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(a,e,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,i){t.updateLayout(e,i)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=$7(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function i(s){!s.isGroup&&!oye(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function $7(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Tr(e)}}function Q7(r){return isNaN(r[0])||isNaN(r[1])}function SN(r){return r&&!Q7(r[0])&&!Q7(r[1])}var Fv=aye;var MN=[],bN=[],wN=[],zv=vi,TN=yu,eY=Math.abs;function tY(r,e,t){for(var i=r[0],n=r[1],a=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){MN[0]=zv(i[0],n[0],a[0],c),MN[1]=zv(i[1],n[1],a[1],c);var f=eY(TN(MN,e)-l);f=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function Lx(r,e){var t=[],i=pf,n=[[],[],[]],a=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[wa(u[0]),wa(u[1])],u[2]&&u.__original.push(wa(u[2])));var h=u.__original;if(u[2]!=null){if(qi(n[0],h[0]),qi(n[1],h[2]),qi(n[2],h[1]),c&&c!=="none"){var p=od(s.node1),d=tY(n,h[0],p*e);i(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],i(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(f&&f!=="none"){var p=od(s.node2),d=tY(n,h[1],p*e);i(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],i(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}qi(u[0],n[0]),qi(u[1],n[2]),qi(u[2],n[1])}else{if(qi(a[0],h[0]),qi(a[1],h[1]),Is(o,a[1],a[0]),Wo(o,o),c&&c!=="none"){var p=od(s.node1);N0(a[0],a[0],o,p*e)}if(f&&f!=="none"){var p=od(s.node2);N0(a[1],a[1],o,-p*e)}qi(u[0],a[0]),qi(u[1],a[1])}})}function rY(r){return r.type==="view"}var sye=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){var n=new Yl,a=new Fv,o=this.group;this._controller=new Kl(i.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(a.group),this._symbolDraw=n,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,i,n){var a=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(rY(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Dt(u,c,t)}Lx(t.getGraph(),ad(t));var f=t.getData();s.updateData(f);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,i,n),clearTimeout(this._layoutTimeout);var p=t.forceLayout,d=t.get(["force","layoutAnimation"]);p&&this._startForceLayoutIteration(p,d);var g=t.get("layout");f.graph.eachNode(function(y){var x=y.dataIndex,M=y.getGraphicEl(),S=y.getModel();if(M){M.off("drag").off("dragend");var w=S.get("draggable");w&&M.on("drag",function(C){switch(g){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,d),p.setFixed(x),f.setItemLayout(x,[M.x,M.y]);break;case"circular":f.setItemLayout(x,[M.x,M.y]),y.setLayout({fixed:!0},!0),Nv(t,"symbolSize",y,[C.offsetX,C.offsetY]),a.updateLayout(t);break;case"none":default:f.setItemLayout(x,[M.x,M.y]),Rx(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){p&&p.setUnfixed(x)}),M.setDraggable(w,!!S.get("cursor"));var T=S.get(["emphasis","focus"]);T==="adjacency"&&(rt(M).focus=y.getAdjacentDataIndices())}}),f.graph.eachEdge(function(y){var x=y.getGraphicEl(),M=y.getModel().get(["emphasis","focus"]);x&&M==="adjacency"&&(rt(x).focus={edge:[y.dataIndex],node:[y.node1.dataIndex,y.node2.dataIndex]})});var m=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),v=f.getLayout("cx"),_=f.getLayout("cy");f.graph.eachNode(function(y){pN(y,m,v,_)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,i){var n=this;(function a(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(i?n._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,i,n){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!Wf(u,n,t)}),!rY(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Av(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Cv(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),Lx(t.getGraph(),ad(t)),a._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,i=t.getData(),n=ad(t);i.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Lx(t.getGraph(),ad(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Yt),iY=sye;function Bv(r){return"_EC_"+r}var lye=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var i=this._nodesMap;if(!i[Bv(e)]){var n=new sd(e,t);return n.hostGraph=this,this.nodes.push(n),i[Bv(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Bv(e)]},r.prototype.addEdge=function(e,t,i){var n=this._nodesMap,a=this._edgesMap;if(At(e)&&(e=this.nodes[e]),At(t)&&(t=this.nodes[t]),e instanceof sd||(e=n[Bv(e)]),t instanceof sd||(t=n[Bv(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new nY(e,t,i);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof sd&&(e=e.id),t instanceof sd&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var i=this.nodes,n=i.length,a=0;a=0&&e.call(t,i[a],a)},r.prototype.eachEdge=function(e,t){for(var i=this.edges,n=i.length,a=0;a=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&e.call(t,i[a],a)},r.prototype.breadthFirstTraverse=function(e,t,i,n){if(t instanceof sd||(t=this._nodesMap[Bv(t)]),!!t){for(var a=i==="out"?"outEdges":i==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=n.length;a=0&&this[r][e].setItemVisual(this.dataIndex,t,i)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,i){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,i)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}wr(sd,aY("hostGraph","data"));wr(nY,aY("hostGraph","edgeData"));var oY=lye;function Px(r,e,t,i,n){for(var a=new oY(i),o=0;o "+h)),u++)}var p=t.get("coordinateSystem"),d;if(p==="cartesian2d"||p==="polar")d=hn(r,t);else{var g=Uu.get(p),m=g?g.dimensions||[]:[];dt(m,"value")<0&&m.concat(["value"]);var v=js(r,{coordDimensions:m,encodeDefine:t.getEncode()}).dimensions;d=new ti(v,t),d.initData(r)}var _=new ti(["value"],t);return _.initData(l,s),n&&n(d,_),_T({mainData:d,struct:a,structAttr:"graph",datas:{node:d,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var uye=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new jl(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),yo(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,i){var n=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&n){G7(this);var s=Px(a,n,this,!0,l);return N(s.edges,function(u){H7(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(d){var g=o._categoriesModels,m=d.getShallow("category"),v=g[m];return v&&(v.parentModel=d.parentModel,d.parentModel=v),d});var f=Zt.prototype.getModel;function h(d,g){var m=f.call(this,d,g);return m.resolveParentPath=p,m}c.wrapMethod("getItemModel",function(d){return d.resolveParentPath=p,d.getModel=h,d});function p(d){if(d&&(d[0]==="label"||d[1]==="label")){var g=d.slice();return d[0]==="label"?g[0]="edgeLabel":d[1]==="label"&&(g[1]="edgeLabel"),g}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,i,n){if(n==="edge"){var a=this.getData(),o=this.getDataParams(t,n),s=a.graph.getEdgeByIndex(t),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Or("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=Zw({series:this,dataIndex:t,multipleSeries:i});return f},e.prototype._updateCategoriesData=function(){var t=de(this.option.categories||[],function(n){return n.value!=null?n:fe({value:0},n)}),i=new ti(["value"],this);i.initData(t),this._categoriesData=i,this._categoriesModels=i.mapArray(function(n){return i.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(jt),sY=uye;var cye={type:"graphRoam",event:"graphRoam",update:"none"};function EN(r){r.registerChartView(iY),r.registerSeriesModel(sY),r.registerProcessor(oN),r.registerVisual(sN),r.registerVisual(lN),r.registerLayout(fN),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,dN),r.registerLayout(mN),r.registerCoordinateSystem("graphView",{dimensions:Vu.dimensions,create:vN}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ir),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ir),r.registerAction(cye,function(e,t,i){t.eachComponent({mainType:"series",query:e},function(n){var a=n.coordinateSystem,o=Rv(a,e,void 0,i);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var fye=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),hye=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i.type="pointer",i}return e.prototype.getDefaultShape=function(){return new fye},e.prototype.buildPath=function(t,i){var n=Math.cos,a=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-n(l)*s*(s>=o/3?1:2),c=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(i.x+n(l)*s,i.y+a(l)*s),t.lineTo(i.x+n(i.angle)*o,i.y+a(i.angle)*o),t.lineTo(i.x-n(l)*s,i.y-a(l)*s),t.lineTo(u,c)},e}(ut),lY=hye;function pye(r,e){var t=r.get("center"),i=e.getWidth(),n=e.getHeight(),a=Math.min(i,n),o=Fe(t[0],e.getWidth()),s=Fe(t[1],e.getHeight()),l=Fe(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function CT(r,e){var t=r==null?"":r+"";return e&&(Ce(e)?t=e.replace("{value}",t):He(e)&&(t=e(r))),t}var dye=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=pye(t,n);this._renderMain(t,i,n,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,i,n,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),h=f.get("roundCap"),p=h?Tv:yi,d=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),v=[u,c];l_(v,!l),u=v[0],c=v[1];for(var _=c-u,y=u,x=[],M=0;d&&M=C&&(b===0?0:a[b-1][0])Math.PI/2&&(V+=Math.PI)):Q==="tangential"?V=-T-Math.PI/2:At(Q)&&(V=Q*Math.PI/180),V===0?f.add(new Lt({style:fr(y,{text:k,x:Y,y:J,verticalAlign:D<-.8?"top":D>.8?"bottom":"middle",align:A<-.4?"left":A>.4?"right":"center"},{inheritColor:G}),silent:!0})):f.add(new Lt({style:fr(y,{text:k,x:Y,y:J,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:Y,originY:J,rotation:V}))}if(_.get("show")&&U!==x){var B=_.get("distance");B=B?B+c:c;for(var K=0;K<=M;K++){A=Math.cos(T),D=Math.sin(T);var ae=new Kr({shape:{x1:A*(d-B)+h,y1:D*(d-B)+p,x2:A*(d-w-B)+h,y2:D*(d-w-B)+p},silent:!0,style:I});I.stroke==="auto"&&ae.setStyle({stroke:a((U+K/M)/x)}),f.add(ae),T+=b}T-=b}else T+=C}},e.prototype._renderPointer=function(t,i,n,a,o,s,l,u,c){var f=this.group,h=this._data,p=this._progressEls,d=[],g=t.get(["pointer","show"]),m=t.getModel("progress"),v=m.get("show"),_=t.getData(),y=_.mapDimension("value"),x=+t.get("min"),M=+t.get("max"),S=[x,M],w=[s,l];function T(b,E){var I=_.getItemModel(b),R=I.getModel("pointer"),A=Fe(R.get("width"),o.r),D=Fe(R.get("length"),o.r),U=t.get(["pointer","icon"]),B=R.get("offsetCenter"),F=Fe(B[0],o.r),k=Fe(B[1],o.r),G=R.get("keepAspect"),Y;return U?Y=Sr(U,F-A/2,k-D,A,D,null,G):Y=new lY({shape:{angle:-Math.PI/2,width:A,r:D,x:F,y:k}}),Y.rotation=-(E+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function C(b,E){var I=m.get("roundCap"),R=I?Tv:yi,A=m.get("overlap"),D=A?m.get("width"):c/_.count(),U=A?o.r-D:o.r-(b+1)*D,B=A?o.r:o.r-b*D,F=new R({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:U,r:B}});return A&&(F.z2=M-_.get(y,b)%M),F}(v||g)&&(_.diff(h).add(function(b){var E=_.get(y,b);if(g){var I=T(b,s);ar(I,{rotation:-((isNaN(+E)?w[0]:rr(E,S,w,!0))+Math.PI/2)},t),f.add(I),_.setItemGraphicEl(b,I)}if(v){var R=C(b,s),A=m.get("clip");ar(R,{shape:{endAngle:rr(E,S,w,A)}},t),f.add(R),c_(t.seriesIndex,_.dataType,b,R),d[b]=R}}).update(function(b,E){var I=_.get(y,b);if(g){var R=h.getItemGraphicEl(E),A=R?R.rotation:s,D=T(b,A);D.rotation=A,Dt(D,{rotation:-((isNaN(+I)?w[0]:rr(I,S,w,!0))+Math.PI/2)},t),f.add(D),_.setItemGraphicEl(b,D)}if(v){var U=p[E],B=U?U.shape.endAngle:s,F=C(b,B),k=m.get("clip");Dt(F,{shape:{endAngle:rr(I,S,w,k)}},t),f.add(F),c_(t.seriesIndex,_.dataType,b,F),d[b]=F}}).execute(),_.each(function(b){var E=_.getItemModel(b),I=E.getModel("emphasis"),R=I.get("focus"),A=I.get("blurScope"),D=I.get("disabled");if(g){var U=_.getItemGraphicEl(b),B=_.getItemVisual(b,"style"),F=B.fill;if(U instanceof Ur){var k=U.style;U.useStyle(fe({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},B))}else U.useStyle(B),U.type!=="pointer"&&U.setColor(F);U.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),U.style.fill==="auto"&&U.setStyle("fill",a(rr(_.get(y,b),S,[0,1],!0))),U.z2EmphasisLift=0,Gr(U,E),nr(U,R,A,D)}if(v){var G=d[b];G.useStyle(_.getItemVisual(b,"style")),G.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),G.z2EmphasisLift=0,Gr(G,E),nr(G,R,A,D)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,i){var n=t.getModel("anchor"),a=n.get("show");if(a){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),c=Sr(s,i.cx-o/2+Fe(l[0],i.r),i.cy-o/2+Fe(l[1],i.r),o,o,null,u);c.z2=n.get("showAbove")?1:0,c.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,i,n,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),h=new Ze,p=[],d=[],g=t.isAnimationEnabled(),m=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(v){p[v]=new Lt({silent:!0}),d[v]=new Lt({silent:!0})}).update(function(v,_){p[v]=s._titleEls[_],d[v]=s._detailEls[_]}).execute(),l.each(function(v){var _=l.getItemModel(v),y=l.get(u,v),x=new Ze,M=a(rr(y,[c,f],[0,1],!0)),S=_.getModel("title");if(S.get("show")){var w=S.get("offsetCenter"),T=o.cx+Fe(w[0],o.r),C=o.cy+Fe(w[1],o.r),b=p[v];b.attr({z2:m?0:2,style:fr(S,{x:T,y:C,text:l.getName(v),align:"center",verticalAlign:"middle"},{inheritColor:M})}),x.add(b)}var E=_.getModel("detail");if(E.get("show")){var I=E.get("offsetCenter"),R=o.cx+Fe(I[0],o.r),A=o.cy+Fe(I[1],o.r),D=Fe(E.get("width"),o.r),U=Fe(E.get("height"),o.r),B=t.get(["progress","show"])?l.getItemVisual(v,"style").fill:M,b=d[v],F=E.get("formatter");b.attr({z2:m?0:2,style:fr(E,{x:R,y:A,text:CT(y,F),width:isNaN(D)?null:D,height:isNaN(U)?null:U,align:"center",verticalAlign:"middle"},{inheritColor:B})}),vw(b,{normal:E},y,function(G){return CT(G,F)}),g&&gw(b,v,l,t,{getFormattedLabel:function(G,Y,J,Q,V,K){return CT(K?K.interpolatedValue:y,F)}}),x.add(b)}h.add(x)}),this.group.add(h),this._titleEls=p,this._detailEls=d},e.type="gauge",e}(Yt),uY=dye;var mye=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,i){return To(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(jt),cY=mye;function AN(r){r.registerChartView(uY),r.registerSeriesModel(cY)}var vye=["itemStyle","opacity"],gye=function(r){Z(e,r);function e(t,i){var n=r.call(this)||this,a=n,o=new $r,s=new Lt;return a.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,i,!0),n}return e.prototype.updateData=function(t,i,n){var a=this,o=t.hostModel,s=t.getItemModel(i),l=t.getItemLayout(i),u=s.getModel("emphasis"),c=s.get(vye);c=c??1,n||Ii(a),a.useStyle(t.getItemVisual(i,"style")),a.style.lineJoin="round",n?(a.setShape({points:l.points}),a.style.opacity=0,ar(a,{style:{opacity:c}},o,i)):Dt(a,{style:{opacity:c},shape:{points:l.points}},o,i),Gr(a,s),this._updateLabel(t,i),nr(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,i){var n=this,a=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(i),u=t.getItemLayout(i),c=u.label,f=t.getItemVisual(i,"style"),h=f.fill;Nr(o,Tr(l),{labelFetcher:t.hostModel,labelDataIndex:i,defaultOpacity:f.opacity,defaultText:t.getName(i)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),n.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var p=c.linePoints;a.setShape({points:p}),n.textGuideLineConfig={anchor:p?new Nt(p[0][0],p[0][1]):null},Dt(o,{style:{x:c.x,y:c.y}},s,i),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),Sv(n,Mv(l),{stroke:h})},e}(ei),yye=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,i,n){var a=t.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new gye(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Cu(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Yt),fY=yye;var _ye=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new jl(Be(this.getData,this),Be(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,i){return To(this,{coordDimensions:["value"],encodeDefaulter:ot(uv,this)})},e.prototype._defaultLabelLine=function(t){yo(t,"labelLine",["show"]);var i=t.labelLine,n=t.emphasis.labelLine;i.show=i.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var i=this.getData(),n=r.prototype.getDataParams.call(this,t),a=i.mapDimension("value"),o=i.getSum(a);return n.percent=o?+(i.get(a,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(jt),hY=_ye;function xye(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Sye(r,e){for(var t=r.mapDimension("value"),i=r.mapArray(t,function(l){return l}),n=[],a=e==="ascending",o=0,s=r.count();oNye)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!DN(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),i=t.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function DN(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var _Y=Uye;var Fye=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var i=this.option;t&&_t(i,t,!0),this._initDimensions()},e.prototype.contains=function(t,i){var n=t.get("parallelIndex");return n!=null&&i.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){N(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){t.hasOwnProperty(i)&&(this.option[i]=t[i])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],i=this.parallelAxisIndex=[],n=Wt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);N(n,function(a){t.push("dim"+a.get("dim")),i.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Pt),xY=Fye;var zye=function(r){Z(e,r);function e(t,i,n,a,o){var s=r.call(this,t,i,n)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(pn),SY=zye;function Xa(r,e,t,i,n,a){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=kv(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(e[1]-e[0]);s=kv(s,[0,o]),n=a=kv(s,[n,a]),i=0}e[0]=kv(e[0],t),e[1]=kv(e[1],t);var l=IN(e,i);e[i]+=r;var u=n||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[i]=kv(e[i],c);var f;return f=IN(e,i),n!=null&&(f.sign!==l.sign||f.spana&&(e[1-i]=e[i]+f.sign*a),e}function IN(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function kv(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var NN=N,wY=Math.min,TY=Math.max,MY=Math.floor,Bye=Math.ceil,bY=Ar,kye=Math.PI,Vye=function(){function r(e,t,i){this.type="parallel",this._axesMap=ke(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,i)}return r.prototype._init=function(e,t,i){var n=e.dimensions,a=e.parallelAxisIndex;NN(n,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new SY(o,zf(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),i=t.axisBase,n=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=i&&o<=i+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(i){if(e.contains(i,t)){var n=i.getData();NN(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(n,n.mapDimension(a)),Vl(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=xr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,i=["x","y"],n=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,c=RT(e.get("axisExpandWidth"),l),f=RT(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,p=e.get("axisExpandWindow"),d;if(p)d=RT(p[1]-p[0],l),p[1]=p[0]+d;else{d=RT(c*(f-1),l);var g=e.get("axisExpandCenter")||MY(u/2);p=[c*g-d/2],p[1]=p[0]+d}var m=(s-d)/(u-f);m<3&&(m=0);var v=[MY(bY(p[0]/c,1))+1,Bye(bY(p[1]/c,1))-1],_=m/c*p[0];return{layout:a,pixelDimIndex:o,layoutBase:t[i[o]],layoutLength:s,axisBase:t[i[1-o]],axisLength:t[n[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:p,axisCount:u,winInnerIndices:v,axisExpandWindow0Pos:_}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),NN(i,function(o,s){var l=(n.axisExpandable?Hye:Gye)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:kye/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],p=wi();Ca(p,p,h),_n(p,p,f),this._axesLayout[o]={position:f,rotation:h,transform:p,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,i,n){i==null&&(i=0),n==null&&(n=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];N(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=i;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Xa(l,n,o,"all"):u="none";else{var p=n[1]-n[0],d=o[1]*s/p;n=[TY(0,d-p/2)],n[1]=wY(o[1],n[0]+p),n[0]=n[1]-p}return{axisExpandWindow:n,behavior:u}},r}();function RT(r,e){return wY(TY(r,e[0]),e[1])}function Gye(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function Hye(r,e){var t=e.layoutLength,i=e.axisExpandWidth,n=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return r=0;n--)Ti(i[n])},e.prototype.getActiveState=function(t){var i=this.activeIntervals;if(!i.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(i.length===1){var n=i[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var a=0,o=i.length;aZye}function kY(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function VY(r,e,t,i){var n=new Ze;return n.add(new Tt({name:"main",style:WN(t),silent:!0,draggable:!0,cursor:"move",drift:ot(PY,r,e,n,["n","s","w","e"]),ondragend:ot(ud,e,{isEnd:!0})})),N(i,function(a){n.add(new Tt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ot(PY,r,e,n,a),ondragend:ot(ud,e,{isEnd:!0})}))}),n}function GY(r,e,t,i){var n=i.brushStyle.lineWidth||0,a=Vv(n,jye),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,c=t[0][1],f=t[1][1],h=c-a+n/2,p=f-a+n/2,d=c-o,g=f-s,m=d+n,v=g+n;Hu(r,e,"main",o,s,d,g),i.transformable&&(Hu(r,e,"w",l,u,a,v),Hu(r,e,"e",h,u,a,v),Hu(r,e,"n",l,u,m,a),Hu(r,e,"s",l,p,m,a),Hu(r,e,"nw",l,u,a,a),Hu(r,e,"ne",h,u,a,a),Hu(r,e,"sw",l,p,a,a),Hu(r,e,"se",h,p,a,a))}function FN(r,e){var t=e.__brushOption,i=t.transformable,n=e.childAt(0);n.useStyle(WN(t)),n.attr({silent:!i,cursor:i?"move":"default"}),N([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?zN(r,a[0]):r0e(r,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?Jye[s]+"-resize":null})})}function Hu(r,e,t,i,n,a,o){var s=e.childOfName(t);s&&s.setShape(n0e(XN(r,e,[[i,n],[i+a,n+o]])))}function WN(r){return Ye({strokeNoScale:!0},r.brushStyle)}function HY(r,e,t,i){var n=[Dx(r,t),Dx(e,i)],a=[Vv(r,t),Vv(e,i)];return[[n[0],a[0]],[n[1],a[1]]]}function t0e(r){return ks(r.group)}function zN(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=Up(t[e],t0e(r));return i[n]}function r0e(r,e){var t=[zN(r,e[0]),zN(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function PY(r,e,t,i,n,a){var o=t.__brushOption,s=r.toRectRange(o.range),l=WY(e,n,a);N(i,function(u){var c=Kye[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(HY(s[0][0],s[1][0],s[0][1],s[1][1])),VN(e,t),ud(e,{isEnd:!1})}function i0e(r,e,t,i){var n=e.__brushOption.range,a=WY(r,t,i);N(n,function(o){o[0]+=a[0],o[1]+=a[1]}),VN(r,e),ud(r,{isEnd:!1})}function WY(r,e,t){var i=r.group,n=i.transformCoordToLocal(e,t),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function XN(r,e,t){var i=BY(r,e);return i&&i!==ld?i.clipPath(t,r._transform):Qe(t)}function n0e(r){var e=Dx(r[0][0],r[1][0]),t=Dx(r[0][1],r[1][1]),i=Vv(r[0][0],r[1][0]),n=Vv(r[0][1],r[1][1]);return{x:e,y:t,width:i-e,height:n-t}}function a0e(r,e,t){if(!(!r._brushType||s0e(r,e.offsetX,e.offsetY))){var i=r._zr,n=r._covers,a=HN(r,e,t);if(!r._dragging)for(var o=0;oi.getWidth()||t<0||t>i.getHeight()}var LT={lineX:NY(0),lineY:NY(1),rect:{createCover:function(r,e){function t(i){return i}return VY({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=kY(r);return HY(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,i){GY(r,e,t,i)},updateCommon:FN,contain:kN},polygon:{createCover:function(r,e){var t=new Ze;return t.add(new $r({name:"main",style:WN(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new ei({name:"main",draggable:!0,drift:ot(i0e,r,e),ondragend:ot(ud,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,i){e.childAt(0).setShape({points:XN(r,e,t)})},updateCommon:FN,contain:kN}};function NY(r){return{createCover:function(e,t){return VY({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=kY(e),i=Dx(t[0][r],t[1][r]),n=Vv(t[0][r],t[1][r]);return[i,n]},updateCoverShape:function(e,t,i,n){var a,o=BY(e,t);if(o!==ld&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),GY(e,t,l,n)},updateCommon:FN,contain:kN}}var Gv=Qye;function PT(r){return r=YN(r),function(e){return NP(e,r)}}function DT(r,e){return r=YN(r),function(t){var i=e??t,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function IT(r,e,t){var i=YN(r);return function(n,a){return i.contain(a[0],a[1])&&!Wf(n,e,t)}}function YN(r){return lt.create(r)}var l0e=["axisLine","axisTickLabel","axisName"],u0e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){r.prototype.init.apply(this,arguments),(this._brushController=new Gv(i.getZr())).on("brush",Be(this._onBrush,this))},e.prototype.render=function(t,i,n,a){if(!c0e(t,i,a)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ze,this.group.add(this._axisGroup),!!t.get("show")){var s=h0e(t,i),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,h=l.getAxisLayout(f),p=fe({strokeContainThreshold:c},h),d=new Cn(t,p);N(l0e,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(p,u,t,s,c,n),Lu(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,i,n,a,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=lt.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:PT(f),isTargetByCursor:IT(f,s,a),getLinearBrushOtherExtent:DT(f,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(f0e(n))},e.prototype._onBrush=function(t){var i=t.areas,n=this.axisModel,a=n.axis,o=de(i,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Qt);function c0e(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function f0e(r){var e=r.axis;return de(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function h0e(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var qY=u0e;var p0e={type:"axisAreaSelect",event:"axisAreaSelected"};function ZY(r){r.registerAction(p0e,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(i){i.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(i){i.setAxisExpand(e)})})}var d0e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Ix(r){r.registerComponentView(_Y),r.registerComponentModel(xY),r.registerCoordinateSystem("parallel",AY),r.registerPreprocessor(PN),r.registerComponentModel(UN),r.registerComponentView(qY),rl(r,"parallel",UN,d0e),ZY(r)}function qN(r){It(Ix),r.registerChartView(vY),r.registerSeriesModel(gY),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,yY)}var m0e=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),v0e=function(r){Z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new m0e},e.prototype.buildPath=function(t,i){var n=i.extent;t.moveTo(i.x1,i.y1),t.bezierCurveTo(i.cpx1,i.cpy1,i.cpx2,i.cpy2,i.x2,i.y2),i.orient==="vertical"?(t.lineTo(i.x2+n,i.y2),t.bezierCurveTo(i.cpx2+n,i.cpy2,i.cpx1+n,i.cpy1,i.x1+n,i.y1)):(t.lineTo(i.x2,i.y2+n),t.bezierCurveTo(i.cpx2,i.cpy2+n,i.cpx1,i.cpy1+n,i.x1,i.y1+n)),t.closePath()},e.prototype.highlight=function(){Bn(this)},e.prototype.downplay=function(){kn(this)},e}(ut),g0e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,i,n){var a=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),h=t.getData("edge"),p=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(d){var g=new v0e,m=rt(g);m.dataIndex=d.dataIndex,m.seriesIndex=t.seriesIndex,m.dataType="edge";var v=d.getModel(),_=v.getModel("lineStyle"),y=_.get("curveness"),x=d.node1.getLayout(),M=d.node1.getModel(),S=M.get("localX"),w=M.get("localY"),T=d.node2.getLayout(),C=d.node2.getModel(),b=C.get("localX"),E=C.get("localY"),I=d.getLayout(),R,A,D,U,B,F,k,G;g.shape.extent=Math.max(1,I.dy),g.shape.orient=p,p==="vertical"?(R=(S!=null?S*u:x.x)+I.sy,A=(w!=null?w*c:x.y)+x.dy,D=(b!=null?b*u:T.x)+I.ty,U=E!=null?E*c:T.y,B=R,F=A*(1-y)+U*y,k=D,G=A*y+U*(1-y)):(R=(S!=null?S*u:x.x)+x.dx,A=(w!=null?w*c:x.y)+I.sy,D=b!=null?b*u:T.x,U=(E!=null?E*c:T.y)+I.ty,B=R*(1-y)+D*y,F=A,k=R*y+D*(1-y),G=U),g.setShape({x1:R,y1:A,x2:D,y2:U,cpx1:B,cpy1:F,cpx2:k,cpy2:G}),g.useStyle(_.getItemStyle()),jY(g.style,p,d);var Y=""+v.get("value"),J=Tr(v,"edgeLabel");Nr(g,J,{labelFetcher:{getFormattedLabel:function(K,ae,ve,ue,se,Ee){return t.getFormattedLabel(K,ae,"edge",ue,Xi(se,J.normal&&J.normal.get("formatter"),Y),Ee)}},labelDataIndex:d.dataIndex,defaultText:Y}),g.setTextConfig({position:"inside"});var Q=v.getModel("emphasis");Gr(g,v,"lineStyle",function(K){var ae=K.getItemStyle();return jY(ae,p,d),ae}),s.add(g),h.setItemGraphicEl(d.dataIndex,g);var V=Q.get("focus");nr(g,V==="adjacency"?d.getAdjacentDataIndices():V==="trajectory"?d.getTrajectoryDataIndices():V,Q.get("blurScope"),Q.get("disabled"))}),o.eachNode(function(d){var g=d.getLayout(),m=d.getModel(),v=m.get("localX"),_=m.get("localY"),y=m.getModel("emphasis"),x=new Tt({shape:{x:v!=null?v*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy},style:m.getModel("itemStyle").getItemStyle(),z2:10});Nr(x,Tr(m),{labelFetcher:{getFormattedLabel:function(S,w){return t.getFormattedLabel(S,w,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),x.disableLabelAnimation=!0,x.setStyle("fill",d.getVisual("color")),x.setStyle("decal",d.getVisual("style").decal),Gr(x,m),s.add(x),f.setItemGraphicEl(d.dataIndex,x),rt(x).dataType="node";var M=y.get("focus");nr(x,M==="adjacency"?d.getAdjacentDataIndices():M==="trajectory"?d.getTrajectoryDataIndices():M,y.get("blurScope"),y.get("disabled"))}),f.eachItemGraphicEl(function(d,g){var m=f.getItemModel(g);m.get("draggable")&&(d.drift=function(v,_){a._focusAdjacencyDisabled=!0,this.shape.x+=v,this.shape.y+=_,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},d.ondragend=function(){a._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(y0e(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Yt);function jY(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var i=t.node1.getVisual("color"),n=t.node2.getVisual("color");Ce(i)&&Ce(n)&&(r.fill=new zl(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:i,offset:0},{color:n,offset:1}]))}}function y0e(r,e,t){var i=new Tt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return ar(i,{shape:{width:r.width+20}},e,t),i}var KY=g0e;var _0e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){var n=t.edges||t.links,a=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Zt(o[l],this,i));if(a&&n){var u=Px(a,n,this,!0,c);return u.data}function c(f,h){f.wrapMethod("getItemModel",function(p,d){var g=p.parentModel,m=g.getData().getItemLayout(d);if(m){var v=m.depth,_=g.levelModels[v];_&&(p.parentModel=_)}return p}),h.wrapMethod("getItemModel",function(p,d){var g=p.parentModel,m=g.getGraph().getEdgeByIndex(d),v=m.node1.getLayout();if(v){var _=v.depth,y=g.levelModels[_];y&&(p.parentModel=y)}return p})}},e.prototype.setNodePosition=function(t,i){var n=this.option.data||this.option.nodes,a=n[t];a.localX=i[0],a.localY=i[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,i,n){function a(p){return isNaN(p)||p==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Or("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,h=this.getDataParams(t,n).data.name;return Or("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,i){var n=r.prototype.getDataParams.call(this,t,i);if(n.value==null&&i==="node"){var a=this.getGraph().getNodeByIndex(t),o=a.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(jt),JY=_0e;function jN(r,e){r.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=x0e(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;M0e(u);var f=Wt(u,function(g){return g.getLayout().value===0}),h=f.length!==0?0:t.get("layoutIterations"),p=t.get("orient"),d=t.get("nodeAlign");S0e(u,c,i,n,o,s,h,p,d)})}function x0e(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function S0e(r,e,t,i,n,a,o,s,l){b0e(r,e,t,n,a,s,l),A0e(r,e,a,n,i,o,s),O0e(r,s)}function M0e(r){N(r,function(e){var t=qf(e.outEdges,NT),i=qf(e.inEdges,NT),n=e.getValue()||0,a=Math.max(t,i,n);e.setLayout({value:a},!0)})}function b0e(r,e,t,i,n,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:f},!0),a==="vertical"?g.setLayout({dy:t},!0):g.setLayout({dx:t},!0);for(var _=0;_f-1?p:f-1;o&&o!=="left"&&w0e(r,o,a,w);var T=a==="vertical"?(n-t)/w:(i-t)/w;E0e(r,T,a)}function $Y(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function w0e(r,e,t,i){if(e==="right"){for(var n=[],a=r,o=0;a.length;){for(var s=0;s0;a--)l*=.99,L0e(s,l,o),ZN(s,n,t,i,o),U0e(s,l,o),ZN(s,n,t,i,o)}function C0e(r,e){var t=[],i=e==="vertical"?"y":"x",n=a_(r,function(a){return a.getLayout()[i]});return n.keys.sort(function(a,o){return a-o}),N(n.keys,function(a){t.push(n.buckets.get(a))}),t}function R0e(r,e,t,i,n,a){var o=1/0;N(r,function(s){var l=s.length,u=0;N(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(i-(l-1)*n)/u:(t-(l-1)*n)/u;c0&&(s=l.getLayout()[a]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var d=n==="vertical"?i:t;if(u=c-e-d,u>0){s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var p=f-2;p>=0;--p)l=o[p],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function L0e(r,e,t){N(r.slice().reverse(),function(i){N(i,function(n){if(n.outEdges.length){var a=qf(n.outEdges,P0e,t)/qf(n.outEdges,NT);if(isNaN(a)){var o=n.outEdges.length;a=o?qf(n.outEdges,D0e,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(a-Zf(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(a-Zf(n,t))*e;n.setLayout({y:l},!0)}}})})}function P0e(r,e){return Zf(r.node2,e)*r.getValue()}function D0e(r,e){return Zf(r.node2,e)}function I0e(r,e){return Zf(r.node1,e)*r.getValue()}function N0e(r,e){return Zf(r.node1,e)}function Zf(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function NT(r){return r.getValue()}function qf(r,e,t){for(var i=0,n=r.length,a=-1;++ao&&(o=l)}),N(i,function(s){var l=new pi({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&N(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function JN(r){r.registerChartView(KY),r.registerSeriesModel(JY),r.registerLayout(jN),r.registerVisual(KN),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){i.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var UT=function(){function r(){}return r.prototype.getInitialData=function(e,t){var i,n=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",i=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",i=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],p=[n,a],d=p[c].get("type"),g=p[1-c].get("type"),m=e.data;if(m&&l){var v=[];N(m,function(x,M){var S;pe(x)?(S=x.slice(),x.unshift(M)):pe(x.value)?(S=fe({},x),S.value=S.value.slice(),x.value.unshift(M)):S=x,v.push(S)}),e.data=v}var _=this.defaultValueDimensions,y=[{name:f,type:Yp(d),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Yp(g),dimsDef:_.slice()}];return To(this,{coordDimensions:y,dimensionsCount:_.length+1,encodeDefaulter:ot(Lw,y,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}();var QY=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(jt);wr(QY,UT,!0);var eq=QY;var F0e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=tq(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(Ii(f),rq(h,f,a,u)):f=tq(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var i=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(a){a&&i.remove(a)})},e.type="boxplot",e}(Yt),z0e=function(){function r(){}return r}(),B0e=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i.type="boxplotBoxPath",i}return e.prototype.getDefaultShape=function(){return new z0e},e.prototype.buildPath=function(t,i){var n=i.points,a=0;for(t.moveTo(n[a][0],n[a][1]),a++;a<4;a++)t.lineTo(n[a][0],n[a][1]);for(t.closePath();ag){var x=[v,y];i.push(x)}}}return{boxData:t,outliers:i}}var nq={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ei){var i="";ur(i)}var n=QN(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function eU(r){r.registerSeriesModel(eq),r.registerChartView(iq),r.registerLayout($N),r.registerTransform(nq)}var W0e=["color","borderColor"],X0e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,i,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,i,n,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,i):this._incrementalRenderNormal(t,i)},e.prototype.eachRendered=function(t){sa(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var i=t.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},e.prototype._renderNormal=function(t){var i=t.getData(),n=this._data,a=this.group,o=i.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),i.diff(n).add(function(c){if(i.hasValue(c)){var f=i.getItemLayout(c);if(s&&aq(u,f))return;var h=tU(f,c,!0);ar(h,{shape:{points:f.ends}},t,c),rU(h,i,c,o),a.add(h),i.setItemGraphicEl(c,h)}}).update(function(c,f){var h=n.getItemGraphicEl(f);if(!i.hasValue(c)){a.remove(h);return}var p=i.getItemLayout(c);if(s&&aq(u,p)){a.remove(h);return}h?(Dt(h,{shape:{points:p.ends}},t,c),Ii(h)):h=tU(p,c),rU(h,i,c,o),a.add(h),i.setItemGraphicEl(c,h)}).remove(function(c){var f=n.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=i},e.prototype._renderLarge=function(t){this._clear(),oq(t,this.group);var i=t.get("clip",!0)?ql(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,i){for(var n=i.getData(),a=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=tU(s,o);rU(l,n,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,i){oq(i,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Yt),Y0e=function(){function r(){}return r}(),q0e=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i.type="normalCandlestickBox",i}return e.prototype.getDefaultShape=function(){return new Y0e},e.prototype.buildPath=function(t,i){var n=i.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(ut);function tU(r,e,t){var i=r.ends;return new q0e({shape:{points:t?Z0e(i,r):i},z2:100})}function aq(r,e){for(var t=!0,i=0;i0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(n=t.get(["itemStyle","borderColorDoji"]));var a=t.getModel("itemStyle").getItemStyle(W0e);e.useStyle(a),e.style.fill=null,e.style.stroke=n}var sq=X0e;var lq=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,i,n){var a=i.getItemLayout(t);return a&&n.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(jt);wr(lq,UT,!0);var uq=lq;function aU(r){!r||!pe(r.series)||N(r.series,function(e){qe(e)&&e.type==="k"&&(e.type="candlestick")})}var K0e=["itemStyle","borderColor"],J0e=["itemStyle","borderColor0"],$0e=["itemStyle","borderColorDoji"],Q0e=["itemStyle","color"],e_e=["itemStyle","color0"],t_e={seriesType:"candlestick",plan:Mo(),performRawSeries:!0,reset:function(r,e){function t(a,o){return o.get(a>0?Q0e:e_e)}function i(a,o){return o.get(a===0?$0e:a>0?K0e:J0e)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=i(u,l)||c.fill;var f=o.ensureUniqueItemVisual(s,"style");fe(f,c)}}}}}},cq=t_e;var r_e={seriesType:"candlestick",plan:Mo(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),i=i_e(r,t),n=0,a=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=de(t.mapDimensionsAll(o[a]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],h=l[3];if(t.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:p};function p(g,m){for(var v,_=m.getStore();(v=g.next())!=null;){var y=_.get(s,v),x=_.get(u,v),M=_.get(c,v),S=_.get(f,v),w=_.get(h,v),T=Math.min(x,M),C=Math.max(x,M),b=B(T,y),E=B(C,y),I=B(S,y),R=B(w,y),A=[];F(A,E,0),F(A,b,1),A.push(G(R),G(E),G(I),G(b));var D=m.getItemModel(v),U=!!D.get(["itemStyle","borderColorDoji"]);m.setItemLayout(v,{sign:fq(_,v,x,M,c,U),initBaseline:x>M?E[a]:b[a],ends:A,brushRect:k(S,w,y)})}function B(Y,J){var Q=[];return Q[n]=J,Q[a]=Y,isNaN(J)||isNaN(Y)?[NaN,NaN]:e.dataToPoint(Q)}function F(Y,J,Q){var V=J.slice(),K=J.slice();V[n]=S_(V[n]+i/2,1,!1),K[n]=S_(K[n]-i/2,1,!0),Q?Y.push(V,K):Y.push(K,V)}function k(Y,J,Q){var V=B(Y,Q),K=B(J,Q);return V[n]-=i/2,K[n]-=i/2,{x:V[0],y:V[1],width:a?i:K[0]-V[0],height:a?K[1]-V[1]:i}}function G(Y){return Y[n]=S_(Y[n],1),Y}}function d(g,m){for(var v=ca(g.count*4),_=0,y,x=[],M=[],S,w=m.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=g.next())!=null;){var C=w.get(s,S),b=w.get(u,S),E=w.get(c,S),I=w.get(f,S),R=w.get(h,S);if(isNaN(C)||isNaN(I)||isNaN(R)){v[_++]=NaN,_+=3;continue}v[_++]=fq(w,S,b,E,c,T),x[n]=C,x[a]=I,y=e.dataToPoint(x,null,M),v[_++]=y?y[0]:NaN,v[_++]=y?y[1]:NaN,x[a]=R,y=e.dataToPoint(x,null,M),v[_++]=y?y[1]:NaN}m.setLayout("largePoints",v)}}};function fq(r,e,t,i,n,a){var o;return t>i?o=-1:t0?r.get(n,e-1)<=i?1:-1:1,o}function i_e(r,e){var t=r.getBaseAxis(),i,n=t.type==="category"?t.getBandWidth():(i=t.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Fe(ft(r.get("barMaxWidth"),n),n),o=Fe(ft(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?Fe(s,n):Math.max(Math.min(n/2,a),o)}var hq=r_e;function oU(r){r.registerChartView(sq),r.registerSeriesModel(uq),r.registerPreprocessor(aU),r.registerVisual(cq),r.registerLayout(hq)}function pq(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(i){i.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var n_e=function(r){Z(e,r);function e(t,i){var n=r.call(this)||this,a=new ku(t,i),o=new Ze;return n.add(a),n.add(o),n.updateData(t,i),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var i=t.symbolType,n=t.color,a=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;He(f)?h=f(n):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,i,n,a,o){if(i>0){t.__t=0;var s=this,l=t.animate("",a).when(o?i*2:i,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});a||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Xo(t.__p1,t.__cp1)+Xo(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,i){t.__p1=i[0],t.__p2=i[1],t.__cp1=i[2]||[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]},e.prototype.updateData=function(t,i,n){this.childAt(0).updateData(t,i,n),this._updateEffectSymbol(t,i)},e.prototype._updateSymbolPosition=function(t){var i=t.__p1,n=t.__p2,a=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=vi,c=G0;s[0]=u(i[0],a[0],n[0],o),s[1]=u(i[1],a[1],n[1],o);var f=t.__t<1?c(i[0],a[0],n[0],o):c(n[0],a[0],i[0],1-o),h=t.__t<1?c(i[1],a[1],n[1],o):c(n[1],a[1],i[1],1-o);t.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(a[l]<=i);l--);l=Math.min(l,o-2)}else{for(l=s;li);l++);l=Math.min(l-1,o-2)}var c=(i-a[l])/(a[l+1]-a[l]),f=n[l],h=n[l+1];t.x=f[0]*(1-c)+c*h[0],t.y=f[1]*(1-c)+c*h[1];var p=t.__t<1?h[0]-f[0]:f[0]-h[0],d=t.__t<1?h[1]-f[1]:f[1]-h[1];t.rotation=-Math.atan2(d,p)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=i,t.ignore=!1}},e}(OT),gq=u_e;var c_e=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),f_e=function(r){Z(e,r);function e(t){var i=r.call(this,t)||this;return i._off=0,i.hoverDataIdx=-1,i}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new c_e},e.prototype.buildPath=function(t,i){var n=i.segs,a=i.curveness,o;if(i.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var p=(u+f)/2-(c-h)*a,d=(c+h)/2-(f-u)*a;t.quadraticCurveTo(p,d,f,h)}else t.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,i){var n=this.shape,a=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],p=1;p0){var m=(f+d)/2-(h-g)*o,v=(h+g)/2-(d-f)*o;if(Zb(f,h,m,v,d,g,s,t,i))return l}else if(Ul(f,h,d,g,s,t,i))return l;l++}return-1},e.prototype.contain=function(t,i){var n=this.transformCoordToLocal(t,i),a=this.getBoundingRect();if(t=n[0],i=n[1],a.contain(t,i)){var o=this.hoverDataIdx=this.findDataIndex(t,i);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var i=this.shape,n=i.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),yq=h_e;var p_e={seriesType:"lines",plan:Mo(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),i=r.pipelineContext.large;return{progress:function(n,a){var o=[];if(i){var s=void 0,l=n.end-n.start;if(t){for(var u=0,c=n.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=t.get("clip",!0)&&ql(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,i,n){var a=t.getData(),o=this._updateLineDraw(a,t);o.incrementalPrepareUpdate(a),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,i,n){this._lineDraw.incrementalUpdate(t,i.getData()),this._finished=t.end===i.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,i,n){var a=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=zT.reset(t,i,n);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,i){var n=this._lineDraw,a=this._showEffect(i),o=!!i.get("polyline"),s=i.pipelineContext,l=s.large;return(!n||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new yq:new Fv(o?a?gq:FT:a?OT:Ov),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var i=t.getZr(),n=i.painter.getType()==="svg";!n&&this._lastZlevel!=null&&i.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,i){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(i)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.type="lines",e}(Yt),_q=d_e;var m_e=typeof Uint32Array>"u"?Array:Uint32Array,v_e=typeof Float64Array>"u"?Array:Float64Array;function xq(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=de(e,function(t){var i=[t[0].coord,t[1].coord],n={coords:i};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),Sm([n,t[0],t[1]])}))}var g_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],xq(t);var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(xq(t),t.data){var i=this._processFlatCoordsArray(t.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(t.data=new Float32Array(i.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var i=this._processFlatCoordsArray(t.data);i.flatCoords&&(this._flatCoords?(this._flatCoords=ep(this._flatCoords,i.flatCoords),this._flatCoordsOffset=ep(this._flatCoordsOffset,i.flatCoordsOffset)):(this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset),t.data=new Float32Array(i.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var i=this.getData().getItemModel(t),n=i.option instanceof Array?i.option:i.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,i){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],o=0;on}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,i){if(0)var n;var a=new ti(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(o,s,l,u){if(o instanceof Array)return NaN;a.hasItemOption=!0;var c=o.value;if(c!=null)return c instanceof Array?c[u]:c}),a},e.prototype.formatTooltip=function(t,i,n){var a=this.getData(),o=a.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Or("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),i=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&i>0?i+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(jt),Sq=g_e;function BT(r){return r instanceof Array||(r=[r,r]),r}var y_e={seriesType:"lines",reset:function(r){var e=BT(r.get("symbol")),t=BT(r.get("symbolSize")),i=r.getData();i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",t&&t[0]),i.setVisual("toSymbolSize",t&&t[1]);function n(a,o){var s=a.getItemModel(o),l=BT(s.getShallow("symbol",!0)),u=BT(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:i.hasItemOption?n:null}}},Mq=y_e;function lU(r){r.registerChartView(_q),r.registerSeriesModel(Sq),r.registerLayout(zT),r.registerVisual(Mq)}var __e=256,x_e=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=zn.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,i,n,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),p=e.length;f.width=t,f.height=i;for(var d=0;d0){var I=o(y)?l:u;y>0&&(y=y*b+T),M[S++]=I[E],M[S++]=I[E+1],M[S++]=I[E+2],M[S++]=I[E+3]*y*256}else S+=4}return h.putImageData(x,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=zn.createCanvas()),t=this.pointSize+this.blurSize,i=t*2;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var i=this._gradientPixels,n=i[t]||(i[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,a),n[o++]=a[0],n[o++]=a[1],n[o++]=a[2],n[o++]=a[3];return n},r}(),bq=x_e;function S_e(r,e,t){var i=r[1]-r[0];e=de(e,function(o){return{interval:[(o.interval[0]-r[0])/i,(o.interval[1]-r[0])/i]}});var n=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&i<=e[1]}}function wq(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var b_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a;i.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):wq(o)&&this._renderOnGeo(o,t,a,n)},e.prototype.incrementalPrepareRender=function(t,i,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,i,n,a){var o=i.coordinateSystem;o&&(wq(o)?this.render(i,n,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(i,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){sa(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,i,n,a,o){var s=t.coordinateSystem,l=ls(s,"cartesian2d"),u,c,f,h;if(l){var p=s.getAxis("x"),d=s.getAxis("y");u=p.getBandWidth()+.5,c=d.getBandWidth()+.5,f=p.scale.getExtent(),h=d.scale.getExtent()}for(var g=this.group,m=t.getData(),v=t.getModel(["emphasis","itemStyle"]).getItemStyle(),_=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),M=Tr(t),S=t.getModel("emphasis"),w=S.get("focus"),T=S.get("blurScope"),C=S.get("disabled"),b=l?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],E=n;Ef[1]||Dh[1])continue;var U=s.dataToPoint([A,D]);I=new Tt({shape:{x:U[0]-u/2,y:U[1]-c/2,width:u,height:c},style:R})}else{if(isNaN(m.get(b[1],E)))continue;I=new Tt({z2:1,shape:s.dataToRect([m.get(b[0],E)]).contentShape,style:R})}if(m.hasItemOption){var B=m.getItemModel(E),F=B.getModel("emphasis");v=F.getModel("itemStyle").getItemStyle(),_=B.getModel(["blur","itemStyle"]).getItemStyle(),y=B.getModel(["select","itemStyle"]).getItemStyle(),x=B.get(["itemStyle","borderRadius"]),w=F.get("focus"),T=F.get("blurScope"),C=F.get("disabled"),M=Tr(B)}I.shape.r=x;var k=t.getRawValue(E),G="-";k&&k[2]!=null&&(G=k[2]+""),Nr(I,M,{labelFetcher:t,labelDataIndex:E,defaultOpacity:R.opacity,defaultText:G}),I.ensureState("emphasis").style=v,I.ensureState("blur").style=_,I.ensureState("select").style=y,nr(I,w,T,C),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),g.add(I),m.setItemGraphicEl(E,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,i,n,a){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=i.getData(),u=this._hmLayer||this._hmLayer||new bq;u.blurSize=i.get("blurSize"),u.pointSize=i.get("pointSize"),u.minOpacity=i.get("minOpacity"),u.maxOpacity=i.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),p=Math.max(c.y,0),d=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=d-h,v=g-p,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],y=l.mapArray(_,function(w,T,C){var b=t.dataToPoint([w,T]);return b[0]-=h,b[1]-=p,b.push(C),b}),x=n.getExtent(),M=n.type==="visualMap.continuous"?M_e(x,n.option.range):S_e(x,n.getPieceList(),n.option.selected);u.update(y,m,v,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},M);var S=new Ur({style:{width:m,height:v,x:h,y:p,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(Yt),Tq=b_e;var w_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,i){return hn(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Uu.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(jt),Eq=w_e;function uU(r){r.registerChartView(Tq),r.registerSeriesModel(Eq)}var T_e=["itemStyle","borderWidth"],Aq=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],cU=new oa,E_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:Aq[+c],categoryDim:Aq[1-+c]};o.diff(s).add(function(d){if(o.hasValue(d)){var g=Rq(o,d),m=Cq(o,d,g,h),v=Lq(o,h,m);o.setItemGraphicEl(d,v),a.add(v),Dq(v,h,m)}}).update(function(d,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(d)){a.remove(m);return}var v=Rq(o,d),_=Cq(o,d,v,h),y=Bq(o,_);m&&y!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(d,null),m=null),m?I_e(m,h,_):m=Lq(o,h,_,!0),o.setItemGraphicEl(d,m),m.__pictorialSymbolMeta=_,a.add(m),Dq(m,h,_)}).remove(function(d){var g=s.getItemGraphicEl(d);g&&Pq(s,d,g.__pictorialSymbolMeta.animationModel,g)}).execute();var p=t.get("clip",!0)?ql(t.coordinateSystem,!1,t):null;return p?a.setClipPath(p):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,i){var n=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){Pq(a,rt(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Yt);function Cq(r,e,t,i){var n=r.getItemLayout(e),a=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};A_e(t,a,n,i,h),C_e(r,e,n,a,o,h.boundingLength,h.pxSign,c,i,h),R_e(t,h.symbolScale,u,i,h);var p=h.symbolSize,d=bo(t.get("symbolOffset"),p);return L_e(t,p,n,a,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function A_e(r,e,t,i,n){var a=i.valueDim,o=r.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if(pe(o)){var f=[fU(s,o[0])-l,fU(s,o[1])-l];f[1]0?1:-1}function fU(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function C_e(r,e,t,i,n,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),p=r.getItemVisual(e,"symbolSize"),d;pe(p)?d=p.slice():p==null?d=["100%","100%"]:d=[p,p],d[f.index]=Fe(d[f.index],h),d[c.index]=Fe(d[c.index],i?h:Math.abs(a)),u.symbolSize=d;var g=u.symbolScale=[d[0]/s,d[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function R_e(r,e,t,i,n){var a=r.get(T_e)||0;a&&(cU.attr({scaleX:e[0],scaleY:e[1],rotation:t}),cU.updateTransform(),a/=cU.getLineScale(),a*=e[i.valueDim.index]),n.valueLineWidth=a||0}function L_e(r,e,t,i,n,a,o,s,l,u,c,f){var h=c.categoryDim,p=c.valueDim,d=f.pxSign,g=Math.max(e[p.index]+s,0),m=g;if(i){var v=Math.abs(l),_=Br(r.get("symbolMargin"),"15%")+"",y=!1;_.lastIndexOf("!")===_.length-1&&(y=!0,_=_.slice(0,_.length-1));var x=Fe(_,e[p.index]),M=Math.max(g+x*2,0),S=y?0:x*2,w=yp(i),T=w?i:Iq((v+S)/M),C=v-T*g;x=C/2/(y?T:Math.max(T-1,1)),M=g+x*2,S=y?0:x*2,!w&&i!=="fixed"&&(T=u?Iq((Math.abs(u)+S)/M):0),m=T*M-S,f.repeatTimes=T,f.symbolMargin=x}var b=d*(m/2),E=f.pathPosition=[];E[h.index]=t[h.wh]/2,E[p.index]=o==="start"?b:o==="end"?l-b:l/2,a&&(E[0]+=a[0],E[1]+=a[1]);var I=f.bundlePosition=[];I[h.index]=t[h.xy],I[p.index]=t[p.xy];var R=f.barRectShape=fe({},t);R[p.wh]=d*Math.max(Math.abs(t[p.wh]),Math.abs(E[p.index]+b)),R[h.wh]=t[h.wh];var A=f.clipShape={};A[h.xy]=-t[h.xy],A[h.wh]=c.ecSize[h.wh],A[p.xy]=0,A[p.wh]=t[p.wh]}function Nq(r){var e=r.symbolPatternSize,t=Sr(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function Uq(r,e,t,i){var n=r.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+t.symbolMargin*2;for(hU(r,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:v<0)&&(_=u-1-g),m[l.index]=f*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function Oq(r,e,t,i){var n=r.__pictorialBundle,a=r.__pictorialMainPath;a?Hv(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,i):(a=r.__pictorialMainPath=Nq(t),n.add(a),Hv(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,i))}function Fq(r,e,t){var i=fe({},e.barRectShape),n=r.__pictorialBarRect;n?Hv(n,null,{shape:i},e,t):(n=r.__pictorialBarRect=new Tt({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function zq(r,e,t,i){if(t.symbolClip){var n=r.__pictorialClipPath,a=fe({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)Dt(n,{shape:a},s,l);else{a[o.wh]=0,n=new Tt({shape:a}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],Ct[i?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Rq(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=P_e,t.isAnimationEnabled=D_e,t}function P_e(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function D_e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Lq(r,e,t,i){var n=new Ze,a=new Ze;return n.add(a),n.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?Uq(n,e,t):Oq(n,e,t),Fq(n,t,i),zq(n,e,t,i),n.__pictorialShapeStr=Bq(r,t),n.__pictorialSymbolMeta=t,n}function I_e(r,e,t){var i=t.animationModel,n=t.dataIndex,a=r.__pictorialBundle;Dt(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},i,n),t.symbolRepeat?Uq(r,e,t,!0):Oq(r,e,t,!0),Fq(r,t,!0),zq(r,e,t,!0)}function Pq(r,e,t,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];hU(i,function(o){a.push(o)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(t=null),N(a,function(o){es(o,{scaleX:0,scaleY:0},t,e,function(){i.parent&&i.parent.remove(i)})}),r.setItemGraphicEl(e,null)}function Bq(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function hU(r,e,t){N(r.__pictorialBundle.children(),function(i){i!==r.__pictorialBarRect&&e.call(t,i)})}function Hv(r,e,t,i,n,a){e&&r.attr(e),i.symbolClip&&!n?t&&r.attr(t):t&&Ct[n?"updateProps":"initProps"](r,t,i.animationModel,i.dataIndex,a)}function Dq(r,e,t){var i=t.dataIndex,n=t.itemModel,a=n.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");hU(r,function(g){if(g instanceof Ur){var m=g.style;g.useStyle(fe({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},t.style))}else g.useStyle(t.style);var v=g.ensureState("emphasis");v.style=o,h&&(v.scaleX=g.scaleX*1.1,v.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=t.z2});var p=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Nr(d,Tr(n),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:Qs(e.seriesModel.getData(),i),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:p}),nr(r,c,f,a.get("disabled"))}function Iq(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var kq=E_e;var N_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Hn(wv.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(wv),Vq=N_e;function pU(r){r.registerChartView(kq),r.registerSeriesModel(Vq),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ot(S1,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,M1("pictorialBar"))}var U_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,i,n){var a=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var p=new An(this._layersSeries||[],l,h,h),d=[];p.add(Be(g,this,"add")).update(Be(g,this,"update")).remove(Be(g,this,"remove")).execute();function g(m,v,_){var y=o._layers;if(m==="remove"){s.remove(y[v]);return}for(var x=[],M=[],S,w=l[v].indices,T=0;Ta&&(a=s),i.push(s)}for(var u=0;ua&&(a=f)}return{y0:n,max:a}}function vU(r){r.registerChartView(Gq),r.registerSeriesModel(Hq),r.registerLayout(mU),r.registerProcessor(tl("themeRiver"))}var B_e=2,k_e=4,V_e=function(r){Z(e,r);function e(t,i,n,a){var o=r.call(this)||this;o.z2=B_e,o.textConfig={inside:!0},rt(o).seriesIndex=i.seriesIndex;var s=new Lt({z2:k_e,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,i,n,a),o}return e.prototype.updateData=function(t,i,n,a,o){this.node=i,i.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var s=this;rt(s).dataIndex=i.dataIndex;var l=i.getModel(),u=l.getModel("emphasis"),c=i.getLayout(),f=fe({},c);f.label=null;var h=i.getVisual("style");h.lineJoin="bevel";var p=i.getVisual("decal");p&&(h.decal=Zs(p,o));var d=Zl(l.getModel("itemStyle"),f,!0);fe(f,d),N(Bi,function(_){var y=s.ensureState(_),x=l.getModel([_,"itemStyle"]);y.style=x.getItemStyle();var M=Zl(x,f);M&&(y.shape=M)}),t?(s.setShape(f),s.shape.r=c.r0,ar(s,{shape:{r:c.r}},n,i.dataIndex)):(Dt(s,{shape:f},n),Ii(s)),s.useStyle(h),this._updateLabel(n);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),v=m==="ancestor"?i.getAncestorsIndices():m==="descendant"?i.getDescendantIndices():m;nr(this,v,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var i=this,n=this.node.getModel(),a=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),p=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(d!=null&&Math.abs(s)A&&!Su(U-A)&&U0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,t,i,n):(o.virtualPiece=new gU(_,t,i,n),c.add(o.virtualPiece)),y.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(y.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(i){var n=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(o){if(!n&&o.piece&&o.piece===i.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";kp(u,c)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:kT,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(Yt),qq=H_e;var W_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,i){var n={name:t.name,children:t.data};Zq(n);var a=this._levelModels=de(t.levels||[],function(l){return new Zt(l,this,i)},this),o=Lv.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var i=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return i.treePathInfo=Yf(n,this),i},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var i=this.getRawData().tree.root;(!t||t!==i&&!i.contains(t))&&(this._viewRoot=i)},e.prototype.enableAriaDecal=function(){Sx(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(jt);function Zq(r){var e=0;N(r.children,function(i){Zq(i);var n=i.value;pe(n)&&(n=n[0]),e+=n});var t=r.value;pe(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),pe(r.value)?r.value[0]=t:r.value=t}var jq=W_e;var Kq=Math.PI/180;function yU(r,e,t){e.eachSeriesByType(r,function(i){var n=i.get("center"),a=i.get("radius");pe(a)||(a=[0,a]),pe(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=Fe(n[0],o),c=Fe(n[1],s),f=Fe(a[0],l/2),h=Fe(a[1],l/2),p=-i.get("startAngle")*Kq,d=i.get("minAngle")*Kq,g=i.getData().tree.root,m=i.getViewRoot(),v=m.depth,_=i.get("sort");_!=null&&Jq(m,_);var y=0;N(m.children,function(U){!isNaN(U.getValue())&&y++});var x=m.getValue(),M=Math.PI/(x||y)*2,S=m.depth>0,w=m.height-(S?-1:1),T=(h-f)/(w||1),C=i.get("clockwise"),b=i.get("stillShowZeroSum"),E=C?1:-1,I=function(U,B){if(U){var F=B;if(U!==g){var k=U.getValue(),G=x===0&&b?M:k*M;G1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return i.depth>1&&Ce(s)&&(s=Sb(s,(i.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(i){var n=i.getData(),a=n.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,i,a.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");fe(u,l)})})}function xU(r){r.registerChartView(qq),r.registerSeriesModel(jq),r.registerLayout(ot(yU,"sunburst")),r.registerProcessor(ot(tl,"sunburst")),r.registerVisual(_U),Yq(r)}var SU={color:"fill",borderColor:"stroke"},$q={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Jl=vt(),Y_e=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,i){return hn(null,this)},e.prototype.getDataParams=function(t,i,n){var a=r.prototype.getDataParams.call(this,t,i);return n&&(a.info=Jl(n).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(jt),Qq=Y_e;function q_e(r,e){return e=e||[0,0],de(["x","y"],function(t,i){var n=this.getAxis(t),a=e[i],o=r[i]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(a-o)-n.dataToCoord(a+o))},this)}function MU(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Be(q_e,r)}}}function Z_e(r,e){return e=e||[0,0],de([0,1],function(t){var i=e[t],n=r[t]/2,a=[],o=[];return a[t]=i-n,o[t]=i+n,a[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(o)[t])},this)}function bU(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Be(Z_e,r)}}}function j_e(r,e){var t=this.getAxis(),i=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(i-n)-t.dataToCoord(i+n))}function wU(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Be(j_e,r)}}}function K_e(r,e){return e=e||[0,0],de(["Radius","Angle"],function(t,i){var n="get"+t+"Axis",a=this[n](),o=e[i],s=r[i]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function TU(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),i=e.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:i[1],r0:i[0]},api:{coord:function(n){var a=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Be(K_e,r)}}}function EU(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(i,n){return r.dataToPoint(i,n)}}}}function VT(r,e,t,i){return r&&(r.legacy||r.legacy!==!1&&!t&&!i&&e!=="tspan"&&(e==="text"||tt(r,"text")))}function GT(r,e,t){var i=r,n,a,o;if(e==="text")o=i;else{o={},tt(i,"text")&&(o.text=i.text),tt(i,"rich")&&(o.rich=i.rich),tt(i,"textFill")&&(o.fill=i.textFill),tt(i,"textStroke")&&(o.stroke=i.textStroke),tt(i,"fontFamily")&&(o.fontFamily=i.fontFamily),tt(i,"fontSize")&&(o.fontSize=i.fontSize),tt(i,"fontStyle")&&(o.fontStyle=i.fontStyle),tt(i,"fontWeight")&&(o.fontWeight=i.fontWeight),a={type:"text",style:o,silent:!0},n={};var s=tt(i,"textPosition");t?n.position=s?i.textPosition:"inside":s&&(n.position=i.textPosition),tt(i,"textPosition")&&(n.position=i.textPosition),tt(i,"textOffset")&&(n.offset=i.textOffset),tt(i,"textRotation")&&(n.rotation=i.textRotation),tt(i,"textDistance")&&(n.distance=i.textDistance)}return eZ(o,r),N(o.rich,function(l){eZ(l,l)}),{textConfig:n,textContent:a}}function eZ(r,e){e&&(e.font=e.textFont||e.font,tt(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),tt(e,"textAlign")&&(r.align=e.textAlign),tt(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),tt(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),tt(e,"textWidth")&&(r.width=e.textWidth),tt(e,"textHeight")&&(r.height=e.textHeight),tt(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),tt(e,"textPadding")&&(r.padding=e.textPadding),tt(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),tt(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),tt(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),tt(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),tt(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),tt(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),tt(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function AU(r,e,t){var i=r;i.textPosition=i.textPosition||t.position||"inside",t.offset!=null&&(i.textOffset=t.offset),t.rotation!=null&&(i.textRotation=t.rotation),t.distance!=null&&(i.textDistance=t.distance);var n=i.textPosition.indexOf("inside")>=0,a=r.fill||"#000";tZ(i,e);var o=i.textFill==null;return n?o&&(i.textFill=t.insideFill||"#fff",!i.textStroke&&t.insideStroke&&(i.textStroke=t.insideStroke),!i.textStroke&&(i.textStroke=a),i.textStrokeWidth==null&&(i.textStrokeWidth=2)):(o&&(i.textFill=r.fill||t.outsideFill||"#000"),!i.textStroke&&t.outsideStroke&&(i.textStroke=t.outsideStroke)),i.text=e.text,i.rich=e.rich,N(e.rich,function(s){tZ(s,s)}),i}function tZ(r,e){e&&(tt(e,"fill")&&(r.textFill=e.fill),tt(e,"stroke")&&(r.textStroke=e.fill),tt(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),tt(e,"font")&&(r.font=e.font),tt(e,"fontStyle")&&(r.fontStyle=e.fontStyle),tt(e,"fontWeight")&&(r.fontWeight=e.fontWeight),tt(e,"fontSize")&&(r.fontSize=e.fontSize),tt(e,"fontFamily")&&(r.fontFamily=e.fontFamily),tt(e,"align")&&(r.textAlign=e.align),tt(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),tt(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),tt(e,"width")&&(r.textWidth=e.width),tt(e,"height")&&(r.textHeight=e.height),tt(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),tt(e,"padding")&&(r.textPadding=e.padding),tt(e,"borderColor")&&(r.textBorderColor=e.borderColor),tt(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),tt(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),tt(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),tt(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),tt(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),tt(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),tt(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),tt(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),tt(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),tt(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var aZ={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},rZ=bt(aZ),_st=gn(go,function(r,e){return r[e]=1,r},{}),xst=go.join(", "),Ux=["","style","shape","extra"],Wv=vt();function CU(r,e,t,i,n){var a=r+"Animation",o=Bl(r,i,n)||{},s=Wv(e).userDuring;return o.duration>0&&(o.during=s?Be(txe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),fe(o,t[a]),o}function Xv(r,e,t,i){i=i||{};var n=i.dataIndex,a=i.isInit,o=i.clearStyle,s=t.isAnimationEnabled(),l=Wv(r),u=e.style;l.userDuring=e.during;var c={},f={};if(ixe(r,e,f),nZ("shape",e,f),nZ("extra",e,f),!a&&s&&(rxe(r,e,c),iZ("shape",r,e,c),iZ("extra",r,e,c),nxe(r,e,u,c)),f.style=u,J_e(r,f,o),Q_e(r,e),s)if(a){var h={};N(Ux,function(d){var g=d?e[d]:e;g&&g.enterFrom&&(d&&(h[d]=h[d]||{}),fe(d?h[d]:h,g.enterFrom))});var p=CU("enter",r,e,t,n);p.duration>0&&r.animateFrom(h,p)}else $_e(r,e,n||0,t,c);RU(r,e),u?r.dirty():r.markRedraw()}function RU(r,e){for(var t=Wv(r).leaveToProps,i=0;i0&&r.animateFrom(n,a)}}function Q_e(r,e){tt(e,"silent")&&(r.silent=e.silent),tt(e,"ignore")&&(r.ignore=e.ignore),r instanceof gi&&tt(e,"invisible")&&(r.invisible=e.invisible),r instanceof ut&&tt(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var $l={},exe={setTransform:function(r,e){return $l.el[r]=e,this},getTransform:function(r){return $l.el[r]},setShape:function(r,e){var t=$l.el,i=t.shape||(t.shape={});return i[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=$l.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=$l.el,i=t.style;return i&&(i[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=$l.el.style;if(e)return e[r]},setExtra:function(r,e){var t=$l.el.extra||($l.el.extra={});return t[r]=e,this},getExtra:function(r){var e=$l.el.extra;if(e)return e[r]}};function txe(){var r=this,e=r.el;if(e){var t=Wv(e).userDuring,i=r.userDuring;if(t!==i){r.el=r.userDuring=null;return}$l.el=e,i(exe)}}function iZ(r,e,t,i){var n=t[r];if(n){var a=e[r],o;if(a){var s=t.transition,l=n.transition;if(l)if(!o&&(o=i[r]={}),jf(l))fe(o,a);else for(var u=Jt(l),c=0;c=0){!o&&(o=i[r]={});for(var p=bt(a),c=0;c=0)){var h=r.getAnimationStyleProps(),p=h?h.style:null;if(p){!a&&(a=i.style={});for(var d=bt(t),u=0;u=0?e.getStore().get(B,D):void 0}var F=e.get(U.name,D),k=U&&U.ordinalMeta;return k?k.categories[F]:F}function S(A,D){D==null&&(D=u);var U=e.getItemVisual(D,"style"),B=U&&U.fill,F=U&&U.opacity,k=_(D,Kf).getItemStyle();B!=null&&(k.fill=B),F!=null&&(k.opacity=F);var G={inheritColor:Ce(B)?B:"#000"},Y=y(D,Kf),J=fr(Y,null,G,!1,!0);J.text=Y.getShallow("show")?ft(r.getFormattedLabel(D,Kf),Qs(e,D)):null;var Q=M_(Y,G,!1);return C(A,k),k=AU(k,J,Q),A&&T(k,A),k.legacy=!0,k}function w(A,D){D==null&&(D=u);var U=_(D,Wu).getItemStyle(),B=y(D,Wu),F=fr(B,null,null,!0,!0);F.text=B.getShallow("show")?Xi(r.getFormattedLabel(D,Wu),r.getFormattedLabel(D,Kf),Qs(e,D)):null;var k=M_(B,null,!0);return C(A,U),U=AU(U,F,k),A&&T(U,A),U.legacy=!0,U}function T(A,D){for(var U in D)tt(D,U)&&(A[U]=D[U])}function C(A,D){A&&(A.textFill&&(D.textFill=A.textFill),A.textPosition&&(D.textPosition=A.textPosition))}function b(A,D){if(D==null&&(D=u),tt(SU,A)){var U=e.getItemVisual(D,"style");return U?U[SU[A]]:null}if(tt($q,A))return e.getItemVisual(D,A)}function E(A){if(a.type==="cartesian2d"){var D=a.getBaseAxis();return K6(Ye({axis:D},A))}}function I(){return t.getCurrentSeriesIndices()}function R(A){return iv(A,t)}}function dxe(r){var e={};return N(r.dimensions,function(t){var i=r.getDimensionInfo(t);if(!i.isExtraCoord){var n=i.coordDim,a=e[n]=e[n]||[];a[i.coordDimIndex]=r.getDimensionIndex(t)}}),e}function DU(r,e,t,i,n,a,o){if(!i){a.remove(e);return}var s=BU(r,e,t,i,n,a);return s&&o.setItemGraphicEl(t,s),s&&nr(s,i.focus,i.blurScope,i.emphasisDisabled),s}function BU(r,e,t,i,n,a){var o=-1,s=e;e&&pZ(e,i,n)&&(o=dt(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=FU(i),s&&cxe(s,u)),i.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),hs.normal.cfg=hs.normal.conOpt=hs.emphasis.cfg=hs.emphasis.conOpt=hs.blur.cfg=hs.blur.conOpt=hs.select.cfg=hs.select.conOpt=null,hs.isLegacy=!1,vxe(u,t,i,n,l,hs),mxe(u,t,i,n,l),zU(r,u,t,i,hs,n,l),tt(i,"info")&&(Jl(u).info=i.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function pZ(r,e,t){var i=Jl(r),n=e.type,a=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==i.customGraphicType||n==="path"&&Sxe(a)&&dZ(a)!==i.customPathData||n==="image"&&tt(o,"image")&&o.image!==i.customImagePath}function mxe(r,e,t,i,n){var a=t.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&pZ(o,a,i)&&(o=null),o||(o=FU(a),r.setClipPath(o)),zU(null,o,e,a,null,i,n)}}function vxe(r,e,t,i,n,a){if(!r.isGroup){lZ(t,null,a),lZ(t,Wu,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=FU(o),r.setTextContent(c)),zU(null,c,e,o,null,i,n);for(var f=o&&o.style,h=0;h=c;p--){var d=e.childAt(p);yxe(e,d,n)}}}function yxe(r,e,t){e&&Yv(e,Jl(r).option,t)}function _xe(r){new An(r.oldChildren,r.newChildren,uZ,uZ,r).add(cZ).update(cZ).remove(xxe).execute()}function uZ(r,e){var t=r&&r.name;return t??lxe+e}function cZ(r,e){var t=this.context,i=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;BU(t.api,n,t.dataIndex,i,t.seriesModel,t.group)}function xxe(r){var e=this.context,t=e.oldChildren[r];t&&Yv(t,Jl(t).option,e.seriesModel)}function dZ(r){return r&&(r.pathData||r.d)}function Sxe(r){return r&&(tt(r,"pathData")||tt(r,"d"))}function VU(r){r.registerChartView(fZ),r.registerSeriesModel(Qq)}var cd=vt(),mZ=Qe,GU=Be,Mxe=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,i,n){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new Ze,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),i.getZr().add(s);else{var h=ot(vZ,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}yZ(s,t,!0),this._renderHandle(a)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var i=t.get("animation"),n=e.axis,a=n.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=oT(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(e,t,i,n,a){},r.prototype.createPointerEl=function(e,t,i,n){var a=t.pointer;if(a){var o=cd(e).pointerEl=new Ct[a.type](mZ(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,i,n){if(t.label){var a=cd(e).labelEl=new Lt(mZ(t.label));e.add(a),gZ(a,n)}},r.prototype.updatePointerEl=function(e,t,i){var n=cd(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),i(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,i,n){var a=cd(e).labelEl;a&&(a.setStyle(t.label.style),i(a,{x:t.label.x,y:t.label.y}),gZ(a,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=Pu(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Ea(u.event)},onmousedown:GU(this._onHandleDragMove,this,0,0),drift:GU(this._onHandleDragMove,this),ondragend:GU(this._onHandleDragEnd,this)}),i.add(n)),yZ(n,t,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");pe(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,as(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){vZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HU(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(HU(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(HU(n)),cd(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,n=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),zu(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,i){return i=i||0,{x:e[i],y:e[1-i],width:t[i],height:t[1-i]}},r}();function vZ(r,e,t,i){_Z(cd(t).lastProp,i)||(cd(t).lastProp=i,e?Dt(t,i,r):(t.stopAnimation(),t.attr(i)))}function _Z(r,e){if(qe(r)&&qe(e)){var t=!0;return N(e,function(i,n){t=t&&_Z(r[n],i)}),!!t}else return r===e}function gZ(r,e){r[e.get(["label","show"])?"show":"hide"]()}function HU(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function yZ(r,e,t){var i=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=t)})}var Zv=Mxe;function jv(r){var e=r.get("type"),t=r.getModel(e+"Style"),i;return e==="line"?(i=t.getLineStyle(),i.fill=null):e==="shadow"&&(i=t.getAreaStyle(),i.stroke=null),i}function WU(r,e,t,i,n){var a=t.get("value"),o=XU(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Gs(s.get("padding")||0),u=s.getFont(),c=Ll(o,u),f=n.position,h=c.width+l[1]+l[3],p=c.height+l[0]+l[2],d=n.align;d==="right"&&(f[0]-=h),d==="center"&&(f[0]-=h/2);var g=n.verticalAlign;g==="bottom"&&(f[1]-=p),g==="middle"&&(f[1]-=p/2),bxe(f,h,p,i);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:fr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function bxe(r,e,t,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function XU(r,e,t,i,n){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:ox(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(i,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),Ce(o)?a=o.replace("{value}",a):He(o)&&(a=o(s))}return a}function Ox(r,e,t){var i=wi();return Ca(i,i,t.rotation),_n(i,i,t.position),wn([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],i)}function XT(r,e,t,i,n,a){var o=Cn.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),WU(e,i,n,a,{position:Ox(i.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Kv(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function YT(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function YU(r,e,t,i,n,a){return{cx:r,cy:e,r0:t,r:i,startAngle:n,endAngle:a,clockwise:!0}}var wxe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),c=xZ(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var h=jv(a),p=Txe[u](s,f,c);p.style=h,t.graphicKey=p.type,t.pointer=p}var d=gx(l.model,n);XT(i,t,d,n,a,o)},e.prototype.getHandleTransform=function(t,i,n){var a=gx(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Ox(i.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=xZ(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=i[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,p=[h,h];p[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:p,tooltipOption:d[c]}},e}(Zv);function xZ(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Txe={line:function(r,e,t){var i=Kv([e,t[0]],[e,t[1]],SZ(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:YT([e-i/2,t[0]],[i,n],SZ(r))}}};function SZ(r){return r.dim==="x"?0:1}var MZ=wxe;var Exe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Pt),bZ=Exe;var Xu=vt(),Axe=N;function ZT(r,e,t){if(!Ft.node){var i=e.getZr();Xu(i).records||(Xu(i).records={}),Cxe(i,e);var n=Xu(i).records[r]||(Xu(i).records[r]={});n.handler=t}}function Cxe(r,e){if(Xu(r).initialized)return;Xu(r).initialized=!0,t("click",ot(wZ,"click")),t("mousemove",ot(wZ,"mousemove")),t("globalout",Lxe);function t(i,n){r.on(i,function(a){var o=Pxe(e);Axe(Xu(r).records,function(s){s&&n(s,a,o.dispatchAction)}),Rxe(o.pendings,e)})}}function Rxe(r,e){var t=r.showTip.length,i=r.hideTip.length,n;t?n=r.showTip[t-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function Lxe(r,e,t){r.handler("leave",null,t)}function wZ(r,e,t,i){e.handler(r,t,i)}function Pxe(r){var e={showTip:[],hideTip:[]},t=function(i){var n=e[i.type];n?n.push(i):(i.dispatchAction=t,r.dispatchAction(i))};return{dispatchAction:t,pendings:e}}function Fx(r,e){if(!Ft.node){var t=e.getZr(),i=(Xu(t).records||{})[r];i&&(Xu(t).records[r]=null)}}var Dxe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=i.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";ZT("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,i){Fx("axisPointer",i)},e.prototype.dispose=function(t,i){Fx("axisPointer",i)},e.type="axisPointer",e}(Qt),EZ=Dxe;function zx(r,e){var t=[],i=r.seriesIndex,n;if(i==null||!(n=e.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Jo(a,r);if(o==null||o<0||pe(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,p=f==="x"||f==="radius"?1:0,d=a.mapDimension(h),g=[];g[p]=a.get(d,o),g[1-p]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(g)||[]}else t=l.dataToPoint(a.getValues(de(l.dimensions,function(v){return a.mapDimension(v)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),t=[m.x+m.width/2,m.y+m.height/2]}return{point:t,el:s}}var AZ=vt();function qU(r,e,t){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||Be(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){jT(n)&&(n=zx({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=jT(n),u=a.axesInfo,c=s.axesInfo,f=i==="leave"||jT(n),h={},p={},d={list:[],map:{}},g={showPointer:ot(Nxe,p),showTooltip:ot(Uxe,d)};N(s.coordSysMap,function(v,_){var y=l||v.containPoint(n);N(s.coordSysAxesInfo[_],function(x,M){var S=x.axis,w=Bxe(u,x);if(!f&&y&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=S.pointToData(n)),T!=null&&CZ(x,T,g,!1,h)}})});var m={};return N(c,function(v,_){var y=v.linkGroup;y&&!p[_]&&N(y.axesInfo,function(x,M){var S=p[M];if(x!==v&&S){var w=S.value;y.mapper&&(w=v.axis.scale.parse(y.mapper(w,RZ(x),RZ(v)))),m[v.key]=w}})}),N(m,function(v,_){CZ(c[_],v,g,!0,h)}),Oxe(p,c,h),Fxe(d,n,r,o),zxe(c,o,t),h}}function CZ(r,e,t,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=Ixe(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&fe(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function Ixe(r,e){var t=e.axis,i=t.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),f,h;if(l.getAxisTooltipData){var p=l.getAxisTooltipData(c,r,t);h=p.dataIndices,f=p.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var d=r-f,g=Math.abs(d);g<=o&&((g=0&&s<0)&&(o=g,s=d,n=f,a.length=0),N(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:n}}function Nxe(r,e,t,i){r[e.key]={value:t,payloadBatch:i}}function Uxe(r,e,t,i){var n=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=Ev(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function Oxe(r,e,t){var i=t.axesInfo=[];N(e,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function Fxe(r,e,t,i){if(jT(e)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function zxe(r,e,t){var i=t.getZr(),n="axisPointerLastHighlights",a=AZ(i)[n]||{},o=AZ(i)[n]={};N(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&N(f.seriesDataIndices,function(h){var p=h.seriesIndex+" | "+h.dataIndex;o[p]=h})});var s=[],l=[];N(a,function(u,c){!o[c]&&l.push(u)}),N(o,function(u,c){!a[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Bxe(r,e){for(var t=0;t<(r||[]).length;t++){var i=r[t];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function RZ(r){var e=r.axis.model,t={},i=t.axisDim=r.axis.dim;return t.axisIndex=t[i+"AxisIndex"]=e.componentIndex,t.axisName=t[i+"AxisName"]=e.name,t.axisId=t[i+"AxisId"]=e.id,t}function jT(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function il(r){Wa.registerAxisPointerClass("CartesianAxisPointer",MZ),r.registerComponentModel(bZ),r.registerComponentView(EZ),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!pe(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=r9(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},qU)}function ZU(r){It(uT),It(il)}var kxe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(i),h=a.get("type");if(h&&h!=="none"){var p=jv(a),d=Gxe[h](s,l,f,c);d.style=p,t.graphicKey=d.type,t.pointer=d}var g=a.get(["label","margin"]),m=Vxe(i,n,a,l,g);WU(t,n,a,o,m)},e}(Zv);function Vxe(r,e,t,i,n){var a=e.axis,o=a.dataToCoord(r),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=wi();Ca(h,h,s),_n(h,h,[i.cx,i.cy]),u=wn([o,-n],h);var p=e.getModel("axisLabel").get("rotate")||0,d=Cn.innerTextLayout(s,p*Math.PI/180,-1);c=d.textAlign,f=d.textVerticalAlign}else{var g=l[1];u=i.coordToPoint([g+n,o]);var m=i.cx,v=i.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-v)/g<.3?"middle":u[1]>v?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var Gxe={line:function(r,e,t,i){return r.dim==="angle"?{type:"Line",shape:Kv(e.coordToPoint([i[0],t]),e.coordToPoint([i[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,i){var n=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:YU(e.cx,e.cy,i[0],i[1],(-t-n/2)*a,(-t+n/2)*a)}:{type:"Sector",shape:YU(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},LZ=kxe;var Hxe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var i,n=this.ecModel;return n.eachComponent(t,function(a){a.getCoordSysModel()===this&&(i=a)},this),i},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Pt),PZ=Hxe;var jU=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Cr).models[0]},e.type="polarAxis",e}(Pt);wr(jU,Gl);var DZ=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(jU);var IZ=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(jU);var KU=function(r){Z(e,r);function e(t,i){return r.call(this,"radius",t,i)||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e}(pn);KU.prototype.dataToRadius=pn.prototype.dataToCoord;KU.prototype.radiusToData=pn.prototype.coordToData;var NZ=KU;var Wxe=vt(),JU=function(r){Z(e,r);function e(t,i){return r.call(this,"angle",t,i||[0,360])||this}return e.prototype.pointToData=function(t,i){return this.polar.pointToData(t,i)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,i=t.getLabelModel(),n=t.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=Ll(s==null?"":s+"",i.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var p=Math.max(0,Math.floor(h)),d=Wxe(t.model),g=d.lastAutoInterval,m=d.lastTickCount;return g!=null&&m!=null&&Math.abs(g-p)<=1&&Math.abs(m-o)<=1&&g>p?p=g:(d.lastTickCount=o,d.lastAutoInterval=p),p},e}(pn);JU.prototype.dataToAngle=pn.prototype.dataToCoord;JU.prototype.angleToData=pn.prototype.coordToData;var UZ=JU;var $U=["radius","angle"],Xxe=function(){function r(e){this.dimensions=$U,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new NZ,this._angleAxis=new UZ,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===e&&t.push(i),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+i*i);t/=l,i/=l;for(var u=Math.atan2(-i,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],i=e[1]/180*Math.PI,n=Math.cos(i)*t+this.cx,a=-Math.sin(i)*t+this.cy;return[n,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),i=t.getExtent().slice();i[0]>i[1]&&i.reverse();var n=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,f=this.r,h=this.r0;return c<=f*f&&c>=h*h}}},r.prototype.convertToPixel=function(e,t,i){var n=OZ(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=OZ(t);return n===this?this.pointToData(i):null},r}();function OZ(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var FZ=Xxe;function Yxe(r,e,t){var i=e.get("center"),n=t.getWidth(),a=t.getHeight();r.cx=Fe(i[0],n),r.cy=Fe(i[1],a);var o=r.getRadiusAxis(),s=Math.min(n,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:pe(l)||(l=[0,l]);var u=[Fe(l[0],s),Fe(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function qxe(r,e){var t=this,i=t.getAngleAxis(),n=t.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();N(_v(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),N(_v(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),Vl(i.scale,i.model),Vl(n.scale,n.model),i.type==="category"&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function Zxe(r){return r.mainType==="angleAxis"}function zZ(r,e){var t;if(r.type=e.get("type"),r.scale=zf(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),Zxe(e)){r.inverse=r.inverse!==e.get("clockwise");var i=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:i+(r.inverse?-360:360);r.setExtent(i,n)}e.axis=r,r.model=e}var jxe={dimensions:$U,create:function(r,e){var t=[];return r.eachComponent("polar",function(i,n){var a=new FZ(n+"");a.update=qxe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");zZ(o,l),zZ(s,u),Yxe(a,i,e),t.push(a),i.coordinateSystem=a,a.model=i}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var n=i.getReferringComponents("polar",Cr).models[0];i.coordinateSystem=n.coordinateSystem}}),t}},BZ=jxe;var Kxe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function KT(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var i=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function JT(r){var e=r.getRadiusAxis();return e.inverse?0:1}function kZ(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var Jxe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,i){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,a=n.polar,o=a.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=de(n.getViewLabels(),function(c){c=Qe(c);var f=n.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(h),c});kZ(u),kZ(s),N(Kxe,function(c){t.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&$xe[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(Wa),$xe={axisLine:function(r,e,t,i,n,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=JT(t),f=c?0:1,h,p=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new Ct[p]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new Pp({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,e,t,i,n,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[JT(t)],u=de(i,function(c){return new Kr({shape:KT(t,[l,l+s],c.coord)})});r.add(Gn(u,{style:Ye(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,i,n,a){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[JT(t)],c=[],f=0;fv?"left":"right",x=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[d]){var M=s[d];qe(M)&&M.textStyle&&(p=new Zt(M.textStyle,l,l.ecModel))}var S=new Lt({silent:Cn.isLabelSilent(e),style:fr(p,{x:m[0],y:m[1],fill:p.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:y,verticalAlign:x})});if(r.add(S),c){var w=Cn.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=f.rawLabel,rt(S).eventData=w}},this)},splitLine:function(r,e,t,i,n,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",R=w;M&&(i[c][E]||(i[c][E]={p:w,n:w}),R=i[c][E][I]);var A=void 0,D=void 0,U=void 0,B=void 0;if(d.dim==="radius"){var F=d.dataToCoord(b)-w,k=l.dataToCoord(E);Math.abs(F)=B})}}})}function aSe(r){var e={};N(r,function(i,n){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=WZ(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var p=HZ(i);h[p]||f.autoWidthCount++,h[p]=h[p]||{width:0,maxWidth:0};var d=Fe(i.get("barWidth"),c),g=Fe(i.get("barMaxWidth"),c),m=i.get("barGap"),v=i.get("barCategoryGap");d&&!h[p].width&&(d=Math.min(f.remainedWidth,d),h[p].width=d,f.remainedWidth-=d),g&&(h[p].maxWidth=g),m!=null&&(f.gap=m),v!=null&&(f.categoryGap=v)});var t={};return N(e,function(i,n){t[n]={};var a=i.stacks,o=i.bandWidth,s=Fe(i.categoryGap,o),l=Fe(i.gap,1),u=i.remainedWidth,c=i.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),N(a,function(g,m){var v=g.maxWidth;v&&v=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),i=this.getRect(),n=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[a]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(e,t,i){var n=KZ(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=KZ(t);return n===this?this.pointToData(i):null},r}();function KZ(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var JZ=dSe;function mSe(r,e){var t=[];return r.eachComponent("singleAxis",function(i,n){var a=new JZ(i,r,e);a.name="single_"+n,a.resize(i,e),i.coordinateSystem=a,t.push(a)}),r.eachSeries(function(i){if(i.get("coordinateSystem")==="singleAxis"){var n=i.getReferringComponents("singleAxis",Cr).models[0];i.coordinateSystem=n&&n.coordinateSystem}}),t}var vSe={create:mSe,dimensions:eO},$Z=vSe;var QZ=["x","y"],gSe=["width","height"],ySe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,i,n,a,o){var s=n.axis,l=s.coordinateSystem,u=tO(l,1-QT(s)),c=l.dataToPoint(i)[0],f=a.get("type");if(f&&f!=="none"){var h=jv(a),p=_Se[f](s,c,u);p.style=h,t.graphicKey=p.type,t.pointer=p}var d=Bx(n);XT(i,t,d,n,a,o)},e.prototype.getHandleTransform=function(t,i,n){var a=Bx(i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=Ox(i.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,i,n,a){var o=n.axis,s=o.coordinateSystem,l=QT(o),u=tO(s,l),c=[t.x,t.y];c[l]+=i[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=tO(s,1-l),h=(f[1]+f[0])/2,p=[h,h];return p[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},e}(Zv),_Se={line:function(r,e,t){var i=Kv([e,t[0]],[e,t[1]],QT(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,e,t){var i=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:YT([e-i/2,t[0]],[i,n],QT(r))}}};function QT(r){return r.isHorizontal()?0:1}function tO(r,e){var t=r.getRect();return[t[QZ[e]],t[QZ[e]]+t[gSe[e]]]}var ej=ySe;var xSe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Qt);function rO(r){It(il),Wa.registerAxisPointerClass("SingleAxisPointer",ej),r.registerComponentView(xSe),r.registerComponentView(qZ),r.registerComponentModel($T),rl(r,"single",$T,$T.defaultOption),r.registerCoordinateSystem("single",$Z)}var SSe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i,n){var a=rs(t);r.prototype.init.apply(this,arguments),tj(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),tj(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Pt);function tj(r,e){var t=r.cellSize,i;pe(t)?i=t:i=r.cellSize=[t,t],i.length===1&&(i[1]=i[0]);var n=de([0,1],function(a){return x5(e,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});za(r,e,{type:"box",ignoreSize:n})}var rj=SSe;var MSe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=i.getLocaleModel();this._renderDayRect(t,s,a),this._renderLines(t,s,l,a),this._renderYearText(t,s,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,s,l,a)},e.prototype._renderDayRect=function(t,i,n){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=i.start.time;u<=i.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,f=new Tt({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});n.add(f)}},e.prototype._renderLines=function(t,i,n,a){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=i.start,h=0;f.time<=i.end.time;h++){d(f.formatedDate),h===0&&(f=s.getDateInfo(i.start.y+"-"+i.start.m));var p=f.date;p.setMonth(p.getMonth()+1),f=s.getDateInfo(p)}d(s.getNextNDay(i.end.time,1).formatedDate);function d(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var m=o._getLinePointsOfOneWeek(t,g,n);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,n),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,n),l,a)},e.prototype._getEdgesPoints=function(t,i,n){var a=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return a[0][o]=a[0][o]-i/2,a[1][o]=a[1][o]+i/2,a},e.prototype._drawSplitline=function(t,i,n){var a=new $r({z2:20,shape:{points:t},style:i});n.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,i,n){for(var a=t.coordinateSystem,o=a.getDateInfo(i),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,i){return Ce(t)&&t?g5(t,i):He(t)?t(i):i.nameMap},e.prototype._yearTextPositionControl=function(t,i,n,a,o){var s=i[0],l=i[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,i,n,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=n==="horizontal"?0:1,p={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},d=i.start.y;+i.end.y>+i.start.y&&(d=d+"-"+i.end.y);var g=o.get("formatter"),m={start:i.start.y,end:i.end.y,nameMap:d},v=this._formatterLabel(g,m),_=new Lt({z2:30,style:fr(o,{text:v})});_.attr(this._yearTextPositionControl(_,p[l],n,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(t,i,n,a,o){var s="left",l="top",u=t[0],c=t[1];return n==="horizontal"?(c=c+o,i&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,i&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,i,n,a){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||Ce(s))&&(s&&(i=b_(s)||i),s=i.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,p=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=c==="center",g=0;g=n.start.time&&i.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],i;t[0].time>t[1].time&&(i=!0,t.reverse());var n=Math.floor(t[1].time/iO)-Math.floor(t[0].time/iO)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+n-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)n-=u,a.setDate(l-u);var c=Math.floor((n+t[0].day+6)/7),f=i?-c+1:c-1;return i&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,i){var n=this._getRangeInfo(i);if(e>n.weeks||e===0&&tn.lweek)return null;var a=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+a),this.getDateInfo(o)},r.create=function(e,t){var i=[];return e.eachComponent("calendar",function(n){var a=new r(n,e,t);i.push(a),n.coordinateSystem=a}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=i[n.get("calendarIndex")||0])}),i},r.dimensions=["time","value"],r}();function nj(r){var e=r.calendarModel,t=r.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}var aj=bSe;function nO(r){r.registerComponentModel(rj),r.registerComponentView(ij),r.registerCoordinateSystem("calendar",aj)}function wSe(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var i=e.parentOption;i?e.parentId=i.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function oj(r,e){var t;return N(e,function(i){r[i]!=null&&r[i]!=="auto"&&(t=!0)}),t}function TSe(r,e,t){var i=fe({},t),n=r[e],a=t.$action||"merge";if(a==="merge")if(n){if(0)var o;_t(n,i,!0),za(n,i,{ignoreSize:!0}),nD(t,n),eE(t,n),eE(t,n,"shape"),eE(t,n,"style"),eE(t,n,"extra"),t.clipPath=n.clipPath}else r[e]=i;else a==="replace"?r[e]=i:a==="remove"&&n&&(r[e]=null)}var sj=["transition","enterFrom","leaveTo"],ESe=sj.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function eE(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var i=t?sj:ESe,n=0;n=0;c--){var f=n[c],h=Yr(f.id,null),p=h!=null?o.get(h):null;if(p){var d=p.parent,v=ps(d),_=d===a?{width:s,height:l}:{width:v.width,height:v.height},y={},x=Ef(p,f,_,null,{hv:f.hv,boundingMode:f.bounding},y);if(!ps(p).isNew&&x){for(var M=f.transition,S={},w=0;w=0)?S[T]=C:p[T]=C}Dt(p,S,t,0)}else p.attr(y)}}},e.prototype._clear=function(){var t=this,i=this._elMap;i.each(function(n){tE(n,ps(n).option,i,t._lastGraphicModel)}),this._elMap=ke()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Qt);function aO(r){var e=tt(uj,r)?uj[r]:x_(r),t=new e({});return ps(t).type=r,t}function cj(r,e,t,i){var n=aO(t);return e.add(n),i.set(r,n),ps(n).id=r,ps(n).isNew=!0,n}function tE(r,e,t,i){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(a){tE(a,e,t,i)}),Yv(r,e,i),t.removeKey(ps(r).id))}function fj(r,e,t,i){r.isGroup||N([["cursor",gi.prototype.cursor],["zlevel",i||0],["z",t||0],["z2",0]],function(n){var a=n[0];tt(e,a)?r[a]=ft(e[a],n[1]):r[a]==null&&(r[a]=n[1])}),N(bt(e),function(n){if(n.indexOf("on")===0){var a=e[n];r[n]=He(a)?a:null}}),tt(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function CSe(r){return r=fe({},r),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(rD),function(e){delete r[e]}),r}function RSe(r,e,t){var i=rt(r).eventData;!r.silent&&!r.ignore&&!i&&(i=rt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),i&&(i.info=t.info)}function oO(r){r.registerComponentModel(lj),r.registerComponentView(hj),r.registerPreprocessor(function(e){var t=e.graphic;pe(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var sO=["x","y","radius","angle","single"],LSe=["cartesian2d","polar","singleAxis"];function pj(r){var e=r.get("coordinateSystem");return dt(LSe,e)>=0}function ds(r){return r+"Axis"}function dj(r,e){var t=ke(),i=[],n=ke();r.eachComponent({mainType:"dataZoom",query:e},function(c){n.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!n.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){n.set(c.uid,!0),i.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,p){var d=t.get(h);d&&d[p]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return i}function rE(r){var e=r.ecModel,t={infoList:[],infoMap:ke()};return r.eachTargetAxis(function(i,n){var a=e.getComponent(ds(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var lO=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),PSe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,i,n){var a=mj(t);this.settledOption=a,this.mergeDefaultAndTheme(t,n),this._doInit(a)},e.prototype.mergeOption=function(t){var i=mj(t);_t(this.option,t,!0),_t(this.settledOption,i,!0),this._doInit(i)},e.prototype._doInit=function(t){var i=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),i=this._targetAxisInfoMap=ke(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var i=!1;return N(sO,function(n){var a=this.getReferringComponents(ds(n),uH);if(a.specified){i=!0;var o=new lO;N(a.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),i},e.prototype._fillAutoTargetAxisByOrient=function(t,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===i}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new lO;if(h.add(f.componentIndex),t.set(c,h),a=!1,c==="x"||c==="y"){var p=f.getReferringComponents("grid",Cr).models[0];p&&N(u,function(d){f.componentIndex!==d.componentIndex&&p===d.getReferringComponents("grid",Cr).models[0]&&h.add(d.componentIndex)})}}}a&&N(sO,function(u){if(a){var c=n.findComponents({mainType:ds(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new lO;f.add(c[0].componentIndex),t.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(i){!t&&(t=i)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var i=this._rangePropMode,n=this.get("rangeMode");N([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(i,n){t==null&&(t=this.ecModel.getComponent(ds(i),n))},this),t},e.prototype.eachTargetAxis=function(t,i){this._targetAxisInfoMap.each(function(n,a){N(n.indexList,function(o){t.call(i,a,o)})})},e.prototype.getAxisProxy=function(t,i){var n=this.getAxisModel(t,i);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,i){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[i])return this.ecModel.getComponent(ds(t),i)},e.prototype.setRawRange=function(t){var i=this.option,n=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(i[a[0]]=n[a[0]]=t[a[0]],i[a[1]]=n[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var i=this.option;N(["start","startValue","end","endValue"],function(n){i[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,i){if(t==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,i).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;ao[1];if(y&&!x&&!M)return!0;y&&(m=!0),x&&(d=!0),M&&(g=!0)}return m&&d&&g})}else $v(c,function(p){if(a==="empty")l.setData(u=u.map(p,function(g){return s(g)?g:NaN}));else{var d={};d[p]=o,u.selectRange(d)}});$v(c,function(p){u.setApproximateExtent(o,p)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,i=this._dataExtent;$v(["min","max"],function(n){var a=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=rr(i[0]+o,i,[0,100],!0):a!=null&&(o=rr(a,[0,100],i,!0)-i[0]),e[n+"Span"]=a,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,i=this._valueWindow;if(t){var n=Fm(i,[0,500]);n=Math.min(n,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),t[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function OSe(r,e,t){var i=[1/0,-1/0];$v(t,function(o){l8(i,o.getData(),e)});var n=r.getAxisModel(),a=C1(n.axis.scale,n,i).calculate();return[a.min,a.max]}var _j=USe;var FSe={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(ds(o),s);n(o,s,l,a)})})}e(function(n,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new _j(n,a,s,r),t.push(o.__dzAxisProxy))});var i=ke();return N(t,function(n){N(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).reset(t)}),t.eachTargetAxis(function(i,n){t.getAxisProxy(i,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var i=t.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}},xj=FSe;function uO(r){r.registerAction("dataZoom",function(e,t){var i=dj(t,e);N(i,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Sj=!1;function fd(r){Sj||(Sj=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,xj),uO(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Mj(r){r.registerComponentModel(vj),r.registerComponentView(gj),fd(r)}var $i=function(){function r(){}return r}();var bj={};function Qf(r,e){bj[r]=e}function iE(r){return bj[r]}var BSe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;N(this.option.feature,function(i,n){var a=iE(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),_t(i,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Pt),wj=BSe;function Tj(r,e,t){var i=e.getBoxLayoutParams(),n=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=xr(i,a,n);Ws(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Ef(r,i,a,n)}function nE(r,e){var t=Gs(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),r=new Tt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var VSe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];N(u,function(d,g){f.push(g)}),new An(this._featureNames||[],f).add(h).update(h).remove(ot(h,null)).execute(),this._featureNames=f;function h(d,g){var m=f[d],v=f[g],_=u[m],y=new Zt(_,t,t.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===m&&(_.title=a.newTitle),m&&!v){if(GSe(m))x={onclick:y.option.onclick,featureName:m};else{var M=iE(m);if(!M)return;x=new M}c[m]=x}else if(x=c[v],!x)return;x.uid=ts("toolbox-feature"),x.model=y,x.ecModel=i,x.api=n;var S=x instanceof $i;if(!m&&v){S&&x.dispose&&x.dispose(i,n);return}if(!y.get("show")||S&&x.unusable){S&&x.remove&&x.remove(i,n);return}p(y,x,m),y.setIconStatus=function(w,T){var C=this.option,b=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[w]=T,b[w]&&(T==="emphasis"?Bn:kn)(b[w])},x instanceof $i&&x.render&&x.render(y,i,n,a)}function p(d,g,m){var v=d.getModel("iconStyle"),_=d.getModel(["emphasis","iconStyle"]),y=g instanceof $i&&g.getIcons?g.getIcons():d.get("icon"),x=d.get("title")||{},M,S;Ce(y)?(M={},M[m]=y):M=y,Ce(x)?(S={},S[m]=x):S=x;var w=d.iconPaths={};N(M,function(T,C){var b=Pu(T,{},{x:-s/2,y:-s/2,width:s,height:s});b.setStyle(v.getItemStyle());var E=b.ensureState("emphasis");E.style=_.getItemStyle();var I=new Lt({style:{text:S[C],align:_.get("textAlign"),borderRadius:_.get("textBorderRadius"),padding:_.get("textPadding"),fill:null,font:iv({fontStyle:_.get("textFontStyle"),fontFamily:_.get("textFontFamily"),fontSize:_.get("textFontSize"),fontWeight:_.get("textFontWeight")},i)},ignore:!0});b.setTextContent(I),Vs({el:b,componentModel:t,itemName:C,formatterParamsExtra:{title:S[C]}}),b.__title=S[C],b.on("mouseover",function(){var R=_.getItemStyle(),A=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:_.get("textFill")||R.fill||R.stroke||"#000",backgroundColor:_.get("textBackgroundColor")}),b.setTextConfig({position:_.get("textPosition")||A}),I.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",C])!=="emphasis"&&n.leaveEmphasis(this),I.hide()}),(d.get(["iconStatus",C])==="emphasis"?Bn:kn)(b),o.add(b),b.on("click",Be(g.onclick,g,i,n,C)),w[C]=b})}Tj(o,t,n),o.add(nE(o.getBoundingRect(),t)),l||o.eachChild(function(d){var g=d.__title,m=d.ensureState("emphasis"),v=m.textConfig||(m.textConfig={}),_=d.getTextContent(),y=_&&_.ensureState("emphasis");if(y&&!He(y)&&g){var x=y.style||(y.style={}),M=Ll(g,Lt.makeFont(x)),S=d.x+o.x,w=d.y+o.y+s,T=!1;w+M.height>n.getHeight()&&(v.position="top",T=!0);var C=T?-5-M.height:s+10;S+M.width/2>n.getWidth()?(v.position=["100%",C],x.align="right"):S-M.width/2<0&&(v.position=[0,C],x.align="left")}})},e.prototype.updateView=function(t,i,n,a){N(this._features,function(o){o instanceof $i&&o.updateView&&o.updateView(o.model,i,n,a)})},e.prototype.remove=function(t,i){N(this._features,function(n){n instanceof $i&&n.remove&&n.remove(t,i)}),this.group.removeAll()},e.prototype.dispose=function(t,i){N(this._features,function(n){n instanceof $i&&n.dispose&&n.dispose(t,i)})},e.type="toolbox",e}(Qt);function GSe(r){return r.indexOf("my")===0}var Ej=VSe;var HSe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){var n=this.model,a=n.get("name")||t.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Ft.browser;if(He(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),p=h[0].indexOf("base64")>-1,d=o?decodeURIComponent(h[1]):h[1];p&&(d=window.atob(d));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=d.length,v=new Uint8Array(m);m--;)v[m]=d.charCodeAt(m);var _=new Blob([v]);window.navigator.msSaveOrOpenBlob(_,g)}else{var y=document.createElement("iframe");document.body.appendChild(y);var x=y.contentWindow,M=x.document;M.open("image/svg+xml","replace"),M.write(d),M.close(),x.focus(),M.execCommand("SaveAs",!0,g),document.body.removeChild(y)}}else{var S=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=a}},e.getDefaultOption=function(t){var i={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},e}($i),Aj=HSe;var Cj="__ec_magicType_stack__";var WSe=[["line","bar"],["stack"]],XSe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,i=t.get("icon"),n={};return N(t.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},e.getDefaultOption=function(t){var i={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},e.prototype.onclick=function(t,i,n){var a=this.model,o=a.get(["seriesIndex",n]);if(Rj[n]){var s={series:[]},l=function(f){var h=f.subType,p=f.id,d=Rj[n](h,p,f,a);d&&(Ye(d,f.option),s.series.push(d));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(n==="line"||n==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var v=m.dim,_=v+"Axis",y=f.getReferringComponents(_,Cr).models[0],x=y.componentIndex;s[_]=s[_]||[];for(var M=0;M<=x;M++)s[_][x]=s[_][x]||{};s[_][x].boundaryGap=n==="bar"}}};N(WSe,function(f){dt(f,n)>=0&&N(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=n;n==="stack"&&(u=_t({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),i.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}($i),Rj={line:function(r,e,t,i){if(r==="bar")return _t({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,e,t,i){if(r==="line")return _t({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,e,t,i){var n=t.get("stack")===Cj;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),_t({id:e,stack:n?"":Cj},i.get(["option","stack"])||{},!0)}};ua({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Lj=XSe;var oE=new Array(60).join("-"),Qv=" ";function YSe(r){var e={},t=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:i}}function qSe(r){var e=[];return N(r,function(t,i){var n=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(de(t.series,function(p){return p.name})),l=[n.model.getCategories()];N(t.series,function(p){var d=p.getRawData();l.push(p.getRawData().mapArray(d.mapDimension(o),function(g){return g}))});for(var u=[s.join(Qv)],c=0;c=0)return!0}var cO=new RegExp("["+Qv+"]+","g");function JSe(r){for(var e=r.split(/\n+/g),t=aE(e.shift()).split(cO),i=[],n=de(t,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=t[a];if(o[n])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function Uj(r){var e=fO(r),t=e[e.length-1];e.length>1&&e.pop();var i={};return Dj(t,function(n,a){for(var o=e.length-1;o>=0;o--)if(n=e[o][a],n){i[a]=n;break}}),i}function Oj(r){Ij(r).snapshots=null}function Fj(r){return fO(r).length}function fO(r){var e=Ij(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var rMe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){Oj(t),i.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var i={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return i},e}($i);ua({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var Bj=rMe;var iMe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],nMe=function(){function r(e,t,i){var n=this;this._targetInfoList=[];var a=kj(t,e);N(aMe,function(o,s){(!i||!i.include||dt(i.include,s)>=0)&&o(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var o=hO[i.brushType](0,a,n);i.__rangeOffset={offset:Wj[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,i){N(e,function(n){var a=this.findTargetInfo(n,t);a&&a!==!0&&N(a.coordSyses,function(o){var s=hO[n.brushType](1,o,n.range,!0);i(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){N(e,function(i){var n=this.findTargetInfo(i,t);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=hO[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?Wj[i.brushType](a.values,o.offset,oMe(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return de(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t?t(i):null,clipPath:PT(n),isTargetByCursor:IT(n,e,i.coordSysModel),getLinearBrushOtherExtent:DT(n)}})},r.prototype.controlSeries=function(e,t,i){var n=this.findTargetInfo(e,i);return n===!0||n&&dt(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var i=this._targetInfoList,n=kj(t,e),a=0;ar[1]&&r.reverse(),r}function kj(r,e){return vf(r,e,{includeMainTypes:iMe})}var aMe={grid:function(r,e){var t=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=ke(),o={},s={};!t&&!i&&!n||(N(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),N(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),N(n,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];N(u.getCartesians(),function(f,h){(dt(t,f.getAxis("x").model)>=0||dt(i,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Gj.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){N(r.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:Gj.geo})})}},Vj=[function(r,e){var t=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Gj={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(ks(r)),e}},hO={lineX:ot(Hj,0),lineY:ot(Hj,1),rect:function(r,e,t,i){var n=r?e.pointToData([t[0][0],t[1][0]],i):e.dataToPoint([t[0][0],t[1][0]],i),a=r?e.pointToData([t[0][1],t[1][1]],i):e.dataToPoint([t[0][1],t[1][1]],i),o=[pO([n[0],a[0]]),pO([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=de(t,function(o){var s=r?e.pointToData(o,i):e.dataToPoint(o,i);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:a,xyMinMax:n}}};function Hj(r,e,t,i){var n=t.getAxis(["x","y"][r]),a=pO(de([0,1],function(s){return e?n.coordToData(n.toLocalCoord(i[s]),!0):n.toGlobalCoord(n.dataToCoord(i[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var Wj={lineX:ot(Xj,0),lineY:ot(Xj,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return de(r,function(i,n){return[i[0]-t[0]*e[n][0],i[1]-t[1]*e[n][1]]})}};function Xj(r,e,t,i){return[e[0]-i[r]*t[0],e[1]-i[r]*t[1]]}function oMe(r,e){var t=Yj(r),i=Yj(e),n=[t[0]/i[0],t[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function Yj(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var kx=nMe;var dO=N,sMe=oH("toolbox-dataZoom_");var lMe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n,a){this._brushController||(this._brushController=new Gv(n.getZr()),this._brushController.on("brush",Be(this._onBrush,this)).mount()),fMe(t,i,this,a,n),cMe(t,i)},e.prototype.onclick=function(t,i,n){uMe[n].call(this)},e.prototype.remove=function(t,i){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,i){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var i=t.areas;if(!t.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var o=new kx(mO(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),Nj(a,n),this._dispatchZoomAction(n);function s(u,c,f){var h=c.getAxis(u),p=h.model,d=l(u,p,a),g=d.findRepresentativeAxisProxy(p).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=Xa(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(p){var d=p.getAxisModel(u,c.componentIndex);d&&(h=p)}),h}},e.prototype._dispatchZoomAction=function(t){var i=[];dO(t,function(n,a){i.push(Qe(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},e.getDefaultOption=function(t){var i={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},e}($i),uMe={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Uj(this.ecModel))}};function mO(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function cMe(r,e){r.setIconStatus("back",Fj(e)>1?"emphasis":"normal")}function fMe(r,e,t,i,n){var a=t._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new kx(mO(r),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}A5("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var i=e.getModel(t),n=[],a=mO(i),o=vf(r,a);dO(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),dO(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:sMe+u+f};h[c]=f,n.push(h)}return n});var qj=lMe;function vO(r){r.registerComponentModel(wj),r.registerComponentView(Ej),Qf("saveAsImage",Aj),Qf("magicType",Lj),Qf("dataView",Pj),Qf("dataZoom",qj),Qf("restore",Bj),It(Mj)}var hMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Pt),Zj=hMe;function sE(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function jj(r){if(Ft.domSupported){for(var e=document.documentElement.style,t=0,i=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+n,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),p=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-f)/2)*100)/100;s+=";"+a+":-"+p+"px";var d=e+" solid "+n+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'
'}function gMe(r,e){var t="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+t,n="opacity"+i+",visibility"+i;return e||(i=" "+r+"s "+t,n+=Ft.transformSupported?","+_O+i:",left"+i+",top"+i),pMe+":"+n}function $j(r,e,t){var i=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!Ft.transformSupported)return t?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=Ft.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return t?"top:0;left:0;"+_O+":"+o+";":[["top",0],["left",0],[gO,o]]}function yMe(r){var e=[],t=r.get("fontSize"),i=r.getTextColor();i&&e.push("color:"+i),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var n=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return n&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+n),N(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function _Me(r,e,t){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),f=Yw(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+h),e&&n&&i.push(gMe(n,t)),a&&i.push("background-color:"+a),N(["width","color","radius"],function(p){var d="border-"+p,g=Tw(d),m=r.get(g);m!=null&&i.push(d+":"+m+(p==="color"?"":"px"))}),i.push(yMe(c)),f!=null&&i.push("padding:"+Gs(f).join("px ")+"px"),i.join(";")+";"}function Qj(r,e,t,i,n){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&HV(r,o,t,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var xMe=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ft.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=e.getZr(),a=t.appendTo,o=a&&(Ce(a)?document.querySelector(a):af(a)?a:He(a)&&a(e.getDom()));Qj(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(i),this._api=e,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,c=n.painter.getViewportRoot();Ta(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),i=Jj(t,"position"),n=t.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=dMe+_Me(e,!this._firstShow,this._longHide)+$j(a[0],a[1],!0)+("border-color:"+Hs(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,i,n,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(Ce(a)&&i.get("trigger")==="item"&&!sE(i)&&(s=vMe(i,n,a)),Ce(e))o.innerHTML=e+s;else if(e){o.innerHTML="",pe(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,i=this._ecModel,n=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,i,n,a){if(!(a.from===this.uid||Ft.node||!n.getDom())){var o=nK(a,n);this._ticket="";var s=a.dataByCoordSys,l=AMe(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=MMe;c.x=a.x,c.y=a.y,c.update(),rt(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,i,n,a))return;var f=zx(a,i),h=f.point[0],p=f.point[1];h!=null&&p!=null&&this._tryShow({offsetX:h,offsetY:p,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(nK(a,n))},e.prototype._manuallyAxisShowTip=function(t,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var c=u.getData(),f=Vx([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,i){var n=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){var s=rt(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ys(n,function(c){if(rt(c).dataIndex!=null)return l=c,!0;if(rt(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,i):u?this._showComponentItemTooltip(t,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(t,i){var n=t.get("showDelay");i=Be(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},e.prototype._showAxisTooltip=function(t,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Vx([i.tooltipOption],a),l=this._renderMode,u=[],c=Or("section",{blocks:[],noHeader:!0}),f=[],h=new qw;N(t,function(_){N(_.dataByAxis,function(y){var x=n.getComponent(y.axisDim+"Axis",y.axisIndex),M=y.value;if(!(!x||M==null)){var S=XU(M,x.axis,n,y.seriesDataIndices,y.valueLabelOpt),w=Or("section",{header:S,noHeader:!Yi(S),sortBlocks:!0,blocks:[]});c.blocks.push(w),N(y.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),b=T.dataIndexInside,E=C.getDataParams(b);if(!(E.dataIndex<0)){E.axisDim=y.axisDim,E.axisIndex=y.axisIndex,E.axisType=y.axisType,E.axisId=y.axisId,E.axisValue=ox(x.axis,{value:M}),E.axisValueLabel=S,E.marker=h.makeTooltipMarker("item",Hs(E.color),l);var I=yD(C.formatTooltip(b,!0,null)),R=I.frag;if(R){var A=Vx([C],a).get("valueFormatter");w.blocks.push(A?fe({valueFormatter:A},R):R)}I.text&&f.push(I.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var p=i.position,d=s.get("order"),g=TD(c,h,l,d,n.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?` + +`:"
",v=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,p,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,v,u,Math.random()+"",o[0],o[1],p,null,h)})},e.prototype._showSeriesItemTooltip=function(t,i,n){var a=this._ecModel,o=rt(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),p=this._renderMode,d=t.positionDefault,g=Vx([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var v=u.getDataParams(c,f),_=new qw;v.marker=_.makeTooltipMarker("item",Hs(v.color),p);var y=yD(u.formatTooltip(c,!1,f)),x=g.get("order"),M=g.get("valueFormatter"),S=y.frag,w=S?TD(M?fe({valueFormatter:M},S):S,_,p,x,a.get("useUTC"),g.get("textStyle")):y.text,T="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,w,v,T,t.offsetX,t.offsetY,t.position,t.target,_)}),n({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,i,n){var a=rt(i),o=a.tooltipConfig,s=o.option||{};if(Ce(s)){var l=s;s={content:l,formatter:l}}var u=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&u.push(c),u.push({formatter:s.content});var f=t.positionDefault,h=Vx(u,this._tooltipModel,f?{position:f}:null),p=h.get("content"),d=Math.random()+"",g=new qw;this._showOrMove(h,function(){var m=Qe(h.get("formatterParams")||{});this._showTooltipContent(h,p,m,d,t.offsetX,t.offsetY,t.position,i,g)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,i,n,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var p=i,d=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor")),g=d.color;if(h)if(Ce(h)){var m=t.ecModel.get("useUTC"),v=pe(n)?n[0]:n,_=v&&v.axisType&&v.axisType.indexOf("time")>=0;p=h,_&&(p=Bp(v.axisValue,p,m)),p=Aw(p,n,!0)}else if(He(h)){var y=Be(function(x,M){x===this._ticket&&(f.setContent(M,c,t,g,l),this._updatePosition(t,l,o,s,f,n,u))},this);this._ticket=a,p=h(n,a,y)}else p=h;f.setContent(p,c,t,g,l),f.show(t,g),this._updatePosition(t,l,o,s,f,n,u)}},e.prototype._getNearestPoint=function(t,i,n,a){if(n==="axis"||pe(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!pe(i))return{color:a||i.color||i.borderColor}},e.prototype._updatePosition=function(t,i,n,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||t.get("position");var f=o.getSize(),h=t.get("align"),p=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),He(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),pe(i))n=Fe(i[0],u),a=Fe(i[1],c);else if(qe(i)){var g=i;g.width=f[0],g.height=f[1];var m=xr(g,{width:u,height:c});n=m.x,a=m.y,h=null,p=null}else if(Ce(i)&&l){var v=EMe(i,d,f,t.get("borderWidth"));n=v[0],a=v[1]}else{var v=wMe(n,a,o,u,c,h?null:20,p?null:20);n=v[0],a=v[1]}if(h&&(n-=aK(h)?f[0]/2:h==="right"?f[0]:0),p&&(a-=aK(p)?f[1]/2:p==="bottom"?f[1]:0),sE(t)){var v=TMe(n,a,o,u,c);n=v[0],a=v[1]}o.moveTo(n,a)},e.prototype._updateContentNotChangedOnAxis=function(t,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===t.length;return o&&N(n,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&N(u,function(h,p){var d=f[p]||{},g=h.seriesDataIndices||[],m=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&g.length===m.length,o&&N(g,function(v,_){var y=m[_];o=o&&v.seriesIndex===y.seriesIndex&&v.dataIndex===y.dataIndex}),a&&N(h.seriesDataIndices,function(v){var _=v.seriesIndex,y=i[_],x=a[_];y&&x&&x.data!==y.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=i,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,i){Ft.node||!i.getDom()||(zu(this,"_updatePosition"),this._tooltipContent.dispose(),Fx("itemTooltip",i))},e.type="tooltip",e}(Qt);function Vx(r,e,t){var i=e.ecModel,n;t?(n=new Zt(t,i,i),n=new Zt(e.option,n,i)):n=e;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Zt&&(o=o.get("tooltip",!0)),Ce(o)&&(o={formatter:o}),o&&(n=new Zt(o,n,i)))}return n}function nK(r,e){return r.dispatchAction||Be(e.dispatchAction,e)}function wMe(r,e,t,i,n,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function TMe(r,e,t,i,n){var a=t.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function EMe(r,e,t,i){var n=t[0],a=t[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-n/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+c+o;break;case"left":s=e.x-n-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function aK(r){return r==="center"||r==="middle"}function AMe(r,e,t){var i=n_(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=gf(e,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=rt(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}var oK=bMe;function xO(r){It(il),r.registerComponentModel(Zj),r.registerComponentView(oK),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ir),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ir)}var CMe=["rect","polygon","keep","clear"];function SO(r,e){var t=Jt(r?r.brush:[]);if(t.length){var i=[];N(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(i=i.concat(u))});var n=r&&r.toolbox;pe(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var a=n.feature||(n.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),RMe(s),e&&!s.length&&s.push.apply(s,CMe)}}function RMe(r){var e={};N(r,function(t){e[t]=1}),r.length=0,N(e,function(t,i){r.push(i)})}var sK=N;function lK(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Gx(r,e,t){var i={};return sK(e,function(a){var o=i[a]=n();sK(r[a],function(s,l){if(pi.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new pi(u),l==="opacity"&&(u=Qe(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new pi(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function lE(r,e,t){var i;N(t,function(n){e.hasOwnProperty(n)&&lK(e[n])&&(i=!0)}),i&&N(t,function(n){e.hasOwnProperty(n)&&lK(e[n])?r[n]=Qe(e[n]):delete r[n]})}function uK(r,e,t,i,n,a){var o={};N(r,function(f){var h=pi.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return H_(t,s,f)}function u(f,h){DD(t,s,f,h)}a==null?t.each(c):t.each([a],c);function c(f,h){s=a==null?f:h;var p=t.getRawDataItem(s);if(!(p&&p.visualMap===!1))for(var d=i.call(n,f),g=e[d],m=o[d],v=0,_=m.length;v<_;v++){var y=m[v];g[y]&&g[y].applyVisual(f,l,u)}}}function cK(r,e,t,i){var n={};return N(r,function(a){var o=pi.prepareVisualTypes(e[a]);n[a]=o}),{progress:function(o,s){var l;i!=null&&(l=s.getDimensionIndex(i));function u(M){return H_(s,f,M)}function c(M,S){DD(s,f,M,S)}for(var f,h=s.getStore();(f=o.next())!=null;){var p=s.getRawDataItem(f);if(!(p&&p.visualMap===!1))for(var d=i!=null?h.get(l,f):f,g=t(d),m=e[g],v=n[g],_=0,y=v.length;_e[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&vK(e)}};function vK(r){return new lt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var NMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.ecModel=t,this.api=i,this.model,(this._brushController=new Gv(i.getZr())).on("brush",Be(this._onBrush,this)).mount()},e.prototype.render=function(t,i,n,a){this.model=t,this._updateController(t,i,n,a)},e.prototype.updateTransform=function(t,i,n,a){wO(i),this._updateController(t,i,n,a)},e.prototype.updateVisual=function(t,i,n,a){this.updateTransform(t,i,n,a)},e.prototype.updateView=function(t,i,n,a){this._updateController(t,i,n,a)},e.prototype._updateController=function(t,i,n,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var i=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:Qe(n),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:Qe(n),$from:i})},e.type="brush",e}(Qt),gK=NMe;var UMe="#ddd",OMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,i){var n=this.option;!i&&lE(n,t,["inBrush","outOfBrush"]);var a=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:UMe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=de(t,function(i){return yK(this.option,i)},this))},e.prototype.setBrushOption=function(t){this.brushOption=yK(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Pt);function yK(r,e){return _t({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Zt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var _K=OMe;var FMe=["rect","polygon","lineX","lineY","keep","clear"],zMe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,i,n){var a,o,s;i.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,N(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,i,n){this.render(t,i,n)},e.prototype.getIcons=function(){var t=this.model,i=t.get("icon",!0),n={};return N(t.get("type",!0),function(a){i[a]&&(n[a]=i[a])}),n},e.prototype.onclick=function(t,i,n){var a=this._brushType,o=this._brushMode;n==="clear"?(i.dispatchAction({type:"axisAreaSelect",intervals:[]}),i.dispatchAction({type:"brush",command:"clear",areas:[]})):i.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?a:a===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var i={show:!0,type:FMe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return i},e}($i),xK=zMe;function EO(r){r.registerComponentView(gK),r.registerComponentModel(_K),r.registerPreprocessor(SO),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,TO),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(i){i.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ir),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ir),Qf("brush",xK)}var BMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Pt),kMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,i,n){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=ft(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Lt({style:fr(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),p=new Lt({style:fr(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),g=t.get("sublink"),m=t.get("triggerEvent",!0);c.silent=!d&&!m,p.silent=!g&&!m,d&&c.on("click",function(){kp(d,"_"+t.get("target"))}),g&&p.on("click",function(){kp(g,"_"+t.get("subtarget"))}),rt(c).eventData=rt(p).eventData=m?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),h&&a.add(p);var v=a.getBoundingRect(),_=t.getBoxLayoutParams();_.width=v.width,_.height=v.height;var y=xr(_,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?y.x+=y.width:l==="center"&&(y.x+=y.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?y.y+=y.height:u==="middle"&&(y.y+=y.height/2),u=u||"top"),a.x=y.x,a.y=y.y,a.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),p.setStyle(x),v=a.getBoundingRect();var M=y.margin,S=t.getItemStyle(["color","opacity"]);S.fill=t.get("backgroundColor");var w=new Tt({shape:{x:v.x-M[3],y:v.y-M[0],width:v.width+M[1]+M[3],height:v.height+M[0]+M[2],r:t.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(w)}},e.type="title",e}(Qt);function AO(r){r.registerComponentModel(BMe),r.registerComponentView(kMe)}var VMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var i=this._data.count();this.option.loop?t=(t%i+i)%i:(t>=i&&(t=i-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,i=t.data||[],n=t.axisType,a=this._names=[],o;n==="category"?(o=[],N(i,function(u,c){var f=Yr(Os(u),""),h;qe(u)?(h=Qe(u),h.value=c):h=c,o.push(h),a.push(f)})):o=i;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new ti([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Pt),CO=VMe;var SK=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Hn(CO.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(CO);wr(SK,hv.prototype);var MK=SK;var GMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Qt),bK=GMe;var HMe=function(r){Z(e,r);function e(t,i,n,a){var o=r.call(this,t,i,n)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(pn),wK=HMe;var RO=Math.PI,TK=vt(),WMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,i){this.api=i},e.prototype.render=function(t,i,n){if(this.model=t,this.api=n,this.ecModel=i,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Or("nameValue",{noName:!0,value:c})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,i){var n=t.get(["label","position"]),a=t.get("orient"),o=YMe(t,i),s;n==null||n==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:RO/2},f=a==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),p=h.get("show",!0),d=p?h.get("itemSize"):0,g=p?h.get("itemGap"):0,m=d+g,v=t.get(["label","rotate"])||0;v=v*RO/180;var _,y,x,M=h.get("position",!0),S=p&&h.get("showPlayBtn",!0),w=p&&h.get("showPrevBtn",!0),T=p&&h.get("showNextBtn",!0),C=0,b=f;M==="left"||M==="bottom"?(S&&(_=[0,0],C+=m),w&&(y=[C,0],C+=m),T&&(x=[b-d,0],b-=m)):(S&&(_=[b-d,0],b-=m),w&&(y=[0,0],C+=m),T&&(x=[b-d,0],b-=m));var E=[C,b];return t.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:v,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:y,nextBtnPosition:x,axisExtent:E,controlSize:d,controlGap:g}},e.prototype._position=function(t,i){var n=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=wi(),l=o.x,u=o.y+o.height;_n(s,s,[-l,-u]),Ca(s,s,-RO/2),_n(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(n.getBoundingRect()),h=_(a.getBoundingRect()),p=[n.x,n.y],d=[a.x,a.y];d[0]=p[0]=c[0][0];var g=t.labelPosOpt;if(g==null||Ce(g)){var m=g==="+"?0:1;y(p,f,c,1,m),y(d,h,c,1,1-m)}else{var m=g>=0?0:1;y(p,f,c,1,m),d[1]=p[1]+g}n.setPosition(p),a.setPosition(d),n.rotation=a.rotation=t.rotation,v(n),v(a);function v(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function _(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function y(x,M,S,w,T){x[w]+=S[w][T]-M[w][T]}},e.prototype._createAxis=function(t,i){var n=i.getData(),a=i.get("axisType"),o=XMe(i,a);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new wK("value",o,t.axisExtent,a);return l.model=i,l},e.prototype._createGroup=function(t){var i=this[t]=new Ze;return this.group.add(i),i},e.prototype._renderAxisLine=function(t,i,n,a){var o=n.getExtent();if(a.get(["lineStyle","show"])){var s=new Kr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:fe({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});i.add(s);var l=this._progressLine=new Kr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Ye({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});i.add(l)}},e.prototype._renderAxisTick=function(t,i,n,a){var o=this,s=a.getData(),l=n.scale.getTicks();this._tickSymbols=[],N(l,function(u){var c=n.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),p=f.getModel(["emphasis","itemStyle"]),d=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:Be(o._changeTimeline,o,u.value)},m=EK(f,h,i,g);m.ensureState("emphasis").style=p.getItemStyle(),m.ensureState("progress").style=d.getItemStyle(),Ol(m);var v=rt(m);f.get("tooltip")?(v.dataIndex=u.value,v.dataModel=a):v.dataIndex=v.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(t,i,n,a){var o=this,s=n.getLabelModel();if(s.get("show")){var l=a.getData(),u=n.getViewLabels();this._tickLabels=[],N(u,function(c){var f=c.tickValue,h=l.getItemModel(f),p=h.getModel("label"),d=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),m=n.dataToCoord(c.tickValue),v=new Lt({x:m,y:0,rotation:t.labelRotation-t.rotation,onclick:Be(o._changeTimeline,o,f),silent:!1,style:fr(p,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});v.ensureState("emphasis").style=fr(d),v.ensureState("progress").style=fr(g),i.add(v),Ol(v),TK(v).dataIndex=f,o._tickLabels.push(v)})}},e.prototype._renderControl=function(t,i,n,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(t.nextBtnPosition,"next",Be(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",Be(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",Be(this._handlePlayClick,this,!c),!0);function h(p,d,g,m){if(p){var v=xn(ft(a.get(["controlStyle",d+"BtnSize"]),o),o),_=[0,-v/2,v,v],y=qMe(a,d+"Icon",_,{x:p[0],y:p[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});y.ensureState("emphasis").style=u,i.add(y),Ol(y)}}},e.prototype._renderCurrentPointer=function(t,i,n,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=Be(u._handlePointerDrag,u),f.ondragend=Be(u._handlePointerDragend,u),AK(f,u._progressLine,s,n,a,!0)},onUpdate:function(f){AK(f,u._progressLine,s,n,a)}};this._currentPointer=EK(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,i,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,i){var n=this._toAxisCoord(t)[0],a=this._axis,o=Ti(a.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[a]=+o[a].toFixed(h)),[o,f]}var DO={min:ot(hE,"min"),max:ot(hE,"max"),average:ot(hE,"average"),median:ot(hE,"median")};function th(r,e){if(e){var t=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!KMe(e)&&!pe(e.coord)&&pe(n)){var a=NO(e,t,i,r);if(e=Qe(e),e.type&&DO[e.type]&&a.baseAxis&&a.valueAxis){var o=dt(n,a.baseAxis.dim),s=dt(n,a.valueAxis.dim),l=DO[e.type](t,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!pe(n))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)DO[u[c]]&&(u[c]=dE(t,t.mapDimension(n[c]),u[c]));return e}}function NO(r,e,t,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(JMe(i,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function JMe(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function rh(r,e){return r&&r.containData&&e.coord&&!IO(e)?r.containData(e.coord):!0}function IK(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!IO(e)&&!IO(t)?r.containZone(e.coord,t.coord):!0}function pE(r,e){return r?function(t,i,n,a){var o=a<2?t.coord&&t.coord[a]:t.value;return ns(o,e[a])}:function(t,i,n,a){return ns(t.value,e[a])}}function dE(r,e,t){if(t==="average"){var i=0,n=0;return r.each(e,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var OO=vt(),$Me=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=ke()},e.prototype.render=function(t,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){OO(s).keep=!1}),i.eachSeries(function(s){var l=da.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!OO(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){OO(t).keep=!0},e.prototype.toggleBlurSeries=function(t,i){var n=this;N(t,function(a){var o=da.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?Qb(l):d_(l))})}})},e.type="marker",e}(Qt),eg=$Me;function NK(r,e,t){var i=e.coordinateSystem;r.each(function(n){var a=r.getItemModel(n),o,s=Fe(a.get("x"),t.getWidth()),l=Fe(a.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(i){var u=r.get(i.dimensions[0],n),c=r.get(i.dimensions[1],n);o=i.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var QMe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var o=da.getMarkerModelFromSeries(a,"markPoint");o&&(NK(o.getData(),a,n),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,i,n,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Yl),f=ebe(o,t,i);i.setData(f),NK(i.getData(),t,a),f.each(function(h){var p=f.getItemModel(h),d=p.getShallow("symbol"),g=p.getShallow("symbolSize"),m=p.getShallow("symbolRotate"),v=p.getShallow("symbolOffset"),_=p.getShallow("symbolKeepAspect");if(He(d)||He(g)||He(m)||He(v)){var y=i.getRawValue(h),x=i.getDataParams(h);He(d)&&(d=d(y,x)),He(g)&&(g=g(y,x)),He(m)&&(m=m(y,x)),He(v)&&(v=v(y,x))}var M=p.getModel("itemStyle").getItemStyle(),S=kl(l,"color");M.fill||(M.fill=S),f.setItemVisual(h,{symbol:d,symbolSize:g,symbolRotate:m,symbolOffset:v,symbolKeepAspect:_,style:M})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(p){rt(p).dataModel=i})}),this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markPoint",e}(eg);function ebe(r,e,t){var i;r?i=de(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return fe(fe({},l),{name:s,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new ti(i,t),a=de(t.get("data"),ot(th,e));r&&(a=Wt(a,ot(rh,r)));var o=pE(!!r,i);return n.initData(a,null,o),n}var UK=QMe;function FO(r){r.registerComponentModel(DK),r.registerComponentView(UK),r.registerPreprocessor(function(e){pd(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var tbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(da),OK=tbe;var mE=vt(),rbe=function(r,e,t,i){var n=r.getData(),a;if(pe(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=e.getAxis(i.yAxis!=null?"y":"x"),l=Br(i.yAxis,i.xAxis);else{var u=NO(i,n,e,r);s=u.valueAxis;var c=y1(n,u.valueDataDim);l=dE(n,c,o)}var f=s.dim==="x"?0:1,h=1-f,p=Qe(i),d={coord:[]};p.type=null,p.coord=[],p.coord[h]=-1/0,d.coord[h]=1/0;var g=t.get("precision");g>=0&&At(l)&&(l=+l.toFixed(Math.min(g,20))),p.coord[f]=d.coord[f]=l,a=[p,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var m=[th(r,a[0]),th(r,a[1]),fe({},a[2])];return m[2].type=m[2].type||null,_t(m[2],m[0]),_t(m[2],m[1]),m};function vE(r){return!isNaN(r)&&!isFinite(r)}function FK(r,e,t,i){var n=1-r,a=i.dimensions[r];return vE(e[n])&&vE(t[n])&&e[r]===t[r]&&i.getAxis(a).containData(e[r])}function ibe(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,i=e[1].coord;if(t&&i&&(FK(1,t,i,r)||FK(0,t,i,r)))return!0}return rh(r,e[0])&&rh(r,e[1])}function zO(r,e,t,i,n){var a=i.coordinateSystem,o=r.getItemModel(e),s,l=Fe(o.get("x"),n.getWidth()),u=Fe(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=a.dimensions,f=r.get(c[0],e),h=r.get(c[1],e);s=a.dataToPoint([f,h])}if(ls(a,"cartesian2d")){var p=a.getAxis("x"),d=a.getAxis("y"),c=a.dimensions;vE(r.get(c[0],e))?s[0]=p.toGlobalCoord(p.getExtent()[t?0:1]):vE(r.get(c[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var nbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var o=da.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=mE(o).from,u=mE(o).to;l.each(function(c){zO(l,c,!0,a,n),zO(u,c,!1,a,n)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,i,n,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Fv);this.group.add(c.group);var f=abe(o,t,i),h=f.from,p=f.to,d=f.line;mE(i).from=h,mE(i).to=p,i.setData(d);var g=i.get("symbol"),m=i.get("symbolSize"),v=i.get("symbolRotate"),_=i.get("symbolOffset");pe(g)||(g=[g,g]),pe(m)||(m=[m,m]),pe(v)||(v=[v,v]),pe(_)||(_=[_,_]),f.from.each(function(x){y(h,x,!0),y(p,x,!1)}),d.each(function(x){var M=d.getItemModel(x).getModel("lineStyle").getLineStyle();d.setItemLayout(x,[h.getItemLayout(x),p.getItemLayout(x)]),M.stroke==null&&(M.stroke=h.getItemVisual(x,"style").fill),d.setItemVisual(x,{fromSymbolKeepAspect:h.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(x,"symbolOffset"),fromSymbolRotate:h.getItemVisual(x,"symbolRotate"),fromSymbolSize:h.getItemVisual(x,"symbolSize"),fromSymbol:h.getItemVisual(x,"symbol"),toSymbolKeepAspect:p.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(x,"symbolOffset"),toSymbolRotate:p.getItemVisual(x,"symbolRotate"),toSymbolSize:p.getItemVisual(x,"symbolSize"),toSymbol:p.getItemVisual(x,"symbol"),style:M})}),c.updateData(d),f.line.eachItemGraphicEl(function(x){rt(x).dataModel=i,x.traverse(function(M){rt(M).dataModel=i})});function y(x,M,S){var w=x.getItemModel(M);zO(x,M,S,t,a);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=kl(l,"color")),x.setItemVisual(M,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:ft(w.get("symbolOffset",!0),_[S?0:1]),symbolRotate:ft(w.get("symbolRotate",!0),v[S?0:1]),symbolSize:ft(w.get("symbolSize"),m[S?0:1]),symbol:ft(w.get("symbol",!0),g[S?0:1]),style:T})}this.markKeep(c),c.group.silent=i.get("silent")||t.get("silent")},e.type="markLine",e}(eg);function abe(r,e,t){var i;r?i=de(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return fe(fe({},c),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new ti(i,t),a=new ti(i,t),o=new ti([],t),s=de(t.get("data"),ot(rbe,e,r,t));r&&(s=Wt(s,ot(ibe,r)));var l=pE(!!r,i);return n.initData(de(s,function(u){return u[0]}),null,l),a.initData(de(s,function(u){return u[1]}),null,l),o.initData(de(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}var zK=nbe;function BO(r){r.registerComponentModel(OK),r.registerComponentView(zK),r.registerPreprocessor(function(e){pd(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var obe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(da),BK=obe;var gE=vt(),sbe=function(r,e,t,i){var n=i[0],a=i[1];if(!(!n||!a)){var o=th(r,n),s=th(r,a),l=o.coord,u=s.coord;l[0]=Br(l[0],-1/0),l[1]=Br(l[1],-1/0),u[0]=Br(u[0],1/0),u[1]=Br(u[1],1/0);var c=Sm([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function yE(r){return!isNaN(r)&&!isFinite(r)}function kK(r,e,t,i){var n=1-r;return yE(e[n])&&yE(t[n])}function lbe(r,e){var t=e.coord[0],i=e.coord[1],n={coord:t,x:e.x0,y:e.y0},a={coord:i,x:e.x1,y:e.y1};return ls(r,"cartesian2d")?t&&i&&(kK(1,t,i,r)||kK(0,t,i,r))?!0:IK(r,n,a):rh(r,n)||rh(r,a)}function VK(r,e,t,i,n){var a=i.coordinateSystem,o=r.getItemModel(e),s,l=Fe(o.get(t[0]),n.getWidth()),u=Fe(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),h=a.clampData(c),p=a.clampData(f),d=[];t[0]==="x0"?d[0]=h[0]>p[0]?f[0]:c[0]:d[0]=h[0]>p[0]?c[0]:f[0],t[1]==="y0"?d[1]=h[1]>p[1]?f[1]:c[1]:d[1]=h[1]>p[1]?c[1]:f[1],s=i.getMarkerPosition(d,t,!0)}else{var g=r.get(t[0],e),m=r.get(t[1],e),v=[g,m];a.clampData&&a.clampData(v,v),s=a.dataToPoint(v,!0)}if(ls(a,"cartesian2d")){var _=a.getAxis("x"),y=a.getAxis("y"),g=r.get(t[0],e),m=r.get(t[1],e);yE(g)?s[0]=_.toGlobalCoord(_.getExtent()[t[0]==="x0"?0:1]):yE(m)&&(s[1]=y.toGlobalCoord(y.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var GK=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],ube=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,i,n){i.eachSeries(function(a){var o=da.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=de(GK,function(f){return VK(s,l,f,a,n)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,i,n,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Ze});this.group.add(c.group),this.markKeep(c);var f=cbe(o,t,i);i.setData(f),f.each(function(h){var p=de(GK,function(T){return VK(f,h,T,t,a)}),d=o.getAxis("x").scale,g=o.getAxis("y").scale,m=d.getExtent(),v=g.getExtent(),_=[d.parse(f.get("x0",h)),d.parse(f.get("x1",h))],y=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Ti(_),Ti(y);var x=!(m[0]>_[1]||m[1]<_[0]||v[0]>y[1]||v[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Pt),Wx=hbe;var tg=ot,VO=N,_E=Ze,pbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new _E),this.group.add(this._selectorGroup=new _E),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,i,n,l,s,u);var c=t.getBoxLayoutParams(),f={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),p=xr(c,f,h),d=this.layoutInner(t,o,p,a,l,u),g=xr(Ye({width:d.width,height:d.height},c),f,h);this.group.x=g.x-d.x,this.group.y=g.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=nE(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,i,n,a,o,s,l){var u=this.getContentGroup(),c=ke(),f=i.get("selectedMode"),h=[];n.eachRawSeries(function(p){!p.get("legendHoverLink")&&h.push(p.id)}),VO(i.getData(),function(p,d){var g=p.get("name");if(!this.newlineDisabled&&(g===""||g===` +`)){var m=new _E;m.newline=!0,u.add(m);return}var v=n.getSeriesByName(g)[0];if(!c.get(g))if(v){var _=v.getData(),y=_.getVisual("legendLineStyle")||{},x=_.getVisual("legendIcon"),M=_.getVisual("style"),S=this._createItem(v,g,d,p,i,t,y,M,x,f,a);S.on("click",tg(WK,g,null,a,h)).on("mouseover",tg(GO,v.name,null,a,h)).on("mouseout",tg(HO,v.name,null,a,h)),n.ssr&&S.eachChild(function(w){var T=rt(w);T.seriesIndex=v.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),c.set(g,!0)}else n.eachRawSeries(function(w){if(!c.get(g)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(g))return;var C=T.indexOfName(g),b=T.getItemVisual(C,"style"),E=T.getItemVisual(C,"legendIcon"),I=cn(b.fill);I&&I[3]===0&&(I[3]=.2,b=fe(fe({},b),{fill:Ko(I,"rgba")}));var R=this._createItem(w,g,d,p,i,t,{},b,E,f,a);R.on("click",tg(WK,null,g,a,h)).on("mouseover",tg(GO,null,g,a,h)).on("mouseout",tg(HO,null,g,a,h)),n.ssr&&R.eachChild(function(A){var D=rt(A);D.seriesIndex=w.seriesIndex,D.dataIndex=d,D.ssrType="legend"}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},e.prototype._createSelector=function(t,i,n,a,o){var s=this.getSelectorGroup();VO(t,function(u){var c=u.type,f=new Lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var h=i.getModel("selectorLabel"),p=i.getModel(["emphasis","selectorLabel"]);Nr(f,{normal:h,emphasis:p},{defaultText:u.title}),Ol(f)})},e.prototype._createItem=function(t,i,n,a,o,s,l,u,c,f,h){var p=t.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(i),v=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),y=a.get("icon");c=y||c||"roundRect";var x=dbe(c,a,l,u,p,m,h),M=new _E,S=a.getModel("textStyle");if(He(t.getLegendIcon)&&(!y||y==="inherit"))M.add(t.getLegendIcon({itemWidth:d,itemHeight:g,icon:c,iconRotate:v,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:_}));else{var w=y==="inherit"&&t.getData().getVisual("symbol")?v==="inherit"?t.getData().getVisual("symbolRotate"):v:0;M.add(mbe({itemWidth:d,itemHeight:g,icon:c,iconRotate:w,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:_}))}var T=s==="left"?d+5:-5,C=s,b=o.get("formatter"),E=i;Ce(b)&&b?E=b.replace("{name}",i??""):He(b)&&(E=b(i));var I=m?S.getTextColor():a.get("inactiveColor");M.add(new Lt({style:fr(S,{text:E,x:T,y:g/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var R=new Tt({shape:M.getBoundingRect(),style:{fill:"transparent"}}),A=a.getModel("tooltip");return A.get("show")&&Vs({el:R,componentModel:o,itemName:i,itemTooltipOption:A.option}),M.add(R),M.eachChild(function(D){D.silent=!0}),R.silent=!f,this.getContentGroup().add(M),Ol(M),M.__legendDataIndex=n,M},e.prototype.layoutInner=function(t,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ws(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ws("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),p=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),g=t.getOrient().index,m=g===0?"width":"height",v=g===0?"height":"width",_=g===0?"y":"x";s==="end"?p[g]+=c[m]+d:f[g]+=h[m]+d,p[1-g]+=c[v]/2-h[v]/2,u.x=p[0],u.y=p[1],l.x=f[0],l.y=f[1];var y={x:0,y:0};return y[m]=c[m]+d+h[m],y[v]=Math.max(c[v],h[v]),y[_]=Math.min(0,h[_]+p[1-g]),y}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Qt);function dbe(r,e,t,i,n,a,o){function s(m,v){m.lineWidth==="auto"&&(m.lineWidth=v.lineWidth>0?2:0),VO(m,function(_,y){m[y]==="inherit"&&(m[y]=v[y])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?i.decal:Zs(f,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:t).opacity),s(u,i);var h=e.getModel("lineStyle"),p=h.getLineStyle();if(s(p,t),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),p.stroke==="auto"&&(p.stroke=i.fill),!a){var d=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=d==="auto"?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}function mbe(r){var e=r.icon||"roundRect",t=Sr(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function WK(r,e,t,i){HO(r,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:r??e}),GO(r,e,t,i)}function XK(r){for(var e=r.getZr().storage.getDisplayList(),t,i=0,n=e.length;in[o],m=[-p.x,-p.y];i||(m[a]=c[u]);var v=[0,0],_=[-d.x,-d.y],y=ft(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(g){var x=t.get("pageButtonPosition",!0);x==="end"?_[a]+=n[o]-d[o]:v[a]+=d[o]+y}_[1-a]+=p[s]/2-d[s]/2,c.setPosition(m),f.setPosition(v),h.setPosition(_);var M={x:0,y:0};if(M[o]=g?n[o]:p[o],M[s]=Math.max(p[s],d[s]),M[l]=Math.min(0,d[l]+_[1-a]),f.__rectSize=n[o],g){var S={x:0,y:0};S[o]=Math.max(n[o]-d[o]-y,0),S[s]=M[s],f.setClipPath(new Tt({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Dt(c,{x:w.contentPosition[0],y:w.contentPosition[1]},g?t:null),this._updatePageInfoView(t,w),M},e.prototype._pageGo=function(t,i,n){var a=this._getPageInfo(i)[t];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},e.prototype._updatePageInfoView=function(t,i){var n=this._controllerGroup;N(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=i[f]!=null,p=n.childOfName(c);p&&(p.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),p.cursor=h?"pointer":"default")});var a=n.childOfName("pageText"),o=t.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",Ce(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var i=t.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=XO[o],l=YO[o],u=this._findTargetItemIndex(i),c=n.children(),f=c[u],h=c.length,p=h?1:0,d={contentPosition:[n.x,n.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var g=x(f);d.contentPosition[o]=-g.s;for(var m=u+1,v=g,_=g,y=null;m<=h;++m)y=x(c[m]),(!y&&_.e>v.s+a||y&&!M(y,v.s))&&(_.i>v.i?v=_:v=y,v&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=v.i),++d.pageCount)),_=y;for(var m=u-1,v=g,_=g,y=null;m>=-1;--m)y=x(c[m]),(!y||!M(_,y.s))&&v.i<_.i&&(_=v,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=v.i),++d.pageCount,++d.pageIndex),v=y;return d;function x(S){if(S){var w=S.getBoundingRect(),T=w[l]+S[l];return{s:T,e:T+w[s],i:S.__legendDataIndex}}}function M(S,w){return S.e>=w&&S.s<=w+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(i=s)}),i??a},e.type="legend.scroll",e}(xE),KK=gbe;function qO(r){r.registerAction("legendScroll","legendscroll",function(e,t){var i=e.scrollDataIndex;i!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(i)})})}function JK(r){It(SE),r.registerComponentModel(ZK),r.registerComponentView(KK),qO(r)}function ZO(r){It(SE),It(JK)}var ybe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Hn($f.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}($f),$K=ybe;var jO=vt();function QK(r,e,t){jO(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function eJ(r,e){for(var t=jO(r).coordSysRecordMap,i=t.keys(),n=0;ni[t+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function rJ(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=jO(t),n=i.coordSysRecordMap||(i.coordSysRecordMap=ke());n.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=rE(a);N(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,_be(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ke());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){tJ(n,a);return}var c=Mbe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),as(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var wbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,i,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),QK(n,t,{pan:Be(KO.pan,this),zoom:Be(KO.zoom,this),scrollMove:Be(KO.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){eJ(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Jv),KO={zoom:function(r,e,t,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=JO[e](null,[i.originX,i.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Xa(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:iJ(function(r,e,t,i,n,a){var o=JO[i]([a.oldX,a.oldY],[a.newX,a.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:iJ(function(r,e,t,i,n,a){var o=JO[i]([0,0],[a.scrollDelta,a.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function iJ(r){return function(e,t,i,n){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,i,n);if(Xa(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var JO={grid:function(r,e,t,i,n){var a=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,e,t,i,n){var a=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,e,t,i,n){var a=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},nJ=wbe;function Yx(r){fd(r),r.registerComponentModel($K),r.registerComponentView(nJ),rJ(r)}var Tbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Hn($f.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}($f),aJ=Tbe;var qx=Tt,oJ=7,Ebe=1,$O=30,Abe=7,Zx="horizontal",sJ="vertical",Cbe=5,Rbe=["line","bar","candlestick","scatter"],Lbe={easing:"cubicOut",duration:100,delay:0},Pbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,i){this.api=i,this._onBrush=Be(this._onBrush,this),this._onBrushEnd=Be(this._onBrushEnd,this)},e.prototype.render=function(t,i,n,a){if(r.prototype.render.apply(this,arguments),as(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){zu(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new Ze;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(i),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,i=this.api,n=t.get("brushSelect"),a=n?Abe:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===Zx?{right:s.width-o.x-o.width,top:s.height-$O-oJ-a,width:o.width,height:$O}:{right:oJ,top:o.y,width:$O,height:o.height},u=rs(t.option);N(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=xr(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===sJ&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Zx&&!o?{scaleY:l?1:-1,scaleX:1}:n===Zx&&o?{scaleY:l?1:-1,scaleX:-1}:n===sJ&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=i.x-u.x,t.y=i.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=t.get("brushSelect");n.add(new qx({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new qx({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:Be(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var i=this._size,n=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var p=[0,i[1]],d=[0,i[0]],g=[[i[0],0],[0,0]],m=[],v=d[1]/(o.count()-1),_=0,y=Math.round(o.count()/i[0]),x;o.each([l],function(C,b){if(y>0&&b%y){_+=v;return}var E=C==null||isNaN(C)||C==="",I=E?0:rr(C,f,p,!0);E&&!x&&b?(g.push([g[g.length-1][0],0]),m.push([m[m.length-1][0],0])):!E&&x&&(g.push([_,0]),m.push([_,0])),g.push([_,I]),m.push([_,I]),_+=v,x=E}),u=this._shadowPolygonPts=g,c=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var M=this.dataZoomModel;function S(C){var b=M.getModel(C?"selectedDataBackground":"dataBackground"),E=new Ze,I=new ei({shape:{points:u},segmentIgnoreThreshold:1,style:b.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),R=new $r({shape:{points:c},segmentIgnoreThreshold:1,style:b.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return E.add(I),E.add(R),E}for(var w=0;w<3;w++){var T=S(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,i=t.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();N(l,function(u){if(!n&&!(i!==!0&&dt(Rbe,u.get("type"))<0)){var c=a.getComponent(ds(o),s).axis,f=Dbe(o),h,p=u.coordinateSystem;f!=null&&p.getOtherAxis&&(h=p.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),n={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=i.filler=new qx({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new qx({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Ebe,fill:"rgba(0,0,0,0)"}})),N([0,1],function(y){var x=l.get("handleIcon");!W_[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var M=Sr(x,-1,0,2,2,null,!0);M.attr({cursor:lJ(this._orient),draggable:!0,drift:Be(this._onDragMove,this,y),ondragend:Be(this._onDragEnd,this),onmouseover:Be(this._showDataInfo,this,!0),onmouseout:Be(this._showDataInfo,this,!1),z2:5});var S=M.getBoundingRect(),w=l.get("handleSize");this._handleHeight=Fe(w,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,M.setStyle(l.getModel("handleStyle").getItemStyle()),M.style.strokeNoScale=!0,M.rectHover=!0,M.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ol(M);var T=l.get("handleColor");T!=null&&(M.style.fill=T),o.add(n[y]=M);var C=l.getModel("textStyle");t.add(a[y]=new Lt({silent:!0,invisible:!0,style:fr(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var p=h;if(f){var d=Fe(l.get("moveHandleSize"),s[1]),g=i.moveHandle=new Tt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),m=d*.8,v=i.moveHandleIcon=Sr(l.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);v.silent=!0,v.y=s[1]+d/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(d,10));p=i.moveZone=new Tt({invisible:!0,shape:{y:s[1]-_,height:d+_}}),p.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(v),o.add(p)}p.attr({draggable:!0,cursor:lJ(this._orient),drift:Be(this._onDragMove,this,"all"),ondragstart:Be(this._showDataInfo,this,!0),ondragend:Be(this._onDragEnd,this),onmouseover:Be(this._showDataInfo,this,!0),onmouseout:Be(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[rr(t[0],[0,100],i,!0),rr(t[1],[0,100],i,!0)]},e.prototype._updateInterval=function(t,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Xa(i,a,o,n.get("zoomLock")?"all":t,s.minSpan!=null?rr(s.minSpan,l,o,!0):null,s.maxSpan!=null?rr(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ti([rr(a[0],o,l,!0),rr(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var i=this._displayables,n=this._handleEnds,a=Ti(n.slice()),o=this._size;N([0,1],function(p){var d=i.handles[p],g=this._handleHeight;d.attr({scaleX:g/2,scaleY:g/2,x:n[p]+(p?-1:1),y:o[1]/2-g/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;ci[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var i=t.offsetX,n=t.offsetY;this._brushStart=new Nt(i,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Ti([rr(n.x,o,s,!0),rr(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Ea(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new qx({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,i),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?Lbe:null,start:i[0],end:i[1]})},e.prototype._findCoordRect=function(){var t,i=rE(this.dataZoomModel).infoList;if(!t&&i.length){var n=i[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Jv);function Dbe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function lJ(r){return r==="vertical"?"ns-resize":"ew-resize"}var uJ=Pbe;function jx(r){r.registerComponentModel(aJ),r.registerComponentView(uJ),fd(r)}function QO(r){It(Yx),It(jx)}var Ibe={get:function(r,e,t){var i=Qe((Nbe[r]||{})[e]);return t&&pe(i)?i[i.length-1]:i}},Nbe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},ME=Ibe;var cJ=pi.mapVisual,Ube=pi.eachVisual,Obe=pe,fJ=N,Fbe=Ti,zbe=rr,Bbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,i,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,i){var n=this.option;!i&&lE(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var i=this.stateList;t=Be(t,this),this.controllerVisuals=Gx(this.option.controller,i,t),this.targetVisuals=Gx(this.option.target,i,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,i=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=Jt(t),i},e.prototype.eachTargetSeries=function(t,i){N(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&t.call(i,a)},this)},e.prototype.isTargetSeries=function(t){var i=!1;return this.eachTargetSeries(function(n){n===t&&(i=!0)}),i},e.prototype.formatValueText=function(t,i,n){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;n=n||["<",">"],pe(t)&&(t=t.slice(),u=!0);var c=i?t:u?[f(t[0]),f(t[1])]:f(t);if(Ce(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(He(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+c[1]:t[1]===s[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,i=Fbe([t.min,t.max]);this._dataExtent=i},e.prototype.getDataDimensionIndex=function(t){var i=this.option.dimension;if(i!=null)return t.getDimensionIndex(i);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var o=n[a],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});_t(a,n),_t(o,n);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Obe(i.color)&&!f.inRange&&(f.inRange={color:i.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,p){var d=f[h],g=f[p];d&&!g&&(g=f[p]={},fJ(d,function(m,v){if(pi.isValidType(v)){var _=ME.get(v,"inactive",s);_!=null&&(g[v]=_,v==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,p=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";fJ(this.stateList,function(v){var _=this.itemSize,y=f[v];y||(y=f[v]={color:s?d:[d]}),y.symbol==null&&(y.symbol=h&&Qe(h)||(s?m:[m])),y.symbolSize==null&&(y.symbolSize=p&&Qe(p)||(s?_[0]:[_[0],_[0]])),y.symbol=cJ(y.symbol,function(S){return S==="none"?m:S});var x=y.symbolSize;if(x!=null){var M=-1/0;Ube(x,function(S){S>M&&(M=S)}),y.symbolSize=cJ(x,function(S){return zbe(S,[0,M],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Pt),rg=Bbe;var hJ=[20,140],kbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=hJ[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=hJ[1])},e.prototype._resetRange=function(){var t=this.getExtent(),i=this.option.range;!i||i.auto?(t.auto=1,this.option.range=t):pe(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],t[0]),i[1]=Math.min(i[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),N(this.stateList,function(t){var i=this.option.controller[t].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),i=Ti((this.get("range")||[]).slice());return i[0]>t[1]&&(i[0]=t[1]),i[1]>t[1]&&(i[1]=t[1]),i[0]=n[1]||t<=i[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[];return this.eachTargetSeries(function(n){var a=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},e.prototype.getVisualMeta=function(t){var i=pJ(this,"outOfRange",this.getExtent()),n=pJ(this,"inRange",this.option.range.slice()),a=[];function o(p,d){a.push({value:p,color:t(p,d)})}for(var s=0,l=0,u=n.length,c=i.length;lt[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/n})}return a.push({color:this.getControllerVisual(t[1],"color",i),offset:1}),a},e.prototype._createBarPoints=function(t,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-i[1],t[1]]]},e.prototype._createBarGroup=function(t){var i=this._orient,n=this.visualMapModel.get("inverse");return new Ze(i==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=a.itemSize,u=a.getExtent();Gbe([0,1],function(c){var f=o[c];f.setStyle("fill",i.handlesColor[c]),f.y=t[c];var h=Ql(t[c],[0,l[1]],u,!0),p=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var d=wn(n.handleLabelPoints[c],ks(f,this.group));s[c].setStyle({x:d[0],y:d[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,i,n,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},p=this.getControllerVisual(t,"color",h),d=this.getControllerVisual(t,"symbolSize"),g=Ql(t,s,u,!0),m=l[0]-d/2,v={x:f.x,y:f.y};f.y=g,f.x=m;var _=wn(c.indicatorLabelPoint,ks(f,this.group)),y=c.indicatorLabel;y.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),M=this._orient,S=M==="horizontal";y.setStyle({text:(n||"")+o.formatValueText(i),verticalAlign:S?x:"middle",align:S?"center":x});var w={x:m,y:g,style:{fill:p}},T={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=v.x,f.y=v.y,f.animateTo(w,C),y.animateTo(T,C)}else f.attr(w),y.attr(T);this._firstShowIndicator=!1;var b=this._shapes.handleLabels;if(b)for(var E=0;Eo[1]&&(f[1]=1/0),i&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var h=this._hoverLinkDataIndices,p=[];(i||_J(n))&&(p=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var d=lH(h,p);this._dispatchHighDown("downplay",ig(d[0],n)),this._dispatchHighDown("highlight",ig(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var i;if(Ys(t.target,function(l){var u=rt(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var o=n.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n=0&&(a.dimension=o,i.push(a))}}),r.getData().setVisual("visualMeta",i)}}];function qbe(r,e,t,i){for(var n=e.targetVisuals[i],a=pi.prepareVisualTypes(n),o={color:kl(r.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(MJ,bJ),N(wJ,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(t3))}function Jx(r){r.registerComponentModel(dJ),r.registerComponentView(SJ),Kx(r)}var Zbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],jbe[this._mode].call(this,this._pieceList),this._resetSelected(t,i);var a=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=Qe(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=de(this._pieceList,function(l){return l=Qe(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,i={},n=pi.listVisualTypes(),a=this.isCategory();N(t.pieces,function(s){N(n,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),N(i,function(s,l){var u=!1;N(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&N(this.stateList,function(c){(t[c]||(t[c]={}))[l]=ME.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,i){var n=this.option,a=this._pieceList,o=(i?n:t).selected||{};if(n.selected=o,N(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var s=!1;N(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Qe(t)},e.prototype.getValueState=function(t){var i=pi.findPieceIndex(t,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=pi.findPieceIndex(l,n);c===t&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},e.prototype.getRepresentValue=function(t){var i;if(this.isCategory())i=t.value;else if(t.value!=null)i=t.value;else{var n=t.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var i=[],n=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var p=t(h,f);c[0]===-1/0?n[0]=p:c[1]===1/0?n[1]=p:i.push({value:c[0],color:p},{value:c[1],color:p})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return N(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:i,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=Hn(rg.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(rg),jbe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),i=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o","\u2265"][i[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function AJ(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var CJ=Zbe;var Kbe=function(r){Z(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,c=this._getViewData(),f=c.endsText,h=Br(i.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],u,h,l),N(c.viewPieceList,function(p){var d=p.piece,g=new Ze;g.onclick=Be(this._onItemClick,this,d),this._enableHoverLink(g,p.indexInModelPieceList);var m=i.getRepresentValue(d);if(this._createItemSymbol(g,m,[0,0,u[0],u[1]]),h){var v=this.visualMapModel.getValueState(m);g.add(new Lt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:v==="outOfRange"?.5:1}}))}t.add(g)},this),f&&this._renderEndsText(t,f[1],u,h,l),Ws(i.get("orient"),t,i.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,i){var n=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:ig(s.findTargetDataIndices(i),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,i=t.option;if(i.orient==="vertical")return wE(t,this.api,t.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,i,n,a,o){if(i){var s=new Ze,l=this.visualMapModel.textStyleModel;s.add(new Lt({style:fr(l,{x:a?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,i=de(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},e.prototype._createItemSymbol=function(t,i,n){t.add(Sr(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color")))},e.prototype._onItemClick=function(t){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var o=Qe(n.selected),s=i.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,N(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(bE),RJ=Kbe;function $x(r){r.registerComponentModel(CJ),r.registerComponentView(RJ),Kx(r)}function r3(r){It(Jx),It($x)}var Jbe={label:{enabled:!0},decal:{show:!1}},LJ=vt(),$be={};function i3(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var i=Qe(Jbe);_t(i.label,r.getLocaleModel().get("aria"),!1),_t(t.option,i,!1),n(),a();function n(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=ke();r.eachSeries(function(h){if(!h.isColorBySeries()){var p=f.get(h.type);p||(p={},f.set(h.type,p)),LJ(h).scope=p}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(He(h.enableAriaDecal)){h.enableAriaDecal();return}var p=h.getData();if(h.isColorBySeries()){var _=P_(h.ecModel,h.name,$be,r.getSeriesCount()),y=p.getVisual("decal");p.setVisual("decal",x(y,_))}else{var d=h.getRawData(),g={},m=LJ(h).scope;p.each(function(M){var S=p.getRawIndex(M);g[S]=M});var v=d.count();d.each(function(M){var S=g[M],w=d.getName(M)||M+"",T=P_(h.ecModel,w,m,v),C=p.getItemVisual(S,"decal");p.setItemVisual(S,"decal",x(C,T))})}function x(M,S){var w=M?fe(fe({},S),M):S;return w.dirty=!0,w}})}}function a(){var u=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=Ye(c.option,u),!!c.get("enabled")){var f=e.getZr().dom;if(c.get("description")){f.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),p=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,g=Math.min(h,d),m;if(!(h<1)){var v=s();if(v){var _=c.get(["general","withTitle"]);m=o(_,{title:v})}else m=c.get(["general","withoutTitle"]);var y=[],x=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);m+=o(x,{seriesCount:h}),r.eachSeries(function(T,C){if(C1?c.get(["series","multiple",I]):c.get(["series","single",I]),b=o(b,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var R=T.getData();if(R.count()>p){var A=c.get(["data","partialData"]);b+=o(A,{displayCnt:p})}else b+=c.get(["data","allData"]);for(var D=c.get(["data","separator","middle"]),U=c.get(["data","separator","end"]),B=[],F=0;F":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Qbe=function(){function r(e){var t=this._condVal=Ce(e)?new RegExp(e):FV(e)?e:null;if(t==null){var i="";ur(i)}}return r.prototype.evaluate=function(e){var t=typeof e;return Ce(t)?this._condVal.test(e):At(t)?this._condVal.test(e+""):!1},r}(),ewe=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),twe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&i.push(n),n=[R,A]}function c(R,A,D,U){ag(R,D)&&ag(A,U)||n.push(R,A,D,U,D,U)}function f(R,A,D,U,B,F){var k=Math.abs(A-R),G=Math.tan(k/4)*4/3,Y=AT:E2&&i.push(n),i}function u3(r,e,t,i,n,a,o,s,l,u){if(ag(r,t)&&ag(e,i)&&ag(n,o)&&ag(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,p=s-e,d=Math.sqrt(h*h+p*p);h/=d,p/=d;var g=t-r,m=i-e,v=n-o,_=a-s,y=g*g+m*m,x=v*v+_*_;if(y=0&&T=0){l.push(o,s);return}var C=[],b=[];Zo(r,t,n,o,.5,C),Zo(e,i,a,s,.5,b),u3(C[0],b[0],C[1],b[1],C[2],b[2],C[3],b[3],l,u),u3(C[4],b[4],C[5],b[5],C[6],b[6],C[7],b[7],l,u)}function FJ(r,e){var t=TE(r),i=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),f=VJ([l,u],c?0:1,e),h=(c?s:u)/f.length,p=0;pn,o=VJ([i,n],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=r[s]/o.length,h=0;h1?null:new Nt(g*l+r,g*u+e)}function hwe(r,e,t){var i=new Nt;Nt.sub(i,t,e),i.normalize();var n=new Nt;Nt.sub(n,r,e);var a=n.dot(i);return a}function og(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function pwe(r,e,t){for(var i=r.length,n=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),pwe(e,u,c)}function EE(r,e,t,i){if(t===1)i.push(e);else{var n=Math.floor(t/2),a=r(e);EE(r,a[0],n,i),EE(r,a[1],t-n,i)}return i}function dwe(r,e){for(var t=[],i=0;i0)for(var M=i/t,S=-i/2;S<=i/2;S+=M){for(var w=Math.sin(S),T=Math.cos(S),C=0,y=0;y0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function CE(r){var e=1/0,t=1/0,i=-1/0,n=-1/0,a=de(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),i=Math.max(c,i),n=Math.max(f,n),[c,f]}),o=de(a,function(s,l){return{cp:s,z:Mwe(s[0],s[1],e,t,i,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function ZJ(r){return GJ(r.path,r.count)}function c3(){return{fromIndividuals:[],toIndividuals:[],count:0}}function jJ(r,e,t){var i=[];function n(M){for(var S=0;S=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var a=l.length,u=Math.ceil(a/2);t[n].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var bwe={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),i=0;i0))return;var s=i.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;JJ(r)&&(u=r,c=e),JJ(e)&&(u=e,c=r);function f(v,_,y,x,M){var S=v.many,w=v.one;if(S.length===1&&!M){var T=_?S[0]:w,C=_?w:S[0];if(eS(T))f({many:[T],one:C},!0,y,x,!0);else{var b=s?Ye({delay:s(y,x)},l):l;RE(T,C,b),a(T,C,T,C,b)}}else for(var E=Ye({dividePath:bwe[t],individualDelay:s&&function(B,F,k,G){return s(B+y,x)}},l),I=_?jJ(S,w,E):KJ(w,S,E),R=I.fromIndividuals,A=I.toIndividuals,D=R.length,U=0;Ue.length,p=u?$J(c,u):$J(h?e:r,[h?r:e]),d=0,g=0;go$))for(var a=i.getIndices(),o=0;o0&&S.group.traverse(function(T){T instanceof ut&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function i$(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function n$(r){return pe(r)?r.sort().join(","):r}function nh(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Lwe(r,e){var t=ke(),i=ke(),n=ke();N(r.oldSeries,function(o,s){var l=r.oldDataGroupIds[s],u=r.oldData[s],c=i$(o),f=n$(c);i.set(f,{dataGroupId:l,data:u}),pe(c)&&N(c,function(h){n.set(h,{key:f,dataGroupId:l,data:u})})});function a(o){t.get(o)&&eH("Duplicated seriesKey in universalTransition "+o)}return N(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=i$(o),c=n$(u),f=i.get(c);if(f)t.set(c,{oldSeries:[{dataGroupId:f.dataGroupId,divide:nh(f.data),data:f.data}],newSeries:[{dataGroupId:s,divide:nh(l),data:l}]});else if(pe(u)){var h=[];N(u,function(g){var m=i.get(g);m.data&&h.push({dataGroupId:m.dataGroupId,divide:nh(m.data),data:m.data})}),h.length&&t.set(c,{oldSeries:h,newSeries:[{dataGroupId:s,data:l,divide:nh(l)}]})}else{var p=n.get(u);if(p){var d=t.get(p.key);d||(d={oldSeries:[{dataGroupId:p.dataGroupId,data:p.data,divide:nh(p.data)}],newSeries:[]},t.set(p.key,d)),d.newSeries.push({dataGroupId:s,data:l,divide:nh(l)})}}}}),t}function a$(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:nh(e.oldData[s]),groupIdDim:o.dimension})}),N(Jt(r.to),function(o){var s=a$(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:nh(l),groupIdDim:o.dimension})}}),n.length>0&&a.length>0&&s$(n,a,i)}function p3(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){N(Jt(i.seriesTransition),function(n){N(Jt(n.to),function(a){for(var o=i.updatedSeries,s=0;s{let e=class e{constructor(){this.chartInstance=null,this.options={},this.defaultTooltipOptions={tooltip:{trigger:"item",borderColor:"#00eff8",backgroundColor:"#12192C",padding:[6,14,6,14],textStyle:{fontSize:14,color:"#74FAFB"},position:"top",axisPointer:{type:"shadow"}},series:[{type:"gauge",startAngle:180,endAngle:0,center:["50%","75%"],radius:"90%",min:0,max:1,splitNumber:8,axisLine:{lineStyle:{width:6,color:[[.25,"#74FAFB"],[.5,"#74FAFB"],[.75,"#74FAFB"],[1,"#74FAFB"]]}},pointer:{icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"12%",width:20,offsetCenter:[0,"-60%"],itemStyle:{color:"auto"}},axisTick:{length:12,lineStyle:{color:"auto",width:2}},splitLine:{length:20,lineStyle:{color:"auto",width:5}},axisLabel:{color:"#464646",fontSize:20,distance:-60,rotate:"tangential",formatter:function(i){return""}},title:{offsetCenter:[0,"-10%"],fontSize:20},tooltip:{trigger:"item",borderColor:"#00eff8",backgroundColor:"#12192C",padding:[6,14,6,14],textStyle:{fontSize:14,color:"#74FAFB"},position:"top",axisPointer:{type:"shadow"}},detail:{fontSize:30,offsetCenter:[0,"-5%"],valueAnimation:!0,formatter:function(i){return Math.round(i*100)+""},color:"inherit"}}]}}ngOnInit(){console.log("ChartComponentComponent ngOnInit"),this.initEcharts()}ngOnChanges(i){i.options&&!i.options.isFirstChange()&&(console.log("ChartComponentComponent ngOnChanges"),this.updateChartOptions())}ngOnDestroy(){this.chartInstance&&(console.log("ChartComponentComponent ngOnInit"),this.chartInstance.dispose())}initEcharts(){let i=this.chartContainer.nativeElement;this.chartInstance=ZD(i,"dark");let n=E0(E0({},this.defaultTooltipOptions),this.options);this.chartInstance.setOption(n)}updateChartOptions(){this.chartInstance&&this.chartInstance.setOption(this.options)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["app-chart-component"]],viewQuery:function(n,a){if(n&1&&vm(Dwe,7),n&2){let o;co(o=fo())&&(a.chartContainer=o.first)}},inputs:{options:"options"},standalone:!0,features:[C0,ui],decls:2,vars:0,consts:[[2,"width","100%","height","100%"],["chart",""]],template:function(n,a){n&1&&li(0,"div",0,1)}});let r=e;return r})();var ah=["*"];function Iwe(r,e){if(r&1&&li(0,"nz-avatar",3),r&2){let t=Lr();Rt("nzSrc",t.nzSrc)}}function Nwe(r,e){r&1&&Li(0,0,["*ngIf","!nzSrc"])}function Uwe(r,e){if(r&1&&li(0,"nz-list-item-meta-avatar",3),r&2){let t=Lr();Rt("nzSrc",t.avatarStr)}}function Owe(r,e){if(r&1&&(tr(0,"nz-list-item-meta-avatar"),pV(1,4),lr()),r&2){let t=Lr();Ot(),Rt("ngTemplateOutlet",t.avatarTpl)}}function Fwe(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(3);Ot(),Ec(t.nzTitle)}}function zwe(r,e){if(r&1&&(tr(0,"nz-list-item-meta-title"),br(1,Fwe,2,1,"ng-container",6),lr()),r&2){let t=Lr(2);Ot(),Rt("nzStringTemplateOutlet",t.nzTitle)}}function Bwe(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(3);Ot(),Ec(t.nzDescription)}}function kwe(r,e){if(r&1&&(tr(0,"nz-list-item-meta-description"),br(1,Bwe,2,1,"ng-container",6),lr()),r&2){let t=Lr(2);Ot(),Rt("nzStringTemplateOutlet",t.nzDescription)}}function Vwe(r,e){if(r&1&&(tr(0,"div",5),br(1,zwe,2,1,"nz-list-item-meta-title",1)(2,kwe,2,1,"nz-list-item-meta-description",1),Li(3,1),Li(4,2),lr()),r&2){let t=Lr();Ot(),Rt("ngIf",t.nzTitle&&!t.titleComponent),Ot(),Rt("ngIf",t.nzDescription&&!t.descriptionComponent)}}var Gwe=[[["nz-list-item-meta-avatar"]],[["nz-list-item-meta-title"]],[["nz-list-item-meta-description"]]],Hwe=["nz-list-item-meta-avatar","nz-list-item-meta-title","nz-list-item-meta-description"];function Wwe(r,e){r&1&&Li(0)}var Xwe=["nz-list-item-actions",""];function Ywe(r,e){}function qwe(r,e){r&1&&li(0,"em",3)}function Zwe(r,e){if(r&1&&(tr(0,"li"),br(1,Ywe,0,0,"ng-template",1)(2,qwe,1,0,"em",2),lr()),r&2){let t=e.$implicit,i=e.last;Ot(),Rt("ngTemplateOutlet",t),Ot(),Rt("ngIf",!i)}}function jwe(r,e){}var d$=(r,e)=>({$implicit:r,index:e});function Kwe(r,e){if(r&1&&(Sl(0),br(1,jwe,0,0,"ng-template",9),Ml()),r&2){let t=e.$implicit,i=e.index,n=Lr(2);Ot(),Rt("ngTemplateOutlet",n.nzRenderItem)("ngTemplateOutletContext",tL(2,d$,t,i))}}function Jwe(r,e){if(r&1&&(tr(0,"div",7),br(1,Kwe,2,5,"ng-container",8),Li(2,4),lr()),r&2){let t=Lr();Ot(),Rt("ngForOf",t.nzDataSource)}}function $we(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(2);Ot(),Ec(t.nzHeader)}}function Qwe(r,e){if(r&1&&(tr(0,"nz-list-header"),br(1,$we,2,1,"ng-container",10),lr()),r&2){let t=Lr();Ot(),Rt("nzStringTemplateOutlet",t.nzHeader)}}function e1e(r,e){r&1&&li(0,"div"),r&2&&fV("min-height",53,"px")}function t1e(r,e){}function r1e(r,e){if(r&1&&(tr(0,"div",13),br(1,t1e,0,0,"ng-template",9),lr()),r&2){let t=e.$implicit,i=e.index,n=Lr(2);Rt("nzSpan",n.nzGrid.span||null)("nzXs",n.nzGrid.xs||null)("nzSm",n.nzGrid.sm||null)("nzMd",n.nzGrid.md||null)("nzLg",n.nzGrid.lg||null)("nzXl",n.nzGrid.xl||null)("nzXXl",n.nzGrid.xxl||null),Ot(),Rt("ngTemplateOutlet",n.nzRenderItem)("ngTemplateOutletContext",tL(9,d$,t,i))}}function i1e(r,e){if(r&1&&(tr(0,"div",11),br(1,r1e,2,12,"div",12),lr()),r&2){let t=Lr();Rt("nzGutter",t.nzGrid.gutter||null),Ot(),Rt("ngForOf",t.nzDataSource)}}function n1e(r,e){if(r&1&&li(0,"nz-list-empty",14),r&2){let t=Lr();Rt("nzNoResult",t.nzNoResult)}}function a1e(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(2);Ot(),Ec(t.nzFooter)}}function o1e(r,e){if(r&1&&(tr(0,"nz-list-footer"),br(1,a1e,2,1,"ng-container",10),lr()),r&2){let t=Lr();Ot(),Rt("nzStringTemplateOutlet",t.nzFooter)}}function s1e(r,e){}function l1e(r,e){}function u1e(r,e){if(r&1&&(tr(0,"nz-list-pagination"),br(1,l1e,0,0,"ng-template",6),lr()),r&2){let t=Lr();Ot(),Rt("ngTemplateOutlet",t.nzPagination)}}var c1e=[[["nz-list-header"]],[["nz-list-footer"],["","nz-list-footer",""]],[["nz-list-load-more"],["","nz-list-load-more",""]],[["nz-list-pagination"],["","nz-list-pagination",""]],"*"],f1e=["nz-list-header","nz-list-footer, [nz-list-footer]","nz-list-load-more, [nz-list-load-more]","nz-list-pagination, [nz-list-pagination]","*"];function h1e(r,e){if(r&1&&li(0,"ul",6),r&2){let t=Lr(2);Rt("nzActions",t.nzActions)}}function p1e(r,e){if(r&1&&(br(0,h1e,1,1,"ul",5),Li(1)),r&2){let t=Lr();Rt("ngIf",t.nzActions&&t.nzActions.length>0)}}function d1e(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(3);Ot(),Ec(t.nzContent)}}function m1e(r,e){if(r&1&&(Sl(0),br(1,d1e,2,1,"ng-container",8),Ml()),r&2){let t=Lr(2);Ot(),Rt("nzStringTemplateOutlet",t.nzContent)}}function v1e(r,e){if(r&1&&(Li(0,1),Li(1,2),br(2,m1e,2,1,"ng-container",7)),r&2){let t=Lr();Ot(2),Rt("ngIf",t.nzContent)}}function g1e(r,e){r&1&&Li(0,3)}function y1e(r,e){}function _1e(r,e){}function x1e(r,e){}function S1e(r,e){}function M1e(r,e){if(r&1&&br(0,y1e,0,0,"ng-template",9)(1,_1e,0,0,"ng-template",9)(2,x1e,0,0,"ng-template",9)(3,S1e,0,0,"ng-template",9),r&2){let t=Lr(),i=gu(3),n=gu(5),a=gu(1);Rt("ngTemplateOutlet",i),Ot(),Rt("ngTemplateOutlet",t.nzExtra),Ot(),Rt("ngTemplateOutlet",n),Ot(),Rt("ngTemplateOutlet",a)}}function b1e(r,e){}function w1e(r,e){}function T1e(r,e){}function E1e(r,e){if(r&1&&(tr(0,"nz-list-item-extra"),br(1,T1e,0,0,"ng-template",9),lr()),r&2){let t=Lr(2);Ot(),Rt("ngTemplateOutlet",t.nzExtra)}}function A1e(r,e){}function C1e(r,e){if(r&1&&(Sl(0),tr(1,"div",10),br(2,b1e,0,0,"ng-template",9)(3,w1e,0,0,"ng-template",9),lr(),br(4,E1e,2,1,"nz-list-item-extra",7)(5,A1e,0,0,"ng-template",9),Ml()),r&2){let t=Lr(),i=gu(3),n=gu(1),a=gu(5);Ot(2),Rt("ngTemplateOutlet",i),Ot(),Rt("ngTemplateOutlet",n),Ot(),Rt("ngIf",t.nzExtra),Ot(),Rt("ngTemplateOutlet",a)}}var R1e=[[["nz-list-item-actions"],["","nz-list-item-actions",""]],[["nz-list-item-meta"],["","nz-list-item-meta",""]],"*",[["nz-list-item-extra"],["","nz-list-item-extra",""]]],L1e=["nz-list-item-actions, [nz-list-item-actions]","nz-list-item-meta, [nz-list-item-meta]","*","nz-list-item-extra, [nz-list-item-extra]"],u$=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-item-meta-title"]],exportAs:["nzListItemMetaTitle"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:2,vars:0,consts:[[1,"ant-list-item-meta-title"]],template:function(n,a){n&1&&(Ho(),tr(0,"h4",0),Li(1),lr())},encapsulation:2,changeDetection:0});let r=e;return r})(),c$=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-item-meta-description"]],exportAs:["nzListItemMetaDescription"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:2,vars:0,consts:[[1,"ant-list-item-meta-description"]],template:function(n,a){n&1&&(Ho(),tr(0,"div",0),Li(1),lr())},encapsulation:2,changeDetection:0});let r=e;return r})(),m$=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-item-meta-avatar"]],inputs:{nzSrc:"nzSrc"},exportAs:["nzListItemMetaAvatar"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:3,vars:2,consts:[[1,"ant-list-item-meta-avatar"],[3,"nzSrc",4,"ngIf"],[4,"ngIf"],[3,"nzSrc"]],template:function(n,a){n&1&&(Ho(),tr(0,"div",0),br(1,Iwe,1,1,"nz-avatar",1)(2,Nwe,1,0,"ng-content",2),lr()),n&2&&(Ot(),Rt("ngIf",a.nzSrc),Ot(),Rt("ngIf",!a.nzSrc))},dependencies:[El,TV,bl],encapsulation:2,changeDetection:0});let r=e;return r})(),P1e=(()=>{let e=class e{set nzAvatar(i){i instanceof eL?(this.avatarStr="",this.avatarTpl=i):this.avatarStr=i}constructor(i){this.elementRef=i,this.avatarStr=""}};e.\u0275fac=function(n){return new(n||e)(uo(uV))},e.\u0275cmp=si({type:e,selectors:[["nz-list-item-meta"],["","nz-list-item-meta",""]],contentQueries:function(n,a,o){if(n&1&&(Tc(o,c$,5),Tc(o,u$,5)),n&2){let s;co(s=fo())&&(a.descriptionComponent=s.first),co(s=fo())&&(a.titleComponent=s.first)}},hostAttrs:[1,"ant-list-item-meta"],inputs:{nzAvatar:"nzAvatar",nzTitle:"nzTitle",nzDescription:"nzDescription"},exportAs:["nzListItemMeta"],standalone:!0,features:[ui],ngContentSelectors:Hwe,decls:4,vars:3,consts:[[3,"nzSrc",4,"ngIf"],[4,"ngIf"],["class","ant-list-item-meta-content",4,"ngIf"],[3,"nzSrc"],[3,"ngTemplateOutlet"],[1,"ant-list-item-meta-content"],[4,"nzStringTemplateOutlet"]],template:function(n,a){n&1&&(Ho(Gwe),br(0,Uwe,1,1,"nz-list-item-meta-avatar",0)(1,Owe,2,1,"nz-list-item-meta-avatar",1),Li(2),br(3,Vwe,5,2,"div",2)),n&2&&(Rt("ngIf",a.avatarStr),Ot(),Rt("ngIf",a.avatarTpl),Ot(2),Rt("ngIf",a.nzTitle||a.nzDescription||a.descriptionComponent||a.titleComponent))},dependencies:[m$,bl,L0,u$,qM,YM,c$],encapsulation:2,changeDetection:0});let r=e;return r})(),f$=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-item-extra"],["","nz-list-item-extra",""]],hostAttrs:[1,"ant-list-item-extra"],exportAs:["nzListItemExtra"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:1,vars:0,template:function(n,a){n&1&&(Ho(),Li(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),D1e=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-item-action"]],viewQuery:function(n,a){if(n&1&&vm(eL,5),n&2){let o;co(o=fo())&&(a.templateRef=o.first)}},exportAs:["nzListItemAction"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:1,vars:0,template:function(n,a){n&1&&(Ho(),br(0,Wwe,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let r=e;return r})(),I1e=(()=>{let e=class e{constructor(i,n,a){this.ngZone=i,this.nzActions=[],this.actions=[],this.inputActionChanges$=new qR,this.contentChildrenChanges$=tV(()=>this.nzListItemActions?eV(null):this.ngZone.onStable.pipe(iV(1),this.enterZone(),nV(()=>this.nzListItemActions.changes.pipe(aV(this.nzListItemActions))))),rV(this.contentChildrenChanges$,this.inputActionChanges$).pipe(ZR(a)).subscribe(()=>{this.nzActions.length?this.actions=this.nzActions:this.actions=this.nzListItemActions.map(o=>o.templateRef),n.detectChanges()})}ngOnChanges(){this.inputActionChanges$.next(null)}enterZone(){return i=>new $k(n=>i.subscribe({next:a=>this.ngZone.run(()=>n.next(a))}))}};e.\u0275fac=function(n){return new(n||e)(uo(cV),uo(jR),uo(ZM))},e.\u0275cmp=si({type:e,selectors:[["ul","nz-list-item-actions",""]],contentQueries:function(n,a,o){if(n&1&&Tc(o,D1e,4),n&2){let s;co(s=fo())&&(a.nzListItemActions=s)}},hostAttrs:[1,"ant-list-item-action"],inputs:{nzActions:"nzActions"},exportAs:["nzListItemActions"],standalone:!0,features:[mV([ZM]),C0,ui],attrs:Xwe,decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],[3,"ngTemplateOutlet"],["class","ant-list-item-action-split",4,"ngIf"],[1,"ant-list-item-action-split"]],template:function(n,a){n&1&&br(0,Zwe,3,2,"li",0),n&2&&Rt("ngForOf",a.actions)},dependencies:[R0,L0,bl],encapsulation:2,changeDetection:0});let r=e;return r})(),v$=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-empty"]],hostAttrs:[1,"ant-list-empty-text"],inputs:{nzNoResult:"nzNoResult"},exportAs:["nzListHeader"],standalone:!0,features:[ui],decls:1,vars:2,consts:[[3,"nzComponentName","specificContent"]],template:function(n,a){n&1&&li(0,"nz-embed-empty",0),n&2&&Rt("nzComponentName","list")("specificContent",a.nzNoResult)},dependencies:[bV,MV],encapsulation:2,changeDetection:0});let r=e;return r})(),N1e=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-header"]],hostAttrs:[1,"ant-list-header"],exportAs:["nzListHeader"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:1,vars:0,template:function(n,a){n&1&&(Ho(),Li(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),h$=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-footer"]],hostAttrs:[1,"ant-list-footer"],exportAs:["nzListFooter"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:1,vars:0,template:function(n,a){n&1&&(Ho(),Li(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),p$=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["nz-list-pagination"]],hostAttrs:[1,"ant-list-pagination"],exportAs:["nzListPagination"],standalone:!0,features:[ui],ngContentSelectors:ah,decls:1,vars:0,template:function(n,a){n&1&&(Ho(),Li(0))},encapsulation:2,changeDetection:0});let r=e;return r})(),U1e=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=lV({type:e,selectors:[["nz-list-load-more"]],exportAs:["nzListLoadMoreDirective"],standalone:!0});let r=e;return r})();var g$=(()=>{let e=class e{get itemLayoutNotify$(){return this.itemLayoutNotifySource.asObservable()}constructor(i){this.directionality=i,this.nzBordered=!1,this.nzGrid="",this.nzItemLayout="horizontal",this.nzRenderItem=null,this.nzLoading=!1,this.nzLoadMore=null,this.nzSize="default",this.nzSplit=!0,this.hasSomethingAfterLastItem=!1,this.dir="ltr",this.itemLayoutNotifySource=new Qk(this.nzItemLayout),this.destroy$=new qR}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(ZR(this.destroy$)).subscribe(i=>{this.dir=i})}getSomethingAfterLastItem(){return!!(this.nzLoadMore||this.nzPagination||this.nzFooter||this.nzListFooterComponent||this.nzListPaginationComponent||this.nzListLoadMoreDirective)}ngOnChanges(i){i.nzItemLayout&&this.itemLayoutNotifySource.next(this.nzItemLayout)}ngOnDestroy(){this.itemLayoutNotifySource.unsubscribe(),this.destroy$.next(),this.destroy$.complete()}ngAfterContentInit(){this.hasSomethingAfterLastItem=this.getSomethingAfterLastItem()}};e.\u0275fac=function(n){return new(n||e)(uo(xV,8))},e.\u0275cmp=si({type:e,selectors:[["nz-list"],["","nz-list",""]],contentQueries:function(n,a,o){if(n&1&&(Tc(o,h$,5),Tc(o,p$,5),Tc(o,U1e,5)),n&2){let s;co(s=fo())&&(a.nzListFooterComponent=s.first),co(s=fo())&&(a.nzListPaginationComponent=s.first),co(s=fo())&&(a.nzListLoadMoreDirective=s.first)}},hostAttrs:[1,"ant-list"],hostVars:16,hostBindings:function(n,a){n&2&&KR("ant-list-rtl",a.dir==="rtl")("ant-list-vertical",a.nzItemLayout==="vertical")("ant-list-lg",a.nzSize==="large")("ant-list-sm",a.nzSize==="small")("ant-list-split",a.nzSplit)("ant-list-bordered",a.nzBordered)("ant-list-loading",a.nzLoading)("ant-list-something-after-last-item",a.hasSomethingAfterLastItem)},inputs:{nzDataSource:"nzDataSource",nzBordered:"nzBordered",nzGrid:"nzGrid",nzHeader:"nzHeader",nzFooter:"nzFooter",nzItemLayout:"nzItemLayout",nzRenderItem:"nzRenderItem",nzLoading:"nzLoading",nzLoadMore:"nzLoadMore",nzPagination:"nzPagination",nzSize:"nzSize",nzSplit:"nzSplit",nzNoResult:"nzNoResult"},exportAs:["nzList"],standalone:!0,features:[C0,ui],ngContentSelectors:f1e,decls:15,vars:9,consts:[["itemsTpl",""],[4,"ngIf"],[3,"nzSpinning"],[3,"min-height",4,"ngIf"],["nz-row","",3,"nzGutter",4,"ngIf","ngIfElse"],[3,"nzNoResult",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"ant-list-items"],[4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"nzStringTemplateOutlet"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzSpan","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl",4,"ngFor","ngForOf"],["nz-col","",3,"nzSpan","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],[3,"nzNoResult"]],template:function(n,a){if(n&1&&(Ho(c1e),br(0,Jwe,3,1,"ng-template",null,0,gm)(2,Qwe,2,1,"nz-list-header",1),Li(3),tr(4,"nz-spin",2),Sl(5),br(6,e1e,1,2,"div",3)(7,i1e,2,2,"div",4)(8,n1e,1,1,"nz-list-empty",5),Ml(),lr(),br(9,o1e,2,1,"nz-list-footer",1),Li(10,1),br(11,s1e,0,0,"ng-template",6),Li(12,2),br(13,u1e,2,1,"nz-list-pagination",1),Li(14,3)),n&2){let o=gu(1);Ot(2),Rt("ngIf",a.nzHeader),Ot(2),Rt("nzSpinning",a.nzLoading),Ot(2),Rt("ngIf",a.nzLoading&&a.nzDataSource&&a.nzDataSource.length===0),Ot(),Rt("ngIf",a.nzGrid&&a.nzDataSource)("ngIfElse",o),Ot(),Rt("ngIf",!a.nzLoading&&a.nzDataSource&&a.nzDataSource.length===0),Ot(),Rt("ngIf",a.nzFooter),Ot(2),Rt("ngTemplateOutlet",a.nzLoadMore),Ot(2),Rt("ngIf",a.nzPagination)}},dependencies:[L0,R0,N1e,bl,qM,YM,wl,wV,Tl,JM,KM,v$,h$,p$],encapsulation:2,changeDetection:0});let r=e;return A0([P0()],r.prototype,"nzBordered",void 0),A0([P0()],r.prototype,"nzLoading",void 0),A0([P0()],r.prototype,"nzSplit",void 0),r})(),O1e=(()=>{let e=class e{get isVerticalAndExtra(){return this.itemLayout==="vertical"&&(!!this.listItemExtraDirective||!!this.nzExtra)}constructor(i,n){this.parentComp=i,this.cdr=n,this.nzActions=[],this.nzExtra=null,this.nzNoFlex=!1}ngAfterViewInit(){this.itemLayout$=this.parentComp.itemLayoutNotify$.subscribe(i=>{this.itemLayout=i,this.cdr.detectChanges()})}ngOnDestroy(){this.itemLayout$&&this.itemLayout$.unsubscribe()}};e.\u0275fac=function(n){return new(n||e)(uo(g$),uo(jR))},e.\u0275cmp=si({type:e,selectors:[["nz-list-item"],["","nz-list-item",""]],contentQueries:function(n,a,o){if(n&1&&Tc(o,f$,5),n&2){let s;co(s=fo())&&(a.listItemExtraDirective=s.first)}},hostAttrs:[1,"ant-list-item"],hostVars:2,hostBindings:function(n,a){n&2&&KR("ant-list-item-no-flex",a.nzNoFlex)},inputs:{nzActions:"nzActions",nzContent:"nzContent",nzExtra:"nzExtra",nzNoFlex:"nzNoFlex"},exportAs:["nzListItem"],standalone:!0,features:[ui],ngContentSelectors:L1e,decls:9,vars:2,consts:[["actionsTpl",""],["contentTpl",""],["extraTpl",""],["simpleTpl",""],[4,"ngIf","ngIfElse"],["nz-list-item-actions","",3,"nzActions",4,"ngIf"],["nz-list-item-actions","",3,"nzActions"],[4,"ngIf"],[4,"nzStringTemplateOutlet"],[3,"ngTemplateOutlet"],[1,"ant-list-item-main"]],template:function(n,a){if(n&1&&(Ho(R1e),br(0,p1e,2,1,"ng-template",null,0,gm)(2,v1e,3,1,"ng-template",null,1,gm)(4,g1e,1,0,"ng-template",null,2,gm)(6,M1e,4,4,"ng-template",null,3,gm)(8,C1e,6,4,"ng-container",4)),n&2){let o=gu(7);Ot(8),Rt("ngIf",a.isVerticalAndExtra)("ngIfElse",o)}},dependencies:[I1e,bl,qM,YM,L0,f$],encapsulation:2,changeDetection:0});let r=e;return A0([P0()],r.prototype,"nzNoFlex",void 0),r})();var NE=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=sV({type:e}),e.\u0275inj=oV({imports:[g$,v$,O1e,P1e,m$]});let r=e;return r})();var z1e=r=>({margin:r,width:"100%",height:"16rem"});function B1e(r,e){if(r&1&&li(0,"app-chart-component",28),r&2){let t=Lr(2).$implicit,i=Lr();hV(vV(3,z1e,"20px "+20/i.chartConfig.rowNumber+"px")),Rt("options",t.options)}}function k1e(r,e){if(r&1&&(tr(0,"div",26),br(1,B1e,1,5,"app-chart-component",27),lr()),r&2){let t=Lr().$implicit,i=Lr();Rt("nzSpan",24/i.chartConfig.rowNumber),Ot(),Rt("ngIf",t.checked)}}function V1e(r,e){if(r&1&&br(0,k1e,2,2,"div",25),r&2){let t=e.$implicit;Rt("ngIf",t.checked)}}function G1e(r,e){if(r&1&&(tr(0,"div",4)(1,"div",29),li(2,"app-chart-component",30),lr()()),r&2){let t=e.$implicit;Ot(2),Rt("options",t)}}var _$=(()=>{let e=class e{handleCheckedItems(i){console.log("\u5F53\u524D\u9009\u4E2D\u7684\u9879\u76EE:",i)}constructor(i){this._mqttService=i,this.http=xl(_m),this.modal=xl(ym),this.chartConfig={rowNumber:1,optionsCheckList:[{label:"\u5168\u6C34",options:{},checked:!0},{label:"\u70ED\u503C",options:{},checked:!0},{label:"\u5168\u786B",options:{},checked:!1},{label:"\u5185\u6C34",options:{},checked:!1},{label:"\u7070\u5206",options:{},checked:!1},{label:"\u6325\u53D1\u5206",options:{},checked:!1}],optionBottomList:[{}],optionsList:[{label:"\u5168\u6C34",options:{},checked:!0},{label:"\u70ED\u503C",options:{},checked:!0}],tableList:[{coldef:[{headerName:"\u65F6\u95F4",field:"rwmc",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u7CFB\u7EDF/\u8BBE\u5907",field:"rwms",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u64CD\u4F5C\u63CF\u8FF0",field:"kssj",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u64CD\u4F5C\u4EBA\u5458",field:"jhwcsj",unSortIcon:!0,minWidth:void 0,flex:1}],rowData:[]},{coldef:[{headerName:"\u5E8F\u53F7",field:"rwmc",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u65F6\u95F4",field:"kssj",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",field:"rwms",unSortIcon:!0,minWidth:void 0,flex:1},{headerName:"\u7B49\u7EA7",field:"dqzt",unSortIcon:!0,minWidth:void 0,flex:1}],rowData:[]}]},this.chart_options={},this.chart_options0={},this.chart_options1={},this.chart_options2={},this.chart_options3={},this.chart_options4={},this.rowData=[],this.colDefs1=[{headerName:"\u65F6\u95F4",field:"rwmc",flex:1},{headerName:"\u7CFB\u7EDF/\u8BBE\u5907",field:"rwms",flex:1},{headerName:"\u64CD\u4F5C\u63CF\u8FF0",field:"kssj",flex:1},{headerName:"\u64CD\u4F5C\u4EBA\u5458",field:"jhwcsj",flex:1}],this.colDefs2=[{headerName:"\u5E8F\u53F7",field:"rwmc",flex:1},{headerName:"\u65F6\u95F4",field:"kssj",flex:2},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",field:"rwms",flex:1},{headerName:"\u7B49\u7EA7",field:"dqzt",flex:1.5}],this.subscription=this._mqttService.observe("s1").subscribe(n=>{let a=JSON.parse(n.payload.toString());console.log("Received message as object: ",a.msg),this.chart_options0=a.msg})}ngOnInit(){this.getServerConfig();for(var i=1;i<30;i++)this.rowData.push({rwmc:"\u4EFB\u52A1"+i,rwms:"\u4EFB\u52A1\u63CF\u8FF0"+i,kssj:"2024-1-"+i+" 13:38:"+i*11,jhwcsj:"2024-1-"+i+" 13:38:"+i*10,sfcq:"\u5426",dqzt:"\u6B63\u5E38",dqjd:"\u8282\u70B9"+i,sjwcsj:"2024-1-"+i+" 13:38:"+i*27,bjmc:"\u62A5\u8B665",bjms:"\u62A5\u8B66\u63CF\u8FF05",bjsj:"2024-1-"+i+" 13:38:"+i*12,gzyy:"-",clff:"-",tzsj:"2024-1-"+i+" 13:38:"+i*19,zycd:"\u4E00\u822C",tzmc:"\u7CFB\u7EDF\u63D0\u793A",tznr:"\u8D26\u6237\u767B\u5F55",fj:"-",cz:"\u64CD\u4F5C"});for(var n=[],a=[],o=[],s=100,i=0;i{this.chartConfig.optionsCheckList[0].options=i.data,console.log(i)})}};e.\u0275fac=function(n){return new(n||e)(uo(RV))},e.\u0275cmp=si({type:e,selectors:[["app-data-v-s1"]],standalone:!0,features:[ui],decls:56,vars:13,consts:[["nz-row","",1,"s1-container",3,"nzGutter"],["nz-col","","nzSpan","8"],["title","\u7CFB\u7EDF\u72B6\u6001"],["nz-row","",2,"justify-content","center","align-items","center"],["nz-col","","nzSpan","12"],[1,"centered-element"],[2,"width","26rem","height","11rem",3,"options"],[1,"sys-status-title"],["title","\u7CFB\u7EDF\u64CD\u4F5C\u8BB0\u5F55",2,"margin-top","1rem"],[1,"ag-theme-datav",3,"rowData","columnDefs"],["title","\u7CFB\u7EDF\u62A5\u8B66\u4FE1\u606F",2,"margin-top","1rem"],["title","",2,"margin-top","1rem"],[1,"progress-container"],[1,"status-text"],[2,"width","100%",3,"nzPercent","nzStrokeColor"],[1,"status-ext-text"],[1,"progress-container","mt-sm"],["title",""],[2,"height","34.6rem"],["src","assets/dashboard/dashboard_ws_demo1.png",2,"width","100%"],["nz-row","",2,"justify-content","center","align-items","center","margin-top","0.5rem"],["nz-col","","nzSpan","12",1,"sys-status-title"],["title","\u5316\u9A8C\u7ED3\u679C",3,"showSetting","optionsList","onCheckedItemsChange"],["nz-row","",1,"scrollable-container"],["nz-row",""],["nz-col","","class","centered-element",3,"nzSpan",4,"ngIf"],["nz-col","",1,"centered-element",3,"nzSpan"],[3,"options","style",4,"ngIf"],[3,"options"],[1,"centered-element",2,"margin","2px"],[2,"width","26rem","height","11rem","margin-left","0.4rem",3,"options"],["nz-col","","class","centered-element",3,"nzSpan"]],template:function(n,a){n&1&&(tr(0,"div",0)(1,"div",1)(2,"data-v-card",2)(3,"div",3)(4,"div",4)(5,"div",5),li(6,"app-chart-component",6),lr(),tr(7,"div",7),Pi(8,"\u7CFB\u7EDF\u5065\u5EB7\u5EA6"),lr()(),tr(9,"div",4)(10,"div",5),li(11,"app-chart-component",6),lr(),tr(12,"div",7),Pi(13,"\u8BBE\u5907\u6295\u8FD0\u5EA6"),lr()()()(),tr(14,"data-v-card",8),li(15,"ag-grid-angular",9),lr(),tr(16,"data-v-card",10),li(17,"ag-grid-angular",9),lr(),tr(18,"data-v-card",11)(19,"div",12)(20,"span",13),Pi(21,"\u5316\u9A8C\u6548\u7387\uFF1A"),lr(),li(22,"nz-progress",14),tr(23,"span",15),Pi(24,"\uFF0816/25\uFF09"),lr()(),tr(25,"div",16)(26,"span",13),Pi(27,"\u5B8C \u6210 \u7387 \uFF1A"),lr(),li(28,"nz-progress",14),tr(29,"span",15),Pi(30,"\uFF0812/20\uFF09"),lr()()()(),tr(31,"div",1)(32,"data-v-card",17)(33,"div",18),li(34,"img",19),tr(35,"div",20)(36,"div",21),Pi(37," \u673A\u5668\u4EBA "),lr(),tr(38,"div",21),Pi(39," \u5168\u786B\u4EEA "),lr(),tr(40,"div",21),Pi(41," \u5168\u6C34\u5206\u6790\u4EEA "),lr(),tr(42,"div",21),Pi(43," \u6325\u53D1\u5206\u4EEA "),lr(),tr(44,"div",21),Pi(45," \u91CF\u70ED\u4EEA "),lr(),tr(46,"div",21),Pi(47," \u78B3\u6C22\u6C2E\u5143\u7D20 "),lr()()()()(),tr(48,"div",1)(49,"data-v-card",22),dV("onCheckedItemsChange",function(s){return a.handleCheckedItems(s)}),tr(50,"div",23),$R(51,V1e,1,1,"div",31,JR),lr(),tr(53,"div",24),$R(54,G1e,3,1,"div",4,JR),lr()()()()),n&2&&(Rt("nzGutter",16),Ot(6),Rt("options",a.chart_options),Ot(5),Rt("options",a.chart_options0),Ot(4),Rt("rowData",a.rowData)("columnDefs",a.colDefs1),Ot(2),Rt("rowData",a.rowData)("columnDefs",a.colDefs2),Ot(5),Rt("nzPercent",64)("nzStrokeColor","#74FAFB"),Ot(6),Rt("nzPercent",60)("nzStrokeColor","#74FAFB"),Ot(21),Rt("showSetting",!0)("optionsList",a.chartConfig.optionsCheckList),Ot(2),QR(a.chartConfig.optionsCheckList),Ot(3),QR(a.chartConfig.optionBottomList))},dependencies:[XM,bl,jM,rf,EV,AV,CV,NE,Dc,Ic,Kc,Wc,$c,Qc,Jc,Zc,Pc,Vc,Hc,nf,qc,Xc,JM,KM,Tl,Cc,Bc,kc,ef,Fc,El,Yc,Oc,Gc,zc,tf,Lc,Rc,jc,Uc,Ac,Nc,wl,l$],styles:[".dashboard-container[_ngcontent-%COMP%]{width:20rem;height:10rem;margin-top:-3rem;margin-bottom:-2rem}.sys-status-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#94ddf3;text-align:center}.ag-theme-datav[_ngcontent-%COMP%]{--ag-border-color: #74FAFB;--ag-foreground-color: #74FAFB;--ag-background-color: #0A1632;--ag-header-foreground-color: #74FAFB;--ag-header-background-color: #0A1632;--ag-odd-row-background-color: #0A1632;--ag-header-column-resize-handle-color: #7e2e84;--ag-font-size: 17px;--ag-font-family: monospace;height:5rem}.centered-element[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%}.status-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem}.status-circle[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:50%}.status-circle.red[_ngcontent-%COMP%]{background-color:red}.status-circle.green[_ngcontent-%COMP%]{background-color:green}.progress-container[_ngcontent-%COMP%]{display:flex;color:#fff}.progress-container[_ngcontent-%COMP%] .status-text[_ngcontent-%COMP%]{width:8rem;margin-left:6px;font-size:16px;font-weight:600;color:#74fafb}.progress-container[_ngcontent-%COMP%] .status-ext-text[_ngcontent-%COMP%]{margin-top:3px;font-size:12px}.progress-display[_ngcontent-%COMP%]{color:#fff;text-align:right}.statistic-item-container[_ngcontent-%COMP%]{display:flex;padding:1rem 0;color:#fff}.white-color-theme[_ngcontent-%COMP%]{color:#74fafb}.scrollable-container[_ngcontent-%COMP%]{scrollbar-color:auto;overflow-y:auto;width:100%;height:20rem} ::-webkit-scrollbar{width:10px} ::-webkit-scrollbar-track{background-color:#0a1632} ::-webkit-scrollbar-thumb{background-color:#74fafb;border-radius:2px} ::-webkit-scrollbar-thumb:hover{background-color:#74fafb}"]});let r=e;return r})();function H1e(r,e){if(r&1&&(tr(0,"li")(1,"a",2),Pi(2),lr()()),r&2){let t=e.$implicit;Ot(),Rt("routerLink",t.link),Ot(),Ec(t.text)}}function W1e(r,e){if(r&1&&(tr(0,"div")(1,"ul"),br(2,H1e,3,2,"li",1),lr()()),r&2){let t=Lr();Ot(2),Rt("ngForOf",t.children)}}var x$=(()=>{let e=class e{constructor(i,n){this.route=i,this.router=n,this.menu=null,this.children=null}ngOnInit(){let i=this.router.getCurrentNavigation();i?.extras.state&&(this.menu=i.extras.state.menu,this.children=this.menu?.children||null,console.log("\u7A7F\u5E26\u8FC7\u6765\u7684\u83DC\u5355\u53C2\u6570"),console.log(this.menu),console.log(this.children))}navigateToChild(i){i.link&&this.router.navigateByUrl(i.link)}};e.\u0275fac=function(n){return new(n||e)(uo(gV),uo(yV))},e.\u0275cmp=si({type:e,selectors:[["app-data-v-s1"]],standalone:!0,features:[ui],decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"routerLink"]],template:function(n,a){n&1&&br(0,W1e,3,1,"div",0),n&2&&Rt("ngIf",a.children&&a.children.length)},dependencies:[XM,R0,bl,jM,rf,NE,Dc,Ic,_V,Kc,Wc,$c,Qc,Jc,Zc,Pc,Vc,Hc,nf,qc,Xc,Tl,Cc,Bc,kc,ef,Fc,El,Yc,Oc,Gc,zc,tf,Lc,Rc,jc,Uc,Ac,Nc,wl],styles:[".dashboard-container[_ngcontent-%COMP%]{width:20rem;height:10rem;margin-top:-3rem;margin-bottom:-2rem}.sys-status-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#94ddf3;text-align:center}.ag-theme-datav[_ngcontent-%COMP%]{--ag-border-color: #74FAFB;--ag-foreground-color: #74FAFB;--ag-background-color: #0A1632;--ag-header-foreground-color: #74FAFB;--ag-header-background-color: #0A1632;--ag-odd-row-background-color: #0A1632;--ag-header-column-resize-handle-color: #7e2e84;--ag-font-size: 17px;--ag-font-family: monospace;height:5rem}.scrollable-container[_ngcontent-%COMP%]{overflow-y:auto;width:100%;height:20rem}.centered-element[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%}.status-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem}.status-circle[_ngcontent-%COMP%]{width:18px;height:18px;border-radius:50%}.status-circle.red[_ngcontent-%COMP%]{background-color:red}.status-circle.green[_ngcontent-%COMP%]{background-color:green}.progress-container[_ngcontent-%COMP%]{display:flex;color:#fff}.progress-container[_ngcontent-%COMP%] .status-text[_ngcontent-%COMP%]{width:8rem;margin-left:6px;font-size:16px;font-weight:600;color:#74fafb}.progress-container[_ngcontent-%COMP%] .status-ext-text[_ngcontent-%COMP%]{margin-top:3px;font-size:12px}.progress-display[_ngcontent-%COMP%]{color:#fff;text-align:right}.statistic-item-container[_ngcontent-%COMP%]{display:flex;padding:1rem 0;color:#fff}.white-color-theme[_ngcontent-%COMP%]{color:#74fafb}"]});let r=e;return r})();var S$=(()=>{let e=class e{constructor(){this.http=xl(_m),this.modal=xl(ym)}ngOnInit(){}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["app-data-v-threejs"]],standalone:!0,features:[ui],decls:1,vars:0,consts:[["src","http://112.33.111.160:8083/","width","100%","height","650px",2,"border","0"]],template:function(n,a){n&1&&li(0,"iframe",0)},dependencies:[Dc,Ic,Kc,Wc,$c,Qc,Jc,Zc,Pc,Vc,Hc,nf,qc,Xc,Tl,Cc,Bc,kc,ef,rf,Fc,El,Yc,Oc,Gc,zc,tf,Lc,Rc,jc,Uc,Ac,Nc,wl]});let r=e;return r})();var rS="162";var M$=0,W3=1,b$=2;var UE=1,w$=2,nl=3,Ao=0,_i=1,Co=2,ms=0,Yu=1,X3=2,Y3=3,q3=4,T$=5,qu=100,E$=101,A$=102,Z3=103,j3=104,C$=200,R$=201,L$=202,P$=203,iS=204,nS=205,D$=206,I$=207,N$=208,U$=209,O$=210,F$=211,z$=212,B$=213,k$=214,V$=0,G$=1,H$=2,lg=3,W$=4,X$=5,Y$=6,q$=7,OE=0,Z$=1,j$=2,vs=0,K$=1,J$=2,$$=3,Q$=4,eQ=5,tQ=6,rQ=7;var K3=300,al=301,tu=302,aS=303,oS=304,oh=306,sS=1e3,ma=1001,lS=1002,ki=1003,J3=1004;var ug=1005;var Qi=1006,FE=1007;var ol=1008;var Ro=1009,iQ=1010,nQ=1011,cg=1012,zE=1013,Lo=1014,Ya=1015,Zu=1016,BE=1017,kE=1018,gs=1020,aQ=1021,Rn=1023,oQ=1024,sQ=1025,sl=1026,ru=1027,lQ=1028,VE=1029,uQ=1030,GE=1031,HE=1033,WE=33776,XE=33777,YE=33778,qE=33779,$3=35840,Q3=35841,eF=35842,tF=35843,ZE=36196,rF=37492,iF=37496,nF=37808,aF=37809,oF=37810,sF=37811,lF=37812,uF=37813,cF=37814,fF=37815,hF=37816,pF=37817,dF=37818,mF=37819,vF=37820,gF=37821,jE=36492,yF=36494,_F=36495,cQ=36283,xF=36284,SF=36285,MF=36286;var fQ=3200,hQ=3201,pQ=0,dQ=1,ys="",qa="srgb",Za="srgb-linear",fg="display-p3",dd="display-p3-linear",hg="linear",Hr="srgb",pg="rec709",dg="p3";var md=7680;var bF=519,mQ=512,vQ=513,gQ=514,KE=515,yQ=516,_Q=517,xQ=518,SQ=519,wF=35044;var TF="300 es",uS=1035,ja=2e3,vd=2001;var Ka=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let n=this._listeners[e];if(n!==void 0){let a=n.indexOf(t);a!==-1&&n.splice(a,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let i=this._listeners[e.type];if(i!==void 0){e.target=this;let n=i.slice(0);for(let a=0,o=n.length;a>8&255]+Yn[r>>16&255]+Yn[r>>24&255]+"-"+Yn[e&255]+Yn[e>>8&255]+"-"+Yn[e>>16&15|64]+Yn[e>>24&255]+"-"+Yn[t&63|128]+Yn[t>>8&255]+"-"+Yn[t>>16&255]+Yn[t>>24&255]+Yn[i&255]+Yn[i>>8&255]+Yn[i>>16&255]+Yn[i>>24&255]).toLowerCase()}function en(r,e,t){return Math.max(e,Math.min(t,r))}function MQ(r,e){return(r%e+e)%e}function $E(r,e,t){return(1-t)*r+t*e}function EF(r){return(r&r-1)===0&&r!==0}function fS(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function mg(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function va(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var Kt=class r{constructor(e=0,t=0){r.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(en(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),n=Math.sin(t),a=this.x-e.x,o=this.y-e.y;return this.x=a*i-o*n+e.x,this.y=a*n+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};var $t=class r{constructor(e,t,i,n,a,o,s,l,u){r.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,n,a,o,s,l,u)}set(e,t,i,n,a,o,s,l,u){let c=this.elements;return c[0]=e,c[1]=n,c[2]=s,c[3]=t,c[4]=a,c[5]=l,c[6]=i,c[7]=o,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,n=t.elements,a=this.elements,o=i[0],s=i[3],l=i[6],u=i[1],c=i[4],f=i[7],h=i[2],p=i[5],d=i[8],g=n[0],m=n[3],v=n[6],_=n[1],y=n[4],x=n[7],M=n[2],S=n[5],w=n[8];return a[0]=o*g+s*_+l*M,a[3]=o*m+s*y+l*S,a[6]=o*v+s*x+l*w,a[1]=u*g+c*_+f*M,a[4]=u*m+c*y+f*S,a[7]=u*v+c*x+f*w,a[2]=h*g+p*_+d*M,a[5]=h*m+p*y+d*S,a[8]=h*v+p*x+d*w,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return t*o*c-t*s*u-i*a*c+i*s*l+n*a*u-n*o*l}invert(){let e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=c*o-s*u,h=s*l-c*a,p=u*a-o*l,d=t*f+i*h+n*p;if(d===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/d;return e[0]=f*g,e[1]=(n*u-c*i)*g,e[2]=(s*i-n*o)*g,e[3]=h*g,e[4]=(c*t-n*l)*g,e[5]=(n*a-s*t)*g,e[6]=p*g,e[7]=(i*l-u*t)*g,e[8]=(o*t-i*a)*g,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,a,o,s){let l=Math.cos(a),u=Math.sin(a);return this.set(i*l,i*u,-i*(l*o+u*s)+o+e,-n*u,n*l,-n*(-u*o+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(AF.makeScale(e,t)),this}rotate(e){return this.premultiply(AF.makeRotation(-e)),this}translate(e,t){return this.premultiply(AF.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,i=e.elements;for(let n=0;n<9;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}},AF=new $t;function QE(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function vg(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function wQ(){let r=vg("canvas");return r.style.display="block",r}var bQ={};function TQ(r){r in bQ||(bQ[r]=!0,console.warn(r))}var EQ=new $t().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),AQ=new $t().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),eA={[Za]:{transfer:hg,primaries:pg,toReference:r=>r,fromReference:r=>r},[qa]:{transfer:Hr,primaries:pg,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[dd]:{transfer:hg,primaries:dg,toReference:r=>r.applyMatrix3(AQ),fromReference:r=>r.applyMatrix3(EQ)},[fg]:{transfer:Hr,primaries:dg,toReference:r=>r.convertSRGBToLinear().applyMatrix3(AQ),fromReference:r=>r.applyMatrix3(EQ).convertLinearToSRGB()}},X1e=new Set([Za,dd]),Er={enabled:!0,_workingColorSpace:Za,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!X1e.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,e,t){if(this.enabled===!1||e===t||!e||!t)return r;let i=eA[e].toReference,n=eA[t].fromReference;return n(i(r))},fromWorkingColorSpace:function(r,e){return this.convert(r,this._workingColorSpace,e)},toWorkingColorSpace:function(r,e){return this.convert(r,e,this._workingColorSpace)},getPrimaries:function(r){return eA[r].primaries},getTransfer:function(r){return r===ys?hg:eA[r].transfer}};function sh(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function tA(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var gg,yg=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{gg===void 0&&(gg=vg("canvas")),gg.width=e.width,gg.height=e.height;let i=gg.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=gg}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=vg("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let n=i.getImageData(0,0,e.width,e.height),a=n.data;for(let o=0;o{class r extends Ka{constructor(t=r.DEFAULT_IMAGE,i=r.DEFAULT_MAPPING,n=ma,a=ma,o=Qi,s=ol,l=Rn,u=Ro,c=r.DEFAULT_ANISOTROPY,f=ys){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:q1e++}),this.uuid=iu(),this.name="",this.source=new _g(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=n,this.wrapT=a,this.magFilter=o,this.minFilter=s,this.anisotropy=c,this.format=l,this.internalFormat=null,this.type=u,this.offset=new Kt(0,0),this.repeat=new Kt(1,1),this.center=new Kt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new $t,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=f,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){let i=t===void 0||typeof t=="string";if(!i&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),i||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==K3)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case sS:t.x=t.x-Math.floor(t.x);break;case ma:t.x=t.x<0?0:1;break;case lS: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 sS:t.y=t.y-Math.floor(t.y);break;case ma:t.y=t.y<0?0:1;break;case lS: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)}}return r.DEFAULT_IMAGE=null,r.DEFAULT_MAPPING=K3,r.DEFAULT_ANISOTROPY=1,r})();var ii=class r{constructor(e=0,t=0,i=0,n=1){r.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,n=this.z,a=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*n+o[12]*a,this.y=o[1]*t+o[5]*i+o[9]*n+o[13]*a,this.z=o[2]*t+o[6]*i+o[10]*n+o[14]*a,this.w=o[3]*t+o[7]*i+o[11]*n+o[15]*a,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,a,l=e.elements,u=l[0],c=l[4],f=l[8],h=l[1],p=l[5],d=l[9],g=l[2],m=l[6],v=l[10];if(Math.abs(c-h)<.01&&Math.abs(f-g)<.01&&Math.abs(d-m)<.01){if(Math.abs(c+h)<.1&&Math.abs(f+g)<.1&&Math.abs(d+m)<.1&&Math.abs(u+p+v-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(u+1)/2,x=(p+1)/2,M=(v+1)/2,S=(c+h)/4,w=(f+g)/4,T=(d+m)/4;return y>x&&y>M?y<.01?(i=0,n=.707106781,a=.707106781):(i=Math.sqrt(y),n=S/i,a=w/i):x>M?x<.01?(i=.707106781,n=0,a=.707106781):(n=Math.sqrt(x),i=S/n,a=T/n):M<.01?(i=.707106781,n=.707106781,a=0):(a=Math.sqrt(M),i=w/a,n=T/a),this.set(i,n,a,t),this}let _=Math.sqrt((m-d)*(m-d)+(f-g)*(f-g)+(h-c)*(h-c));return Math.abs(_)<.001&&(_=1),this.x=(m-d)/_,this.y=(f-g)/_,this.z=(h-c)/_,this.w=Math.acos((u+p+v-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};var rA=class extends Ka{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new ii(0,0,e,t),this.scissorTest=!1,this.viewport=new ii(0,0,e,t);let n={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Qi,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},i);let a=new Ja(n,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);a.flipY=!1,a.generateMipmaps=i.generateMipmaps,a.internalFormat=i.internalFormat,this.textures=[];let o=i.count;for(let s=0;s=0?1:-1,y=1-v*v;if(y>Number.EPSILON){let M=Math.sqrt(y),S=Math.atan2(M,v*_);m=Math.sin(m*S)/M,s=Math.sin(s*S)/M}let x=s*_;if(l=l*m+h*x,u=u*m+p*x,c=c*m+d*x,f=f*m+g*x,m===1-s){let M=1/Math.sqrt(l*l+u*u+c*c+f*f);l*=M,u*=M,c*=M,f*=M}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,n,a,o){let s=i[n],l=i[n+1],u=i[n+2],c=i[n+3],f=a[o],h=a[o+1],p=a[o+2],d=a[o+3];return e[t]=s*d+c*f+l*p-u*h,e[t+1]=l*d+c*h+u*f-s*p,e[t+2]=u*d+c*p+s*h-l*f,e[t+3]=c*d-s*f-l*h-u*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let i=e._x,n=e._y,a=e._z,o=e._order,s=Math.cos,l=Math.sin,u=s(i/2),c=s(n/2),f=s(a/2),h=l(i/2),p=l(n/2),d=l(a/2);switch(o){case"XYZ":this._x=h*c*f+u*p*d,this._y=u*p*f-h*c*d,this._z=u*c*d+h*p*f,this._w=u*c*f-h*p*d;break;case"YXZ":this._x=h*c*f+u*p*d,this._y=u*p*f-h*c*d,this._z=u*c*d-h*p*f,this._w=u*c*f+h*p*d;break;case"ZXY":this._x=h*c*f-u*p*d,this._y=u*p*f+h*c*d,this._z=u*c*d+h*p*f,this._w=u*c*f-h*p*d;break;case"ZYX":this._x=h*c*f-u*p*d,this._y=u*p*f+h*c*d,this._z=u*c*d-h*p*f,this._w=u*c*f+h*p*d;break;case"YZX":this._x=h*c*f+u*p*d,this._y=u*p*f+h*c*d,this._z=u*c*d-h*p*f,this._w=u*c*f-h*p*d;break;case"XZY":this._x=h*c*f-u*p*d,this._y=u*p*f-h*c*d,this._z=u*c*d+h*p*f,this._w=u*c*f+h*p*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],n=t[4],a=t[8],o=t[1],s=t[5],l=t[9],u=t[2],c=t[6],f=t[10],h=i+s+f;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(c-l)*p,this._y=(a-u)*p,this._z=(o-n)*p}else if(i>s&&i>f){let p=2*Math.sqrt(1+i-s-f);this._w=(c-l)/p,this._x=.25*p,this._y=(n+o)/p,this._z=(a+u)/p}else if(s>f){let p=2*Math.sqrt(1+s-i-f);this._w=(a-u)/p,this._x=(n+o)/p,this._y=.25*p,this._z=(l+c)/p}else{let p=2*Math.sqrt(1+f-i-s);this._w=(o-n)/p,this._x=(a+u)/p,this._y=(l+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(en(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let n=Math.min(1,t/i);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,n=e._y,a=e._z,o=e._w,s=t._x,l=t._y,u=t._z,c=t._w;return this._x=i*c+o*s+n*u-a*l,this._y=n*c+o*l+a*s-i*u,this._z=a*c+o*u+i*l-n*s,this._w=o*c-i*s-n*l-a*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let i=this._x,n=this._y,a=this._z,o=this._w,s=o*e._w+i*e._x+n*e._y+a*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=i,this._y=n,this._z=a,this;let l=1-s*s;if(l<=Number.EPSILON){let p=1-t;return this._w=p*o+t*this._w,this._x=p*i+t*this._x,this._y=p*n+t*this._y,this._z=p*a+t*this._z,this.normalize(),this}let u=Math.sqrt(l),c=Math.atan2(u,s),f=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=n*f+this._y*h,this._z=a*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),a=Math.sqrt(i);return this.set(n*Math.sin(e),n*Math.cos(e),a*Math.sin(t),a*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}};var be=class r{constructor(e=0,t=0,i=0){r.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(CQ.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(CQ.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,n=this.z,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6]*n,this.y=a[1]*t+a[4]*i+a[7]*n,this.z=a[2]*t+a[5]*i+a[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,n=this.z,a=e.elements,o=1/(a[3]*t+a[7]*i+a[11]*n+a[15]);return this.x=(a[0]*t+a[4]*i+a[8]*n+a[12])*o,this.y=(a[1]*t+a[5]*i+a[9]*n+a[13])*o,this.z=(a[2]*t+a[6]*i+a[10]*n+a[14])*o,this}applyQuaternion(e){let t=this.x,i=this.y,n=this.z,a=e.x,o=e.y,s=e.z,l=e.w,u=2*(o*n-s*i),c=2*(s*t-a*n),f=2*(a*i-o*t);return this.x=t+l*u+o*f-s*c,this.y=i+l*c+s*u-a*f,this.z=n+l*f+a*c-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,n=this.z,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n,this.y=a[1]*t+a[5]*i+a[9]*n,this.z=a[2]*t+a[6]*i+a[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,n=e.y,a=e.z,o=t.x,s=t.y,l=t.z;return this.x=n*l-a*s,this.y=a*o-i*l,this.z=i*s-n*o,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return RF.copy(this).projectOnVector(e),this.sub(RF)}reflect(e){return this.sub(RF.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(en(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},RF=new be,CQ=new au;var Ku=class{constructor(e=new be(1/0,1/0,1/0),t=new be(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,ll),ll.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(hS),aA.subVectors(this.max,hS),Sg.subVectors(e.a,hS),Mg.subVectors(e.b,hS),bg.subVectors(e.c,hS),lh.subVectors(Mg,Sg),uh.subVectors(bg,Mg),gd.subVectors(Sg,bg);let t=[0,-lh.z,lh.y,0,-uh.z,uh.y,0,-gd.z,gd.y,lh.z,0,-lh.x,uh.z,0,-uh.x,gd.z,0,-gd.x,-lh.y,lh.x,0,-uh.y,uh.x,0,-gd.y,gd.x,0];return!LF(t,Sg,Mg,bg,aA)||(t=[1,0,0,0,1,0,0,0,1],!LF(t,Sg,Mg,bg,aA))?!1:(oA.crossVectors(lh,uh),t=[oA.x,oA.y,oA.z],LF(t,Sg,Mg,bg,aA))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ll).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ll).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:(ju[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ju[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ju[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ju[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ju[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ju[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ju[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ju[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ju),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)}},ju=[new be,new be,new be,new be,new be,new be,new be,new be],ll=new be,nA=new Ku,Sg=new be,Mg=new be,bg=new be,lh=new be,uh=new be,gd=new be,hS=new be,aA=new be,oA=new be,yd=new be;function LF(r,e,t,i,n){for(let a=0,o=r.length-3;a<=o;a+=3){yd.fromArray(r,a);let s=n.x*Math.abs(yd.x)+n.y*Math.abs(yd.y)+n.z*Math.abs(yd.z),l=e.dot(yd),u=t.dot(yd),c=i.dot(yd);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}var Z1e=new Ku,pS=new be,PF=new be,ch=class{constructor(e=new be,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;t!==void 0?i.copy(t):Z1e.setFromPoints(e).getCenter(i);let n=0;for(let a=0,o=e.length;athis.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;pS.subVectors(e,this.center);let t=pS.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),n=(i-this.radius)*.5;this.center.addScaledVector(pS,n/i),this.radius+=n}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):(PF.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(pS.copy(e.center).add(PF)),this.expandByPoint(pS.copy(e.center).sub(PF))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};var Ju=new be,DF=new be,sA=new be,fh=new be,IF=new be,lA=new be,NF=new be,uA=class{constructor(e=new be,t=new be(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,Ju)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Ju.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ju.copy(this.origin).addScaledVector(this.direction,t),Ju.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){DF.copy(e).add(t).multiplyScalar(.5),sA.copy(t).sub(e).normalize(),fh.copy(this.origin).sub(DF);let a=e.distanceTo(t)*.5,o=-this.direction.dot(sA),s=fh.dot(this.direction),l=-fh.dot(sA),u=fh.lengthSq(),c=Math.abs(1-o*o),f,h,p,d;if(c>0)if(f=o*l-s,h=o*s-l,d=a*c,f>=0)if(h>=-d)if(h<=d){let g=1/c;f*=g,h*=g,p=f*(f+o*h+2*s)+h*(o*f+h+2*l)+u}else h=a,f=Math.max(0,-(o*h+s)),p=-f*f+h*(h+2*l)+u;else h=-a,f=Math.max(0,-(o*h+s)),p=-f*f+h*(h+2*l)+u;else h<=-d?(f=Math.max(0,-(-o*a+s)),h=f>0?-a:Math.min(Math.max(-a,-l),a),p=-f*f+h*(h+2*l)+u):h<=d?(f=0,h=Math.min(Math.max(-a,-l),a),p=h*(h+2*l)+u):(f=Math.max(0,-(o*a+s)),h=f>0?a:Math.min(Math.max(-a,-l),a),p=-f*f+h*(h+2*l)+u);else h=o>0?-a:a,f=Math.max(0,-(o*h+s)),p=-f*f+h*(h+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,f),n&&n.copy(DF).addScaledVector(sA,h),p}intersectSphere(e,t){Ju.subVectors(e.center,this.origin);let i=Ju.dot(this.direction),n=Ju.dot(Ju)-i*i,a=e.radius*e.radius;if(n>a)return null;let o=Math.sqrt(a-n),s=i-o,l=i+o;return l<0?null:s<0?this.at(l,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,a,o,s,l,u=1/this.direction.x,c=1/this.direction.y,f=1/this.direction.z,h=this.origin;return u>=0?(i=(e.min.x-h.x)*u,n=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,n=(e.min.x-h.x)*u),c>=0?(a=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(a=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),i>o||a>n||((a>i||isNaN(i))&&(i=a),(o=0?(s=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(s=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||s>n)||((s>i||i!==i)&&(i=s),(l=0?i:n,t)}intersectsBox(e){return this.intersectBox(e,Ju)!==null}intersectTriangle(e,t,i,n,a){IF.subVectors(t,e),lA.subVectors(i,e),NF.crossVectors(IF,lA);let o=this.direction.dot(NF),s;if(o>0){if(n)return null;s=1}else if(o<0)s=-1,o=-o;else return null;fh.subVectors(this.origin,e);let l=s*this.direction.dot(lA.crossVectors(fh,lA));if(l<0)return null;let u=s*this.direction.dot(IF.cross(fh));if(u<0||l+u>o)return null;let c=-s*fh.dot(NF);return c<0?null:this.at(c/o,a)}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)}};var Wr=class r{constructor(e,t,i,n,a,o,s,l,u,c,f,h,p,d,g,m){r.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,n,a,o,s,l,u,c,f,h,p,d,g,m)}set(e,t,i,n,a,o,s,l,u,c,f,h,p,d,g,m){let v=this.elements;return v[0]=e,v[4]=t,v[8]=i,v[12]=n,v[1]=a,v[5]=o,v[9]=s,v[13]=l,v[2]=u,v[6]=c,v[10]=f,v[14]=h,v[3]=p,v[7]=d,v[11]=g,v[15]=m,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 r().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,i=e.elements,n=1/wg.setFromMatrixColumn(e,0).length(),a=1/wg.setFromMatrixColumn(e,1).length(),o=1/wg.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*a,t[5]=i[5]*a,t[6]=i[6]*a,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,n=e.y,a=e.z,o=Math.cos(i),s=Math.sin(i),l=Math.cos(n),u=Math.sin(n),c=Math.cos(a),f=Math.sin(a);if(e.order==="XYZ"){let h=o*c,p=o*f,d=s*c,g=s*f;t[0]=l*c,t[4]=-l*f,t[8]=u,t[1]=p+d*u,t[5]=h-g*u,t[9]=-s*l,t[2]=g-h*u,t[6]=d+p*u,t[10]=o*l}else if(e.order==="YXZ"){let h=l*c,p=l*f,d=u*c,g=u*f;t[0]=h+g*s,t[4]=d*s-p,t[8]=o*u,t[1]=o*f,t[5]=o*c,t[9]=-s,t[2]=p*s-d,t[6]=g+h*s,t[10]=o*l}else if(e.order==="ZXY"){let h=l*c,p=l*f,d=u*c,g=u*f;t[0]=h-g*s,t[4]=-o*f,t[8]=d+p*s,t[1]=p+d*s,t[5]=o*c,t[9]=g-h*s,t[2]=-o*u,t[6]=s,t[10]=o*l}else if(e.order==="ZYX"){let h=o*c,p=o*f,d=s*c,g=s*f;t[0]=l*c,t[4]=d*u-p,t[8]=h*u+g,t[1]=l*f,t[5]=g*u+h,t[9]=p*u-d,t[2]=-u,t[6]=s*l,t[10]=o*l}else if(e.order==="YZX"){let h=o*l,p=o*u,d=s*l,g=s*u;t[0]=l*c,t[4]=g-h*f,t[8]=d*f+p,t[1]=f,t[5]=o*c,t[9]=-s*c,t[2]=-u*c,t[6]=p*f+d,t[10]=h-g*f}else if(e.order==="XZY"){let h=o*l,p=o*u,d=s*l,g=s*u;t[0]=l*c,t[4]=-f,t[8]=u*c,t[1]=h*f+g,t[5]=o*c,t[9]=p*f-d,t[2]=d*f-p,t[6]=s*c,t[10]=g*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(j1e,e,K1e)}lookAt(e,t,i){let n=this.elements;return Po.subVectors(e,t),Po.lengthSq()===0&&(Po.z=1),Po.normalize(),hh.crossVectors(i,Po),hh.lengthSq()===0&&(Math.abs(i.z)===1?Po.x+=1e-4:Po.z+=1e-4,Po.normalize(),hh.crossVectors(i,Po)),hh.normalize(),cA.crossVectors(Po,hh),n[0]=hh.x,n[4]=cA.x,n[8]=Po.x,n[1]=hh.y,n[5]=cA.y,n[9]=Po.y,n[2]=hh.z,n[6]=cA.z,n[10]=Po.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,n=t.elements,a=this.elements,o=i[0],s=i[4],l=i[8],u=i[12],c=i[1],f=i[5],h=i[9],p=i[13],d=i[2],g=i[6],m=i[10],v=i[14],_=i[3],y=i[7],x=i[11],M=i[15],S=n[0],w=n[4],T=n[8],C=n[12],b=n[1],E=n[5],I=n[9],R=n[13],A=n[2],D=n[6],U=n[10],B=n[14],F=n[3],k=n[7],G=n[11],Y=n[15];return a[0]=o*S+s*b+l*A+u*F,a[4]=o*w+s*E+l*D+u*k,a[8]=o*T+s*I+l*U+u*G,a[12]=o*C+s*R+l*B+u*Y,a[1]=c*S+f*b+h*A+p*F,a[5]=c*w+f*E+h*D+p*k,a[9]=c*T+f*I+h*U+p*G,a[13]=c*C+f*R+h*B+p*Y,a[2]=d*S+g*b+m*A+v*F,a[6]=d*w+g*E+m*D+v*k,a[10]=d*T+g*I+m*U+v*G,a[14]=d*C+g*R+m*B+v*Y,a[3]=_*S+y*b+x*A+M*F,a[7]=_*w+y*E+x*D+M*k,a[11]=_*T+y*I+x*U+M*G,a[15]=_*C+y*R+x*B+M*Y,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],n=e[8],a=e[12],o=e[1],s=e[5],l=e[9],u=e[13],c=e[2],f=e[6],h=e[10],p=e[14],d=e[3],g=e[7],m=e[11],v=e[15];return d*(+a*l*f-n*u*f-a*s*h+i*u*h+n*s*p-i*l*p)+g*(+t*l*p-t*u*h+a*o*h-n*o*p+n*u*c-a*l*c)+m*(+t*u*f-t*s*p-a*o*f+i*o*p+a*s*c-i*u*c)+v*(-n*s*c-t*l*f+t*s*h+n*o*f-i*o*h+i*l*c)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],m=e[14],v=e[15],_=f*m*u-g*h*u+g*l*p-s*m*p-f*l*v+s*h*v,y=d*h*u-c*m*u-d*l*p+o*m*p+c*l*v-o*h*v,x=c*g*u-d*f*u+d*s*p-o*g*p-c*s*v+o*f*v,M=d*f*l-c*g*l-d*s*h+o*g*h+c*s*m-o*f*m,S=t*_+i*y+n*x+a*M;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let w=1/S;return e[0]=_*w,e[1]=(g*h*a-f*m*a-g*n*p+i*m*p+f*n*v-i*h*v)*w,e[2]=(s*m*a-g*l*a+g*n*u-i*m*u-s*n*v+i*l*v)*w,e[3]=(f*l*a-s*h*a-f*n*u+i*h*u+s*n*p-i*l*p)*w,e[4]=y*w,e[5]=(c*m*a-d*h*a+d*n*p-t*m*p-c*n*v+t*h*v)*w,e[6]=(d*l*a-o*m*a-d*n*u+t*m*u+o*n*v-t*l*v)*w,e[7]=(o*h*a-c*l*a+c*n*u-t*h*u-o*n*p+t*l*p)*w,e[8]=x*w,e[9]=(d*f*a-c*g*a-d*i*p+t*g*p+c*i*v-t*f*v)*w,e[10]=(o*g*a-d*s*a+d*i*u-t*g*u-o*i*v+t*s*v)*w,e[11]=(c*s*a-o*f*a-c*i*u+t*f*u+o*i*p-t*s*p)*w,e[12]=M*w,e[13]=(c*g*n-d*f*n+d*i*h-t*g*h-c*i*m+t*f*m)*w,e[14]=(d*s*n-o*g*n-d*i*l+t*g*l+o*i*m-t*s*m)*w,e[15]=(o*f*n-c*s*n+c*i*l-t*f*l-o*i*h+t*s*h)*w,this}scale(e){let t=this.elements,i=e.x,n=e.y,a=e.z;return t[0]*=i,t[4]*=n,t[8]*=a,t[1]*=i,t[5]*=n,t[9]*=a,t[2]*=i,t[6]*=n,t[10]*=a,t[3]*=i,t[7]*=n,t[11]*=a,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),n=Math.sin(t),a=1-i,o=e.x,s=e.y,l=e.z,u=a*o,c=a*s;return this.set(u*o+i,u*s-n*l,u*l+n*s,0,u*s+n*l,c*s+i,c*l-n*o,0,u*l-n*s,c*l+n*o,a*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,a,o){return this.set(1,i,a,0,e,1,o,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){let n=this.elements,a=t._x,o=t._y,s=t._z,l=t._w,u=a+a,c=o+o,f=s+s,h=a*u,p=a*c,d=a*f,g=o*c,m=o*f,v=s*f,_=l*u,y=l*c,x=l*f,M=i.x,S=i.y,w=i.z;return n[0]=(1-(g+v))*M,n[1]=(p+x)*M,n[2]=(d-y)*M,n[3]=0,n[4]=(p-x)*S,n[5]=(1-(h+v))*S,n[6]=(m+_)*S,n[7]=0,n[8]=(d+y)*w,n[9]=(m-_)*w,n[10]=(1-(h+g))*w,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){let n=this.elements,a=wg.set(n[0],n[1],n[2]).length(),o=wg.set(n[4],n[5],n[6]).length(),s=wg.set(n[8],n[9],n[10]).length();this.determinant()<0&&(a=-a),e.x=n[12],e.y=n[13],e.z=n[14],ul.copy(this);let u=1/a,c=1/o,f=1/s;return ul.elements[0]*=u,ul.elements[1]*=u,ul.elements[2]*=u,ul.elements[4]*=c,ul.elements[5]*=c,ul.elements[6]*=c,ul.elements[8]*=f,ul.elements[9]*=f,ul.elements[10]*=f,t.setFromRotationMatrix(ul),i.x=a,i.y=o,i.z=s,this}makePerspective(e,t,i,n,a,o,s=ja){let l=this.elements,u=2*a/(t-e),c=2*a/(i-n),f=(t+e)/(t-e),h=(i+n)/(i-n),p,d;if(s===ja)p=-(o+a)/(o-a),d=-2*o*a/(o-a);else if(s===vd)p=-o/(o-a),d=-o*a/(o-a);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=u,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=c,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=d,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,n,a,o,s=ja){let l=this.elements,u=1/(t-e),c=1/(i-n),f=1/(o-a),h=(t+e)*u,p=(i+n)*c,d,g;if(s===ja)d=(o+a)*f,g=-2*f;else if(s===vd)d=a*f,g=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=g,l[14]=-d,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let n=0;n<16;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},wg=new be,ul=new Wr,j1e=new be(0,0,0),K1e=new be(1,1,1),hh=new be,cA=new be,Po=new be;var RQ=new Wr,LQ=new au,cl=(()=>{class r{constructor(t=0,i=0,n=0,a=r.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=n,this._order=a}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,n,a=this._order){return this._x=t,this._y=i,this._z=n,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,n=!0){let a=t.elements,o=a[0],s=a[4],l=a[8],u=a[1],c=a[5],f=a[9],h=a[2],p=a[6],d=a[10];switch(i){case"XYZ":this._y=Math.asin(en(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-f,d),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-en(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(l,d),this._z=Math.atan2(u,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(en(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(u,o));break;case"ZYX":this._y=Math.asin(-en(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(p,d),this._z=Math.atan2(u,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(en(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-f,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(l,d));break;case"XZY":this._z=Math.asin(-en(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(l,o)):(this._x=Math.atan2(-f,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,n){return RQ.makeRotationFromQuaternion(t),this.setFromRotationMatrix(RQ,i,n)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return LQ.setFromEuler(this),this.setFromQuaternion(LQ,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return r.DEFAULT_ORDER="XYZ",r})();var Tg=class{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<{class r extends Ka{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:J1e++}),this.uuid=iu(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new be,i=new cl,n=new au,a=new be(1,1,1);function o(){n.setFromEuler(i,!1)}function s(){i.setFromQuaternion(n,void 0,!1)}i._onChange(o),n._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new Wr},normalMatrix:{value:new $t}}),this.matrix=new Wr,this.matrixWorld=new Wr,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Tg,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return Eg.setFromAxisAngle(t,i),this.quaternion.multiply(Eg),this}rotateOnWorldAxis(t,i){return Eg.setFromAxisAngle(t,i),this.quaternion.premultiply(Eg),this}rotateX(t){return this.rotateOnAxis(DQ,t)}rotateY(t){return this.rotateOnAxis(IQ,t)}rotateZ(t){return this.rotateOnAxis(NQ,t)}translateOnAxis(t,i){return PQ.copy(t).applyQuaternion(this.quaternion),this.position.add(PQ.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(DQ,t)}translateY(t){return this.translateOnAxis(IQ,t)}translateZ(t){return this.translateOnAxis(NQ,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4($u.copy(this.matrixWorld).invert())}lookAt(t,i,n){t.isVector3?fA.copy(t):fA.set(t,i,n);let a=this.parent;this.updateWorldMatrix(!0,!1),dS.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?$u.lookAt(dS,fA,this.up):$u.lookAt(fA,dS,this.up),this.quaternion.setFromRotationMatrix($u),a&&($u.extractRotation(a.matrixWorld),Eg.setFromRotationMatrix($u),this.quaternion.premultiply(Eg.invert()))}add(t){if(arguments.length>1){for(let i=0;i1){for(let n=0;n0&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),a.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(a.matrixAutoUpdate=!1),this.isInstancedMesh&&(a.type="InstancedMesh",a.count=this.count,a.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(a.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(a.type="BatchedMesh",a.perObjectFrustumCulled=this.perObjectFrustumCulled,a.sortObjects=this.sortObjects,a.drawRanges=this._drawRanges,a.reservedRanges=this._reservedRanges,a.visibility=this._visibility,a.active=this._active,a.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),a.maxGeometryCount=this._maxGeometryCount,a.maxVertexCount=this._maxVertexCount,a.maxIndexCount=this._maxIndexCount,a.geometryInitialized=this._geometryInitialized,a.geometryCount=this._geometryCount,a.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(a.boundingSphere={center:a.boundingSphere.center.toArray(),radius:a.boundingSphere.radius}),this.boundingBox!==null&&(a.boundingBox={min:a.boundingBox.min.toArray(),max:a.boundingBox.max.toArray()}));function o(l,u){return l[u.uuid]===void 0&&(l[u.uuid]=u.toJSON(t)),u.uuid}if(this.isScene)this.background&&(this.background.isColor?a.background=this.background.toJSON():this.background.isTexture&&(a.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(a.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){a.geometry=o(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let u=l.shapes;if(Array.isArray(u))for(let c=0,f=u.length;c0){a.children=[];for(let l=0;l0){a.animations=[];for(let l=0;l0&&(n.geometries=l),u.length>0&&(n.materials=u),c.length>0&&(n.textures=c),f.length>0&&(n.images=f),h.length>0&&(n.shapes=h),p.length>0&&(n.skeletons=p),d.length>0&&(n.animations=d),g.length>0&&(n.nodes=g)}return n.object=a,n;function s(l){let u=[];for(let c in l){let f=l[c];delete f.metadata,u.push(f)}return u}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let n=0;n0?n.multiplyScalar(1/Math.sqrt(a)):n.set(0,0,0)}static getBarycoord(e,t,i,n,a){fl.subVectors(n,t),Qu.subVectors(i,t),FF.subVectors(e,t);let o=fl.dot(fl),s=fl.dot(Qu),l=fl.dot(FF),u=Qu.dot(Qu),c=Qu.dot(FF),f=o*u-s*s;if(f===0)return a.set(0,0,0),null;let h=1/f,p=(u*l-s*c)*h,d=(o*c-s*l)*h;return a.set(1-p-d,d,p)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,ec)===null?!1:ec.x>=0&&ec.y>=0&&ec.x+ec.y<=1}static getInterpolation(e,t,i,n,a,o,s,l){return this.getBarycoord(e,t,i,n,ec)===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(a,ec.x),l.addScaledVector(o,ec.y),l.addScaledVector(s,ec.z),l)}static isFrontFacing(e,t,i,n){return fl.subVectors(i,t),Qu.subVectors(e,t),fl.cross(Qu).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),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 fl.subVectors(this.c,this.b),Qu.subVectors(this.a,this.b),fl.cross(Qu).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return r.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return r.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,n,a){return r.getInterpolation(e,this.a,this.b,this.c,t,i,n,a)}containsPoint(e){return r.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return r.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,n=this.b,a=this.c,o,s;Ag.subVectors(n,i),Cg.subVectors(a,i),zF.subVectors(e,i);let l=Ag.dot(zF),u=Cg.dot(zF);if(l<=0&&u<=0)return t.copy(i);BF.subVectors(e,n);let c=Ag.dot(BF),f=Cg.dot(BF);if(c>=0&&f<=c)return t.copy(n);let h=l*f-c*u;if(h<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(i).addScaledVector(Ag,o);kF.subVectors(e,a);let p=Ag.dot(kF),d=Cg.dot(kF);if(d>=0&&p<=d)return t.copy(a);let g=p*u-l*d;if(g<=0&&u>=0&&d<=0)return s=u/(u-d),t.copy(i).addScaledVector(Cg,s);let m=c*d-p*f;if(m<=0&&f-c>=0&&p-d>=0)return UQ.subVectors(a,n),s=(f-c)/(f-c+(p-d)),t.copy(n).addScaledVector(UQ,s);let v=1/(m+g+h);return o=g*v,s=h*v,t.copy(i).addScaledVector(Ag,o).addScaledVector(Cg,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};var OQ={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},ph={h:0,s:0,l:0},hA={h:0,s:0,l:0};function VF(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}var ir=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){let n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=qa){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Er.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=Er.workingColorSpace){return this.r=e,this.g=t,this.b=i,Er.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=Er.workingColorSpace){if(e=MQ(e,1),t=en(t,0,1),i=en(i,0,1),t===0)this.r=this.g=this.b=i;else{let a=i<=.5?i*(1+t):i+t-i*t,o=2*i-a;this.r=VF(o,a,e+1/3),this.g=VF(o,a,e),this.b=VF(o,a,e-1/3)}return Er.toWorkingColorSpace(this,n),this}setStyle(e,t=qa){function i(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let a,o=n[1],s=n[2];switch(o){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setRGB(Math.min(255,parseInt(a[1],10))/255,Math.min(255,parseInt(a[2],10))/255,Math.min(255,parseInt(a[3],10))/255,t);if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setRGB(Math.min(100,parseInt(a[1],10))/100,Math.min(100,parseInt(a[2],10))/100,Math.min(100,parseInt(a[3],10))/100,t);break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setHSL(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){let a=n[1],o=a.length;if(o===3)return this.setRGB(parseInt(a.charAt(0),16)/15,parseInt(a.charAt(1),16)/15,parseInt(a.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(a,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=qa){let i=OQ[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=sh(e.r),this.g=sh(e.g),this.b=sh(e.b),this}copyLinearToSRGB(e){return this.r=tA(e.r),this.g=tA(e.g),this.b=tA(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=qa){return Er.fromWorkingColorSpace(qn.copy(this),e),Math.round(en(qn.r*255,0,255))*65536+Math.round(en(qn.g*255,0,255))*256+Math.round(en(qn.b*255,0,255))}getHexString(e=qa){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Er.workingColorSpace){Er.fromWorkingColorSpace(qn.copy(this),t);let i=qn.r,n=qn.g,a=qn.b,o=Math.max(i,n,a),s=Math.min(i,n,a),l,u,c=(s+o)/2;if(s===o)l=0,u=0;else{let f=o-s;switch(u=c<=.5?f/(o+s):f/(2-o-s),o){case i:l=(n-a)/f+(n0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}let n=this[t];if(n===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Yu&&(i.blending=this.blending),this.side!==Ao&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==iS&&(i.blendSrc=this.blendSrc),this.blendDst!==nS&&(i.blendDst=this.blendDst),this.blendEquation!==qu&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==lg&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==bF&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==md&&(i.stencilFail=this.stencilFail),this.stencilZFail!==md&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==md&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function n(a){let o=[];for(let s in a){let l=a[s];delete l.metadata,o.push(l)}return o}if(t){let a=n(e.textures),o=n(e.images);a.length>0&&(i.textures=a),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let n=t.length;i=new Array(n);for(let a=0;a!==n;++a)i[a]=t[a].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};var tc=class extends ou{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ir(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 cl,this.combine=OE,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 Vi=new be,pA=new Kt,ga=class{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=wF,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ya,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return TQ("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,a=this.itemSize;n0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let l in i){let u=i[l];e.data.attributes[l]=u.toJSON(e.data)}let n={},a=!1;for(let l in this.morphAttributes){let u=this.morphAttributes[l],c=[];for(let f=0,h=u.length;f0&&(n[l]=c,a=!0)}a&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));let s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone(t));let n=e.attributes;for(let u in n){let c=n[u];this.setAttribute(u,c.clone(t))}let a=e.morphAttributes;for(let u in a){let c=[],f=a[u];for(let h=0,p=f.length;h0){let n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=n.length;a(e.far-e.near)**2))&&(FQ.copy(a).invert(),xd.copy(e.ray).applyMatrix4(FQ),!(i.boundingBox!==null&&xd.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,xd)))}_computeIntersections(e,t,i){let n,a=this.geometry,o=this.material,s=a.index,l=a.attributes.position,u=a.attributes.uv,c=a.attributes.uv1,f=a.attributes.normal,h=a.groups,p=a.drawRange;if(s!==null)if(Array.isArray(o))for(let d=0,g=h.length;dt.far?null:{distance:u,point:xA.clone(),object:r}}function SA(r,e,t,i,n,a,o,s,l,u){r.getVertexPosition(s,Dg),r.getVertexPosition(l,Ig),r.getVertexPosition(u,Ng);let c=nTe(r,e,t,i,Dg,Ig,Ng,_A);if(c){n&&(vA.fromBufferAttribute(n,s),gA.fromBufferAttribute(n,l),yA.fromBufferAttribute(n,u),c.uv=_d.getInterpolation(_A,Dg,Ig,Ng,vA,gA,yA,new Kt)),a&&(vA.fromBufferAttribute(a,s),gA.fromBufferAttribute(a,l),yA.fromBufferAttribute(a,u),c.uv1=_d.getInterpolation(_A,Dg,Ig,Ng,vA,gA,yA,new Kt)),o&&(BQ.fromBufferAttribute(o,s),kQ.fromBufferAttribute(o,l),VQ.fromBufferAttribute(o,u),c.normal=_d.getInterpolation(_A,Dg,Ig,Ng,BQ,kQ,VQ,new be),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));let f={a:s,b:l,c:u,normal:new be,materialIndex:0};_d.getNormal(Dg,Ig,Ng,f.normal),c.face=f}return c}var dh=class r extends Qa{constructor(e=1,t=1,i=1,n=1,a=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:a,depthSegments:o};let s=this;n=Math.floor(n),a=Math.floor(a),o=Math.floor(o);let l=[],u=[],c=[],f=[],h=0,p=0;d("z","y","x",-1,-1,i,t,e,o,a,0),d("z","y","x",1,-1,i,t,-e,o,a,1),d("x","z","y",1,1,e,i,t,n,o,2),d("x","z","y",1,-1,e,i,-t,n,o,3),d("x","y","z",1,-1,e,t,i,n,a,4),d("x","y","z",-1,-1,e,t,-i,n,a,5),this.setIndex(l),this.setAttribute("position",new Zn(u,3)),this.setAttribute("normal",new Zn(c,3)),this.setAttribute("uv",new Zn(f,2));function d(g,m,v,_,y,x,M,S,w,T,C){let b=x/w,E=M/T,I=x/2,R=M/2,A=S/2,D=w+1,U=T+1,B=0,F=0,k=new be;for(let G=0;G0?1:-1,c.push(k.x,k.y,k.z),f.push(J/w),f.push(1-G/T),B+=1}}for(let G=0;G0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let i={};for(let n in this.extensions)this.extensions[n]===!0&&(i[n]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}};var Ug=class extends tn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Wr,this.projectionMatrix=new Wr,this.projectionMatrixInverse=new Wr,this.coordinateSystem=ja}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};var mh=new be,YQ=new Kt,qQ=new Kt,Gi=class extends Ug{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=cS*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(JE*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return cS*2*Math.atan(Math.tan(JE*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){mh.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(mh.x,mh.y).multiplyScalar(-e/mh.z),mh.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(mh.x,mh.y).multiplyScalar(-e/mh.z)}getViewSize(e,t){return this.getViewBounds(e,YQ,qQ),t.subVectors(qQ,YQ)}setViewOffset(e,t,i,n,a,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(JE*.5*this.fov)/this.zoom,i=2*t,n=this.aspect*i,a=-.5*n,o=this.view;if(this.view!==null&&this.view.enabled){let l=o.fullWidth,u=o.fullHeight;a+=o.offsetX*n/l,t-=o.offsetY*i/u,n*=o.width/l,i*=o.height/u}let s=this.filmOffset;s!==0&&(a+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};var Og=-90,Fg=1,bA=class extends tn{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;let n=new Gi(Og,Fg,e,t);n.layers=this.layers,this.add(n);let a=new Gi(Og,Fg,e,t);a.layers=this.layers,this.add(a);let o=new Gi(Og,Fg,e,t);o.layers=this.layers,this.add(o);let s=new Gi(Og,Fg,e,t);s.layers=this.layers,this.add(s);let l=new Gi(Og,Fg,e,t);l.layers=this.layers,this.add(l);let u=new Gi(Og,Fg,e,t);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[i,n,a,o,s,l]=t;for(let u of t)this.remove(u);if(e===ja)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),a.up.set(0,0,-1),a.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===vd)i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),a.up.set(0,0,1),a.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let u of t)this.add(u),u.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:i,activeMipmapLevel:n}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[a,o,s,l,u,c]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),d=e.xr.enabled;e.xr.enabled=!1;let g=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,n),e.render(t,a),e.setRenderTarget(i,1,n),e.render(t,o),e.setRenderTarget(i,2,n),e.render(t,s),e.setRenderTarget(i,3,n),e.render(t,l),e.setRenderTarget(i,4,n),e.render(t,u),i.texture.generateMipmaps=g,e.setRenderTarget(i,5,n),e.render(t,c),e.setRenderTarget(f,h,p),e.xr.enabled=d,i.texture.needsPMREMUpdate=!0}};var zg=class extends Ja{constructor(e,t,i,n,a,o,s,l,u,c){e=e!==void 0?e:[],t=t!==void 0?t:al,super(e,t,i,n,a,o,s,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}};var wA=class extends $a{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let i={width:e,height:e,depth:1},n=[i,i,i,i,i,i];this.texture=new zg(n,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Qi}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let i={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},n=new dh(5,5,5),a=new ya({name:"CubemapFromEquirect",uniforms:rc(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:_i,blending:ms});a.uniforms.tEquirect.value=t;let o=new rn(n,a),s=t.minFilter;return t.minFilter===ol&&(t.minFilter=Qi),new bA(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,n){let a=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,n);e.setRenderTarget(a)}};var WF=new be,aTe=new be,oTe=new $t,hl=class{constructor(e=new be(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let n=WF.subVectors(i,t).cross(aTe.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){let i=e.delta(WF),n=this.normal.dot(i);if(n===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let a=-(e.start.dot(this.normal)+this.constant)/n;return a<0||a>1?null:t.copy(e.start).addScaledVector(i,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let i=t||oTe.getNormalMatrix(e),n=this.coplanarPoint(WF).applyMatrix4(e),a=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(a),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};var Sd=new ch,TA=new be,vh=class{constructor(e=new hl,t=new hl,i=new hl,n=new hl,a=new hl,o=new hl){this.planes=[e,t,i,n,a,o]}set(e,t,i,n,a,o){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(i),s[3].copy(n),s[4].copy(a),s[5].copy(o),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=ja){let i=this.planes,n=e.elements,a=n[0],o=n[1],s=n[2],l=n[3],u=n[4],c=n[5],f=n[6],h=n[7],p=n[8],d=n[9],g=n[10],m=n[11],v=n[12],_=n[13],y=n[14],x=n[15];if(i[0].setComponents(l-a,h-u,m-p,x-v).normalize(),i[1].setComponents(l+a,h+u,m+p,x+v).normalize(),i[2].setComponents(l+o,h+c,m+d,x+_).normalize(),i[3].setComponents(l-o,h-c,m-d,x-_).normalize(),i[4].setComponents(l-s,h-f,m-g,x-y).normalize(),t===ja)i[5].setComponents(l+s,h+f,m+g,x+y).normalize();else if(t===vd)i[5].setComponents(s,f,g,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Sd.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Sd.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Sd)}intersectsSprite(e){return Sd.center.set(0,0,0),Sd.radius=.7071067811865476,Sd.applyMatrix4(e.matrixWorld),this.intersectsSphere(Sd)}intersectsSphere(e){let t=this.planes,i=e.center,n=-e.radius;for(let a=0;a<6;a++)if(t[a].distanceToPoint(i)0?e.max.x:e.min.x,TA.y=n.normal.y>0?e.max.y:e.min.y,TA.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(TA)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function EA(){let r=null,e=!1,t=null,i=null;function n(a,o){t(a,o),i=r.requestAnimationFrame(n)}return{start:function(){e!==!0&&t!==null&&(i=r.requestAnimationFrame(n),e=!0)},stop:function(){r.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(a){t=a},setContext:function(a){r=a}}}function ZQ(r,e){let t=e.isWebGL2,i=new WeakMap;function n(u,c){let f=u.array,h=u.usage,p=f.byteLength,d=r.createBuffer();r.bindBuffer(c,d),r.bufferData(c,f,h),u.onUploadCallback();let g;if(f instanceof Float32Array)g=r.FLOAT;else if(f instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(t)g=r.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=r.UNSIGNED_SHORT;else if(f instanceof Int16Array)g=r.SHORT;else if(f instanceof Uint32Array)g=r.UNSIGNED_INT;else if(f instanceof Int32Array)g=r.INT;else if(f instanceof Int8Array)g=r.BYTE;else if(f instanceof Uint8Array)g=r.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)g=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:d,type:g,bytesPerElement:f.BYTES_PER_ELEMENT,version:u.version,size:p}}function a(u,c,f){let h=c.array,p=c._updateRange,d=c.updateRanges;if(r.bindBuffer(f,u),p.count===-1&&d.length===0&&r.bufferSubData(f,0,h),d.length!==0){for(let g=0,m=d.length;g outsideIOR when thinFilmThickness -> 0.0 + float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); + // Evaluate the cosTheta on the base layer (Snell law) + float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); + + // Handle TIR: + float cosTheta2Sq = 1.0 - sinTheta2Sq; + if ( cosTheta2Sq < 0.0 ) { + + return vec3( 1.0 ); + + } + + float cosTheta2 = sqrt( cosTheta2Sq ); + + // First interface + float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); + float R12 = F_Schlick( R0, 1.0, cosTheta1 ); + float T121 = 1.0 - R12; + float phi12 = 0.0; + if ( iridescenceIOR < outsideIOR ) phi12 = PI; + float phi21 = PI - phi12; + + // Second interface + vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); // guard against 1.0 + vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); + vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); + vec3 phi23 = vec3( 0.0 ); + if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; + if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; + if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; + + // Phase shift + float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; + vec3 phi = vec3( phi21 ) + phi23; + + // Compound terms + vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); + vec3 r123 = sqrt( R123 ); + vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); + + // Reflectance term for m = 0 (DC term amplitude) + vec3 C0 = R12 + Rs; + I = C0; + + // Reflectance term for m > 0 (pairs of diracs) + vec3 Cm = Rs - T121; + for ( int m = 1; m <= 2; ++ m ) { + + Cm *= r123; + vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); + I += Cm * Sm; + + } + + // Since out of gamut colors might be produced, negative color values are clamped to 0. + return max( I, vec3( 0.0 ) ); + + } + +#endif + +`;var uee=` +#ifdef USE_BUMPMAP + + uniform sampler2D bumpMap; + uniform float bumpScale; + + // Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen + // https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf + + // Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2) + + vec2 dHdxy_fwd() { + + vec2 dSTdx = dFdx( vBumpMapUv ); + vec2 dSTdy = dFdy( vBumpMapUv ); + + float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; + float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; + float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; + + return vec2( dBx, dBy ); + + } + + vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { + + // normalize is done to ensure that the bump map looks the same regardless of the texture's scale + vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); + vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); + vec3 vN = surf_norm; // normalized + + vec3 R1 = cross( vSigmaY, vN ); + vec3 R2 = cross( vN, vSigmaX ); + + float fDet = dot( vSigmaX, R1 ) * faceDirection; + + vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); + return normalize( abs( fDet ) * surf_norm - vGrad ); + + } + +#endif +`;var cee=` +#if NUM_CLIPPING_PLANES > 0 + + vec4 plane; + + #ifdef ALPHA_TO_COVERAGE + + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + + if ( clipOpacity == 0.0 ) discard; + + } + #pragma unroll_loop_end + + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + + float unionClipOpacity = 1.0; + + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + + } + #pragma unroll_loop_end + + clipOpacity *= 1.0 - unionClipOpacity; + + #endif + + diffuseColor.a *= clipOpacity; + + if ( diffuseColor.a == 0.0 ) discard; + + #else + + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + + } + #pragma unroll_loop_end + + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + + bool clipped = true; + + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + + } + #pragma unroll_loop_end + + if ( clipped ) discard; + + #endif + + #endif + +#endif +`;var fee=` +#if NUM_CLIPPING_PLANES > 0 + + varying vec3 vClipPosition; + + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; + +#endif +`;var hee=` +#if NUM_CLIPPING_PLANES > 0 + + varying vec3 vClipPosition; + +#endif +`;var pee=` +#if NUM_CLIPPING_PLANES > 0 + + vClipPosition = - mvPosition.xyz; + +#endif +`;var dee=` +#if defined( USE_COLOR_ALPHA ) + + diffuseColor *= vColor; + +#elif defined( USE_COLOR ) + + diffuseColor.rgb *= vColor; + +#endif +`;var mee=` +#if defined( USE_COLOR_ALPHA ) + + varying vec4 vColor; + +#elif defined( USE_COLOR ) + + varying vec3 vColor; + +#endif +`;var vee=` +#if defined( USE_COLOR_ALPHA ) + + varying vec4 vColor; + +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + + varying vec3 vColor; + +#endif +`;var gee=` +#if defined( USE_COLOR_ALPHA ) + + vColor = vec4( 1.0 ); + +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + + vColor = vec3( 1.0 ); + +#endif + +#ifdef USE_COLOR + + vColor *= color; + +#endif + +#ifdef USE_INSTANCING_COLOR + + vColor.xyz *= instanceColor.xyz; + +#endif +`;var yee=` +#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 + +#ifndef saturate +// may have defined saturate() already +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) + +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } + +// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range. +// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/ +highp float rand( const in vec2 uv ) { + + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + + return fract( sin( sn ) * c ); + +} + +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif + +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; + +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; + +#ifdef USE_ALPHAHASH + + varying vec3 vPosition; + +#endif + +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + +} + +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + + // dir can be either a direction vector or a normal vector + // upper-left 3x3 of matrix is assumed to be orthogonal + + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); + +} + +mat3 transposeMat3( const in mat3 m ) { + + mat3 tmp; + + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + + return tmp; + +} + +float luminance( const in vec3 rgb ) { + + // assumes rgb is in linear color space with sRGB primaries and D65 white point + + const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); + + return dot( weights, rgb ); + +} + +bool isPerspectiveMatrix( mat4 m ) { + + return m[ 2 ][ 3 ] == - 1.0; + +} + +vec2 equirectUv( in vec3 dir ) { + + // dir is assumed to be unit length + + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + + return vec2( u, v ); + +} + +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + + return RECIPROCAL_PI * diffuseColor; + +} // validated + +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + + // Original approximation by Christophe Schlick '94 + // float fresnel = pow( 1.0 - dotVH, 5.0 ); + + // Optimized variant (presented by Epic at SIGGRAPH '13) + // https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); + +} // validated + +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + + // Original approximation by Christophe Schlick '94 + // float fresnel = pow( 1.0 - dotVH, 5.0 ); + + // Optimized variant (presented by Epic at SIGGRAPH '13) + // https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); + +} // validated +`;var _ee=` +#ifdef ENVMAP_TYPE_CUBE_UV + + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + + // These shader functions convert between the UV coordinates of a single face of + // a cubemap, the 0-5 integer index of a cube face, and the direction vector for + // sampling a textureCube (not generally normalized ). + + float getFace( vec3 direction ) { + + vec3 absDirection = abs( direction ); + + float face = - 1.0; + + if ( absDirection.x > absDirection.z ) { + + if ( absDirection.x > absDirection.y ) + + face = direction.x > 0.0 ? 0.0 : 3.0; + + else + + face = direction.y > 0.0 ? 1.0 : 4.0; + + } else { + + if ( absDirection.z > absDirection.y ) + + face = direction.z > 0.0 ? 2.0 : 5.0; + + else + + face = direction.y > 0.0 ? 1.0 : 4.0; + + } + + return face; + + } + + // RH coordinate system; PMREM face-indexing convention + vec2 getUV( vec3 direction, float face ) { + + vec2 uv; + + if ( face == 0.0 ) { + + uv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x + + } else if ( face == 1.0 ) { + + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y + + } else if ( face == 2.0 ) { + + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z + + } else if ( face == 3.0 ) { + + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x + + } else if ( face == 4.0 ) { + + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y + + } else { + + uv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z + + } + + return 0.5 * ( uv + 1.0 ); + + } + + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + + float face = getFace( direction ); + + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + + mipInt = max( mipInt, cubeUV_minMipLevel ); + + float faceSize = exp2( mipInt ); + + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; // #25071 + + if ( face > 2.0 ) { + + uv.y += faceSize; + + face -= 3.0; + + } + + uv.x += face * faceSize; + + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + + #ifdef texture2DGradEXT + + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering + + #else + + return texture2D( envMap, uv ).rgb; + + #endif + + } + + // These defines must match with PMREMGenerator + + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + + float roughnessToMip( float roughness ) { + + float mip = 0.0; + + if ( roughness >= cubeUV_r1 ) { + + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + + } else if ( roughness >= cubeUV_r4 ) { + + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + + } else if ( roughness >= cubeUV_r5 ) { + + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + + } else if ( roughness >= cubeUV_r6 ) { + + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + + } else { + + mip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25 + } + + return mip; + + } + + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + + float mipF = fract( mip ); + + float mipInt = floor( mip ); + + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + + if ( mipF == 0.0 ) { + + return vec4( color0, 1.0 ); + + } else { + + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + + return vec4( mix( color0, color1, mipF ), 1.0 ); + + } + + } + +#endif +`;var xee=` + +vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + + vec3 transformedTangent = objectTangent; + +#endif + +#ifdef USE_BATCHING + + // this is in lieu of a per-instance normal-matrix + // shear transforms in the instance matrix are not supported + + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + + #ifdef USE_TANGENT + + transformedTangent = bm * transformedTangent; + + #endif + +#endif + +#ifdef USE_INSTANCING + + // this is in lieu of a per-instance normal-matrix + // shear transforms in the instance matrix are not supported + + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + + #ifdef USE_TANGENT + + transformedTangent = im * transformedTangent; + + #endif + +#endif + +transformedNormal = normalMatrix * transformedNormal; + +#ifdef FLIP_SIDED + + transformedNormal = - transformedNormal; + +#endif + +#ifdef USE_TANGENT + + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + + #ifdef FLIP_SIDED + + transformedTangent = - transformedTangent; + + #endif + +#endif +`;var See=` +#ifdef USE_DISPLACEMENTMAP + + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; + +#endif +`;var Mee=` +#ifdef USE_DISPLACEMENTMAP + + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); + +#endif +`;var bee=` +#ifdef USE_EMISSIVEMAP + + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + + totalEmissiveRadiance *= emissiveColor.rgb; + +#endif +`;var wee=` +#ifdef USE_EMISSIVEMAP + + uniform sampler2D emissiveMap; + +#endif +`;var Tee=` +gl_FragColor = linearToOutputTexel( gl_FragColor ); +`;var Eee=` + +// http://www.russellcottrell.com/photo/matrixCalculator.htm + +// Linear sRGB => XYZ => Linear Display P3 +const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( + vec3( 0.8224621, 0.177538, 0.0 ), + vec3( 0.0331941, 0.9668058, 0.0 ), + vec3( 0.0170827, 0.0723974, 0.9105199 ) +); + +// Linear Display P3 => XYZ => Linear sRGB +const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( + vec3( 1.2249401, - 0.2249404, 0.0 ), + vec3( - 0.0420569, 1.0420571, 0.0 ), + vec3( - 0.0196376, - 0.0786361, 1.0982735 ) +); + +vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { + return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); +} + +vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { + return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); +} + +vec4 LinearTransferOETF( in vec4 value ) { + return value; +} + +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +} + +// @deprecated, r156 +vec4 LinearToLinear( in vec4 value ) { + return value; +} + +// @deprecated, r156 +vec4 LinearTosRGB( in vec4 value ) { + return sRGBTransferOETF( value ); +} +`;var Aee=` +#ifdef USE_ENVMAP + + #ifdef ENV_WORLDPOS + + vec3 cameraToFrag; + + if ( isOrthographic ) { + + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + + } else { + + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + + } + + // Transforming Normal Vectors with the Inverse Transformation + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + + #ifdef ENVMAP_MODE_REFLECTION + + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + + #else + + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + + #endif + + #else + + vec3 reflectVec = vReflect; + + #endif + + #ifdef ENVMAP_TYPE_CUBE + + vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + + #else + + vec4 envColor = vec4( 0.0 ); + + #endif + + #ifdef ENVMAP_BLENDING_MULTIPLY + + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + + #elif defined( ENVMAP_BLENDING_MIX ) + + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + + #elif defined( ENVMAP_BLENDING_ADD ) + + outgoingLight += envColor.xyz * specularStrength * reflectivity; + + #endif + +#endif +`;var Cee=` +#ifdef USE_ENVMAP + + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform mat3 envMapRotation; + + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif +`;var Ree=` +#ifdef USE_ENVMAP + + uniform float reflectivity; + + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + + #define ENV_WORLDPOS + + #endif + + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif + +#endif +`;var Lee=` +#ifdef USE_ENVMAP + + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + + #define ENV_WORLDPOS + + #endif + + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + + #else + + varying vec3 vReflect; + uniform float refractionRatio; + + #endif + +#endif +`;var Pee=` +#ifdef USE_ENVMAP + + #ifdef ENV_WORLDPOS + + vWorldPosition = worldPosition.xyz; + + #else + + vec3 cameraToVertex; + + if ( isOrthographic ) { + + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + + } else { + + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + + } + + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + + #ifdef ENVMAP_MODE_REFLECTION + + vReflect = reflect( cameraToVertex, worldNormal ); + + #else + + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + + #endif + + #endif + +#endif +`;var Dee=` +#ifdef USE_FOG + + vFogDepth = - mvPosition.z; + +#endif +`;var Iee=` +#ifdef USE_FOG + + varying float vFogDepth; + +#endif +`;var Nee=` +#ifdef USE_FOG + + #ifdef FOG_EXP2 + + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + + #else + + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + + #endif + + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); + +#endif +`;var Uee=` +#ifdef USE_FOG + + uniform vec3 fogColor; + varying float vFogDepth; + + #ifdef FOG_EXP2 + + uniform float fogDensity; + + #else + + uniform float fogNear; + uniform float fogFar; + + #endif + +#endif +`;var Oee=` + +#ifdef USE_GRADIENTMAP + + uniform sampler2D gradientMap; + +#endif + +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + + // dotNL will be from -1.0 to 1.0 + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + + #ifdef USE_GRADIENTMAP + + return vec3( texture2D( gradientMap, coord ).r ); + + #else + + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + + #endif + +} +`;var Fee=` +#ifdef USE_LIGHTMAP + + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + + reflectedLight.indirectDiffuse += lightMapIrradiance; + +#endif +`;var zee=` +#ifdef USE_LIGHTMAP + + uniform sampler2D lightMap; + uniform float lightMapIntensity; + +#endif +`;var Bee=` +LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength; +`;var kee=` +varying vec3 vViewPosition; + +struct LambertMaterial { + + vec3 diffuseColor; + float specularStrength; + +}; + +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert +`;var Vee=` +uniform bool receiveShadow; +uniform vec3 ambientLightColor; + +#if defined( USE_LIGHT_PROBES ) + + uniform vec3 lightProbe[ 9 ]; + +#endif + +// get the irradiance (radiance convolved with cosine lobe) at the point 'normal' on the unit sphere +// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + + // normal is assumed to have unit length + + float x = normal.x, y = normal.y, z = normal.z; + + // band 0 + vec3 result = shCoefficients[ 0 ] * 0.886227; + + // band 1 + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + + // band 2 + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + + return result; + +} + +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + + return irradiance; + +} + +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + + vec3 irradiance = ambientLightColor; + + return irradiance; + +} + +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + + #if defined ( LEGACY_LIGHTS ) + + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + + } + + return 1.0; + + #else + + // based upon Frostbite 3 Moving to Physically-based Rendering + // page 32, equation 26: E[window1] + // https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + + if ( cutoffDistance > 0.0 ) { + + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + + } + + return distanceFalloff; + + #endif + +} + +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + + return smoothstep( coneCosine, penumbraCosine, angleCosine ); + +} + +#if NUM_DIR_LIGHTS > 0 + + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + + } + +#endif + + +#if NUM_POINT_LIGHTS > 0 + + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + + // light is an out parameter as having it as a return value caused compiler errors on some devices + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + + vec3 lVector = pointLight.position - geometryPosition; + + light.direction = normalize( lVector ); + + float lightDistance = length( lVector ); + + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + + } + +#endif + + +#if NUM_SPOT_LIGHTS > 0 + + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + + // light is an out parameter as having it as a return value caused compiler errors on some devices + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + + vec3 lVector = spotLight.position - geometryPosition; + + light.direction = normalize( lVector ); + + float angleCos = dot( light.direction, spotLight.direction ); + + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + + if ( spotAttenuation > 0.0 ) { + + float lightDistance = length( lVector ); + + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + + } else { + + light.color = vec3( 0.0 ); + light.visible = false; + + } + + } + +#endif + + +#if NUM_RECT_AREA_LIGHTS > 0 + + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + + // Pre-computed values of LinearTransformedCosine approximation of BRDF + // BRDF approximation Texture is 64x64 + uniform sampler2D ltc_1; // RGBA Float + uniform sampler2D ltc_2; // RGBA Float + + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; + +#endif + + +#if NUM_HEMI_LIGHTS > 0 + + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + + return irradiance; + + } + +#endif +`;var Gee=` +#ifdef USE_ENVMAP + + vec3 getIBLIrradiance( const in vec3 normal ) { + + #ifdef ENVMAP_TYPE_CUBE_UV + + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + + return PI * envMapColor.rgb * envMapIntensity; + + #else + + return vec3( 0.0 ); + + #endif + + } + + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + + #ifdef ENVMAP_TYPE_CUBE_UV + + vec3 reflectVec = reflect( - viewDir, normal ); + + // Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane. + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + + return envMapColor.rgb * envMapIntensity; + + #else + + return vec3( 0.0 ); + + #endif + + } + + #ifdef USE_ANISOTROPY + + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + + #ifdef ENVMAP_TYPE_CUBE_UV + + // https://google.github.io/filament/Filament.md.html#lighting/imagebasedlights/anisotropy + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + + return getIBLRadiance( viewDir, bentNormal, roughness ); + + #else + + return vec3( 0.0 ); + + #endif + + } + + #endif + +#endif +`;var Hee=` +ToonMaterial material; +material.diffuseColor = diffuseColor.rgb; +`;var Wee=` +varying vec3 vViewPosition; + +struct ToonMaterial { + + vec3 diffuseColor; + +}; + +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon +`;var Xee=` +BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength; +`;var Yee=` +varying vec3 vViewPosition; + +struct BlinnPhongMaterial { + + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; + +}; + +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; + +} + +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong +`;var qee=` +PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); + +vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); + +material.roughness = max( roughnessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap. +material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); + +#ifdef IOR + + material.ior = ior; + + #ifdef USE_SPECULAR + + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + + #ifdef USE_SPECULAR_COLORMAP + + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + + #endif + + #ifdef USE_SPECULAR_INTENSITYMAP + + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + + #endif + + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + + #else + + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + + #endif + + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); + +#else + + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; + +#endif + +#ifdef USE_CLEARCOAT + + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + + #ifdef USE_CLEARCOATMAP + + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + + #endif + + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + + #endif + + material.clearcoat = saturate( material.clearcoat ); // Burley clearcoat model + material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); + +#endif + +#ifdef USE_IRIDESCENCE + + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + + #ifdef USE_IRIDESCENCEMAP + + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + + #endif + + #ifdef USE_IRIDESCENCE_THICKNESSMAP + + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + + #else + + material.iridescenceThickness = iridescenceThicknessMaximum; + + #endif + +#endif + +#ifdef USE_SHEEN + + material.sheenColor = sheenColor; + + #ifdef USE_SHEEN_COLORMAP + + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + + #endif + + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + + #ifdef USE_SHEEN_ROUGHNESSMAP + + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + + #endif + +#endif + +#ifdef USE_ANISOTROPY + + #ifdef USE_ANISOTROPYMAP + + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + + #else + + vec2 anisotropyV = anisotropyVector; + + #endif + + material.anisotropy = length( anisotropyV ); + + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + + // Roughness along the anisotropy bitangent is the material roughness, while the tangent roughness increases with anisotropy. + material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); + + material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; + material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; + +#endif +`;var Zee=` + +struct PhysicalMaterial { + + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + + #ifdef IOR + float ior; + #endif + + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif + +}; + +// temporary +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); + +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} + +// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2 +// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + + float a2 = pow2( alpha ); + + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + + return 0.5 / max( gv + gl, EPSILON ); + +} + +// Microfacet Models for Refraction through Rough Surfaces - equation (33) +// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html +// alpha is "roughness squared" in Disney\u2019s reparameterization +float D_GGX( const in float alpha, const in float dotNH ) { + + float a2 = pow2( alpha ); + + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1 + + return RECIPROCAL_PI * a2 / pow2( denom ); + +} + +// https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf +#ifdef USE_ANISOTROPY + + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + + return saturate(v); + + } + + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + + } + +#endif + +#ifdef USE_CLEARCOAT + + // GGX Distribution, Schlick Fresnel, GGX_SmithCorrelated Visibility + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + + float alpha = pow2( roughness ); // UE4's roughness + + vec3 halfDir = normalize( lightDir + viewDir ); + + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + + vec3 F = F_Schlick( f0, f90, dotVH ); + + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + + float D = D_GGX( alpha, dotNH ); + + return F * ( V * D ); + + } + +#endif + +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + + float alpha = pow2( roughness ); // UE4's roughness + + vec3 halfDir = normalize( lightDir + viewDir ); + + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + + vec3 F = F_Schlick( f0, f90, dotVH ); + + #ifdef USE_IRIDESCENCE + + F = mix( F, material.iridescenceFresnel, material.iridescence ); + + #endif + + #ifdef USE_ANISOTROPY + + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + + #else + + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + + float D = D_GGX( alpha, dotNH ); + + #endif + + return F * ( V * D ); + +} + +// Rect Area Light + +// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines +// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt +// code: https://github.com/selfshadow/ltc_code/ + +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + + float dotNV = saturate( dot( N, V ) ); + + // texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) ) + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + + uv = uv * LUT_SCALE + LUT_BIAS; + + return uv; + +} + +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + + // Real-Time Area Lighting: a Journey from Research to Production (p.102) + // An approximation of the form factor of a horizon-clipped rectangle. + + float l = length( f ); + + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); + +} + +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + + float x = dot( v1, v2 ); + + float y = abs( x ); + + // rational polynomial approximation to theta / sin( theta ) / 2PI + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + + return cross( v1, v2 ) * theta_sintheta; + +} + +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + + // bail if point is on back side of plane of light + // assumes ccw winding order of light vertices + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + + // construct orthonormal basis around N + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system + + // compute transform + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + + // transform rect + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + + // project rect onto sphere + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + + // calculate vector form factor + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + + // adjust for horizon clipping + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + +/* + // alternate method of adjusting for horizon clipping (see referece) + // refactoring required + float len = length( vectorFormFactor ); + float z = vectorFormFactor.z / len; + + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + + // tabulated horizon-clipped sphere, apparently... + vec2 uv = vec2( z * 0.5 + 0.5, len ); + uv = uv * LUT_SCALE + LUT_BIAS; + + float scale = texture2D( ltc_2, uv ).w; + + float result = len * scale; +*/ + + return vec3( result ); + +} + +// End Rect Area Light + +#if defined( USE_SHEEN ) + +// https://github.com/google/filament/blob/master/shaders/src/brdf.fs +float D_Charlie( float roughness, float dotNH ) { + + float alpha = pow2( roughness ); + + // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF" + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); // 2^(-14/2), so sin2h^2 > 0 in fp16 + + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); + +} + +// https://github.com/google/filament/blob/master/shaders/src/brdf.fs +float V_Neubelt( float dotNV, float dotNL ) { + + // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886" + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); + +} + +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + + vec3 halfDir = normalize( lightDir + viewDir ); + + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + + return sheenColor * ( D * V ); + +} + +#endif + +// This is a curve-fit approxmation to the "Charlie sheen" BRDF integrated over the hemisphere from +// Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF". The analysis can be found +// in the Sheen section of https://drive.google.com/file/d/1T0D1VSyR4AllqIJTQAraEIzjlb5h4FKH/view?usp=sharing +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + + float dotNV = saturate( dot( normal, viewDir ) ); + + float r2 = roughness * roughness; + + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + + return saturate( DG * RECIPROCAL_PI ); + +} + +// Analytical approximation of the DFG LUT, one half of the +// split-sum approximation used in indirect specular lighting. +// via 'environmentBRDF' from "Physically Based Shading on Mobile" +// https://www.unrealengine.com/blog/physically-based-shading-on-mobile +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + + float dotNV = saturate( dot( normal, viewDir ) ); + + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + + vec4 r = roughness * c0 + c1; + + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + + return fab; + +} + +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + + vec2 fab = DFGApprox( normal, viewDir, roughness ); + + return specularColor * fab.x + specularF90 * fab.y; + +} + +// Fdez-Ag\xFCera's "Multiple-Scattering Microfacet Model for Real-Time Image Based Lighting" +// Approximates multiscattering in order to preserve energy. +// http://www.jcgt.org/published/0008/01/03/ +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + + vec2 fab = DFGApprox( normal, viewDir, roughness ); + + #ifdef USE_IRIDESCENCE + + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + + #else + + vec3 Fr = specularColor; + + #endif + + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; // 1/21 + vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + + singleScatter += FssEss; + multiScatter += Fms * Ems; + +} + +#if NUM_RECT_AREA_LIGHTS > 0 + + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; // counterclockwise; light shines in local neg z direction + rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + + // LTC Fresnel Approximation by Stephen Hill + // http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + + } + +#endif + +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + + vec3 irradiance = dotNL * directLight.color; + + #ifdef USE_CLEARCOAT + + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + + vec3 ccIrradiance = dotNLcc * directLight.color; + + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + + #endif + + #ifdef USE_SHEEN + + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + + #endif + + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} + +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + +} + +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + + #ifdef USE_CLEARCOAT + + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + + #endif + + #ifdef USE_SHEEN + + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + + #endif + + // Both indirect specular and indirect diffuse light accumulate here + + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + + #ifdef USE_IRIDESCENCE + + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + + #else + + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + + #endif + + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; + +} + +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical + +// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); + +} +`;var jee=` +/** + * This is a template that can be used to light a material, it uses pluggable + * RenderEquations (RE)for specific lighting scenarios. + * + * Instructions for use: + * - Ensure that both RE_Direct, RE_IndirectDiffuse and RE_IndirectSpecular are defined + * - Create a material parameter that is to be passed as the third parameter to your lighting functions. + * + * TODO: + * - Add area light support. + * - Add sphere light support. + * - Add diffuse light probe (irradiance cubemap) support. + */ + +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); + +vec3 geometryClearcoatNormal = vec3( 0.0 ); + +#ifdef USE_CLEARCOAT + + geometryClearcoatNormal = clearcoatNormal; + +#endif + +#ifdef USE_IRIDESCENCE + + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + + if ( material.iridescenceThickness == 0.0 ) { + + material.iridescence = 0.0; + + } else { + + material.iridescence = saturate( material.iridescence ); + + } + + if ( material.iridescence > 0.0 ) { + + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + + // Iridescence F0 approximation + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + + } + +#endif + +IncidentLight directLight; + +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + + pointLight = pointLights[ i ]; + + getPointLightInfo( pointLight, geometryPosition, directLight ); + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + + spotLight = spotLights[ i ]; + + getSpotLightInfo( spotLight, geometryPosition, directLight ); + + // spot lights are ordered [shadows with maps, shadows without maps, maps without shadows, none] + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + + #undef SPOT_LIGHT_MAP_INDEX + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + + directionalLight = directionalLights[ i ]; + + getDirectionalLightInfo( directionalLight, directLight ); + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + + RectAreaLight rectAreaLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if defined( RE_IndirectDiffuse ) + + vec3 iblIrradiance = vec3( 0.0 ); + + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + + #if defined( USE_LIGHT_PROBES ) + + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + + #endif + + #if ( NUM_HEMI_LIGHTS > 0 ) + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + + } + #pragma unroll_loop_end + + #endif + +#endif + +#if defined( RE_IndirectSpecular ) + + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); + +#endif +`;var Kee=` +#if defined( RE_IndirectDiffuse ) + + #ifdef USE_LIGHTMAP + + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + + irradiance += lightMapIrradiance; + + #endif + + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + + iblIrradiance += getIBLIrradiance( geometryNormal ); + + #endif + +#endif + +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + + #ifdef USE_ANISOTROPY + + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + + #else + + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + + #endif + + #ifdef USE_CLEARCOAT + + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + + #endif + +#endif +`;var Jee=` +#if defined( RE_IndirectDiffuse ) + + RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + +#endif + +#if defined( RE_IndirectSpecular ) + + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + +#endif +`;var $ee=` +#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + + // Doing a strict comparison with == 1.0 can cause noise artifacts + // on some platforms. See issue #17623. + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; + +#endif +`;var Qee=` +#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; + +#endif +`;var ete=` +#ifdef USE_LOGDEPTHBUF + + #ifdef USE_LOGDEPTHBUF_EXT + + varying float vFragDepth; + varying float vIsPerspective; + + #else + + uniform float logDepthBufFC; + + #endif + +#endif +`;var tte=` +#ifdef USE_LOGDEPTHBUF + + #ifdef USE_LOGDEPTHBUF_EXT + + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + + #else + + if ( isPerspectiveMatrix( projectionMatrix ) ) { + + gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; + + gl_Position.z *= gl_Position.w; + + } + + #endif + +#endif +`;var rte=` +#ifdef USE_MAP + + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + + #ifdef DECODE_VIDEO_TEXTURE + + // use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures (#26516) + + sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); + + #endif + + diffuseColor *= sampledDiffuseColor; + +#endif +`;var ite=` +#ifdef USE_MAP + + uniform sampler2D map; + +#endif +`;var nte=` +#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + + #if defined( USE_POINTS_UV ) + + vec2 uv = vUv; + + #else + + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + + #endif + +#endif + +#ifdef USE_MAP + + diffuseColor *= texture2D( map, uv ); + +#endif + +#ifdef USE_ALPHAMAP + + diffuseColor.a *= texture2D( alphaMap, uv ).g; + +#endif +`;var ate=` +#if defined( USE_POINTS_UV ) + + varying vec2 vUv; + +#else + + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + + uniform mat3 uvTransform; + + #endif + +#endif + +#ifdef USE_MAP + + uniform sampler2D map; + +#endif + +#ifdef USE_ALPHAMAP + + uniform sampler2D alphaMap; + +#endif +`;var ote=` +float metalnessFactor = metalness; + +#ifdef USE_METALNESSMAP + + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + + // reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture + metalnessFactor *= texelMetalness.b; + +#endif +`;var ste=` +#ifdef USE_METALNESSMAP + + uniform sampler2D metalnessMap; + +#endif +`;var lte=` +#ifdef USE_INSTANCING_MORPH + + float morphTargetInfluences[MORPHTARGETS_COUNT]; + + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + + } +#endif +`;var ute=` +#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) + + // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: + // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence) + // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting + vColor *= morphTargetBaseInfluence; + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + #if defined( USE_COLOR_ALPHA ) + + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + + #elif defined( USE_COLOR ) + + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + + #endif + + } + +#endif +`;var cte=` +#ifdef USE_MORPHNORMALS + + // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: + // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence) + // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting + objectNormal *= morphTargetBaseInfluence; + + #ifdef MORPHTARGETS_TEXTURE + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + + } + + #else + + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + + #endif + +#endif +`;var fte=` +#ifdef USE_MORPHTARGETS + + #ifndef USE_INSTANCING_MORPH + + uniform float morphTargetBaseInfluence; + + #endif + + #ifdef MORPHTARGETS_TEXTURE + + #ifndef USE_INSTANCING_MORPH + + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + + #endif + + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + + } + + #else + + #ifndef USE_MORPHNORMALS + + uniform float morphTargetInfluences[ 8 ]; + + #else + + uniform float morphTargetInfluences[ 4 ]; + + #endif + + #endif + +#endif +`;var hte=` +#ifdef USE_MORPHTARGETS + + // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: + // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in position = sum((target - base) * influence) + // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting + transformed *= morphTargetBaseInfluence; + + #ifdef MORPHTARGETS_TEXTURE + + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + + } + + #else + + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + + #ifndef USE_MORPHNORMALS + + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + + #endif + + #endif + +#endif +`;var pte=` +float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; + +#ifdef FLAT_SHADED + + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); + +#else + + vec3 normal = normalize( vNormal ); + + #ifdef DOUBLE_SIDED + + normal *= faceDirection; + + #endif + +#endif + +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + + #ifdef USE_TANGENT + + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + + #else + + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + + #endif + + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + + #endif + +#endif + +#ifdef USE_CLEARCOAT_NORMALMAP + + #ifdef USE_TANGENT + + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + + #else + + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + + #endif + + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + + #endif + +#endif + +// non perturbed normal for clearcoat among others + +vec3 nonPerturbedNormal = normal; + +`;var dte=` + +#ifdef USE_NORMALMAP_OBJECTSPACE + + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals + + #ifdef FLIP_SIDED + + normal = - normal; + + #endif + + #ifdef DOUBLE_SIDED + + normal = normal * faceDirection; + + #endif + + normal = normalize( normalMatrix * normal ); + +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + + normal = normalize( tbn * mapN ); + +#elif defined( USE_BUMPMAP ) + + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); + +#endif +`;var mte=` +#ifndef FLAT_SHADED + + varying vec3 vNormal; + + #ifdef USE_TANGENT + + varying vec3 vTangent; + varying vec3 vBitangent; + + #endif + +#endif +`;var vte=` +#ifndef FLAT_SHADED + + varying vec3 vNormal; + + #ifdef USE_TANGENT + + varying vec3 vTangent; + varying vec3 vBitangent; + + #endif + +#endif +`;var gte=` +#ifndef FLAT_SHADED // normal is computed with derivatives when FLAT_SHADED + + vNormal = normalize( transformedNormal ); + + #ifdef USE_TANGENT + + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + + #endif + +#endif +`;var yte=` +#ifdef USE_NORMALMAP + + uniform sampler2D normalMap; + uniform vec2 normalScale; + +#endif + +#ifdef USE_NORMALMAP_OBJECTSPACE + + uniform mat3 normalMatrix; + +#endif + +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + + // Normal Mapping Without Precomputed Tangents + // http://www.thetenthplanet.de/archives/1180 + + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + + vec3 N = surf_norm; // normalized + + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + + return mat3( T * scale, B * scale, N ); + + } + +#endif +`;var _te=` +#ifdef USE_CLEARCOAT + + vec3 clearcoatNormal = nonPerturbedNormal; + +#endif +`;var xte=` +#ifdef USE_CLEARCOAT_NORMALMAP + + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); + +#endif +`;var Ste=` + +#ifdef USE_CLEARCOATMAP + + uniform sampler2D clearcoatMap; + +#endif + +#ifdef USE_CLEARCOAT_NORMALMAP + + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; + +#endif + +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + uniform sampler2D clearcoatRoughnessMap; + +#endif +`;var Mte=` + +#ifdef USE_IRIDESCENCEMAP + + uniform sampler2D iridescenceMap; + +#endif + +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + uniform sampler2D iridescenceThicknessMap; + +#endif +`;var bte=` +#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif + +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif + +gl_FragColor = vec4( outgoingLight, diffuseColor.a ); +`;var wte=` +vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} + +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} + +const float PackUpscale = 256. / 255.; // fraction -> 0..1 (including 1) +const float UnpackDownscale = 255. / 256.; // 0..1 -> fraction (excluding 1) + +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); + +const float ShiftRight8 = 1. / 256.; + +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; // tidy overflow + return r * PackUpscale; +} + +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} + +vec2 packDepthToRG( in highp float v ) { + return packDepthToRGBA( v ).yx; +} + +float unpackRGToDepth( const in highp vec2 v ) { + return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); +} + +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} + +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} + +// NOTE: viewZ, the z-coordinate in camera space, is negative for points in front of the camera + +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + // -near maps to 0; -far maps to 1 + return ( viewZ + near ) / ( near - far ); +} + +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + // maps orthographic depth in [ 0, 1 ] to viewZ + return depth * ( near - far ) - near; +} + +// NOTE: https://twitter.com/gonnavis/status/1377183786949959682 + +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + // -near maps to 0; -far maps to 1 + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} + +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + // maps perspective depth in [ 0, 1 ] to viewZ + return ( near * far ) / ( ( far - near ) * depth - far ); +} +`;var Tte=` +#ifdef PREMULTIPLIED_ALPHA + + // Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation. + gl_FragColor.rgb *= gl_FragColor.a; + +#endif +`;var Ete=` +vec4 mvPosition = vec4( transformed, 1.0 ); + +#ifdef USE_BATCHING + + mvPosition = batchingMatrix * mvPosition; + +#endif + +#ifdef USE_INSTANCING + + mvPosition = instanceMatrix * mvPosition; + +#endif + +mvPosition = modelViewMatrix * mvPosition; + +gl_Position = projectionMatrix * mvPosition; +`;var Ate=` +#ifdef DITHERING + + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); + +#endif +`;var Cte=` +#ifdef DITHERING + + // based on https://www.shadertoy.com/view/MslGR8 + vec3 dithering( vec3 color ) { + //Calculate grid position + float grid_position = rand( gl_FragCoord.xy ); + + //Shift the individual colors differently, thus making it even harder to see the dithering pattern + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + + //modify shift according to grid position. + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + + //shift the color by dither_shift + return color + dither_shift_RGB; + } + +#endif +`;var Rte=` +float roughnessFactor = roughness; + +#ifdef USE_ROUGHNESSMAP + + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + + // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture + roughnessFactor *= texelRoughness.g; + +#endif +`;var Lte=` +#ifdef USE_ROUGHNESSMAP + + uniform sampler2D roughnessMap; + +#endif +`;var Pte=` +#if NUM_SPOT_LIGHT_COORDS > 0 + + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; + +#endif + +#if NUM_SPOT_LIGHT_MAPS > 0 + + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; + +#endif + +#ifdef USE_SHADOWMAP + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + + #endif + + #if NUM_SPOT_LIGHT_SHADOWS > 0 + + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): create uniforms for area light shadows + + #endif + */ + + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + + } + + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + + } + + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + + float occlusion = 1.0; + + vec2 distribution = texture2DDistribution( shadow, uv ); + + float hard_shadow = step( compare , distribution.x ); // Hard Shadow + + if (hard_shadow != 1.0 ) { + + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); // Chebeyshevs inequality + softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); // 0.3 reduces light bleed + occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + + } + return occlusion; + + } + + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + + float shadow = 1.0; + + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + + if ( frustumTest ) { + + #if defined( SHADOWMAP_TYPE_PCF ) + + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + + #elif defined( SHADOWMAP_TYPE_VSM ) + + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + + #else // no percentage-closer filtering: + + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + + #endif + + } + + return shadow; + + } + + // cubeToUV() maps a 3D direction vector suitable for cube texture mapping to a 2D + // vector suitable for 2D texture mapping. This code uses the following layout for the + // 2D texture: + // + // xzXZ + // y Y + // + // Y - Positive y direction + // y - Negative y direction + // X - Positive x direction + // x - Negative x direction + // Z - Positive z direction + // z - Negative z direction + // + // Source and test bed: + // https://gist.github.com/tschw/da10c43c467ce8afd0c4 + + vec2 cubeToUV( vec3 v, float texelSizeY ) { + + // Number of texels to avoid at the edge of each square + + vec3 absV = abs( v ); + + // Intersect unit cube + + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + + // Apply scale to avoid seams + + // two texels less per square (one texel will do for NEAREST) + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + + // Unwrap + + // space: -1 ... 1 range for each square + // + // #X## dim := ( 4 , 2 ) + // # # center := ( 1 , 1 ) + + vec2 planar = v.xy; + + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + + if ( absV.z >= almostOne ) { + + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + + } else if ( absV.x >= almostOne ) { + + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + + } else if ( absV.y >= almostOne ) { + + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + + } + + // Transform to UV space + + // scale := 0.5 / dim + // translate := ( center + 0.5 ) / dim + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + + } + + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + + // for point lights, the uniform @vShadowCoord is re-purposed to hold + // the vector from the light to the world-space position of the fragment. + vec3 lightToPosition = shadowCoord.xyz; + + // dp = normalized distance from light to fragment position + float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); // need to clamp? + dp += shadowBias; + + // bd3D = base direction 3D + vec3 bd3D = normalize( lightToPosition ); + + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + + #else // no percentage-closer filtering + + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + + #endif + + } + +#endif +`;var Dte=` + +#if NUM_SPOT_LIGHT_COORDS > 0 + + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; + +#endif + +#ifdef USE_SHADOWMAP + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + + #endif + + #if NUM_SPOT_LIGHT_SHADOWS > 0 + + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): uniforms for area light shadows + + #endif + */ + +#endif +`;var Ite=` + +#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + + // Offsetting the position used for querying occlusion along the world normal can be used to reduce shadow acne. + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; + +#endif + +#if defined( USE_SHADOWMAP ) + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + + } + #pragma unroll_loop_end + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + + } + #pragma unroll_loop_end + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): update vAreaShadowCoord with area light info + + #endif + */ + +#endif + +// spot lights can be evaluated without active shadow mapping (when SpotLight.map is used) + +#if NUM_SPOT_LIGHT_COORDS > 0 + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + + } + #pragma unroll_loop_end + +#endif + + +`;var Nte=` +float getShadowMask() { + + float shadow = 1.0; + + #ifdef USE_SHADOWMAP + + #if NUM_DIR_LIGHT_SHADOWS > 0 + + DirectionalLightShadow directionalLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + + } + #pragma unroll_loop_end + + #endif + + #if NUM_SPOT_LIGHT_SHADOWS > 0 + + SpotLightShadow spotLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + + } + #pragma unroll_loop_end + + #endif + + #if NUM_POINT_LIGHT_SHADOWS > 0 + + PointLightShadow pointLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + + } + #pragma unroll_loop_end + + #endif + + /* + #if NUM_RECT_AREA_LIGHTS > 0 + + // TODO (abelnation): update shadow for Area light + + #endif + */ + + #endif + + return shadow; + +} +`;var Ute=` +#ifdef USE_SKINNING + + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); + +#endif +`;var Ote=` +#ifdef USE_SKINNING + + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + + uniform highp sampler2D boneTexture; + + mat4 getBoneMatrix( const in float i ) { + + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + + return mat4( v1, v2, v3, v4 ); + + } + +#endif +`;var Fte=` +#ifdef USE_SKINNING + + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + + transformed = ( bindMatrixInverse * skinned ).xyz; + +#endif +`;var zte=` +#ifdef USE_SKINNING + + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + + #ifdef USE_TANGENT + + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + + #endif + +#endif +`;var Bte=` +float specularStrength; + +#ifdef USE_SPECULARMAP + + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; + +#else + + specularStrength = 1.0; + +#endif +`;var kte=` +#ifdef USE_SPECULARMAP + + uniform sampler2D specularMap; + +#endif +`;var Vte=` +#if defined( TONE_MAPPING ) + + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); + +#endif +`;var Gte=` +#ifndef saturate +// may have defined saturate() already +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif + +uniform float toneMappingExposure; + +// exposure only +vec3 LinearToneMapping( vec3 color ) { + + return saturate( toneMappingExposure * color ); + +} + +// source: https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf +vec3 ReinhardToneMapping( vec3 color ) { + + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); + +} + +// source: http://filmicworlds.com/blog/filmic-tonemapping-operators/ +vec3 OptimizedCineonToneMapping( vec3 color ) { + + // optimized filmic operator by Jim Hejl and Richard Burgess-Dawson + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); + +} + +// source: https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs +vec3 RRTAndODTFit( vec3 v ) { + + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; + +} + +// this implementation of ACES is modified to accommodate a brighter viewing environment. +// the scale factor of 1/0.6 is subjective. see discussion in #19621. + +vec3 ACESFilmicToneMapping( vec3 color ) { + + // sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), // transposed from source + vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + + // ODT_SAT => XYZ => D60_2_D65 => sRGB + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), // transposed from source + vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + + color *= toneMappingExposure / 0.6; + + color = ACESInputMat * color; + + // Apply RRT and ODT + color = RRTAndODTFit( color ); + + color = ACESOutputMat * color; + + // Clamp to [0, 1] + return saturate( color ); + +} + +// Matrices for rec 2020 <> rec 709 color space conversion +// matrix provided in row-major order so it has been transposed +// https://www.itu.int/pub/R-REP-BT.2407-2017 +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); + +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); + +// https://iolite-engine.com/blog_posts/minimal_agx_implementation +// Mean error^2: 3.6705141e-06 +vec3 agxDefaultContrastApprox( vec3 x ) { + + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; + +} + +// AgX Tone Mapping implementation based on Filament, which in turn is based +// on Blender's implementation using rec 2020 primaries +// https://github.com/google/filament/pull/7236 +// Inputs and outputs are encoded as Linear-sRGB. + +vec3 AgXToneMapping( vec3 color ) { + + // AgX constants + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + + // explicit AgXOutsetMatrix generated from Filaments AgXOutsetMatrixInv + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + + // LOG2_MIN = -10.0 + // LOG2_MAX = +6.5 + // MIDDLE_GRAY = 0.18 + const float AgxMinEv = - 12.47393; // log2( pow( 2, LOG2_MIN ) * MIDDLE_GRAY ) + const float AgxMaxEv = 4.026069; // log2( pow( 2, LOG2_MAX ) * MIDDLE_GRAY ) + + color *= toneMappingExposure; + + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + + color = AgXInsetMatrix * color; + + // Log2 encoding + color = max( color, 1e-10 ); // avoid 0 or negative numbers for log2 + color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + + color = clamp( color, 0.0, 1.0 ); + + // Apply sigmoid + color = agxDefaultContrastApprox( color ); + + // Apply AgX look + // v = agxLook(v, look); + + color = AgXOutsetMatrix * color; + + // Linearize + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + + // Gamut mapping. Simple clamp for now. + color = clamp( color, 0.0, 1.0 ); + + return color; + +} + +// https://modelviewer.dev/examples/tone-mapping + +vec3 NeutralToneMapping( vec3 color ) { + float startCompression = 0.8 - 0.04; + float desaturation = 0.15; + + color *= toneMappingExposure; + + float x = min(color.r, min(color.g, color.b)); + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + color -= offset; + + float peak = max(color.r, max(color.g, color.b)); + if (peak < startCompression) return color; + + float d = 1. - startCompression; + float newPeak = 1. - d * d / (peak + d - startCompression); + color *= newPeak / peak; + + float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.); + return mix(color, vec3(1, 1, 1), g); +} + +vec3 CustomToneMapping( vec3 color ) { return color; } +`;var Hte=` +#ifdef USE_TRANSMISSION + + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + + #ifdef USE_TRANSMISSIONMAP + + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + + #endif + + #ifdef USE_THICKNESSMAP + + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + + #endif + + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); + +#endif +`;var Wte=` +#ifdef USE_TRANSMISSION + + // Transmission code is based on glTF-Sampler-Viewer + // https://github.com/KhronosGroup/glTF-Sample-Viewer + + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + + #ifdef USE_TRANSMISSIONMAP + + uniform sampler2D transmissionMap; + + #endif + + #ifdef USE_THICKNESSMAP + + uniform sampler2D thicknessMap; + + #endif + + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + + varying vec3 vWorldPosition; + + // Mipped Bicubic Texture Filtering by N8 + // https://www.shadertoy.com/view/Dl2SDW + + float w0( float a ) { + + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + + } + + float w1( float a ) { + + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + + } + + float w2( float a ){ + + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + + } + + float w3( float a ) { + + return ( 1.0 / 6.0 ) * ( a * a * a ); + + } + + // g0 and g1 are the two amplitude functions + float g0( float a ) { + + return w0( a ) + w1( a ); + + } + + float g1( float a ) { + + return w2( a ) + w3( a ); + + } + + // h0 and h1 are the two offset functions + float h0( float a ) { + + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + + } + + float h1( float a ) { + + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + + } + + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + + uv = uv * texelSize.zw + 0.5; + + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + + } + + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + + } + + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + + // Direction of refracted light. + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + + // Compute rotation-independant scaling of the model matrix. + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + + // The thickness is specified in local space. + return normalize( refractionVector ) * thickness * modelScale; + + } + + float applyIorToRoughness( const in float roughness, const in float ior ) { + + // Scale roughness with IOR so that an IOR of 1.0 results in no microfacet refraction and + // an IOR of 1.5 results in the default amount of microfacet refraction. + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + + } + + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + + } + + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + + if ( isinf( attenuationDistance ) ) { + + // Attenuation distance is +\u221E, i.e. the transmitted color is not attenuated at all. + return vec3( 1.0 ); + + } else { + + // Compute light attenuation using Beer's law. + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); // Beer's law + return transmittance; + + } + + } + + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + + // Project refracted vector on the framebuffer, while mapping to normalized device coordinates. + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + + // Sample framebuffer to get pixel the refracted ray hits. + vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + + vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + + // Get the specular component. + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + + // As less light is transmitted, the opacity should be increased. This simple approximation does a decent job + // of modulating a CSS background, and has no effect when the buffer is opaque, due to a solid object or clear color. + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + + } +#endif +`;var Xte=` +#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + + varying vec2 vUv; + +#endif +#ifdef USE_MAP + + varying vec2 vMapUv; + +#endif +#ifdef USE_ALPHAMAP + + varying vec2 vAlphaMapUv; + +#endif +#ifdef USE_LIGHTMAP + + varying vec2 vLightMapUv; + +#endif +#ifdef USE_AOMAP + + varying vec2 vAoMapUv; + +#endif +#ifdef USE_BUMPMAP + + varying vec2 vBumpMapUv; + +#endif +#ifdef USE_NORMALMAP + + varying vec2 vNormalMapUv; + +#endif +#ifdef USE_EMISSIVEMAP + + varying vec2 vEmissiveMapUv; + +#endif +#ifdef USE_METALNESSMAP + + varying vec2 vMetalnessMapUv; + +#endif +#ifdef USE_ROUGHNESSMAP + + varying vec2 vRoughnessMapUv; + +#endif +#ifdef USE_ANISOTROPYMAP + + varying vec2 vAnisotropyMapUv; + +#endif +#ifdef USE_CLEARCOATMAP + + varying vec2 vClearcoatMapUv; + +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + + varying vec2 vClearcoatNormalMapUv; + +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + varying vec2 vClearcoatRoughnessMapUv; + +#endif +#ifdef USE_IRIDESCENCEMAP + + varying vec2 vIridescenceMapUv; + +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + varying vec2 vIridescenceThicknessMapUv; + +#endif +#ifdef USE_SHEEN_COLORMAP + + varying vec2 vSheenColorMapUv; + +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + + varying vec2 vSheenRoughnessMapUv; + +#endif +#ifdef USE_SPECULARMAP + + varying vec2 vSpecularMapUv; + +#endif +#ifdef USE_SPECULAR_COLORMAP + + varying vec2 vSpecularColorMapUv; + +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + + varying vec2 vSpecularIntensityMapUv; + +#endif +#ifdef USE_TRANSMISSIONMAP + + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; + +#endif +#ifdef USE_THICKNESSMAP + + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; + +#endif +`;var Yte=` +#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + + varying vec2 vUv; + +#endif +#ifdef USE_MAP + + uniform mat3 mapTransform; + varying vec2 vMapUv; + +#endif +#ifdef USE_ALPHAMAP + + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; + +#endif +#ifdef USE_LIGHTMAP + + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; + +#endif +#ifdef USE_AOMAP + + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; + +#endif +#ifdef USE_BUMPMAP + + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; + +#endif +#ifdef USE_NORMALMAP + + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; + +#endif +#ifdef USE_DISPLACEMENTMAP + + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; + +#endif +#ifdef USE_EMISSIVEMAP + + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; + +#endif +#ifdef USE_METALNESSMAP + + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; + +#endif +#ifdef USE_ROUGHNESSMAP + + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; + +#endif +#ifdef USE_ANISOTROPYMAP + + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; + +#endif +#ifdef USE_CLEARCOATMAP + + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; + +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; + +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; + +#endif +#ifdef USE_SHEEN_COLORMAP + + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; + +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; + +#endif +#ifdef USE_IRIDESCENCEMAP + + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; + +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; + +#endif +#ifdef USE_SPECULARMAP + + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; + +#endif +#ifdef USE_SPECULAR_COLORMAP + + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; + +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; + +#endif +#ifdef USE_TRANSMISSIONMAP + + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; + +#endif +#ifdef USE_THICKNESSMAP + + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; + +#endif +`;var qte=` +#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + + vUv = vec3( uv, 1 ).xy; + +#endif +#ifdef USE_MAP + + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_ALPHAMAP + + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_LIGHTMAP + + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_AOMAP + + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_BUMPMAP + + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_NORMALMAP + + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_DISPLACEMENTMAP + + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_EMISSIVEMAP + + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_METALNESSMAP + + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_ROUGHNESSMAP + + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_ANISOTROPYMAP + + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_CLEARCOATMAP + + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_IRIDESCENCEMAP + + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SHEEN_COLORMAP + + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SPECULARMAP + + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SPECULAR_COLORMAP + + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_TRANSMISSIONMAP + + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; + +#endif +#ifdef USE_THICKNESSMAP + + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; + +#endif +`;var Zte=` +#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + + vec4 worldPosition = vec4( transformed, 1.0 ); + + #ifdef USE_BATCHING + + worldPosition = batchingMatrix * worldPosition; + + #endif + + #ifdef USE_INSTANCING + + worldPosition = instanceMatrix * worldPosition; + + #endif + + worldPosition = modelMatrix * worldPosition; + +#endif +`;var jte=` +varying vec2 vUv; +uniform mat3 uvTransform; + +void main() { + + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + + gl_Position = vec4( position.xy, 1.0, 1.0 ); + +} +`,Kte=` +uniform sampler2D t2D; +uniform float backgroundIntensity; + +varying vec2 vUv; + +void main() { + + vec4 texColor = texture2D( t2D, vUv ); + + #ifdef DECODE_VIDEO_TEXTURE + + // use inline sRGB decode until browsers properly support SRGB8_APLHA8 with video textures + + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + + #endif + + texColor.rgb *= backgroundIntensity; + + gl_FragColor = texColor; + + #include + #include + +} +`;var Jte=` +varying vec3 vWorldDirection; + +#include + +void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + gl_Position.z = gl_Position.w; // set z to camera.far + +} +`,$te=` + +#ifdef ENVMAP_TYPE_CUBE + + uniform samplerCube envMap; + +#elif defined( ENVMAP_TYPE_CUBE_UV ) + + uniform sampler2D envMap; + +#endif + +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; + +varying vec3 vWorldDirection; + +#include + +void main() { + + #ifdef ENVMAP_TYPE_CUBE + + vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + + #elif defined( ENVMAP_TYPE_CUBE_UV ) + + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + + #else + + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + + #endif + + texColor.rgb *= backgroundIntensity; + + gl_FragColor = texColor; + + #include + #include + +} +`;var Qte=` +varying vec3 vWorldDirection; + +#include + +void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + gl_Position.z = gl_Position.w; // set z to camera.far + +} +`,ere=` +uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; + +varying vec3 vWorldDirection; + +void main() { + + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + + #include + #include + +} +`;var tre=` +#include +#include +#include +#include +#include +#include +#include +#include + +// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible. +// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for +// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1. +varying vec2 vHighPrecisionZW; + +void main() { + + #include + + #include + #include + + #include + + #ifdef USE_DISPLACEMENTMAP + + #include + #include + #include + + #endif + + #include + #include + #include + #include + #include + #include + #include + + vHighPrecisionZW = gl_Position.zw; + +} +`,rre=` +#if DEPTH_PACKING == 3200 + + uniform float opacity; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +varying vec2 vHighPrecisionZW; + +void main() { + + vec4 diffuseColor = vec4( 1.0 ); + #include + + #if DEPTH_PACKING == 3200 + + diffuseColor.a = opacity; + + #endif + + #include + #include + #include + #include + + #include + + // Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values. + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + + #if DEPTH_PACKING == 3200 + + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + + #elif DEPTH_PACKING == 3201 + + gl_FragColor = packDepthToRGBA( fragCoordZ ); + + #endif + +} +`;var ire=` +#define DISTANCE + +varying vec3 vWorldPosition; + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + + #include + #include + + #include + + #ifdef USE_DISPLACEMENTMAP + + #include + #include + #include + + #endif + + #include + #include + #include + #include + #include + #include + #include + + vWorldPosition = worldPosition.xyz; + +} +`,nre=` +#define DISTANCE + +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; + +#include +#include +#include +#include +#include +#include +#include +#include + +void main () { + + vec4 diffuseColor = vec4( 1.0 ); + #include + + #include + #include + #include + #include + + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); // clamp to [ 0, 1 ] + + gl_FragColor = packDepthToRGBA( dist ); + +} +`;var are=` +varying vec3 vWorldDirection; + +#include + +void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + +} +`,ore=` +uniform sampler2D tEquirect; + +varying vec3 vWorldDirection; + +#include + +void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + #include + #include + +} +`;var sre=` +uniform float scale; +attribute float lineDistance; + +varying float vLineDistance; + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vLineDistance = scale * lineDistance; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + +} +`,lre=` +uniform vec3 diffuse; +uniform float opacity; + +uniform float dashSize; +uniform float totalSize; + +varying float vLineDistance; + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + if ( mod( vLineDistance, totalSize ) > dashSize ) { + + discard; + + } + + vec3 outgoingLight = vec3( 0.0 ); + + #include + #include + #include + + outgoingLight = diffuseColor.rgb; // simple shader + + #include + #include + #include + #include + #include + +} +`;var ure=` +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + + #include + #include + #include + #include + #include + + #endif + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + +} +`,cre=` +uniform vec3 diffuse; +uniform float opacity; + +#ifndef FLAT_SHADED + + varying vec3 vNormal; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + #include + #include + #include + #include + #include + #include + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + + // accumulation (baked indirect lighting only) + #ifdef USE_LIGHTMAP + + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + + #else + + reflectedLight.indirectDiffuse += vec3( 1.0 ); + + #endif + + // modulation + #include + + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + + vec3 outgoingLight = reflectedLight.indirectDiffuse; + + #include + + #include + #include + #include + #include + #include + #include + +} +`;var fre=` +#define LAMBERT + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + #include + +} +`,hre=` +#define LAMBERT + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + + #include + #include + #include + #include + #include + #include + #include + +} +`;var pre=` +#define MATCAP + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + +} +`,dre=` +#define MATCAP + +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + #include + #include + #include + #include + #include + #include + #include + #include + + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; // 0.495 to remove artifacts caused by undersized matcap disks + + #ifdef USE_MATCAP + + vec4 matcapColor = texture2D( matcap, uv ); + + #else + + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); // default if matcap is missing + + #endif + + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + + #include + #include + #include + #include + #include + #include + +} +`;var mre=` +#define NORMAL + +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + + varying vec3 vViewPosition; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + + vViewPosition = - mvPosition.xyz; + +#endif + +} +`,vre=` +#define NORMAL + +uniform float opacity; + +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + + varying vec3 vViewPosition; + +#endif + +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + + #include + #include + #include + #include + + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + + #ifdef OPAQUE + + gl_FragColor.a = 1.0; + + #endif + +} +`;var gre=` +#define PHONG + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + #include + +} +`,yre=` +#define PHONG + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + + #include + #include + #include + #include + #include + #include + #include + +} +`;var _re=` +#define STANDARD + +varying vec3 vViewPosition; + +#ifdef USE_TRANSMISSION + + varying vec3 vWorldPosition; + +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + +#ifdef USE_TRANSMISSION + + vWorldPosition = worldPosition.xyz; + +#endif +} +`,xre=` +#define STANDARD + +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; + +#ifdef IOR + uniform float ior; +#endif + +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif + +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif + +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif + +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif + +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + + #include + + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + + #ifdef USE_SHEEN + + // Sheen energy compensation approximation calculation can be found at the end of + // https://drive.google.com/file/d/1T0D1VSyR4AllqIJTQAraEIzjlb5h4FKH/view?usp=sharing + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + + #endif + + #ifdef USE_CLEARCOAT + + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + + #endif + + #include + #include + #include + #include + #include + #include + +} +`;var Sre=` +#define TOON + +varying vec3 vViewPosition; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + + vViewPosition = - mvPosition.xyz; + + #include + #include + #include + +} +`,Mre=` +#define TOON + +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // accumulation + #include + #include + #include + #include + + // modulation + #include + + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + + #include + #include + #include + #include + #include + #include + +} +`;var bre=` +uniform float size; +uniform float scale; + +#include +#include +#include +#include +#include +#include + +#ifdef USE_POINTS_UV + + varying vec2 vUv; + uniform mat3 uvTransform; + +#endif + +void main() { + + #ifdef USE_POINTS_UV + + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + + #endif + + #include + #include + #include + #include + #include + #include + + gl_PointSize = size; + + #ifdef USE_SIZEATTENUATION + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + + #endif + + #include + #include + #include + #include + +} +`,wre=` +uniform vec3 diffuse; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + vec3 outgoingLight = vec3( 0.0 ); + + #include + #include + #include + #include + #include + + outgoingLight = diffuseColor.rgb; + + #include + #include + #include + #include + #include + +} +`;var Tre=` +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + + #include + #include + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + #include + #include + #include + +} +`,Ere=` +uniform vec3 color; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + #include + + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + + #include + #include + #include + +} +`;var Are=` +uniform float rotation; +uniform vec2 center; + +#include +#include +#include +#include +#include + +void main() { + + #include + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + #ifndef USE_SIZEATTENUATION + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + + if ( isPerspective ) scale *= - mvPosition.z; + + #endif + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; + + #include + #include + #include + +} +`,Cre=` +uniform vec3 diffuse; +uniform float opacity; + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void main() { + + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + + vec3 outgoingLight = vec3( 0.0 ); + + #include + #include + #include + #include + #include + + outgoingLight = diffuseColor.rgb; + + #include + #include + #include + #include + +} +`;var pr={alphahash_fragment:jQ,alphahash_pars_fragment:KQ,alphamap_fragment:JQ,alphamap_pars_fragment:$Q,alphatest_fragment:QQ,alphatest_pars_fragment:eee,aomap_fragment:tee,aomap_pars_fragment:ree,batching_pars_vertex:iee,batching_vertex:nee,begin_vertex:aee,beginnormal_vertex:oee,bsdfs:see,iridescence_fragment:lee,bumpmap_pars_fragment:uee,clipping_planes_fragment:cee,clipping_planes_pars_fragment:fee,clipping_planes_pars_vertex:hee,clipping_planes_vertex:pee,color_fragment:dee,color_pars_fragment:mee,color_pars_vertex:vee,color_vertex:gee,common:yee,cube_uv_reflection_fragment:_ee,defaultnormal_vertex:xee,displacementmap_pars_vertex:See,displacementmap_vertex:Mee,emissivemap_fragment:bee,emissivemap_pars_fragment:wee,colorspace_fragment:Tee,colorspace_pars_fragment:Eee,envmap_fragment:Aee,envmap_common_pars_fragment:Cee,envmap_pars_fragment:Ree,envmap_pars_vertex:Lee,envmap_physical_pars_fragment:Gee,envmap_vertex:Pee,fog_vertex:Dee,fog_pars_vertex:Iee,fog_fragment:Nee,fog_pars_fragment:Uee,gradientmap_pars_fragment:Oee,lightmap_fragment:Fee,lightmap_pars_fragment:zee,lights_lambert_fragment:Bee,lights_lambert_pars_fragment:kee,lights_pars_begin:Vee,lights_toon_fragment:Hee,lights_toon_pars_fragment:Wee,lights_phong_fragment:Xee,lights_phong_pars_fragment:Yee,lights_physical_fragment:qee,lights_physical_pars_fragment:Zee,lights_fragment_begin:jee,lights_fragment_maps:Kee,lights_fragment_end:Jee,logdepthbuf_fragment:$ee,logdepthbuf_pars_fragment:Qee,logdepthbuf_pars_vertex:ete,logdepthbuf_vertex:tte,map_fragment:rte,map_pars_fragment:ite,map_particle_fragment:nte,map_particle_pars_fragment:ate,metalnessmap_fragment:ote,metalnessmap_pars_fragment:ste,morphinstance_vertex:lte,morphcolor_vertex:ute,morphnormal_vertex:cte,morphtarget_pars_vertex:fte,morphtarget_vertex:hte,normal_fragment_begin:pte,normal_fragment_maps:dte,normal_pars_fragment:mte,normal_pars_vertex:vte,normal_vertex:gte,normalmap_pars_fragment:yte,clearcoat_normal_fragment_begin:_te,clearcoat_normal_fragment_maps:xte,clearcoat_pars_fragment:Ste,iridescence_pars_fragment:Mte,opaque_fragment:bte,packing:wte,premultiplied_alpha_fragment:Tte,project_vertex:Ete,dithering_fragment:Ate,dithering_pars_fragment:Cte,roughnessmap_fragment:Rte,roughnessmap_pars_fragment:Lte,shadowmap_pars_fragment:Pte,shadowmap_pars_vertex:Dte,shadowmap_vertex:Ite,shadowmask_pars_fragment:Nte,skinbase_vertex:Ute,skinning_pars_vertex:Ote,skinning_vertex:Fte,skinnormal_vertex:zte,specularmap_fragment:Bte,specularmap_pars_fragment:kte,tonemapping_fragment:Vte,tonemapping_pars_fragment:Gte,transmission_fragment:Hte,transmission_pars_fragment:Wte,uv_pars_fragment:Xte,uv_pars_vertex:Yte,uv_vertex:qte,worldpos_vertex:Zte,background_vert:jte,background_frag:Kte,backgroundCube_vert:Jte,backgroundCube_frag:$te,cube_vert:Qte,cube_frag:ere,depth_vert:tre,depth_frag:rre,distanceRGBA_vert:ire,distanceRGBA_frag:nre,equirect_vert:are,equirect_frag:ore,linedashed_vert:sre,linedashed_frag:lre,meshbasic_vert:ure,meshbasic_frag:cre,meshlambert_vert:fre,meshlambert_frag:hre,meshmatcap_vert:pre,meshmatcap_frag:dre,meshnormal_vert:mre,meshnormal_frag:vre,meshphong_vert:gre,meshphong_frag:yre,meshphysical_vert:_re,meshphysical_frag:xre,meshtoon_vert:Sre,meshtoon_frag:Mre,points_vert:bre,points_frag:wre,shadow_vert:Tre,shadow_frag:Ere,sprite_vert:Are,sprite_frag:Cre};var ht={common:{diffuse:{value:new ir(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new $t},alphaMap:{value:null},alphaMapTransform:{value:new $t},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new $t}},envmap:{envMap:{value:null},envMapRotation:{value:new $t},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new $t}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new $t}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new $t},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new $t},normalScale:{value:new Kt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new $t},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new $t}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new $t}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new $t}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ir(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ir(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new $t},alphaTest:{value:0},uvTransform:{value:new $t}},sprite:{diffuse:{value:new ir(16777215)},opacity:{value:1},center:{value:new Kt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new $t},alphaMap:{value:null},alphaMapTransform:{value:new $t},alphaTest:{value:0}}};var xs={basic:{uniforms:jn([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.fog]),vertexShader:pr.meshbasic_vert,fragmentShader:pr.meshbasic_frag},lambert:{uniforms:jn([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,ht.lights,{emissive:{value:new ir(0)}}]),vertexShader:pr.meshlambert_vert,fragmentShader:pr.meshlambert_frag},phong:{uniforms:jn([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,ht.lights,{emissive:{value:new ir(0)},specular:{value:new ir(1118481)},shininess:{value:30}}]),vertexShader:pr.meshphong_vert,fragmentShader:pr.meshphong_frag},standard:{uniforms:jn([ht.common,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.roughnessmap,ht.metalnessmap,ht.fog,ht.lights,{emissive:{value:new ir(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:pr.meshphysical_vert,fragmentShader:pr.meshphysical_frag},toon:{uniforms:jn([ht.common,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.gradientmap,ht.fog,ht.lights,{emissive:{value:new ir(0)}}]),vertexShader:pr.meshtoon_vert,fragmentShader:pr.meshtoon_frag},matcap:{uniforms:jn([ht.common,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,{matcap:{value:null}}]),vertexShader:pr.meshmatcap_vert,fragmentShader:pr.meshmatcap_frag},points:{uniforms:jn([ht.points,ht.fog]),vertexShader:pr.points_vert,fragmentShader:pr.points_frag},dashed:{uniforms:jn([ht.common,ht.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:pr.linedashed_vert,fragmentShader:pr.linedashed_frag},depth:{uniforms:jn([ht.common,ht.displacementmap]),vertexShader:pr.depth_vert,fragmentShader:pr.depth_frag},normal:{uniforms:jn([ht.common,ht.bumpmap,ht.normalmap,ht.displacementmap,{opacity:{value:1}}]),vertexShader:pr.meshnormal_vert,fragmentShader:pr.meshnormal_frag},sprite:{uniforms:jn([ht.sprite,ht.fog]),vertexShader:pr.sprite_vert,fragmentShader:pr.sprite_frag},background:{uniforms:{uvTransform:{value:new $t},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:pr.background_vert,fragmentShader:pr.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new $t}},vertexShader:pr.backgroundCube_vert,fragmentShader:pr.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:pr.cube_vert,fragmentShader:pr.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:pr.equirect_vert,fragmentShader:pr.equirect_frag},distanceRGBA:{uniforms:jn([ht.common,ht.displacementmap,{referencePosition:{value:new be},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:pr.distanceRGBA_vert,fragmentShader:pr.distanceRGBA_frag},shadow:{uniforms:jn([ht.lights,ht.fog,{color:{value:new ir(0)},opacity:{value:1}}]),vertexShader:pr.shadow_vert,fragmentShader:pr.shadow_frag}};xs.physical={uniforms:jn([xs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new $t},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new $t},clearcoatNormalScale:{value:new Kt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new $t},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new $t},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new $t},sheen:{value:0},sheenColor:{value:new ir(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new $t},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new $t},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new $t},transmissionSamplerSize:{value:new Kt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new $t},attenuationDistance:{value:0},attenuationColor:{value:new ir(0)},specularColor:{value:new ir(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new $t},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new $t},anisotropyVector:{value:new Kt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new $t}}]),vertexShader:pr.meshphysical_vert,fragmentShader:pr.meshphysical_frag};var AA={r:0,b:0,g:0},Md=new cl,wTe=new Wr;function Rre(r,e,t,i,n,a,o){let s=new ir(0),l=a===!0?0:1,u,c,f=null,h=0,p=null;function d(m,v){let _=!1,y=v.isScene===!0?v.background:null;y&&y.isTexture&&(y=(v.backgroundBlurriness>0?t:e).get(y)),y===null?g(s,l):y&&y.isColor&&(g(y,1),_=!0);let x=r.xr.getEnvironmentBlendMode();x==="additive"?i.buffers.color.setClear(0,0,0,1,o):x==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(r.autoClear||_)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),y&&(y.isCubeTexture||y.mapping===oh)?(c===void 0&&(c=new rn(new dh(1,1,1),new ya({name:"BackgroundCubeMaterial",uniforms:rc(xs.backgroundCube.uniforms),vertexShader:xs.backgroundCube.vertexShader,fragmentShader:xs.backgroundCube.fragmentShader,side:_i,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(M,S,w){this.matrixWorld.copyPosition(w.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(c)),Md.copy(v.backgroundRotation),Md.x*=-1,Md.y*=-1,Md.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&(Md.y*=-1,Md.z*=-1),c.material.uniforms.envMap.value=y,c.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.uniforms.backgroundRotation.value.setFromMatrix4(wTe.makeRotationFromEuler(Md)),c.material.toneMapped=Er.getTransfer(y.colorSpace)!==Hr,(f!==y||h!==y.version||p!==r.toneMapping)&&(c.material.needsUpdate=!0,f=y,h=y.version,p=r.toneMapping),c.layers.enableAll(),m.unshift(c,c.geometry,c.material,0,0,null)):y&&y.isTexture&&(u===void 0&&(u=new rn(new Bg(2,2),new ya({name:"BackgroundMaterial",uniforms:rc(xs.background.uniforms),vertexShader:xs.background.vertexShader,fragmentShader:xs.background.fragmentShader,side:Ao,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(u)),u.material.uniforms.t2D.value=y,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=Er.getTransfer(y.colorSpace)!==Hr,y.matrixAutoUpdate===!0&&y.updateMatrix(),u.material.uniforms.uvTransform.value.copy(y.matrix),(f!==y||h!==y.version||p!==r.toneMapping)&&(u.material.needsUpdate=!0,f=y,h=y.version,p=r.toneMapping),u.layers.enableAll(),m.unshift(u,u.geometry,u.material,0,0,null))}function g(m,v){m.getRGB(AA,MA(r)),i.buffers.color.setClear(AA.r,AA.g,AA.b,v,o)}return{getClearColor:function(){return s},setClearColor:function(m,v=1){s.set(m),l=v,g(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(m){l=m,g(s,l)},render:d}}function Lre(r,e,t,i){let n=r.getParameter(r.MAX_VERTEX_ATTRIBS),a=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||a!==null,s={},l=m(null),u=l,c=!1;function f(A,D,U,B,F){let k=!1;if(o){let G=g(B,U,D);u!==G&&(u=G,p(u.object)),k=v(A,B,U,F),k&&_(A,B,U,F)}else{let G=D.wireframe===!0;(u.geometry!==B.id||u.program!==U.id||u.wireframe!==G)&&(u.geometry=B.id,u.program=U.id,u.wireframe=G,k=!0)}F!==null&&t.update(F,r.ELEMENT_ARRAY_BUFFER),(k||c)&&(c=!1,T(A,D,U,B),F!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.get(F).buffer))}function h(){return i.isWebGL2?r.createVertexArray():a.createVertexArrayOES()}function p(A){return i.isWebGL2?r.bindVertexArray(A):a.bindVertexArrayOES(A)}function d(A){return i.isWebGL2?r.deleteVertexArray(A):a.deleteVertexArrayOES(A)}function g(A,D,U){let B=U.wireframe===!0,F=s[A.id];F===void 0&&(F={},s[A.id]=F);let k=F[D.id];k===void 0&&(k={},F[D.id]=k);let G=k[B];return G===void 0&&(G=m(h()),k[B]=G),G}function m(A){let D=[],U=[],B=[];for(let F=0;F=0){let V=F[J],K=k[J];if(K===void 0&&(J==="instanceMatrix"&&A.instanceMatrix&&(K=A.instanceMatrix),J==="instanceColor"&&A.instanceColor&&(K=A.instanceColor)),V===void 0||V.attribute!==K||K&&V.data!==K.data)return!0;G++}return u.attributesNum!==G||u.index!==B}function _(A,D,U,B){let F={},k=D.attributes,G=0,Y=U.getAttributes();for(let J in Y)if(Y[J].location>=0){let V=k[J];V===void 0&&(J==="instanceMatrix"&&A.instanceMatrix&&(V=A.instanceMatrix),J==="instanceColor"&&A.instanceColor&&(V=A.instanceColor));let K={};K.attribute=V,V&&V.data&&(K.data=V.data),F[J]=K,G++}u.attributes=F,u.attributesNum=G,u.index=B}function y(){let A=u.newAttributes;for(let D=0,U=A.length;D=0){let Q=F[Y];if(Q===void 0&&(Y==="instanceMatrix"&&A.instanceMatrix&&(Q=A.instanceMatrix),Y==="instanceColor"&&A.instanceColor&&(Q=A.instanceColor)),Q!==void 0){let V=Q.normalized,K=Q.itemSize,ae=t.get(Q);if(ae===void 0)continue;let ve=ae.buffer,ue=ae.type,se=ae.bytesPerElement,Ee=i.isWebGL2===!0&&(ue===r.INT||ue===r.UNSIGNED_INT||Q.gpuType===zE);if(Q.isInterleavedBufferAttribute){let q=Q.data,H=q.stride,We=Q.offset;if(q.isInstancedInterleavedBuffer){for(let _e=0;_e0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";w="mediump"}return w==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let o=typeof WebGL2RenderingContext<"u"&&r.constructor.name==="WebGL2RenderingContext",s=t.precision!==void 0?t.precision:"highp",l=a(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);let u=o||e.has("WEBGL_draw_buffers"),c=t.logarithmicDepthBuffer===!0,f=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),h=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=r.getParameter(r.MAX_TEXTURE_SIZE),d=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),g=r.getParameter(r.MAX_VERTEX_ATTRIBS),m=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),v=r.getParameter(r.MAX_VARYING_VECTORS),_=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),y=h>0,x=o||e.has("OES_texture_float"),M=y&&x,S=o?r.getParameter(r.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:n,getMaxPrecision:a,precision:s,logarithmicDepthBuffer:c,maxTextures:f,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:d,maxAttributes:g,maxVertexUniforms:m,maxVaryings:v,maxFragmentUniforms:_,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:M,maxSamples:S}}function Ire(r){let e=this,t=null,i=0,n=!1,a=!1,o=new hl,s=new $t,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){let p=f.length!==0||h||i!==0||n;return n=h,i=f.length,p},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(f,h){t=c(f,h,0)},this.setState=function(f,h,p){let d=f.clippingPlanes,g=f.clipIntersection,m=f.clipShadows,v=r.get(f);if(!n||d===null||d.length===0||a&&!m)a?c(null):u();else{let _=a?0:i,y=_*4,x=v.clippingState||null;l.value=x,x=c(d,h,y,p);for(let M=0;M!==y;++M)x[M]=t[M];v.clippingState=x,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function c(f,h,p,d){let g=f!==null?f.length:0,m=null;if(g!==0){if(m=l.value,d!==!0||m===null){let v=p+g*4,_=h.matrixWorldInverse;s.getNormalMatrix(_),(m===null||m.length0){let u=new wA(l.height);return u.fromEquirectangularTexture(r,o),e.set(o,u),o.addEventListener("dispose",n),t(u.texture,o.mapping)}else return null}}return o}function n(o){let s=o.target;s.removeEventListener("dispose",n);let l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function a(){e=new WeakMap}return{get:i,dispose:a}}var kg=class extends Ug{constructor(e=-1,t=1,i=1,n=-1,a=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=a,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,a,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,a=i-e,o=i+e,s=n+t,l=n-t;if(this.view!==null&&this.view.enabled){let u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a+=u*this.view.offsetX,o=a+u*this.view.width,s-=c*this.view.offsetY,l=s-c*this.view.height}this.projectionMatrix.makeOrthographic(a,o,s,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};var Gg=4,Ure=[.125,.215,.35,.446,.526,.582],wd=20,XF=new kg,Ore=new ir,YF=null,qF=0,ZF=0,bd=(1+Math.sqrt(5))/2,Vg=1/bd,Fre=[new be(1,1,1),new be(-1,1,1),new be(1,1,-1),new be(-1,1,-1),new be(0,bd,Vg),new be(0,bd,-Vg),new be(Vg,0,bd),new be(-Vg,0,bd),new be(bd,Vg,0),new be(-bd,Vg,0)],vS=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,n=100){YF=this._renderer.getRenderTarget(),qF=this._renderer.getActiveCubeFace(),ZF=this._renderer.getActiveMipmapLevel(),this._setSize(256);let a=this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(e,i,n,a),t>0&&this._blur(a,0,0,t),this._applyPMREM(a),this._cleanup(a),a}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=kre(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Bre(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),c.setRenderTarget(n),g&&c.render(d,s),c.render(e,s)}d.geometry.dispose(),d.material.dispose(),c.toneMapping=h,c.autoClear=f,e.background=m}_textureToCubeUV(e,t){let i=this._renderer,n=e.mapping===al||e.mapping===tu;n?(this._cubemapMaterial===null&&(this._cubemapMaterial=kre()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Bre());let a=n?this._cubemapMaterial:this._equirectMaterial,o=new rn(this._lodPlanes[0],a),s=a.uniforms;s.envMap.value=e;let l=this._cubeSize;CA(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,XF)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let n=1;nwd&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${wd}`);let v=[],_=0;for(let w=0;wy-Gg?n-y+Gg:0),S=4*(this._cubeSize-x);CA(t,M,S,3*x,2*x),l.setRenderTarget(t),l.render(f,XF)}};function TTe(r){let e=[],t=[],i=[],n=r,a=r-Gg+1+Ure.length;for(let o=0;or-Gg?l=Ure[o-r+Gg-1]:o===0&&(l=0),i.push(l);let u=1/(s-2),c=-u,f=1+u,h=[c,c,f,c,f,f,c,c,f,f,c,f],p=6,d=6,g=3,m=2,v=1,_=new Float32Array(g*d*p),y=new Float32Array(m*d*p),x=new Float32Array(v*d*p);for(let S=0;S2?0:-1,C=[w,T,0,w+2/3,T,0,w+2/3,T+1,0,w,T,0,w+2/3,T+1,0,w,T+1,0];_.set(C,g*d*S),y.set(h,m*d*S);let b=[S,S,S,S,S,S];x.set(b,v*d*S)}let M=new Qa;M.setAttribute("position",new ga(_,g)),M.setAttribute("uv",new ga(y,m)),M.setAttribute("faceIndex",new ga(x,v)),e.push(M),n>Gg&&n--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function zre(r,e,t){let i=new $a(r,e,t);return i.texture.mapping=oh,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function CA(r,e,t,i,n){r.viewport.set(e,t,i,n),r.scissor.set(e,t,i,n)}function ETe(r,e,t){let i=new Float32Array(wd),n=new be(0,1,0);return new ya({name:"SphericalGaussianBlur",defines:{n:wd,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n}},vertexShader:jF(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:ms,depthTest:!1,depthWrite:!1})}function Bre(){return new ya({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:jF(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:ms,depthTest:!1,depthWrite:!1})}function kre(){return new ya({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:jF(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:ms,depthTest:!1,depthWrite:!1})}function jF(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function Vre(r){let e=new WeakMap,t=null;function i(s){if(s&&s.isTexture){let l=s.mapping,u=l===aS||l===oS,c=l===al||l===tu;if(u||c)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let f=e.get(s);return t===null&&(t=new vS(r)),f=u?t.fromEquirectangular(s,f):t.fromCubemap(s,f),e.set(s,f),f.texture}else{if(e.has(s))return e.get(s).texture;{let f=s.image;if(u&&f&&f.height>0||c&&f&&n(f)){t===null&&(t=new vS(r));let h=u?t.fromEquirectangular(s):t.fromCubemap(s);return e.set(s,h),s.addEventListener("dispose",a),h.texture}else return null}}}return s}function n(s){let l=0,u=6;for(let c=0;ce.maxTextureSize&&(C=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);let b=new Float32Array(T*C*4*g),E=new xg(b,T,C,g);E.type=Ya,E.needsUpdate=!0;let I=w*4;for(let A=0;A0)return r;let n=e*t,a=Zre[n];if(a===void 0&&(a=new Float32Array(n),Zre[n]=a),e!==0){i.toArray(a,0);for(let o=1,s=0;o!==e;++o)s+=t,r[o].toArray(a,s)}return a}function nn(r,e){if(r.length!==e.length)return!1;for(let t=0,i=r.length;t":" "} ${s}: ${t[o]}`)}return i.join(` +`)}function _Ee(r){let e=Er.getPrimaries(Er.workingColorSpace),t=Er.getPrimaries(r),i;switch(e===t?i="":e===dg&&t===pg?i="LinearDisplayP3ToLinearSRGB":e===pg&&t===dg&&(i="LinearSRGBToLinearDisplayP3"),r){case Za:case dd:return[i,"LinearTransferOETF"];case qa:case fg:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",r),[i,"LinearTransferOETF"]}}function aie(r,e,t){let i=r.getShaderParameter(e,r.COMPILE_STATUS),n=r.getShaderInfoLog(e).trim();if(i&&n==="")return"";let a=/ERROR: 0:(\d+)/.exec(n);if(a){let o=parseInt(a[1]);return t.toUpperCase()+` + +`+n+` + +`+yEe(r.getShaderSource(e),o)}else return n}function xEe(r,e){let t=_Ee(e);return`vec4 ${r}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function SEe(r,e){let t;switch(e){case K$:t="Linear";break;case J$:t="Reinhard";break;case $$:t="OptimizedCineon";break;case Q$:t="ACESFilmic";break;case tQ:t="AgX";break;case rQ:t="Neutral";break;case eQ:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function MEe(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.normalMapTangentSpace||r.clearcoatNormalMap||r.flatShading||r.alphaToCoverage||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Xg).join(` +`)}function bEe(r){return[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Xg).join(` +`)}function wEe(r){let e=[];for(let t in r){let i=r[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` +`)}function TEe(r,e){let t={},i=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES);for(let n=0;n/gm;function tz(r){return r.replace(EEe,CEe)}var AEe=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function CEe(r,e){let t=pr[e];if(t===void 0){let i=AEe.get(e);if(i!==void 0)t=pr[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return tz(t)}var REe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function lie(r){return r.replace(REe,LEe)}function LEe(r,e,t,i){let n="";for(let a=parseInt(e);a0&&(v+=` +`),_=[p,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(Xg).join(` +`),_.length>0&&(_+=` +`)):(v=[uie(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(Xg).join(` +`),_=[p,uie(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+c:"",t.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==vs?"#define TONE_MAPPING":"",t.toneMapping!==vs?pr.tonemapping_pars_fragment:"",t.toneMapping!==vs?SEe("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",pr.colorspace_pars_fragment,xEe("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(Xg).join(` +`)),o=tz(o),o=oie(o,t),o=sie(o,t),s=tz(s),s=oie(s,t),s=sie(s,t),o=lie(o),s=lie(s),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(y=`#version 300 es +`,v=[d,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+v,_=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===TF?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===TF?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+_);let x=y+v+o,M=y+_+s,S=ez(n,n.VERTEX_SHADER,x),w=ez(n,n.FRAGMENT_SHADER,M);n.attachShader(m,S),n.attachShader(m,w),t.index0AttributeName!==void 0?n.bindAttribLocation(m,0,t.index0AttributeName):t.morphTargets===!0&&n.bindAttribLocation(m,0,"position"),n.linkProgram(m);function T(I){if(r.debug.checkShaderErrors){let R=n.getProgramInfoLog(m).trim(),A=n.getShaderInfoLog(S).trim(),D=n.getShaderInfoLog(w).trim(),U=!0,B=!0;if(n.getProgramParameter(m,n.LINK_STATUS)===!1)if(U=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(n,m,S,w);else{let F=aie(n,S,"vertex"),k=aie(n,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+n.getError()+" - VALIDATE_STATUS "+n.getProgramParameter(m,n.VALIDATE_STATUS)+` + +Material Name: `+I.name+` +Material Type: `+I.type+` + +Program Info Log: `+R+` +`+F+` +`+k)}else R!==""?console.warn("THREE.WebGLProgram: Program Info Log:",R):(A===""||D==="")&&(B=!1);B&&(I.diagnostics={runnable:U,programLog:R,vertexShader:{log:A,prefix:v},fragmentShader:{log:D,prefix:_}})}n.deleteShader(S),n.deleteShader(w),C=new gh(n,m),b=TEe(n,m)}let C;this.getUniforms=function(){return C===void 0&&T(this),C};let b;this.getAttributes=function(){return b===void 0&&T(this),b};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=n.getProgramParameter(m,vEe)),E},this.destroy=function(){i.releaseStatesOfProgram(this),n.deleteProgram(m),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=gEe++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=S,this.fragmentShader=w,this}var OEe=0,LA=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,n=this._getShaderStage(t),a=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(n)===!1&&(o.add(n),n.usedTimes++),o.has(a)===!1&&(o.add(a),a.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){let t=this.shaderCache,i=t.get(e);return i===void 0&&(i=new rz(e),t.set(e,i)),i}},rz=class{constructor(e){this.id=OEe++,this.code=e,this.usedTimes=0}};function fie(r,e,t,i,n,a,o){let s=new Tg,l=new LA,u=new Set,c=[],f=n.isWebGL2,h=n.logarithmicDepthBuffer,p=n.vertexTextures,d=n.precision,g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(b){return u.add(b),b===0?"uv":`uv${b}`}function v(b,E,I,R,A){let D=R.fog,U=A.geometry,B=b.isMeshStandardMaterial?R.environment:null,F=(b.isMeshStandardMaterial?t:e).get(b.envMap||B),k=F&&F.mapping===oh?F.image.height:null,G=g[b.type];b.precision!==null&&(d=n.getMaxPrecision(b.precision),d!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",d,"instead."));let Y=U.morphAttributes.position||U.morphAttributes.normal||U.morphAttributes.color,J=Y!==void 0?Y.length:0,Q=0;U.morphAttributes.position!==void 0&&(Q=1),U.morphAttributes.normal!==void 0&&(Q=2),U.morphAttributes.color!==void 0&&(Q=3);let V,K,ae,ve;if(G){let zt=xs[G];V=zt.vertexShader,K=zt.fragmentShader}else V=b.vertexShader,K=b.fragmentShader,l.update(b),ae=l.getVertexShaderID(b),ve=l.getFragmentShaderID(b);let ue=r.getRenderTarget(),se=A.isInstancedMesh===!0,Ee=A.isBatchedMesh===!0,q=!!b.map,H=!!b.matcap,We=!!F,_e=!!b.aoMap,xe=!!b.lightMap,Le=!!b.bumpMap,Ue=!!b.normalMap,Ne=!!b.displacementMap,Ve=!!b.emissiveMap,ct=!!b.metalnessMap,z=!!b.roughnessMap,L=b.anisotropy>0,ne=b.clearcoat>0,le=b.iridescence>0,me=b.sheen>0,he=b.transmission>0,et=L&&!!b.anisotropyMap,Ke=ne&&!!b.clearcoatMap,Se=ne&&!!b.clearcoatNormalMap,Ae=ne&&!!b.clearcoatRoughnessMap,nt=le&&!!b.iridescenceMap,$=le&&!!b.iridescenceThicknessMap,it=me&&!!b.sheenColorMap,Xe=me&&!!b.sheenRoughnessMap,ze=!!b.specularMap,we=!!b.specularColorMap,Ie=!!b.specularIntensityMap,st=he&&!!b.transmissionMap,Je=he&&!!b.thicknessMap,kt=!!b.gradientMap,X=!!b.alphaMap,Te=b.alphaTest>0,te=!!b.alphaHash,Me=!!b.extensions,Pe=vs;b.toneMapped&&(ue===null||ue.isXRRenderTarget===!0)&&(Pe=r.toneMapping);let xt={isWebGL2:f,shaderID:G,shaderType:b.type,shaderName:b.name,vertexShader:V,fragmentShader:K,defines:b.defines,customVertexShaderID:ae,customFragmentShaderID:ve,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:d,batching:Ee,instancing:se,instancingColor:se&&A.instanceColor!==null,instancingMorph:se&&A.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:ue===null?r.outputColorSpace:ue.isXRRenderTarget===!0?ue.texture.colorSpace:Za,alphaToCoverage:!!b.alphaToCoverage,map:q,matcap:H,envMap:We,envMapMode:We&&F.mapping,envMapCubeUVHeight:k,aoMap:_e,lightMap:xe,bumpMap:Le,normalMap:Ue,displacementMap:p&&Ne,emissiveMap:Ve,normalMapObjectSpace:Ue&&b.normalMapType===dQ,normalMapTangentSpace:Ue&&b.normalMapType===pQ,metalnessMap:ct,roughnessMap:z,anisotropy:L,anisotropyMap:et,clearcoat:ne,clearcoatMap:Ke,clearcoatNormalMap:Se,clearcoatRoughnessMap:Ae,iridescence:le,iridescenceMap:nt,iridescenceThicknessMap:$,sheen:me,sheenColorMap:it,sheenRoughnessMap:Xe,specularMap:ze,specularColorMap:we,specularIntensityMap:Ie,transmission:he,transmissionMap:st,thicknessMap:Je,gradientMap:kt,opaque:b.transparent===!1&&b.blending===Yu&&b.alphaToCoverage===!1,alphaMap:X,alphaTest:Te,alphaHash:te,combine:b.combine,mapUv:q&&m(b.map.channel),aoMapUv:_e&&m(b.aoMap.channel),lightMapUv:xe&&m(b.lightMap.channel),bumpMapUv:Le&&m(b.bumpMap.channel),normalMapUv:Ue&&m(b.normalMap.channel),displacementMapUv:Ne&&m(b.displacementMap.channel),emissiveMapUv:Ve&&m(b.emissiveMap.channel),metalnessMapUv:ct&&m(b.metalnessMap.channel),roughnessMapUv:z&&m(b.roughnessMap.channel),anisotropyMapUv:et&&m(b.anisotropyMap.channel),clearcoatMapUv:Ke&&m(b.clearcoatMap.channel),clearcoatNormalMapUv:Se&&m(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ae&&m(b.clearcoatRoughnessMap.channel),iridescenceMapUv:nt&&m(b.iridescenceMap.channel),iridescenceThicknessMapUv:$&&m(b.iridescenceThicknessMap.channel),sheenColorMapUv:it&&m(b.sheenColorMap.channel),sheenRoughnessMapUv:Xe&&m(b.sheenRoughnessMap.channel),specularMapUv:ze&&m(b.specularMap.channel),specularColorMapUv:we&&m(b.specularColorMap.channel),specularIntensityMapUv:Ie&&m(b.specularIntensityMap.channel),transmissionMapUv:st&&m(b.transmissionMap.channel),thicknessMapUv:Je&&m(b.thicknessMap.channel),alphaMapUv:X&&m(b.alphaMap.channel),vertexTangents:!!U.attributes.tangent&&(Ue||L),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!U.attributes.color&&U.attributes.color.itemSize===4,pointsUvs:A.isPoints===!0&&!!U.attributes.uv&&(q||X),fog:!!D,useFog:b.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:A.isSkinnedMesh===!0,morphTargets:U.morphAttributes.position!==void 0,morphNormals:U.morphAttributes.normal!==void 0,morphColors:U.morphAttributes.color!==void 0,morphTargetsCount:J,morphTextureStride:Q,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:r.shadowMap.enabled&&I.length>0,shadowMapType:r.shadowMap.type,toneMapping:Pe,useLegacyLights:r._useLegacyLights,decodeVideoTexture:q&&b.map.isVideoTexture===!0&&Er.getTransfer(b.map.colorSpace)===Hr,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===Co,flipSided:b.side===_i,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionDerivatives:Me&&b.extensions.derivatives===!0,extensionFragDepth:Me&&b.extensions.fragDepth===!0,extensionDrawBuffers:Me&&b.extensions.drawBuffers===!0,extensionShaderTextureLOD:Me&&b.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Me&&b.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Me&&b.extensions.multiDraw===!0&&i.has("WEBGL_multi_draw"),rendererExtensionFragDepth:f||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:f||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:f||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return xt.vertexUv1s=u.has(1),xt.vertexUv2s=u.has(2),xt.vertexUv3s=u.has(3),u.clear(),xt}function _(b){let E=[];if(b.shaderID?E.push(b.shaderID):(E.push(b.customVertexShaderID),E.push(b.customFragmentShaderID)),b.defines!==void 0)for(let I in b.defines)E.push(I),E.push(b.defines[I]);return b.isRawShaderMaterial===!1&&(y(E,b),x(E,b),E.push(r.outputColorSpace)),E.push(b.customProgramCacheKey),E.join()}function y(b,E){b.push(E.precision),b.push(E.outputColorSpace),b.push(E.envMapMode),b.push(E.envMapCubeUVHeight),b.push(E.mapUv),b.push(E.alphaMapUv),b.push(E.lightMapUv),b.push(E.aoMapUv),b.push(E.bumpMapUv),b.push(E.normalMapUv),b.push(E.displacementMapUv),b.push(E.emissiveMapUv),b.push(E.metalnessMapUv),b.push(E.roughnessMapUv),b.push(E.anisotropyMapUv),b.push(E.clearcoatMapUv),b.push(E.clearcoatNormalMapUv),b.push(E.clearcoatRoughnessMapUv),b.push(E.iridescenceMapUv),b.push(E.iridescenceThicknessMapUv),b.push(E.sheenColorMapUv),b.push(E.sheenRoughnessMapUv),b.push(E.specularMapUv),b.push(E.specularColorMapUv),b.push(E.specularIntensityMapUv),b.push(E.transmissionMapUv),b.push(E.thicknessMapUv),b.push(E.combine),b.push(E.fogExp2),b.push(E.sizeAttenuation),b.push(E.morphTargetsCount),b.push(E.morphAttributeCount),b.push(E.numDirLights),b.push(E.numPointLights),b.push(E.numSpotLights),b.push(E.numSpotLightMaps),b.push(E.numHemiLights),b.push(E.numRectAreaLights),b.push(E.numDirLightShadows),b.push(E.numPointLightShadows),b.push(E.numSpotLightShadows),b.push(E.numSpotLightShadowsWithMaps),b.push(E.numLightProbes),b.push(E.shadowMapType),b.push(E.toneMapping),b.push(E.numClippingPlanes),b.push(E.numClipIntersection),b.push(E.depthPacking)}function x(b,E){s.disableAll(),E.isWebGL2&&s.enable(0),E.supportsVertexTextures&&s.enable(1),E.instancing&&s.enable(2),E.instancingColor&&s.enable(3),E.instancingMorph&&s.enable(4),E.matcap&&s.enable(5),E.envMap&&s.enable(6),E.normalMapObjectSpace&&s.enable(7),E.normalMapTangentSpace&&s.enable(8),E.clearcoat&&s.enable(9),E.iridescence&&s.enable(10),E.alphaTest&&s.enable(11),E.vertexColors&&s.enable(12),E.vertexAlphas&&s.enable(13),E.vertexUv1s&&s.enable(14),E.vertexUv2s&&s.enable(15),E.vertexUv3s&&s.enable(16),E.vertexTangents&&s.enable(17),E.anisotropy&&s.enable(18),E.alphaHash&&s.enable(19),E.batching&&s.enable(20),b.push(s.mask),s.disableAll(),E.fog&&s.enable(0),E.useFog&&s.enable(1),E.flatShading&&s.enable(2),E.logarithmicDepthBuffer&&s.enable(3),E.skinning&&s.enable(4),E.morphTargets&&s.enable(5),E.morphNormals&&s.enable(6),E.morphColors&&s.enable(7),E.premultipliedAlpha&&s.enable(8),E.shadowMapEnabled&&s.enable(9),E.useLegacyLights&&s.enable(10),E.doubleSided&&s.enable(11),E.flipSided&&s.enable(12),E.useDepthPacking&&s.enable(13),E.dithering&&s.enable(14),E.transmission&&s.enable(15),E.sheen&&s.enable(16),E.opaque&&s.enable(17),E.pointsUvs&&s.enable(18),E.decodeVideoTexture&&s.enable(19),E.alphaToCoverage&&s.enable(20),b.push(s.mask)}function M(b){let E=g[b.type],I;if(E){let R=xs[E];I=HQ.clone(R.uniforms)}else I=b.uniforms;return I}function S(b,E){let I;for(let R=0,A=c.length;R0?i.push(v):p.transparent===!0?n.push(v):t.push(v)}function l(f,h,p,d,g,m){let v=o(f,h,p,d,g,m);p.transmission>0?i.unshift(v):p.transparent===!0?n.unshift(v):t.unshift(v)}function u(f,h){t.length>1&&t.sort(f||FEe),i.length>1&&i.sort(h||pie),n.length>1&&n.sort(h||pie)}function c(){for(let f=e,h=r.length;f=a.length?(o=new die,a.push(o)):o=a[n],o}function t(){r=new WeakMap}return{get:e,dispose:t}}function zEe(){let r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new be,color:new ir};break;case"SpotLight":t={position:new be,direction:new be,color:new ir,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new be,color:new ir,distance:0,decay:0};break;case"HemisphereLight":t={direction:new be,skyColor:new ir,groundColor:new ir};break;case"RectAreaLight":t={color:new ir,position:new be,halfWidth:new be,halfHeight:new be};break}return r[e.id]=t,t}}}function BEe(){let r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Kt};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Kt};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Kt,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}var kEe=0;function VEe(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function vie(r,e){let t=new zEe,i=BEe(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new be);let a=new be,o=new Wr,s=new Wr;function l(c,f){let h=0,p=0,d=0;for(let I=0;I<9;I++)n.probe[I].set(0,0,0);let g=0,m=0,v=0,_=0,y=0,x=0,M=0,S=0,w=0,T=0,C=0;c.sort(VEe);let b=f===!0?Math.PI:1;for(let I=0,R=c.length;I0&&(e.isWebGL2?r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=ht.LTC_FLOAT_1,n.rectAreaLTC2=ht.LTC_FLOAT_2):(n.rectAreaLTC1=ht.LTC_HALF_1,n.rectAreaLTC2=ht.LTC_HALF_2):r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=ht.LTC_FLOAT_1,n.rectAreaLTC2=ht.LTC_FLOAT_2):r.has("OES_texture_half_float_linear")===!0?(n.rectAreaLTC1=ht.LTC_HALF_1,n.rectAreaLTC2=ht.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),n.ambient[0]=h,n.ambient[1]=p,n.ambient[2]=d;let E=n.hash;(E.directionalLength!==g||E.pointLength!==m||E.spotLength!==v||E.rectAreaLength!==_||E.hemiLength!==y||E.numDirectionalShadows!==x||E.numPointShadows!==M||E.numSpotShadows!==S||E.numSpotMaps!==w||E.numLightProbes!==C)&&(n.directional.length=g,n.spot.length=v,n.rectArea.length=_,n.point.length=m,n.hemi.length=y,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=M,n.pointShadowMap.length=M,n.spotShadow.length=S,n.spotShadowMap.length=S,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=M,n.spotLightMatrix.length=S+w-T,n.spotLightMap.length=w,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=C,E.directionalLength=g,E.pointLength=m,E.spotLength=v,E.rectAreaLength=_,E.hemiLength=y,E.numDirectionalShadows=x,E.numPointShadows=M,E.numSpotShadows=S,E.numSpotMaps=w,E.numLightProbes=C,n.version=kEe++)}function u(c,f){let h=0,p=0,d=0,g=0,m=0,v=f.matrixWorldInverse;for(let _=0,y=c.length;_=s.length?(l=new gie(r,e),s.push(l)):l=s[o],l}function n(){t=new WeakMap}return{get:i,dispose:n}}var PA=class extends ou{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=fQ,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};var DA=class extends ou{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};var _ie=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +} +`,xie=` +uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; + +#include + +void main() { + + const float samples = float( VSM_SAMPLES ); + + float mean = 0.0; + float squared_mean = 0.0; + + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + + float uvOffset = uvStart + i * uvStride; + + #ifdef HORIZONTAL_PASS + + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + + #else + + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + + #endif + + } + + mean = mean / samples; + squared_mean = squared_mean / samples; + + float std_dev = sqrt( squared_mean - mean * mean ); + + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); + +} +`;function Sie(r,e,t){let i=new vh,n=new Kt,a=new Kt,o=new ii,s=new PA({depthPacking:hQ}),l=new DA,u={},c=t.maxTextureSize,f={[Ao]:_i,[_i]:Ao,[Co]:Co},h=new ya({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Kt},radius:{value:4}},vertexShader:_ie,fragmentShader:xie}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let d=new Qa;d.setAttribute("position",new ga(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new rn(d,h),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=UE;let v=this.type;this.render=function(S,w,T){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||S.length===0)return;let C=r.getRenderTarget(),b=r.getActiveCubeFace(),E=r.getActiveMipmapLevel(),I=r.state;I.setBlending(ms),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);let R=v!==nl&&this.type===nl,A=v===nl&&this.type!==nl;for(let D=0,U=S.length;Dc||n.y>c)&&(n.x>c&&(a.x=Math.floor(c/k.x),n.x=a.x*k.x,F.mapSize.x=a.x),n.y>c&&(a.y=Math.floor(c/k.y),n.y=a.y*k.y,F.mapSize.y=a.y)),F.map===null||R===!0||A===!0){let Y=this.type!==nl?{minFilter:ki,magFilter:ki}:{};F.map!==null&&F.map.dispose(),F.map=new $a(n.x,n.y,Y),F.map.texture.name=B.name+".shadowMap",F.camera.updateProjectionMatrix()}r.setRenderTarget(F.map),r.clear();let G=F.getViewportCount();for(let Y=0;Y0||w.map&&w.alphaTest>0){let I=b.uuid,R=w.uuid,A=u[I];A===void 0&&(A={},u[I]=A);let D=A[R];D===void 0&&(D=b.clone(),A[R]=D,w.addEventListener("dispose",M)),b=D}if(b.visible=w.visible,b.wireframe=w.wireframe,C===nl?b.side=w.shadowSide!==null?w.shadowSide:w.side:b.side=w.shadowSide!==null?w.shadowSide:f[w.side],b.alphaMap=w.alphaMap,b.alphaTest=w.alphaTest,b.map=w.map,b.clipShadows=w.clipShadows,b.clippingPlanes=w.clippingPlanes,b.clipIntersection=w.clipIntersection,b.displacementMap=w.displacementMap,b.displacementScale=w.displacementScale,b.displacementBias=w.displacementBias,b.wireframeLinewidth=w.wireframeLinewidth,b.linewidth=w.linewidth,T.isPointLight===!0&&b.isMeshDistanceMaterial===!0){let I=r.properties.get(b);I.light=T}return b}function x(S,w,T,C,b){if(S.visible===!1)return;if(S.layers.test(w.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&b===nl)&&(!S.frustumCulled||i.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(T.matrixWorldInverse,S.matrixWorld);let R=e.update(S),A=S.material;if(Array.isArray(A)){let D=R.groups;for(let U=0,B=D.length;U=1):G.indexOf("OpenGL ES")!==-1&&(k=parseFloat(/^OpenGL ES (\d)/.exec(G)[1]),F=k>=2);let Y=null,J={},Q=r.getParameter(r.SCISSOR_BOX),V=r.getParameter(r.VIEWPORT),K=new ii().fromArray(Q),ae=new ii().fromArray(V);function ve(X,Te,te,Me){let Pe=new Uint8Array(4),xt=r.createTexture();r.bindTexture(X,xt),r.texParameteri(X,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(X,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let zt=0;zt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new Kt,f=new WeakMap,h,p=new WeakMap,d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(z,L){return d?new OffscreenCanvas(z,L):vg("canvas")}function m(z,L,ne,le){let me=1,he=ct(z);if((he.width>le||he.height>le)&&(me=le/Math.max(he.width,he.height)),me<1||L===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){let et=L?fS:Math.floor,Ke=et(me*he.width),Se=et(me*he.height);h===void 0&&(h=g(Ke,Se));let Ae=ne?g(Ke,Se):h;return Ae.width=Ke,Ae.height=Se,Ae.getContext("2d").drawImage(z,0,0,Ke,Se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+he.width+"x"+he.height+") to ("+Ke+"x"+Se+")."),Ae}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+he.width+"x"+he.height+")."),z;return z}function v(z){let L=ct(z);return EF(L.width)&&EF(L.height)}function _(z){return s?!1:z.wrapS!==ma||z.wrapT!==ma||z.minFilter!==ki&&z.minFilter!==Qi}function y(z,L){return z.generateMipmaps&&L&&z.minFilter!==ki&&z.minFilter!==Qi}function x(z){r.generateMipmap(z)}function M(z,L,ne,le,me=!1){if(s===!1)return L;if(z!==null){if(r[z]!==void 0)return r[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let he=L;if(L===r.RED&&(ne===r.FLOAT&&(he=r.R32F),ne===r.HALF_FLOAT&&(he=r.R16F),ne===r.UNSIGNED_BYTE&&(he=r.R8)),L===r.RED_INTEGER&&(ne===r.UNSIGNED_BYTE&&(he=r.R8UI),ne===r.UNSIGNED_SHORT&&(he=r.R16UI),ne===r.UNSIGNED_INT&&(he=r.R32UI),ne===r.BYTE&&(he=r.R8I),ne===r.SHORT&&(he=r.R16I),ne===r.INT&&(he=r.R32I)),L===r.RG&&(ne===r.FLOAT&&(he=r.RG32F),ne===r.HALF_FLOAT&&(he=r.RG16F),ne===r.UNSIGNED_BYTE&&(he=r.RG8)),L===r.RG_INTEGER&&(ne===r.UNSIGNED_BYTE&&(he=r.RG8UI),ne===r.UNSIGNED_SHORT&&(he=r.RG16UI),ne===r.UNSIGNED_INT&&(he=r.RG32UI),ne===r.BYTE&&(he=r.RG8I),ne===r.SHORT&&(he=r.RG16I),ne===r.INT&&(he=r.RG32I)),L===r.RGBA){let et=me?hg:Er.getTransfer(le);ne===r.FLOAT&&(he=r.RGBA32F),ne===r.HALF_FLOAT&&(he=r.RGBA16F),ne===r.UNSIGNED_BYTE&&(he=et===Hr?r.SRGB8_ALPHA8:r.RGBA8),ne===r.UNSIGNED_SHORT_4_4_4_4&&(he=r.RGBA4),ne===r.UNSIGNED_SHORT_5_5_5_1&&(he=r.RGB5_A1)}return(he===r.R16F||he===r.R32F||he===r.RG16F||he===r.RG32F||he===r.RGBA16F||he===r.RGBA32F)&&e.get("EXT_color_buffer_float"),he}function S(z,L,ne){return y(z,ne)===!0||z.isFramebufferTexture&&z.minFilter!==ki&&z.minFilter!==Qi?Math.log2(Math.max(L.width,L.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?L.mipmaps.length:1}function w(z){return z===ki||z===J3||z===ug?r.NEAREST:r.LINEAR}function T(z){let L=z.target;L.removeEventListener("dispose",T),b(L),L.isVideoTexture&&f.delete(L)}function C(z){let L=z.target;L.removeEventListener("dispose",C),I(L)}function b(z){let L=i.get(z);if(L.__webglInit===void 0)return;let ne=z.source,le=p.get(ne);if(le){let me=le[L.__cacheKey];me.usedTimes--,me.usedTimes===0&&E(z),Object.keys(le).length===0&&p.delete(ne)}i.remove(z)}function E(z){let L=i.get(z);r.deleteTexture(L.__webglTexture);let ne=z.source,le=p.get(ne);delete le[L.__cacheKey],o.memory.textures--}function I(z){let L=i.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let le=0;le<6;le++){if(Array.isArray(L.__webglFramebuffer[le]))for(let me=0;me=n.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+n.maxTextures),R+=1,z}function U(z){let L=[];return L.push(z.wrapS),L.push(z.wrapT),L.push(z.wrapR||0),L.push(z.magFilter),L.push(z.minFilter),L.push(z.anisotropy),L.push(z.internalFormat),L.push(z.format),L.push(z.type),L.push(z.generateMipmaps),L.push(z.premultiplyAlpha),L.push(z.flipY),L.push(z.unpackAlignment),L.push(z.colorSpace),L.join()}function B(z,L){let ne=i.get(z);if(z.isVideoTexture&&Ne(z),z.isRenderTargetTexture===!1&&z.version>0&&ne.__version!==z.version){let le=z.image;if(le===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(le.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ae(ne,z,L);return}}t.bindTexture(r.TEXTURE_2D,ne.__webglTexture,r.TEXTURE0+L)}function F(z,L){let ne=i.get(z);if(z.version>0&&ne.__version!==z.version){ae(ne,z,L);return}t.bindTexture(r.TEXTURE_2D_ARRAY,ne.__webglTexture,r.TEXTURE0+L)}function k(z,L){let ne=i.get(z);if(z.version>0&&ne.__version!==z.version){ae(ne,z,L);return}t.bindTexture(r.TEXTURE_3D,ne.__webglTexture,r.TEXTURE0+L)}function G(z,L){let ne=i.get(z);if(z.version>0&&ne.__version!==z.version){ve(ne,z,L);return}t.bindTexture(r.TEXTURE_CUBE_MAP,ne.__webglTexture,r.TEXTURE0+L)}let Y={[sS]:r.REPEAT,[ma]:r.CLAMP_TO_EDGE,[lS]:r.MIRRORED_REPEAT},J={[ki]:r.NEAREST,[J3]:r.NEAREST_MIPMAP_NEAREST,[ug]:r.NEAREST_MIPMAP_LINEAR,[Qi]:r.LINEAR,[FE]:r.LINEAR_MIPMAP_NEAREST,[ol]:r.LINEAR_MIPMAP_LINEAR},Q={[mQ]:r.NEVER,[SQ]:r.ALWAYS,[vQ]:r.LESS,[KE]:r.LEQUAL,[gQ]:r.EQUAL,[xQ]:r.GEQUAL,[yQ]:r.GREATER,[_Q]:r.NOTEQUAL};function V(z,L,ne){if(L.type===Ya&&e.has("OES_texture_float_linear")===!1&&(L.magFilter===Qi||L.magFilter===FE||L.magFilter===ug||L.magFilter===ol||L.minFilter===Qi||L.minFilter===FE||L.minFilter===ug||L.minFilter===ol)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),ne?(r.texParameteri(z,r.TEXTURE_WRAP_S,Y[L.wrapS]),r.texParameteri(z,r.TEXTURE_WRAP_T,Y[L.wrapT]),(z===r.TEXTURE_3D||z===r.TEXTURE_2D_ARRAY)&&r.texParameteri(z,r.TEXTURE_WRAP_R,Y[L.wrapR]),r.texParameteri(z,r.TEXTURE_MAG_FILTER,J[L.magFilter]),r.texParameteri(z,r.TEXTURE_MIN_FILTER,J[L.minFilter])):(r.texParameteri(z,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(z,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(z===r.TEXTURE_3D||z===r.TEXTURE_2D_ARRAY)&&r.texParameteri(z,r.TEXTURE_WRAP_R,r.CLAMP_TO_EDGE),(L.wrapS!==ma||L.wrapT!==ma)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(z,r.TEXTURE_MAG_FILTER,w(L.magFilter)),r.texParameteri(z,r.TEXTURE_MIN_FILTER,w(L.minFilter)),L.minFilter!==ki&&L.minFilter!==Qi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),L.compareFunction&&(r.texParameteri(z,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(z,r.TEXTURE_COMPARE_FUNC,Q[L.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(L.magFilter===ki||L.minFilter!==ug&&L.minFilter!==ol||L.type===Ya&&e.has("OES_texture_float_linear")===!1||s===!1&&L.type===Zu&&e.has("OES_texture_half_float_linear")===!1)return;if(L.anisotropy>1||i.get(L).__currentAnisotropy){let le=e.get("EXT_texture_filter_anisotropic");r.texParameterf(z,le.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(L.anisotropy,n.getMaxAnisotropy())),i.get(L).__currentAnisotropy=L.anisotropy}}}function K(z,L){let ne=!1;z.__webglInit===void 0&&(z.__webglInit=!0,L.addEventListener("dispose",T));let le=L.source,me=p.get(le);me===void 0&&(me={},p.set(le,me));let he=U(L);if(he!==z.__cacheKey){me[he]===void 0&&(me[he]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,ne=!0),me[he].usedTimes++;let et=me[z.__cacheKey];et!==void 0&&(me[z.__cacheKey].usedTimes--,et.usedTimes===0&&E(L)),z.__cacheKey=he,z.__webglTexture=me[he].texture}return ne}function ae(z,L,ne){let le=r.TEXTURE_2D;(L.isDataArrayTexture||L.isCompressedArrayTexture)&&(le=r.TEXTURE_2D_ARRAY),L.isData3DTexture&&(le=r.TEXTURE_3D);let me=K(z,L),he=L.source;t.bindTexture(le,z.__webglTexture,r.TEXTURE0+ne);let et=i.get(he);if(he.version!==et.__version||me===!0){t.activeTexture(r.TEXTURE0+ne);let Ke=Er.getPrimaries(Er.workingColorSpace),Se=L.colorSpace===ys?null:Er.getPrimaries(L.colorSpace),Ae=L.colorSpace===ys||Ke===Se?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,L.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,L.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,L.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ae);let nt=_(L)&&v(L.image)===!1,$=m(L.image,nt,!1,n.maxTextureSize);$=Ve(L,$);let it=v($)||s,Xe=a.convert(L.format,L.colorSpace),ze=a.convert(L.type),we=M(L.internalFormat,Xe,ze,L.colorSpace,L.isVideoTexture);V(le,L,it);let Ie,st=L.mipmaps,Je=s&&L.isVideoTexture!==!0&&we!==ZE,kt=et.__version===void 0||me===!0,X=he.dataReady,Te=S(L,$,it);if(L.isDepthTexture)we=r.DEPTH_COMPONENT,s?L.type===Ya?we=r.DEPTH_COMPONENT32F:L.type===Lo?we=r.DEPTH_COMPONENT24:L.type===gs?we=r.DEPTH24_STENCIL8:we=r.DEPTH_COMPONENT16:L.type===Ya&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),L.format===sl&&we===r.DEPTH_COMPONENT&&L.type!==cg&&L.type!==Lo&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),L.type=Lo,ze=a.convert(L.type)),L.format===ru&&we===r.DEPTH_COMPONENT&&(we=r.DEPTH_STENCIL,L.type!==gs&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),L.type=gs,ze=a.convert(L.type))),kt&&(Je?t.texStorage2D(r.TEXTURE_2D,1,we,$.width,$.height):t.texImage2D(r.TEXTURE_2D,0,we,$.width,$.height,0,Xe,ze,null));else if(L.isDataTexture)if(st.length>0&&it){Je&&kt&&t.texStorage2D(r.TEXTURE_2D,Te,we,st[0].width,st[0].height);for(let te=0,Me=st.length;te>=1,Me>>=1}}else if(st.length>0&&it){if(Je&&kt){let te=ct(st[0]);t.texStorage2D(r.TEXTURE_2D,Te,we,te.width,te.height)}for(let te=0,Me=st.length;te0&&X++;let te=ct($[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,X,Ie,te.width,te.height)}for(let te=0;te<6;te++)if(nt){st?kt&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+te,0,0,0,$[te].width,$[te].height,ze,we,$[te].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+te,0,Ie,$[te].width,$[te].height,0,ze,we,$[te].data);for(let Me=0;Me>he),$=Math.max(1,L.height>>he);me===r.TEXTURE_3D||me===r.TEXTURE_2D_ARRAY?t.texImage3D(me,he,Se,nt,$,L.depth,0,et,Ke,null):t.texImage2D(me,he,Se,nt,$,0,et,Ke,null)}t.bindFramebuffer(r.FRAMEBUFFER,z),Ue(L)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,le,me,i.get(ne).__webglTexture,0,Le(L)):(me===r.TEXTURE_2D||me>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&me<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,le,me,i.get(ne).__webglTexture,he),t.bindFramebuffer(r.FRAMEBUFFER,null)}function se(z,L,ne){if(r.bindRenderbuffer(r.RENDERBUFFER,z),L.depthBuffer&&!L.stencilBuffer){let le=s===!0?r.DEPTH_COMPONENT24:r.DEPTH_COMPONENT16;if(ne||Ue(L)){let me=L.depthTexture;me&&me.isDepthTexture&&(me.type===Ya?le=r.DEPTH_COMPONENT32F:me.type===Lo&&(le=r.DEPTH_COMPONENT24));let he=Le(L);Ue(L)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,he,le,L.width,L.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,he,le,L.width,L.height)}else r.renderbufferStorage(r.RENDERBUFFER,le,L.width,L.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,z)}else if(L.depthBuffer&&L.stencilBuffer){let le=Le(L);ne&&Ue(L)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,le,r.DEPTH24_STENCIL8,L.width,L.height):Ue(L)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,le,r.DEPTH24_STENCIL8,L.width,L.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,L.width,L.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,z)}else{let le=L.textures;for(let me=0;me1,Ke=v(z)||s;if(et||(le.__webglTexture===void 0&&(le.__webglTexture=r.createTexture()),le.__version=L.version,o.memory.textures++),he){ne.__webglFramebuffer=[];for(let Se=0;Se<6;Se++)if(s&&L.mipmaps&&L.mipmaps.length>0){ne.__webglFramebuffer[Se]=[];for(let Ae=0;Ae0){ne.__webglFramebuffer=[];for(let Se=0;Se0&&Ue(z)===!1){ne.__webglMultisampledFramebuffer=r.createFramebuffer(),ne.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Se=0;Se0)for(let Ae=0;Ae0)for(let Ae=0;Ae0&&Ue(z)===!1){let L=z.textures,ne=z.width,le=z.height,me=r.COLOR_BUFFER_BIT,he=[],et=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ke=i.get(z),Se=L.length>1;if(Se)for(let Ae=0;Ae0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&L.__useRenderToTexture!==!1}function Ne(z){let L=o.render.frame;f.get(z)!==L&&(f.set(z,L),z.update())}function Ve(z,L){let ne=z.colorSpace,le=z.format,me=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===uS||ne!==Za&&ne!==ys&&(Er.getTransfer(ne)===Hr?s===!1?e.has("EXT_sRGB")===!0&&le===Rn?(z.format=uS,z.minFilter=Qi,z.generateMipmaps=!1):L=yg.sRGBToLinear(L):(le!==Rn||me!==Ro)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),L}function ct(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=D,this.resetTextureUnits=A,this.setTexture2D=B,this.setTexture2DArray=F,this.setTexture3D=k,this.setTextureCube=G,this.rebindTextures=H,this.setupRenderTarget=We,this.updateRenderTargetMipmap=_e,this.updateMultisampleRenderTarget=xe,this.setupDepthRenderbuffer=q,this.setupFrameBufferTexture=ue,this.useMultisampledRTT=Ue}function wie(r,e,t){let i=t.isWebGL2;function n(a,o=ys){let s,l=Er.getTransfer(o);if(a===Ro)return r.UNSIGNED_BYTE;if(a===BE)return r.UNSIGNED_SHORT_4_4_4_4;if(a===kE)return r.UNSIGNED_SHORT_5_5_5_1;if(a===iQ)return r.BYTE;if(a===nQ)return r.SHORT;if(a===cg)return r.UNSIGNED_SHORT;if(a===zE)return r.INT;if(a===Lo)return r.UNSIGNED_INT;if(a===Ya)return r.FLOAT;if(a===Zu)return i?r.HALF_FLOAT:(s=e.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(a===aQ)return r.ALPHA;if(a===Rn)return r.RGBA;if(a===oQ)return r.LUMINANCE;if(a===sQ)return r.LUMINANCE_ALPHA;if(a===sl)return r.DEPTH_COMPONENT;if(a===ru)return r.DEPTH_STENCIL;if(a===uS)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(a===lQ)return r.RED;if(a===VE)return r.RED_INTEGER;if(a===uQ)return r.RG;if(a===GE)return r.RG_INTEGER;if(a===HE)return r.RGBA_INTEGER;if(a===WE||a===XE||a===YE||a===qE)if(l===Hr)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(a===WE)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(a===XE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(a===YE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(a===qE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(a===WE)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===XE)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===YE)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===qE)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(a===$3||a===Q3||a===eF||a===tF)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(a===$3)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===Q3)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===eF)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===tF)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(a===ZE)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(a===rF||a===iF)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(a===rF)return l===Hr?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(a===iF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(a===nF||a===aF||a===oF||a===sF||a===lF||a===uF||a===cF||a===fF||a===hF||a===pF||a===dF||a===mF||a===vF||a===gF)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(a===nF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(a===aF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(a===oF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(a===sF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(a===lF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(a===uF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(a===cF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(a===fF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(a===hF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(a===pF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(a===dF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(a===mF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(a===vF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(a===gF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(a===jE||a===yF||a===_F)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(a===jE)return l===Hr?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(a===yF)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(a===_F)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(a===cQ||a===xF||a===SF||a===MF)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(a===jE)return s.COMPRESSED_RED_RGTC1_EXT;if(a===xF)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(a===SF)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(a===MF)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return a===gs?i?r.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null):r[a]!==void 0?r[a]:null}return{convert:n}}var IA=class extends Gi{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}};var Td=class extends tn{constructor(){super(),this.isGroup=!0,this.type="Group"}};var HEe={type:"move"},Yg=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Td,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Td,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new be,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new be),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Td,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new be,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new be),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let n=null,a=null,o=null,s=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(let g of e.hand.values()){let m=t.getJointPose(g,i),v=this._getHandJoint(u,g);m!==null&&(v.matrix.fromArray(m.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=m.radius),v.visible=m!==null}let c=u.joints["index-finger-tip"],f=u.joints["thumb-tip"],h=c.position.distanceTo(f.position),p=.02,d=.005;u.inputState.pinching&&h>p+d?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&h<=p-d&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(a=t.getPose(e.gripSpace,i),a!==null&&(l.matrix.fromArray(a.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,a.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(a.linearVelocity)):l.hasLinearVelocity=!1,a.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(a.angularVelocity)):l.hasAngularVelocity=!1));s!==null&&(n=t.getPose(e.targetRaySpace,i),n===null&&a!==null&&(n=a),n!==null&&(s.matrix.fromArray(n.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,n.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(n.linearVelocity)):s.hasLinearVelocity=!1,n.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(n.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(HEe)))}return s!==null&&(s.visible=n!==null),l!==null&&(l.visible=a!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let i=new Td;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}};var WEe=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,XEe=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepthEXT = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepthEXT = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`,NA=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){let n=new Ja,a=e.properties.get(n);a.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=n}}render(e,t){if(this.texture!==null){if(this.mesh===null){let i=t.cameras[0].viewport,n=new ya({extensions:{fragDepth:!0},vertexShader:WEe,fragmentShader:XEe,uniforms:{depthColor:{value:this.texture},depthWidth:{value:i.z},depthHeight:{value:i.w}}});this.mesh=new rn(new Bg(20,20),n)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}};var UA=class extends Ka{constructor(e,t){super();let i=this,n=null,a=1,o=null,s="local-floor",l=1,u=null,c=null,f=null,h=null,p=null,d=null,g=new NA,m=t.getContextAttributes(),v=null,_=null,y=[],x=[],M=new Kt,S=null,w=new Gi;w.layers.enable(1),w.viewport=new ii;let T=new Gi;T.layers.enable(2),T.viewport=new ii;let C=[w,T],b=new IA;b.layers.enable(1),b.layers.enable(2);let E=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(V){let K=y[V];return K===void 0&&(K=new Yg,y[V]=K),K.getTargetRaySpace()},this.getControllerGrip=function(V){let K=y[V];return K===void 0&&(K=new Yg,y[V]=K),K.getGripSpace()},this.getHand=function(V){let K=y[V];return K===void 0&&(K=new Yg,y[V]=K),K.getHandSpace()};function R(V){let K=x.indexOf(V.inputSource);if(K===-1)return;let ae=y[K];ae!==void 0&&(ae.update(V.inputSource,V.frame,u||o),ae.dispatchEvent({type:V.type,data:V.inputSource}))}function A(){n.removeEventListener("select",R),n.removeEventListener("selectstart",R),n.removeEventListener("selectend",R),n.removeEventListener("squeeze",R),n.removeEventListener("squeezestart",R),n.removeEventListener("squeezeend",R),n.removeEventListener("end",A),n.removeEventListener("inputsourceschange",D);for(let V=0;V=0&&(x[ve]=null,y[ve].disconnect(ae))}for(let K=0;K=x.length){x.push(ae),ve=se;break}else if(x[se]===null){x[se]=ae,ve=se;break}if(ve===-1)break}let ue=y[ve];ue&&ue.connect(ae)}}let U=new be,B=new be;function F(V,K,ae){U.setFromMatrixPosition(K.matrixWorld),B.setFromMatrixPosition(ae.matrixWorld);let ve=U.distanceTo(B),ue=K.projectionMatrix.elements,se=ae.projectionMatrix.elements,Ee=ue[14]/(ue[10]-1),q=ue[14]/(ue[10]+1),H=(ue[9]+1)/ue[5],We=(ue[9]-1)/ue[5],_e=(ue[8]-1)/ue[0],xe=(se[8]+1)/se[0],Le=Ee*_e,Ue=Ee*xe,Ne=ve/(-_e+xe),Ve=Ne*-_e;K.matrixWorld.decompose(V.position,V.quaternion,V.scale),V.translateX(Ve),V.translateZ(Ne),V.matrixWorld.compose(V.position,V.quaternion,V.scale),V.matrixWorldInverse.copy(V.matrixWorld).invert();let ct=Ee+Ne,z=q+Ne,L=Le-Ve,ne=Ue+(ve-Ve),le=H*q/z*ct,me=We*q/z*ct;V.projectionMatrix.makePerspective(L,ne,le,me,ct,z),V.projectionMatrixInverse.copy(V.projectionMatrix).invert()}function k(V,K){K===null?V.matrixWorld.copy(V.matrix):V.matrixWorld.multiplyMatrices(K.matrixWorld,V.matrix),V.matrixWorldInverse.copy(V.matrixWorld).invert()}this.updateCamera=function(V){if(n===null)return;g.texture!==null&&(V.near=g.depthNear,V.far=g.depthFar),b.near=T.near=w.near=V.near,b.far=T.far=w.far=V.far,(E!==b.near||I!==b.far)&&(n.updateRenderState({depthNear:b.near,depthFar:b.far}),E=b.near,I=b.far,w.near=E,w.far=I,T.near=E,T.far=I,w.updateProjectionMatrix(),T.updateProjectionMatrix(),V.updateProjectionMatrix());let K=V.parent,ae=b.cameras;k(b,K);for(let ve=0;ve0&&(m.alphaTest.value=v.alphaTest);let _=e.get(v),y=_.envMap,x=_.envMapRotation;if(y&&(m.envMap.value=y,Ed.copy(x),Ed.x*=-1,Ed.y*=-1,Ed.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&(Ed.y*=-1,Ed.z*=-1),m.envMapRotation.value.setFromMatrix4(YEe.makeRotationFromEuler(Ed)),m.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=v.reflectivity,m.ior.value=v.ior,m.refractionRatio.value=v.refractionRatio),v.lightMap){m.lightMap.value=v.lightMap;let M=r._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=v.lightMapIntensity*M,t(v.lightMap,m.lightMapTransform)}v.aoMap&&(m.aoMap.value=v.aoMap,m.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,m.aoMapTransform))}function o(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform))}function s(m,v){m.dashSize.value=v.dashSize,m.totalSize.value=v.dashSize+v.gapSize,m.scale.value=v.scale}function l(m,v,_,y){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.size.value=v.size*_,m.scale.value=y*.5,v.map&&(m.map.value=v.map,t(v.map,m.uvTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function u(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.rotation.value=v.rotation,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function c(m,v){m.specular.value.copy(v.specular),m.shininess.value=Math.max(v.shininess,1e-4)}function f(m,v){v.gradientMap&&(m.gradientMap.value=v.gradientMap)}function h(m,v){m.metalness.value=v.metalness,v.metalnessMap&&(m.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,m.metalnessMapTransform)),m.roughness.value=v.roughness,v.roughnessMap&&(m.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,m.roughnessMapTransform)),e.get(v).envMap&&(m.envMapIntensity.value=v.envMapIntensity)}function p(m,v,_){m.ior.value=v.ior,v.sheen>0&&(m.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),m.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(m.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,m.sheenColorMapTransform)),v.sheenRoughnessMap&&(m.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,m.sheenRoughnessMapTransform))),v.clearcoat>0&&(m.clearcoat.value=v.clearcoat,m.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(m.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,m.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(m.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===_i&&m.clearcoatNormalScale.value.negate())),v.iridescence>0&&(m.iridescence.value=v.iridescence,m.iridescenceIOR.value=v.iridescenceIOR,m.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(m.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,m.iridescenceMapTransform)),v.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),v.transmission>0&&(m.transmission.value=v.transmission,m.transmissionSamplerMap.value=_.texture,m.transmissionSamplerSize.value.set(_.width,_.height),v.transmissionMap&&(m.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,m.transmissionMapTransform)),m.thickness.value=v.thickness,v.thicknessMap&&(m.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=v.attenuationDistance,m.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(m.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(m.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=v.specularIntensity,m.specularColor.value.copy(v.specularColor),v.specularColorMap&&(m.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,m.specularColorMapTransform)),v.specularIntensityMap&&(m.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,m.specularIntensityMapTransform))}function d(m,v){v.matcap&&(m.matcap.value=v.matcap)}function g(m,v){let _=e.get(v).light;m.referencePosition.value.setFromMatrixPosition(_.matrixWorld),m.nearDistance.value=_.shadow.camera.near,m.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:n}}function Eie(r,e,t,i){let n={},a={},o=[],s=t.isWebGL2?r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(_,y){let x=y.program;i.uniformBlockBinding(_,x)}function u(_,y){let x=n[_.id];x===void 0&&(d(_),x=c(_),n[_.id]=x,_.addEventListener("dispose",m));let M=y.program;i.updateUBOMapping(_,M);let S=e.render.frame;a[_.id]!==S&&(h(_),a[_.id]=S)}function c(_){let y=f();_.__bindingPointIndex=y;let x=r.createBuffer(),M=_.__size,S=_.usage;return r.bindBuffer(r.UNIFORM_BUFFER,x),r.bufferData(r.UNIFORM_BUFFER,M,S),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,y,x),x}function f(){for(let _=0;_0&&(x+=M-S),_.__size=x,_.__cache={},this}function g(_){let y={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(y.boundary=4,y.storage=4):_.isVector2?(y.boundary=8,y.storage=8):_.isVector3||_.isColor?(y.boundary=16,y.storage=12):_.isVector4?(y.boundary=16,y.storage=16):_.isMatrix3?(y.boundary=48,y.storage=48):_.isMatrix4?(y.boundary=64,y.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),y}function m(_){let y=_.target;y.removeEventListener("dispose",m);let x=o.indexOf(y.__bindingPointIndex);o.splice(x,1),r.deleteBuffer(n[y.id]),delete n[y.id],delete a[y.id]}function v(){for(let _ in n)r.deleteBuffer(n[_]);o=[],n={},a={}}return{bind:l,update:u,dispose:v}}var gS=class{constructor(e={}){let{canvas:t=wQ(),context:i=null,depth:n=!0,stencil:a=!0,alpha:o=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let h;i!==null?h=i.getContextAttributes().alpha:h=o;let p=new Uint32Array(4),d=new Int32Array(4),g=null,m=null,v=[],_=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=qa,this._useLegacyLights=!1,this.toneMapping=vs,this.toneMappingExposure=1;let y=this,x=!1,M=0,S=0,w=null,T=-1,C=null,b=new ii,E=new ii,I=null,R=new ir(0),A=0,D=t.width,U=t.height,B=1,F=null,k=null,G=new ii(0,0,D,U),Y=new ii(0,0,D,U),J=!1,Q=new vh,V=!1,K=!1,ae=null,ve=new Wr,ue=new Kt,se=new be,Ee={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function q(){return w===null?B:1}let H=i;function We(O,j){for(let re=0;re{function W(){if(ie.forEach(function(ee){Ne.get(ee).currentProgram.isReady()&&ie.delete(ee)}),ie.size===0){P(O);return}setTimeout(W,10)}_e.get("KHR_parallel_shader_compile")!==null?W():setTimeout(W,10)})};let zt=null;function Mr(O){zt&&zt(O)}function Zr(){Dr.stop()}function Vt(){Dr.start()}let Dr=new EA;Dr.setAnimationLoop(Mr),typeof self<"u"&&Dr.setContext(self),this.setAnimationLoop=function(O){zt=O,Je.setAnimationLoop(O),O===null?Dr.stop():Dr.start()},Je.addEventListener("sessionstart",Zr),Je.addEventListener("sessionend",Vt),this.render=function(O,j){if(j!==void 0&&j.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),j.parent===null&&j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),Je.enabled===!0&&Je.isPresenting===!0&&(Je.cameraAutoUpdate===!0&&Je.updateCamera(j),j=Je.getCamera()),O.isScene===!0&&O.onBeforeRender(y,O,j,w),m=Ke.get(O,_.length),m.init(),_.push(m),ve.multiplyMatrices(j.projectionMatrix,j.matrixWorldInverse),Q.setFromProjectionMatrix(ve),K=this.localClippingEnabled,V=Se.init(this.clippingPlanes,K),g=et.get(O,v.length),g.init(),v.push(g),oi(O,j,0,y.sortObjects),g.finish(),y.sortObjects===!0&&g.sort(F,k),this.info.render.frame++,V===!0&&Se.beginShadows();let re=m.state.shadowsArray;if(Ae.render(re,O,j),V===!0&&Se.endShadows(),this.info.autoReset===!0&&this.info.reset(),(Je.enabled===!1||Je.isPresenting===!1||Je.hasDepthSensing()===!1)&&nt.render(g,O),m.setupLights(y._useLegacyLights),j.isArrayCamera){let ie=j.cameras;for(let P=0,W=ie.length;P0?m=_[_.length-1]:m=null,v.pop(),v.length>0?g=v[v.length-1]:g=null};function oi(O,j,re,ie){if(O.visible===!1)return;if(O.layers.test(j.layers)){if(O.isGroup)re=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(j);else if(O.isLight)m.pushLight(O),O.castShadow&&m.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||Q.intersectsSprite(O)){ie&&se.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ve);let ee=le.update(O),ge=O.material;ge.visible&&g.push(O,ee,ge,re,se.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(!O.frustumCulled||Q.intersectsObject(O))){let ee=le.update(O),ge=O.material;if(ie&&(O.boundingSphere!==void 0?(O.boundingSphere===null&&O.computeBoundingSphere(),se.copy(O.boundingSphere.center)):(ee.boundingSphere===null&&ee.computeBoundingSphere(),se.copy(ee.boundingSphere.center)),se.applyMatrix4(O.matrixWorld).applyMatrix4(ve)),Array.isArray(ge)){let ce=ee.groups;for(let Oe=0,Ge=ce.length;Oe0&&M0(P,W,j,re),ie&&Le.viewport(b.copy(ie)),P.length>0&&Ds(P,j,re),W.length>0&&Ds(W,j,re),ee.length>0&&Ds(ee,j,re),Le.buffers.depth.setTest(!0),Le.buffers.depth.setMask(!0),Le.buffers.color.setMask(!0),Le.setPolygonOffset(!1)}function M0(O,j,re,ie){if((re.isScene===!0?re.overrideMaterial:null)!==null)return;let W=xe.isWebGL2;ae===null&&(ae=new $a(1,1,{generateMipmaps:!0,type:_e.has("EXT_color_buffer_half_float")?Zu:Ro,minFilter:ol,samples:W?4:0})),y.getDrawingBufferSize(ue),W?ae.setSize(ue.x,ue.y):ae.setSize(fS(ue.x),fS(ue.y));let ee=y.getRenderTarget();y.setRenderTarget(ae),y.getClearColor(R),A=y.getClearAlpha(),A<1&&y.setClearColor(16777215,.5),y.clear();let ge=y.toneMapping;y.toneMapping=vs,Ds(O,re,ie),Ve.updateMultisampleRenderTarget(ae),Ve.updateRenderTargetMipmap(ae);let ce=!1;for(let Oe=0,Ge=j.length;Oe0),Re=!!re.morphAttributes.position,pt=!!re.morphAttributes.normal,mt=!!re.morphAttributes.color,$e=vs;ie.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&($e=y.toneMapping);let at=re.morphAttributes.position||re.morphAttributes.normal||re.morphAttributes.color,wt=at!==void 0?at.length:0,je=Ne.get(ie),mi=m.state.lights;if(V===!0&&(K===!0||O!==C)){let jr=O===C&&ie.id===T;Se.setState(ie,O,jr)}let Ut=!1;ie.version===je.__version?(je.needsLights&&je.lightsStateVersion!==mi.state.version||je.outputColorSpace!==ge||P.isBatchedMesh&&je.batching===!1||!P.isBatchedMesh&&je.batching===!0||P.isInstancedMesh&&je.instancing===!1||!P.isInstancedMesh&&je.instancing===!0||P.isSkinnedMesh&&je.skinning===!1||!P.isSkinnedMesh&&je.skinning===!0||P.isInstancedMesh&&je.instancingColor===!0&&P.instanceColor===null||P.isInstancedMesh&&je.instancingColor===!1&&P.instanceColor!==null||P.isInstancedMesh&&je.instancingMorph===!0&&P.morphTexture===null||P.isInstancedMesh&&je.instancingMorph===!1&&P.morphTexture!==null||je.envMap!==ce||ie.fog===!0&&je.fog!==W||je.numClippingPlanes!==void 0&&(je.numClippingPlanes!==Se.numPlanes||je.numIntersection!==Se.numIntersection)||je.vertexAlphas!==Oe||je.vertexTangents!==Ge||je.morphTargets!==Re||je.morphNormals!==pt||je.morphColors!==mt||je.toneMapping!==$e||xe.isWebGL2===!0&&je.morphTargetsCount!==wt)&&(Ut=!0):(Ut=!0,je.__version=ie.version);let Rr=je.currentProgram;Ut===!0&&(Rr=Go(ie,j,P));let Wi=!1,Mt=!1,Mi=!1,sr=Rr.getUniforms(),un=je.uniforms;if(Le.useProgram(Rr.program)&&(Wi=!0,Mt=!0,Mi=!0),ie.id!==T&&(T=ie.id,Mt=!0),Wi||C!==O){sr.setValue(H,"projectionMatrix",O.projectionMatrix),sr.setValue(H,"viewMatrix",O.matrixWorldInverse);let jr=sr.map.cameraPosition;jr!==void 0&&jr.setValue(H,se.setFromMatrixPosition(O.matrixWorld)),xe.logarithmicDepthBuffer&&sr.setValue(H,"logDepthBufFC",2/(Math.log(O.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&sr.setValue(H,"isOrthographic",O.isOrthographicCamera===!0),C!==O&&(C=O,Mt=!0,Mi=!0)}if(P.isSkinnedMesh){sr.setOptional(H,P,"bindMatrix"),sr.setOptional(H,P,"bindMatrixInverse");let jr=P.skeleton;jr&&(xe.floatVertexTextures?(jr.boneTexture===null&&jr.computeBoneTexture(),sr.setValue(H,"boneTexture",jr.boneTexture,Ve)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}P.isBatchedMesh&&(sr.setOptional(H,P,"batchingTexture"),sr.setValue(H,"batchingTexture",P._matricesTexture,Ve));let mu=re.morphAttributes;if((mu.position!==void 0||mu.normal!==void 0||mu.color!==void 0&&xe.isWebGL2===!0)&&$.update(P,re,Rr),(Mt||je.receiveShadow!==P.receiveShadow)&&(je.receiveShadow=P.receiveShadow,sr.setValue(H,"receiveShadow",P.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(un.envMap.value=ce,un.flipEnvMap.value=ce.isCubeTexture&&ce.isRenderTargetTexture===!1?-1:1),Mt&&(sr.setValue(H,"toneMappingExposure",y.toneMappingExposure),je.needsLights&&w0(un,Mi),W&&ie.fog===!0&&he.refreshFogUniforms(un,W),he.refreshMaterialUniforms(un,ie,B,U,ae),gh.upload(H,Zh(je),un,Ve)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(gh.upload(H,Zh(je),un,Ve),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&sr.setValue(H,"center",P.center),sr.setValue(H,"modelViewMatrix",P.modelViewMatrix),sr.setValue(H,"normalMatrix",P.normalMatrix),sr.setValue(H,"modelMatrix",P.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){let jr=ie.uniformsGroups;for(let vu=0,jh=jr.length;vu0&&Ve.useMultisampledRTT(O)===!1?P=Ne.get(O).__webglMultisampledFramebuffer:Array.isArray(Ge)?P=Ge[re]:P=Ge,b.copy(O.viewport),E.copy(O.scissor),I=O.scissorTest}else b.copy(G).multiplyScalar(B).floor(),E.copy(Y).multiplyScalar(B).floor(),I=J;if(Le.bindFramebuffer(H.FRAMEBUFFER,P)&&xe.drawBuffers&&ie&&Le.drawBuffers(O,P),Le.viewport(b),Le.scissor(E),Le.setScissorTest(I),W){let ce=Ne.get(O.texture);H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,H.TEXTURE_CUBE_MAP_POSITIVE_X+j,ce.__webglTexture,re)}else if(ee){let ce=Ne.get(O.texture),Oe=j||0;H.framebufferTextureLayer(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,ce.__webglTexture,re||0,Oe)}T=-1},this.readRenderTargetPixels=function(O,j,re,ie,P,W,ee){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ge=Ne.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&ee!==void 0&&(ge=ge[ee]),ge){Le.bindFramebuffer(H.FRAMEBUFFER,ge);try{let ce=O.texture,Oe=ce.format,Ge=ce.type;if(Oe!==Rn&&ze.convert(Oe)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Re=Ge===Zu&&(_e.has("EXT_color_buffer_half_float")||xe.isWebGL2&&_e.has("EXT_color_buffer_float"));if(Ge!==Ro&&ze.convert(Ge)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ge===Ya&&(xe.isWebGL2||_e.has("OES_texture_float")||_e.has("WEBGL_color_buffer_float")))&&!Re){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}j>=0&&j<=O.width-ie&&re>=0&&re<=O.height-P&&H.readPixels(j,re,ie,P,ze.convert(Oe),ze.convert(Ge),W)}finally{let ce=w!==null?Ne.get(w).__webglFramebuffer:null;Le.bindFramebuffer(H.FRAMEBUFFER,ce)}}},this.copyFramebufferToTexture=function(O,j,re=0){let ie=Math.pow(2,-re),P=Math.floor(j.image.width*ie),W=Math.floor(j.image.height*ie);Ve.setTexture2D(j,0),H.copyTexSubImage2D(H.TEXTURE_2D,re,0,0,O.x,O.y,P,W),Le.unbindTexture()},this.copyTextureToTexture=function(O,j,re,ie=0){let P=j.image.width,W=j.image.height,ee=ze.convert(re.format),ge=ze.convert(re.type);Ve.setTexture2D(re,0),H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,re.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,re.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,re.unpackAlignment),j.isDataTexture?H.texSubImage2D(H.TEXTURE_2D,ie,O.x,O.y,P,W,ee,ge,j.image.data):j.isCompressedTexture?H.compressedTexSubImage2D(H.TEXTURE_2D,ie,O.x,O.y,j.mipmaps[0].width,j.mipmaps[0].height,ee,j.mipmaps[0].data):H.texSubImage2D(H.TEXTURE_2D,ie,O.x,O.y,ee,ge,j.image),ie===0&&re.generateMipmaps&&H.generateMipmap(H.TEXTURE_2D),Le.unbindTexture()},this.copyTextureToTexture3D=function(O,j,re,ie,P=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let W=Math.round(O.max.x-O.min.x),ee=Math.round(O.max.y-O.min.y),ge=O.max.z-O.min.z+1,ce=ze.convert(ie.format),Oe=ze.convert(ie.type),Ge;if(ie.isData3DTexture)Ve.setTexture3D(ie,0),Ge=H.TEXTURE_3D;else if(ie.isDataArrayTexture||ie.isCompressedArrayTexture)Ve.setTexture2DArray(ie,0),Ge=H.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,ie.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,ie.unpackAlignment);let Re=H.getParameter(H.UNPACK_ROW_LENGTH),pt=H.getParameter(H.UNPACK_IMAGE_HEIGHT),mt=H.getParameter(H.UNPACK_SKIP_PIXELS),$e=H.getParameter(H.UNPACK_SKIP_ROWS),at=H.getParameter(H.UNPACK_SKIP_IMAGES),wt=re.isCompressedTexture?re.mipmaps[P]:re.image;H.pixelStorei(H.UNPACK_ROW_LENGTH,wt.width),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,wt.height),H.pixelStorei(H.UNPACK_SKIP_PIXELS,O.min.x),H.pixelStorei(H.UNPACK_SKIP_ROWS,O.min.y),H.pixelStorei(H.UNPACK_SKIP_IMAGES,O.min.z),re.isDataTexture||re.isData3DTexture?H.texSubImage3D(Ge,P,j.x,j.y,j.z,W,ee,ge,ce,Oe,wt.data):ie.isCompressedArrayTexture?H.compressedTexSubImage3D(Ge,P,j.x,j.y,j.z,W,ee,ge,ce,wt.data):H.texSubImage3D(Ge,P,j.x,j.y,j.z,W,ee,ge,ce,Oe,wt),H.pixelStorei(H.UNPACK_ROW_LENGTH,Re),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,pt),H.pixelStorei(H.UNPACK_SKIP_PIXELS,mt),H.pixelStorei(H.UNPACK_SKIP_ROWS,$e),H.pixelStorei(H.UNPACK_SKIP_IMAGES,at),P===0&&ie.generateMipmaps&&H.generateMipmap(Ge),Le.unbindTexture()},this.initTexture=function(O){O.isCubeTexture?Ve.setTextureCube(O,0):O.isData3DTexture?Ve.setTexture3D(O,0):O.isDataArrayTexture||O.isCompressedArrayTexture?Ve.setTexture2DArray(O,0):Ve.setTexture2D(O,0),Le.unbindTexture()},this.resetState=function(){M=0,S=0,w=null,Le.reset(),we.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ja}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=e===fg?"display-p3":"srgb",t.unpackColorSpace=Er.workingColorSpace===dd?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}};var yS=class extends tn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new cl,this.environmentRotation=new cl,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),t.object.environmentRotation=this.environmentRotation.toArray(),t}};var OA=class r extends Qa{constructor(e=1,t=32,i=0,n=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:n},t=Math.max(3,t);let a=[],o=[],s=[],l=[],u=new be,c=new Kt;o.push(0,0,0),s.push(0,0,1),l.push(.5,.5);for(let f=0,h=3;f<=t;f++,h+=3){let p=i+f/t*n;u.x=e*Math.cos(p),u.y=e*Math.sin(p),o.push(u.x,u.y,u.z),s.push(0,0,1),c.x=(o[h]/e+1)/2,c.y=(o[h+1]/e+1)/2,l.push(c.x,c.y)}for(let f=1;f<=t;f++)a.push(f,f+1,0);this.setIndex(a),this.setAttribute("position",new Zn(o,3)),this.setAttribute("normal",new Zn(s,3)),this.setAttribute("uv",new Zn(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new r(e.radius,e.segments,e.thetaStart,e.thetaLength)}};var qg=class extends tn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new ir(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}};var _S=class extends qg{constructor(e,t,i){super(e,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(tn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new ir(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}};var iz=new Wr,Aie=new be,Cie=new be,FA=class{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Kt(512,512),this.map=null,this.mapPass=null,this.matrix=new Wr,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new vh,this._frameExtents=new Kt(1,1),this._viewportCount=1,this._viewports=[new ii(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,i=this.matrix;Aie.setFromMatrixPosition(e.matrixWorld),t.position.copy(Aie),Cie.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Cie),t.updateMatrixWorld(),iz.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(iz),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(iz)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}};var zA=class extends FA{constructor(){super(new kg(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}};var xS=class extends qg{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(tn.DEFAULT_UP),this.updateMatrix(),this.target=new tn,this.shadow=new zA}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}};var SS=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Rie(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=Rie();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};function Rie(){return(typeof performance>"u"?Date:performance).now()}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:rS}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=rS);var Lse=Nse(rae());var Ik="162";var ULe=0,iae=1,OLe=2;var Xoe=1,FLe=2,vc=3,Uh=0,lo=1,yc=2,Dh=0,a0=1,nae=2,aae=3,oae=4,zLe=5,um=100,BLe=101,kLe=102,sae=103,lae=104,VLe=200,GLe=201,HLe=202,WLe=203,KB=204,JB=205,XLe=206,YLe=207,qLe=208,ZLe=209,jLe=210,KLe=211,JLe=212,$Le=213,QLe=214,ePe=0,tPe=1,rPe=2,eR=3,iPe=4,nPe=5,aPe=6,oPe=7,NR=0,sPe=1,lPe=2,Ih=0,uPe=1,cPe=2,fPe=3,hPe=4,pPe=5,dPe=6,mPe=7,uae="attached",vPe="detached",cae=300,l0=301,u0=302,LM=303,$B=304,UR=306,c0=1e3,oo=1001,QB=1002,Dn=1003,fae=1004;var SM=1005;var ao=1006,dB=1007;var fm=1008;var Nh=1009,gPe=1010,yPe=1011,Nk=1012,Yoe=1013,Ph=1014,hu=1015,PM=1016,qoe=1017,Zoe=1018,hm=1020,_Pe=1021,As=1023,xPe=1024,SPe=1025,pm=1026,f0=1027,MPe=1028,joe=1029,bPe=1030,Koe=1031,Joe=1033,mB=33776,vB=33777,gB=33778,yB=33779,hae=35840,pae=35841,dae=35842,mae=35843,$oe=36196,vae=37492,gae=37496,yae=37808,_ae=37809,xae=37810,Sae=37811,Mae=37812,bae=37813,wae=37814,Tae=37815,Eae=37816,Aae=37817,Cae=37818,Rae=37819,Lae=37820,Pae=37821,_B=36492,Dae=36494,Iae=36495,wPe=36283,Nae=36284,Uae=36285,Oae=36286;var tR=2300,rR=2301,xB=2302,Fae=2400,zae=2401,Bae=2402,TPe=2500;var EPe=3200,APe=3201,Uk=0,CPe=1,Lh="",Ma="srgb",Hh="srgb-linear",Ok="display-p3",OR="display-p3-linear",iR="linear",ai="srgb",nR="rec709",aR="p3";var zy=7680;var kae=519,RPe=512,LPe=513,PPe=514,Qoe=515,DPe=516,IPe=517,NPe=518,UPe=519,Vae=35044;var Gae="300 es",ek=1035,_c=2e3,oR=2001,Oh=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let n=this._listeners[e];if(n!==void 0){let a=n.indexOf(t);a!==-1&&n.splice(a,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let i=this._listeners[e.type];if(i!==void 0){e.target=this;let n=i.slice(0);for(let a=0,o=n.length;a>8&255]+ta[r>>16&255]+ta[r>>24&255]+"-"+ta[e&255]+ta[e>>8&255]+"-"+ta[e>>16&15|64]+ta[e>>24&255]+"-"+ta[t&63|128]+ta[t>>8&255]+"-"+ta[t>>16&255]+ta[t>>24&255]+ta[i&255]+ta[i>>8&255]+ta[i>>16&255]+ta[i>>24&255]).toLowerCase()}function In(r,e,t){return Math.max(e,Math.min(t,r))}function Fk(r,e){return(r%e+e)%e}function OPe(r,e,t,i,n){return i+(r-e)*(n-i)/(t-e)}function FPe(r,e,t){return r!==e?(t-r)/(e-r):0}function CM(r,e,t){return(1-t)*r+t*e}function zPe(r,e,t,i){return CM(r,e,1-Math.exp(-t*i))}function BPe(r,e=1){return e-Math.abs(Fk(r,e*2)-e)}function kPe(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function VPe(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function GPe(r,e){return r+Math.floor(Math.random()*(e-r+1))}function HPe(r,e){return r+Math.random()*(e-r)}function WPe(r){return r*(.5-Math.random())}function XPe(r){r!==void 0&&(Hae=r);let e=Hae+=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 YPe(r){return r*AM}function qPe(r){return r*h0}function tk(r){return(r&r-1)===0&&r!==0}function ZPe(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function sR(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function jPe(r,e,t,i,n){let a=Math.cos,o=Math.sin,s=a(t/2),l=o(t/2),u=a((e+i)/2),c=o((e+i)/2),f=a((e-i)/2),h=o((e-i)/2),p=a((i-e)/2),d=o((i-e)/2);switch(n){case"XYX":r.set(s*c,l*f,l*h,s*u);break;case"YZY":r.set(l*h,s*c,l*f,s*u);break;case"ZXZ":r.set(l*f,l*h,s*c,s*u);break;case"XZX":r.set(s*c,l*d,l*p,s*u);break;case"YXY":r.set(l*p,s*c,l*d,s*u);break;case"ZYZ":r.set(l*d,l*p,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+n)}}function e0(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function xa(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}var na={DEG2RAD:AM,RAD2DEG:h0,generateUUID:Wh,clamp:In,euclideanModulo:Fk,mapLinear:OPe,inverseLerp:FPe,lerp:CM,damp:zPe,pingpong:BPe,smoothstep:kPe,smootherstep:VPe,randInt:GPe,randFloat:HPe,randFloatSpread:WPe,seededRandom:XPe,degToRad:YPe,radToDeg:qPe,isPowerOfTwo:tk,ceilPowerOfTwo:ZPe,floorPowerOfTwo:sR,setQuaternionFromProperEuler:jPe,normalize:xa,denormalize:e0},yr=class r{constructor(e=0,t=0){r.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(In(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),n=Math.sin(t),a=this.x-e.x,o=this.y-e.y;return this.x=a*i-o*n+e.x,this.y=a*n+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},dr=class r{constructor(e,t,i,n,a,o,s,l,u){r.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,n,a,o,s,l,u)}set(e,t,i,n,a,o,s,l,u){let c=this.elements;return c[0]=e,c[1]=n,c[2]=s,c[3]=t,c[4]=a,c[5]=l,c[6]=i,c[7]=o,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,n=t.elements,a=this.elements,o=i[0],s=i[3],l=i[6],u=i[1],c=i[4],f=i[7],h=i[2],p=i[5],d=i[8],g=n[0],m=n[3],v=n[6],_=n[1],y=n[4],x=n[7],M=n[2],S=n[5],w=n[8];return a[0]=o*g+s*_+l*M,a[3]=o*m+s*y+l*S,a[6]=o*v+s*x+l*w,a[1]=u*g+c*_+f*M,a[4]=u*m+c*y+f*S,a[7]=u*v+c*x+f*w,a[2]=h*g+p*_+d*M,a[5]=h*m+p*y+d*S,a[8]=h*v+p*x+d*w,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return t*o*c-t*s*u-i*a*c+i*s*l+n*a*u-n*o*l}invert(){let e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=c*o-s*u,h=s*l-c*a,p=u*a-o*l,d=t*f+i*h+n*p;if(d===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/d;return e[0]=f*g,e[1]=(n*u-c*i)*g,e[2]=(s*i-n*o)*g,e[3]=h*g,e[4]=(c*t-n*l)*g,e[5]=(n*a-s*t)*g,e[6]=p*g,e[7]=(i*l-u*t)*g,e[8]=(o*t-i*a)*g,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,a,o,s){let l=Math.cos(a),u=Math.sin(a);return this.set(i*l,i*u,-i*(l*o+u*s)+o+e,-n*u,n*l,-n*(-u*o+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(SB.makeScale(e,t)),this}rotate(e){return this.premultiply(SB.makeRotation(-e)),this}translate(e,t){return this.premultiply(SB.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,i=e.elements;for(let n=0;n<9;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}},SB=new dr;function ese(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function DM(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function KPe(){let r=DM("canvas");return r.style.display="block",r}var Wae={};function JPe(r){r in Wae||(Wae[r]=!0,console.warn(r))}var Xae=new dr().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Yae=new dr().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),CC={[Hh]:{transfer:iR,primaries:nR,toReference:r=>r,fromReference:r=>r},[Ma]:{transfer:ai,primaries:nR,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[OR]:{transfer:iR,primaries:aR,toReference:r=>r.applyMatrix3(Yae),fromReference:r=>r.applyMatrix3(Xae)},[Ok]:{transfer:ai,primaries:aR,toReference:r=>r.convertSRGBToLinear().applyMatrix3(Yae),fromReference:r=>r.applyMatrix3(Xae).convertLinearToSRGB()}},$Pe=new Set([Hh,OR]),Jr={enabled:!0,_workingColorSpace:Hh,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!$Pe.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,e,t){if(this.enabled===!1||e===t||!e||!t)return r;let i=CC[e].toReference,n=CC[t].fromReference;return n(i(r))},fromWorkingColorSpace:function(r,e){return this.convert(r,this._workingColorSpace,e)},toWorkingColorSpace:function(r,e){return this.convert(r,e,this._workingColorSpace)},getPrimaries:function(r){return CC[r].primaries},getTransfer:function(r){return r===Lh?iR:CC[r].transfer}};function o0(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function MB(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}var By,lR=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{By===void 0&&(By=DM("canvas")),By.width=e.width,By.height=e.height;let i=By.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=By}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=DM("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let n=i.getImageData(0,0,e.width,e.height),a=n.data;for(let o=0;o{class r extends Oh{constructor(t=r.DEFAULT_IMAGE,i=r.DEFAULT_MAPPING,n=oo,a=oo,o=ao,s=fm,l=As,u=Nh,c=r.DEFAULT_ANISOTROPY,f=Lh){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:eDe++}),this.uuid=Wh(),this.name="",this.source=new uR(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=n,this.wrapT=a,this.magFilter=o,this.minFilter=s,this.anisotropy=c,this.format=l,this.internalFormat=null,this.type=u,this.offset=new yr(0,0),this.repeat=new yr(1,1),this.center=new yr(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new dr,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=f,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){let i=t===void 0||typeof t=="string";if(!i&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),i||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==cae)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case c0:t.x=t.x-Math.floor(t.x);break;case oo:t.x=t.x<0?0:1;break;case QB: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 c0:t.y=t.y-Math.floor(t.y);break;case oo:t.y=t.y<0?0:1;break;case QB: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)}}return r.DEFAULT_IMAGE=null,r.DEFAULT_MAPPING=cae,r.DEFAULT_ANISOTROPY=1,r})(),Pr=class r{constructor(e=0,t=0,i=0,n=1){r.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,n=this.z,a=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*n+o[12]*a,this.y=o[1]*t+o[5]*i+o[9]*n+o[13]*a,this.z=o[2]*t+o[6]*i+o[10]*n+o[14]*a,this.w=o[3]*t+o[7]*i+o[11]*n+o[15]*a,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,a,l=e.elements,u=l[0],c=l[4],f=l[8],h=l[1],p=l[5],d=l[9],g=l[2],m=l[6],v=l[10];if(Math.abs(c-h)<.01&&Math.abs(f-g)<.01&&Math.abs(d-m)<.01){if(Math.abs(c+h)<.1&&Math.abs(f+g)<.1&&Math.abs(d+m)<.1&&Math.abs(u+p+v-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(u+1)/2,x=(p+1)/2,M=(v+1)/2,S=(c+h)/4,w=(f+g)/4,T=(d+m)/4;return y>x&&y>M?y<.01?(i=0,n=.707106781,a=.707106781):(i=Math.sqrt(y),n=S/i,a=w/i):x>M?x<.01?(i=.707106781,n=0,a=.707106781):(n=Math.sqrt(x),i=S/n,a=T/n):M<.01?(i=.707106781,n=.707106781,a=0):(a=Math.sqrt(M),i=w/a,n=T/a),this.set(i,n,a,t),this}let _=Math.sqrt((m-d)*(m-d)+(f-g)*(f-g)+(h-c)*(h-c));return Math.abs(_)<.001&&(_=1),this.x=(m-d)/_,this.y=(f-g)/_,this.z=(h-c)/_,this.w=Math.acos((u+p+v-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},rk=class extends Oh{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Pr(0,0,e,t),this.scissorTest=!1,this.viewport=new Pr(0,0,e,t);let n={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ao,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},i);let a=new Vo(n,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);a.flipY=!1,a.generateMipmaps=i.generateMipmaps,a.internalFormat=i.internalFormat,this.textures=[];let o=i.count;for(let s=0;s=0?1:-1,y=1-v*v;if(y>Number.EPSILON){let M=Math.sqrt(y),S=Math.atan2(M,v*_);m=Math.sin(m*S)/M,s=Math.sin(s*S)/M}let x=s*_;if(l=l*m+h*x,u=u*m+p*x,c=c*m+d*x,f=f*m+g*x,m===1-s){let M=1/Math.sqrt(l*l+u*u+c*c+f*f);l*=M,u*=M,c*=M,f*=M}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,n,a,o){let s=i[n],l=i[n+1],u=i[n+2],c=i[n+3],f=a[o],h=a[o+1],p=a[o+2],d=a[o+3];return e[t]=s*d+c*f+l*p-u*h,e[t+1]=l*d+c*h+u*f-s*p,e[t+2]=u*d+c*p+s*h-l*f,e[t+3]=c*d-s*f-l*h-u*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let i=e._x,n=e._y,a=e._z,o=e._order,s=Math.cos,l=Math.sin,u=s(i/2),c=s(n/2),f=s(a/2),h=l(i/2),p=l(n/2),d=l(a/2);switch(o){case"XYZ":this._x=h*c*f+u*p*d,this._y=u*p*f-h*c*d,this._z=u*c*d+h*p*f,this._w=u*c*f-h*p*d;break;case"YXZ":this._x=h*c*f+u*p*d,this._y=u*p*f-h*c*d,this._z=u*c*d-h*p*f,this._w=u*c*f+h*p*d;break;case"ZXY":this._x=h*c*f-u*p*d,this._y=u*p*f+h*c*d,this._z=u*c*d+h*p*f,this._w=u*c*f-h*p*d;break;case"ZYX":this._x=h*c*f-u*p*d,this._y=u*p*f+h*c*d,this._z=u*c*d-h*p*f,this._w=u*c*f+h*p*d;break;case"YZX":this._x=h*c*f+u*p*d,this._y=u*p*f+h*c*d,this._z=u*c*d-h*p*f,this._w=u*c*f-h*p*d;break;case"XZY":this._x=h*c*f-u*p*d,this._y=u*p*f-h*c*d,this._z=u*c*d+h*p*f,this._w=u*c*f+h*p*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],n=t[4],a=t[8],o=t[1],s=t[5],l=t[9],u=t[2],c=t[6],f=t[10],h=i+s+f;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(c-l)*p,this._y=(a-u)*p,this._z=(o-n)*p}else if(i>s&&i>f){let p=2*Math.sqrt(1+i-s-f);this._w=(c-l)/p,this._x=.25*p,this._y=(n+o)/p,this._z=(a+u)/p}else if(s>f){let p=2*Math.sqrt(1+s-i-f);this._w=(a-u)/p,this._x=(n+o)/p,this._y=.25*p,this._z=(l+c)/p}else{let p=2*Math.sqrt(1+f-i-s);this._w=(o-n)/p,this._x=(a+u)/p,this._y=(l+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(In(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let n=Math.min(1,t/i);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,n=e._y,a=e._z,o=e._w,s=t._x,l=t._y,u=t._z,c=t._w;return this._x=i*c+o*s+n*u-a*l,this._y=n*c+o*l+a*s-i*u,this._z=a*c+o*u+i*l-n*s,this._w=o*c-i*s-n*l-a*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let i=this._x,n=this._y,a=this._z,o=this._w,s=o*e._w+i*e._x+n*e._y+a*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=i,this._y=n,this._z=a,this;let l=1-s*s;if(l<=Number.EPSILON){let p=1-t;return this._w=p*o+t*this._w,this._x=p*i+t*this._x,this._y=p*n+t*this._y,this._z=p*a+t*this._z,this.normalize(),this}let u=Math.sqrt(l),c=Math.atan2(u,s),f=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=n*f+this._y*h,this._z=a*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),a=Math.sqrt(i);return this.set(n*Math.sin(e),n*Math.cos(e),a*Math.sin(t),a*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}},ye=class r{constructor(e=0,t=0,i=0){r.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(qae.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(qae.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,n=this.z,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6]*n,this.y=a[1]*t+a[4]*i+a[7]*n,this.z=a[2]*t+a[5]*i+a[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,n=this.z,a=e.elements,o=1/(a[3]*t+a[7]*i+a[11]*n+a[15]);return this.x=(a[0]*t+a[4]*i+a[8]*n+a[12])*o,this.y=(a[1]*t+a[5]*i+a[9]*n+a[13])*o,this.z=(a[2]*t+a[6]*i+a[10]*n+a[14])*o,this}applyQuaternion(e){let t=this.x,i=this.y,n=this.z,a=e.x,o=e.y,s=e.z,l=e.w,u=2*(o*n-s*i),c=2*(s*t-a*n),f=2*(a*i-o*t);return this.x=t+l*u+o*f-s*c,this.y=i+l*c+s*u-a*f,this.z=n+l*f+a*c-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,n=this.z,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n,this.y=a[1]*t+a[5]*i+a[9]*n,this.z=a[2]*t+a[6]*i+a[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,n=e.y,a=e.z,o=t.x,s=t.y,l=t.z;return this.x=n*l-a*s,this.y=a*o-i*l,this.z=i*s-n*o,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return wB.copy(this).projectOnVector(e),this.sub(wB)}reflect(e){return this.sub(wB.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(In(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},wB=new ye,qae=new On,Fh=class{constructor(e=new ye(1/0,1/0,1/0),t=new ye(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,vl),vl.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(MM),LC.subVectors(this.max,MM),ky.subVectors(e.a,MM),Vy.subVectors(e.b,MM),Gy.subVectors(e.c,MM),wh.subVectors(Vy,ky),Th.subVectors(Gy,Vy),rm.subVectors(ky,Gy);let t=[0,-wh.z,wh.y,0,-Th.z,Th.y,0,-rm.z,rm.y,wh.z,0,-wh.x,Th.z,0,-Th.x,rm.z,0,-rm.x,-wh.y,wh.x,0,-Th.y,Th.x,0,-rm.y,rm.x,0];return!TB(t,ky,Vy,Gy,LC)||(t=[1,0,0,0,1,0,0,0,1],!TB(t,ky,Vy,Gy,LC))?!1:(PC.crossVectors(wh,Th),t=[PC.x,PC.y,PC.z],TB(t,ky,Vy,Gy,LC))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,vl).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(vl).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:(cc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),cc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),cc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),cc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),cc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),cc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),cc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),cc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(cc),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)}},cc=[new ye,new ye,new ye,new ye,new ye,new ye,new ye,new ye],vl=new ye,RC=new Fh,ky=new ye,Vy=new ye,Gy=new ye,wh=new ye,Th=new ye,rm=new ye,MM=new ye,LC=new ye,PC=new ye,im=new ye;function TB(r,e,t,i,n){for(let a=0,o=r.length-3;a<=o;a+=3){im.fromArray(r,a);let s=n.x*Math.abs(im.x)+n.y*Math.abs(im.y)+n.z*Math.abs(im.z),l=e.dot(im),u=t.dot(im),c=i.dot(im);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}var tDe=new Fh,bM=new ye,EB=new ye,zh=class{constructor(e=new ye,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;t!==void 0?i.copy(t):tDe.setFromPoints(e).getCenter(i);let n=0;for(let a=0,o=e.length;athis.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;bM.subVectors(e,this.center);let t=bM.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),n=(i-this.radius)*.5;this.center.addScaledVector(bM,n/i),this.radius+=n}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):(EB.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(bM.copy(e.center).add(EB)),this.expandByPoint(bM.copy(e.center).sub(EB))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}},fc=new ye,AB=new ye,DC=new ye,Eh=new ye,CB=new ye,IC=new ye,RB=new ye,IM=class{constructor(e=new ye,t=new ye(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,fc)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=fc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(fc.copy(this.origin).addScaledVector(this.direction,t),fc.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){AB.copy(e).add(t).multiplyScalar(.5),DC.copy(t).sub(e).normalize(),Eh.copy(this.origin).sub(AB);let a=e.distanceTo(t)*.5,o=-this.direction.dot(DC),s=Eh.dot(this.direction),l=-Eh.dot(DC),u=Eh.lengthSq(),c=Math.abs(1-o*o),f,h,p,d;if(c>0)if(f=o*l-s,h=o*s-l,d=a*c,f>=0)if(h>=-d)if(h<=d){let g=1/c;f*=g,h*=g,p=f*(f+o*h+2*s)+h*(o*f+h+2*l)+u}else h=a,f=Math.max(0,-(o*h+s)),p=-f*f+h*(h+2*l)+u;else h=-a,f=Math.max(0,-(o*h+s)),p=-f*f+h*(h+2*l)+u;else h<=-d?(f=Math.max(0,-(-o*a+s)),h=f>0?-a:Math.min(Math.max(-a,-l),a),p=-f*f+h*(h+2*l)+u):h<=d?(f=0,h=Math.min(Math.max(-a,-l),a),p=h*(h+2*l)+u):(f=Math.max(0,-(o*a+s)),h=f>0?a:Math.min(Math.max(-a,-l),a),p=-f*f+h*(h+2*l)+u);else h=o>0?-a:a,f=Math.max(0,-(o*h+s)),p=-f*f+h*(h+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,f),n&&n.copy(AB).addScaledVector(DC,h),p}intersectSphere(e,t){fc.subVectors(e.center,this.origin);let i=fc.dot(this.direction),n=fc.dot(fc)-i*i,a=e.radius*e.radius;if(n>a)return null;let o=Math.sqrt(a-n),s=i-o,l=i+o;return l<0?null:s<0?this.at(l,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,a,o,s,l,u=1/this.direction.x,c=1/this.direction.y,f=1/this.direction.z,h=this.origin;return u>=0?(i=(e.min.x-h.x)*u,n=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,n=(e.min.x-h.x)*u),c>=0?(a=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(a=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),i>o||a>n||((a>i||isNaN(i))&&(i=a),(o=0?(s=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(s=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||s>n)||((s>i||i!==i)&&(i=s),(l=0?i:n,t)}intersectsBox(e){return this.intersectBox(e,fc)!==null}intersectTriangle(e,t,i,n,a){CB.subVectors(t,e),IC.subVectors(i,e),RB.crossVectors(CB,IC);let o=this.direction.dot(RB),s;if(o>0){if(n)return null;s=1}else if(o<0)s=-1,o=-o;else return null;Eh.subVectors(this.origin,e);let l=s*this.direction.dot(IC.crossVectors(Eh,IC));if(l<0)return null;let u=s*this.direction.dot(CB.cross(Eh));if(u<0||l+u>o)return null;let c=-s*Eh.dot(RB);return c<0?null:this.at(c/o,a)}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)}},Ht=class r{constructor(e,t,i,n,a,o,s,l,u,c,f,h,p,d,g,m){r.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,n,a,o,s,l,u,c,f,h,p,d,g,m)}set(e,t,i,n,a,o,s,l,u,c,f,h,p,d,g,m){let v=this.elements;return v[0]=e,v[4]=t,v[8]=i,v[12]=n,v[1]=a,v[5]=o,v[9]=s,v[13]=l,v[2]=u,v[6]=c,v[10]=f,v[14]=h,v[3]=p,v[7]=d,v[11]=g,v[15]=m,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 r().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,i=e.elements,n=1/Hy.setFromMatrixColumn(e,0).length(),a=1/Hy.setFromMatrixColumn(e,1).length(),o=1/Hy.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*a,t[5]=i[5]*a,t[6]=i[6]*a,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,n=e.y,a=e.z,o=Math.cos(i),s=Math.sin(i),l=Math.cos(n),u=Math.sin(n),c=Math.cos(a),f=Math.sin(a);if(e.order==="XYZ"){let h=o*c,p=o*f,d=s*c,g=s*f;t[0]=l*c,t[4]=-l*f,t[8]=u,t[1]=p+d*u,t[5]=h-g*u,t[9]=-s*l,t[2]=g-h*u,t[6]=d+p*u,t[10]=o*l}else if(e.order==="YXZ"){let h=l*c,p=l*f,d=u*c,g=u*f;t[0]=h+g*s,t[4]=d*s-p,t[8]=o*u,t[1]=o*f,t[5]=o*c,t[9]=-s,t[2]=p*s-d,t[6]=g+h*s,t[10]=o*l}else if(e.order==="ZXY"){let h=l*c,p=l*f,d=u*c,g=u*f;t[0]=h-g*s,t[4]=-o*f,t[8]=d+p*s,t[1]=p+d*s,t[5]=o*c,t[9]=g-h*s,t[2]=-o*u,t[6]=s,t[10]=o*l}else if(e.order==="ZYX"){let h=o*c,p=o*f,d=s*c,g=s*f;t[0]=l*c,t[4]=d*u-p,t[8]=h*u+g,t[1]=l*f,t[5]=g*u+h,t[9]=p*u-d,t[2]=-u,t[6]=s*l,t[10]=o*l}else if(e.order==="YZX"){let h=o*l,p=o*u,d=s*l,g=s*u;t[0]=l*c,t[4]=g-h*f,t[8]=d*f+p,t[1]=f,t[5]=o*c,t[9]=-s*c,t[2]=-u*c,t[6]=p*f+d,t[10]=h-g*f}else if(e.order==="XZY"){let h=o*l,p=o*u,d=s*l,g=s*u;t[0]=l*c,t[4]=-f,t[8]=u*c,t[1]=h*f+g,t[5]=o*c,t[9]=p*f-d,t[2]=d*f-p,t[6]=s*c,t[10]=g*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(rDe,e,iDe)}lookAt(e,t,i){let n=this.elements;return Bo.subVectors(e,t),Bo.lengthSq()===0&&(Bo.z=1),Bo.normalize(),Ah.crossVectors(i,Bo),Ah.lengthSq()===0&&(Math.abs(i.z)===1?Bo.x+=1e-4:Bo.z+=1e-4,Bo.normalize(),Ah.crossVectors(i,Bo)),Ah.normalize(),NC.crossVectors(Bo,Ah),n[0]=Ah.x,n[4]=NC.x,n[8]=Bo.x,n[1]=Ah.y,n[5]=NC.y,n[9]=Bo.y,n[2]=Ah.z,n[6]=NC.z,n[10]=Bo.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,n=t.elements,a=this.elements,o=i[0],s=i[4],l=i[8],u=i[12],c=i[1],f=i[5],h=i[9],p=i[13],d=i[2],g=i[6],m=i[10],v=i[14],_=i[3],y=i[7],x=i[11],M=i[15],S=n[0],w=n[4],T=n[8],C=n[12],b=n[1],E=n[5],I=n[9],R=n[13],A=n[2],D=n[6],U=n[10],B=n[14],F=n[3],k=n[7],G=n[11],Y=n[15];return a[0]=o*S+s*b+l*A+u*F,a[4]=o*w+s*E+l*D+u*k,a[8]=o*T+s*I+l*U+u*G,a[12]=o*C+s*R+l*B+u*Y,a[1]=c*S+f*b+h*A+p*F,a[5]=c*w+f*E+h*D+p*k,a[9]=c*T+f*I+h*U+p*G,a[13]=c*C+f*R+h*B+p*Y,a[2]=d*S+g*b+m*A+v*F,a[6]=d*w+g*E+m*D+v*k,a[10]=d*T+g*I+m*U+v*G,a[14]=d*C+g*R+m*B+v*Y,a[3]=_*S+y*b+x*A+M*F,a[7]=_*w+y*E+x*D+M*k,a[11]=_*T+y*I+x*U+M*G,a[15]=_*C+y*R+x*B+M*Y,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],n=e[8],a=e[12],o=e[1],s=e[5],l=e[9],u=e[13],c=e[2],f=e[6],h=e[10],p=e[14],d=e[3],g=e[7],m=e[11],v=e[15];return d*(+a*l*f-n*u*f-a*s*h+i*u*h+n*s*p-i*l*p)+g*(+t*l*p-t*u*h+a*o*h-n*o*p+n*u*c-a*l*c)+m*(+t*u*f-t*s*p-a*o*f+i*o*p+a*s*c-i*u*c)+v*(-n*s*c-t*l*f+t*s*h+n*o*f-i*o*h+i*l*c)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],g=e[13],m=e[14],v=e[15],_=f*m*u-g*h*u+g*l*p-s*m*p-f*l*v+s*h*v,y=d*h*u-c*m*u-d*l*p+o*m*p+c*l*v-o*h*v,x=c*g*u-d*f*u+d*s*p-o*g*p-c*s*v+o*f*v,M=d*f*l-c*g*l-d*s*h+o*g*h+c*s*m-o*f*m,S=t*_+i*y+n*x+a*M;if(S===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let w=1/S;return e[0]=_*w,e[1]=(g*h*a-f*m*a-g*n*p+i*m*p+f*n*v-i*h*v)*w,e[2]=(s*m*a-g*l*a+g*n*u-i*m*u-s*n*v+i*l*v)*w,e[3]=(f*l*a-s*h*a-f*n*u+i*h*u+s*n*p-i*l*p)*w,e[4]=y*w,e[5]=(c*m*a-d*h*a+d*n*p-t*m*p-c*n*v+t*h*v)*w,e[6]=(d*l*a-o*m*a-d*n*u+t*m*u+o*n*v-t*l*v)*w,e[7]=(o*h*a-c*l*a+c*n*u-t*h*u-o*n*p+t*l*p)*w,e[8]=x*w,e[9]=(d*f*a-c*g*a-d*i*p+t*g*p+c*i*v-t*f*v)*w,e[10]=(o*g*a-d*s*a+d*i*u-t*g*u-o*i*v+t*s*v)*w,e[11]=(c*s*a-o*f*a-c*i*u+t*f*u+o*i*p-t*s*p)*w,e[12]=M*w,e[13]=(c*g*n-d*f*n+d*i*h-t*g*h-c*i*m+t*f*m)*w,e[14]=(d*s*n-o*g*n-d*i*l+t*g*l+o*i*m-t*s*m)*w,e[15]=(o*f*n-c*s*n+c*i*l-t*f*l-o*i*h+t*s*h)*w,this}scale(e){let t=this.elements,i=e.x,n=e.y,a=e.z;return t[0]*=i,t[4]*=n,t[8]*=a,t[1]*=i,t[5]*=n,t[9]*=a,t[2]*=i,t[6]*=n,t[10]*=a,t[3]*=i,t[7]*=n,t[11]*=a,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),n=Math.sin(t),a=1-i,o=e.x,s=e.y,l=e.z,u=a*o,c=a*s;return this.set(u*o+i,u*s-n*l,u*l+n*s,0,u*s+n*l,c*s+i,c*l-n*o,0,u*l-n*s,c*l+n*o,a*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,a,o){return this.set(1,i,a,0,e,1,o,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){let n=this.elements,a=t._x,o=t._y,s=t._z,l=t._w,u=a+a,c=o+o,f=s+s,h=a*u,p=a*c,d=a*f,g=o*c,m=o*f,v=s*f,_=l*u,y=l*c,x=l*f,M=i.x,S=i.y,w=i.z;return n[0]=(1-(g+v))*M,n[1]=(p+x)*M,n[2]=(d-y)*M,n[3]=0,n[4]=(p-x)*S,n[5]=(1-(h+v))*S,n[6]=(m+_)*S,n[7]=0,n[8]=(d+y)*w,n[9]=(m-_)*w,n[10]=(1-(h+g))*w,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){let n=this.elements,a=Hy.set(n[0],n[1],n[2]).length(),o=Hy.set(n[4],n[5],n[6]).length(),s=Hy.set(n[8],n[9],n[10]).length();this.determinant()<0&&(a=-a),e.x=n[12],e.y=n[13],e.z=n[14],gl.copy(this);let u=1/a,c=1/o,f=1/s;return gl.elements[0]*=u,gl.elements[1]*=u,gl.elements[2]*=u,gl.elements[4]*=c,gl.elements[5]*=c,gl.elements[6]*=c,gl.elements[8]*=f,gl.elements[9]*=f,gl.elements[10]*=f,t.setFromRotationMatrix(gl),i.x=a,i.y=o,i.z=s,this}makePerspective(e,t,i,n,a,o,s=_c){let l=this.elements,u=2*a/(t-e),c=2*a/(i-n),f=(t+e)/(t-e),h=(i+n)/(i-n),p,d;if(s===_c)p=-(o+a)/(o-a),d=-2*o*a/(o-a);else if(s===oR)p=-o/(o-a),d=-o*a/(o-a);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=u,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=c,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=d,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,n,a,o,s=_c){let l=this.elements,u=1/(t-e),c=1/(i-n),f=1/(o-a),h=(t+e)*u,p=(i+n)*c,d,g;if(s===_c)d=(o+a)*f,g=-2*f;else if(s===oR)d=a*f,g=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=g,l[14]=-d,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let n=0;n<16;n++)if(t[n]!==i[n])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},Hy=new ye,gl=new Ht,rDe=new ye(0,0,0),iDe=new ye(1,1,1),Ah=new ye,NC=new ye,Bo=new ye,Zae=new Ht,jae=new On,Fn=(()=>{class r{constructor(t=0,i=0,n=0,a=r.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=n,this._order=a}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,n,a=this._order){return this._x=t,this._y=i,this._z=n,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,n=!0){let a=t.elements,o=a[0],s=a[4],l=a[8],u=a[1],c=a[5],f=a[9],h=a[2],p=a[6],d=a[10];switch(i){case"XYZ":this._y=Math.asin(In(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-f,d),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-In(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(l,d),this._z=Math.atan2(u,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(In(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(u,o));break;case"ZYX":this._y=Math.asin(-In(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(p,d),this._z=Math.atan2(u,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(In(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-f,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(l,d));break;case"XZY":this._z=Math.asin(-In(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(l,o)):(this._x=Math.atan2(-f,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,n){return Zae.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Zae,i,n)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return jae.setFromEuler(this),this.setFromQuaternion(jae,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return r.DEFAULT_ORDER="XYZ",r})(),fR=class{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<{class r extends Oh{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:nDe++}),this.uuid=Wh(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=r.DEFAULT_UP.clone();let t=new ye,i=new Fn,n=new On,a=new ye(1,1,1);function o(){n.setFromEuler(i,!1)}function s(){i.setFromQuaternion(n,void 0,!1)}i._onChange(o),n._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new Ht},normalMatrix:{value:new dr}}),this.matrix=new Ht,this.matrixWorld=new Ht,this.matrixAutoUpdate=r.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=r.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new fR,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return Wy.setFromAxisAngle(t,i),this.quaternion.multiply(Wy),this}rotateOnWorldAxis(t,i){return Wy.setFromAxisAngle(t,i),this.quaternion.premultiply(Wy),this}rotateX(t){return this.rotateOnAxis(Jae,t)}rotateY(t){return this.rotateOnAxis($ae,t)}rotateZ(t){return this.rotateOnAxis(Qae,t)}translateOnAxis(t,i){return Kae.copy(t).applyQuaternion(this.quaternion),this.position.add(Kae.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(Jae,t)}translateY(t){return this.translateOnAxis($ae,t)}translateZ(t){return this.translateOnAxis(Qae,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(hc.copy(this.matrixWorld).invert())}lookAt(t,i,n){t.isVector3?UC.copy(t):UC.set(t,i,n);let a=this.parent;this.updateWorldMatrix(!0,!1),wM.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?hc.lookAt(wM,UC,this.up):hc.lookAt(UC,wM,this.up),this.quaternion.setFromRotationMatrix(hc),a&&(hc.extractRotation(a.matrixWorld),Wy.setFromRotationMatrix(hc),this.quaternion.premultiply(Wy.invert()))}add(t){if(arguments.length>1){for(let i=0;i1){for(let n=0;n0&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),a.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(a.matrixAutoUpdate=!1),this.isInstancedMesh&&(a.type="InstancedMesh",a.count=this.count,a.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(a.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(a.type="BatchedMesh",a.perObjectFrustumCulled=this.perObjectFrustumCulled,a.sortObjects=this.sortObjects,a.drawRanges=this._drawRanges,a.reservedRanges=this._reservedRanges,a.visibility=this._visibility,a.active=this._active,a.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),a.maxGeometryCount=this._maxGeometryCount,a.maxVertexCount=this._maxVertexCount,a.maxIndexCount=this._maxIndexCount,a.geometryInitialized=this._geometryInitialized,a.geometryCount=this._geometryCount,a.matricesTexture=this._matricesTexture.toJSON(t),this.boundingSphere!==null&&(a.boundingSphere={center:a.boundingSphere.center.toArray(),radius:a.boundingSphere.radius}),this.boundingBox!==null&&(a.boundingBox={min:a.boundingBox.min.toArray(),max:a.boundingBox.max.toArray()}));function o(l,u){return l[u.uuid]===void 0&&(l[u.uuid]=u.toJSON(t)),u.uuid}if(this.isScene)this.background&&(this.background.isColor?a.background=this.background.toJSON():this.background.isTexture&&(a.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(a.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){a.geometry=o(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let u=l.shapes;if(Array.isArray(u))for(let c=0,f=u.length;c0){a.children=[];for(let l=0;l0){a.animations=[];for(let l=0;l0&&(n.geometries=l),u.length>0&&(n.materials=u),c.length>0&&(n.textures=c),f.length>0&&(n.images=f),h.length>0&&(n.shapes=h),p.length>0&&(n.skeletons=p),d.length>0&&(n.animations=d),g.length>0&&(n.nodes=g)}return n.object=a,n;function s(l){let u=[];for(let c in l){let f=l[c];delete f.metadata,u.push(f)}return u}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let n=0;n0?n.multiplyScalar(1/Math.sqrt(a)):n.set(0,0,0)}static getBarycoord(e,t,i,n,a){yl.subVectors(n,t),pc.subVectors(i,t),DB.subVectors(e,t);let o=yl.dot(yl),s=yl.dot(pc),l=yl.dot(DB),u=pc.dot(pc),c=pc.dot(DB),f=o*u-s*s;if(f===0)return a.set(0,0,0),null;let h=1/f,p=(u*l-s*c)*h,d=(o*c-s*l)*h;return a.set(1-p-d,d,p)}static containsPoint(e,t,i,n){return this.getBarycoord(e,t,i,n,dc)===null?!1:dc.x>=0&&dc.y>=0&&dc.x+dc.y<=1}static getInterpolation(e,t,i,n,a,o,s,l){return this.getBarycoord(e,t,i,n,dc)===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(a,dc.x),l.addScaledVector(o,dc.y),l.addScaledVector(s,dc.z),l)}static isFrontFacing(e,t,i,n){return yl.subVectors(i,t),pc.subVectors(e,t),yl.cross(pc).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),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 yl.subVectors(this.c,this.b),pc.subVectors(this.a,this.b),yl.cross(pc).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return r.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return r.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,n,a){return r.getInterpolation(e,this.a,this.b,this.c,t,i,n,a)}containsPoint(e){return r.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return r.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,n=this.b,a=this.c,o,s;Xy.subVectors(n,i),Yy.subVectors(a,i),IB.subVectors(e,i);let l=Xy.dot(IB),u=Yy.dot(IB);if(l<=0&&u<=0)return t.copy(i);NB.subVectors(e,n);let c=Xy.dot(NB),f=Yy.dot(NB);if(c>=0&&f<=c)return t.copy(n);let h=l*f-c*u;if(h<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(i).addScaledVector(Xy,o);UB.subVectors(e,a);let p=Xy.dot(UB),d=Yy.dot(UB);if(d>=0&&p<=d)return t.copy(a);let g=p*u-l*d;if(g<=0&&u>=0&&d<=0)return s=u/(u-d),t.copy(i).addScaledVector(Yy,s);let m=c*d-p*f;if(m<=0&&f-c>=0&&p-d>=0)return eoe.subVectors(a,n),s=(f-c)/(f-c+(p-d)),t.copy(n).addScaledVector(eoe,s);let v=1/(m+g+h);return o=g*v,s=h*v,t.copy(i).addScaledVector(Xy,o).addScaledVector(Yy,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},tse={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},Ch={h:0,s:0,l:0},OC={h:0,s:0,l:0};function OB(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}var er=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){let n=e;n&&n.isColor?this.copy(n):typeof n=="number"?this.setHex(n):typeof n=="string"&&this.setStyle(n)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ma){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Jr.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=Jr.workingColorSpace){return this.r=e,this.g=t,this.b=i,Jr.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=Jr.workingColorSpace){if(e=Fk(e,1),t=In(t,0,1),i=In(i,0,1),t===0)this.r=this.g=this.b=i;else{let a=i<=.5?i*(1+t):i+t-i*t,o=2*i-a;this.r=OB(o,a,e+1/3),this.g=OB(o,a,e),this.b=OB(o,a,e-1/3)}return Jr.toWorkingColorSpace(this,n),this}setStyle(e,t=Ma){function i(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let a,o=n[1],s=n[2];switch(o){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setRGB(Math.min(255,parseInt(a[1],10))/255,Math.min(255,parseInt(a[2],10))/255,Math.min(255,parseInt(a[3],10))/255,t);if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setRGB(Math.min(100,parseInt(a[1],10))/100,Math.min(100,parseInt(a[2],10))/100,Math.min(100,parseInt(a[3],10))/100,t);break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return i(a[4]),this.setHSL(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){let a=n[1],o=a.length;if(o===3)return this.setRGB(parseInt(a.charAt(0),16)/15,parseInt(a.charAt(1),16)/15,parseInt(a.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(a,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ma){let i=tse[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=o0(e.r),this.g=o0(e.g),this.b=o0(e.b),this}copyLinearToSRGB(e){return this.r=MB(e.r),this.g=MB(e.g),this.b=MB(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ma){return Jr.fromWorkingColorSpace(ra.copy(this),e),Math.round(In(ra.r*255,0,255))*65536+Math.round(In(ra.g*255,0,255))*256+Math.round(In(ra.b*255,0,255))}getHexString(e=Ma){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Jr.workingColorSpace){Jr.fromWorkingColorSpace(ra.copy(this),t);let i=ra.r,n=ra.g,a=ra.b,o=Math.max(i,n,a),s=Math.min(i,n,a),l,u,c=(s+o)/2;if(s===o)l=0,u=0;else{let f=o-s;switch(u=c<=.5?f/(o+s):f/(2-o-s),o){case i:l=(n-a)/f+(n0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}let n=this[t];if(n===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==a0&&(i.blending=this.blending),this.side!==Uh&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==KB&&(i.blendSrc=this.blendSrc),this.blendDst!==JB&&(i.blendDst=this.blendDst),this.blendEquation!==um&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==eR&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==kae&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==zy&&(i.stencilFail=this.stencilFail),this.stencilZFail!==zy&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==zy&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function n(a){let o=[];for(let s in a){let l=a[s];delete l.metadata,o.push(l)}return o}if(t){let a=n(e.textures),o=n(e.images);a.length>0&&(i.textures=a),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let n=t.length;i=new Array(n);for(let a=0;a!==n;++a)i[a]=t[a].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},hR=class extends Mc{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new er(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 Fn,this.combine=NR,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 Hi=new ye,FC=new yr,Cs=class{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Vae,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=hu,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return JPe("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,a=this.itemSize;n0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let l in i){let u=i[l];e.data.attributes[l]=u.toJSON(e.data)}let n={},a=!1;for(let l in this.morphAttributes){let u=this.morphAttributes[l],c=[];for(let f=0,h=u.length;f0&&(n[l]=c,a=!0)}a&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));let s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone(t));let n=e.attributes;for(let u in n){let c=n[u];this.setAttribute(u,c.clone(t))}let a=e.morphAttributes;for(let u in a){let c=[],f=a[u];for(let h=0,p=f.length;h0){let n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=n.length;a(e.far-e.near)**2))&&(toe.copy(a).invert(),nm.copy(e.ray).applyMatrix4(toe),!(i.boundingBox!==null&&nm.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,nm)))}_computeIntersections(e,t,i){let n,a=this.geometry,o=this.material,s=a.index,l=a.attributes.position,u=a.attributes.uv,c=a.attributes.uv1,f=a.attributes.normal,h=a.groups,p=a.drawRange;if(s!==null)if(Array.isArray(o))for(let d=0,g=h.length;dt.far?null:{distance:u,point:WC.clone(),object:r}}function XC(r,e,t,i,n,a,o,s,l,u){r.getVertexPosition(s,Zy),r.getVertexPosition(l,jy),r.getVertexPosition(u,Ky);let c=fDe(r,e,t,i,Zy,jy,Ky,HC);if(c){n&&(kC.fromBufferAttribute(n,s),VC.fromBufferAttribute(n,l),GC.fromBufferAttribute(n,u),c.uv=t0.getInterpolation(HC,Zy,jy,Ky,kC,VC,GC,new yr)),a&&(kC.fromBufferAttribute(a,s),VC.fromBufferAttribute(a,l),GC.fromBufferAttribute(a,u),c.uv1=t0.getInterpolation(HC,Zy,jy,Ky,kC,VC,GC,new yr)),o&&(ioe.fromBufferAttribute(o,s),noe.fromBufferAttribute(o,l),aoe.fromBufferAttribute(o,u),c.normal=t0.getInterpolation(HC,Zy,jy,Ky,ioe,noe,aoe,new ye),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));let f={a:s,b:l,c:u,normal:new ye,materialIndex:0};t0.getNormal(Zy,jy,Ky,f.normal),c.face=f}return c}var NM=class r extends Rs{constructor(e=1,t=1,i=1,n=1,a=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:a,depthSegments:o};let s=this;n=Math.floor(n),a=Math.floor(a),o=Math.floor(o);let l=[],u=[],c=[],f=[],h=0,p=0;d("z","y","x",-1,-1,i,t,e,o,a,0),d("z","y","x",1,-1,i,t,-e,o,a,1),d("x","z","y",1,1,e,i,t,n,o,2),d("x","z","y",1,-1,e,i,-t,n,o,3),d("x","y","z",1,-1,e,t,i,n,a,4),d("x","y","z",-1,-1,e,t,-i,n,a,5),this.setIndex(l),this.setAttribute("position",new Un(u,3)),this.setAttribute("normal",new Un(c,3)),this.setAttribute("uv",new Un(f,2));function d(g,m,v,_,y,x,M,S,w,T,C){let b=x/w,E=M/T,I=x/2,R=M/2,A=S/2,D=w+1,U=T+1,B=0,F=0,k=new ye;for(let G=0;G0?1:-1,c.push(k.x,k.y,k.z),f.push(J/w),f.push(1-G/T),B+=1}}for(let G=0;G0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let i={};for(let n in this.extensions)this.extensions[n]===!0&&(i[n]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}},dR=class extends ia{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ht,this.projectionMatrix=new Ht,this.projectionMatrixInverse=new Ht,this.coordinateSystem=_c}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}},Rh=new ye,ooe=new yr,soe=new yr,Nn=class extends dR{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=h0*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(AM*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return h0*2*Math.atan(Math.tan(AM*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){Rh.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Rh.x,Rh.y).multiplyScalar(-e/Rh.z),Rh.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Rh.x,Rh.y).multiplyScalar(-e/Rh.z)}getViewSize(e,t){return this.getViewBounds(e,ooe,soe),t.subVectors(soe,ooe)}setViewOffset(e,t,i,n,a,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(AM*.5*this.fov)/this.zoom,i=2*t,n=this.aspect*i,a=-.5*n,o=this.view;if(this.view!==null&&this.view.enabled){let l=o.fullWidth,u=o.fullHeight;a+=o.offsetX*n/l,t-=o.offsetY*i/u,n*=o.width/l,i*=o.height/u}let s=this.filmOffset;s!==0&&(a+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},Jy=-90,$y=1,nk=class extends ia{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;let n=new Nn(Jy,$y,e,t);n.layers=this.layers,this.add(n);let a=new Nn(Jy,$y,e,t);a.layers=this.layers,this.add(a);let o=new Nn(Jy,$y,e,t);o.layers=this.layers,this.add(o);let s=new Nn(Jy,$y,e,t);s.layers=this.layers,this.add(s);let l=new Nn(Jy,$y,e,t);l.layers=this.layers,this.add(l);let u=new Nn(Jy,$y,e,t);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[i,n,a,o,s,l]=t;for(let u of t)this.remove(u);if(e===_c)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),a.up.set(0,0,-1),a.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===oR)i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),a.up.set(0,0,1),a.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let u of t)this.add(u),u.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:i,activeMipmapLevel:n}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[a,o,s,l,u,c]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),d=e.xr.enabled;e.xr.enabled=!1;let g=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,n),e.render(t,a),e.setRenderTarget(i,1,n),e.render(t,o),e.setRenderTarget(i,2,n),e.render(t,s),e.setRenderTarget(i,3,n),e.render(t,l),e.setRenderTarget(i,4,n),e.render(t,u),i.texture.generateMipmaps=g,e.setRenderTarget(i,5,n),e.render(t,c),e.setRenderTarget(f,h,p),e.xr.enabled=d,i.texture.needsPMREMUpdate=!0}},mR=class extends Vo{constructor(e,t,i,n,a,o,s,l,u,c){e=e!==void 0?e:[],t=t!==void 0?t:l0,super(e,t,i,n,a,o,s,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},ak=class extends Sc{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let i={width:e,height:e,depth:1},n=[i,i,i,i,i,i];this.texture=new mR(n,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:ao}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let i={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},n=new NM(5,5,5),a=new pu({name:"CubemapFromEquirect",uniforms:d0(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:lo,blending:Dh});a.uniforms.tEquirect.value=t;let o=new so(n,a),s=t.minFilter;return t.minFilter===fm&&(t.minFilter=ao),new nk(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,n){let a=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,n);e.setRenderTarget(a)}},BB=new ye,vDe=new ye,gDe=new dr,gc=class{constructor(e=new ye(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let n=BB.subVectors(i,t).cross(vDe.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){let i=e.delta(BB),n=this.normal.dot(i);if(n===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let a=-(e.start.dot(this.normal)+this.constant)/n;return a<0||a>1?null:t.copy(e.start).addScaledVector(i,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let i=t||gDe.getNormalMatrix(e),n=this.coplanarPoint(BB).applyMatrix4(e),a=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(a),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},am=new zh,YC=new ye,UM=class{constructor(e=new gc,t=new gc,i=new gc,n=new gc,a=new gc,o=new gc){this.planes=[e,t,i,n,a,o]}set(e,t,i,n,a,o){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(i),s[3].copy(n),s[4].copy(a),s[5].copy(o),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=_c){let i=this.planes,n=e.elements,a=n[0],o=n[1],s=n[2],l=n[3],u=n[4],c=n[5],f=n[6],h=n[7],p=n[8],d=n[9],g=n[10],m=n[11],v=n[12],_=n[13],y=n[14],x=n[15];if(i[0].setComponents(l-a,h-u,m-p,x-v).normalize(),i[1].setComponents(l+a,h+u,m+p,x+v).normalize(),i[2].setComponents(l+o,h+c,m+d,x+_).normalize(),i[3].setComponents(l-o,h-c,m-d,x-_).normalize(),i[4].setComponents(l-s,h-f,m-g,x-y).normalize(),t===_c)i[5].setComponents(l+s,h+f,m+g,x+y).normalize();else if(t===oR)i[5].setComponents(s,f,g,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),am.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),am.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(am)}intersectsSprite(e){return am.center.set(0,0,0),am.radius=.7071067811865476,am.applyMatrix4(e.matrixWorld),this.intersectsSphere(am)}intersectsSphere(e){let t=this.planes,i=e.center,n=-e.radius;for(let a=0;a<6;a++)if(t[a].distanceToPoint(i)0?e.max.x:e.min.x,YC.y=n.normal.y>0?e.max.y:e.min.y,YC.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(YC)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function ise(){let r=null,e=!1,t=null,i=null;function n(a,o){t(a,o),i=r.requestAnimationFrame(n)}return{start:function(){e!==!0&&t!==null&&(i=r.requestAnimationFrame(n),e=!0)},stop:function(){r.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(a){t=a},setContext:function(a){r=a}}}function yDe(r,e){let t=e.isWebGL2,i=new WeakMap;function n(u,c){let f=u.array,h=u.usage,p=f.byteLength,d=r.createBuffer();r.bindBuffer(c,d),r.bufferData(c,f,h),u.onUploadCallback();let g;if(f instanceof Float32Array)g=r.FLOAT;else if(f instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(t)g=r.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=r.UNSIGNED_SHORT;else if(f instanceof Int16Array)g=r.SHORT;else if(f instanceof Uint32Array)g=r.UNSIGNED_INT;else if(f instanceof Int32Array)g=r.INT;else if(f instanceof Int8Array)g=r.BYTE;else if(f instanceof Uint8Array)g=r.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)g=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:d,type:g,bytesPerElement:f.BYTES_PER_ELEMENT,version:u.version,size:p}}function a(u,c,f){let h=c.array,p=c._updateRange,d=c.updateRanges;if(r.bindBuffer(f,u),p.count===-1&&d.length===0&&r.bufferSubData(f,0,h),d.length!==0){for(let g=0,m=d.length;g 0 + vec4 plane; + #ifdef ALPHA_TO_COVERAGE + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + if ( clipOpacity == 0.0 ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + float unionClipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + } + #pragma unroll_loop_end + clipOpacity *= 1.0 - unionClipOpacity; + #endif + diffuseColor.a *= clipOpacity; + if ( diffuseColor.a == 0.0 ) discard; + #else + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif + #endif +#endif`,UDe=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,ODe=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,FDe=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,zDe=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,BDe=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,kDe=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + varying vec3 vColor; +#endif`,VDe=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif`,GDe=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +#ifdef USE_ALPHAHASH + varying vec3 vPosition; +#endif +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +float luminance( const in vec3 rgb ) { + const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); + return dot( weights, rgb ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,HDe=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,WDe=`vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + vec3 transformedTangent = objectTangent; +#endif +#ifdef USE_BATCHING + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = bm * transformedTangent; + #endif +#endif +#ifdef USE_INSTANCING + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = im * transformedTangent; + #endif +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,XDe=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,YDe=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,qDe=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,ZDe=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,jDe="gl_FragColor = linearToOutputTexel( gl_FragColor );",KDe=` +const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( + vec3( 0.8224621, 0.177538, 0.0 ), + vec3( 0.0331941, 0.9668058, 0.0 ), + vec3( 0.0170827, 0.0723974, 0.9105199 ) +); +const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( + vec3( 1.2249401, - 0.2249404, 0.0 ), + vec3( - 0.0420569, 1.0420571, 0.0 ), + vec3( - 0.0196376, - 0.0786361, 1.0982735 ) +); +vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { + return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); +} +vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { + return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); +} +vec4 LinearTransferOETF( in vec4 value ) { + return value; +} +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +} +vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 LinearTosRGB( in vec4 value ) { + return sRGBTransferOETF( value ); +}`,JDe=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,$De=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform mat3 envMapRotation; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,QDe=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,e2e=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,t2e=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,r2e=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,i2e=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,n2e=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,a2e=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,o2e=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,s2e=`#ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + reflectedLight.indirectDiffuse += lightMapIrradiance; +#endif`,l2e=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,u2e=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,c2e=`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,f2e=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +#if defined( USE_LIGHT_PROBES ) + uniform vec3 lightProbe[ 9 ]; +#endif +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + #if defined ( LEGACY_LIGHTS ) + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + } + return 1.0; + #else + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; + #endif +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometryPosition; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometryPosition; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,h2e=`#ifdef USE_ENVMAP + vec3 getIBLIrradiance( const in vec3 normal ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_ANISOTROPY + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #endif +#endif`,p2e=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,d2e=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,m2e=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,v2e=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,g2e=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif +#ifdef USE_ANISOTROPY + #ifdef USE_ANISOTROPYMAP + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + #else + vec2 anisotropyV = anisotropyVector; + #endif + material.anisotropy = length( anisotropyV ); + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); + material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; + material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; +#endif`,y2e=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif +}; +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_ANISOTROPY + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + return saturate(v); + } + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + } +#endif +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + #ifdef USE_ANISOTROPY + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + #else + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + #endif + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,_2e=` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +vec3 geometryClearcoatNormal = vec3( 0.0 ); +#ifdef USE_CLEARCOAT + geometryClearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometryPosition, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometryPosition, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #if defined( USE_LIGHT_PROBES ) + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,x2e=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + #ifdef USE_ANISOTROPY + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,S2e=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); +#endif`,M2e=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,b2e=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,w2e=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + varying float vIsPerspective; + #else + uniform float logDepthBufFC; + #endif +#endif`,T2e=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + #else + if ( isPerspectiveMatrix( projectionMatrix ) ) { + gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; + gl_Position.z *= gl_Position.w; + } + #endif +#endif`,E2e=`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); + + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,A2e=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,C2e=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,R2e=`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,L2e=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,P2e=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,D2e=`#ifdef USE_INSTANCING_MORPH + float morphTargetInfluences[MORPHTARGETS_COUNT]; + float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; + } +#endif`,I2e=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,N2e=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } + #else + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + #endif +#endif`,U2e=`#ifdef USE_MORPHTARGETS + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetBaseInfluence; + #endif + #ifdef MORPHTARGETS_TEXTURE + #ifndef USE_INSTANCING_MORPH + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + #endif + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } + #else + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif + #endif +#endif`,O2e=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } + #else + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + #endif + #endif +#endif`,F2e=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 nonPerturbedNormal = normal;`,z2e=`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,B2e=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,k2e=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,V2e=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,G2e=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,H2e=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,W2e=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,X2e=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,Y2e=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,q2e=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Z2e=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +vec2 packDepthToRG( in highp float v ) { + return packDepthToRGBA( v ).yx; +} +float unpackRGToDepth( const in highp vec2 v ) { + return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); +} +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,j2e=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,K2e=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_BATCHING + mvPosition = batchingMatrix * mvPosition; +#endif +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,$2e=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,Q2e=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,eIe=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,tIe=`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return shadow; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + vec3 lightToPosition = shadowCoord.xyz; + float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } +#endif`,rIe=`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,iIe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,nIe=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,aIe=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,oIe=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + mat4 getBoneMatrix( const in float i ) { + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + return mat4( v1, v2, v3, v4 ); + } +#endif`,sIe=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,lIe=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,uIe=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,cIe=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,fIe=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,hIe=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return saturate( toneMappingExposure * color ); +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); +vec3 agxDefaultContrastApprox( vec3 x ) { + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} +vec3 AgXToneMapping( vec3 color ) { + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; + color *= toneMappingExposure; + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + color = AgXInsetMatrix * color; + color = max( color, 1e-10 ); color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + color = clamp( color, 0.0, 1.0 ); + color = agxDefaultContrastApprox( color ); + color = AgXOutsetMatrix * color; + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + color = clamp( color, 0.0, 1.0 ); + return color; +} +vec3 NeutralToneMapping( vec3 color ) { + float startCompression = 0.8 - 0.04; + float desaturation = 0.15; + color *= toneMappingExposure; + float x = min(color.r, min(color.g, color.b)); + float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; + color -= offset; + float peak = max(color.r, max(color.g, color.b)); + if (peak < startCompression) return color; + float d = 1. - startCompression; + float newPeak = 1. - d * d / (peak + d - startCompression); + color *= newPeak / peak; + float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.); + return mix(color, vec3(1, 1, 1), g); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,pIe=`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); +#endif`,dIe=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return vec3( 1.0 ); + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + } +#endif`,mIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,vIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,gIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ANISOTROPYMAP + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,yIe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_BATCHING + worldPosition = batchingMatrix * worldPosition; + #endif + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`,_Ie=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,xIe=`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,SIe=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,MIe=`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +uniform mat3 backgroundRotation; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,bIe=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,wIe=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,TIe=`#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,EIe=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #endif +}`,AIe=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,CIe=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +#include +void main () { + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,RIe=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,LIe=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,PIe=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,DIe=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,IIe=`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,NIe=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,UIe=`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,OIe=`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,FIe=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,zIe=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,BIe=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,kIe=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,VIe=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,GIe=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,HIe=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,WIe=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,XIe=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,YIe=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,qIe=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,ZIe=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,jIe=`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,KIe=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,JIe=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,$Ie=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,vr={alphahash_fragment:_De,alphahash_pars_fragment:xDe,alphamap_fragment:SDe,alphamap_pars_fragment:MDe,alphatest_fragment:bDe,alphatest_pars_fragment:wDe,aomap_fragment:TDe,aomap_pars_fragment:EDe,batching_pars_vertex:ADe,batching_vertex:CDe,begin_vertex:RDe,beginnormal_vertex:LDe,bsdfs:PDe,iridescence_fragment:DDe,bumpmap_pars_fragment:IDe,clipping_planes_fragment:NDe,clipping_planes_pars_fragment:UDe,clipping_planes_pars_vertex:ODe,clipping_planes_vertex:FDe,color_fragment:zDe,color_pars_fragment:BDe,color_pars_vertex:kDe,color_vertex:VDe,common:GDe,cube_uv_reflection_fragment:HDe,defaultnormal_vertex:WDe,displacementmap_pars_vertex:XDe,displacementmap_vertex:YDe,emissivemap_fragment:qDe,emissivemap_pars_fragment:ZDe,colorspace_fragment:jDe,colorspace_pars_fragment:KDe,envmap_fragment:JDe,envmap_common_pars_fragment:$De,envmap_pars_fragment:QDe,envmap_pars_vertex:e2e,envmap_physical_pars_fragment:h2e,envmap_vertex:t2e,fog_vertex:r2e,fog_pars_vertex:i2e,fog_fragment:n2e,fog_pars_fragment:a2e,gradientmap_pars_fragment:o2e,lightmap_fragment:s2e,lightmap_pars_fragment:l2e,lights_lambert_fragment:u2e,lights_lambert_pars_fragment:c2e,lights_pars_begin:f2e,lights_toon_fragment:p2e,lights_toon_pars_fragment:d2e,lights_phong_fragment:m2e,lights_phong_pars_fragment:v2e,lights_physical_fragment:g2e,lights_physical_pars_fragment:y2e,lights_fragment_begin:_2e,lights_fragment_maps:x2e,lights_fragment_end:S2e,logdepthbuf_fragment:M2e,logdepthbuf_pars_fragment:b2e,logdepthbuf_pars_vertex:w2e,logdepthbuf_vertex:T2e,map_fragment:E2e,map_pars_fragment:A2e,map_particle_fragment:C2e,map_particle_pars_fragment:R2e,metalnessmap_fragment:L2e,metalnessmap_pars_fragment:P2e,morphinstance_vertex:D2e,morphcolor_vertex:I2e,morphnormal_vertex:N2e,morphtarget_pars_vertex:U2e,morphtarget_vertex:O2e,normal_fragment_begin:F2e,normal_fragment_maps:z2e,normal_pars_fragment:B2e,normal_pars_vertex:k2e,normal_vertex:V2e,normalmap_pars_fragment:G2e,clearcoat_normal_fragment_begin:H2e,clearcoat_normal_fragment_maps:W2e,clearcoat_pars_fragment:X2e,iridescence_pars_fragment:Y2e,opaque_fragment:q2e,packing:Z2e,premultiplied_alpha_fragment:j2e,project_vertex:K2e,dithering_fragment:J2e,dithering_pars_fragment:$2e,roughnessmap_fragment:Q2e,roughnessmap_pars_fragment:eIe,shadowmap_pars_fragment:tIe,shadowmap_pars_vertex:rIe,shadowmap_vertex:iIe,shadowmask_pars_fragment:nIe,skinbase_vertex:aIe,skinning_pars_vertex:oIe,skinning_vertex:sIe,skinnormal_vertex:lIe,specularmap_fragment:uIe,specularmap_pars_fragment:cIe,tonemapping_fragment:fIe,tonemapping_pars_fragment:hIe,transmission_fragment:pIe,transmission_pars_fragment:dIe,uv_pars_fragment:mIe,uv_pars_vertex:vIe,uv_vertex:gIe,worldpos_vertex:yIe,background_vert:_Ie,background_frag:xIe,backgroundCube_vert:SIe,backgroundCube_frag:MIe,cube_vert:bIe,cube_frag:wIe,depth_vert:TIe,depth_frag:EIe,distanceRGBA_vert:AIe,distanceRGBA_frag:CIe,equirect_vert:RIe,equirect_frag:LIe,linedashed_vert:PIe,linedashed_frag:DIe,meshbasic_vert:IIe,meshbasic_frag:NIe,meshlambert_vert:UIe,meshlambert_frag:OIe,meshmatcap_vert:FIe,meshmatcap_frag:zIe,meshnormal_vert:BIe,meshnormal_frag:kIe,meshphong_vert:VIe,meshphong_frag:GIe,meshphysical_vert:HIe,meshphysical_frag:WIe,meshtoon_vert:XIe,meshtoon_frag:YIe,points_vert:qIe,points_frag:ZIe,shadow_vert:jIe,shadow_frag:KIe,sprite_vert:JIe,sprite_frag:$Ie},yt={common:{diffuse:{value:new er(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new dr},alphaMap:{value:null},alphaMapTransform:{value:new dr},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new dr}},envmap:{envMap:{value:null},envMapRotation:{value:new dr},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new dr}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new dr}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new dr},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new dr},normalScale:{value:new yr(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new dr},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new dr}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new dr}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new dr}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new er(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new er(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new dr},alphaTest:{value:0},uvTransform:{value:new dr}},sprite:{diffuse:{value:new er(16777215)},opacity:{value:1},center:{value:new yr(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new dr},alphaMap:{value:null},alphaMapTransform:{value:new dr},alphaTest:{value:0}}},fu={basic:{uniforms:Sa([yt.common,yt.specularmap,yt.envmap,yt.aomap,yt.lightmap,yt.fog]),vertexShader:vr.meshbasic_vert,fragmentShader:vr.meshbasic_frag},lambert:{uniforms:Sa([yt.common,yt.specularmap,yt.envmap,yt.aomap,yt.lightmap,yt.emissivemap,yt.bumpmap,yt.normalmap,yt.displacementmap,yt.fog,yt.lights,{emissive:{value:new er(0)}}]),vertexShader:vr.meshlambert_vert,fragmentShader:vr.meshlambert_frag},phong:{uniforms:Sa([yt.common,yt.specularmap,yt.envmap,yt.aomap,yt.lightmap,yt.emissivemap,yt.bumpmap,yt.normalmap,yt.displacementmap,yt.fog,yt.lights,{emissive:{value:new er(0)},specular:{value:new er(1118481)},shininess:{value:30}}]),vertexShader:vr.meshphong_vert,fragmentShader:vr.meshphong_frag},standard:{uniforms:Sa([yt.common,yt.envmap,yt.aomap,yt.lightmap,yt.emissivemap,yt.bumpmap,yt.normalmap,yt.displacementmap,yt.roughnessmap,yt.metalnessmap,yt.fog,yt.lights,{emissive:{value:new er(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vr.meshphysical_vert,fragmentShader:vr.meshphysical_frag},toon:{uniforms:Sa([yt.common,yt.aomap,yt.lightmap,yt.emissivemap,yt.bumpmap,yt.normalmap,yt.displacementmap,yt.gradientmap,yt.fog,yt.lights,{emissive:{value:new er(0)}}]),vertexShader:vr.meshtoon_vert,fragmentShader:vr.meshtoon_frag},matcap:{uniforms:Sa([yt.common,yt.bumpmap,yt.normalmap,yt.displacementmap,yt.fog,{matcap:{value:null}}]),vertexShader:vr.meshmatcap_vert,fragmentShader:vr.meshmatcap_frag},points:{uniforms:Sa([yt.points,yt.fog]),vertexShader:vr.points_vert,fragmentShader:vr.points_frag},dashed:{uniforms:Sa([yt.common,yt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vr.linedashed_vert,fragmentShader:vr.linedashed_frag},depth:{uniforms:Sa([yt.common,yt.displacementmap]),vertexShader:vr.depth_vert,fragmentShader:vr.depth_frag},normal:{uniforms:Sa([yt.common,yt.bumpmap,yt.normalmap,yt.displacementmap,{opacity:{value:1}}]),vertexShader:vr.meshnormal_vert,fragmentShader:vr.meshnormal_frag},sprite:{uniforms:Sa([yt.sprite,yt.fog]),vertexShader:vr.sprite_vert,fragmentShader:vr.sprite_frag},background:{uniforms:{uvTransform:{value:new dr},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vr.background_vert,fragmentShader:vr.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new dr}},vertexShader:vr.backgroundCube_vert,fragmentShader:vr.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vr.cube_vert,fragmentShader:vr.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vr.equirect_vert,fragmentShader:vr.equirect_frag},distanceRGBA:{uniforms:Sa([yt.common,yt.displacementmap,{referencePosition:{value:new ye},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vr.distanceRGBA_vert,fragmentShader:vr.distanceRGBA_frag},shadow:{uniforms:Sa([yt.lights,yt.fog,{color:{value:new er(0)},opacity:{value:1}}]),vertexShader:vr.shadow_vert,fragmentShader:vr.shadow_frag}};fu.physical={uniforms:Sa([fu.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new dr},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new dr},clearcoatNormalScale:{value:new yr(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new dr},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new dr},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new dr},sheen:{value:0},sheenColor:{value:new er(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new dr},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new dr},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new dr},transmissionSamplerSize:{value:new yr},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new dr},attenuationDistance:{value:0},attenuationColor:{value:new er(0)},specularColor:{value:new er(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new dr},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new dr},anisotropyVector:{value:new yr},anisotropyMap:{value:null},anisotropyMapTransform:{value:new dr}}]),vertexShader:vr.meshphysical_vert,fragmentShader:vr.meshphysical_frag};var qC={r:0,b:0,g:0},om=new Fn,QIe=new Ht;function eNe(r,e,t,i,n,a,o){let s=new er(0),l=a===!0?0:1,u,c,f=null,h=0,p=null;function d(m,v){let _=!1,y=v.isScene===!0?v.background:null;y&&y.isTexture&&(y=(v.backgroundBlurriness>0?t:e).get(y)),y===null?g(s,l):y&&y.isColor&&(g(y,1),_=!0);let x=r.xr.getEnvironmentBlendMode();x==="additive"?i.buffers.color.setClear(0,0,0,1,o):x==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(r.autoClear||_)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),y&&(y.isCubeTexture||y.mapping===UR)?(c===void 0&&(c=new so(new NM(1,1,1),new pu({name:"BackgroundCubeMaterial",uniforms:d0(fu.backgroundCube.uniforms),vertexShader:fu.backgroundCube.vertexShader,fragmentShader:fu.backgroundCube.fragmentShader,side:lo,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(M,S,w){this.matrixWorld.copyPosition(w.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(c)),om.copy(v.backgroundRotation),om.x*=-1,om.y*=-1,om.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&(om.y*=-1,om.z*=-1),c.material.uniforms.envMap.value=y,c.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.uniforms.backgroundRotation.value.setFromMatrix4(QIe.makeRotationFromEuler(om)),c.material.toneMapped=Jr.getTransfer(y.colorSpace)!==ai,(f!==y||h!==y.version||p!==r.toneMapping)&&(c.material.needsUpdate=!0,f=y,h=y.version,p=r.toneMapping),c.layers.enableAll(),m.unshift(c,c.geometry,c.material,0,0,null)):y&&y.isTexture&&(u===void 0&&(u=new so(new vR(2,2),new pu({name:"BackgroundMaterial",uniforms:d0(fu.background.uniforms),vertexShader:fu.background.vertexShader,fragmentShader:fu.background.fragmentShader,side:Uh,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(u)),u.material.uniforms.t2D.value=y,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=Jr.getTransfer(y.colorSpace)!==ai,y.matrixAutoUpdate===!0&&y.updateMatrix(),u.material.uniforms.uvTransform.value.copy(y.matrix),(f!==y||h!==y.version||p!==r.toneMapping)&&(u.material.needsUpdate=!0,f=y,h=y.version,p=r.toneMapping),u.layers.enableAll(),m.unshift(u,u.geometry,u.material,0,0,null))}function g(m,v){m.getRGB(qC,rse(r)),i.buffers.color.setClear(qC.r,qC.g,qC.b,v,o)}return{getClearColor:function(){return s},setClearColor:function(m,v=1){s.set(m),l=v,g(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(m){l=m,g(s,l)},render:d}}function tNe(r,e,t,i){let n=r.getParameter(r.MAX_VERTEX_ATTRIBS),a=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||a!==null,s={},l=m(null),u=l,c=!1;function f(A,D,U,B,F){let k=!1;if(o){let G=g(B,U,D);u!==G&&(u=G,p(u.object)),k=v(A,B,U,F),k&&_(A,B,U,F)}else{let G=D.wireframe===!0;(u.geometry!==B.id||u.program!==U.id||u.wireframe!==G)&&(u.geometry=B.id,u.program=U.id,u.wireframe=G,k=!0)}F!==null&&t.update(F,r.ELEMENT_ARRAY_BUFFER),(k||c)&&(c=!1,T(A,D,U,B),F!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.get(F).buffer))}function h(){return i.isWebGL2?r.createVertexArray():a.createVertexArrayOES()}function p(A){return i.isWebGL2?r.bindVertexArray(A):a.bindVertexArrayOES(A)}function d(A){return i.isWebGL2?r.deleteVertexArray(A):a.deleteVertexArrayOES(A)}function g(A,D,U){let B=U.wireframe===!0,F=s[A.id];F===void 0&&(F={},s[A.id]=F);let k=F[D.id];k===void 0&&(k={},F[D.id]=k);let G=k[B];return G===void 0&&(G=m(h()),k[B]=G),G}function m(A){let D=[],U=[],B=[];for(let F=0;F=0){let V=F[J],K=k[J];if(K===void 0&&(J==="instanceMatrix"&&A.instanceMatrix&&(K=A.instanceMatrix),J==="instanceColor"&&A.instanceColor&&(K=A.instanceColor)),V===void 0||V.attribute!==K||K&&V.data!==K.data)return!0;G++}return u.attributesNum!==G||u.index!==B}function _(A,D,U,B){let F={},k=D.attributes,G=0,Y=U.getAttributes();for(let J in Y)if(Y[J].location>=0){let V=k[J];V===void 0&&(J==="instanceMatrix"&&A.instanceMatrix&&(V=A.instanceMatrix),J==="instanceColor"&&A.instanceColor&&(V=A.instanceColor));let K={};K.attribute=V,V&&V.data&&(K.data=V.data),F[J]=K,G++}u.attributes=F,u.attributesNum=G,u.index=B}function y(){let A=u.newAttributes;for(let D=0,U=A.length;D=0){let Q=F[Y];if(Q===void 0&&(Y==="instanceMatrix"&&A.instanceMatrix&&(Q=A.instanceMatrix),Y==="instanceColor"&&A.instanceColor&&(Q=A.instanceColor)),Q!==void 0){let V=Q.normalized,K=Q.itemSize,ae=t.get(Q);if(ae===void 0)continue;let ve=ae.buffer,ue=ae.type,se=ae.bytesPerElement,Ee=i.isWebGL2===!0&&(ue===r.INT||ue===r.UNSIGNED_INT||Q.gpuType===Yoe);if(Q.isInterleavedBufferAttribute){let q=Q.data,H=q.stride,We=Q.offset;if(q.isInstancedInterleavedBuffer){for(let _e=0;_e0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";w="mediump"}return w==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let o=typeof WebGL2RenderingContext<"u"&&r.constructor.name==="WebGL2RenderingContext",s=t.precision!==void 0?t.precision:"highp",l=a(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);let u=o||e.has("WEBGL_draw_buffers"),c=t.logarithmicDepthBuffer===!0,f=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),h=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=r.getParameter(r.MAX_TEXTURE_SIZE),d=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),g=r.getParameter(r.MAX_VERTEX_ATTRIBS),m=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),v=r.getParameter(r.MAX_VARYING_VECTORS),_=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),y=h>0,x=o||e.has("OES_texture_float"),M=y&&x,S=o?r.getParameter(r.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:n,getMaxPrecision:a,precision:s,logarithmicDepthBuffer:c,maxTextures:f,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:d,maxAttributes:g,maxVertexUniforms:m,maxVaryings:v,maxFragmentUniforms:_,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:M,maxSamples:S}}function nNe(r){let e=this,t=null,i=0,n=!1,a=!1,o=new gc,s=new dr,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){let p=f.length!==0||h||i!==0||n;return n=h,i=f.length,p},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(f,h){t=c(f,h,0)},this.setState=function(f,h,p){let d=f.clippingPlanes,g=f.clipIntersection,m=f.clipShadows,v=r.get(f);if(!n||d===null||d.length===0||a&&!m)a?c(null):u();else{let _=a?0:i,y=_*4,x=v.clippingState||null;l.value=x,x=c(d,h,y,p);for(let M=0;M!==y;++M)x[M]=t[M];v.clippingState=x,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function c(f,h,p,d){let g=f!==null?f.length:0,m=null;if(g!==0){if(m=l.value,d!==!0||m===null){let v=p+g*4,_=h.matrixWorldInverse;s.getNormalMatrix(_),(m===null||m.length0){let u=new ak(l.height);return u.fromEquirectangularTexture(r,o),e.set(o,u),o.addEventListener("dispose",n),t(u.texture,o.mapping)}else return null}}return o}function n(o){let s=o.target;s.removeEventListener("dispose",n);let l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function a(){e=new WeakMap}return{get:i,dispose:a}}var m0=class extends dR{constructor(e=-1,t=1,i=1,n=-1,a=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=a,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,a,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,a=i-e,o=i+e,s=n+t,l=n-t;if(this.view!==null&&this.view.enabled){let u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a+=u*this.view.offsetX,o=a+u*this.view.width,s-=c*this.view.offsetY,l=s-c*this.view.height}this.projectionMatrix.makeOrthographic(a,o,s,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}},r0=4,loe=[.125,.215,.35,.446,.526,.582],cm=20,kB=new m0,uoe=new er,VB=null,GB=0,HB=0,lm=(1+Math.sqrt(5))/2,Qy=1/lm,coe=[new ye(1,1,1),new ye(-1,1,1),new ye(1,1,-1),new ye(-1,1,-1),new ye(0,lm,Qy),new ye(0,lm,-Qy),new ye(Qy,0,lm),new ye(-Qy,0,lm),new ye(lm,Qy,0),new ye(-lm,Qy,0)],gR=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,n=100){VB=this._renderer.getRenderTarget(),GB=this._renderer.getActiveCubeFace(),HB=this._renderer.getActiveMipmapLevel(),this._setSize(256);let a=this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(e,i,n,a),t>0&&this._blur(a,0,0,t),this._applyPMREM(a),this._cleanup(a),a}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=poe(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=hoe(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),c.setRenderTarget(n),g&&c.render(d,s),c.render(e,s)}d.geometry.dispose(),d.material.dispose(),c.toneMapping=h,c.autoClear=f,e.background=m}_textureToCubeUV(e,t){let i=this._renderer,n=e.mapping===l0||e.mapping===u0;n?(this._cubemapMaterial===null&&(this._cubemapMaterial=poe()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=hoe());let a=n?this._cubemapMaterial:this._equirectMaterial,o=new so(this._lodPlanes[0],a),s=a.uniforms;s.envMap.value=e;let l=this._cubeSize;ZC(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,kB)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let n=1;ncm&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${cm}`);let v=[],_=0;for(let w=0;wy-r0?n-y+r0:0),S=4*(this._cubeSize-x);ZC(t,M,S,3*x,2*x),l.setRenderTarget(t),l.render(f,kB)}};function oNe(r){let e=[],t=[],i=[],n=r,a=r-r0+1+loe.length;for(let o=0;or-r0?l=loe[o-r+r0-1]:o===0&&(l=0),i.push(l);let u=1/(s-2),c=-u,f=1+u,h=[c,c,f,c,f,f,c,c,f,f,c,f],p=6,d=6,g=3,m=2,v=1,_=new Float32Array(g*d*p),y=new Float32Array(m*d*p),x=new Float32Array(v*d*p);for(let S=0;S2?0:-1,C=[w,T,0,w+2/3,T,0,w+2/3,T+1,0,w,T,0,w+2/3,T+1,0,w,T+1,0];_.set(C,g*d*S),y.set(h,m*d*S);let b=[S,S,S,S,S,S];x.set(b,v*d*S)}let M=new Rs;M.setAttribute("position",new Cs(_,g)),M.setAttribute("uv",new Cs(y,m)),M.setAttribute("faceIndex",new Cs(x,v)),e.push(M),n>r0&&n--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function foe(r,e,t){let i=new Sc(r,e,t);return i.texture.mapping=UR,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function ZC(r,e,t,i,n){r.viewport.set(e,t,i,n),r.scissor.set(e,t,i,n)}function sNe(r,e,t){let i=new Float32Array(cm),n=new ye(0,1,0);return new pu({name:"SphericalGaussianBlur",defines:{n:cm,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n}},vertexShader:zk(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:Dh,depthTest:!1,depthWrite:!1})}function hoe(){return new pu({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:zk(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:Dh,depthTest:!1,depthWrite:!1})}function poe(){return new pu({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:zk(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:Dh,depthTest:!1,depthWrite:!1})}function zk(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function lNe(r){let e=new WeakMap,t=null;function i(s){if(s&&s.isTexture){let l=s.mapping,u=l===LM||l===$B,c=l===l0||l===u0;if(u||c)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let f=e.get(s);return t===null&&(t=new gR(r)),f=u?t.fromEquirectangular(s,f):t.fromCubemap(s,f),e.set(s,f),f.texture}else{if(e.has(s))return e.get(s).texture;{let f=s.image;if(u&&f&&f.height>0||c&&f&&n(f)){t===null&&(t=new gR(r));let h=u?t.fromEquirectangular(s):t.fromCubemap(s);return e.set(s,h),s.addEventListener("dispose",a),h.texture}else return null}}}return s}function n(s){let l=0,u=6;for(let c=0;ce.maxTextureSize&&(C=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);let b=new Float32Array(T*C*4*g),E=new cR(b,T,C,g);E.type=hu,E.needsUpdate=!0;let I=w*4;for(let A=0;A0)return r;let n=e*t,a=doe[n];if(a===void 0&&(a=new Float32Array(n),doe[n]=a),e!==0){i.toArray(a,0);for(let o=1,s=0;o!==e;++o)s+=t,r[o].toArray(a,s)}return a}function sn(r,e){if(r.length!==e.length)return!1;for(let t=0,i=r.length;t":" "} ${s}: ${t[o]}`)}return i.join(` +`)}function sUe(r){let e=Jr.getPrimaries(Jr.workingColorSpace),t=Jr.getPrimaries(r),i;switch(e===t?i="":e===aR&&t===nR?i="LinearDisplayP3ToLinearSRGB":e===nR&&t===aR&&(i="LinearSRGBToLinearDisplayP3"),r){case Hh:case OR:return[i,"LinearTransferOETF"];case Ma:case Ok:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",r),[i,"LinearTransferOETF"]}}function Soe(r,e,t){let i=r.getShaderParameter(e,r.COMPILE_STATUS),n=r.getShaderInfoLog(e).trim();if(i&&n==="")return"";let a=/ERROR: 0:(\d+)/.exec(n);if(a){let o=parseInt(a[1]);return t.toUpperCase()+` + +`+n+` + +`+oUe(r.getShaderSource(e),o)}else return n}function lUe(r,e){let t=sUe(e);return`vec4 ${r}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function uUe(r,e){let t;switch(e){case uPe:t="Linear";break;case cPe:t="Reinhard";break;case fPe:t="OptimizedCineon";break;case hPe:t="ACESFilmic";break;case dPe:t="AgX";break;case mPe:t="Neutral";break;case pPe:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function cUe(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.normalMapTangentSpace||r.clearcoatNormalMap||r.flatShading||r.alphaToCoverage||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(i0).join(` +`)}function fUe(r){return[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(i0).join(` +`)}function hUe(r){let e=[];for(let t in r){let i=r[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` +`)}function pUe(r,e){let t={},i=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES);for(let n=0;n/gm;function uk(r){return r.replace(dUe,vUe)}var mUe=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function vUe(r,e){let t=vr[e];if(t===void 0){let i=mUe.get(e);if(i!==void 0)t=vr[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return uk(t)}var gUe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function woe(r){return r.replace(gUe,yUe)}function yUe(r,e,t,i){let n="";for(let a=parseInt(e);a0&&(v+=` +`),_=[p,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(i0).join(` +`),_.length>0&&(_+=` +`)):(v=[Toe(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(i0).join(` +`),_=[p,Toe(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+c:"",t.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Ih?"#define TONE_MAPPING":"",t.toneMapping!==Ih?vr.tonemapping_pars_fragment:"",t.toneMapping!==Ih?uUe("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",vr.colorspace_pars_fragment,lUe("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(i0).join(` +`)),o=uk(o),o=Moe(o,t),o=boe(o,t),s=uk(s),s=Moe(s,t),s=boe(s,t),o=woe(o),s=woe(s),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(y=`#version 300 es +`,v=[d,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+v,_=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===Gae?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Gae?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+_);let x=y+v+o,M=y+_+s,S=xoe(n,n.VERTEX_SHADER,x),w=xoe(n,n.FRAGMENT_SHADER,M);n.attachShader(m,S),n.attachShader(m,w),t.index0AttributeName!==void 0?n.bindAttribLocation(m,0,t.index0AttributeName):t.morphTargets===!0&&n.bindAttribLocation(m,0,"position"),n.linkProgram(m);function T(I){if(r.debug.checkShaderErrors){let R=n.getProgramInfoLog(m).trim(),A=n.getShaderInfoLog(S).trim(),D=n.getShaderInfoLog(w).trim(),U=!0,B=!0;if(n.getProgramParameter(m,n.LINK_STATUS)===!1)if(U=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(n,m,S,w);else{let F=Soe(n,S,"vertex"),k=Soe(n,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+n.getError()+" - VALIDATE_STATUS "+n.getProgramParameter(m,n.VALIDATE_STATUS)+` + +Material Name: `+I.name+` +Material Type: `+I.type+` + +Program Info Log: `+R+` +`+F+` +`+k)}else R!==""?console.warn("THREE.WebGLProgram: Program Info Log:",R):(A===""||D==="")&&(B=!1);B&&(I.diagnostics={runnable:U,programLog:R,vertexShader:{log:A,prefix:v},fragmentShader:{log:D,prefix:_}})}n.deleteShader(S),n.deleteShader(w),C=new s0(n,m),b=pUe(n,m)}let C;this.getUniforms=function(){return C===void 0&&T(this),C};let b;this.getAttributes=function(){return b===void 0&&T(this),b};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=n.getProgramParameter(m,nUe)),E},this.destroy=function(){i.releaseStatesOfProgram(this),n.deleteProgram(m),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=aUe++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=S,this.fragmentShader=w,this}var TUe=0,ck=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,n=this._getShaderStage(t),a=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(n)===!1&&(o.add(n),n.usedTimes++),o.has(a)===!1&&(o.add(a),a.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){let t=this.shaderCache,i=t.get(e);return i===void 0&&(i=new fk(e),t.set(e,i)),i}},fk=class{constructor(e){this.id=TUe++,this.code=e,this.usedTimes=0}};function EUe(r,e,t,i,n,a,o){let s=new fR,l=new ck,u=new Set,c=[],f=n.isWebGL2,h=n.logarithmicDepthBuffer,p=n.vertexTextures,d=n.precision,g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(b){return u.add(b),b===0?"uv":`uv${b}`}function v(b,E,I,R,A){let D=R.fog,U=A.geometry,B=b.isMeshStandardMaterial?R.environment:null,F=(b.isMeshStandardMaterial?t:e).get(b.envMap||B),k=F&&F.mapping===UR?F.image.height:null,G=g[b.type];b.precision!==null&&(d=n.getMaxPrecision(b.precision),d!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",d,"instead."));let Y=U.morphAttributes.position||U.morphAttributes.normal||U.morphAttributes.color,J=Y!==void 0?Y.length:0,Q=0;U.morphAttributes.position!==void 0&&(Q=1),U.morphAttributes.normal!==void 0&&(Q=2),U.morphAttributes.color!==void 0&&(Q=3);let V,K,ae,ve;if(G){let zt=fu[G];V=zt.vertexShader,K=zt.fragmentShader}else V=b.vertexShader,K=b.fragmentShader,l.update(b),ae=l.getVertexShaderID(b),ve=l.getFragmentShaderID(b);let ue=r.getRenderTarget(),se=A.isInstancedMesh===!0,Ee=A.isBatchedMesh===!0,q=!!b.map,H=!!b.matcap,We=!!F,_e=!!b.aoMap,xe=!!b.lightMap,Le=!!b.bumpMap,Ue=!!b.normalMap,Ne=!!b.displacementMap,Ve=!!b.emissiveMap,ct=!!b.metalnessMap,z=!!b.roughnessMap,L=b.anisotropy>0,ne=b.clearcoat>0,le=b.iridescence>0,me=b.sheen>0,he=b.transmission>0,et=L&&!!b.anisotropyMap,Ke=ne&&!!b.clearcoatMap,Se=ne&&!!b.clearcoatNormalMap,Ae=ne&&!!b.clearcoatRoughnessMap,nt=le&&!!b.iridescenceMap,$=le&&!!b.iridescenceThicknessMap,it=me&&!!b.sheenColorMap,Xe=me&&!!b.sheenRoughnessMap,ze=!!b.specularMap,we=!!b.specularColorMap,Ie=!!b.specularIntensityMap,st=he&&!!b.transmissionMap,Je=he&&!!b.thicknessMap,kt=!!b.gradientMap,X=!!b.alphaMap,Te=b.alphaTest>0,te=!!b.alphaHash,Me=!!b.extensions,Pe=Ih;b.toneMapped&&(ue===null||ue.isXRRenderTarget===!0)&&(Pe=r.toneMapping);let xt={isWebGL2:f,shaderID:G,shaderType:b.type,shaderName:b.name,vertexShader:V,fragmentShader:K,defines:b.defines,customVertexShaderID:ae,customFragmentShaderID:ve,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:d,batching:Ee,instancing:se,instancingColor:se&&A.instanceColor!==null,instancingMorph:se&&A.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:ue===null?r.outputColorSpace:ue.isXRRenderTarget===!0?ue.texture.colorSpace:Hh,alphaToCoverage:!!b.alphaToCoverage,map:q,matcap:H,envMap:We,envMapMode:We&&F.mapping,envMapCubeUVHeight:k,aoMap:_e,lightMap:xe,bumpMap:Le,normalMap:Ue,displacementMap:p&&Ne,emissiveMap:Ve,normalMapObjectSpace:Ue&&b.normalMapType===CPe,normalMapTangentSpace:Ue&&b.normalMapType===Uk,metalnessMap:ct,roughnessMap:z,anisotropy:L,anisotropyMap:et,clearcoat:ne,clearcoatMap:Ke,clearcoatNormalMap:Se,clearcoatRoughnessMap:Ae,iridescence:le,iridescenceMap:nt,iridescenceThicknessMap:$,sheen:me,sheenColorMap:it,sheenRoughnessMap:Xe,specularMap:ze,specularColorMap:we,specularIntensityMap:Ie,transmission:he,transmissionMap:st,thicknessMap:Je,gradientMap:kt,opaque:b.transparent===!1&&b.blending===a0&&b.alphaToCoverage===!1,alphaMap:X,alphaTest:Te,alphaHash:te,combine:b.combine,mapUv:q&&m(b.map.channel),aoMapUv:_e&&m(b.aoMap.channel),lightMapUv:xe&&m(b.lightMap.channel),bumpMapUv:Le&&m(b.bumpMap.channel),normalMapUv:Ue&&m(b.normalMap.channel),displacementMapUv:Ne&&m(b.displacementMap.channel),emissiveMapUv:Ve&&m(b.emissiveMap.channel),metalnessMapUv:ct&&m(b.metalnessMap.channel),roughnessMapUv:z&&m(b.roughnessMap.channel),anisotropyMapUv:et&&m(b.anisotropyMap.channel),clearcoatMapUv:Ke&&m(b.clearcoatMap.channel),clearcoatNormalMapUv:Se&&m(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ae&&m(b.clearcoatRoughnessMap.channel),iridescenceMapUv:nt&&m(b.iridescenceMap.channel),iridescenceThicknessMapUv:$&&m(b.iridescenceThicknessMap.channel),sheenColorMapUv:it&&m(b.sheenColorMap.channel),sheenRoughnessMapUv:Xe&&m(b.sheenRoughnessMap.channel),specularMapUv:ze&&m(b.specularMap.channel),specularColorMapUv:we&&m(b.specularColorMap.channel),specularIntensityMapUv:Ie&&m(b.specularIntensityMap.channel),transmissionMapUv:st&&m(b.transmissionMap.channel),thicknessMapUv:Je&&m(b.thicknessMap.channel),alphaMapUv:X&&m(b.alphaMap.channel),vertexTangents:!!U.attributes.tangent&&(Ue||L),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!U.attributes.color&&U.attributes.color.itemSize===4,pointsUvs:A.isPoints===!0&&!!U.attributes.uv&&(q||X),fog:!!D,useFog:b.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:A.isSkinnedMesh===!0,morphTargets:U.morphAttributes.position!==void 0,morphNormals:U.morphAttributes.normal!==void 0,morphColors:U.morphAttributes.color!==void 0,morphTargetsCount:J,morphTextureStride:Q,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:r.shadowMap.enabled&&I.length>0,shadowMapType:r.shadowMap.type,toneMapping:Pe,useLegacyLights:r._useLegacyLights,decodeVideoTexture:q&&b.map.isVideoTexture===!0&&Jr.getTransfer(b.map.colorSpace)===ai,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===yc,flipSided:b.side===lo,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionDerivatives:Me&&b.extensions.derivatives===!0,extensionFragDepth:Me&&b.extensions.fragDepth===!0,extensionDrawBuffers:Me&&b.extensions.drawBuffers===!0,extensionShaderTextureLOD:Me&&b.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Me&&b.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Me&&b.extensions.multiDraw===!0&&i.has("WEBGL_multi_draw"),rendererExtensionFragDepth:f||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:f||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:f||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return xt.vertexUv1s=u.has(1),xt.vertexUv2s=u.has(2),xt.vertexUv3s=u.has(3),u.clear(),xt}function _(b){let E=[];if(b.shaderID?E.push(b.shaderID):(E.push(b.customVertexShaderID),E.push(b.customFragmentShaderID)),b.defines!==void 0)for(let I in b.defines)E.push(I),E.push(b.defines[I]);return b.isRawShaderMaterial===!1&&(y(E,b),x(E,b),E.push(r.outputColorSpace)),E.push(b.customProgramCacheKey),E.join()}function y(b,E){b.push(E.precision),b.push(E.outputColorSpace),b.push(E.envMapMode),b.push(E.envMapCubeUVHeight),b.push(E.mapUv),b.push(E.alphaMapUv),b.push(E.lightMapUv),b.push(E.aoMapUv),b.push(E.bumpMapUv),b.push(E.normalMapUv),b.push(E.displacementMapUv),b.push(E.emissiveMapUv),b.push(E.metalnessMapUv),b.push(E.roughnessMapUv),b.push(E.anisotropyMapUv),b.push(E.clearcoatMapUv),b.push(E.clearcoatNormalMapUv),b.push(E.clearcoatRoughnessMapUv),b.push(E.iridescenceMapUv),b.push(E.iridescenceThicknessMapUv),b.push(E.sheenColorMapUv),b.push(E.sheenRoughnessMapUv),b.push(E.specularMapUv),b.push(E.specularColorMapUv),b.push(E.specularIntensityMapUv),b.push(E.transmissionMapUv),b.push(E.thicknessMapUv),b.push(E.combine),b.push(E.fogExp2),b.push(E.sizeAttenuation),b.push(E.morphTargetsCount),b.push(E.morphAttributeCount),b.push(E.numDirLights),b.push(E.numPointLights),b.push(E.numSpotLights),b.push(E.numSpotLightMaps),b.push(E.numHemiLights),b.push(E.numRectAreaLights),b.push(E.numDirLightShadows),b.push(E.numPointLightShadows),b.push(E.numSpotLightShadows),b.push(E.numSpotLightShadowsWithMaps),b.push(E.numLightProbes),b.push(E.shadowMapType),b.push(E.toneMapping),b.push(E.numClippingPlanes),b.push(E.numClipIntersection),b.push(E.depthPacking)}function x(b,E){s.disableAll(),E.isWebGL2&&s.enable(0),E.supportsVertexTextures&&s.enable(1),E.instancing&&s.enable(2),E.instancingColor&&s.enable(3),E.instancingMorph&&s.enable(4),E.matcap&&s.enable(5),E.envMap&&s.enable(6),E.normalMapObjectSpace&&s.enable(7),E.normalMapTangentSpace&&s.enable(8),E.clearcoat&&s.enable(9),E.iridescence&&s.enable(10),E.alphaTest&&s.enable(11),E.vertexColors&&s.enable(12),E.vertexAlphas&&s.enable(13),E.vertexUv1s&&s.enable(14),E.vertexUv2s&&s.enable(15),E.vertexUv3s&&s.enable(16),E.vertexTangents&&s.enable(17),E.anisotropy&&s.enable(18),E.alphaHash&&s.enable(19),E.batching&&s.enable(20),b.push(s.mask),s.disableAll(),E.fog&&s.enable(0),E.useFog&&s.enable(1),E.flatShading&&s.enable(2),E.logarithmicDepthBuffer&&s.enable(3),E.skinning&&s.enable(4),E.morphTargets&&s.enable(5),E.morphNormals&&s.enable(6),E.morphColors&&s.enable(7),E.premultipliedAlpha&&s.enable(8),E.shadowMapEnabled&&s.enable(9),E.useLegacyLights&&s.enable(10),E.doubleSided&&s.enable(11),E.flipSided&&s.enable(12),E.useDepthPacking&&s.enable(13),E.dithering&&s.enable(14),E.transmission&&s.enable(15),E.sheen&&s.enable(16),E.opaque&&s.enable(17),E.pointsUvs&&s.enable(18),E.decodeVideoTexture&&s.enable(19),E.alphaToCoverage&&s.enable(20),b.push(s.mask)}function M(b){let E=g[b.type],I;if(E){let R=fu[E];I=pDe.clone(R.uniforms)}else I=b.uniforms;return I}function S(b,E){let I;for(let R=0,A=c.length;R0?i.push(v):p.transparent===!0?n.push(v):t.push(v)}function l(f,h,p,d,g,m){let v=o(f,h,p,d,g,m);p.transmission>0?i.unshift(v):p.transparent===!0?n.unshift(v):t.unshift(v)}function u(f,h){t.length>1&&t.sort(f||CUe),i.length>1&&i.sort(h||Eoe),n.length>1&&n.sort(h||Eoe)}function c(){for(let f=e,h=r.length;f=a.length?(o=new Aoe,a.push(o)):o=a[n],o}function t(){r=new WeakMap}return{get:e,dispose:t}}function LUe(){let r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new ye,color:new er};break;case"SpotLight":t={position:new ye,direction:new ye,color:new er,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new ye,color:new er,distance:0,decay:0};break;case"HemisphereLight":t={direction:new ye,skyColor:new er,groundColor:new er};break;case"RectAreaLight":t={color:new er,position:new ye,halfWidth:new ye,halfHeight:new ye};break}return r[e.id]=t,t}}}function PUe(){let r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new yr};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new yr};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new yr,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}var DUe=0;function IUe(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function NUe(r,e){let t=new LUe,i=PUe(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new ye);let a=new ye,o=new Ht,s=new Ht;function l(c,f){let h=0,p=0,d=0;for(let I=0;I<9;I++)n.probe[I].set(0,0,0);let g=0,m=0,v=0,_=0,y=0,x=0,M=0,S=0,w=0,T=0,C=0;c.sort(IUe);let b=f===!0?Math.PI:1;for(let I=0,R=c.length;I0&&(e.isWebGL2?r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=yt.LTC_FLOAT_1,n.rectAreaLTC2=yt.LTC_FLOAT_2):(n.rectAreaLTC1=yt.LTC_HALF_1,n.rectAreaLTC2=yt.LTC_HALF_2):r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=yt.LTC_FLOAT_1,n.rectAreaLTC2=yt.LTC_FLOAT_2):r.has("OES_texture_half_float_linear")===!0?(n.rectAreaLTC1=yt.LTC_HALF_1,n.rectAreaLTC2=yt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),n.ambient[0]=h,n.ambient[1]=p,n.ambient[2]=d;let E=n.hash;(E.directionalLength!==g||E.pointLength!==m||E.spotLength!==v||E.rectAreaLength!==_||E.hemiLength!==y||E.numDirectionalShadows!==x||E.numPointShadows!==M||E.numSpotShadows!==S||E.numSpotMaps!==w||E.numLightProbes!==C)&&(n.directional.length=g,n.spot.length=v,n.rectArea.length=_,n.point.length=m,n.hemi.length=y,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=M,n.pointShadowMap.length=M,n.spotShadow.length=S,n.spotShadowMap.length=S,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=M,n.spotLightMatrix.length=S+w-T,n.spotLightMap.length=w,n.numSpotLightShadowsWithMaps=T,n.numLightProbes=C,E.directionalLength=g,E.pointLength=m,E.spotLength=v,E.rectAreaLength=_,E.hemiLength=y,E.numDirectionalShadows=x,E.numPointShadows=M,E.numSpotShadows=S,E.numSpotMaps=w,E.numLightProbes=C,n.version=DUe++)}function u(c,f){let h=0,p=0,d=0,g=0,m=0,v=f.matrixWorldInverse;for(let _=0,y=c.length;_=s.length?(l=new Coe(r,e),s.push(l)):l=s[o],l}function n(){t=new WeakMap}return{get:i,dispose:n}}var hk=class extends Mc{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=EPe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},pk=class extends Mc{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}},OUe=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,FUe=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function zUe(r,e,t){let i=new UM,n=new yr,a=new yr,o=new Pr,s=new hk({depthPacking:APe}),l=new pk,u={},c=t.maxTextureSize,f={[Uh]:lo,[lo]:Uh,[yc]:yc},h=new pu({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new yr},radius:{value:4}},vertexShader:OUe,fragmentShader:FUe}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let d=new Rs;d.setAttribute("position",new Cs(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new so(d,h),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Xoe;let v=this.type;this.render=function(S,w,T){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||S.length===0)return;let C=r.getRenderTarget(),b=r.getActiveCubeFace(),E=r.getActiveMipmapLevel(),I=r.state;I.setBlending(Dh),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);let R=v!==vc&&this.type===vc,A=v===vc&&this.type!==vc;for(let D=0,U=S.length;Dc||n.y>c)&&(n.x>c&&(a.x=Math.floor(c/k.x),n.x=a.x*k.x,F.mapSize.x=a.x),n.y>c&&(a.y=Math.floor(c/k.y),n.y=a.y*k.y,F.mapSize.y=a.y)),F.map===null||R===!0||A===!0){let Y=this.type!==vc?{minFilter:Dn,magFilter:Dn}:{};F.map!==null&&F.map.dispose(),F.map=new Sc(n.x,n.y,Y),F.map.texture.name=B.name+".shadowMap",F.camera.updateProjectionMatrix()}r.setRenderTarget(F.map),r.clear();let G=F.getViewportCount();for(let Y=0;Y0||w.map&&w.alphaTest>0){let I=b.uuid,R=w.uuid,A=u[I];A===void 0&&(A={},u[I]=A);let D=A[R];D===void 0&&(D=b.clone(),A[R]=D,w.addEventListener("dispose",M)),b=D}if(b.visible=w.visible,b.wireframe=w.wireframe,C===vc?b.side=w.shadowSide!==null?w.shadowSide:w.side:b.side=w.shadowSide!==null?w.shadowSide:f[w.side],b.alphaMap=w.alphaMap,b.alphaTest=w.alphaTest,b.map=w.map,b.clipShadows=w.clipShadows,b.clippingPlanes=w.clippingPlanes,b.clipIntersection=w.clipIntersection,b.displacementMap=w.displacementMap,b.displacementScale=w.displacementScale,b.displacementBias=w.displacementBias,b.wireframeLinewidth=w.wireframeLinewidth,b.linewidth=w.linewidth,T.isPointLight===!0&&b.isMeshDistanceMaterial===!0){let I=r.properties.get(b);I.light=T}return b}function x(S,w,T,C,b){if(S.visible===!1)return;if(S.layers.test(w.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&b===vc)&&(!S.frustumCulled||i.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(T.matrixWorldInverse,S.matrixWorld);let R=e.update(S),A=S.material;if(Array.isArray(A)){let D=R.groups;for(let U=0,B=D.length;U=1):G.indexOf("OpenGL ES")!==-1&&(k=parseFloat(/^OpenGL ES (\d)/.exec(G)[1]),F=k>=2);let Y=null,J={},Q=r.getParameter(r.SCISSOR_BOX),V=r.getParameter(r.VIEWPORT),K=new Pr().fromArray(Q),ae=new Pr().fromArray(V);function ve(X,Te,te,Me){let Pe=new Uint8Array(4),xt=r.createTexture();r.bindTexture(X,xt),r.texParameteri(X,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(X,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let zt=0;zt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new yr,f=new WeakMap,h,p=new WeakMap,d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(z,L){return d?new OffscreenCanvas(z,L):DM("canvas")}function m(z,L,ne,le){let me=1,he=ct(z);if((he.width>le||he.height>le)&&(me=le/Math.max(he.width,he.height)),me<1||L===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){let et=L?sR:Math.floor,Ke=et(me*he.width),Se=et(me*he.height);h===void 0&&(h=g(Ke,Se));let Ae=ne?g(Ke,Se):h;return Ae.width=Ke,Ae.height=Se,Ae.getContext("2d").drawImage(z,0,0,Ke,Se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+he.width+"x"+he.height+") to ("+Ke+"x"+Se+")."),Ae}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+he.width+"x"+he.height+")."),z;return z}function v(z){let L=ct(z);return tk(L.width)&&tk(L.height)}function _(z){return s?!1:z.wrapS!==oo||z.wrapT!==oo||z.minFilter!==Dn&&z.minFilter!==ao}function y(z,L){return z.generateMipmaps&&L&&z.minFilter!==Dn&&z.minFilter!==ao}function x(z){r.generateMipmap(z)}function M(z,L,ne,le,me=!1){if(s===!1)return L;if(z!==null){if(r[z]!==void 0)return r[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let he=L;if(L===r.RED&&(ne===r.FLOAT&&(he=r.R32F),ne===r.HALF_FLOAT&&(he=r.R16F),ne===r.UNSIGNED_BYTE&&(he=r.R8)),L===r.RED_INTEGER&&(ne===r.UNSIGNED_BYTE&&(he=r.R8UI),ne===r.UNSIGNED_SHORT&&(he=r.R16UI),ne===r.UNSIGNED_INT&&(he=r.R32UI),ne===r.BYTE&&(he=r.R8I),ne===r.SHORT&&(he=r.R16I),ne===r.INT&&(he=r.R32I)),L===r.RG&&(ne===r.FLOAT&&(he=r.RG32F),ne===r.HALF_FLOAT&&(he=r.RG16F),ne===r.UNSIGNED_BYTE&&(he=r.RG8)),L===r.RG_INTEGER&&(ne===r.UNSIGNED_BYTE&&(he=r.RG8UI),ne===r.UNSIGNED_SHORT&&(he=r.RG16UI),ne===r.UNSIGNED_INT&&(he=r.RG32UI),ne===r.BYTE&&(he=r.RG8I),ne===r.SHORT&&(he=r.RG16I),ne===r.INT&&(he=r.RG32I)),L===r.RGBA){let et=me?iR:Jr.getTransfer(le);ne===r.FLOAT&&(he=r.RGBA32F),ne===r.HALF_FLOAT&&(he=r.RGBA16F),ne===r.UNSIGNED_BYTE&&(he=et===ai?r.SRGB8_ALPHA8:r.RGBA8),ne===r.UNSIGNED_SHORT_4_4_4_4&&(he=r.RGBA4),ne===r.UNSIGNED_SHORT_5_5_5_1&&(he=r.RGB5_A1)}return(he===r.R16F||he===r.R32F||he===r.RG16F||he===r.RG32F||he===r.RGBA16F||he===r.RGBA32F)&&e.get("EXT_color_buffer_float"),he}function S(z,L,ne){return y(z,ne)===!0||z.isFramebufferTexture&&z.minFilter!==Dn&&z.minFilter!==ao?Math.log2(Math.max(L.width,L.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?L.mipmaps.length:1}function w(z){return z===Dn||z===fae||z===SM?r.NEAREST:r.LINEAR}function T(z){let L=z.target;L.removeEventListener("dispose",T),b(L),L.isVideoTexture&&f.delete(L)}function C(z){let L=z.target;L.removeEventListener("dispose",C),I(L)}function b(z){let L=i.get(z);if(L.__webglInit===void 0)return;let ne=z.source,le=p.get(ne);if(le){let me=le[L.__cacheKey];me.usedTimes--,me.usedTimes===0&&E(z),Object.keys(le).length===0&&p.delete(ne)}i.remove(z)}function E(z){let L=i.get(z);r.deleteTexture(L.__webglTexture);let ne=z.source,le=p.get(ne);delete le[L.__cacheKey],o.memory.textures--}function I(z){let L=i.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let le=0;le<6;le++){if(Array.isArray(L.__webglFramebuffer[le]))for(let me=0;me=n.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+n.maxTextures),R+=1,z}function U(z){let L=[];return L.push(z.wrapS),L.push(z.wrapT),L.push(z.wrapR||0),L.push(z.magFilter),L.push(z.minFilter),L.push(z.anisotropy),L.push(z.internalFormat),L.push(z.format),L.push(z.type),L.push(z.generateMipmaps),L.push(z.premultiplyAlpha),L.push(z.flipY),L.push(z.unpackAlignment),L.push(z.colorSpace),L.join()}function B(z,L){let ne=i.get(z);if(z.isVideoTexture&&Ne(z),z.isRenderTargetTexture===!1&&z.version>0&&ne.__version!==z.version){let le=z.image;if(le===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(le.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ae(ne,z,L);return}}t.bindTexture(r.TEXTURE_2D,ne.__webglTexture,r.TEXTURE0+L)}function F(z,L){let ne=i.get(z);if(z.version>0&&ne.__version!==z.version){ae(ne,z,L);return}t.bindTexture(r.TEXTURE_2D_ARRAY,ne.__webglTexture,r.TEXTURE0+L)}function k(z,L){let ne=i.get(z);if(z.version>0&&ne.__version!==z.version){ae(ne,z,L);return}t.bindTexture(r.TEXTURE_3D,ne.__webglTexture,r.TEXTURE0+L)}function G(z,L){let ne=i.get(z);if(z.version>0&&ne.__version!==z.version){ve(ne,z,L);return}t.bindTexture(r.TEXTURE_CUBE_MAP,ne.__webglTexture,r.TEXTURE0+L)}let Y={[c0]:r.REPEAT,[oo]:r.CLAMP_TO_EDGE,[QB]:r.MIRRORED_REPEAT},J={[Dn]:r.NEAREST,[fae]:r.NEAREST_MIPMAP_NEAREST,[SM]:r.NEAREST_MIPMAP_LINEAR,[ao]:r.LINEAR,[dB]:r.LINEAR_MIPMAP_NEAREST,[fm]:r.LINEAR_MIPMAP_LINEAR},Q={[RPe]:r.NEVER,[UPe]:r.ALWAYS,[LPe]:r.LESS,[Qoe]:r.LEQUAL,[PPe]:r.EQUAL,[NPe]:r.GEQUAL,[DPe]:r.GREATER,[IPe]:r.NOTEQUAL};function V(z,L,ne){if(L.type===hu&&e.has("OES_texture_float_linear")===!1&&(L.magFilter===ao||L.magFilter===dB||L.magFilter===SM||L.magFilter===fm||L.minFilter===ao||L.minFilter===dB||L.minFilter===SM||L.minFilter===fm)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),ne?(r.texParameteri(z,r.TEXTURE_WRAP_S,Y[L.wrapS]),r.texParameteri(z,r.TEXTURE_WRAP_T,Y[L.wrapT]),(z===r.TEXTURE_3D||z===r.TEXTURE_2D_ARRAY)&&r.texParameteri(z,r.TEXTURE_WRAP_R,Y[L.wrapR]),r.texParameteri(z,r.TEXTURE_MAG_FILTER,J[L.magFilter]),r.texParameteri(z,r.TEXTURE_MIN_FILTER,J[L.minFilter])):(r.texParameteri(z,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(z,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(z===r.TEXTURE_3D||z===r.TEXTURE_2D_ARRAY)&&r.texParameteri(z,r.TEXTURE_WRAP_R,r.CLAMP_TO_EDGE),(L.wrapS!==oo||L.wrapT!==oo)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(z,r.TEXTURE_MAG_FILTER,w(L.magFilter)),r.texParameteri(z,r.TEXTURE_MIN_FILTER,w(L.minFilter)),L.minFilter!==Dn&&L.minFilter!==ao&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),L.compareFunction&&(r.texParameteri(z,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(z,r.TEXTURE_COMPARE_FUNC,Q[L.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(L.magFilter===Dn||L.minFilter!==SM&&L.minFilter!==fm||L.type===hu&&e.has("OES_texture_float_linear")===!1||s===!1&&L.type===PM&&e.has("OES_texture_half_float_linear")===!1)return;if(L.anisotropy>1||i.get(L).__currentAnisotropy){let le=e.get("EXT_texture_filter_anisotropic");r.texParameterf(z,le.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(L.anisotropy,n.getMaxAnisotropy())),i.get(L).__currentAnisotropy=L.anisotropy}}}function K(z,L){let ne=!1;z.__webglInit===void 0&&(z.__webglInit=!0,L.addEventListener("dispose",T));let le=L.source,me=p.get(le);me===void 0&&(me={},p.set(le,me));let he=U(L);if(he!==z.__cacheKey){me[he]===void 0&&(me[he]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,ne=!0),me[he].usedTimes++;let et=me[z.__cacheKey];et!==void 0&&(me[z.__cacheKey].usedTimes--,et.usedTimes===0&&E(L)),z.__cacheKey=he,z.__webglTexture=me[he].texture}return ne}function ae(z,L,ne){let le=r.TEXTURE_2D;(L.isDataArrayTexture||L.isCompressedArrayTexture)&&(le=r.TEXTURE_2D_ARRAY),L.isData3DTexture&&(le=r.TEXTURE_3D);let me=K(z,L),he=L.source;t.bindTexture(le,z.__webglTexture,r.TEXTURE0+ne);let et=i.get(he);if(he.version!==et.__version||me===!0){t.activeTexture(r.TEXTURE0+ne);let Ke=Jr.getPrimaries(Jr.workingColorSpace),Se=L.colorSpace===Lh?null:Jr.getPrimaries(L.colorSpace),Ae=L.colorSpace===Lh||Ke===Se?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,L.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,L.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,L.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ae);let nt=_(L)&&v(L.image)===!1,$=m(L.image,nt,!1,n.maxTextureSize);$=Ve(L,$);let it=v($)||s,Xe=a.convert(L.format,L.colorSpace),ze=a.convert(L.type),we=M(L.internalFormat,Xe,ze,L.colorSpace,L.isVideoTexture);V(le,L,it);let Ie,st=L.mipmaps,Je=s&&L.isVideoTexture!==!0&&we!==$oe,kt=et.__version===void 0||me===!0,X=he.dataReady,Te=S(L,$,it);if(L.isDepthTexture)we=r.DEPTH_COMPONENT,s?L.type===hu?we=r.DEPTH_COMPONENT32F:L.type===Ph?we=r.DEPTH_COMPONENT24:L.type===hm?we=r.DEPTH24_STENCIL8:we=r.DEPTH_COMPONENT16:L.type===hu&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),L.format===pm&&we===r.DEPTH_COMPONENT&&L.type!==Nk&&L.type!==Ph&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),L.type=Ph,ze=a.convert(L.type)),L.format===f0&&we===r.DEPTH_COMPONENT&&(we=r.DEPTH_STENCIL,L.type!==hm&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),L.type=hm,ze=a.convert(L.type))),kt&&(Je?t.texStorage2D(r.TEXTURE_2D,1,we,$.width,$.height):t.texImage2D(r.TEXTURE_2D,0,we,$.width,$.height,0,Xe,ze,null));else if(L.isDataTexture)if(st.length>0&&it){Je&&kt&&t.texStorage2D(r.TEXTURE_2D,Te,we,st[0].width,st[0].height);for(let te=0,Me=st.length;te>=1,Me>>=1}}else if(st.length>0&&it){if(Je&&kt){let te=ct(st[0]);t.texStorage2D(r.TEXTURE_2D,Te,we,te.width,te.height)}for(let te=0,Me=st.length;te0&&X++;let te=ct($[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,X,Ie,te.width,te.height)}for(let te=0;te<6;te++)if(nt){st?kt&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+te,0,0,0,$[te].width,$[te].height,ze,we,$[te].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+te,0,Ie,$[te].width,$[te].height,0,ze,we,$[te].data);for(let Me=0;Me>he),$=Math.max(1,L.height>>he);me===r.TEXTURE_3D||me===r.TEXTURE_2D_ARRAY?t.texImage3D(me,he,Se,nt,$,L.depth,0,et,Ke,null):t.texImage2D(me,he,Se,nt,$,0,et,Ke,null)}t.bindFramebuffer(r.FRAMEBUFFER,z),Ue(L)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,le,me,i.get(ne).__webglTexture,0,Le(L)):(me===r.TEXTURE_2D||me>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&me<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,le,me,i.get(ne).__webglTexture,he),t.bindFramebuffer(r.FRAMEBUFFER,null)}function se(z,L,ne){if(r.bindRenderbuffer(r.RENDERBUFFER,z),L.depthBuffer&&!L.stencilBuffer){let le=s===!0?r.DEPTH_COMPONENT24:r.DEPTH_COMPONENT16;if(ne||Ue(L)){let me=L.depthTexture;me&&me.isDepthTexture&&(me.type===hu?le=r.DEPTH_COMPONENT32F:me.type===Ph&&(le=r.DEPTH_COMPONENT24));let he=Le(L);Ue(L)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,he,le,L.width,L.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,he,le,L.width,L.height)}else r.renderbufferStorage(r.RENDERBUFFER,le,L.width,L.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,z)}else if(L.depthBuffer&&L.stencilBuffer){let le=Le(L);ne&&Ue(L)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,le,r.DEPTH24_STENCIL8,L.width,L.height):Ue(L)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,le,r.DEPTH24_STENCIL8,L.width,L.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,L.width,L.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,z)}else{let le=L.textures;for(let me=0;me1,Ke=v(z)||s;if(et||(le.__webglTexture===void 0&&(le.__webglTexture=r.createTexture()),le.__version=L.version,o.memory.textures++),he){ne.__webglFramebuffer=[];for(let Se=0;Se<6;Se++)if(s&&L.mipmaps&&L.mipmaps.length>0){ne.__webglFramebuffer[Se]=[];for(let Ae=0;Ae0){ne.__webglFramebuffer=[];for(let Se=0;Se0&&Ue(z)===!1){ne.__webglMultisampledFramebuffer=r.createFramebuffer(),ne.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Se=0;Se0)for(let Ae=0;Ae0)for(let Ae=0;Ae0&&Ue(z)===!1){let L=z.textures,ne=z.width,le=z.height,me=r.COLOR_BUFFER_BIT,he=[],et=z.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ke=i.get(z),Se=L.length>1;if(Se)for(let Ae=0;Ae0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&L.__useRenderToTexture!==!1}function Ne(z){let L=o.render.frame;f.get(z)!==L&&(f.set(z,L),z.update())}function Ve(z,L){let ne=z.colorSpace,le=z.format,me=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===ek||ne!==Hh&&ne!==Lh&&(Jr.getTransfer(ne)===ai?s===!1?e.has("EXT_sRGB")===!0&&le===As?(z.format=ek,z.minFilter=ao,z.generateMipmaps=!1):L=lR.sRGBToLinear(L):(le!==As||me!==Nh)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),L}function ct(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(c.width=z.naturalWidth||z.width,c.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(c.width=z.displayWidth,c.height=z.displayHeight):(c.width=z.width,c.height=z.height),c}this.allocateTextureUnit=D,this.resetTextureUnits=A,this.setTexture2D=B,this.setTexture2DArray=F,this.setTexture3D=k,this.setTextureCube=G,this.rebindTextures=H,this.setupRenderTarget=We,this.updateRenderTargetMipmap=_e,this.updateMultisampleRenderTarget=xe,this.setupDepthRenderbuffer=q,this.setupFrameBufferTexture=ue,this.useMultisampledRTT=Ue}function VUe(r,e,t){let i=t.isWebGL2;function n(a,o=Lh){let s,l=Jr.getTransfer(o);if(a===Nh)return r.UNSIGNED_BYTE;if(a===qoe)return r.UNSIGNED_SHORT_4_4_4_4;if(a===Zoe)return r.UNSIGNED_SHORT_5_5_5_1;if(a===gPe)return r.BYTE;if(a===yPe)return r.SHORT;if(a===Nk)return r.UNSIGNED_SHORT;if(a===Yoe)return r.INT;if(a===Ph)return r.UNSIGNED_INT;if(a===hu)return r.FLOAT;if(a===PM)return i?r.HALF_FLOAT:(s=e.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(a===_Pe)return r.ALPHA;if(a===As)return r.RGBA;if(a===xPe)return r.LUMINANCE;if(a===SPe)return r.LUMINANCE_ALPHA;if(a===pm)return r.DEPTH_COMPONENT;if(a===f0)return r.DEPTH_STENCIL;if(a===ek)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(a===MPe)return r.RED;if(a===joe)return r.RED_INTEGER;if(a===bPe)return r.RG;if(a===Koe)return r.RG_INTEGER;if(a===Joe)return r.RGBA_INTEGER;if(a===mB||a===vB||a===gB||a===yB)if(l===ai)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(a===mB)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(a===vB)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(a===gB)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(a===yB)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(a===mB)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===vB)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===gB)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===yB)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(a===hae||a===pae||a===dae||a===mae)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(a===hae)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===pae)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===dae)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===mae)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(a===$oe)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(a===vae||a===gae)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(a===vae)return l===ai?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(a===gae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(a===yae||a===_ae||a===xae||a===Sae||a===Mae||a===bae||a===wae||a===Tae||a===Eae||a===Aae||a===Cae||a===Rae||a===Lae||a===Pae)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(a===yae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(a===_ae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(a===xae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(a===Sae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(a===Mae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(a===bae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(a===wae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(a===Tae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(a===Eae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(a===Aae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(a===Cae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(a===Rae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(a===Lae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(a===Pae)return l===ai?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(a===_B||a===Dae||a===Iae)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(a===_B)return l===ai?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(a===Dae)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(a===Iae)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(a===wPe||a===Nae||a===Uae||a===Oae)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(a===_B)return s.COMPRESSED_RED_RGTC1_EXT;if(a===Nae)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(a===Uae)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(a===Oae)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return a===hm?i?r.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null):r[a]!==void 0?r[a]:null}return{convert:n}}var dk=class extends Nn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}},xc=class extends ia{constructor(){super(),this.isGroup=!0,this.type="Group"}},GUe={type:"move"},RM=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new xc,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new xc,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ye,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ye),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new xc,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ye,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ye),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let n=null,a=null,o=null,s=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(let g of e.hand.values()){let m=t.getJointPose(g,i),v=this._getHandJoint(u,g);m!==null&&(v.matrix.fromArray(m.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=m.radius),v.visible=m!==null}let c=u.joints["index-finger-tip"],f=u.joints["thumb-tip"],h=c.position.distanceTo(f.position),p=.02,d=.005;u.inputState.pinching&&h>p+d?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&h<=p-d&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(a=t.getPose(e.gripSpace,i),a!==null&&(l.matrix.fromArray(a.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,a.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(a.linearVelocity)):l.hasLinearVelocity=!1,a.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(a.angularVelocity)):l.hasAngularVelocity=!1));s!==null&&(n=t.getPose(e.targetRaySpace,i),n===null&&a!==null&&(n=a),n!==null&&(s.matrix.fromArray(n.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,n.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(n.linearVelocity)):s.hasLinearVelocity=!1,n.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(n.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(GUe)))}return s!==null&&(s.visible=n!==null),l!==null&&(l.visible=a!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let i=new xc;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}},HUe=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,WUe=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepthEXT = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepthEXT = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`,mk=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){let n=new Vo,a=e.properties.get(n);a.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=n}}render(e,t){if(this.texture!==null){if(this.mesh===null){let i=t.cameras[0].viewport,n=new pu({extensions:{fragDepth:!0},vertexShader:HUe,fragmentShader:WUe,uniforms:{depthColor:{value:this.texture},depthWidth:{value:i.z},depthHeight:{value:i.w}}});this.mesh=new so(new vR(20,20),n)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}},vk=class extends Oh{constructor(e,t){super();let i=this,n=null,a=1,o=null,s="local-floor",l=1,u=null,c=null,f=null,h=null,p=null,d=null,g=new mk,m=t.getContextAttributes(),v=null,_=null,y=[],x=[],M=new yr,S=null,w=new Nn;w.layers.enable(1),w.viewport=new Pr;let T=new Nn;T.layers.enable(2),T.viewport=new Pr;let C=[w,T],b=new dk;b.layers.enable(1),b.layers.enable(2);let E=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(V){let K=y[V];return K===void 0&&(K=new RM,y[V]=K),K.getTargetRaySpace()},this.getControllerGrip=function(V){let K=y[V];return K===void 0&&(K=new RM,y[V]=K),K.getGripSpace()},this.getHand=function(V){let K=y[V];return K===void 0&&(K=new RM,y[V]=K),K.getHandSpace()};function R(V){let K=x.indexOf(V.inputSource);if(K===-1)return;let ae=y[K];ae!==void 0&&(ae.update(V.inputSource,V.frame,u||o),ae.dispatchEvent({type:V.type,data:V.inputSource}))}function A(){n.removeEventListener("select",R),n.removeEventListener("selectstart",R),n.removeEventListener("selectend",R),n.removeEventListener("squeeze",R),n.removeEventListener("squeezestart",R),n.removeEventListener("squeezeend",R),n.removeEventListener("end",A),n.removeEventListener("inputsourceschange",D);for(let V=0;V=0&&(x[ve]=null,y[ve].disconnect(ae))}for(let K=0;K=x.length){x.push(ae),ve=se;break}else if(x[se]===null){x[se]=ae,ve=se;break}if(ve===-1)break}let ue=y[ve];ue&&ue.connect(ae)}}let U=new ye,B=new ye;function F(V,K,ae){U.setFromMatrixPosition(K.matrixWorld),B.setFromMatrixPosition(ae.matrixWorld);let ve=U.distanceTo(B),ue=K.projectionMatrix.elements,se=ae.projectionMatrix.elements,Ee=ue[14]/(ue[10]-1),q=ue[14]/(ue[10]+1),H=(ue[9]+1)/ue[5],We=(ue[9]-1)/ue[5],_e=(ue[8]-1)/ue[0],xe=(se[8]+1)/se[0],Le=Ee*_e,Ue=Ee*xe,Ne=ve/(-_e+xe),Ve=Ne*-_e;K.matrixWorld.decompose(V.position,V.quaternion,V.scale),V.translateX(Ve),V.translateZ(Ne),V.matrixWorld.compose(V.position,V.quaternion,V.scale),V.matrixWorldInverse.copy(V.matrixWorld).invert();let ct=Ee+Ne,z=q+Ne,L=Le-Ve,ne=Ue+(ve-Ve),le=H*q/z*ct,me=We*q/z*ct;V.projectionMatrix.makePerspective(L,ne,le,me,ct,z),V.projectionMatrixInverse.copy(V.projectionMatrix).invert()}function k(V,K){K===null?V.matrixWorld.copy(V.matrix):V.matrixWorld.multiplyMatrices(K.matrixWorld,V.matrix),V.matrixWorldInverse.copy(V.matrixWorld).invert()}this.updateCamera=function(V){if(n===null)return;g.texture!==null&&(V.near=g.depthNear,V.far=g.depthFar),b.near=T.near=w.near=V.near,b.far=T.far=w.far=V.far,(E!==b.near||I!==b.far)&&(n.updateRenderState({depthNear:b.near,depthFar:b.far}),E=b.near,I=b.far,w.near=E,w.far=I,T.near=E,T.far=I,w.updateProjectionMatrix(),T.updateProjectionMatrix(),V.updateProjectionMatrix());let K=V.parent,ae=b.cameras;k(b,K);for(let ve=0;ve0&&(m.alphaTest.value=v.alphaTest);let _=e.get(v),y=_.envMap,x=_.envMapRotation;if(y&&(m.envMap.value=y,sm.copy(x),sm.x*=-1,sm.y*=-1,sm.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&(sm.y*=-1,sm.z*=-1),m.envMapRotation.value.setFromMatrix4(XUe.makeRotationFromEuler(sm)),m.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=v.reflectivity,m.ior.value=v.ior,m.refractionRatio.value=v.refractionRatio),v.lightMap){m.lightMap.value=v.lightMap;let M=r._useLegacyLights===!0?Math.PI:1;m.lightMapIntensity.value=v.lightMapIntensity*M,t(v.lightMap,m.lightMapTransform)}v.aoMap&&(m.aoMap.value=v.aoMap,m.aoMapIntensity.value=v.aoMapIntensity,t(v.aoMap,m.aoMapTransform))}function o(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform))}function s(m,v){m.dashSize.value=v.dashSize,m.totalSize.value=v.dashSize+v.gapSize,m.scale.value=v.scale}function l(m,v,_,y){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.size.value=v.size*_,m.scale.value=y*.5,v.map&&(m.map.value=v.map,t(v.map,m.uvTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function u(m,v){m.diffuse.value.copy(v.color),m.opacity.value=v.opacity,m.rotation.value=v.rotation,v.map&&(m.map.value=v.map,t(v.map,m.mapTransform)),v.alphaMap&&(m.alphaMap.value=v.alphaMap,t(v.alphaMap,m.alphaMapTransform)),v.alphaTest>0&&(m.alphaTest.value=v.alphaTest)}function c(m,v){m.specular.value.copy(v.specular),m.shininess.value=Math.max(v.shininess,1e-4)}function f(m,v){v.gradientMap&&(m.gradientMap.value=v.gradientMap)}function h(m,v){m.metalness.value=v.metalness,v.metalnessMap&&(m.metalnessMap.value=v.metalnessMap,t(v.metalnessMap,m.metalnessMapTransform)),m.roughness.value=v.roughness,v.roughnessMap&&(m.roughnessMap.value=v.roughnessMap,t(v.roughnessMap,m.roughnessMapTransform)),e.get(v).envMap&&(m.envMapIntensity.value=v.envMapIntensity)}function p(m,v,_){m.ior.value=v.ior,v.sheen>0&&(m.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),m.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(m.sheenColorMap.value=v.sheenColorMap,t(v.sheenColorMap,m.sheenColorMapTransform)),v.sheenRoughnessMap&&(m.sheenRoughnessMap.value=v.sheenRoughnessMap,t(v.sheenRoughnessMap,m.sheenRoughnessMapTransform))),v.clearcoat>0&&(m.clearcoat.value=v.clearcoat,m.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(m.clearcoatMap.value=v.clearcoatMap,t(v.clearcoatMap,m.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,t(v.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(m.clearcoatNormalMap.value=v.clearcoatNormalMap,t(v.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===lo&&m.clearcoatNormalScale.value.negate())),v.iridescence>0&&(m.iridescence.value=v.iridescence,m.iridescenceIOR.value=v.iridescenceIOR,m.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(m.iridescenceMap.value=v.iridescenceMap,t(v.iridescenceMap,m.iridescenceMapTransform)),v.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=v.iridescenceThicknessMap,t(v.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),v.transmission>0&&(m.transmission.value=v.transmission,m.transmissionSamplerMap.value=_.texture,m.transmissionSamplerSize.value.set(_.width,_.height),v.transmissionMap&&(m.transmissionMap.value=v.transmissionMap,t(v.transmissionMap,m.transmissionMapTransform)),m.thickness.value=v.thickness,v.thicknessMap&&(m.thicknessMap.value=v.thicknessMap,t(v.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=v.attenuationDistance,m.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(m.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(m.anisotropyMap.value=v.anisotropyMap,t(v.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=v.specularIntensity,m.specularColor.value.copy(v.specularColor),v.specularColorMap&&(m.specularColorMap.value=v.specularColorMap,t(v.specularColorMap,m.specularColorMapTransform)),v.specularIntensityMap&&(m.specularIntensityMap.value=v.specularIntensityMap,t(v.specularIntensityMap,m.specularIntensityMapTransform))}function d(m,v){v.matcap&&(m.matcap.value=v.matcap)}function g(m,v){let _=e.get(v).light;m.referencePosition.value.setFromMatrixPosition(_.matrixWorld),m.nearDistance.value=_.shadow.camera.near,m.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:n}}function qUe(r,e,t,i){let n={},a={},o=[],s=t.isWebGL2?r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(_,y){let x=y.program;i.uniformBlockBinding(_,x)}function u(_,y){let x=n[_.id];x===void 0&&(d(_),x=c(_),n[_.id]=x,_.addEventListener("dispose",m));let M=y.program;i.updateUBOMapping(_,M);let S=e.render.frame;a[_.id]!==S&&(h(_),a[_.id]=S)}function c(_){let y=f();_.__bindingPointIndex=y;let x=r.createBuffer(),M=_.__size,S=_.usage;return r.bindBuffer(r.UNIFORM_BUFFER,x),r.bufferData(r.UNIFORM_BUFFER,M,S),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,y,x),x}function f(){for(let _=0;_0&&(x+=M-S),_.__size=x,_.__cache={},this}function g(_){let y={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(y.boundary=4,y.storage=4):_.isVector2?(y.boundary=8,y.storage=8):_.isVector3||_.isColor?(y.boundary=16,y.storage=12):_.isVector4?(y.boundary=16,y.storage=16):_.isMatrix3?(y.boundary=48,y.storage=48):_.isMatrix4?(y.boundary=64,y.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),y}function m(_){let y=_.target;y.removeEventListener("dispose",m);let x=o.indexOf(y.__bindingPointIndex);o.splice(x,1),r.deleteBuffer(n[y.id]),delete n[y.id],delete a[y.id]}function v(){for(let _ in n)r.deleteBuffer(n[_]);o=[],n={},a={}}return{bind:l,update:u,dispose:v}}var gk=class{constructor(e={}){let{canvas:t=KPe(),context:i=null,depth:n=!0,stencil:a=!0,alpha:o=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let h;i!==null?h=i.getContextAttributes().alpha:h=o;let p=new Uint32Array(4),d=new Int32Array(4),g=null,m=null,v=[],_=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Ma,this._useLegacyLights=!1,this.toneMapping=Ih,this.toneMappingExposure=1;let y=this,x=!1,M=0,S=0,w=null,T=-1,C=null,b=new Pr,E=new Pr,I=null,R=new er(0),A=0,D=t.width,U=t.height,B=1,F=null,k=null,G=new Pr(0,0,D,U),Y=new Pr(0,0,D,U),J=!1,Q=new UM,V=!1,K=!1,ae=null,ve=new Ht,ue=new yr,se=new ye,Ee={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function q(){return w===null?B:1}let H=i;function We(O,j){for(let re=0;re{function W(){if(ie.forEach(function(ee){Ne.get(ee).currentProgram.isReady()&&ie.delete(ee)}),ie.size===0){P(O);return}setTimeout(W,10)}_e.get("KHR_parallel_shader_compile")!==null?W():setTimeout(W,10)})};let zt=null;function Mr(O){zt&&zt(O)}function Zr(){Dr.stop()}function Vt(){Dr.start()}let Dr=new ise;Dr.setAnimationLoop(Mr),typeof self<"u"&&Dr.setContext(self),this.setAnimationLoop=function(O){zt=O,Je.setAnimationLoop(O),O===null?Dr.stop():Dr.start()},Je.addEventListener("sessionstart",Zr),Je.addEventListener("sessionend",Vt),this.render=function(O,j){if(j!==void 0&&j.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;O.matrixWorldAutoUpdate===!0&&O.updateMatrixWorld(),j.parent===null&&j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),Je.enabled===!0&&Je.isPresenting===!0&&(Je.cameraAutoUpdate===!0&&Je.updateCamera(j),j=Je.getCamera()),O.isScene===!0&&O.onBeforeRender(y,O,j,w),m=Ke.get(O,_.length),m.init(),_.push(m),ve.multiplyMatrices(j.projectionMatrix,j.matrixWorldInverse),Q.setFromProjectionMatrix(ve),K=this.localClippingEnabled,V=Se.init(this.clippingPlanes,K),g=et.get(O,v.length),g.init(),v.push(g),oi(O,j,0,y.sortObjects),g.finish(),y.sortObjects===!0&&g.sort(F,k),this.info.render.frame++,V===!0&&Se.beginShadows();let re=m.state.shadowsArray;if(Ae.render(re,O,j),V===!0&&Se.endShadows(),this.info.autoReset===!0&&this.info.reset(),(Je.enabled===!1||Je.isPresenting===!1||Je.hasDepthSensing()===!1)&&nt.render(g,O),m.setupLights(y._useLegacyLights),j.isArrayCamera){let ie=j.cameras;for(let P=0,W=ie.length;P0?m=_[_.length-1]:m=null,v.pop(),v.length>0?g=v[v.length-1]:g=null};function oi(O,j,re,ie){if(O.visible===!1)return;if(O.layers.test(j.layers)){if(O.isGroup)re=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(j);else if(O.isLight)m.pushLight(O),O.castShadow&&m.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||Q.intersectsSprite(O)){ie&&se.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ve);let ee=le.update(O),ge=O.material;ge.visible&&g.push(O,ee,ge,re,se.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(!O.frustumCulled||Q.intersectsObject(O))){let ee=le.update(O),ge=O.material;if(ie&&(O.boundingSphere!==void 0?(O.boundingSphere===null&&O.computeBoundingSphere(),se.copy(O.boundingSphere.center)):(ee.boundingSphere===null&&ee.computeBoundingSphere(),se.copy(ee.boundingSphere.center)),se.applyMatrix4(O.matrixWorld).applyMatrix4(ve)),Array.isArray(ge)){let ce=ee.groups;for(let Oe=0,Ge=ce.length;Oe0&&M0(P,W,j,re),ie&&Le.viewport(b.copy(ie)),P.length>0&&Ds(P,j,re),W.length>0&&Ds(W,j,re),ee.length>0&&Ds(ee,j,re),Le.buffers.depth.setTest(!0),Le.buffers.depth.setMask(!0),Le.buffers.color.setMask(!0),Le.setPolygonOffset(!1)}function M0(O,j,re,ie){if((re.isScene===!0?re.overrideMaterial:null)!==null)return;let W=xe.isWebGL2;ae===null&&(ae=new Sc(1,1,{generateMipmaps:!0,type:_e.has("EXT_color_buffer_half_float")?PM:Nh,minFilter:fm,samples:W?4:0})),y.getDrawingBufferSize(ue),W?ae.setSize(ue.x,ue.y):ae.setSize(sR(ue.x),sR(ue.y));let ee=y.getRenderTarget();y.setRenderTarget(ae),y.getClearColor(R),A=y.getClearAlpha(),A<1&&y.setClearColor(16777215,.5),y.clear();let ge=y.toneMapping;y.toneMapping=Ih,Ds(O,re,ie),Ve.updateMultisampleRenderTarget(ae),Ve.updateRenderTargetMipmap(ae);let ce=!1;for(let Oe=0,Ge=j.length;Oe0),Re=!!re.morphAttributes.position,pt=!!re.morphAttributes.normal,mt=!!re.morphAttributes.color,$e=Ih;ie.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&($e=y.toneMapping);let at=re.morphAttributes.position||re.morphAttributes.normal||re.morphAttributes.color,wt=at!==void 0?at.length:0,je=Ne.get(ie),mi=m.state.lights;if(V===!0&&(K===!0||O!==C)){let jr=O===C&&ie.id===T;Se.setState(ie,O,jr)}let Ut=!1;ie.version===je.__version?(je.needsLights&&je.lightsStateVersion!==mi.state.version||je.outputColorSpace!==ge||P.isBatchedMesh&&je.batching===!1||!P.isBatchedMesh&&je.batching===!0||P.isInstancedMesh&&je.instancing===!1||!P.isInstancedMesh&&je.instancing===!0||P.isSkinnedMesh&&je.skinning===!1||!P.isSkinnedMesh&&je.skinning===!0||P.isInstancedMesh&&je.instancingColor===!0&&P.instanceColor===null||P.isInstancedMesh&&je.instancingColor===!1&&P.instanceColor!==null||P.isInstancedMesh&&je.instancingMorph===!0&&P.morphTexture===null||P.isInstancedMesh&&je.instancingMorph===!1&&P.morphTexture!==null||je.envMap!==ce||ie.fog===!0&&je.fog!==W||je.numClippingPlanes!==void 0&&(je.numClippingPlanes!==Se.numPlanes||je.numIntersection!==Se.numIntersection)||je.vertexAlphas!==Oe||je.vertexTangents!==Ge||je.morphTargets!==Re||je.morphNormals!==pt||je.morphColors!==mt||je.toneMapping!==$e||xe.isWebGL2===!0&&je.morphTargetsCount!==wt)&&(Ut=!0):(Ut=!0,je.__version=ie.version);let Rr=je.currentProgram;Ut===!0&&(Rr=Go(ie,j,P));let Wi=!1,Mt=!1,Mi=!1,sr=Rr.getUniforms(),un=je.uniforms;if(Le.useProgram(Rr.program)&&(Wi=!0,Mt=!0,Mi=!0),ie.id!==T&&(T=ie.id,Mt=!0),Wi||C!==O){sr.setValue(H,"projectionMatrix",O.projectionMatrix),sr.setValue(H,"viewMatrix",O.matrixWorldInverse);let jr=sr.map.cameraPosition;jr!==void 0&&jr.setValue(H,se.setFromMatrixPosition(O.matrixWorld)),xe.logarithmicDepthBuffer&&sr.setValue(H,"logDepthBufFC",2/(Math.log(O.far+1)/Math.LN2)),(ie.isMeshPhongMaterial||ie.isMeshToonMaterial||ie.isMeshLambertMaterial||ie.isMeshBasicMaterial||ie.isMeshStandardMaterial||ie.isShaderMaterial)&&sr.setValue(H,"isOrthographic",O.isOrthographicCamera===!0),C!==O&&(C=O,Mt=!0,Mi=!0)}if(P.isSkinnedMesh){sr.setOptional(H,P,"bindMatrix"),sr.setOptional(H,P,"bindMatrixInverse");let jr=P.skeleton;jr&&(xe.floatVertexTextures?(jr.boneTexture===null&&jr.computeBoneTexture(),sr.setValue(H,"boneTexture",jr.boneTexture,Ve)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}P.isBatchedMesh&&(sr.setOptional(H,P,"batchingTexture"),sr.setValue(H,"batchingTexture",P._matricesTexture,Ve));let mu=re.morphAttributes;if((mu.position!==void 0||mu.normal!==void 0||mu.color!==void 0&&xe.isWebGL2===!0)&&$.update(P,re,Rr),(Mt||je.receiveShadow!==P.receiveShadow)&&(je.receiveShadow=P.receiveShadow,sr.setValue(H,"receiveShadow",P.receiveShadow)),ie.isMeshGouraudMaterial&&ie.envMap!==null&&(un.envMap.value=ce,un.flipEnvMap.value=ce.isCubeTexture&&ce.isRenderTargetTexture===!1?-1:1),Mt&&(sr.setValue(H,"toneMappingExposure",y.toneMappingExposure),je.needsLights&&w0(un,Mi),W&&ie.fog===!0&&he.refreshFogUniforms(un,W),he.refreshMaterialUniforms(un,ie,B,U,ae),s0.upload(H,Zh(je),un,Ve)),ie.isShaderMaterial&&ie.uniformsNeedUpdate===!0&&(s0.upload(H,Zh(je),un,Ve),ie.uniformsNeedUpdate=!1),ie.isSpriteMaterial&&sr.setValue(H,"center",P.center),sr.setValue(H,"modelViewMatrix",P.modelViewMatrix),sr.setValue(H,"normalMatrix",P.normalMatrix),sr.setValue(H,"modelMatrix",P.matrixWorld),ie.isShaderMaterial||ie.isRawShaderMaterial){let jr=ie.uniformsGroups;for(let vu=0,jh=jr.length;vu0&&Ve.useMultisampledRTT(O)===!1?P=Ne.get(O).__webglMultisampledFramebuffer:Array.isArray(Ge)?P=Ge[re]:P=Ge,b.copy(O.viewport),E.copy(O.scissor),I=O.scissorTest}else b.copy(G).multiplyScalar(B).floor(),E.copy(Y).multiplyScalar(B).floor(),I=J;if(Le.bindFramebuffer(H.FRAMEBUFFER,P)&&xe.drawBuffers&&ie&&Le.drawBuffers(O,P),Le.viewport(b),Le.scissor(E),Le.setScissorTest(I),W){let ce=Ne.get(O.texture);H.framebufferTexture2D(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,H.TEXTURE_CUBE_MAP_POSITIVE_X+j,ce.__webglTexture,re)}else if(ee){let ce=Ne.get(O.texture),Oe=j||0;H.framebufferTextureLayer(H.FRAMEBUFFER,H.COLOR_ATTACHMENT0,ce.__webglTexture,re||0,Oe)}T=-1},this.readRenderTargetPixels=function(O,j,re,ie,P,W,ee){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ge=Ne.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&ee!==void 0&&(ge=ge[ee]),ge){Le.bindFramebuffer(H.FRAMEBUFFER,ge);try{let ce=O.texture,Oe=ce.format,Ge=ce.type;if(Oe!==As&&ze.convert(Oe)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Re=Ge===PM&&(_e.has("EXT_color_buffer_half_float")||xe.isWebGL2&&_e.has("EXT_color_buffer_float"));if(Ge!==Nh&&ze.convert(Ge)!==H.getParameter(H.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ge===hu&&(xe.isWebGL2||_e.has("OES_texture_float")||_e.has("WEBGL_color_buffer_float")))&&!Re){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}j>=0&&j<=O.width-ie&&re>=0&&re<=O.height-P&&H.readPixels(j,re,ie,P,ze.convert(Oe),ze.convert(Ge),W)}finally{let ce=w!==null?Ne.get(w).__webglFramebuffer:null;Le.bindFramebuffer(H.FRAMEBUFFER,ce)}}},this.copyFramebufferToTexture=function(O,j,re=0){let ie=Math.pow(2,-re),P=Math.floor(j.image.width*ie),W=Math.floor(j.image.height*ie);Ve.setTexture2D(j,0),H.copyTexSubImage2D(H.TEXTURE_2D,re,0,0,O.x,O.y,P,W),Le.unbindTexture()},this.copyTextureToTexture=function(O,j,re,ie=0){let P=j.image.width,W=j.image.height,ee=ze.convert(re.format),ge=ze.convert(re.type);Ve.setTexture2D(re,0),H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,re.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,re.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,re.unpackAlignment),j.isDataTexture?H.texSubImage2D(H.TEXTURE_2D,ie,O.x,O.y,P,W,ee,ge,j.image.data):j.isCompressedTexture?H.compressedTexSubImage2D(H.TEXTURE_2D,ie,O.x,O.y,j.mipmaps[0].width,j.mipmaps[0].height,ee,j.mipmaps[0].data):H.texSubImage2D(H.TEXTURE_2D,ie,O.x,O.y,ee,ge,j.image),ie===0&&re.generateMipmaps&&H.generateMipmap(H.TEXTURE_2D),Le.unbindTexture()},this.copyTextureToTexture3D=function(O,j,re,ie,P=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let W=Math.round(O.max.x-O.min.x),ee=Math.round(O.max.y-O.min.y),ge=O.max.z-O.min.z+1,ce=ze.convert(ie.format),Oe=ze.convert(ie.type),Ge;if(ie.isData3DTexture)Ve.setTexture3D(ie,0),Ge=H.TEXTURE_3D;else if(ie.isDataArrayTexture||ie.isCompressedArrayTexture)Ve.setTexture2DArray(ie,0),Ge=H.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}H.pixelStorei(H.UNPACK_FLIP_Y_WEBGL,ie.flipY),H.pixelStorei(H.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ie.premultiplyAlpha),H.pixelStorei(H.UNPACK_ALIGNMENT,ie.unpackAlignment);let Re=H.getParameter(H.UNPACK_ROW_LENGTH),pt=H.getParameter(H.UNPACK_IMAGE_HEIGHT),mt=H.getParameter(H.UNPACK_SKIP_PIXELS),$e=H.getParameter(H.UNPACK_SKIP_ROWS),at=H.getParameter(H.UNPACK_SKIP_IMAGES),wt=re.isCompressedTexture?re.mipmaps[P]:re.image;H.pixelStorei(H.UNPACK_ROW_LENGTH,wt.width),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,wt.height),H.pixelStorei(H.UNPACK_SKIP_PIXELS,O.min.x),H.pixelStorei(H.UNPACK_SKIP_ROWS,O.min.y),H.pixelStorei(H.UNPACK_SKIP_IMAGES,O.min.z),re.isDataTexture||re.isData3DTexture?H.texSubImage3D(Ge,P,j.x,j.y,j.z,W,ee,ge,ce,Oe,wt.data):ie.isCompressedArrayTexture?H.compressedTexSubImage3D(Ge,P,j.x,j.y,j.z,W,ee,ge,ce,wt.data):H.texSubImage3D(Ge,P,j.x,j.y,j.z,W,ee,ge,ce,Oe,wt),H.pixelStorei(H.UNPACK_ROW_LENGTH,Re),H.pixelStorei(H.UNPACK_IMAGE_HEIGHT,pt),H.pixelStorei(H.UNPACK_SKIP_PIXELS,mt),H.pixelStorei(H.UNPACK_SKIP_ROWS,$e),H.pixelStorei(H.UNPACK_SKIP_IMAGES,at),P===0&&ie.generateMipmaps&&H.generateMipmap(Ge),Le.unbindTexture()},this.initTexture=function(O){O.isCubeTexture?Ve.setTextureCube(O,0):O.isData3DTexture?Ve.setTexture3D(O,0):O.isDataArrayTexture||O.isCompressedArrayTexture?Ve.setTexture2DArray(O,0):Ve.setTexture2D(O,0),Le.unbindTexture()},this.resetState=function(){M=0,S=0,w=null,Le.reset(),we.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return _c}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=e===Ok?"display-p3":"srgb",t.unpackColorSpace=Jr.workingColorSpace===OR?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}},yk=class extends gk{};yk.prototype.isWebGL1Renderer=!0;var Roe=new ye,Loe=new Pr,Poe=new Pr,ZUe=new ye,Doe=new Ht,jC=new ye,XB=new zh,Ioe=new Ht,YB=new IM,_R=class extends so{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=uae,this.bindMatrix=new Ht,this.bindMatrixInverse=new Ht,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){let e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Fh),this.boundingBox.makeEmpty();let t=e.getAttribute("position");for(let i=0;il)continue;h.applyMatrix4(this.matrixWorld);let T=e.ray.origin.distanceTo(h);Te.far||t.push({distance:T,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{let v=Math.max(0,o.start),_=Math.min(m.count,o.start+o.count);for(let y=v,x=_-1;yl)continue;h.applyMatrix4(this.matrixWorld);let S=e.ray.origin.distanceTo(h);Se.far||t.push({distance:S,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){let t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){let n=t[i[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=n.length;a0)l=n-1;else{l=n;break}if(n=l,i[n]===o)return n/(a-1);let c=i[n],h=i[n+1]-c,p=(o-c)/h;return(n+p)/(a-1)}getTangent(e,t){let n=e-1e-4,a=e+1e-4;n<0&&(n=0),a>1&&(a=1);let o=this.getPoint(n),s=this.getPoint(a),l=t||(o.isVector2?new yr:new ye);return l.copy(s).sub(o).normalize(),l}getTangentAt(e,t){let i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){let i=new ye,n=[],a=[],o=[],s=new ye,l=new Ht;for(let p=0;p<=e;p++){let d=p/e;n[p]=this.getTangentAt(d,new ye)}a[0]=new ye,o[0]=new ye;let u=Number.MAX_VALUE,c=Math.abs(n[0].x),f=Math.abs(n[0].y),h=Math.abs(n[0].z);c<=u&&(u=c,i.set(1,0,0)),f<=u&&(u=f,i.set(0,1,0)),h<=u&&i.set(0,0,1),s.crossVectors(n[0],i).normalize(),a[0].crossVectors(n[0],s),o[0].crossVectors(n[0],a[0]);for(let p=1;p<=e;p++){if(a[p]=a[p-1].clone(),o[p]=o[p-1].clone(),s.crossVectors(n[p-1],n[p]),s.length()>Number.EPSILON){s.normalize();let d=Math.acos(In(n[p-1].dot(n[p]),-1,1));a[p].applyMatrix4(l.makeRotationAxis(s,d))}o[p].crossVectors(n[p],a[p])}if(t===!0){let p=Math.acos(In(a[0].dot(a[e]),-1,1));p/=e,n[0].dot(s.crossVectors(a[0],a[e]))>0&&(p=-p);for(let d=1;d<=e;d++)a[d].applyMatrix4(l.makeRotationAxis(n[d],p*d)),o[d].crossVectors(n[d],a[d])}return{tangents:n,normals:a,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}};var KUe={triangulate:function(r,e,t=2){let i=e&&e.length,n=i?e[0]*t:r.length,a=use(r,0,n,t,!0),o=[];if(!a||a.next===a.prev)return o;let s,l,u,c,f,h,p;if(i&&(a=tOe(r,e,a,t)),r.length>80*t){s=u=r[0],l=c=r[1];for(let d=t;du&&(u=f),h>c&&(c=h);p=Math.max(u-s,c-l),p=p!==0?32767/p:0}return FM(a,o,t,s,l,p,0),o}};function use(r,e,t,i,n){let a,o;if(n===hOe(r,e,t,i)>0)for(a=e;a=e;a-=i)o=zoe(a,r[a],r[a+1],o);return o&&zR(o,o.next)&&(BM(o),o=o.next),o}function dm(r,e){if(!r)return r;e||(e=r);let t=r,i;do if(i=!1,!t.steiner&&(zR(t,t.next)||Si(t.prev,t,t.next)===0)){if(BM(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function FM(r,e,t,i,n,a,o){if(!r)return;!o&&a&&oOe(r,i,n,a);let s=r,l,u;for(;r.prev!==r.next;){if(l=r.prev,u=r.next,a?$Ue(r,i,n,a):JUe(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(u.i/t|0),BM(r),r=u.next,s=u.next;continue}if(r=u,r===s){o?o===1?(r=QUe(dm(r),e,t),FM(r,e,t,i,n,a,2)):o===2&&eOe(r,e,t,i,n,a):FM(dm(r),e,t,i,n,a,1);break}}}function JUe(r){let e=r.prev,t=r,i=r.next;if(Si(e,t,i)>=0)return!1;let n=e.x,a=t.x,o=i.x,s=e.y,l=t.y,u=i.y,c=na?n>o?n:o:a>o?a:o,p=s>l?s>u?s:u:l>u?l:u,d=i.next;for(;d!==e;){if(d.x>=c&&d.x<=h&&d.y>=f&&d.y<=p&&n0(n,s,a,l,o,u,d.x,d.y)&&Si(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function $Ue(r,e,t,i){let n=r.prev,a=r,o=r.next;if(Si(n,a,o)>=0)return!1;let s=n.x,l=a.x,u=o.x,c=n.y,f=a.y,h=o.y,p=sl?s>u?s:u:l>u?l:u,m=c>f?c>h?c:h:f>h?f:h,v=xk(p,d,e,t,i),_=xk(g,m,e,t,i),y=r.prevZ,x=r.nextZ;for(;y&&y.z>=v&&x&&x.z<=_;){if(y.x>=p&&y.x<=g&&y.y>=d&&y.y<=m&&y!==n&&y!==o&&n0(s,c,l,f,u,h,y.x,y.y)&&Si(y.prev,y,y.next)>=0||(y=y.prevZ,x.x>=p&&x.x<=g&&x.y>=d&&x.y<=m&&x!==n&&x!==o&&n0(s,c,l,f,u,h,x.x,x.y)&&Si(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;y&&y.z>=v;){if(y.x>=p&&y.x<=g&&y.y>=d&&y.y<=m&&y!==n&&y!==o&&n0(s,c,l,f,u,h,y.x,y.y)&&Si(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=_;){if(x.x>=p&&x.x<=g&&x.y>=d&&x.y<=m&&x!==n&&x!==o&&n0(s,c,l,f,u,h,x.x,x.y)&&Si(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function QUe(r,e,t){let i=r;do{let n=i.prev,a=i.next.next;!zR(n,a)&&cse(n,i,i.next,a)&&zM(n,a)&&zM(a,n)&&(e.push(n.i/t|0),e.push(i.i/t|0),e.push(a.i/t|0),BM(i),BM(i.next),i=r=a),i=i.next}while(i!==r);return dm(i)}function eOe(r,e,t,i,n,a){let o=r;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&uOe(o,s)){let l=fse(o,s);o=dm(o,o.next),l=dm(l,l.next),FM(o,e,t,i,n,a,0),FM(l,e,t,i,n,a,0);return}s=s.next}o=o.next}while(o!==r)}function tOe(r,e,t,i){let n=[],a,o,s,l,u;for(a=0,o=e.length;a=t.next.y&&t.next.y!==t.y){let h=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=a&&h>i&&(i=h,n=t.x=t.x&&t.x>=l&&a!==t.x&&n0(on.x||t.x===n.x&&aOe(n,t)))&&(n=t,c=f)),t=t.next;while(t!==s);return n}function aOe(r,e){return Si(r.prev,r,e.prev)<0&&Si(e.next,r,r.next)<0}function oOe(r,e,t,i){let n=r;do n.z===0&&(n.z=xk(n.x,n.y,e,t,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==r);n.prevZ.nextZ=null,n.prevZ=null,sOe(n)}function sOe(r){let e,t,i,n,a,o,s,l,u=1;do{for(t=r,r=null,a=null,o=0;t;){for(o++,i=t,s=0,e=0;e0||l>0&&i;)s!==0&&(l===0||!i||t.z<=i.z)?(n=t,t=t.nextZ,s--):(n=i,i=i.nextZ,l--),a?a.nextZ=n:r=n,n.prevZ=a,a=n;t=i}a.nextZ=null,u*=2}while(o>1);return r}function xk(r,e,t,i,n){return r=(r-t)*n|0,e=(e-i)*n|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function lOe(r){let e=r,t=r;do(e.x=(r-o)*(a-s)&&(r-o)*(i-s)>=(t-o)*(e-s)&&(t-o)*(a-s)>=(n-o)*(i-s)}function uOe(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!cOe(r,e)&&(zM(r,e)&&zM(e,r)&&fOe(r,e)&&(Si(r.prev,r,e.prev)||Si(r,e.prev,e))||zR(r,e)&&Si(r.prev,r,r.next)>0&&Si(e.prev,e,e.next)>0)}function Si(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function zR(r,e){return r.x===e.x&&r.y===e.y}function cse(r,e,t,i){let n=$C(Si(r,e,t)),a=$C(Si(r,e,i)),o=$C(Si(t,i,r)),s=$C(Si(t,i,e));return!!(n!==a&&o!==s||n===0&&JC(r,t,e)||a===0&&JC(r,i,e)||o===0&&JC(t,r,i)||s===0&&JC(t,e,i))}function JC(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function $C(r){return r>0?1:r<0?-1:0}function cOe(r,e){let t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&cse(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function zM(r,e){return Si(r.prev,r,r.next)<0?Si(r,e,r.next)>=0&&Si(r,r.prev,e)>=0:Si(r,e,r.prev)<0||Si(r,r.next,e)<0}function fOe(r,e){let t=r,i=!1,n=(r.x+e.x)/2,a=(r.y+e.y)/2;do t.y>a!=t.next.y>a&&t.next.y!==t.y&&n<(t.next.x-t.x)*(a-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function fse(r,e){let t=new Sk(r.i,r.x,r.y),i=new Sk(e.i,e.x,e.y),n=r.next,a=e.prev;return r.next=e,e.prev=r,t.next=n,n.prev=t,i.next=t,t.prev=i,a.next=i,i.prev=a,i}function zoe(r,e,t,i){let n=new Sk(r,e,t);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function BM(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Sk(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function hOe(r,e,t,i){let n=0;for(let a=e,o=t-i;a2&&r[e-1].equals(r[0])&&r.pop()}function koe(r,e){for(let t=0;t=a)){let s=t[1];e=a)break t}o=i,i=0;break r}break e}for(;i>>1;et;)--o;if(++o,a!==0||o!==n){a>=o&&(o=Math.max(o,1),a=o-1);let s=this.getValueSize();this.times=i.slice(a,o),this.values=this.values.slice(a*s,o*s)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let i=this.times,n=this.values,a=i.length;a===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let s=0;s!==a;s++){let l=i[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,o),e=!1;break}o=l}if(n!==void 0&&pOe(n))for(let s=0,l=n.length;s!==l;++s){let u=n[s];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,u),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),n=this.getInterpolation()===xB,a=e.length-1,o=1;for(let s=1;s0){e[o]=e[a];for(let s=a*i,l=o*i,u=0;u!==i;++u)t[l+u]=t[s+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),i=this.constructor,n=new i(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}};Ls.prototype.TimeBufferType=Float32Array;Ls.prototype.ValueBufferType=Float32Array;Ls.prototype.DefaultInterpolation=rR;var Bh=class extends Ls{};Bh.prototype.ValueTypeName="bool";Bh.prototype.ValueBufferType=Array;Bh.prototype.DefaultInterpolation=tR;Bh.prototype.InterpolantFactoryMethodLinear=void 0;Bh.prototype.InterpolantFactoryMethodSmooth=void 0;var TR=class extends Ls{};TR.prototype.ValueTypeName="color";var kh=class extends Ls{};kh.prototype.ValueTypeName="number";var Tk=class extends y0{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){let a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=(i-t)/(n-t),u=e*s;for(let c=u+s;u!==c;u+=4)On.slerpFlat(a,0,o,u-s,o,u,l);return a}},du=class extends Ls{InterpolantFactoryMethodLinear(e){return new Tk(this.times,this.values,this.getValueSize(),e)}};du.prototype.ValueTypeName="quaternion";du.prototype.DefaultInterpolation=rR;du.prototype.InterpolantFactoryMethodSmooth=void 0;var Vh=class extends Ls{};Vh.prototype.ValueTypeName="string";Vh.prototype.ValueBufferType=Array;Vh.prototype.DefaultInterpolation=tR;Vh.prototype.InterpolantFactoryMethodLinear=void 0;Vh.prototype.InterpolantFactoryMethodSmooth=void 0;var Gh=class extends Ls{};Gh.prototype.ValueTypeName="vector";var ER=class{constructor(e,t=-1,i,n=TPe){this.name=e,this.tracks=i,this.duration=t,this.blendMode=n,this.uuid=Wh(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],i=e.tracks,n=1/(e.fps||1);for(let o=0,s=i.length;o!==s;++o)t.push(vOe(i[o]).scale(n));let a=new this(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a}static toJSON(e){let t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let a=0,o=i.length;a!==o;++a)t.push(Ls.toJSON(i[a]));return n}static CreateFromMorphTargetSequence(e,t,i,n){let a=t.length,o=[];for(let s=0;s1){let f=c[1],h=n[f];h||(n[f]=h=[]),h.push(u)}}let o=[];for(let s in n)o.push(this.CreateFromMorphTargetSequence(s,n[s],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(f,h,p,d,g){if(p.length!==0){let m=[],v=[];hse(p,m,v,d),m.length!==0&&g.push(new f(h,m,v))}},n=[],a=e.name||"default",o=e.fps||30,s=e.blendMode,l=e.length||-1,u=e.hierarchy||[];for(let f=0;f{class r{constructor(t){this.manager=t!==void 0?t:gOe,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,i){let n=this;return new Promise(function(a,o){n.load(t,a,i,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}return r.DEFAULT_MATERIAL_NAME="__DEFAULT",r})(),mc={},Ak=class extends Error{constructor(e,t){super(e),this.response=t}},CR=class extends mm{constructor(e){super(e)}load(e,t,i,n){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let a=AR.get(e);if(a!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(a),this.manager.itemEnd(e)},0),a;if(mc[e]!==void 0){mc[e].push({onLoad:t,onProgress:i,onError:n});return}mc[e]=[],mc[e].push({onLoad:t,onProgress:i,onError:n});let o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;let c=mc[e],f=u.body.getReader(),h=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),p=h?parseInt(h):0,d=p!==0,g=0,m=new ReadableStream({start(v){_();function _(){f.read().then(({done:y,value:x})=>{if(y)v.close();else{g+=x.byteLength;let M=new ProgressEvent("progress",{lengthComputable:d,loaded:g,total:p});for(let S=0,w=c.length;S{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(c=>new DOMParser().parseFromString(c,s));case"json":return u.json();default:if(s===void 0)return u.text();{let f=/charset="?([^;"\s]*)"?/i.exec(s),h=f&&f[1]?f[1].toLowerCase():void 0,p=new TextDecoder(h);return u.arrayBuffer().then(d=>p.decode(d))}}}).then(u=>{AR.add(e,u);let c=mc[e];delete mc[e];for(let f=0,h=c.length;f{let c=mc[e];if(c===void 0)throw this.manager.itemError(e),u;delete mc[e];for(let f=0,h=c.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}};var Ck=class extends mm{constructor(e){super(e)}load(e,t,i,n){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let a=this,o=AR.get(e);if(o!==void 0)return a.manager.itemStart(e),setTimeout(function(){t&&t(o),a.manager.itemEnd(e)},0),o;let s=DM("img");function l(){c(),AR.add(e,this),t&&t(this),a.manager.itemEnd(e)}function u(f){c(),n&&n(f),a.manager.itemError(e),a.manager.itemEnd(e)}function c(){s.removeEventListener("load",l,!1),s.removeEventListener("error",u,!1)}return s.addEventListener("load",l,!1),s.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(s.crossOrigin=this.crossOrigin),a.manager.itemStart(e),s.src=e,s}};var RR=class extends mm{constructor(e){super(e)}load(e,t,i,n){let a=new Vo,o=new Ck(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(s){a.image=s,a.needsUpdate=!0,t!==void 0&&t(a)},i,n),a}},_0=class extends ia{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new er(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}};var ZB=new Ht,Goe=new ye,Hoe=new ye,kM=class{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new yr(512,512),this.map=null,this.mapPass=null,this.matrix=new Ht,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new UM,this._frameExtents=new yr(1,1),this._viewportCount=1,this._viewports=[new Pr(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,i=this.matrix;Goe.setFromMatrixPosition(e.matrixWorld),t.position.copy(Goe),Hoe.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Hoe),t.updateMatrixWorld(),ZB.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ZB),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(ZB)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}},Rk=class extends kM{constructor(){super(new Nn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){let t=this.camera,i=h0*2*e.angle*this.focus,n=this.mapSize.width/this.mapSize.height,a=e.distance||t.far;(i!==t.fov||n!==t.aspect||a!==t.far)&&(t.fov=i,t.aspect=n,t.far=a,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}},LR=class extends _0{constructor(e,t,i=0,n=Math.PI/3,a=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ia.DEFAULT_UP),this.updateMatrix(),this.target=new ia,this.distance=i,this.angle=n,this.penumbra=a,this.decay=o,this.map=null,this.shadow=new Rk}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}},Woe=new Ht,EM=new ye,jB=new ye,Lk=class extends kM{constructor(){super(new Nn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new yr(4,2),this._viewportCount=6,this._viewports=[new Pr(2,1,1,1),new Pr(0,1,1,1),new Pr(3,1,1,1),new Pr(1,1,1,1),new Pr(3,0,1,1),new Pr(1,0,1,1)],this._cubeDirections=[new ye(1,0,0),new ye(-1,0,0),new ye(0,0,1),new ye(0,0,-1),new ye(0,1,0),new ye(0,-1,0)],this._cubeUps=[new ye(0,1,0),new ye(0,1,0),new ye(0,1,0),new ye(0,1,0),new ye(0,0,1),new ye(0,0,-1)]}updateMatrices(e,t=0){let i=this.camera,n=this.matrix,a=e.distance||i.far;a!==i.far&&(i.far=a,i.updateProjectionMatrix()),EM.setFromMatrixPosition(e.matrixWorld),i.position.copy(EM),jB.copy(i.position),jB.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(jB),i.updateMatrixWorld(),n.makeTranslation(-EM.x,-EM.y,-EM.z),Woe.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Woe)}},VM=class extends _0{constructor(e,t,i=0,n=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=n,this.shadow=new Lk}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}},Pk=class extends kM{constructor(){super(new m0(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}},PR=class extends _0{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ia.DEFAULT_UP),this.updateMatrix(),this.target=new ia,this.shadow=new Pk}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}},DR=class extends _0{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}};var IR=class{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,n=e.length;i{class r{constructor(t,i,n){this.path=i,this.parsedPath=n||r.parseTrackName(i),this.node=r.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,n){return t&&t.isAnimationObjectGroup?new r.Composite(t,i,n):new r(t,i,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(yOe,"")}static parseTrackName(t){let i=wOe.exec(t);if(i===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},a=n.nodeName&&n.nodeName.lastIndexOf(".");if(a!==void 0&&a!==-1){let o=n.nodeName.substring(a+1);TOe.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,a),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,i){if(i===void 0||i===""||i==="."||i===-1||i===t.name||i===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(i);if(n!==void 0)return n}if(t.children){let n=function(o){for(let s=0;s>>1|(zr&21845)<<1,bc=(bc&52428)>>>2|(bc&13107)<<2,bc=(bc&61680)>>>4|(bc&3855)<<4,Wk[zr]=((bc&65280)>>>8|(bc&255)<<8)>>>1;var bc,zr,GM=function(r,e,t){for(var i=r.length,n=0,a=new Xh(e);n>>l]=u}else for(s=new Xh(i),n=0;n>>15-r[n]);return s},HM=new Ps(288);for(zr=0;zr<144;++zr)HM[zr]=8;var zr;for(zr=144;zr<256;++zr)HM[zr]=9;var zr;for(zr=256;zr<280;++zr)HM[zr]=7;var zr;for(zr=280;zr<288;++zr)HM[zr]=8;var zr,xse=new Ps(32);for(zr=0;zr<32;++zr)xse[zr]=5;var zr;var LOe=GM(HM,9,1);var POe=GM(xse,5,1),Vk=function(r){for(var e=r[0],t=1;te&&(e=r[t]);return e},_l=function(r,e,t){var i=e/8|0;return(r[i]|r[i+1]<<8)>>(e&7)&t},Gk=function(r,e){var t=e/8|0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>(e&7)},DOe=function(r){return(r/8|0)+(r&7&&1)},IOe=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var i=new(r instanceof Xh?Xh:r instanceof Hk?Hk:Ps)(t-e);return i.set(r.subarray(e,t)),i},NOe=function(r,e,t){var i=r.length;if(!i||t&&!t.l&&i<5)return e||new Ps(0);var n=!e||t,a=!t||t.i;t||(t={}),e||(e=new Ps(i*3));var o=function(ae){var ve=e.length;if(ae>ve){var ue=new Ps(Math.max(ve*2,ae));ue.set(e),e=ue}},s=t.f||0,l=t.p||0,u=t.b||0,c=t.l,f=t.d,h=t.m,p=t.n,d=i*8;do{if(!c){t.f=s=_l(r,l,1);var g=_l(r,l+1,3);if(l+=3,g)if(g==1)c=LOe,f=POe,h=9,p=5;else if(g==2){var y=_l(r,l,31)+257,x=_l(r,l+10,15)+4,M=y+_l(r,l+5,31)+1;l+=14;for(var S=new Ps(M),w=new Ps(19),T=0;T>>4;if(m<16)S[T++]=m;else{var R=0,A=0;for(m==16?(A=3+_l(r,l,3),l+=2,R=S[T-1]):m==17?(A=3+_l(r,l,7),l+=3):m==18&&(A=11+_l(r,l,127),l+=7);A--;)S[T++]=R}}var D=S.subarray(0,y),U=S.subarray(y);h=Vk(D),p=Vk(U),c=GM(D,h,1),f=GM(U,p,1)}else throw"invalid block type";else{var m=DOe(l)+4,v=r[m-4]|r[m-3]<<8,_=m+v;if(_>i){if(a)throw"unexpected EOF";break}n&&o(u+v),e.set(r.subarray(m,_),u),t.b=u+=v,t.p=l=_*8;continue}if(l>d){if(a)throw"unexpected EOF";break}}n&&o(u+131072);for(var B=(1<>>4;if(l+=R&15,l>d){if(a)throw"unexpected EOF";break}if(!R)throw"invalid length/literal";if(G<256)e[u++]=G;else if(G==256){k=l,c=null;break}else{var Y=G-254;if(G>264){var T=G-257,J=dse[T];Y=_l(r,l,(1<>>4;if(!Q)throw"invalid distance";l+=Q&15;var U=ROe[V];if(V>3){var J=mse[V];U+=Gk(r,l)&(1<d){if(a)throw"unexpected EOF";break}n&&o(u+131072);for(var K=u+Y;u>>4>7||(r[0]<<8|r[1])%31)throw"invalid zlib data";if(r[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Sse(r,e){return NOe((OOe(r),r.subarray(2,-4)),e)}var FOe=typeof TextDecoder<"u"&&new TextDecoder,zOe=0;try{FOe.decode(UOe,{stream:!0}),zOe=1}catch{}function Mse(r,e,t){let i=t.length-r-1;if(e>=t[i])return i-1;if(e<=t[r])return r;let n=r,a=i,o=Math.floor((n+a)/2);for(;e=t[o+1];)e=g&&(d[p][0]=d[h][0]/s[_+1][v],m=d[p][0]*s[v][_]);let y=v>=-1?1:-v,x=f-1<=_?g-1:t-f;for(let S=y;S<=x;++S)d[p][S]=(d[h][S]-d[h][S-1])/s[_+1][v+S],m+=d[p][S]*s[v+S][_];f<=_&&(d[p][g]=-d[h][g-1]/s[_+1][f],m+=d[p][g]*s[f][_]),o[g][f]=m;let M=h;h=p,p=M}}let c=t;for(let f=1;f<=i;++f){for(let h=0;h<=t;++h)o[f][h]*=c;c*=t-f}return o}function GOe(r,e,t,i,n){let a=n0,l=typeof a.Content=="string"&&a.Content!=="";if(s||l){let u=this.parseImage(i[n]);t[a.RelativeFilename||a.Filename]=u}}}}for(let i in e){let n=e[i];t[n]!==void 0?e[i]=t[n]:e[i]=e[i].split("\\").pop()}return e}parseImage(e){let t=e.Content,i=e.RelativeFilename||e.Filename,n=i.slice(i.lastIndexOf(".")+1).toLowerCase(),a;switch(n){case"bmp":a="image/bmp";break;case"jpg":case"jpeg":a="image/jpeg";break;case"png":a="image/png";break;case"tif":a="image/tiff";break;case"tga":this.manager.getHandler(".tga")===null&&console.warn("FBXLoader: TGA loader not found, skipping ",i),a="image/tga";break;default:console.warn('FBXLoader: Image type "'+n+'" is not supported.');return}if(typeof t=="string")return"data:"+a+";base64,"+t;{let o=new Uint8Array(t);return window.URL.createObjectURL(new Blob([o],{type:a}))}}parseTextures(e){let t=new Map;if("Texture"in _r.Objects){let i=_r.Objects.Texture;for(let n in i){let a=this.parseTexture(i[n],e);t.set(parseInt(n),a)}}return t}parseTexture(e,t){let i=this.loadTexture(e,t);i.ID=e.id,i.name=e.attrName;let n=e.WrapModeU,a=e.WrapModeV,o=n!==void 0?n.value:0,s=a!==void 0?a.value:0;if(i.wrapS=o===0?c0:oo,i.wrapT=s===0?c0:oo,"Scaling"in e){let l=e.Scaling.value;i.repeat.x=l[0],i.repeat.y=l[1]}if("Translation"in e){let l=e.Translation.value;i.offset.x=l[0],i.offset.y=l[1]}return i}loadTexture(e,t){let i,n=this.textureLoader.path,a=Fi.get(e.id).children;a!==void 0&&a.length>0&&t[a[0].ID]!==void 0&&(i=t[a[0].ID],(i.indexOf("blob:")===0||i.indexOf("data:")===0)&&this.textureLoader.setPath(void 0));let o,s=e.FileName.slice(-3).toLowerCase();if(s==="tga"){let l=this.manager.getHandler(".tga");l===null?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),o=new Vo):(l.setPath(this.textureLoader.path),o=l.load(i))}else if(s==="dds"){let l=this.manager.getHandler(".dds");l===null?(console.warn("FBXLoader: DDS loader not found, creating placeholder texture for",e.RelativeFilename),o=new Vo):(l.setPath(this.textureLoader.path),o=l.load(i))}else s==="psd"?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),o=new Vo):o=this.textureLoader.load(i);return this.textureLoader.setPath(n),o}parseMaterials(e){let t=new Map;if("Material"in _r.Objects){let i=_r.Objects.Material;for(let n in i){let a=this.parseMaterial(i[n],e);a!==null&&t.set(parseInt(n),a)}}return t}parseMaterial(e,t){let i=e.id,n=e.attrName,a=e.ShadingModel;if(typeof a=="object"&&(a=a.value),!Fi.has(i))return null;let o=this.parseParameters(e,t,i),s;switch(a.toLowerCase()){case"phong":s=new g0;break;case"lambert":s=new wR;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',a),s=new g0;break}return s.setValues(o),s.name=n,s}parseParameters(e,t,i){let n={};e.BumpFactor&&(n.bumpScale=e.BumpFactor.value),e.Diffuse?n.color=new er().fromArray(e.Diffuse.value).convertSRGBToLinear():e.DiffuseColor&&(e.DiffuseColor.type==="Color"||e.DiffuseColor.type==="ColorRGB")&&(n.color=new er().fromArray(e.DiffuseColor.value).convertSRGBToLinear()),e.DisplacementFactor&&(n.displacementScale=e.DisplacementFactor.value),e.Emissive?n.emissive=new er().fromArray(e.Emissive.value).convertSRGBToLinear():e.EmissiveColor&&(e.EmissiveColor.type==="Color"||e.EmissiveColor.type==="ColorRGB")&&(n.emissive=new er().fromArray(e.EmissiveColor.value).convertSRGBToLinear()),e.EmissiveFactor&&(n.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(n.opacity=parseFloat(e.Opacity.value)),n.opacity<1&&(n.transparent=!0),e.ReflectionFactor&&(n.reflectivity=e.ReflectionFactor.value),e.Shininess&&(n.shininess=e.Shininess.value),e.Specular?n.specular=new er().fromArray(e.Specular.value).convertSRGBToLinear():e.SpecularColor&&e.SpecularColor.type==="Color"&&(n.specular=new er().fromArray(e.SpecularColor.value).convertSRGBToLinear());let a=this;return Fi.get(i).children.forEach(function(o){let s=o.relationship;switch(s){case"Bump":n.bumpMap=a.getTexture(t,o.ID);break;case"Maya|TEX_ao_map":n.aoMap=a.getTexture(t,o.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":n.map=a.getTexture(t,o.ID),n.map!==void 0&&(n.map.colorSpace=Ma);break;case"DisplacementColor":n.displacementMap=a.getTexture(t,o.ID);break;case"EmissiveColor":n.emissiveMap=a.getTexture(t,o.ID),n.emissiveMap!==void 0&&(n.emissiveMap.colorSpace=Ma);break;case"NormalMap":case"Maya|TEX_normal_map":n.normalMap=a.getTexture(t,o.ID);break;case"ReflectionColor":n.envMap=a.getTexture(t,o.ID),n.envMap!==void 0&&(n.envMap.mapping=LM,n.envMap.colorSpace=Ma);break;case"SpecularColor":n.specularMap=a.getTexture(t,o.ID),n.specularMap!==void 0&&(n.specularMap.colorSpace=Ma);break;case"TransparentColor":case"TransparencyFactor":n.alphaMap=a.getTexture(t,o.ID),n.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",s);break}}),n}getTexture(e,t){return"LayeredTexture"in _r.Objects&&t in _r.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Fi.get(t).children[0].ID),e.get(t)}parseDeformers(){let e={},t={};if("Deformer"in _r.Objects){let i=_r.Objects.Deformer;for(let n in i){let a=i[n],o=Fi.get(parseInt(n));if(a.attrType==="Skin"){let s=this.parseSkeleton(o,i);s.ID=n,o.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),s.geometryID=o.parents[0].ID,e[n]=s}else if(a.attrType==="BlendShape"){let s={id:n};s.rawTargets=this.parseMorphTargets(o,i),s.id=n,o.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[n]=s}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){let i=[];return e.children.forEach(function(n){let a=t[n.ID];if(a.attrType!=="Cluster")return;let o={ID:n.ID,indices:[],weights:[],transformLink:new Ht().fromArray(a.TransformLink.a)};"Indexes"in a&&(o.indices=a.Indexes.a,o.weights=a.Weights.a),i.push(o)}),{rawBones:i,bones:[]}}parseMorphTargets(e,t){let i=[];for(let n=0;n1?o=s:s.length>0?o=s[0]:(o=new g0({name:mm.DEFAULT_MATERIAL_NAME,color:13421772}),s.push(o)),"color"in a.attributes&&s.forEach(function(l){l.vertexColors=!0}),a.FBX_Deformer?(n=new _R(a,o),n.normalizeSkinWeights()):n=new so(a,o),n}createCurve(e,t){let i=e.children.reduce(function(a,o){return t.has(o.ID)&&(a=t.get(o.ID)),a},null),n=new OM({name:mm.DEFAULT_MATERIAL_NAME,color:3342591,linewidth:1});return new SR(i,n)}getTransformData(e,t){let i={};"InheritType"in t&&(i.inheritType=parseInt(t.InheritType.value)),"RotationOrder"in t?i.eulerOrder=Ase(t.RotationOrder.value):i.eulerOrder="ZYX","Lcl_Translation"in t&&(i.translation=t.Lcl_Translation.value),"PreRotation"in t&&(i.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(i.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(i.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(i.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(i.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(i.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(i.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(i.rotationPivot=t.RotationPivot.value),e.userData.transformData=i}setLookAtProperties(e,t){"LookAtProperty"in t&&Fi.get(e.ID).children.forEach(function(n){if(n.relationship==="LookAtProperty"){let a=_r.Objects.Model[n.ID];if("Lcl_Translation"in a){let o=a.Lcl_Translation.value;e.target!==void 0?(e.target.position.fromArray(o),ba.add(e.target)):e.lookAt(new ye().fromArray(o))}}})}bindSkeleton(e,t,i){let n=this.parsePoseNodes();for(let a in e){let o=e[a];Fi.get(parseInt(o.ID)).parents.forEach(function(l){if(t.has(l.ID)){let u=l.ID;Fi.get(u).parents.forEach(function(f){i.has(f.ID)&&i.get(f.ID).bind(new xR(o.bones),n[f.ID])})}})}}parsePoseNodes(){let e={};if("Pose"in _r.Objects){let t=_r.Objects.Pose;for(let i in t)if(t[i].attrType==="BindPose"&&t[i].NbPoseNodes>0){let n=t[i].PoseNode;Array.isArray(n)?n.forEach(function(a){e[a.Node]=new Ht().fromArray(a.Matrix.a)}):e[n.Node]=new Ht().fromArray(n.Matrix.a)}}return e}addGlobalSceneSettings(){if("GlobalSettings"in _r){if("AmbientColor"in _r.GlobalSettings){let e=_r.GlobalSettings.AmbientColor.value,t=e[0],i=e[1],n=e[2];if(t!==0||i!==0||n!==0){let a=new er(t,i,n).convertSRGBToLinear();ba.add(new DR(a,1))}}"UnitScaleFactor"in _r.GlobalSettings&&(ba.userData.unitScaleFactor=_r.GlobalSettings.UnitScaleFactor.value)}}},Zk=class{constructor(){this.negativeMaterialIndices=!1}parse(e){let t=new Map;if("Geometry"in _r.Objects){let i=_r.Objects.Geometry;for(let n in i){let a=Fi.get(parseInt(n)),o=this.parseGeometry(a,i[n],e);t.set(parseInt(n),o)}}return this.negativeMaterialIndices===!0&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,i){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,i);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,i){let n=i.skeletons,a=[],o=e.parents.map(function(f){return _r.Objects.Model[f.ID]});if(o.length===0)return;let s=e.children.reduce(function(f,h){return n[h.ID]!==void 0&&(f=n[h.ID]),f},null);e.children.forEach(function(f){i.morphTargets[f.ID]!==void 0&&a.push(i.morphTargets[f.ID])});let l=o[0],u={};"RotationOrder"in l&&(u.eulerOrder=Ase(l.RotationOrder.value)),"InheritType"in l&&(u.inheritType=parseInt(l.InheritType.value)),"GeometricTranslation"in l&&(u.translation=l.GeometricTranslation.value),"GeometricRotation"in l&&(u.rotation=l.GeometricRotation.value),"GeometricScaling"in l&&(u.scale=l.GeometricScaling.value);let c=Ese(u);return this.genGeometry(t,s,a,c)}genGeometry(e,t,i,n){let a=new Rs;e.attrName&&(a.name=e.attrName);let o=this.parseGeoNode(e,t),s=this.genBuffers(o),l=new Un(s.vertex,3);if(l.applyMatrix4(n),a.setAttribute("position",l),s.colors.length>0&&a.setAttribute("color",new Un(s.colors,3)),t&&(a.setAttribute("skinIndex",new p0(s.weightsIndices,4)),a.setAttribute("skinWeight",new Un(s.vertexWeights,4)),a.FBX_Deformer=t),s.normal.length>0){let u=new dr().getNormalMatrix(n),c=new Un(s.normal,3);c.applyNormalMatrix(u),a.setAttribute("normal",c)}if(s.uvs.forEach(function(u,c){let f=c===0?"uv":`uv${c}`;a.setAttribute(f,new Un(s.uvs[c],2))}),o.material&&o.material.mappingType!=="AllSame"){let u=s.materialIndex[0],c=0;if(s.materialIndex.forEach(function(f,h){f!==u&&(a.addGroup(c,h-c,u),u=f,c=h)}),a.groups.length>0){let f=a.groups[a.groups.length-1],h=f.start+f.count;h!==s.materialIndex.length&&a.addGroup(h,s.materialIndex.length-h,u)}a.groups.length===0&&a.addGroup(0,s.materialIndex.length,s.materialIndex[0])}return this.addMorphTargets(a,e,i,n),a}parseGeoNode(e,t){let i={};if(i.vertexPositions=e.Vertices!==void 0?e.Vertices.a:[],i.vertexIndices=e.PolygonVertexIndex!==void 0?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(i.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(i.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(i.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){i.uv=[];let n=0;for(;e.LayerElementUV[n];)e.LayerElementUV[n].UV&&i.uv.push(this.parseUVs(e.LayerElementUV[n])),n++}return i.weightTable={},t!==null&&(i.skeleton=t,t.rawBones.forEach(function(n,a){n.indices.forEach(function(o,s){i.weightTable[o]===void 0&&(i.weightTable[o]=[]),i.weightTable[o].push({id:a,weight:n.weights[s]})})})),i}genBuffers(e){let t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},i=0,n=0,a=!1,o=[],s=[],l=[],u=[],c=[],f=[],h=this;return e.vertexIndices.forEach(function(p,d){let g,m=!1;p<0&&(p=p^-1,m=!0);let v=[],_=[];if(o.push(p*3,p*3+1,p*3+2),e.color){let y=kR(d,i,p,e.color);l.push(y[0],y[1],y[2])}if(e.skeleton){if(e.weightTable[p]!==void 0&&e.weightTable[p].forEach(function(y){_.push(y.weight),v.push(y.id)}),_.length>4){a||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),a=!0);let y=[0,0,0,0],x=[0,0,0,0];_.forEach(function(M,S){let w=M,T=v[S];x.forEach(function(C,b,E){if(w>C){E[b]=w,w=C;let I=y[b];y[b]=T,T=I}})}),v=y,_=x}for(;_.length<4;)_.push(0),v.push(0);for(let y=0;y<4;++y)c.push(_[y]),f.push(v[y])}if(e.normal){let y=kR(d,i,p,e.normal);s.push(y[0],y[1],y[2])}e.material&&e.material.mappingType!=="AllSame"&&(g=kR(d,i,p,e.material)[0],g<0&&(h.negativeMaterialIndices=!0,g=0)),e.uv&&e.uv.forEach(function(y,x){let M=kR(d,i,p,y);u[x]===void 0&&(u[x]=[]),u[x].push(M[0]),u[x].push(M[1])}),n++,m&&(h.genFace(t,e,o,g,s,l,u,c,f,n),i++,n=0,o=[],s=[],l=[],u=[],c=[],f=[])}),t}getNormalNewell(e){let t=new ye(0,0,0);for(let i=0;i.5?new ye(0,1,0):new ye(0,0,1)).cross(t).normalize(),a=t.clone().cross(n).normalize();return{normal:t,tangent:n,bitangent:a}}flattenVertex(e,t,i){return new yr(e.dot(t),e.dot(i))}genFace(e,t,i,n,a,o,s,l,u,c){let f;if(c>3){let h=[];for(let m=0;m1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");let o=e.get(a[0].ID);i[n]={name:t[n].attrName,layer:o}}return i}addClip(e){let t=[],i=this;return e.layer.forEach(function(n){t=t.concat(i.generateTracks(n))}),new ER(e.name,-1,t)}generateTracks(e){let t=[],i=new ye,n=new ye;if(e.transform&&e.transform.decompose(i,new On,n),i=i.toArray(),n=n.toArray(),e.T!==void 0&&Object.keys(e.T.curves).length>0){let a=this.generateVectorTrack(e.modelName,e.T.curves,i,"position");a!==void 0&&t.push(a)}if(e.R!==void 0&&Object.keys(e.R.curves).length>0){let a=this.generateRotationTrack(e.modelName,e.R.curves,e.preRotation,e.postRotation,e.eulerOrder);a!==void 0&&t.push(a)}if(e.S!==void 0&&Object.keys(e.S.curves).length>0){let a=this.generateVectorTrack(e.modelName,e.S.curves,n,"scale");a!==void 0&&t.push(a)}if(e.DeformPercent!==void 0){let a=this.generateMorphTrack(e);a!==void 0&&t.push(a)}return t}generateVectorTrack(e,t,i,n){let a=this.getTimesForAllAxes(t),o=this.getKeyframeTrackValues(a,t,i);return new Gh(e+"."+n,a,o)}generateRotationTrack(e,t,i,n,a){let o,s;if(t.x!==void 0&&t.y!==void 0&&t.z!==void 0){let f=this.interpolateRotations(t.x,t.y,t.z,a);o=f[0],s=f[1]}i!==void 0&&(i=i.map(na.degToRad),i.push(a),i=new Fn().fromArray(i),i=new On().setFromEuler(i)),n!==void 0&&(n=n.map(na.degToRad),n.push(a),n=new Fn().fromArray(n),n=new On().setFromEuler(n).invert());let l=new On,u=new Fn,c=[];if(!s||!o)return new du(e+".quaternion",[],[]);for(let f=0;f2&&new On().fromArray(c,(f-3)/3*4).dot(l)<0&&l.set(-l.x,-l.y,-l.z,-l.w),l.toArray(c,f/3*4);return new du(e+".quaternion",o,c)}generateMorphTrack(e){let t=e.DeformPercent.curves.morph,i=t.values.map(function(a){return a/100}),n=ba.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new kh(e.modelName+".morphTargetInfluences["+n+"]",t.times,i)}getTimesForAllAxes(e){let t=[];if(e.x!==void 0&&(t=t.concat(e.x.times)),e.y!==void 0&&(t=t.concat(e.y.times)),e.z!==void 0&&(t=t.concat(e.z.times)),t=t.sort(function(i,n){return i-n}),t.length>1){let i=1,n=t[0];for(let a=1;a=180||p[1]>=180||p[2]>=180){let g=Math.max(...p)/180,m=new Fn(...u,n),v=new Fn(...f,n),_=new On().setFromEuler(m),y=new On().setFromEuler(v);_.dot(y)&&y.set(-y.x,-y.y,-y.z,-y.w);let x=e.times[s-1],M=e.times[s]-x,S=new On,w=new Fn;for(let T=0;T<1;T+=1/g)S.copy(_.clone().slerp(y.clone(),T)),a.push(x+T*M),w.setFromQuaternion(S,n),o.push(w.x),o.push(w.y),o.push(w.z)}else a.push(e.times[s]),o.push(na.degToRad(e.values[s])),o.push(na.degToRad(t.values[s])),o.push(na.degToRad(i.values[s]))}return[a,o]}},Kk=class{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new HR,this.nodeStack=[],this.currentProp=[],this.currentPropName="";let t=this,i=e.split(/[\r\n]+/);return i.forEach(function(n,a){let o=n.match(/^[\s\t]*;/),s=n.match(/^[\s\t]*$/);if(o||s)return;let l=n.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),u=n.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),c=n.match("^\\t{"+(t.currentIndent-1)+"}}");l?t.parseNodeBegin(n,l):u?t.parseNodeProperty(n,u,i[++a]):c?t.popStack():n.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(n)}),this.allNodes}parseNodeBegin(e,t){let i=t[1].trim().replace(/^"/,"").replace(/"$/,""),n=t[2].split(",").map(function(l){return l.trim().replace(/^"/,"").replace(/"$/,"")}),a={name:i},o=this.parseNodeAttr(n),s=this.getCurrentNode();this.currentIndent===0?this.allNodes.add(i,a):i in s?(i==="PoseNode"?s.PoseNode.push(a):s[i].id!==void 0&&(s[i]={},s[i][s[i].id]=s[i]),o.id!==""&&(s[i][o.id]=a)):typeof o.id=="number"?(s[i]={},s[i][o.id]=a):i!=="Properties70"&&(i==="PoseNode"?s[i]=[a]:s[i]=a),typeof o.id=="number"&&(a.id=o.id),o.name!==""&&(a.attrName=o.name),o.type!==""&&(a.attrType=o.type),this.pushStack(a)}parseNodeAttr(e){let t=e[0];e[0]!==""&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));let i="",n="";return e.length>1&&(i=e[1].replace(/^(\w+)::/,""),n=e[2]),{id:t,name:i,type:n}}parseNodeProperty(e,t,i){let n=t[1].replace(/^"/,"").replace(/"$/,"").trim(),a=t[2].replace(/^"/,"").replace(/"$/,"").trim();n==="Content"&&a===","&&(a=i.replace(/"/g,"").replace(/,$/,"").trim());let o=this.getCurrentNode();if(o.name==="Properties70"){this.parseNodeSpecialProperty(e,n,a);return}if(n==="C"){let l=a.split(",").slice(1),u=parseInt(l[0]),c=parseInt(l[1]),f=a.split(",").slice(3);f=f.map(function(h){return h.trim().replace(/^"/,"")}),n="connections",a=[u,c],KOe(a,f),o[n]===void 0&&(o[n]=[])}n==="Node"&&(o.id=a),n in o&&Array.isArray(o[n])?o[n].push(a):n!=="a"?o[n]=a:o.a=a,this.setCurrentProp(o,n),n==="a"&&a.slice(-1)!==","&&(o.a=Yk(a))}parseNodePropertyContinued(e){let t=this.getCurrentNode();t.a+=e,e.slice(-1)!==","&&(t.a=Yk(t.a))}parseNodeSpecialProperty(e,t,i){let n=i.split('",').map(function(c){return c.trim().replace(/^\"/,"").replace(/\s/,"_")}),a=n[0],o=n[1],s=n[2],l=n[3],u=n[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":u=parseFloat(u);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":u=Yk(u);break}this.getPrevNode()[a]={type:o,type2:s,flag:l,value:u},this.setCurrentProp(this.getPrevNode(),a)}},Jk=class{parse(e){let t=new GR(e);t.skip(23);let i=t.getUint32();if(i<6400)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+i);let n=new HR;for(;!this.endOfContent(t);){let a=this.parseNode(t,i);a!==null&&n.add(a.name,a)}return n}endOfContent(e){return e.size()%16===0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){let i={},n=t>=7500?e.getUint64():e.getUint32(),a=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();let o=e.getUint8(),s=e.getString(o);if(n===0)return null;let l=[];for(let h=0;h0?l[0]:"",c=l.length>1?l[1]:"",f=l.length>2?l[2]:"";for(i.singleProperty=a===1&&e.getOffset()===n;n>e.getOffset();){let h=this.parseNode(e,t);h!==null&&this.parseSubNode(s,i,h)}return i.propertyList=l,typeof u=="number"&&(i.id=u),c!==""&&(i.attrName=c),f!==""&&(i.attrType=f),s!==""&&(i.name=s),i}parseSubNode(e,t,i){if(i.singleProperty===!0){let n=i.propertyList[0];Array.isArray(n)?(t[i.name]=i,i.a=n):t[i.name]=n}else if(e==="Connections"&&i.name==="C"){let n=[];i.propertyList.forEach(function(a,o){o!==0&&n.push(a)}),t.connections===void 0&&(t.connections=[]),t.connections.push(n)}else if(i.name==="Properties70")Object.keys(i).forEach(function(a){t[a]=i[a]});else if(e==="Properties70"&&i.name==="P"){let n=i.propertyList[0],a=i.propertyList[1],o=i.propertyList[2],s=i.propertyList[3],l;n.indexOf("Lcl ")===0&&(n=n.replace("Lcl ","Lcl_")),a.indexOf("Lcl ")===0&&(a=a.replace("Lcl ","Lcl_")),a==="Color"||a==="ColorRGB"||a==="Vector"||a==="Vector3D"||a.indexOf("Lcl_")===0?l=[i.propertyList[4],i.propertyList[5],i.propertyList[6]]:l=i.propertyList[4],t[n]={type:a,type2:o,flag:s,value:l}}else t[i.name]===void 0?typeof i.id=="number"?(t[i.name]={},t[i.name][i.id]=i):t[i.name]=i:i.name==="PoseNode"?(Array.isArray(t[i.name])||(t[i.name]=[t[i.name]]),t[i.name].push(i)):t[i.name][i.id]===void 0&&(t[i.name][i.id]=i)}parseProperty(e){let t=e.getString(1),i;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return i=e.getUint32(),e.getArrayBuffer(i);case"S":return i=e.getUint32(),e.getString(i);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":let n=e.getUint32(),a=e.getUint32(),o=e.getUint32();if(a===0)switch(t){case"b":case"c":return e.getBooleanArray(n);case"d":return e.getFloat64Array(n);case"f":return e.getFloat32Array(n);case"i":return e.getInt32Array(n);case"l":return e.getInt64Array(n)}let s=Sse(new Uint8Array(e.getArrayBuffer(o))),l=new GR(s.buffer);switch(t){case"b":case"c":return l.getBooleanArray(n);case"d":return l.getFloat64Array(n);case"f":return l.getFloat32Array(n);case"i":return l.getInt32Array(n);case"l":return l.getInt64Array(n)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}},GR=class{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=t!==void 0?t:!0,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return(this.getUint8()&1)===1}getBooleanArray(e){let t=[];for(let i=0;i=0&&(i=new Uint8Array(this.dv.buffer,t,n)),this._textDecoder.decode(i)}},HR=class{add(e,t){this[e]=t}};function YOe(r){let e="Kaydara FBX Binary \0";return r.byteLength>=e.length&&e===Cse(r,0,e.length)}function qOe(r){let e=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],t=0;function i(n){let a=r[n-1];return r=r.slice(t+n),t++,a}for(let n=0;n{let e=class e{constructor(){this.http=xl(_m),this.modal=xl(ym),this.titleService=xl(SV),this.animate=()=>{requestAnimationFrame(this.animate);let i=QOe.getDelta();Rse&&Rse.update(i),this.renderer.render(this.scene,this.camera)}}ngOnInit(){this.titleService.setTitle("\u91CD\u78C53D"),this.initThreeJs(),this.animate()}initThreeJs(){this.camera=new Gi(40,window.innerWidth/window.innerHeight,1,2e4),this.camera.position.set(2200,300,-3100),this.scene=new yS,this.scene.background=new ir(263446);let i=new _S(16777215,4473924,5);i.position.set(0,200,0),this.scene.add(i);let n=new xS(16777215,5);n.position.set(0,200,100),n.castShadow=!0,n.shadow.camera.top=180,n.shadow.camera.bottom=-100,n.shadow.camera.left=-120,n.shadow.camera.right=120,this.scene.add(n);let a=this;new VR().load("assets/fbx/bb.fbx",function(p){p.traverse(function(d){}),a.scene.add(p)},p=>{},p=>{console.error("An error happened",p)}),this.renderer=new gS({antialias:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(window.innerWidth,window.innerHeight),this.renderer.shadowMap.enabled=!0,this.container.nativeElement.appendChild(this.renderer.domElement);let s=5,l=32,u=new OA(s,l),c=new tc({color:16711680}),f=new rn(u,c);f.position.set(850,100,-2e3),this.scene.add(f);let h=new Lse.OrbitControls(this.camera,this.renderer.domElement);h.target.set(850,100,-2e3),h.update(),window.addEventListener("resize",this.onWindowResize)}render(){this.cube.rotation.x+=.01,this.cube.rotation.y+=.01,this.renderer.render(this.scene,this.camera)}onWindowResize(){this.camera.aspect=window.innerWidth/window.innerHeight,this.camera.updateProjectionMatrix(),this.renderer.setSize(window.innerWidth,window.innerHeight)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=si({type:e,selectors:[["app-data-v-t1"]],viewQuery:function(n,a){if(n&1&&vm($Oe,7),n&2){let o;co(o=fo())&&(a.container=o.first)}},standalone:!0,features:[ui],decls:3,vars:0,consts:[[2,"display","flex","flex-direction","column","height","100vh"],[2,"flex-grow","1"],["Three",""]],template:function(n,a){n&1&&(tr(0,"div",0),li(1,"div",1,2),lr())},dependencies:[Dc,Ic,Kc,Wc,$c,Qc,Jc,Zc,Pc,Vc,Hc,nf,qc,Xc,Tl,Cc,Bc,kc,ef,rf,Fc,El,Yc,Oc,Gc,zc,tf,Lc,Rc,jc,Uc,Ac,Nc,wl],encapsulation:2});let r=e;return r})();var DDt=[{path:"s1/:id",component:_$,data:{menu:null}},{path:"second1/:id",component:x$,data:{menu:null}},{path:"threejs/:id",component:S$},{path:"t1/:id",component:Pse}];export{DDt as routes}; diff --git a/dist/himp.platform.angular/browser/chunk-TV7RDLL7.js b/dist/himp.platform.angular/browser/chunk-VDRVUQCF.js similarity index 85% rename from dist/himp.platform.angular/browser/chunk-TV7RDLL7.js rename to dist/himp.platform.angular/browser/chunk-VDRVUQCF.js index 9a1d1b0..a1a8ede 100644 --- a/dist/himp.platform.angular/browser/chunk-TV7RDLL7.js +++ b/dist/himp.platform.angular/browser/chunk-VDRVUQCF.js @@ -1,20 +1,20 @@ -var n_=Object.create;var zl=Object.defineProperty,r_=Object.defineProperties,i_=Object.getOwnPropertyDescriptor,o_=Object.getOwnPropertyDescriptors,s_=Object.getOwnPropertyNames,El=Object.getOwnPropertySymbols,a_=Object.getPrototypeOf,R3=Object.prototype.hasOwnProperty,_f=Object.prototype.propertyIsEnumerable;var N3=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var bf=(t,e,r)=>e in t?zl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||={})R3.call(e,r)&&bf(t,r,e[r]);if(El)for(var r of El(e))_f.call(e,r)&&bf(t,r,e[r]);return t},ke=(t,e)=>r_(t,o_(e));var HL=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var ss=(t,e)=>{var r={};for(var n in t)R3.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&El)for(var n of El(t))e.indexOf(n)<0&&_f.call(t,n)&&(r[n]=t[n]);return r};var c_=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),VL=(t,e)=>{for(var r in e)zl(t,r,{get:e[r],enumerable:!0})},l_=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s_(e))!R3.call(t,i)&&i!==r&&zl(t,i,{get:()=>e[i],enumerable:!(n=i_(e,i))||n.enumerable});return t};var u_=(t,e,r)=>(r=t!=null?n_(a_(t)):{},l_(e||!t||!t.__esModule?zl(r,"default",{value:t,enumerable:!0}):r,t));var L3=(t,e,r)=>new Promise((n,i)=>{var o=c=>{try{a(r.next(c))}catch(l){i(l)}},s=c=>{try{a(r.throw(c))}catch(l){i(l)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,s);a((r=r.apply(t,e)).next())}),d_=function(t,e){this[0]=t,this[1]=e};var YL=t=>{var e=t[N3("asyncIterator")],r=!1,n,i={};return e==null?(e=t[N3("iterator")](),n=o=>i[o]=s=>e[o](s)):(e=e.call(t),n=o=>i[o]=s=>{if(r){if(r=!1,o==="throw")throw s;return s}return r=!0,{done:!1,value:new d_(new Promise(a=>{var c=e[o](s);if(!(c instanceof Object))throw TypeError("Object expected");a(c)}),1)}}),i[N3("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=o=>{throw o},"return"in e&&n("return"),i};var v9=c_((vZ,g9)=>{"use strict";var i2=Object.prototype.hasOwnProperty,m9=Object.prototype.toString,l9=Object.defineProperty,u9=Object.getOwnPropertyDescriptor,d9=function(e){return typeof Array.isArray=="function"?Array.isArray(e):m9.call(e)==="[object Array]"},h9=function(e){if(!e||m9.call(e)!=="[object Object]")return!1;var r=i2.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&i2.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||i2.call(e,i)},f9=function(e,r){l9&&r.name==="__proto__"?l9(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},p9=function(e,r){if(r==="__proto__")if(i2.call(e,r)){if(u9)return u9(e,r).value}else return;return e[r]};g9.exports=function t(){var e,r,n,i,o,s,a=arguments[0],c=1,l=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},c=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});c!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function h_(t){if(!(j3(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===H3)){if(!t.producerMustRecompute(t)&&!V3(t)){t.dirty=!1,t.lastCleanEpoch=H3;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=H3}}function xf(t){return t&&(t.nextProducerIndex=0),yt(t)}function Sf(t,e){if(yt(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(j3(t))for(let r=t.nextProducerIndex;rt.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function V3(t){Il(t);for(let e=0;e0}function Il(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function f_(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function p_(){throw new Error}var m_=p_;function Ef(t){m_=t}function K(t){return typeof t=="function"}function as(t){let r=t(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var kl=as(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription: +var r_=Object.create;var Fa=Object.defineProperty,i_=Object.defineProperties,o_=Object.getOwnPropertyDescriptor,s_=Object.getOwnPropertyDescriptors,a_=Object.getOwnPropertyNames,zl=Object.getOwnPropertySymbols,c_=Object.getPrototypeOf,R3=Object.prototype.hasOwnProperty,_f=Object.prototype.propertyIsEnumerable;var N3=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t);var bf=(t,e,r)=>e in t?Fa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||={})R3.call(e,r)&&bf(t,r,e[r]);if(zl)for(var r of zl(e))_f.call(e,r)&&bf(t,r,e[r]);return t},ke=(t,e)=>i_(t,s_(e));var HL=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var ss=(t,e)=>{var r={};for(var n in t)R3.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&zl)for(var n of zl(t))e.indexOf(n)<0&&_f.call(t,n)&&(r[n]=t[n]);return r};var VL=(t,e)=>()=>(t&&(e=t(t=0)),e);var l_=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),YL=(t,e)=>{for(var r in e)Fa(t,r,{get:e[r],enumerable:!0})},Cf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a_(e))!R3.call(t,i)&&i!==r&&Fa(t,i,{get:()=>e[i],enumerable:!(n=o_(e,i))||n.enumerable});return t};var u_=(t,e,r)=>(r=t!=null?r_(c_(t)):{},Cf(e||!t||!t.__esModule?Fa(r,"default",{value:t,enumerable:!0}):r,t)),jL=t=>Cf(Fa({},"__esModule",{value:!0}),t);var L3=(t,e,r)=>new Promise((n,i)=>{var o=c=>{try{a(r.next(c))}catch(l){i(l)}},s=c=>{try{a(r.throw(c))}catch(l){i(l)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,s);a((r=r.apply(t,e)).next())}),d_=function(t,e){this[0]=t,this[1]=e};var BL=t=>{var e=t[N3("asyncIterator")],r=!1,n,i={};return e==null?(e=t[N3("iterator")](),n=o=>i[o]=s=>e[o](s)):(e=e.call(t),n=o=>i[o]=s=>{if(r){if(r=!1,o==="throw")throw s;return s}return r=!0,{done:!1,value:new d_(new Promise(a=>{var c=e[o](s);if(!(c instanceof Object))throw TypeError("Object expected");a(c)}),1)}}),i[N3("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=o=>{throw o},"return"in e&&n("return"),i};var y9=l_((wZ,v9)=>{"use strict";var i2=Object.prototype.hasOwnProperty,g9=Object.prototype.toString,u9=Object.defineProperty,d9=Object.getOwnPropertyDescriptor,h9=function(e){return typeof Array.isArray=="function"?Array.isArray(e):g9.call(e)==="[object Array]"},f9=function(e){if(!e||g9.call(e)!=="[object Object]")return!1;var r=i2.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&i2.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||i2.call(e,i)},p9=function(e,r){u9&&r.name==="__proto__"?u9(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},m9=function(e,r){if(r==="__proto__")if(i2.call(e,r)){if(d9)return d9(e,r).value}else return;return e[r]};v9.exports=function t(){var e,r,n,i,o,s,a=arguments[0],c=1,l=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},c=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});c!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function h_(t){if(!(j3(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===H3)){if(!t.producerMustRecompute(t)&&!V3(t)){t.dirty=!1,t.lastCleanEpoch=H3;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=H3}}function Sf(t){return t&&(t.nextProducerIndex=0),yt(t)}function Tf(t,e){if(yt(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(j3(t))for(let r=t.nextProducerIndex;rt.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function V3(t){Il(t);for(let e=0;e0}function Il(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function f_(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function p_(){throw new Error}var m_=p_;function zf(t){m_=t}function K(t){return typeof t=="function"}function as(t){let r=t(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var kl=as(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription: ${r.map((n,i)=>`${i+1}) ${n.toString()}`).join(` - `)}`:"",this.name="UnsubscriptionError",this.errors=r});function Ki(t,e){if(t){let r=t.indexOf(e);0<=r&&t.splice(r,1)}}var ye=class t{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:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let o of r)o.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(K(n))try{n()}catch(o){e=o instanceof kl?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{zf(o)}catch(s){e=e??[],s instanceof kl?e=[...e,...s.errors]:e.push(s)}}if(e)throw new kl(e)}}add(e){var r;if(e&&e!==this)if(this.closed)zf(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}}_hasParent(e){let{_parentage:r}=this;return r===e||Array.isArray(r)&&r.includes(e)}_addParent(e){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e}_removeParent(e){let{_parentage:r}=this;r===e?this._parentage=null:Array.isArray(r)&&Ki(r,e)}remove(e){let{_finalizers:r}=this;r&&Ki(r,e),e instanceof t&&e._removeParent(this)}};ye.EMPTY=(()=>{let t=new ye;return t.closed=!0,t})();var B3=ye.EMPTY;function Pl(t){return t instanceof ye||t&&"closed"in t&&K(t.remove)&&K(t.add)&&K(t.unsubscribe)}function zf(t){K(t)?t():t.unsubscribe()}var $n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var cs={setTimeout(t,e,...r){let{delegate:n}=cs;return n?.setTimeout?n.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=cs;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Ol(t){cs.setTimeout(()=>{let{onUnhandledError:e}=$n;if(e)e(t);else throw t})}function qn(){}var If=U3("C",void 0,void 0);function kf(t){return U3("E",void 0,t)}function Pf(t){return U3("N",t,void 0)}function U3(t,e,r){return{kind:t,value:e,error:r}}var Zi=null;function ls(t){if($n.useDeprecatedSynchronousErrorHandling){let e=!Zi;if(e&&(Zi={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:n}=Zi;if(Zi=null,r)throw n}}else t()}function Of(t){$n.useDeprecatedSynchronousErrorHandling&&Zi&&(Zi.errorThrown=!0,Zi.error=t)}var Qi=class extends ye{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Pl(e)&&e.add(this)):this.destination=y_}static create(e,r,n){return new Lr(e,r,n)}next(e){this.isStopped?q3(Pf(e),this):this._next(e)}error(e){this.isStopped?q3(kf(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?q3(If,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()}}},g_=Function.prototype.bind;function $3(t,e){return g_.call(t,e)}var W3=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(n){Al(n)}}error(e){let{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(n){Al(n)}else Al(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){Al(r)}}},Lr=class extends Qi{constructor(e,r,n){super();let i;if(K(e)||!e)i={next:e??void 0,error:r??void 0,complete:n??void 0};else{let o;this&&$n.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),i={next:e.next&&$3(e.next,o),error:e.error&&$3(e.error,o),complete:e.complete&&$3(e.complete,o)}):i=e}this.destination=new W3(i)}};function Al(t){$n.useDeprecatedSynchronousErrorHandling?Of(t):Ol(t)}function v_(t){throw t}function q3(t,e){let{onStoppedNotification:r}=$n;r&&cs.setTimeout(()=>r(t,e))}var y_={closed:!0,next:qn,error:v_,complete:qn};var us=typeof Symbol=="function"&&Symbol.observable||"@@observable";function It(t){return t}function G3(...t){return K3(t)}function K3(t){return t.length===0?It:t.length===1?t[0]:function(r){return t.reduce((n,i)=>i(n),r)}}var Y=(()=>{class t{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new t;return n.source=this,n.operator=r,n}subscribe(r,n,i){let o=b_(r)?r:new Lr(r,n,i);return ls(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=Af(n),new n((i,o)=>{let s=new Lr({next:a=>{try{r(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[us](){return this}pipe(...r){return K3(r)(this)}toPromise(r){return r=Af(r),new r((n,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>n(o))})}}return t.create=e=>new t(e),t})();function Af(t){var e;return(e=t??$n.Promise)!==null&&e!==void 0?e:Promise}function w_(t){return t&&K(t.next)&&K(t.error)&&K(t.complete)}function b_(t){return t&&t instanceof Qi||w_(t)&&Pl(t)}function Z3(t){return K(t?.lift)}function q(t){return e=>{if(Z3(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function H(t,e,r,n,i){return new Q3(t,e,r,n,i)}var Q3=class extends Qi{constructor(e,r,n,i,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=r?function(a){try{r(a)}catch(c){e.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){e.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:r}=this;super.unsubscribe(),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function ds(){return q((t,e)=>{let r=null;t._refCount++;let n=H(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){r=null;return}let i=t._connection,o=r;r=null,i&&(!o||i===o)&&i.unsubscribe(),e.unsubscribe()});t.subscribe(n),n.closed||(r=t.connect())})}var lr=class extends Y{constructor(e,r){super(),this.source=e,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,Z3(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new ye;let r=this.getSubject();e.add(this.source.subscribe(H(r,void 0,()=>{this._teardown(),r.complete()},n=>{this._teardown(),r.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=ye.EMPTY)}return e}refCount(){return ds()(this)}};var hs={schedule(t){let e=requestAnimationFrame,r=cancelAnimationFrame,{delegate:n}=hs;n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame);let i=e(o=>{r=void 0,t(o)});return new ye(()=>r?.(i))},requestAnimationFrame(...t){let{delegate:e}=hs;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:e}=hs;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var Ff=as(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var S=(()=>{class t extends Y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new Fl(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new Ff}next(r){ls(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){ls(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){ls(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:i,observers:o}=this;return n||i?B3:(this.currentObservers=null,o.push(r),new ye(()=>{this.currentObservers=null,Ki(o,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:i,isStopped:o}=this;n?r.error(i):o&&r.complete()}asObservable(){let r=new Y;return r.source=this,r}}return t.create=(e,r)=>new Fl(e,r),t})(),Fl=class extends S{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.next)===null||n===void 0||n.call(r,e)}error(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.error)===null||n===void 0||n.call(r,e)}complete(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)}_subscribe(e){var r,n;return(n=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&n!==void 0?n:B3}};var Re=class extends S{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let r=super._subscribe(e);return!r.closed&&e.next(this._value),r}getValue(){let{hasError:e,thrownError:r,_value:n}=this;if(e)throw r;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var Fa={now(){return(Fa.delegate||Date).now()},delegate:void 0};var fi=class extends S{constructor(e=1/0,r=1/0,n=Fa){super(),this._bufferSize=e,this._windowTime=r,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=r===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,r)}next(e){let{isStopped:r,_buffer:n,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;r||(n.push(e),!i&&n.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let r=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:i}=this,o=i.slice();for(let s=0;sNf(e)&&t()),e},clearImmediate(t){Nf(t)}};var{setImmediate:C_,clearImmediate:M_}=Rf,Ra={setImmediate(...t){let{delegate:e}=Ra;return(e?.setImmediate||C_)(...t)},clearImmediate(t){let{delegate:e}=Ra;return(e?.clearImmediate||M_)(t)},delegate:void 0};var Rl=class extends pi{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=Ra.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,r,n=0){var i;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:o}=e;r!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==r&&(Ra.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))}};var fs=class t{constructor(e,r=t.now){this.schedulerActionCtor=e,this.now=r}schedule(e,r=0,n){return new this.schedulerActionCtor(this,e).schedule(n,r)}};fs.now=Fa.now;var mi=class extends fs{constructor(e,r=fs.now){super(e,r),this.actions=[],this._active=!1}flush(e){let{actions:r}=this;if(this._active){r.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,n){for(;e=r.shift();)e.unsubscribe();throw n}}};var Ll=class extends mi{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,i;e=e||n.shift();do if(i=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,i){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw i}}};var e0=new Ll(Rl);var Wn=new mi(pi),Lf=Wn;var Hl=class extends pi{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=hs.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,r,n=0){var i;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:o}=e;r!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==r&&(hs.cancelAnimationFrame(r),e._scheduled=void 0)}};var Vl=class extends mi{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,i;e=e||n.shift();do if(i=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,i){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw i}}};var La=new Vl(Hl);var Dt=new Y(t=>t.complete());function Yl(t){return t&&K(t.schedule)}function t0(t){return t[t.length-1]}function gi(t){return K(t0(t))?t.pop():void 0}function ur(t){return Yl(t0(t))?t.pop():void 0}function Hf(t,e){return typeof t0(t)=="number"?t.pop():e}function je(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function Yf(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{l(n.next(u))}catch(d){s(d)}}function c(u){try{l(n.throw(u))}catch(d){s(d)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function Vf(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xi(t){return this instanceof Xi?(this.v=t,this):new Xi(t)}function jf(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(h){n[h]&&(i[h]=function(f){return new Promise(function(p,y){o.push([h,f,p,y])>1||a(h,f)})})}function a(h,f){try{c(n[h](f))}catch(p){d(o[0][3],p)}}function c(h){h.value instanceof Xi?Promise.resolve(h.value.v).then(l,u):d(o[0][2],h)}function l(h){a("next",h)}function u(h){a("throw",h)}function d(h,f){h(f),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Bf(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Vf=="function"?Vf(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(s){return new Promise(function(a,c){s=t[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var ps=t=>t&&typeof t.length=="number"&&typeof t!="function";function jl(t){return K(t?.then)}function Bl(t){return K(t[us])}function Ul(t){return Symbol.asyncIterator&&K(t?.[Symbol.asyncIterator])}function $l(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function D_(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ql=D_();function Wl(t){return K(t?.[ql])}function Gl(t){return jf(this,arguments,function*(){let r=t.getReader();try{for(;;){let{value:n,done:i}=yield Xi(r.read());if(i)return yield Xi(void 0);yield yield Xi(n)}}finally{r.releaseLock()}})}function Kl(t){return K(t?.getReader)}function ae(t){if(t instanceof Y)return t;if(t!=null){if(Bl(t))return x_(t);if(ps(t))return S_(t);if(jl(t))return T_(t);if(Ul(t))return Uf(t);if(Wl(t))return E_(t);if(Kl(t))return z_(t)}throw $l(t)}function x_(t){return new Y(e=>{let r=t[us]();if(K(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function S_(t){return new Y(e=>{for(let r=0;r{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,Ol)})}function E_(t){return new Y(e=>{for(let r of t)if(e.next(r),e.closed)return;e.complete()})}function Uf(t){return new Y(e=>{I_(t,e).catch(r=>e.error(r))})}function z_(t){return Uf(Gl(t))}function I_(t,e){var r,n,i,o;return Yf(this,void 0,void 0,function*(){try{for(r=Bf(t);n=yield r.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){i={error:s}}finally{try{n&&!n.done&&(o=r.return)&&(yield o.call(r))}finally{if(i)throw i.error}}e.complete()})}function Qt(t,e,r,n=0,i=!1){let o=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!i)return o}function Zl(t,e=0){return q((r,n)=>{r.subscribe(H(n,i=>Qt(n,t,()=>n.next(i),e),()=>Qt(n,t,()=>n.complete(),e),i=>Qt(n,t,()=>n.error(i),e)))})}function Ql(t,e=0){return q((r,n)=>{n.add(t.schedule(()=>r.subscribe(n),e))})}function $f(t,e){return ae(t).pipe(Ql(e),Zl(e))}function qf(t,e){return ae(t).pipe(Ql(e),Zl(e))}function Wf(t,e){return new Y(r=>{let n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function Gf(t,e){return new Y(r=>{let n;return Qt(r,e,()=>{n=t[ql](),Qt(r,e,()=>{let i,o;try{({value:i,done:o}=n.next())}catch(s){r.error(s);return}o?r.complete():r.next(i)},0,!0)}),()=>K(n?.return)&&n.return()})}function Xl(t,e){if(!t)throw new Error("Iterable cannot be null");return new Y(r=>{Qt(r,e,()=>{let n=t[Symbol.asyncIterator]();Qt(r,e,()=>{n.next().then(i=>{i.done?r.complete():r.next(i.value)})},0,!0)})})}function Kf(t,e){return Xl(Gl(t),e)}function Zf(t,e){if(t!=null){if(Bl(t))return $f(t,e);if(ps(t))return Wf(t,e);if(jl(t))return qf(t,e);if(Ul(t))return Xl(t,e);if(Wl(t))return Gf(t,e);if(Kl(t))return Kf(t,e)}throw $l(t)}function Le(t,e){return e?Zf(t,e):ae(t)}function A(...t){let e=ur(t);return Le(t,e)}function vi(t,e){let r=K(t)?t:()=>t,n=i=>i.error(r());return new Y(e?i=>e.schedule(n,0,i):n)}function Tn(t){return!!t&&(t instanceof Y||K(t.lift)&&K(t.subscribe))}var Gn=as(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function k_(t,e){let r=typeof e=="object";return new Promise((n,i)=>{let o=!1,s;t.subscribe({next:a=>{s=a,o=!0},error:i,complete:()=>{o?n(s):r?n(e.defaultValue):i(new Gn)}})})}function Qf(t){return t instanceof Date&&!isNaN(t)}function Z(t,e){return q((r,n)=>{let i=0;r.subscribe(H(n,o=>{n.next(t.call(e,o,i++))}))})}var{isArray:P_}=Array;function O_(t,e){return P_(e)?t(...e):t(e)}function ms(t){return Z(e=>O_(t,e))}var{isArray:A_}=Array,{getPrototypeOf:F_,prototype:N_,keys:R_}=Object;function Jl(t){if(t.length===1){let e=t[0];if(A_(e))return{args:e,keys:null};if(L_(e)){let r=R_(e);return{args:r.map(n=>e[n]),keys:r}}}return{args:t,keys:null}}function L_(t){return t&&typeof t=="object"&&F_(t)===N_}function e1(t,e){return t.reduce((r,n,i)=>(r[n]=e[i],r),{})}function Ji(...t){let e=ur(t),r=gi(t),{args:n,keys:i}=Jl(t);if(n.length===0)return Le([],e);let o=new Y(H_(n,e,i?s=>e1(i,s):It));return r?o.pipe(ms(r)):o}function H_(t,e,r=It){return n=>{Xf(e,()=>{let{length:i}=t,o=new Array(i),s=i,a=i;for(let c=0;c{let l=Le(t[c],e),u=!1;l.subscribe(H(n,d=>{o[c]=d,u||(u=!0,a--),a||n.next(r(o.slice()))},()=>{--s||n.complete()}))},n)},n)}}function Xf(t,e,r){t?Qt(r,t,e):e()}function Jf(t,e,r,n,i,o,s,a){let c=[],l=0,u=0,d=!1,h=()=>{d&&!c.length&&!l&&e.complete()},f=y=>l{o&&e.next(y),l++;let v=!1;ae(r(y,u++)).subscribe(H(e,M=>{i?.(M),o?f(M):e.next(M)},()=>{v=!0},void 0,()=>{if(v)try{for(l--;c.length&&lp(M)):p(M)}h()}catch(M){e.error(M)}}))};return t.subscribe(H(e,f,()=>{d=!0,h()})),()=>{a?.()}}function Ke(t,e,r=1/0){return K(e)?Ke((n,i)=>Z((o,s)=>e(n,o,i,s))(ae(t(n,i))),r):(typeof e=="number"&&(r=e),q((n,i)=>Jf(n,i,t,r)))}function yi(t=1/0){return Ke(It,t)}function e5(){return yi(1)}function dr(...t){return e5()(Le(t,ur(t)))}function gs(t){return new Y(e=>{ae(t()).subscribe(e)})}function V_(...t){let e=gi(t),{args:r,keys:n}=Jl(t),i=new Y(o=>{let{length:s}=r;if(!s){o.complete();return}let a=new Array(s),c=s,l=s;for(let u=0;u{d||(d=!0,l--),a[u]=h},()=>c--,void 0,()=>{(!c||!d)&&(l||o.next(n?e1(n,a):a),o.complete())}))}});return e?i.pipe(ms(e)):i}var Y_=["addListener","removeListener"],j_=["addEventListener","removeEventListener"],B_=["on","off"];function Kn(t,e,r,n){if(K(r)&&(n=r,r=void 0),n)return Kn(t,e,r).pipe(ms(n));let[i,o]=q_(t)?j_.map(s=>a=>t[s](e,a,r)):U_(t)?Y_.map(t5(t,e)):$_(t)?B_.map(t5(t,e)):[];if(!i&&ps(t))return Ke(s=>Kn(s,e,r))(ae(t));if(!i)throw new TypeError("Invalid event target");return new Y(s=>{let a=(...c)=>s.next(1o(a)})}function t5(t,e){return r=>n=>t[r](e,n)}function U_(t){return K(t.addListener)&&K(t.removeListener)}function $_(t){return K(t.on)&&K(t.off)}function q_(t){return K(t.addEventListener)&&K(t.removeEventListener)}function Hr(t=0,e,r=Lf){let n=-1;return e!=null&&(Yl(e)?r=e:n=e),new Y(i=>{let o=Qf(t)?+t-r.now():t;o<0&&(o=0);let s=0;return r.schedule(function(){i.closed||(i.next(s++),0<=n?this.schedule(void 0,n):i.complete())},o)})}function n0(t=0,e=Wn){return t<0&&(t=0),Hr(t,t,e)}function vs(...t){let e=ur(t),r=Hf(t,1/0),n=t;return n.length?n.length===1?ae(n[0]):yi(r)(Le(n,e)):Dt}var{isArray:W_}=Array;function n5(t){return t.length===1&&W_(t[0])?t[0]:t}function ge(t,e){return q((r,n)=>{let i=0;r.subscribe(H(n,o=>t.call(e,o,i++)&&n.next(o)))})}function G_(t,e){return new Y(r=>{let n=t(),i=e(n);return(i?ae(i):Dt).subscribe(r),()=>{n&&n.unsubscribe()}})}function K_(...t){let e=gi(t),r=n5(t);return r.length?new Y(n=>{let i=r.map(()=>[]),o=r.map(()=>!1);n.add(()=>{i=o=null});for(let s=0;!n.closed&&s{if(i[s].push(a),i.every(c=>c.length)){let c=i.map(l=>l.shift());n.next(e?e(...c):c),i.some((l,u)=>!l.length&&o[u])&&n.complete()}},()=>{o[s]=!0,!i[s].length&&n.complete()}));return()=>{i=o=null}}):Dt}function r5(t){return q((e,r)=>{let n=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let l=i;i=null,r.next(l)}s&&r.complete()},c=()=>{o=null,s&&r.complete()};e.subscribe(H(r,l=>{n=!0,i=l,o||ae(t(l)).subscribe(o=H(r,a,c))},()=>{s=!0,(!n||!o||o.closed)&&r.complete()}))})}function Ha(t,e=Wn){return r5(()=>Hr(t,e))}function En(t){return q((e,r)=>{let n=null,i=!1,o;n=e.subscribe(H(r,void 0,void 0,s=>{o=ae(t(s,En(t)(e))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}function i5(t,e,r,n,i){return(o,s)=>{let a=r,c=e,l=0;o.subscribe(H(s,u=>{let d=l++;c=a?t(c,u,d):(a=!0,u),n&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}function Vr(t,e){return K(e)?Ke(t,e,1):Ke(t,1)}function o5(t){return new Y(e=>t.subscribe(e))}var Z_={connector:()=>new S};function t1(t,e=Z_){let{connector:r}=e;return q((n,i)=>{let o=r();ae(t(o5(o))).subscribe(i),i.add(n.subscribe(o))})}function Q_(t){return q((e,r)=>{let n=!1,i=null,o=null,s=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let a=i;i=null,r.next(a)}};e.subscribe(H(r,a=>{o?.unsubscribe(),n=!0,i=a,o=H(r,s,qn),ae(t(a)).subscribe(o)},()=>{s(),r.complete()},void 0,()=>{i=o=null}))})}function wi(t,e=Wn){return q((r,n)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let l=o;o=null,n.next(l)}};function c(){let l=s+t,u=e.now();if(u{o=l,s=e.now(),i||(i=e.schedule(c,t),n.add(i))},()=>{a(),n.complete()},void 0,()=>{o=i=null}))})}function bi(t){return q((e,r)=>{let n=!1;e.subscribe(H(r,i=>{n=!0,r.next(i)},()=>{n||r.next(t),r.complete()}))})}function ze(t){return t<=0?()=>Dt:q((e,r)=>{let n=0;e.subscribe(H(r,i=>{++n<=t&&(r.next(i),t<=n&&r.complete())}))})}function s5(){return q((t,e)=>{t.subscribe(H(e,qn))})}function eo(t){return Z(()=>t)}function r0(t,e){return e?r=>dr(e.pipe(ze(1),s5()),r.pipe(r0(t))):Ke((r,n)=>ae(t(r,n)).pipe(ze(1),eo(r)))}function ys(t,e=Wn){let r=Hr(t,e);return r0(()=>r)}function ws(t,e=It){return t=t??X_,q((r,n)=>{let i,o=!0;r.subscribe(H(n,s=>{let a=e(s);(o||!t(i,a))&&(o=!1,i=a,n.next(s))}))})}function X_(t,e){return t===e}function n1(t=J_){return q((e,r)=>{let n=!1;e.subscribe(H(r,i=>{n=!0,r.next(i)},()=>n?r.complete():r.error(t())))})}function J_(){return new Gn}function a5(t,e){return e?r=>r.pipe(a5((n,i)=>ae(t(n,i)).pipe(Z((o,s)=>e(n,o,i,s))))):q((r,n)=>{let i=0,o=null,s=!1;r.subscribe(H(n,a=>{o||(o=H(n,void 0,()=>{o=null,s&&n.complete()}),ae(t(a,i++)).subscribe(o))},()=>{s=!0,!o&&n.complete()}))})}function un(t){return q((e,r)=>{try{e.subscribe(r)}finally{r.add(t)}})}function hr(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ge((i,o)=>t(i,o,n)):It,ze(1),r?bi(e):n1(()=>new Gn))}function bs(t){return t<=0?()=>Dt:q((e,r)=>{let n=[];e.subscribe(H(r,i=>{n.push(i),t{for(let i of n)r.next(i);r.complete()},void 0,()=>{n=null}))})}function i0(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ge((i,o)=>t(i,o,n)):It,bs(1),r?bi(e):n1(()=>new Gn))}function r1(t,e){let r=K(t)?t:()=>t;return K(e)?t1(e,{connector:r}):n=>new lr(n,r)}function o0(){return q((t,e)=>{let r,n=!1;t.subscribe(H(e,i=>{let o=r;r=i,n&&e.next([o,i]),n=!0}))})}function eC(t){return t?e=>t1(t)(e):e=>r1(new S)(e)}function tC(t,e,r,n){r&&!K(r)&&(n=r);let i=K(r)?r:void 0;return o=>r1(new fi(t,e,n),i)(o)}function s0(t,e){return q(i5(t,e,arguments.length>=2,!0))}function fr(t={}){let{connector:e=()=>new S,resetOnError:r=!0,resetOnComplete:n=!0,resetOnRefCountZero:i=!0}=t;return o=>{let s,a,c,l=0,u=!1,d=!1,h=()=>{a?.unsubscribe(),a=void 0},f=()=>{h(),s=c=void 0,u=d=!1},p=()=>{let y=s;f(),y?.unsubscribe()};return q((y,v)=>{l++,!d&&!u&&h();let M=c=c??e();v.add(()=>{l--,l===0&&!d&&!u&&(a=a0(p,i))}),M.subscribe(v),!s&&l>0&&(s=new Lr({next:P=>M.next(P),error:P=>{d=!0,h(),a=a0(f,r,P),M.error(P)},complete:()=>{u=!0,h(),a=a0(f,n),M.complete()}}),ae(y).subscribe(s))})(o)}}function a0(t,e,...r){if(e===!0){t();return}if(e===!1)return;let n=new Lr({next:()=>{n.unsubscribe(),t()}});return ae(e(...r)).subscribe(n)}function c0(t,e,r){let n,i=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:i=!1,scheduler:r}=t:n=t??1/0,fr({connector:()=>new fi(n,e,r),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Va(t){return ge((e,r)=>t<=r)}function Rt(...t){let e=ur(t);return q((r,n)=>{(e?dr(t,r,e):dr(t,r)).subscribe(n)})}function Ze(t,e){return q((r,n)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&n.complete();r.subscribe(H(n,c=>{i?.unsubscribe();let l=0,u=o++;ae(t(c,u)).subscribe(i=H(n,d=>n.next(e?e(c,d,u,l++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function ce(t){return q((e,r)=>{ae(t).subscribe(H(r,()=>r.complete(),qn)),!r.closed&&e.subscribe(r)})}function l0(t,e=!1){return q((r,n)=>{let i=0;r.subscribe(H(n,o=>{let s=t(o,i++);(s||e)&&n.next(o),!s&&n.complete()}))})}function Fe(t,e,r){let n=K(t)||e||r?{next:t,error:e,complete:r}:t;return n?q((i,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;i.subscribe(H(o,c=>{var l;(l=n.next)===null||l===void 0||l.call(n,c),o.next(c)},()=>{var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},c=>{var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),o.error(c)},()=>{var c,l;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):It}function c5(t,e){return q((r,n)=>{let{leading:i=!0,trailing:o=!1}=e??{},s=!1,a=null,c=null,l=!1,u=()=>{c?.unsubscribe(),c=null,o&&(f(),l&&n.complete())},d=()=>{c=null,l&&n.complete()},h=p=>c=ae(t(p)).subscribe(H(n,u,d)),f=()=>{if(s){s=!1;let p=a;a=null,n.next(p),!l&&h(p)}};r.subscribe(H(n,p=>{s=!0,a=p,!(c&&!c.closed)&&(i?f():h(p))},()=>{l=!0,!(o&&s&&c&&!c.closed)&&n.complete()}))})}function nC(t,e=Wn,r){let n=Hr(t,e);return c5(()=>n,r)}function rC(...t){let e=gi(t);return q((r,n)=>{let i=t.length,o=new Array(i),s=t.map(()=>!1),a=!1;for(let c=0;c{o[c]=l,!a&&!s[c]&&(s[c]=!0,(a=s.every(It))&&(s=null))},qn));r.subscribe(H(n,c=>{if(a){let l=[c,...o];n.next(e?e(...l):l)}}))})}var X5="https://g.co/ng/security#xss",z=class extends Error{constructor(e,r){super(N1(e,r)),this.code=e}};function N1(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}function Be(t){for(let e in t)if(t[e]===Be)return e;throw Error("Could not find renamed property on target object.")}function iC(t,e){for(let r in e)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function $t(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map($t).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let e=t.toString();if(e==null)return""+e;let r=e.indexOf(` -`);return r===-1?e:e.substring(0,r)}function S0(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var oC=Be({__forward_ref__:Be});function R1(t){return t.__forward_ref__=R1,t.toString=function(){return $t(this())},t}function Ut(t){return J5(t)?t():t}function J5(t){return typeof t=="function"&&t.hasOwnProperty(oC)&&t.__forward_ref__===R1}function ep(t){return t&&!!t.\u0275providers}var sC=Be({\u0275cmp:Be}),aC=Be({\u0275dir:Be}),cC=Be({\u0275pipe:Be}),lC=Be({\u0275mod:Be}),g1=Be({\u0275fac:Be}),Ya=Be({__NG_ELEMENT_ID__:Be}),l5=Be({__NG_ENV_ID__:Be});function Qn(t){return typeof t=="string"?t:t==null?"":String(t)}function uC(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Qn(t)}function dC(t,e){let r=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new z(-200,`Circular dependency in DI detected for ${t}${r}`)}function N8(t,e){throw new z(-201,!1)}function hC(t,e){t==null&&fC(e,t,null,"!=")}function fC(t,e,r,n){throw new Error(`ASSERTION ERROR: ${t}`+(n==null?"":` [Expected=> ${r} ${n} ${e} <=Actual]`))}function C(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ee(t){return{providers:t.providers||[],imports:t.imports||[]}}function L1(t){return u5(t,np)||u5(t,rp)}function tp(t){return L1(t)!==null}function u5(t,e){return t.hasOwnProperty(e)?t[e]:null}function pC(t){let e=t&&(t[np]||t[rp]);return e||null}function d5(t){return t&&(t.hasOwnProperty(h5)||t.hasOwnProperty(mC))?t[h5]:null}var np=Be({\u0275prov:Be}),h5=Be({\u0275inj:Be}),rp=Be({ngInjectableDef:Be}),mC=Be({ngInjectorDef:Be}),be=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(be||{}),T0;function ip(){return T0}function Xt(t){let e=T0;return T0=t,e}function op(t,e,r){let n=L1(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&be.Optional)return null;if(e!==void 0)return e;N8(t,"Injector")}var dn=globalThis;var E=class{constructor(e,r){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof r=="number"?this.__NG_ELEMENT_ID__=r:r!==void 0&&(this.\u0275prov=C({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};var gC={},Ba=gC,E0="__NG_DI_FLAG__",v1="ngTempTokenPath",vC="ngTokenPath",yC=/\n/gm,wC="\u0275",f5="__source",xs;function bC(){return xs}function _i(t){let e=xs;return xs=t,e}function _C(t,e=be.Default){if(xs===void 0)throw new z(-203,!1);return xs===null?op(t,void 0,e):xs.get(t,e&be.Optional?null:void 0,e)}function g(t,e=be.Default){return(ip()||_C)(Ut(t),e)}function w(t,e=be.Default){return g(t,H1(e))}function H1(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function z0(t){let e=[];for(let r=0;r{let t=new ye;return t.closed=!0,t})();var B3=ye.EMPTY;function Pl(t){return t instanceof ye||t&&"closed"in t&&K(t.remove)&&K(t.add)&&K(t.unsubscribe)}function If(t){K(t)?t():t.unsubscribe()}var $n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var cs={setTimeout(t,e,...r){let{delegate:n}=cs;return n?.setTimeout?n.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=cs;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Ol(t){cs.setTimeout(()=>{let{onUnhandledError:e}=$n;if(e)e(t);else throw t})}function qn(){}var kf=U3("C",void 0,void 0);function Pf(t){return U3("E",void 0,t)}function Of(t){return U3("N",t,void 0)}function U3(t,e,r){return{kind:t,value:e,error:r}}var Zi=null;function ls(t){if($n.useDeprecatedSynchronousErrorHandling){let e=!Zi;if(e&&(Zi={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:n}=Zi;if(Zi=null,r)throw n}}else t()}function Af(t){$n.useDeprecatedSynchronousErrorHandling&&Zi&&(Zi.errorThrown=!0,Zi.error=t)}var Qi=class extends ye{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Pl(e)&&e.add(this)):this.destination=y_}static create(e,r,n){return new Lr(e,r,n)}next(e){this.isStopped?q3(Of(e),this):this._next(e)}error(e){this.isStopped?q3(Pf(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?q3(kf,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()}}},g_=Function.prototype.bind;function $3(t,e){return g_.call(t,e)}var W3=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(n){Al(n)}}error(e){let{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(n){Al(n)}else Al(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){Al(r)}}},Lr=class extends Qi{constructor(e,r,n){super();let i;if(K(e)||!e)i={next:e??void 0,error:r??void 0,complete:n??void 0};else{let o;this&&$n.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),i={next:e.next&&$3(e.next,o),error:e.error&&$3(e.error,o),complete:e.complete&&$3(e.complete,o)}):i=e}this.destination=new W3(i)}};function Al(t){$n.useDeprecatedSynchronousErrorHandling?Af(t):Ol(t)}function v_(t){throw t}function q3(t,e){let{onStoppedNotification:r}=$n;r&&cs.setTimeout(()=>r(t,e))}var y_={closed:!0,next:qn,error:v_,complete:qn};var us=typeof Symbol=="function"&&Symbol.observable||"@@observable";function It(t){return t}function G3(...t){return K3(t)}function K3(t){return t.length===0?It:t.length===1?t[0]:function(r){return t.reduce((n,i)=>i(n),r)}}var Y=(()=>{class t{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new t;return n.source=this,n.operator=r,n}subscribe(r,n,i){let o=b_(r)?r:new Lr(r,n,i);return ls(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=Ff(n),new n((i,o)=>{let s=new Lr({next:a=>{try{r(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[us](){return this}pipe(...r){return K3(r)(this)}toPromise(r){return r=Ff(r),new r((n,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>n(o))})}}return t.create=e=>new t(e),t})();function Ff(t){var e;return(e=t??$n.Promise)!==null&&e!==void 0?e:Promise}function w_(t){return t&&K(t.next)&&K(t.error)&&K(t.complete)}function b_(t){return t&&t instanceof Qi||w_(t)&&Pl(t)}function Z3(t){return K(t?.lift)}function q(t){return e=>{if(Z3(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function H(t,e,r,n,i){return new Q3(t,e,r,n,i)}var Q3=class extends Qi{constructor(e,r,n,i,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=r?function(a){try{r(a)}catch(c){e.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){e.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:r}=this;super.unsubscribe(),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function ds(){return q((t,e)=>{let r=null;t._refCount++;let n=H(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){r=null;return}let i=t._connection,o=r;r=null,i&&(!o||i===o)&&i.unsubscribe(),e.unsubscribe()});t.subscribe(n),n.closed||(r=t.connect())})}var lr=class extends Y{constructor(e,r){super(),this.source=e,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,Z3(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new ye;let r=this.getSubject();e.add(this.source.subscribe(H(r,void 0,()=>{this._teardown(),r.complete()},n=>{this._teardown(),r.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=ye.EMPTY)}return e}refCount(){return ds()(this)}};var hs={schedule(t){let e=requestAnimationFrame,r=cancelAnimationFrame,{delegate:n}=hs;n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame);let i=e(o=>{r=void 0,t(o)});return new ye(()=>r?.(i))},requestAnimationFrame(...t){let{delegate:e}=hs;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:e}=hs;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var Nf=as(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var S=(()=>{class t extends Y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new Fl(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new Nf}next(r){ls(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){ls(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){ls(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:i,observers:o}=this;return n||i?B3:(this.currentObservers=null,o.push(r),new ye(()=>{this.currentObservers=null,Ki(o,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:i,isStopped:o}=this;n?r.error(i):o&&r.complete()}asObservable(){let r=new Y;return r.source=this,r}}return t.create=(e,r)=>new Fl(e,r),t})(),Fl=class extends S{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.next)===null||n===void 0||n.call(r,e)}error(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.error)===null||n===void 0||n.call(r,e)}complete(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)}_subscribe(e){var r,n;return(n=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&n!==void 0?n:B3}};var Re=class extends S{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let r=super._subscribe(e);return!r.closed&&e.next(this._value),r}getValue(){let{hasError:e,thrownError:r,_value:n}=this;if(e)throw r;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var Na={now(){return(Na.delegate||Date).now()},delegate:void 0};var fi=class extends S{constructor(e=1/0,r=1/0,n=Na){super(),this._bufferSize=e,this._windowTime=r,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=r===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,r)}next(e){let{isStopped:r,_buffer:n,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;r||(n.push(e),!i&&n.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let r=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:i}=this,o=i.slice();for(let s=0;sRf(e)&&t()),e},clearImmediate(t){Rf(t)}};var{setImmediate:C_,clearImmediate:M_}=Lf,La={setImmediate(...t){let{delegate:e}=La;return(e?.setImmediate||C_)(...t)},clearImmediate(t){let{delegate:e}=La;return(e?.clearImmediate||M_)(t)},delegate:void 0};var Rl=class extends pi{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=La.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,r,n=0){var i;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:o}=e;r!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==r&&(La.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))}};var fs=class t{constructor(e,r=t.now){this.schedulerActionCtor=e,this.now=r}schedule(e,r=0,n){return new this.schedulerActionCtor(this,e).schedule(n,r)}};fs.now=Na.now;var mi=class extends fs{constructor(e,r=fs.now){super(e,r),this.actions=[],this._active=!1}flush(e){let{actions:r}=this;if(this._active){r.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,n){for(;e=r.shift();)e.unsubscribe();throw n}}};var Ll=class extends mi{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,i;e=e||n.shift();do if(i=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,i){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw i}}};var e0=new Ll(Rl);var Wn=new mi(pi),Hf=Wn;var Hl=class extends pi{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=hs.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,r,n=0){var i;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:o}=e;r!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==r&&(hs.cancelAnimationFrame(r),e._scheduled=void 0)}};var Vl=class extends mi{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,i;e=e||n.shift();do if(i=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,i){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw i}}};var Ha=new Vl(Hl);var Dt=new Y(t=>t.complete());function Yl(t){return t&&K(t.schedule)}function t0(t){return t[t.length-1]}function gi(t){return K(t0(t))?t.pop():void 0}function ur(t){return Yl(t0(t))?t.pop():void 0}function Vf(t,e){return typeof t0(t)=="number"?t.pop():e}function je(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function jf(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{l(n.next(u))}catch(d){s(d)}}function c(u){try{l(n.throw(u))}catch(d){s(d)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function Yf(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xi(t){return this instanceof Xi?(this.v=t,this):new Xi(t)}function Bf(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(h){n[h]&&(i[h]=function(f){return new Promise(function(p,y){o.push([h,f,p,y])>1||a(h,f)})})}function a(h,f){try{c(n[h](f))}catch(p){d(o[0][3],p)}}function c(h){h.value instanceof Xi?Promise.resolve(h.value.v).then(l,u):d(o[0][2],h)}function l(h){a("next",h)}function u(h){a("throw",h)}function d(h,f){h(f),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Uf(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Yf=="function"?Yf(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(s){return new Promise(function(a,c){s=t[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var ps=t=>t&&typeof t.length=="number"&&typeof t!="function";function jl(t){return K(t?.then)}function Bl(t){return K(t[us])}function Ul(t){return Symbol.asyncIterator&&K(t?.[Symbol.asyncIterator])}function $l(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function D_(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ql=D_();function Wl(t){return K(t?.[ql])}function Gl(t){return Bf(this,arguments,function*(){let r=t.getReader();try{for(;;){let{value:n,done:i}=yield Xi(r.read());if(i)return yield Xi(void 0);yield yield Xi(n)}}finally{r.releaseLock()}})}function Kl(t){return K(t?.getReader)}function ae(t){if(t instanceof Y)return t;if(t!=null){if(Bl(t))return x_(t);if(ps(t))return S_(t);if(jl(t))return T_(t);if(Ul(t))return $f(t);if(Wl(t))return E_(t);if(Kl(t))return z_(t)}throw $l(t)}function x_(t){return new Y(e=>{let r=t[us]();if(K(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function S_(t){return new Y(e=>{for(let r=0;r{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,Ol)})}function E_(t){return new Y(e=>{for(let r of t)if(e.next(r),e.closed)return;e.complete()})}function $f(t){return new Y(e=>{I_(t,e).catch(r=>e.error(r))})}function z_(t){return $f(Gl(t))}function I_(t,e){var r,n,i,o;return jf(this,void 0,void 0,function*(){try{for(r=Uf(t);n=yield r.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){i={error:s}}finally{try{n&&!n.done&&(o=r.return)&&(yield o.call(r))}finally{if(i)throw i.error}}e.complete()})}function Qt(t,e,r,n=0,i=!1){let o=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!i)return o}function Zl(t,e=0){return q((r,n)=>{r.subscribe(H(n,i=>Qt(n,t,()=>n.next(i),e),()=>Qt(n,t,()=>n.complete(),e),i=>Qt(n,t,()=>n.error(i),e)))})}function Ql(t,e=0){return q((r,n)=>{n.add(t.schedule(()=>r.subscribe(n),e))})}function qf(t,e){return ae(t).pipe(Ql(e),Zl(e))}function Wf(t,e){return ae(t).pipe(Ql(e),Zl(e))}function Gf(t,e){return new Y(r=>{let n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function Kf(t,e){return new Y(r=>{let n;return Qt(r,e,()=>{n=t[ql](),Qt(r,e,()=>{let i,o;try{({value:i,done:o}=n.next())}catch(s){r.error(s);return}o?r.complete():r.next(i)},0,!0)}),()=>K(n?.return)&&n.return()})}function Xl(t,e){if(!t)throw new Error("Iterable cannot be null");return new Y(r=>{Qt(r,e,()=>{let n=t[Symbol.asyncIterator]();Qt(r,e,()=>{n.next().then(i=>{i.done?r.complete():r.next(i.value)})},0,!0)})})}function Zf(t,e){return Xl(Gl(t),e)}function Qf(t,e){if(t!=null){if(Bl(t))return qf(t,e);if(ps(t))return Gf(t,e);if(jl(t))return Wf(t,e);if(Ul(t))return Xl(t,e);if(Wl(t))return Kf(t,e);if(Kl(t))return Zf(t,e)}throw $l(t)}function Le(t,e){return e?Qf(t,e):ae(t)}function A(...t){let e=ur(t);return Le(t,e)}function vi(t,e){let r=K(t)?t:()=>t,n=i=>i.error(r());return new Y(e?i=>e.schedule(n,0,i):n)}function Tn(t){return!!t&&(t instanceof Y||K(t.lift)&&K(t.subscribe))}var Gn=as(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function k_(t,e){let r=typeof e=="object";return new Promise((n,i)=>{let o=!1,s;t.subscribe({next:a=>{s=a,o=!0},error:i,complete:()=>{o?n(s):r?n(e.defaultValue):i(new Gn)}})})}function Xf(t){return t instanceof Date&&!isNaN(t)}function Z(t,e){return q((r,n)=>{let i=0;r.subscribe(H(n,o=>{n.next(t.call(e,o,i++))}))})}var{isArray:P_}=Array;function O_(t,e){return P_(e)?t(...e):t(e)}function ms(t){return Z(e=>O_(t,e))}var{isArray:A_}=Array,{getPrototypeOf:F_,prototype:N_,keys:R_}=Object;function Jl(t){if(t.length===1){let e=t[0];if(A_(e))return{args:e,keys:null};if(L_(e)){let r=R_(e);return{args:r.map(n=>e[n]),keys:r}}}return{args:t,keys:null}}function L_(t){return t&&typeof t=="object"&&F_(t)===N_}function e1(t,e){return t.reduce((r,n,i)=>(r[n]=e[i],r),{})}function Ji(...t){let e=ur(t),r=gi(t),{args:n,keys:i}=Jl(t);if(n.length===0)return Le([],e);let o=new Y(H_(n,e,i?s=>e1(i,s):It));return r?o.pipe(ms(r)):o}function H_(t,e,r=It){return n=>{Jf(e,()=>{let{length:i}=t,o=new Array(i),s=i,a=i;for(let c=0;c{let l=Le(t[c],e),u=!1;l.subscribe(H(n,d=>{o[c]=d,u||(u=!0,a--),a||n.next(r(o.slice()))},()=>{--s||n.complete()}))},n)},n)}}function Jf(t,e,r){t?Qt(r,t,e):e()}function e5(t,e,r,n,i,o,s,a){let c=[],l=0,u=0,d=!1,h=()=>{d&&!c.length&&!l&&e.complete()},f=y=>l{o&&e.next(y),l++;let v=!1;ae(r(y,u++)).subscribe(H(e,M=>{i?.(M),o?f(M):e.next(M)},()=>{v=!0},void 0,()=>{if(v)try{for(l--;c.length&&lp(M)):p(M)}h()}catch(M){e.error(M)}}))};return t.subscribe(H(e,f,()=>{d=!0,h()})),()=>{a?.()}}function Ke(t,e,r=1/0){return K(e)?Ke((n,i)=>Z((o,s)=>e(n,o,i,s))(ae(t(n,i))),r):(typeof e=="number"&&(r=e),q((n,i)=>e5(n,i,t,r)))}function yi(t=1/0){return Ke(It,t)}function t5(){return yi(1)}function dr(...t){return t5()(Le(t,ur(t)))}function gs(t){return new Y(e=>{ae(t()).subscribe(e)})}function V_(...t){let e=gi(t),{args:r,keys:n}=Jl(t),i=new Y(o=>{let{length:s}=r;if(!s){o.complete();return}let a=new Array(s),c=s,l=s;for(let u=0;u{d||(d=!0,l--),a[u]=h},()=>c--,void 0,()=>{(!c||!d)&&(l||o.next(n?e1(n,a):a),o.complete())}))}});return e?i.pipe(ms(e)):i}var Y_=["addListener","removeListener"],j_=["addEventListener","removeEventListener"],B_=["on","off"];function Kn(t,e,r,n){if(K(r)&&(n=r,r=void 0),n)return Kn(t,e,r).pipe(ms(n));let[i,o]=q_(t)?j_.map(s=>a=>t[s](e,a,r)):U_(t)?Y_.map(n5(t,e)):$_(t)?B_.map(n5(t,e)):[];if(!i&&ps(t))return Ke(s=>Kn(s,e,r))(ae(t));if(!i)throw new TypeError("Invalid event target");return new Y(s=>{let a=(...c)=>s.next(1o(a)})}function n5(t,e){return r=>n=>t[r](e,n)}function U_(t){return K(t.addListener)&&K(t.removeListener)}function $_(t){return K(t.on)&&K(t.off)}function q_(t){return K(t.addEventListener)&&K(t.removeEventListener)}function Hr(t=0,e,r=Hf){let n=-1;return e!=null&&(Yl(e)?r=e:n=e),new Y(i=>{let o=Xf(t)?+t-r.now():t;o<0&&(o=0);let s=0;return r.schedule(function(){i.closed||(i.next(s++),0<=n?this.schedule(void 0,n):i.complete())},o)})}function n0(t=0,e=Wn){return t<0&&(t=0),Hr(t,t,e)}function vs(...t){let e=ur(t),r=Vf(t,1/0),n=t;return n.length?n.length===1?ae(n[0]):yi(r)(Le(n,e)):Dt}var{isArray:W_}=Array;function r5(t){return t.length===1&&W_(t[0])?t[0]:t}function ge(t,e){return q((r,n)=>{let i=0;r.subscribe(H(n,o=>t.call(e,o,i++)&&n.next(o)))})}function G_(t,e){return new Y(r=>{let n=t(),i=e(n);return(i?ae(i):Dt).subscribe(r),()=>{n&&n.unsubscribe()}})}function K_(...t){let e=gi(t),r=r5(t);return r.length?new Y(n=>{let i=r.map(()=>[]),o=r.map(()=>!1);n.add(()=>{i=o=null});for(let s=0;!n.closed&&s{if(i[s].push(a),i.every(c=>c.length)){let c=i.map(l=>l.shift());n.next(e?e(...c):c),i.some((l,u)=>!l.length&&o[u])&&n.complete()}},()=>{o[s]=!0,!i[s].length&&n.complete()}));return()=>{i=o=null}}):Dt}function i5(t){return q((e,r)=>{let n=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let l=i;i=null,r.next(l)}s&&r.complete()},c=()=>{o=null,s&&r.complete()};e.subscribe(H(r,l=>{n=!0,i=l,o||ae(t(l)).subscribe(o=H(r,a,c))},()=>{s=!0,(!n||!o||o.closed)&&r.complete()}))})}function Va(t,e=Wn){return i5(()=>Hr(t,e))}function En(t){return q((e,r)=>{let n=null,i=!1,o;n=e.subscribe(H(r,void 0,void 0,s=>{o=ae(t(s,En(t)(e))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}function o5(t,e,r,n,i){return(o,s)=>{let a=r,c=e,l=0;o.subscribe(H(s,u=>{let d=l++;c=a?t(c,u,d):(a=!0,u),n&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}function Vr(t,e){return K(e)?Ke(t,e,1):Ke(t,1)}function s5(t){return new Y(e=>t.subscribe(e))}var Z_={connector:()=>new S};function t1(t,e=Z_){let{connector:r}=e;return q((n,i)=>{let o=r();ae(t(s5(o))).subscribe(i),i.add(n.subscribe(o))})}function Q_(t){return q((e,r)=>{let n=!1,i=null,o=null,s=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let a=i;i=null,r.next(a)}};e.subscribe(H(r,a=>{o?.unsubscribe(),n=!0,i=a,o=H(r,s,qn),ae(t(a)).subscribe(o)},()=>{s(),r.complete()},void 0,()=>{i=o=null}))})}function wi(t,e=Wn){return q((r,n)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let l=o;o=null,n.next(l)}};function c(){let l=s+t,u=e.now();if(u{o=l,s=e.now(),i||(i=e.schedule(c,t),n.add(i))},()=>{a(),n.complete()},void 0,()=>{o=i=null}))})}function bi(t){return q((e,r)=>{let n=!1;e.subscribe(H(r,i=>{n=!0,r.next(i)},()=>{n||r.next(t),r.complete()}))})}function ze(t){return t<=0?()=>Dt:q((e,r)=>{let n=0;e.subscribe(H(r,i=>{++n<=t&&(r.next(i),t<=n&&r.complete())}))})}function a5(){return q((t,e)=>{t.subscribe(H(e,qn))})}function eo(t){return Z(()=>t)}function r0(t,e){return e?r=>dr(e.pipe(ze(1),a5()),r.pipe(r0(t))):Ke((r,n)=>ae(t(r,n)).pipe(ze(1),eo(r)))}function ys(t,e=Wn){let r=Hr(t,e);return r0(()=>r)}function ws(t,e=It){return t=t??X_,q((r,n)=>{let i,o=!0;r.subscribe(H(n,s=>{let a=e(s);(o||!t(i,a))&&(o=!1,i=a,n.next(s))}))})}function X_(t,e){return t===e}function n1(t=J_){return q((e,r)=>{let n=!1;e.subscribe(H(r,i=>{n=!0,r.next(i)},()=>n?r.complete():r.error(t())))})}function J_(){return new Gn}function c5(t,e){return e?r=>r.pipe(c5((n,i)=>ae(t(n,i)).pipe(Z((o,s)=>e(n,o,i,s))))):q((r,n)=>{let i=0,o=null,s=!1;r.subscribe(H(n,a=>{o||(o=H(n,void 0,()=>{o=null,s&&n.complete()}),ae(t(a,i++)).subscribe(o))},()=>{s=!0,!o&&n.complete()}))})}function un(t){return q((e,r)=>{try{e.subscribe(r)}finally{r.add(t)}})}function hr(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ge((i,o)=>t(i,o,n)):It,ze(1),r?bi(e):n1(()=>new Gn))}function bs(t){return t<=0?()=>Dt:q((e,r)=>{let n=[];e.subscribe(H(r,i=>{n.push(i),t{for(let i of n)r.next(i);r.complete()},void 0,()=>{n=null}))})}function i0(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ge((i,o)=>t(i,o,n)):It,bs(1),r?bi(e):n1(()=>new Gn))}function r1(t,e){let r=K(t)?t:()=>t;return K(e)?t1(e,{connector:r}):n=>new lr(n,r)}function o0(){return q((t,e)=>{let r,n=!1;t.subscribe(H(e,i=>{let o=r;r=i,n&&e.next([o,i]),n=!0}))})}function eC(t){return t?e=>t1(t)(e):e=>r1(new S)(e)}function tC(t,e,r,n){r&&!K(r)&&(n=r);let i=K(r)?r:void 0;return o=>r1(new fi(t,e,n),i)(o)}function s0(t,e){return q(o5(t,e,arguments.length>=2,!0))}function fr(t={}){let{connector:e=()=>new S,resetOnError:r=!0,resetOnComplete:n=!0,resetOnRefCountZero:i=!0}=t;return o=>{let s,a,c,l=0,u=!1,d=!1,h=()=>{a?.unsubscribe(),a=void 0},f=()=>{h(),s=c=void 0,u=d=!1},p=()=>{let y=s;f(),y?.unsubscribe()};return q((y,v)=>{l++,!d&&!u&&h();let M=c=c??e();v.add(()=>{l--,l===0&&!d&&!u&&(a=a0(p,i))}),M.subscribe(v),!s&&l>0&&(s=new Lr({next:P=>M.next(P),error:P=>{d=!0,h(),a=a0(f,r,P),M.error(P)},complete:()=>{u=!0,h(),a=a0(f,n),M.complete()}}),ae(y).subscribe(s))})(o)}}function a0(t,e,...r){if(e===!0){t();return}if(e===!1)return;let n=new Lr({next:()=>{n.unsubscribe(),t()}});return ae(e(...r)).subscribe(n)}function c0(t,e,r){let n,i=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:i=!1,scheduler:r}=t:n=t??1/0,fr({connector:()=>new fi(n,e,r),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Ya(t){return ge((e,r)=>t<=r)}function Rt(...t){let e=ur(t);return q((r,n)=>{(e?dr(t,r,e):dr(t,r)).subscribe(n)})}function Ze(t,e){return q((r,n)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&n.complete();r.subscribe(H(n,c=>{i?.unsubscribe();let l=0,u=o++;ae(t(c,u)).subscribe(i=H(n,d=>n.next(e?e(c,d,u,l++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function ce(t){return q((e,r)=>{ae(t).subscribe(H(r,()=>r.complete(),qn)),!r.closed&&e.subscribe(r)})}function l0(t,e=!1){return q((r,n)=>{let i=0;r.subscribe(H(n,o=>{let s=t(o,i++);(s||e)&&n.next(o),!s&&n.complete()}))})}function Fe(t,e,r){let n=K(t)||e||r?{next:t,error:e,complete:r}:t;return n?q((i,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;i.subscribe(H(o,c=>{var l;(l=n.next)===null||l===void 0||l.call(n,c),o.next(c)},()=>{var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},c=>{var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),o.error(c)},()=>{var c,l;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):It}function l5(t,e){return q((r,n)=>{let{leading:i=!0,trailing:o=!1}=e??{},s=!1,a=null,c=null,l=!1,u=()=>{c?.unsubscribe(),c=null,o&&(f(),l&&n.complete())},d=()=>{c=null,l&&n.complete()},h=p=>c=ae(t(p)).subscribe(H(n,u,d)),f=()=>{if(s){s=!1;let p=a;a=null,n.next(p),!l&&h(p)}};r.subscribe(H(n,p=>{s=!0,a=p,!(c&&!c.closed)&&(i?f():h(p))},()=>{l=!0,!(o&&s&&c&&!c.closed)&&n.complete()}))})}function nC(t,e=Wn,r){let n=Hr(t,e);return l5(()=>n,r)}function rC(...t){let e=gi(t);return q((r,n)=>{let i=t.length,o=new Array(i),s=t.map(()=>!1),a=!1;for(let c=0;c{o[c]=l,!a&&!s[c]&&(s[c]=!0,(a=s.every(It))&&(s=null))},qn));r.subscribe(H(n,c=>{if(a){let l=[c,...o];n.next(e?e(...l):l)}}))})}var J5="https://g.co/ng/security#xss",z=class extends Error{constructor(e,r){super(N1(e,r)),this.code=e}};function N1(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}function Be(t){for(let e in t)if(t[e]===Be)return e;throw Error("Could not find renamed property on target object.")}function iC(t,e){for(let r in e)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function $t(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map($t).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let e=t.toString();if(e==null)return""+e;let r=e.indexOf(` +`);return r===-1?e:e.substring(0,r)}function S0(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var oC=Be({__forward_ref__:Be});function R1(t){return t.__forward_ref__=R1,t.toString=function(){return $t(this())},t}function Ut(t){return ep(t)?t():t}function ep(t){return typeof t=="function"&&t.hasOwnProperty(oC)&&t.__forward_ref__===R1}function tp(t){return t&&!!t.\u0275providers}var sC=Be({\u0275cmp:Be}),aC=Be({\u0275dir:Be}),cC=Be({\u0275pipe:Be}),lC=Be({\u0275mod:Be}),g1=Be({\u0275fac:Be}),ja=Be({__NG_ELEMENT_ID__:Be}),u5=Be({__NG_ENV_ID__:Be});function Qn(t){return typeof t=="string"?t:t==null?"":String(t)}function uC(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Qn(t)}function dC(t,e){let r=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new z(-200,`Circular dependency in DI detected for ${t}${r}`)}function N8(t,e){throw new z(-201,!1)}function hC(t,e){t==null&&fC(e,t,null,"!=")}function fC(t,e,r,n){throw new Error(`ASSERTION ERROR: ${t}`+(n==null?"":` [Expected=> ${r} ${n} ${e} <=Actual]`))}function C(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ee(t){return{providers:t.providers||[],imports:t.imports||[]}}function L1(t){return d5(t,rp)||d5(t,ip)}function np(t){return L1(t)!==null}function d5(t,e){return t.hasOwnProperty(e)?t[e]:null}function pC(t){let e=t&&(t[rp]||t[ip]);return e||null}function h5(t){return t&&(t.hasOwnProperty(f5)||t.hasOwnProperty(mC))?t[f5]:null}var rp=Be({\u0275prov:Be}),f5=Be({\u0275inj:Be}),ip=Be({ngInjectableDef:Be}),mC=Be({ngInjectorDef:Be}),be=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(be||{}),T0;function op(){return T0}function Xt(t){let e=T0;return T0=t,e}function sp(t,e,r){let n=L1(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&be.Optional)return null;if(e!==void 0)return e;N8(t,"Injector")}var dn=globalThis;var E=class{constructor(e,r){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof r=="number"?this.__NG_ELEMENT_ID__=r:r!==void 0&&(this.\u0275prov=C({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};var gC={},Ua=gC,E0="__NG_DI_FLAG__",v1="ngTempTokenPath",vC="ngTokenPath",yC=/\n/gm,wC="\u0275",p5="__source",xs;function bC(){return xs}function _i(t){let e=xs;return xs=t,e}function _C(t,e=be.Default){if(xs===void 0)throw new z(-203,!1);return xs===null?sp(t,void 0,e):xs.get(t,e&be.Optional?null:void 0,e)}function g(t,e=be.Default){return(op()||_C)(Ut(t),e)}function w(t,e=be.Default){return g(t,H1(e))}function H1(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function z0(t){let e=[];for(let r=0;r ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):$t(a)))}i=`{${o.join(", ")}}`}return`${r}${n?"("+n+")":""}[${i}]: ${t.replace(yC,` - `)}`}function nc(t){return{toString:t}.toString()}var sp=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(sp||{}),vr=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(vr||{}),Ts={},Jt=[],W=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(W||{});function ap(t,e,r){let n=t.length;for(;;){let i=t.indexOf(e,r);if(i===-1)return i;if(i===0||t.charCodeAt(i-1)<=32){let o=e.length;if(i+o===n||t.charCodeAt(i+o)<=32)return i}r=i+1}}function I0(t,e,r){let n=0;for(;ne){s=o-1;break}}}for(;oo?h="":h=i[d+1].toLowerCase();let f=n&8?h:null;if(f&&ap(f,l,0)!==-1||n&2&&l!==h){if(Zn(n))return!1;s=!0}}}}return Zn(n)||s}function Zn(t){return(t&1)===0}function zC(t,e,r,n){if(e===null)return-1;let i=0;if(n||!r){let o=!1;for(;i-1)for(r++;r0?'="'+a+'"':"")+"]"}else n&8?i+="."+s:n&4&&(i+=" "+s);else i!==""&&!Zn(s)&&(e+=m5(o,i),i=""),n=s,o=o||!Zn(n);r++}return i!==""&&(e+=m5(o,i)),e}function FC(t){return t.map(AC).join(",")}function NC(t){let e=[],r=[],n=1,i=2;for(;n{let e=gp(t),r=ke(b({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===sp.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||vr.Emulated,styles:t.styles||Jt,_:null,schemas:t.schemas||null,tView:null,id:""});vp(r);let n=t.dependencies;return r.directiveDefs=v5(n,!1),r.pipeDefs=v5(n,!0),r.id=HC(r),r})}function RC(t){return Mi(t)||hp(t)}function LC(t){return t!==null}function te(t){return nc(()=>({type:t.type,bootstrap:t.bootstrap||Jt,declarations:t.declarations||Jt,imports:t.imports||Jt,exports:t.exports||Jt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function g5(t,e){if(t==null)return Ts;let r={};for(let n in t)if(t.hasOwnProperty(n)){let i=t[n],o,s,a=W.None;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o):(o=i,s=i),e?(r[o]=a!==W.None?[n,a]:n,e[o]=s):r[o]=n}return r}function ne(t){return nc(()=>{let e=gp(t);return vp(e),e})}function en(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone===!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function Mi(t){return t[sC]||null}function hp(t){return t[aC]||null}function fp(t){return t[cC]||null}function pp(t){let e=Mi(t)||hp(t)||fp(t);return e!==null?e.standalone:!1}function mp(t,e){let r=t[lC]||null;if(!r&&e===!0)throw new Error(`Type ${$t(t)} does not have '\u0275mod' property.`);return r}function gp(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:t.inputs||Ts,exportAs:t.exportAs||null,standalone:t.standalone===!0,signals:t.signals===!0,selectors:t.selectors||Jt,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:g5(t.inputs,e),outputs:g5(t.outputs),debugInfo:null}}function vp(t){t.features?.forEach(e=>e(t))}function v5(t,e){if(!t)return null;let r=e?fp:RC;return()=>(typeof t=="function"?t():t).map(n=>r(n)).filter(LC)}function HC(t){let e=0,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(let i of r)e=Math.imul(31,e)+i.charCodeAt(0)<<0;return e+=2147483648,"c"+e}var Cr=0,fe=1,ue=2,kt=3,Xn=4,fn=5,Es=6,$a=7,Lt=8,zs=9,yr=10,it=11,qa=12,y5=13,Rs=14,zn=15,rc=16,_s=17,gr=18,V1=19,yp=20,Ci=21,u0=22,io=23,xt=25,L8=1;var oo=7,y1=8,Is=9,Ht=10,H8=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(H8||{});function no(t){return Array.isArray(t)&&typeof t[L8]=="object"}function Br(t){return Array.isArray(t)&&t[L8]===!0}function V8(t){return(t.flags&4)!==0}function Y1(t){return t.componentOffset>-1}function j1(t){return(t.flags&1)===1}function Yr(t){return!!t.template}function VC(t){return(t[ue]&512)!==0}function so(t,e){let r=t.hasOwnProperty(g1);return r?t[g1]:null}var k0=class{constructor(e,r,n){this.previousValue=e,this.currentValue=r,this.firstChange=n}isFirstChange(){return this.firstChange}};function wp(t,e,r,n){e!==null?e.applyValueToInputSignal(e,n):t[r]=n}function He(){return bp}function bp(t){return t.type.prototype.ngOnChanges&&(t.setInput=jC),YC}He.ngInherit=!0;function YC(){let t=Cp(this),e=t?.current;if(e){let r=t.previous;if(r===Ts)t.previous=e;else for(let n in e)r[n]=e[n];t.current=null,this.ngOnChanges(e)}}function jC(t,e,r,n,i){let o=this.declaredInputs[n],s=Cp(t)||BC(t,{previous:Ts,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[o];a[o]=new k0(l&&l.currentValue,r,c===Ts),wp(t,e,i,r)}var _p="__ngSimpleChanges__";function Cp(t){return t[_p]||null}function BC(t,e){return t[_p]=e}var w5=null;var pr=function(t,e,r){w5?.(t,e,r)},Mp="svg",UC="math",$C=!1;function qC(){return $C}function wr(t){for(;Array.isArray(t);)t=t[Cr];return t}function WC(t){for(;Array.isArray(t);){if(typeof t[L8]=="object")return t;t=t[Cr]}return null}function Dp(t,e){return wr(e[t])}function In(t,e){return wr(e[t.index])}function Y8(t,e){return t.data[e]}function B1(t,e){return t[e]}function Ti(t,e){let r=e[t];return no(r)?r:r[Cr]}function GC(t){return(t[ue]&4)===4}function j8(t){return(t[ue]&128)===128}function KC(t){return Br(t[kt])}function ks(t,e){return e==null?null:t[e]}function xp(t){t[_s]=0}function ZC(t){t[ue]&1024||(t[ue]|=1024,j8(t)&&Wa(t))}function QC(t,e){for(;t>0;)e=e[Rs],t--;return e}function Sp(t){return t[ue]&9216||t[io]?.dirty}function P0(t){Sp(t)?Wa(t):t[ue]&64&&(qC()?(t[ue]|=1024,Wa(t)):t[yr].changeDetectionScheduler?.notify())}function Wa(t){t[yr].changeDetectionScheduler?.notify();let e=Ga(t);for(;e!==null&&!(e[ue]&8192||(e[ue]|=8192,!j8(e)));)e=Ga(e)}function Tp(t,e){if((t[ue]&256)===256)throw new z(911,!1);t[Ci]===null&&(t[Ci]=[]),t[Ci].push(e)}function XC(t,e){if(t[Ci]===null)return;let r=t[Ci].indexOf(e);r!==-1&&t[Ci].splice(r,1)}function Ga(t){let e=t[kt];return Br(e)?e[kt]:e}var pe={lFrame:Fp(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function JC(){return pe.lFrame.elementDepthCount}function eM(){pe.lFrame.elementDepthCount++}function tM(){pe.lFrame.elementDepthCount--}function Ep(){return pe.bindingsEnabled}function zp(){return pe.skipHydrationRootTNode!==null}function nM(t){return pe.skipHydrationRootTNode===t}function rM(){pe.skipHydrationRootTNode=null}function ie(){return pe.lFrame.lView}function ot(){return pe.lFrame.tView}function pn(t){return pe.lFrame.contextLView=t,t[Lt]}function mn(t){return pe.lFrame.contextLView=null,t}function Vt(){let t=Ip();for(;t!==null&&t.type===64;)t=t.parent;return t}function Ip(){return pe.lFrame.currentTNode}function iM(){let t=pe.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function po(t,e){let r=pe.lFrame;r.currentTNode=t,r.isParent=e}function B8(){return pe.lFrame.isParent}function U8(){pe.lFrame.isParent=!1}function oM(){return pe.lFrame.contextLView}function mo(){let t=pe.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function kp(){return pe.lFrame.bindingIndex}function sM(t){return pe.lFrame.bindingIndex=t}function go(){return pe.lFrame.bindingIndex++}function U1(t){let e=pe.lFrame,r=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,r}function aM(){return pe.lFrame.inI18n}function cM(t,e){let r=pe.lFrame;r.bindingIndex=r.bindingRootIndex=t,O0(e)}function lM(){return pe.lFrame.currentDirectiveIndex}function O0(t){pe.lFrame.currentDirectiveIndex=t}function $8(t){let e=pe.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function Pp(){return pe.lFrame.currentQueryIndex}function q8(t){pe.lFrame.currentQueryIndex=t}function uM(t){let e=t[fe];return e.type===2?e.declTNode:e.type===1?t[fn]:null}function Op(t,e,r){if(r&be.SkipSelf){let i=e,o=t;for(;i=i.parent,i===null&&!(r&be.Host);)if(i=uM(o),i===null||(o=o[Rs],i.type&10))break;if(i===null)return!1;e=i,t=o}let n=pe.lFrame=Ap();return n.currentTNode=e,n.lView=t,!0}function W8(t){let e=Ap(),r=t[fe];pe.lFrame=e,e.currentTNode=r.firstChild,e.lView=t,e.tView=r,e.contextLView=t,e.bindingIndex=r.bindingStartIndex,e.inI18n=!1}function Ap(){let t=pe.lFrame,e=t===null?null:t.child;return e===null?Fp(t):e}function Fp(t){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:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function Np(){let t=pe.lFrame;return pe.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Rp=Np;function G8(){let t=Np();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function dM(t){return(pe.lFrame.contextLView=QC(t,pe.lFrame.contextLView))[Lt]}function Ur(){return pe.lFrame.selectedIndex}function ao(t){pe.lFrame.selectedIndex=t}function ic(){let t=pe.lFrame;return Y8(t.tView,t.selectedIndex)}function zG(){pe.lFrame.currentNamespace=Mp}function IG(){hM()}function hM(){pe.lFrame.currentNamespace=null}function fM(){return pe.lFrame.currentNamespace}var Lp=!0;function $1(){return Lp}function q1(t){Lp=t}function pM(t,e,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(n){let s=bp(e);(r.preOrderHooks??=[]).push(t,s),(r.preOrderCheckHooks??=[]).push(t,s)}i&&(r.preOrderHooks??=[]).push(0-t,i),o&&((r.preOrderHooks??=[]).push(t,o),(r.preOrderCheckHooks??=[]).push(t,o))}function W1(t,e){for(let r=e.directiveStart,n=e.directiveEnd;r=n)break}else e[c]<0&&(t[_s]+=65536),(a>14>16&&(t[ue]&3)===e&&(t[ue]+=16384,b5(a,o)):b5(a,o)}var Ss=-1,co=class{constructor(e,r,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=n}};function gM(t){return t instanceof co}function vM(t){return(t.flags&8)!==0}function yM(t){return(t.flags&16)!==0}function Vp(t){return t!==Ss}function w1(t){return t&32767}function wM(t){return t>>16}function b1(t,e){let r=wM(t),n=e;for(;r>0;)n=n[Rs],r--;return n}var A0=!0;function _1(t){let e=A0;return A0=t,e}var bM=256,Yp=bM-1,jp=5,_M=0,mr={};function CM(t,e,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(Ya)&&(n=r[Ya]),n==null&&(n=r[Ya]=_M++);let i=n&Yp,o=1<>jp)]|=o}function C1(t,e){let r=Bp(t,e);if(r!==-1)return r;let n=e[fe];n.firstCreatePass&&(t.injectorIndex=e.length,h0(n.data,t),h0(e,null),h0(n.blueprint,null));let i=K8(t,e),o=t.injectorIndex;if(Vp(i)){let s=w1(i),a=b1(i,e),c=a[fe].data;for(let l=0;l<8;l++)e[o+l]=a[s+l]|c[s+l]}return e[o+8]=i,o}function h0(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Bp(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function K8(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let r=0,n=null,i=e;for(;i!==null;){if(n=Gp(i),n===null)return Ss;if(r++,i=i[Rs],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return Ss}function F0(t,e,r){CM(t,e,r)}function MM(t,e){if(e==="class")return t.classes;if(e==="style")return t.styles;let r=t.attrs;if(r){let n=r.length,i=0;for(;i>20,d=n?a:a+u,h=i?a+u:l;for(let f=d;f=c&&p.type===r)return f}if(i){let f=s[c];if(f&&Yr(f)&&f.type===r)return c}return null}function lo(t,e,r,n){let i=t[r],o=e.data;if(gM(i)){let s=i;s.resolving&&dC(uC(o[r]));let a=_1(s.canSeeViewProviders);s.resolving=!0;let c,l=s.injectImpl?Xt(s.injectImpl):null,u=Op(t,n,be.Default);try{i=t[r]=s.factory(void 0,o,t,n),e.firstCreatePass&&r>=n.directiveStart&&pM(r,o[r],e)}finally{l!==null&&Xt(l),_1(a),s.resolving=!1,Rp()}}return i}function xM(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(Ya)?t[Ya]:void 0;return typeof e=="number"?e>=0?e&Yp:SM:e}function _5(t,e,r){let n=1<>jp)]&n)}function C5(t,e){return!(t&be.Self)&&!(t&be.Host&&e)}var ro=class{constructor(e,r){this._tNode=e,this._lView=r}get(e,r,n){return qp(this._tNode,this._lView,e,H1(n),r)}};function SM(){return new ro(Vt(),ie())}function Ls(t){return nc(()=>{let e=t.prototype.constructor,r=e[g1]||N0(e),n=Object.prototype,i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==n;){let o=i[g1]||N0(i);if(o&&o!==r)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function N0(t){return J5(t)?()=>{let e=N0(Ut(t));return e&&e()}:so(t)}function TM(t,e,r,n,i){let o=t,s=e;for(;o!==null&&s!==null&&s[ue]&2048&&!(s[ue]&512);){let a=Wp(o,s,r,n|be.Self,mr);if(a!==mr)return a;let c=o.parent;if(!c){let l=s[yp];if(l){let u=l.get(r,mr,n);if(u!==mr)return u}c=Gp(s),s=s[Rs]}o=c}return i}function Gp(t){let e=t[fe],r=e.type;return r===2?e.declTNode:r===1?t[fn]:null}function Z8(t){return MM(Vt(),t)}var i1="__parameters__";function EM(t){return function(...r){if(t){let n=t(...r);for(let i in n)this[i]=n[i]}}}function Q8(t,e,r){return nc(()=>{let n=EM(e);function i(...o){if(this instanceof i)return n.apply(this,o),this;let s=new i(...o);return a.annotation=s,a;function a(c,l,u){let d=c.hasOwnProperty(i1)?c[i1]:Object.defineProperty(c,i1,{value:[]})[i1];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),c}}return r&&(i.prototype=Object.create(r.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}var Kp=Function;function zM(t){return typeof t=="function"}function IM(t,e,r){if(t.length!==e.length)return!1;for(let n=0;nArray.isArray(r)?X8(r,e):e(r))}function Zp(t,e,r){e>=t.length?t.push(r):t.splice(e,0,r)}function M1(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function PM(t,e){let r=[];for(let n=0;ne;){let o=i-2;t[i]=t[o],i--}t[e]=r,t[e+1]=n}}function vo(t,e,r){let n=oc(t,e);return n>=0?t[n|1]=r:(n=~n,OM(t,n,e,r)),n}function f0(t,e){let r=oc(t,e);if(r>=0)return t[r|1]}function oc(t,e){return AM(t,e,1)}function AM(t,e,r){let n=0,i=t.length>>r;for(;i!==n;){let o=n+(i-n>>1),s=t[o<e?i=o:n=o+1}return~(i<({token:t})),-1),$r=R8(Q8("Optional"),8);var Hs=R8(Q8("SkipSelf"),4);var Di=new E("ENVIRONMENT_INITIALIZER"),Xp=new E("INJECTOR",-1),Jp=new E("INJECTOR_DEF_TYPES"),D1=class{get(e,r=Ba){if(r===Ba){let n=new Error(`NullInjectorError: No provider for ${$t(e)}!`);throw n.name="NullInjectorError",n}return r}};function Wt(t){return{\u0275providers:t}}function J8(...t){return{\u0275providers:em(!0,t),\u0275fromNgModule:!0}}function em(t,...e){let r=[],n=new Set,i,o=s=>{r.push(s)};return X8(e,s=>{let a=s;R0(a,o,[],n)&&(i||=[],i.push(a))}),i!==void 0&&tm(i,o),r}function tm(t,e){for(let r=0;r{e(o,n)})}}function R0(t,e,r,n){if(t=Ut(t),!t)return!1;let i=null,o=d5(t),s=!o&&Mi(t);if(!o&&!s){let c=t.ngModule;if(o=d5(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=t}let a=n.has(i);if(s){if(a)return!1;if(n.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)R0(l,e,r,n)}}else if(o){if(o.imports!=null&&!a){n.add(i);let l;try{X8(o.imports,u=>{R0(u,e,r,n)&&(l||=[],l.push(u))})}finally{}l!==void 0&&tm(l,e)}if(!a){let l=so(i)||(()=>new i);e({provide:i,useFactory:l,deps:Jt},i),e({provide:Jp,useValue:i,multi:!0},i),e({provide:Di,useValue:()=>g(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let l=t;eu(c,u=>{e(u,l)})}}else return!1;return i!==t&&t.providers!==void 0}function eu(t,e){for(let r of t)ep(r)&&(r=r.\u0275providers),Array.isArray(r)?eu(r,e):e(r)}var FM=Be({provide:String,useValue:Be});function nm(t){return t!==null&&typeof t=="object"&&FM in t}function NM(t){return!!(t&&t.useExisting)}function RM(t){return!!(t&&t.useFactory)}function Ps(t){return typeof t=="function"}function LM(t){return!!t.useClass}var G1=new E("Set Injector scope."),f1={},HM={},p0;function tu(){return p0===void 0&&(p0=new D1),p0}var qt=class{},Ka=class extends qt{get destroyed(){return this._destroyed}constructor(e,r,n,i){super(),this.parent=r,this.source=n,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,H0(e,s=>this.processProvider(s)),this.records.set(Xp,Cs(void 0,this)),i.has("environment")&&this.records.set(qt,Cs(void 0,this));let o=this.records.get(G1);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Jp,Jt,be.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of e)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let r=_i(this),n=Xt(void 0),i;try{return e()}finally{_i(r),Xt(n)}}get(e,r=Ba,n=be.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(l5))return e[l5](this);n=H1(n);let i,o=_i(this),s=Xt(void 0);try{if(!(n&be.SkipSelf)){let c=this.records.get(e);if(c===void 0){let l=UM(e)&&L1(e);l&&this.injectableDefInScope(l)?c=Cs(L0(e),f1):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c)}let a=n&be.Self?tu():this.parent;return r=n&be.Optional&&r===Ba?null:r,a.get(e,r)}catch(a){if(a.name==="NullInjectorError"){if((a[v1]=a[v1]||[]).unshift($t(e)),o)throw a;return MC(a,e,"R3InjectorError",this.source)}else throw a}finally{Xt(s),_i(o)}}resolveInjectorInitializers(){let e=_i(this),r=Xt(void 0),n;try{let i=this.get(Di,Jt,be.Self);for(let o of i)o()}finally{_i(e),Xt(r)}}toString(){let e=[],r=this.records;for(let n of r.keys())e.push($t(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new z(205,!1)}processProvider(e){e=Ut(e);let r=Ps(e)?e:Ut(e&&e.provide),n=YM(e);if(!Ps(e)&&e.multi===!0){let i=this.records.get(r);i||(i=Cs(void 0,f1,!0),i.factory=()=>z0(i.multi),this.records.set(r,i)),r=e,i.multi.push(e)}this.records.set(r,n)}hydrate(e,r){return r.value===f1&&(r.value=HM,r.value=r.factory()),typeof r.value=="object"&&r.value&&BM(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}injectableDefInScope(e){if(!e.providedIn)return!1;let r=Ut(e.providedIn);return typeof r=="string"?r==="any"||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(e){let r=this._onDestroyHooks.indexOf(e);r!==-1&&this._onDestroyHooks.splice(r,1)}};function L0(t){let e=L1(t),r=e!==null?e.factory:so(t);if(r!==null)return r;if(t instanceof E)throw new z(204,!1);if(t instanceof Function)return VM(t);throw new z(204,!1)}function VM(t){if(t.length>0)throw new z(204,!1);let r=pC(t);return r!==null?()=>r.factory(t):()=>new t}function YM(t){if(nm(t))return Cs(void 0,t.useValue);{let e=rm(t);return Cs(e,f1)}}function rm(t,e,r){let n;if(Ps(t)){let i=Ut(t);return so(i)||L0(i)}else if(nm(t))n=()=>Ut(t.useValue);else if(RM(t))n=()=>t.useFactory(...z0(t.deps||[]));else if(NM(t))n=()=>g(Ut(t.useExisting));else{let i=Ut(t&&(t.useClass||t.provide));if(jM(t))n=()=>new i(...z0(t.deps));else return so(i)||L0(i)}return n}function Cs(t,e,r=!1){return{factory:t,value:e,multi:r?[]:void 0}}function jM(t){return!!t.deps}function BM(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function UM(t){return typeof t=="function"||typeof t=="object"&&t instanceof E}function H0(t,e){for(let r of t)Array.isArray(r)?H0(r,e):r&&ep(r)?H0(r.\u0275providers,e):e(r)}function Mr(t,e){t instanceof Ka&&t.assertNotDestroyed();let r,n=_i(t),i=Xt(void 0);try{return e()}finally{_i(n),Xt(i)}}function nu(t){if(!ip()&&!bC())throw new z(-203,!1)}function M5(t,e=null,r=null,n){let i=im(t,e,r,n);return i.resolveInjectorInitializers(),i}function im(t,e=null,r=null,n,i=new Set){let o=[r||Jt,J8(t)];return n=n||(typeof t=="object"?void 0:$t(t)),new Ka(o,e||tu(),n||null,i)}var Ue=(()=>{let e=class e{static create(n,i){if(Array.isArray(n))return M5({name:""},i,n,"");{let o=n.name??"";return M5({name:o},n.parent,n.providers,o)}}};e.THROW_IF_NOT_FOUND=Ba,e.NULL=new D1,e.\u0275prov=C({token:e,providedIn:"any",factory:()=>g(Xp)}),e.__NG_ELEMENT_ID__=-1;let t=e;return t})();var V0;function om(t){V0=t}function sm(){if(V0!==void 0)return V0;if(typeof document<"u")return document;throw new z(210,!1)}var K1=new E("AppId",{providedIn:"root",factory:()=>$M}),$M="ng",ru=new E("Platform Initializer"),Yt=new E("Platform ID",{providedIn:"platform",factory:()=>"unknown"});var gn=new E("AnimationModuleType"),qr=new E("CSP nonce",{providedIn:"root",factory:()=>sm().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});function kG(t){return t.ownerDocument.defaultView}function PG(t){return t.ownerDocument}function am(t){return t instanceof Function?t():t}function qM(t){return(t??w(Ue)).get(Yt)==="browser"}function cm(t){return(t.flags&128)===128}var br=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(br||{}),WM=/^>|^->||--!>|)/g,KM="\u200B$1\u200B";function ZM(t){return t.replace(WM,e=>e.replace(GM,KM))}var lm=new Map,QM=0;function XM(){return QM++}function JM(t){lm.set(t[V1],t)}function eD(t){lm.delete(t[V1])}var D5="__ngContext__";function xi(t,e){no(e)?(t[D5]=e[V1],JM(e)):t[D5]=e}var tD;function iu(t,e){return tD(t,e)}function Ms(t,e,r,n,i){if(n!=null){let o,s=!1;Br(n)?o=n:no(n)&&(s=!0,n=n[Cr]);let a=wr(n);t===0&&r!==null?i==null?pm(e,r,a):x1(e,r,a,i||null,!0):t===1&&r!==null?x1(e,r,a,i||null,!0):t===2?vD(e,a,s):t===3&&e.destroyNode(a),o!=null&&wD(e,t,o,r,i)}}function nD(t,e){return t.createText(e)}function rD(t,e,r){t.setValue(e,r)}function iD(t,e){return t.createComment(ZM(e))}function um(t,e,r){return t.createElement(e,r)}function oD(t,e){dm(t,e),e[Cr]=null,e[fn]=null}function sD(t,e,r,n,i,o){n[Cr]=i,n[fn]=e,X1(t,n,r,1,i,o)}function dm(t,e){e[yr].changeDetectionScheduler?.notify(),X1(t,e,e[it],2,null,null)}function aD(t){let e=t[qa];if(!e)return m0(t[fe],t);for(;e;){let r=null;if(no(e))r=e[qa];else{let n=e[Ht];n&&(r=n)}if(!r){for(;e&&!e[Xn]&&e!==t;)no(e)&&m0(e[fe],e),e=e[kt];e===null&&(e=t),no(e)&&m0(e[fe],e),r=e&&e[Xn]}e=r}}function cD(t,e,r,n){let i=Ht+n,o=r.length;n>0&&(r[i-1][Xn]=e),n0&&(t[r-1][Xn]=n[Xn]);let o=M1(t,Ht+e);oD(n[fe],n);let s=o[gr];s!==null&&s.detachView(o[fe]),n[kt]=null,n[Xn]=null,n[ue]&=-129}return n}function Z1(t,e){if(!(e[ue]&256)){let r=e[it];r.destroyNode&&X1(t,e,r,3,null,null),aD(e)}}function m0(t,e){if(!(e[ue]&256)){e[ue]&=-129,e[ue]|=256,e[io]&&Tf(e[io]),dD(t,e),uD(t,e),e[fe].type===1&&e[it].destroy();let r=e[rc];if(r!==null&&Br(e[kt])){r!==e[kt]&&hm(r,e);let n=e[gr];n!==null&&n.detachView(t)}eD(e)}}function uD(t,e){let r=t.cleanup,n=e[$a];if(r!==null)for(let o=0;o=0?n[s]():n[-s].unsubscribe(),o+=2}else{let s=n[r[o+1]];r[o].call(s)}n!==null&&(e[$a]=null);let i=e[Ci];if(i!==null){e[Ci]=null;for(let o=0;o-1){let{encapsulation:o}=t.data[n.directiveStart+i];if(o===vr.None||o===vr.Emulated)return null}return In(n,r)}}function x1(t,e,r,n,i){t.insertBefore(e,r,n,i)}function pm(t,e,r){t.appendChild(e,r)}function x5(t,e,r,n,i){n!==null?x1(t,e,r,n,i):pm(t,e,r)}function fD(t,e,r,n){t.removeChild(e,r,n)}function ou(t,e){return t.parentNode(e)}function pD(t,e){return t.nextSibling(e)}function mm(t,e,r){return gD(t,e,r)}function mD(t,e,r){return t.type&40?In(t,r):null}var gD=mD,S5;function Q1(t,e,r,n){let i=fm(t,n,e),o=e[it],s=n.parent||e[fn],a=mm(s,n,e);if(i!=null)if(Array.isArray(r))for(let c=0;ct,createScript:t=>t,createScriptURL:t=>t})}catch{}return o1}function J1(t){return CD()?.createHTML(t)||t}var s1;function bm(){if(s1===void 0&&(s1=null,dn.trustedTypes))try{s1=dn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return s1}function T5(t){return bm()?.createHTML(t)||t}function E5(t){return bm()?.createScriptURL(t)||t}var jr=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${X5})`}},j0=class extends jr{getTypeName(){return"HTML"}},B0=class extends jr{getTypeName(){return"Style"}},U0=class extends jr{getTypeName(){return"Script"}},$0=class extends jr{getTypeName(){return"URL"}},q0=class extends jr{getTypeName(){return"ResourceURL"}};function vn(t){return t instanceof jr?t.changingThisBreaksApplicationSecurity:t}function Wr(t,e){let r=MD(t);if(r!=null&&r!==e){if(r==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${r} (see ${X5})`)}return r===e}function MD(t){return t instanceof jr&&t.getTypeName()||null}function _m(t){return new j0(t)}function Cm(t){return new B0(t)}function Mm(t){return new U0(t)}function Dm(t){return new $0(t)}function xm(t){return new q0(t)}function DD(t){let e=new G0(t);return xD()?new W0(e):e}var W0=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let r=new window.DOMParser().parseFromString(J1(e),"text/html").body;return r===null?this.inertDocumentHelper.getInertBodyElement(e):(r.removeChild(r.firstChild),r)}catch{return null}}},G0=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let r=this.inertDocument.createElement("template");return r.innerHTML=J1(e),r}};function xD(){try{return!!new window.DOMParser().parseFromString(J1(""),"text/html")}catch{return!1}}var SD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function e4(t){return t=String(t),t.match(SD)?t:"unsafe:"+t}function Gr(t){let e={};for(let r of t.split(","))e[r]=!0;return e}function sc(...t){let e={};for(let r of t)for(let n in r)r.hasOwnProperty(n)&&(e[n]=!0);return e}var Sm=Gr("area,br,col,hr,img,wbr"),Tm=Gr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Em=Gr("rp,rt"),TD=sc(Em,Tm),ED=sc(Tm,Gr("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")),zD=sc(Em,Gr("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")),z5=sc(Sm,ED,zD,TD),zm=Gr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),ID=Gr("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"),kD=Gr("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"),PD=sc(zm,ID,kD),OD=Gr("script,style,template"),K0=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let r=e.firstChild,n=!0;for(;r;){if(r.nodeType===Node.ELEMENT_NODE?n=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,n&&r.firstChild){r=r.firstChild;continue}for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let i=this.checkClobberedElement(r,r.nextSibling);if(i){r=i;break}r=this.checkClobberedElement(r,r.parentNode)}}return this.buf.join("")}startElement(e){let r=e.nodeName.toLowerCase();if(!z5.hasOwnProperty(r))return this.sanitizedSomething=!0,!OD.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);let n=e.attributes;for(let i=0;i"),!0}endElement(e){let r=e.nodeName.toLowerCase();z5.hasOwnProperty(r)&&!Sm.hasOwnProperty(r)&&(this.buf.push(""))}chars(e){this.buf.push(I5(e))}checkClobberedElement(e,r){if(r&&(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return r}},AD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,FD=/([^\#-~ |!])/g;function I5(t){return t.replace(/&/g,"&").replace(AD,function(e){let r=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(FD,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var a1;function au(t,e){let r=null;try{a1=a1||DD(t);let n=e?String(e):"";r=a1.getInertBodyElement(n);let i=5,o=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=o,o=r.innerHTML,r=a1.getInertBodyElement(n)}while(n!==o);let a=new K0().sanitizeChildren(k5(r)||r);return J1(a)}finally{if(r){let n=k5(r)||r;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function k5(t){return"content"in t&&ND(t)?t.content:null}function ND(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var yn=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(yn||{});function Dr(t){let e=cu();return e?T5(e.sanitize(yn.HTML,t)||""):Wr(t,"HTML")?T5(vn(t)):au(sm(),Qn(t))}function RD(t){let e=cu();return e?e.sanitize(yn.URL,t)||"":Wr(t,"URL")?vn(t):e4(Qn(t))}function LD(t){let e=cu();if(e)return E5(e.sanitize(yn.RESOURCE_URL,t)||"");if(Wr(t,"ResourceURL"))return E5(vn(t));throw new z(904,!1)}function HD(t,e){return e==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||e==="href"&&(t==="base"||t==="link")?LD:RD}function Im(t,e,r){return HD(e,r)(t)}function cu(){let t=ie();return t&&t[yr].sanitizer}var Z0=class{};var VD="h",YD="b";var jD=()=>null;function lu(t,e,r=!1){return jD(t,e,r)}var Q0=class{},S1=class{};function BD(t){let e=Error(`No component factory found for ${$t(t)}.`);return e[UD]=t,e}var UD="ngComponent";var X0=class{resolveComponentFactory(e){throw BD(e)}},Ei=(()=>{let e=class e{};e.NULL=new X0;let t=e;return t})();function $D(){return Vs(Vt(),ie())}function Vs(t,e){return new oe(In(t,e))}var oe=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=$D;let t=e;return t})();function qD(t){return t instanceof oe?t.nativeElement:t}var Jn=class{},st=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>WD();let t=e;return t})();function WD(){let t=ie(),e=Vt(),r=Ti(e.index,t);return(no(r)?r:t)[it]}var GD=(()=>{let e=class e{};e.\u0275prov=C({token:e,providedIn:"root",factory:()=>null});let t=e;return t})(),g0={};function t4(t){let e=yt(null);try{return t()}finally{yt(e)}}function km(t){return uu(t)?Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t:!1}function KD(t,e){if(Array.isArray(t))for(let r=0;re,e8=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||ZD}forEachItem(e){let r;for(r=this._itHead;r!==null;r=r._next)e(r)}forEachOperation(e){let r=this._itHead,n=this._removalsHead,i=0,o=null;for(;r||n;){let s=!n||r&&r.currentIndex{s=this._trackByFn(i,a),r===null||!Object.is(r.trackById,s)?(r=this._mismatch(r,a,s,i),n=!0):(n&&(r=this._verifyReinsertion(r,a,s,i)),Object.is(r.item,a)||this._addIdentityChange(r,a)),r=r._next,i++}),this.length=i;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,r,n,i){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._reinsertAfter(e,o,i)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,i),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._moveAfter(e,o,i)):e=this._addAfter(new t8(r,n),o,i)),e}_verifyReinsertion(e,r,n,i){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return o!==null?e=this._reinsertAfter(o,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;e!==null;){let r=e._next;this._addToRemovals(this._unlink(e)),e=r}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,r,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let i=e._prevRemoved,o=e._nextRemoved;return i===null?this._removalsHead=o:i._nextRemoved=o,o===null?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(e,r,n),this._addToMoves(e,n),e}_moveAfter(e,r,n){return this._unlink(e),this._insertAfter(e,r,n),this._addToMoves(e,n),e}_addAfter(e,r,n){return this._insertAfter(e,r,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,r,n){let i=r===null?this._itHead:r._next;return e._next=i,e._prev=r,i===null?this._itTail=e:i._prev=e,r===null?this._itHead=e:r._next=e,this._linkedRecords===null&&(this._linkedRecords=new T1),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let r=e._prev,n=e._next;return r===null?this._itHead=n:r._next=n,n===null?this._itTail=r:n._prev=r,e}_addToMoves(e,r){return e.previousIndex===r||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new T1),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,r){return e.item=r,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},t8=class{constructor(e,r){this.item=e,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},n8=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,r){let n;for(n=this._head;n!==null;n=n._nextDup)if((r===null||r<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let r=e._prevDup,n=e._nextDup;return r===null?this._head=n:r._nextDup=n,n===null?this._tail=r:n._prevDup=r,this._head===null}},T1=class{constructor(){this.map=new Map}put(e){let r=e.trackById,n=this.map.get(r);n||(n=new n8,this.map.set(r,n)),n.add(e)}get(e,r){let n=e,i=this.map.get(n);return i?i.get(e,r):null}remove(e){let r=e.trackById;return this.map.get(r).remove(e)&&this.map.delete(r),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function P5(t,e,r){let n=t.previousIndex;if(n===null)return n;let i=0;return r&&n{if(r&&r.key===i)this._maybeAddToChanges(r,n),this._appendAfter=r,r=r._next;else{let o=this._getOrCreateRecordForKey(i,n);r=this._insertBeforeOrAppend(r,o)}}),r){r._prev&&(r._prev._next=null),this._removalsHead=r;for(let n=r;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,r){if(e){let n=e._prev;return r._next=e,r._prev=n,e._prev=r,n&&(n._next=r),e===this._mapHead&&(this._mapHead=r),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=r,r._prev=this._appendAfter):this._mapHead=r,this._appendAfter=r,null}_getOrCreateRecordForKey(e,r){if(this._records.has(e)){let i=this._records.get(e);this._maybeAddToChanges(i,r);let o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}let n=new o8(e);return this._records.set(e,n),n.currentValue=r,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,r){Object.is(r,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=r,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,r){e instanceof Map?e.forEach(r):Object.keys(e).forEach(n=>r(e[n],n))}},o8=class{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function O5(){return new ac([new J0])}var ac=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,i){if(i!=null){let o=i.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||O5()),deps:[[e,new Hs,new $r]]}}find(n){let i=this.factories.find(o=>o.supports(n));if(i!=null)return i;throw new z(901,!1)}};e.\u0275prov=C({token:e,providedIn:"root",factory:O5});let t=e;return t})();function A5(){return new du([new r8])}var du=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,i){if(i){let o=i.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||A5()),deps:[[e,new Hs,new $r]]}}find(n){let i=this.factories.find(o=>o.supports(n));if(i)return i;throw new z(901,!1)}};e.\u0275prov=C({token:e,providedIn:"root",factory:A5});let t=e;return t})();function E1(t,e,r,n,i=!1){for(;r!==null;){let o=e[r.index];o!==null&&n.push(wr(o)),Br(o)&&QD(o,n);let s=r.type;if(s&8)E1(t,e,r.child,n);else if(s&32){let a=iu(r,e),c;for(;c=a();)n.push(c)}else if(s&16){let a=gm(e,r);if(Array.isArray(a))n.push(...a);else{let c=Ga(e[zn]);E1(c[fe],c,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function QD(t,e){for(let r=Ht;r{Wa(t.lView)},consumerOnSignalRead(){this.lView[io]=this}});function Om(t){return Fm(t[qa])}function Am(t){return Fm(t[Xn])}function Fm(t){for(;t!==null&&!Br(t);)t=t[Xn];return t}var nx="ngOriginalError";function v0(t){return t[nx]}var _r=class{constructor(){this._console=console}handleError(e){let r=this._findOriginalError(e);this._console.error("ERROR",e),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(e){let r=e&&v0(e);for(;r&&v0(r);)r=v0(r);return r||null}},Nm=new E("",{providedIn:"root",factory:()=>w(_r).handleError.bind(void 0)});var Rm=!1,rx=new E("",{providedIn:"root",factory:()=>Rm});var tn={};function k(t=1){Lm(ot(),ie(),Ur()+t,!1)}function Lm(t,e,r,n){if(!n)if((e[ue]&3)===3){let o=t.preOrderCheckHooks;o!==null&&u1(e,o,r)}else{let o=t.preOrderHooks;o!==null&&d1(e,o,0,r)}ao(r)}function m(t,e=be.Default){let r=ie();if(r===null)return g(t,e);let n=Vt();return qp(n,r,Ut(t),e)}function n4(){let t="invalid";throw new Error(t)}function Hm(t,e,r,n,i,o){let s=yt(null);try{let a=null;i&W.SignalBased&&(a=e[n][Mf]),a!==null&&a.transformFn!==void 0&&(o=a.transformFn(o)),i&W.HasDecoratorInputTransform&&(o=t.inputTransforms[n].call(e,o)),t.setInput!==null?t.setInput(e,a,o,r,n):wp(e,a,n,o)}finally{yt(s)}}function ix(t,e){let r=t.hostBindingOpCodes;if(r!==null)try{for(let n=0;nxt&&Lm(t,e,xt,!1),pr(s?2:0,i),r(n,i)}finally{ao(o),pr(s?3:1,i)}}function hu(t,e,r){if(V8(e)){let n=yt(null);try{let i=e.directiveStart,o=e.directiveEnd;for(let s=i;snull;function ux(t,e,r,n){let i=Wm(e);i.push(r),t.firstCreatePass&&Gm(t).push(n,i.length-1)}function dx(t,e,r,n,i,o){let s=e?e.injectorIndex:-1,a=0;return zp()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs: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}}function F5(t,e,r,n,i){for(let o in e){if(!e.hasOwnProperty(o))continue;let s=e[o];if(s===void 0)continue;n??={};let a,c=W.None;Array.isArray(s)?(a=s[0],c=s[1]):a=s;let l=o;if(i!==null){if(!i.hasOwnProperty(o))continue;l=i[o]}t===0?N5(n,r,l,a,c):N5(n,r,l,a)}return n}function N5(t,e,r,n,i){let o;t.hasOwnProperty(r)?(o=t[r]).push(e,n):o=t[r]=[e,n],i!==void 0&&o.push(i)}function hx(t,e,r){let n=e.directiveStart,i=e.directiveEnd,o=t.data,s=e.attrs,a=[],c=null,l=null;for(let u=n;u0;){let r=t[--e];if(typeof r=="number"&&r<0)return r}return 0}function vx(t,e,r,n){let i=r.directiveStart,o=r.directiveEnd;Y1(r)&&Dx(e,r,t.data[i+r.componentOffset]),t.firstCreatePass||C1(r,e),xi(n,e);let s=r.initialInputs;for(let a=i;a-1&&(Za(e,n),M1(r,n))}this._attachedToViewContainer=!1}Z1(this._lView[fe],this._lView)}onDestroy(e){Tp(this._lView,e)}markForCheck(){yu(this._cdRefInjectingView||this._lView)}detach(){this._lView[ue]&=-129}reattach(){P0(this._lView),this._lView[ue]|=128}detectChanges(){this._lView[ue]|=1024,Ix(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new z(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,dm(this._lView[fe],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new z(902,!1);this._appRef=e,P0(this._lView)}},ft=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=Nx;let t=e;return t})();function Nx(t){return Rx(Vt(),ie(),(t&16)===16)}function Rx(t,e,r){if(Y1(t)&&!r){let n=Ti(t.index,e);return new uo(n,n)}else if(t.type&47){let n=e[zn];return new uo(n,e)}return null}var js=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=Lx,e.__NG_ENV_ID__=n=>n;let t=e;return t})(),l8=class extends js{constructor(e){super(),this._lView=e}onDestroy(e){return Tp(this._lView,e),()=>XC(this._lView,e)}};function Lx(){return new l8(ie())}var R5=new Set;function Bs(t){R5.has(t)||(R5.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var u8=class extends S{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,r,n){let i=e,o=r||(()=>null),s=n;if(e&&typeof e=="object"){let c=e;i=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=y0(o),i&&(i=y0(i)),s&&(s=y0(s)));let a=super.subscribe({next:i,error:o,complete:s});return e instanceof ye&&e.add(a),a}};function y0(t){return e=>{setTimeout(t,void 0,e)}}var re=u8;function L5(...t){}function Hx(){let t=typeof dn.requestAnimationFrame=="function",e=dn[t?"requestAnimationFrame":"setTimeout"],r=dn[t?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&e&&r){let n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);let i=r[Zone.__symbol__("OriginalDelegate")];i&&(r=i)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:r}}var U=class t{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new re(!1),this.onMicrotaskEmpty=new re(!1),this.onStable=new re(!1),this.onError=new re(!1),typeof Zone>"u")throw new z(908,!1);Zone.assertZonePatched();let i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!n&&r,i.shouldCoalesceRunChangeDetection=n,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=Hx().nativeRequestAnimationFrame,jx(i)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new z(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new z(909,!1)}run(e,r,n){return this._inner.run(e,r,n)}runTask(e,r,n,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,Vx,L5,L5);try{return o.runTask(s,r,n)}finally{o.cancelTask(s)}}runGuarded(e,r,n){return this._inner.runGuarded(e,r,n)}runOutsideAngular(e){return this._outer.run(e)}},Vx={};function wu(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Yx(t){t.isCheckStableRunning||t.lastRequestAnimationFrameId!==-1||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(dn,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,d8(t),t.isCheckStableRunning=!0,wu(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),d8(t))}function jx(t){let e=()=>{Yx(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,n,i,o,s,a)=>{if(Bx(a))return r.invokeTask(i,o,s,a);try{return H5(t),r.invokeTask(i,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),V5(t)}},onInvoke:(r,n,i,o,s,a,c)=>{try{return H5(t),r.invoke(i,o,s,a,c)}finally{t.shouldCoalesceRunChangeDetection&&e(),V5(t)}},onHasTask:(r,n,i,o)=>{r.hasTask(i,o),n===i&&(o.change=="microTask"?(t._hasPendingMicrotasks=o.microTask,d8(t),wu(t)):o.change=="macroTask"&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,n,i,o)=>(r.handleError(i,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}function d8(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.lastRequestAnimationFrameId!==-1?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function H5(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function V5(t){t._nesting--,wu(t)}function Bx(t){return!Array.isArray(t)||t.length!==1?!1:t[0].data?.__ignore_ng_zone__===!0}var Ds=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(Ds||{}),Ux={destroy(){}};function bu(t,e){!e&&nu(bu);let r=e?.injector??w(Ue);if(!qM(r))return Ux;Bs("NgAfterNextRender");let n=r.get(_u),i=n.handler??=new f8,o=e?.phase??Ds.MixedReadWrite,s=()=>{i.unregister(c),a()},a=r.get(js).onDestroy(s),c=new h8(r,o,()=>{s(),t()});return i.register(c),{destroy:s}}var h8=class{constructor(e,r,n){this.phase=r,this.callbackFn=n,this.zone=e.get(U),this.errorHandler=e.get(_r,null,{optional:!0})}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(e){this.errorHandler?.handleError(e)}}},f8=class{constructor(){this.executingCallbacks=!1,this.buckets={[Ds.EarlyRead]:new Set,[Ds.Write]:new Set,[Ds.MixedReadWrite]:new Set,[Ds.Read]:new Set},this.deferredCallbacks=new Set}register(e){(this.executingCallbacks?this.deferredCallbacks:this.buckets[e.phase]).add(e)}unregister(e){this.buckets[e.phase].delete(e),this.deferredCallbacks.delete(e)}execute(){let e=!1;this.executingCallbacks=!0;for(let r of Object.values(this.buckets))for(let n of r)e=!0,n.invoke();this.executingCallbacks=!1;for(let r of this.deferredCallbacks)this.buckets[r.phase].add(r);return this.deferredCallbacks.clear(),e}destroy(){for(let e of Object.values(this.buckets))e.clear();this.deferredCallbacks.clear()}},_u=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let o of n)o();return!!this.handler?.execute()||n.length>0}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=C({token:e,providedIn:"root",factory:()=>new e});let t=e;return t})();function $x(t,e){let r=Ti(e,t),n=r[fe];qx(n,r);let i=r[Cr];i!==null&&r[Es]===null&&(r[Es]=lu(i,r[zs])),Cu(n,r,r[Lt])}function qx(t,e){for(let r=e.length;r0&&ym(t,r,o.join(" "))}}function eS(t,e,r){let n=t.projection=[];for(let i=0;i=0;n--){let i=t[n];i.hostVars=e+=i.hostVars,i.hostAttrs=Ua(i.hostAttrs,r=Ua(r,i.hostAttrs))}}function c1(t){return t===Ts?{}:t===Jt?[]:t}function oS(t,e){let r=t.viewQuery;r?t.viewQuery=(n,i)=>{e(n,i),r(n,i)}:t.viewQuery=e}function sS(t,e){let r=t.contentQueries;r?t.contentQueries=(n,i,o)=>{e(n,i,o),r(n,i,o)}:t.contentQueries=e}function aS(t,e){let r=t.hostBindings;r?t.hostBindings=(n,i)=>{e(n,i),r(n,i)}:t.hostBindings=e}function rn(t){let e=t.inputConfig,r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];Array.isArray(i)&&i[3]&&(r[n]=i[3])}t.inputTransforms=r}var OG=new RegExp(`^(\\d+)*(${YD}|${VD})*(.*)`);var cS=()=>null;function Qa(t,e){return cS(t,e)}function s4(t,e,r,n){let i=e.tView,s=t[ue]&4096?4096:16,a=r4(t,i,r,s,null,e,null,null,null,n?.injector??null,n?.dehydratedView??null),c=t[e.index];a[rc]=c;let l=t[gr];return l!==null&&(a[gr]=l.createEmbeddedView(i)),Cu(i,a,r),a}function t7(t,e){let r=Ht+e;if(r{let e=class e{};e.__NG_ELEMENT_ID__=lS;let t=e;return t})();function lS(){let t=Vt();return i7(t,ie())}var uS=Xe,r7=class extends uS{constructor(e,r,n){super(),this._lContainer=e,this._hostTNode=r,this._hostLView=n}get element(){return Vs(this._hostTNode,this._hostLView)}get injector(){return new ro(this._hostTNode,this._hostLView)}get parentInjector(){let e=K8(this._hostTNode,this._hostLView);if(Vp(e)){let r=b1(e,this._hostLView),n=w1(e),i=r[fe].data[n+8];return new ro(i,r)}else return new ro(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let r=j5(this._lContainer);return r!==null&&r[e]||null}get length(){return this._lContainer.length-Ht}createEmbeddedView(e,r,n){let i,o;typeof n=="number"?i=n:n!=null&&(i=n.index,o=n.injector);let s=Qa(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(r||{},o,s);return this.insertImpl(a,i,Xa(this._hostTNode,s)),a}createComponent(e,r,n,i,o){let s=e&&!zM(e),a;if(s)a=r;else{let p=r||{};a=p.index,n=p.injector,i=p.projectableNodes,o=p.environmentInjector||p.ngModuleRef}let c=s?e:new Os(Mi(e)),l=n||this.parentInjector;if(!o&&c.ngModule==null){let y=(s?l:this.parentInjector).get(qt,null);y&&(o=y)}let u=Mi(c.componentType??{}),d=Qa(this._lContainer,u?.id??null),h=d?.firstChild??null,f=c.create(l,i,h,o);return this.insertImpl(f.hostView,a,Xa(this._hostTNode,d)),f}insert(e,r){return this.insertImpl(e,r,!0)}insertImpl(e,r,n){let i=e._lView;if(KC(i)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let c=i[kt],l=new r7(c,c[fn],c[kt]);l.detach(l.indexOf(e))}}let o=this._adjustIndex(r),s=this._lContainer;return a4(s,i,o,n),e.attachToViewContainerRef(),Zp(w0(s),o,e),e}move(e,r){return this.insert(e,r)}indexOf(e){let r=j5(this._lContainer);return r!==null?r.indexOf(e):-1}remove(e){let r=this._adjustIndex(e,-1),n=Za(this._lContainer,r);n&&(M1(w0(this._lContainer),r),Z1(n[fe],n))}detach(e){let r=this._adjustIndex(e,-1),n=Za(this._lContainer,r);return n&&M1(w0(this._lContainer),r)!=null?new uo(n):null}_adjustIndex(e,r=0){return e??this.length+r}};function j5(t){return t[y1]}function w0(t){return t[y1]||(t[y1]=[])}function i7(t,e){let r,n=e[t.index];return Br(n)?r=n:(r=$m(n,e,null,t),e[t.index]=r,o4(e,r)),hS(r,e,t,n),new r7(r,t,e)}function dS(t,e){let r=t[it],n=r.createComment(""),i=In(e,t),o=ou(r,i);return x1(r,o,n,pD(r,i),!1),n}var hS=mS,fS=()=>!1;function pS(t,e,r){return fS(t,e,r)}function mS(t,e,r,n){if(t[oo])return;let i;r.type&8?i=wr(n):i=dS(e,r),t[oo]=i}function cc(t,e,r){return t[e]=r}function gS(t,e){return t[e]}function hn(t,e,r){let n=t[e];return Object.is(n,r)?!1:(t[e]=r,!0)}function Ja(t,e,r,n){let i=hn(t,e,r);return hn(t,e+1,n)||i}function vS(t,e,r,n,i){let o=Ja(t,e,r,n);return hn(t,e+2,i)||o}function o7(t,e,r,n,i,o){let s=Ja(t,e,r,n);return Ja(t,e+2,i,o)||s}function yS(t,e,r,n,i,o,s,a,c){let l=e.consts,u=Ys(e,t,4,s||null,ks(l,a));gu(e,r,u,ks(l,c)),W1(e,u);let d=u.tView=mu(2,u,n,i,o,e.directiveRegistry,e.pipeRegistry,null,e.schemas,l,null);return e.queries!==null&&(e.queries.template(e,u),d.queries=e.queries.embeddedTView(u)),u}function Q(t,e,r,n,i,o,s,a){let c=ie(),l=ot(),u=t+xt,d=l.firstCreatePass?yS(u,l,c,e,r,n,i,o,s):l.data[u];po(d,!1);let h=wS(l,c,d,t);$1()&&Q1(l,c,h,d),xi(h,c);let f=$m(h,c,h,d);return c[u]=f,o4(c,f),pS(f,d,c),j1(d)&&fu(l,c,d),s!=null&&pu(c,d,a),Q}var wS=bS;function bS(t,e,r,n){return q1(!0),e[it].createComment("")}function kn(t,e,r,n){let i=ie(),o=go();if(hn(i,o,e)){let s=ot(),a=ic();xx(a,i,t,e,r,n)}return kn}function Mu(t,e,r,n){return hn(t,go(),r)?e+Qn(r)+n:tn}function s7(t,e,r,n,i,o){let s=kp(),a=Ja(t,s,r,i);return U1(2),a?e+Qn(r)+n+Qn(i)+o:tn}function _S(t,e,r,n,i,o,s,a,c,l){let u=kp(),d=o7(t,u,r,i,s,c);return U1(4),d?e+Qn(r)+n+Qn(i)+o+Qn(s)+a+Qn(c)+l:tn}function l1(t,e){return t<<17|e<<2}function ho(t){return t>>17&32767}function CS(t){return(t&2)==2}function MS(t,e){return t&131071|e<<17}function g8(t){return t|2}function As(t){return(t&131068)>>2}function b0(t,e){return t&-131069|e<<2}function DS(t){return(t&1)===1}function v8(t){return t|1}function xS(t,e,r,n,i,o){let s=o?e.classBindings:e.styleBindings,a=ho(s),c=As(s);t[n]=r;let l=!1,u;if(Array.isArray(r)){let d=r;u=d[1],(u===null||oc(d,u)>0)&&(l=!0)}else u=r;if(i)if(c!==0){let h=ho(t[a+1]);t[n+1]=l1(h,a),h!==0&&(t[h+1]=b0(t[h+1],n)),t[a+1]=MS(t[a+1],n)}else t[n+1]=l1(a,0),a!==0&&(t[a+1]=b0(t[a+1],n)),a=n;else t[n+1]=l1(c,0),a===0?a=n:t[c+1]=b0(t[c+1],n),c=n;l&&(t[n+1]=g8(t[n+1])),B5(t,u,n,!0),B5(t,u,n,!1),SS(e,u,t,n,o),s=l1(a,c),o?e.classBindings=s:e.styleBindings=s}function SS(t,e,r,n,i){let o=i?t.residualClasses:t.residualStyles;o!=null&&typeof e=="string"&&oc(o,e)>=0&&(r[n+1]=v8(r[n+1]))}function B5(t,e,r,n){let i=t[r+1],o=e===null,s=n?ho(i):As(i),a=!1;for(;s!==0&&(a===!1||o);){let c=t[s],l=t[s+1];TS(c,e)&&(a=!0,t[s+1]=n?v8(l):g8(l)),s=n?ho(l):As(l)}a&&(t[r+1]=n?g8(i):v8(i))}function TS(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?oc(t,e)>=0:!1}var wt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function a7(t){return t.substring(wt.key,wt.keyEnd)}function ES(t){return t.substring(wt.value,wt.valueEnd)}function zS(t){return u7(t),c7(t,Fs(t,0,wt.textEnd))}function c7(t,e){let r=wt.textEnd;return r===e?-1:(e=wt.keyEnd=kS(t,wt.key=e,r),Fs(t,e,r))}function IS(t){return u7(t),l7(t,Fs(t,0,wt.textEnd))}function l7(t,e){let r=wt.textEnd,n=wt.key=Fs(t,e,r);return r===n?-1:(n=wt.keyEnd=PS(t,n,r),n=U5(t,n,r,58),n=wt.value=Fs(t,n,r),n=wt.valueEnd=OS(t,n,r),U5(t,n,r,59))}function u7(t){wt.key=0,wt.keyEnd=0,wt.value=0,wt.valueEnd=0,wt.textEnd=t.length}function Fs(t,e,r){for(;e32;)e++;return e}function PS(t,e,r){let n;for(;e=65&&(n&-33)<=90||n>=48&&n<=57);)e++;return e}function U5(t,e,r,n){return e=Fs(t,e,r),e32&&(a=s),o=i,i=n,n=c&-33}return a}function $5(t,e,r,n){let i=-1,o=r;for(;o=0;r=l7(e,r))p7(t,a7(e),ES(e))}function Du(t){lc(VS,c4,t,!0)}function c4(t,e){for(let r=zS(e);r>=0;r=c7(e,r))vo(t,a7(e),!0)}function d7(t,e,r,n){let i=ie(),o=ot(),s=U1(2);if(o.firstUpdatePass&&f7(o,t,s,n),e!==tn&&hn(i,s,e)){let a=o.data[Ur()];m7(o,a,i,i[it],t,i[s+1]=jS(e,r),n,s)}}function lc(t,e,r,n){let i=ot(),o=U1(2);i.firstUpdatePass&&f7(i,null,o,n);let s=ie();if(r!==tn&&hn(s,o,r)){let a=i.data[Ur()];if(g7(a,n)&&!h7(i,o)){let c=n?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(r=S0(c,r||"")),y8(i,a,s,r,n)}else YS(i,a,s,s[it],s[o+1],s[o+1]=HS(t,e,r),n,o)}}function h7(t,e){return e>=t.expandoStartIndex}function f7(t,e,r,n){let i=t.data;if(i[r+1]===null){let o=i[Ur()],s=h7(t,r);g7(o,n)&&e===null&&!s&&(e=!1),e=FS(i,o,e,n),xS(i,o,e,r,s,n)}}function FS(t,e,r,n){let i=$8(t),o=n?e.residualClasses:e.residualStyles;if(i===null)(n?e.classBindings:e.styleBindings)===0&&(r=_0(null,t,e,r,n),r=ec(r,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==i)if(r=_0(i,t,e,r,n),o===null){let c=NS(t,e,n);c!==void 0&&Array.isArray(c)&&(c=_0(null,t,e,c[1],n),c=ec(c,e.attrs,n),RS(t,e,n,c))}else o=LS(t,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),r}function NS(t,e,r){let n=r?e.classBindings:e.styleBindings;if(As(n)!==0)return t[ho(n)]}function RS(t,e,r,n){let i=r?e.classBindings:e.styleBindings;t[ho(i)]=n}function LS(t,e,r){let n,i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0;){let c=t[i],l=Array.isArray(c),u=l?c[1]:c,d=u===null,h=r[i+1];h===tn&&(h=d?Jt:void 0);let f=d?f0(h,n):u===n?h:void 0;if(l&&!k1(f)&&(f=f0(c,n)),k1(f)&&(a=f,s))return a;let p=t[i+1];i=s?ho(p):As(p)}if(e!==null){let c=o?e.residualClasses:e.residualStyles;c!=null&&(a=f0(c,n))}return a}function k1(t){return t!==void 0}function jS(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=$t(vn(t)))),t}function g7(t,e){return(t.flags&(e?8:16))!==0}function v7(t,e,r){let n=ie(),i=Mu(n,t,e,r);lc(vo,c4,i,!0)}function NG(t,e,r,n,i){let o=ie(),s=s7(o,t,e,r,n,i);lc(vo,c4,s,!0)}function RG(t,e,r,n,i,o,s,a,c){let l=ie(),u=_S(l,t,e,r,n,i,o,s,a,c);lc(vo,c4,u,!0)}var w8=class{destroy(e){}updateValue(e,r){}swap(e,r){let n=Math.min(e,r),i=Math.max(e,r),o=this.detach(i);if(i-n>1){let s=this.detach(n);this.attach(n,o),this.attach(i,s)}else this.attach(n,o)}move(e,r){this.attach(r,this.detach(e))}};function C0(t,e,r,n,i){return t===r&&Object.is(e,n)?1:Object.is(i(t,e),i(r,n))?-1:0}function BS(t,e,r){let n,i,o=0,s=t.length-1;if(Array.isArray(e)){let a=e.length-1;for(;o<=s&&o<=a;){let c=t.at(o),l=e[o],u=C0(o,c,o,l,r);if(u!==0){u<0&&t.updateValue(o,l),o++;continue}let d=t.at(s),h=e[a],f=C0(s,d,a,h,r);if(f!==0){f<0&&t.updateValue(s,h),s--,a--;continue}let p=r(o,c),y=r(s,d),v=r(o,l);if(Object.is(v,y)){let M=r(a,h);Object.is(M,p)?(t.swap(o,s),t.updateValue(s,h),a--,s--):t.move(s,o),t.updateValue(o,l),o++;continue}if(n??=new P1,i??=G5(t,o,s,r),b8(t,n,o,v))t.updateValue(o,l),o++,s++;else if(i.has(v))n.set(p,t.detach(o)),s--;else{let M=t.create(o,e[o]);t.attach(o,M),o++,s++}}for(;o<=a;)W5(t,n,r,o,e[o]),o++}else if(e!=null){let a=e[Symbol.iterator](),c=a.next();for(;!c.done&&o<=s;){let l=t.at(o),u=c.value,d=C0(o,l,o,u,r);if(d!==0)d<0&&t.updateValue(o,u),o++,c=a.next();else{n??=new P1,i??=G5(t,o,s,r);let h=r(o,u);if(b8(t,n,o,h))t.updateValue(o,u),o++,s++,c=a.next();else if(!i.has(h))t.attach(o,t.create(o,u)),o++,s++,c=a.next();else{let f=r(o,l);n.set(f,t.detach(o)),s--}}}for(;!c.done;)W5(t,n,r,t.length,c.value),c=a.next()}for(;o<=s;)t.destroy(t.detach(s--));n?.forEach(a=>{t.destroy(a)})}function b8(t,e,r,n){return e!==void 0&&e.has(n)?(t.attach(r,e.get(n)),e.delete(n),!0):!1}function W5(t,e,r,n,i){if(b8(t,e,n,r(n,i)))t.updateValue(n,i);else{let o=t.create(n,i);t.attach(n,o)}}function G5(t,e,r,n){let i=new Set;for(let o=e;o<=r;o++)i.add(n(o,t.at(o)));return i}var P1=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let r=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(r)?(this.kvMap.set(e,this._vMap.get(r)),this._vMap.delete(r)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,r){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let i=this._vMap;for(;i.has(n);)n=i.get(n);i.set(n,r)}else this.kvMap.set(e,r)}forEach(e){for(let[r,n]of this.kvMap)if(e(n,r),this._vMap!==void 0){let i=this._vMap;for(;i.has(n);)n=i.get(n),e(n,r)}}};function LG(t,e,r){Bs("NgControlFlow");let n=ie(),i=go(),o=D8(n,xt+t),s=0;if(hn(n,i,e)){let a=yt(null);try{if(n7(o,s),e!==-1){let c=x8(n[fe],xt+e),l=Qa(o,c.tView.ssrId),u=s4(n,c,r,{dehydratedView:l});a4(o,u,s,Xa(c,l))}}finally{yt(a)}}else{let a=t7(o,s);a!==void 0&&(a[Lt]=r)}}var _8=class{constructor(e,r,n){this.lContainer=e,this.$implicit=r,this.$index=n}get $count(){return this.lContainer.length-Ht}};function HG(t){return t}function VG(t,e){return e}var C8=class{constructor(e,r,n){this.hasEmptyBlock=e,this.trackByFn=r,this.liveCollection=n}};function YG(t,e,r,n,i,o,s,a,c,l,u,d,h){Bs("NgControlFlow");let f=c!==void 0,p=ie(),y=a?s.bind(p[zn][Lt]):s,v=new C8(f,y);p[xt+t]=v,Q(t+1,e,r,n,i,o),f&&Q(t+2,c,l,u,d,h)}var M8=class extends w8{constructor(e,r,n){super(),this.lContainer=e,this.hostLView=r,this.templateTNode=n,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-Ht}at(e){return this.getLView(e)[Lt].$implicit}attach(e,r){let n=r[Es];this.needsIndexUpdate||=e!==this.length,a4(this.lContainer,r,e,Xa(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,US(this.lContainer,e)}create(e,r){let n=Qa(this.lContainer,this.templateTNode.tView.ssrId);return s4(this.hostLView,this.templateTNode,new _8(this.lContainer,r,e),{dehydratedView:n})}destroy(e){Z1(e[fe],e)}updateValue(e,r){this.getLView(e)[Lt].$implicit=r}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(q1(!0),um(n,i,fM()));function GS(t,e,r,n,i){let o=e.consts,s=ks(o,n),a=Ys(e,t,8,"ng-container",s);s!==null&&z1(a,s,!0);let c=ks(o,i);return gu(e,r,a,c),e.queries!==null&&e.queries.elementStart(e,a),a}function tt(t,e,r){let n=ie(),i=ot(),o=t+xt,s=i.firstCreatePass?GS(o,i,n,e,r):i.data[o];po(s,!0);let a=KS(i,n,s,t);return n[o]=a,$1()&&Q1(i,n,a,s),xi(a,n),j1(s)&&(fu(i,n,s),hu(i,s,n)),r!=null&&pu(n,s),tt}function nt(){let t=Vt(),e=ot();return B8()?U8():(t=t.parent,po(t,!1)),e.firstCreatePass&&(W1(e,t),V8(t)&&e.queries.elementEnd(t)),nt}function xu(t,e,r){return tt(t,e,r),nt(),xu}var KS=(t,e,r,n)=>(q1(!0),iD(e[it],""));function Pn(){return ie()}function ZS(t,e,r){let n=ie(),i=go();if(hn(n,i,e)){let o=ot(),s=ic();i4(o,s,n,t,e,n[it],r,!0)}return ZS}function l4(t,e,r){let n=ie(),i=go();if(hn(n,i,e)){let o=ot(),s=ic(),a=$8(o.data),c=Km(a,s,n);i4(o,s,n,t,e,c,r,!0)}return l4}var to=void 0;function QS(t){let e=t,r=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return r===1&&n===0?1:5}var XS=["en",[["a","p"],["AM","PM"],to],[["AM","PM"],to,to],[["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"]],to,[["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"]],to,[["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 a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",to,"{1} 'at' {0}",to],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",QS],ja={};function y7(t,e,r){typeof e!="string"&&(r=e,e=t[Qe.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),ja[e]=t,r&&(ja[e][Qe.ExtraData]=r)}function on(t){let e=JS(t),r=K5(e);if(r)return r;let n=e.split("-")[0];if(r=K5(n),r)return r;if(n==="en")return XS;throw new z(701,!1)}function K5(t){return t in ja||(ja[t]=dn.ng&&dn.ng.common&&dn.ng.common.locales&&dn.ng.common.locales[t]),ja[t]}var Qe=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(Qe||{});function JS(t){return t.toLowerCase().replace(/_/g,"-")}var O1="en-US",eT="USD";var tT=O1;function nT(t){hC(t,"Expected localeId to be defined"),typeof t=="string"&&(tT=t.toLowerCase().replace(/_/g,"-"))}function Us(t){return!!t&&typeof t.then=="function"}function Su(t){return!!t&&typeof t.subscribe=="function"}function Pt(t,e,r,n){let i=ie(),o=ot(),s=Vt();return w7(o,i,i[it],s,t,e,n),Pt}function u4(t,e){let r=Vt(),n=ie(),i=ot(),o=$8(i.data),s=Km(o,r,n);return w7(i,n,s,r,t,e),u4}function rT(t,e,r,n){let i=t.cleanup;if(i!=null)for(let o=0;oc?a[c]:null}typeof s=="string"&&(o+=2)}return null}function w7(t,e,r,n,i,o,s){let a=j1(n),l=t.firstCreatePass&&Gm(t),u=e[Lt],d=Wm(e),h=!0;if(n.type&3||s){let y=In(n,e),v=s?s(y):y,M=d.length,P=s?$=>s(wr($[n.index])):n.index,X=null;if(!s&&a&&(X=rT(t,e,i,n.index)),X!==null){let $=X.__ngLastListenerFn__||X;$.__ngNextListenerFn__=o,X.__ngLastListenerFn__=o,h=!1}else{o=Q5(n,e,u,o,!1);let $=r.listen(v,i,o);d.push(o,$),l&&l.push(i,P,M,M+1)}}else o=Q5(n,e,u,o,!1);let f=n.outputs,p;if(h&&f!==null&&(p=f[i])){let y=p.length;if(y)for(let v=0;v-1?Ti(t.index,e):e;yu(a);let c=Z5(e,r,n,s),l=o.__ngNextListenerFn__;for(;l;)c=Z5(e,r,l,s)&&c,l=l.__ngNextListenerFn__;return i&&c===!1&&s.preventDefault(),c}}function G(t=1){return dM(t)}function iT(t,e){let r=null,n=IC(t);for(let i=0;i{let e=class e{};e.__NG_ELEMENT_ID__=lT;let t=e;return t})(),aT=Me,cT=class extends aT{constructor(e,r,n){super(),this._declarationLView=e,this._declarationTContainer=r,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,r){return this.createEmbeddedViewImpl(e,r)}createEmbeddedViewImpl(e,r,n){let i=s4(this._declarationLView,this._declarationTContainer,e,{injector:r,dehydratedView:n});return new uo(i)}};function lT(){return d4(Vt(),ie())}function d4(t,e){return t.type&4?new cT(e,t,Vs(t,e)):null}var S8=class t{constructor(e){this.queryList=e,this.matches=null}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},T8=class t{constructor(e=[]){this.queries=e}createEmbeddedView(e){let r=e.queries;if(r!==null){let n=e.contentQueries!==null?e.contentQueries[0]:r.length,i=[];for(let o=0;o0)n.push(s[a/2]);else{let l=o[a+1],u=e[-c];for(let d=Ht;d=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=n}function $s(t){let e=oM();return B1(e,xt+t)}function er(t,e=""){let r=ie(),n=ot(),i=t+xt,o=n.firstCreatePass?Ys(n,i,1,e,null):n.data[i],s=vT(n,r,o,e,t);r[i]=s,$1()&&Q1(n,r,s,o),po(o,!1)}var vT=(t,e,r,n,i)=>(q1(!0),nD(e[it],n));function qs(t){return zi("",t,""),qs}function zi(t,e,r){let n=ie(),i=Mu(n,t,e,r);return i!==tn&&Qm(n,Ur(),i),zi}function yT(t,e,r,n,i){let o=ie(),s=s7(o,t,e,r,n,i);return s!==tn&&Qm(o,Ur(),s),yT}function wT(t,e,r){let n=ot();if(n.firstCreatePass){let i=Yr(t);k8(r,n.data,n.blueprint,i,!0),k8(e,n.data,n.blueprint,i,!1)}}function k8(t,e,r,n,i){if(t=Ut(t),Array.isArray(t))for(let o=0;o>20;if(Ps(t)||!t.multi){let f=new co(l,i,m),p=D0(c,e,i?u:u+h,d);p===-1?(F0(C1(a,s),o,c),M0(o,t,e.length),e.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(f),s.push(f)):(r[p]=f,s[p]=f)}else{let f=D0(c,e,u+h,d),p=D0(c,e,u,u+h),y=f>=0&&r[f],v=p>=0&&r[p];if(i&&!v||!i&&!y){F0(C1(a,s),o,c);let M=CT(i?_T:bT,r.length,i,n,l);!i&&v&&(r[p].providerFactory=M),M0(o,t,e.length,0),e.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(M),s.push(M)}else{let M=x7(r[i?p:f],l,!i&&n);M0(o,t,f>-1?f:p,M)}!i&&n&&v&&r[p].componentProviders++}}}function M0(t,e,r,n){let i=Ps(e),o=LM(e);if(i||o){let c=(o?Ut(e.useClass):e).prototype.ngOnDestroy;if(c){let l=t.destroyHooks||(t.destroyHooks=[]);if(!i&&e.multi){let u=l.indexOf(r);u===-1?l.push(r,[n,c]):l[u+1].push(n,c)}else l.push(r,c)}}}function x7(t,e,r){return r&&t.componentProviders++,t.multi.push(e)-1}function D0(t,e,r,n){for(let i=r;i{r.providersResolver=(n,i)=>wT(n,i?i(t):t,e)}}var Si=class{},tc=class{};var O8=class extends Si{constructor(e,r,n){super(),this._parent=r,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new I1(this);let i=mp(e);this._bootstrapComponents=am(i.bootstrap),this._r3Injector=im(e,r,[{provide:Si,useValue:this},{provide:Ei,useValue:this.componentFactoryResolver},...n],$t(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){let e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(r=>r()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},A8=class extends tc{constructor(e){super(),this.moduleType=e}create(e){return new O8(this.moduleType,e,[])}};var F1=class extends Si{constructor(e){super(),this.componentFactoryResolver=new I1(this),this.instance=null;let r=new Ka([...e.providers,{provide:Si,useValue:this},{provide:Ei,useValue:this.componentFactoryResolver}],e.parent||tu(),e.debugName,new Set(["environment"]));this.injector=r,e.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function h4(t,e,r=null){return new F1({providers:t,parent:e,debugName:r,runEnvironmentInitializers:!0}).injector}var MT=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let i=em(!1,n.type),o=i.length>0?h4([i],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}};e.\u0275prov=C({token:e,providedIn:"environment",factory:()=>new e(g(qt))});let t=e;return t})();function _t(t){Bs("NgStandalone"),t.getStandaloneInjector=e=>e.get(MT).getOrCreateStandaloneInjector(t)}function UG(t,e,r){let n=mo()+t,i=ie();return i[n]===tn?cc(i,n,r?e.call(r):e()):gS(i,n)}function $G(t,e,r,n){return T7(ie(),mo(),t,e,r,n)}function S7(t,e,r,n,i){return E7(ie(),mo(),t,e,r,n,i)}function qG(t,e,r,n,i,o){return DT(ie(),mo(),t,e,r,n,i,o)}function f4(t,e){let r=t[e];return r===tn?void 0:r}function T7(t,e,r,n,i,o){let s=e+r;return hn(t,s,i)?cc(t,s+1,o?n.call(o,i):n(i)):f4(t,s+1)}function E7(t,e,r,n,i,o,s){let a=e+r;return Ja(t,a,i,o)?cc(t,a+2,s?n.call(s,i,o):n(i,o)):f4(t,a+2)}function DT(t,e,r,n,i,o,s,a){let c=e+r;return vS(t,c,i,o,s)?cc(t,c+3,a?n.call(a,i,o,s):n(i,o,s)):f4(t,c+3)}function xT(t,e,r,n,i,o,s,a,c){let l=e+r;return o7(t,l,i,o,s,a)?cc(t,l+4,c?n.call(c,i,o,s,a):n(i,o,s,a)):f4(t,l+4)}function Tu(t,e){let r=ot(),n,i=t+xt;r.firstCreatePass?(n=ST(e,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let o=n.factory||(n.factory=so(n.type,!0)),s,a=Xt(m);try{let c=_1(!1),l=o();return _1(c),gT(r,ie(),i,l),l}finally{Xt(a)}}function ST(t,e){if(e)for(let r=e.length-1;r>=0;r--){let n=e[r];if(t===n.name)return n}}function Eu(t,e,r){let n=t+xt,i=ie(),o=B1(i,n);return zu(i,n)?T7(i,mo(),e,o.transform,r,o):o.transform(r)}function WG(t,e,r,n){let i=t+xt,o=ie(),s=B1(o,i);return zu(o,i)?E7(o,mo(),e,s.transform,r,n,s):s.transform(r,n)}function GG(t,e,r,n,i,o){let s=t+xt,a=ie(),c=B1(a,s);return zu(a,s)?xT(a,mo(),e,c.transform,r,n,i,o,c):c.transform(r,n,i,o)}function zu(t,e){return t[fe].data[e].pure}function bo(t,e){return d4(t,e)}var fo=class{constructor(e){this.full=e;let r=e.split(".");this.major=r[0],this.minor=r[1],this.patch=r.slice(2).join(".")}};var p4=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"platform"});let t=e;return t})(),F8=class{constructor(e,r){this.ngModuleFactory=e,this.componentFactories=r}},m4=(()=>{let e=class e{compileModuleSync(n){return new A8(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let i=this.compileModuleSync(n),o=mp(n),s=am(o.declarations).reduce((a,c)=>{let l=Mi(c);return l&&a.push(new Os(l)),a},[]);return new F8(i,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Ws=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Re(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var z7=new E("");var g4=new E("Application Initializer"),I7=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,i)=>{this.resolve=n,this.reject=i}),this.appInits=w(g4,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let s=o();if(Us(s))n.push(s);else if(Su(s)){let a=new Promise((c,l)=>{s.subscribe({complete:c,error:l})});n.push(a)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{i()}).catch(o=>{this.reject(o)}),n.length===0&&i(),this.initialized=!0}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),uc=new E("appBootstrapListener");function TT(){Ef(()=>{throw new z(600,!1)})}function ET(t){return t.isBoundToModule}function zT(t,e,r){try{let n=r();return Us(n)?n.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}var xr=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=w(Nm),this.afterRenderEffectManager=w(_u),this.componentTypes=[],this.components=[],this.isStable=w(Ws).hasPendingTasks.pipe(Z(n=>!n)),this._injector=w(qt)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,i){let o=n instanceof S1;if(!this._injector.get(I7).done){let f=!o&&pp(n),p=!1;throw new z(405,p)}let a;o?a=n:a=this._injector.get(Ei).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let c=ET(a)?void 0:this._injector.get(Si),l=i||a.selector,u=a.create(Ue.NULL,[],l,c),d=u.location.nativeElement,h=u.injector.get(z7,null);return h?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),x0(this.components,u),h?.unregisterApplication(d)}),this._loadComponent(u),u}tick(){if(this._runningTick)throw new z(101,!1);try{this._runningTick=!0;for(let n of this._views)n.detectChanges()}catch(n){this.internalErrorHandler(n)}finally{try{let n=this.afterRenderEffectManager.execute()}catch(n){this.internalErrorHandler(n)}this._runningTick=!1}}attachView(n){let i=n;this._views.push(i),i.attachToAppRef(this)}detachView(n){let i=n;x0(this._views,i),i.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let i=this._injector.get(uc,[]);[...this._bootstrapListeners,...i].forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>x0(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new z(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function x0(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}var IT=(()=>{let e=class e{constructor(){this.zone=w(U),this.applicationRef=w(xr)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function kT(t){return[{provide:U,useFactory:t},{provide:Di,multi:!0,useFactory:()=>{let e=w(IT,{optional:!0});return()=>e.initialize()}},{provide:Di,multi:!0,useFactory:()=>{let e=w(FT);return()=>{e.initialize()}}},{provide:Nm,useFactory:PT}]}function PT(){let t=w(U),e=w(_r);return r=>t.runOutsideAngular(()=>e.handleError(r))}function OT(t){let e=kT(()=>new U(AT(t)));return Wt([[],e])}function AT(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var FT=(()=>{let e=class e{constructor(){this.subscription=new ye,this.initialized=!1,this.zone=w(U),this.pendingTasks=w(Ws)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{U.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{U.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function NT(){return typeof $localize<"u"&&$localize.locale||O1}var Ii=new E("LocaleId",{providedIn:"root",factory:()=>w(Ii,be.Optional|be.SkipSelf)||NT()}),k7=new E("DefaultCurrencyCode",{providedIn:"root",factory:()=>eT});var P7=new E("PlatformDestroyListeners");var m1=null;function RT(t=[],e){return Ue.create({name:e,providers:[{provide:G1,useValue:"platform"},{provide:P7,useValue:new Set([()=>m1=null])},...t]})}function LT(t=[]){if(m1)return m1;let e=RT(t);return m1=e,TT(),HT(e),e}function HT(t){t.get(ru,null)?.forEach(r=>r())}function v4(){return!1}function O7(t){try{let{rootComponent:e,appProviders:r,platformProviders:n}=t,i=LT(n),o=[OT(),...r||[]],a=new F1({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,c=a.get(U);return c.run(()=>{a.resolveInjectorInitializers();let l=a.get(_r,null),u;c.runOutsideAngular(()=>{u=c.onError.subscribe({next:f=>{l.handleError(f)}})});let d=()=>a.destroy(),h=i.get(P7);return h.add(d),a.onDestroy(()=>{u.unsubscribe(),h.delete(d)}),zT(l,c,()=>{let f=a.get(I7);return f.runInitializers(),f.donePromise.then(()=>{let p=a.get(Ii,O1);nT(p||O1);let y=a.get(xr);return e!==void 0&&y.bootstrap(e),y})})})}catch(e){return Promise.reject(e)}}function ut(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function VT(t,e=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):e}function A7(t){let e=Mi(t);if(!e)return null;let r=new Os(e);return{get selector(){return r.selector},get type(){return r.componentType},get inputs(){return r.inputs},get outputs(){return r.outputs},get ngContentSelectors(){return r.ngContentSelectors},get isStandalone(){return e.standalone},get isSignal(){return e.signals}}}var Nu=null;function Gs(){return Nu}function B7(t){Nu||(Nu=t)}var x4=class{},V=new E("DocumentToken"),Bu=(()=>{let e=class e{historyGo(n){throw new Error("Not implemented")}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(YT),providedIn:"platform"});let t=e;return t})(),U7=new E("Location Initialized"),YT=(()=>{let e=class e extends Bu{constructor(){super(),this._doc=w(V),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Gs().getBaseHref(this._doc)}onPopState(n){let i=Gs().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){let i=Gs().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}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(n){this._location.pathname=n}pushState(n,i,o){this._history.pushState(n,i,o)}replaceState(n,i,o){this._history.replaceState(n,i,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>new e,providedIn:"platform"});let t=e;return t})();function Uu(t,e){if(t.length==0)return e;if(e.length==0)return t;let r=0;return t.endsWith("/")&&r++,e.startsWith("/")&&r++,r==2?t+e.substring(1):r==1?t+e:t+"/"+e}function F7(t){let e=t.match(/#|\?|$/),r=e&&e.index||t.length,n=r-(t[r-1]==="/"?1:0);return t.slice(0,n)+t.slice(r)}function Qr(t){return t&&t[0]!=="?"?"?"+t:t}var Tr=(()=>{let e=class e{historyGo(n){throw new Error("Not implemented")}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w($u),providedIn:"root"});let t=e;return t})(),$7=new E("appBaseHref"),$u=(()=>{let e=class e extends Tr{constructor(n,i){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??w(V).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return Uu(this._baseHref,n)}path(n=!1){let i=this._platformLocation.pathname+Qr(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${i}${o}`:i}pushState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));this._platformLocation.pushState(n,i,a)}replaceState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));this._platformLocation.replaceState(n,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(i){return new(i||e)(g(Bu),g($7,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qu=(()=>{let e=class e extends Tr{constructor(n,i){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],i!=null&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let i=this._platformLocation.hash;return i==null&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(n){let i=Uu(this._baseHref,n);return i.length>0?"#"+i:i}pushState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.pushState(n,i,a)}replaceState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(n,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(i){return new(i||e)(g(Bu),g($7,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ki=(()=>{let e=class e{constructor(n){this._subject=new re,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let i=this._locationStrategy.getBaseHref();this._basePath=UT(F7(N7(i))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+Qr(i))}normalize(n){return e.stripTrailingSlash(BT(this._basePath,N7(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",o=null){this._locationStrategy.pushState(o,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qr(i)),o)}replaceState(n,i="",o=null){this._locationStrategy.replaceState(o,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qr(i)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{let i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(o=>o(n,i))}subscribe(n,i,o){return this._subject.subscribe({next:n,error:i,complete:o})}};e.normalizeQueryParams=Qr,e.joinWithSlash=Uu,e.stripTrailingSlash=F7,e.\u0275fac=function(i){return new(i||e)(g(Tr))},e.\u0275prov=C({token:e,factory:()=>jT(),providedIn:"root"});let t=e;return t})();function jT(){return new ki(g(Tr))}function BT(t,e){if(!t||!e.startsWith(t))return e;let r=e.substring(t.length);return r===""||["/",";","?","#"].includes(r[0])?r:e}function N7(t){return t.replace(/\/index.html$/,"")}function UT(t){if(new RegExp("^(https?:)?//").test(t)){let[,r]=t.split(/\/\/[^\/]+/);return r}return t}var q7={ADP:[void 0,void 0,0],AFN:[void 0,"\u060B",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058F",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20BC"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09F3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xA5","\xA5"],COP:[void 0,"$",2],CRC:[void 0,"\u20A1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010D",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xA3"],ESP:[void 0,"\u20A7",0],EUR:["\u20AC"],FJD:[void 0,"$"],FKP:[void 0,"\xA3"],GBP:["\xA3"],GEL:[void 0,"\u20BE"],GHS:[void 0,"GH\u20B5"],GIP:[void 0,"\xA3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20AA"],INR:["\u20B9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xA5",void 0,0],KHR:[void 0,"\u17DB"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20A9",0],KRW:["\u20A9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20B8"],LAK:[void 0,"\u20AD",0],LBP:[void 0,"L\xA3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20AE",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20A6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20B1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20B2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20BD"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xA3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xA3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xA3",0],THB:[void 0,"\u0E3F"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20BA"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20B4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20AB",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202FCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xA4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},Wu=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}(Wu||{});var dt=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(dt||{}),xe=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(xe||{}),bn=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(bn||{}),Ot=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}(Ot||{});function $T(t){return on(t)[Qe.LocaleId]}function Pi(t,e,r){let n=on(t),i=[n[Qe.DayPeriodsFormat],n[Qe.DayPeriodsStandalone]],o=An(i,e);return An(o,r)}function qT(t,e,r){let n=on(t),i=[n[Qe.DaysFormat],n[Qe.DaysStandalone]],o=An(i,e);return An(o,r)}function WT(t,e,r){let n=on(t),i=[n[Qe.MonthsFormat],n[Qe.MonthsStandalone]],o=An(i,e);return An(o,r)}function GT(t,e){let n=on(t)[Qe.Eras];return An(n,e)}function y4(t,e){let r=on(t);return An(r[Qe.DateFormat],e)}function w4(t,e){let r=on(t);return An(r[Qe.TimeFormat],e)}function b4(t,e){let n=on(t)[Qe.DateTimeFormat];return An(n,e)}function Sr(t,e){let r=on(t),n=r[Qe.NumberSymbols][e];if(typeof n>"u"){if(e===Ot.CurrencyDecimal)return r[Qe.NumberSymbols][Ot.Decimal];if(e===Ot.CurrencyGroup)return r[Qe.NumberSymbols][Ot.Group]}return n}function W7(t,e){return on(t)[Qe.NumberFormats][e]}function KT(t){return on(t)[Qe.Currencies]}function G7(t){if(!t[Qe.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Qe.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function ZT(t){let e=on(t);return G7(e),(e[Qe.ExtraData][2]||[]).map(n=>typeof n=="string"?Iu(n):[Iu(n[0]),Iu(n[1])])}function QT(t,e,r){let n=on(t);G7(n);let i=[n[Qe.ExtraData][0],n[Qe.ExtraData][1]],o=An(i,e)||[];return An(o,r)||[]}function An(t,e){for(let r=e;r>-1;r--)if(typeof t[r]<"u")return t[r];throw new Error("Locale data API: locale data undefined")}function Iu(t){let[e,r]=t.split(":");return{hours:+e,minutes:+r}}function XT(t,e,r="en"){let n=KT(r)[t]||q7[t]||[],i=n[1];return e==="narrow"&&typeof i=="string"?i:n[0]||t}var JT=2;function eE(t){let e,r=q7[t];return r&&(e=r[2]),typeof e=="number"?e:JT}var tE=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,dc={},nE=/((?:[^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]*)/,Xr=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}(Xr||{}),Oe=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}(Oe||{}),Pe=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}(Pe||{});function Gu(t,e,r,n){let i=dE(t);e=Zr(r,e)||e;let s=[],a;for(;e;)if(a=nE.exec(e),a){s=s.concat(a.slice(1));let u=s.pop();if(!u)break;e=u}else{s.push(e);break}let c=i.getTimezoneOffset();n&&(c=Z7(n,c),i=uE(i,n,!0));let l="";return s.forEach(u=>{let d=cE(u);l+=d?d(i,r,c):u==="''"?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function S4(t,e,r){let n=new Date(0);return n.setFullYear(t,e,r),n.setHours(0,0,0),n}function Zr(t,e){let r=$T(t);if(dc[r]=dc[r]||{},dc[r][e])return dc[r][e];let n="";switch(e){case"shortDate":n=y4(t,bn.Short);break;case"mediumDate":n=y4(t,bn.Medium);break;case"longDate":n=y4(t,bn.Long);break;case"fullDate":n=y4(t,bn.Full);break;case"shortTime":n=w4(t,bn.Short);break;case"mediumTime":n=w4(t,bn.Medium);break;case"longTime":n=w4(t,bn.Long);break;case"fullTime":n=w4(t,bn.Full);break;case"short":let i=Zr(t,"shortTime"),o=Zr(t,"shortDate");n=_4(b4(t,bn.Short),[i,o]);break;case"medium":let s=Zr(t,"mediumTime"),a=Zr(t,"mediumDate");n=_4(b4(t,bn.Medium),[s,a]);break;case"long":let c=Zr(t,"longTime"),l=Zr(t,"longDate");n=_4(b4(t,bn.Long),[c,l]);break;case"full":let u=Zr(t,"fullTime"),d=Zr(t,"fullDate");n=_4(b4(t,bn.Full),[u,d]);break}return n&&(dc[r][e]=n),n}function _4(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(r,n){return e!=null&&n in e?e[n]:r})),t}function tr(t,e,r="-",n,i){let o="";(t<0||i&&t<=0)&&(i?t=-t+1:(t=-t,o=r));let s=String(t);for(;s.length0||a>-r)&&(a+=r),t===Oe.Hours)a===0&&r===-12&&(a=12);else if(t===Oe.FractionalSeconds)return rE(a,e);let c=Sr(s,Ot.MinusSign);return tr(a,e,c,n,i)}}function iE(t,e){switch(t){case Oe.FullYear:return e.getFullYear();case Oe.Month:return e.getMonth();case Oe.Date:return e.getDate();case Oe.Hours:return e.getHours();case Oe.Minutes:return e.getMinutes();case Oe.Seconds:return e.getSeconds();case Oe.FractionalSeconds:return e.getMilliseconds();case Oe.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}function We(t,e,r=dt.Format,n=!1){return function(i,o){return oE(i,o,t,e,r,n)}}function oE(t,e,r,n,i,o){switch(r){case Pe.Months:return WT(e,i,n)[t.getMonth()];case Pe.Days:return qT(e,i,n)[t.getDay()];case Pe.DayPeriods:let s=t.getHours(),a=t.getMinutes();if(o){let l=ZT(e),u=QT(e,i,n),d=l.findIndex(h=>{if(Array.isArray(h)){let[f,p]=h,y=s>=f.hours&&a>=f.minutes,v=s0?Math.floor(i/60):Math.ceil(i/60);switch(t){case Xr.Short:return(i>=0?"+":"")+tr(s,2,o)+tr(Math.abs(i%60),2,o);case Xr.ShortGMT:return"GMT"+(i>=0?"+":"")+tr(s,1,o);case Xr.Long:return"GMT"+(i>=0?"+":"")+tr(s,2,o)+":"+tr(Math.abs(i%60),2,o);case Xr.Extended:return n===0?"Z":(i>=0?"+":"")+tr(s,2,o)+":"+tr(Math.abs(i%60),2,o);default:throw new Error(`Unknown zone width "${t}"`)}}}var sE=0,D4=4;function aE(t){let e=S4(t,sE,1).getDay();return S4(t,0,1+(e<=D4?D4:D4+7)-e)}function K7(t){return S4(t.getFullYear(),t.getMonth(),t.getDate()+(D4-t.getDay()))}function ku(t,e=!1){return function(r,n){let i;if(e){let o=new Date(r.getFullYear(),r.getMonth(),1).getDay()-1,s=r.getDate();i=1+Math.floor((s+o)/7)}else{let o=K7(r),s=aE(o.getFullYear()),a=o.getTime()-s.getTime();i=1+Math.round(a/6048e5)}return tr(i,t,Sr(n,Ot.MinusSign))}}function M4(t,e=!1){return function(r,n){let o=K7(r).getFullYear();return tr(o,t,Sr(n,Ot.MinusSign),e)}}var Pu={};function cE(t){if(Pu[t])return Pu[t];let e;switch(t){case"G":case"GG":case"GGG":e=We(Pe.Eras,xe.Abbreviated);break;case"GGGG":e=We(Pe.Eras,xe.Wide);break;case"GGGGG":e=We(Pe.Eras,xe.Narrow);break;case"y":e=gt(Oe.FullYear,1,0,!1,!0);break;case"yy":e=gt(Oe.FullYear,2,0,!0,!0);break;case"yyy":e=gt(Oe.FullYear,3,0,!1,!0);break;case"yyyy":e=gt(Oe.FullYear,4,0,!1,!0);break;case"Y":e=M4(1);break;case"YY":e=M4(2,!0);break;case"YYY":e=M4(3);break;case"YYYY":e=M4(4);break;case"M":case"L":e=gt(Oe.Month,1,1);break;case"MM":case"LL":e=gt(Oe.Month,2,1);break;case"MMM":e=We(Pe.Months,xe.Abbreviated);break;case"MMMM":e=We(Pe.Months,xe.Wide);break;case"MMMMM":e=We(Pe.Months,xe.Narrow);break;case"LLL":e=We(Pe.Months,xe.Abbreviated,dt.Standalone);break;case"LLLL":e=We(Pe.Months,xe.Wide,dt.Standalone);break;case"LLLLL":e=We(Pe.Months,xe.Narrow,dt.Standalone);break;case"w":e=ku(1);break;case"ww":e=ku(2);break;case"W":e=ku(1,!0);break;case"d":e=gt(Oe.Date,1);break;case"dd":e=gt(Oe.Date,2);break;case"c":case"cc":e=gt(Oe.Day,1);break;case"ccc":e=We(Pe.Days,xe.Abbreviated,dt.Standalone);break;case"cccc":e=We(Pe.Days,xe.Wide,dt.Standalone);break;case"ccccc":e=We(Pe.Days,xe.Narrow,dt.Standalone);break;case"cccccc":e=We(Pe.Days,xe.Short,dt.Standalone);break;case"E":case"EE":case"EEE":e=We(Pe.Days,xe.Abbreviated);break;case"EEEE":e=We(Pe.Days,xe.Wide);break;case"EEEEE":e=We(Pe.Days,xe.Narrow);break;case"EEEEEE":e=We(Pe.Days,xe.Short);break;case"a":case"aa":case"aaa":e=We(Pe.DayPeriods,xe.Abbreviated);break;case"aaaa":e=We(Pe.DayPeriods,xe.Wide);break;case"aaaaa":e=We(Pe.DayPeriods,xe.Narrow);break;case"b":case"bb":case"bbb":e=We(Pe.DayPeriods,xe.Abbreviated,dt.Standalone,!0);break;case"bbbb":e=We(Pe.DayPeriods,xe.Wide,dt.Standalone,!0);break;case"bbbbb":e=We(Pe.DayPeriods,xe.Narrow,dt.Standalone,!0);break;case"B":case"BB":case"BBB":e=We(Pe.DayPeriods,xe.Abbreviated,dt.Format,!0);break;case"BBBB":e=We(Pe.DayPeriods,xe.Wide,dt.Format,!0);break;case"BBBBB":e=We(Pe.DayPeriods,xe.Narrow,dt.Format,!0);break;case"h":e=gt(Oe.Hours,1,-12);break;case"hh":e=gt(Oe.Hours,2,-12);break;case"H":e=gt(Oe.Hours,1);break;case"HH":e=gt(Oe.Hours,2);break;case"m":e=gt(Oe.Minutes,1);break;case"mm":e=gt(Oe.Minutes,2);break;case"s":e=gt(Oe.Seconds,1);break;case"ss":e=gt(Oe.Seconds,2);break;case"S":e=gt(Oe.FractionalSeconds,1);break;case"SS":e=gt(Oe.FractionalSeconds,2);break;case"SSS":e=gt(Oe.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=C4(Xr.Short);break;case"ZZZZZ":e=C4(Xr.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=C4(Xr.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=C4(Xr.Long);break;default:return null}return Pu[t]=e,e}function Z7(t,e){t=t.replace(/:/g,"");let r=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(r)?e:r}function lE(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}function uE(t,e,r){let n=r?-1:1,i=t.getTimezoneOffset(),o=Z7(e,i);return lE(t,n*(o-i))}function dE(t){if(R7(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[i,o=1,s=1]=t.split("-").map(a=>+a);return S4(i,o-1,s)}let r=parseFloat(t);if(!isNaN(t-r))return new Date(r);let n;if(n=t.match(tE))return hE(n)}let e=new Date(t);if(!R7(e))throw new Error(`Unable to convert "${t}" into a date`);return e}function hE(t){let e=new Date(0),r=0,n=0,i=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=Number(t[9]+t[10]),n=Number(t[9]+t[11])),i.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-r,a=Number(t[5]||0)-n,c=Number(t[6]||0),l=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return o.call(e,s,a,c,l),e}function R7(t){return t instanceof Date&&!isNaN(t.valueOf())}var fE=/^(\d+)?\.((\d+)(-(\d+))?)?$/,L7=22,T4=".",hc="0",pE=";",mE=",",Ou="#",H7="\xA4";function Q7(t,e,r,n,i,o,s=!1){let a="",c=!1;if(!isFinite(t))a=Sr(r,Ot.Infinity);else{let l=wE(t);s&&(l=yE(l));let u=e.minInt,d=e.minFrac,h=e.maxFrac;if(o){let P=o.match(fE);if(P===null)throw new Error(`${o} is not a valid digit info`);let X=P[1],$=P[3],Ae=P[5];X!=null&&(u=Au(X)),$!=null&&(d=Au($)),Ae!=null?h=Au(Ae):$!=null&&d>h&&(h=d)}bE(l,d,h);let f=l.digits,p=l.integerLen,y=l.exponent,v=[];for(c=f.every(P=>!P);p0?v=f.splice(p,f.length):(v=f,f=[0]);let M=[];for(f.length>=e.lgSize&&M.unshift(f.splice(-e.lgSize,f.length).join(""));f.length>e.gSize;)M.unshift(f.splice(-e.gSize,f.length).join(""));f.length&&M.unshift(f.join("")),a=M.join(Sr(r,n)),v.length&&(a+=Sr(r,i)+v.join("")),y&&(a+=Sr(r,Ot.Exponential)+"+"+y)}return t<0&&!c?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function gE(t,e,r,n,i){let o=W7(e,Wu.Currency),s=X7(o,Sr(e,Ot.MinusSign));return s.minFrac=eE(n),s.maxFrac=s.minFrac,Q7(t,s,e,Ot.CurrencyGroup,Ot.CurrencyDecimal,i).replace(H7,r).replace(H7,"").trim()}function vE(t,e,r){let n=W7(e,Wu.Decimal),i=X7(n,Sr(e,Ot.MinusSign));return Q7(t,i,e,Ot.Group,Ot.Decimal,r)}function X7(t,e="-"){let r={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(pE),i=n[0],o=n[1],s=i.indexOf(T4)!==-1?i.split(T4):[i.substring(0,i.lastIndexOf(hc)+1),i.substring(i.lastIndexOf(hc)+1)],a=s[0],c=s[1]||"";r.posPre=a.substring(0,a.indexOf(Ou));for(let u=0;u-1&&(e=e.replace(T4,"")),(o=e.search(/e/i))>0?(i<0&&(i=o),i+=+e.slice(o+1),e=e.substring(0,o)):i<0&&(i=e.length),o=0;e.charAt(o)===hc;o++);if(o===(a=e.length))n=[0],i=1;else{for(a--;e.charAt(a)===hc;)a--;for(i-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return i>L7&&(n=n.splice(0,L7-1),r=i-1,i=1),{digits:n,exponent:r,integerLen:i}}function bE(t,e,r){if(e>r)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${r}).`);let n=t.digits,i=n.length-t.integerLen,o=Math.min(Math.max(e,i),r),s=o+t.integerLen,a=n[s];if(s>0){n.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[s-1]++;for(;i=l?p.pop():c=!1),h>=10?1:0},0);u&&(n.unshift(u),t.integerLen++)}function Au(t){let e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}function J7(t,e,r){return y7(t,e,r)}function z4(t,e){e=encodeURIComponent(e);for(let r of t.split(";")){let n=r.indexOf("="),[i,o]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}var Fu=/\s+/,V7=[],fc=(()=>{let e=class e{constructor(n,i){this._ngEl=n,this._renderer=i,this.initialClasses=V7,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(Fu):V7}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Fu):n}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let i of n)this._updateState(i,!0);else if(n!=null)for(let i of Object.keys(n))this._updateState(i,!!n[i]);this._applyStateDiff()}_updateState(n,i){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==i&&(o.changed=!0,o.enabled=i),o.touched=!0):this.stateMap.set(n,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let i=n[0],o=n[1];o.changed?(this._toggleClass(i,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),o.touched=!1}}_toggleClass(n,i){n=n.trim(),n.length>0&&n.split(Fu).forEach(o=>{i?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(st))},e.\u0275dir=ne({type:e,selectors:[["","ngClass",""]],inputs:{klass:[W.None,"class","klass"],ngClass:"ngClass"},standalone:!0});let t=e;return t})();var Ru=class{constructor(e,r,n,i){this.$implicit=e,this.ngForOf=r,this.index=n,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},pc=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,i,o){this._viewContainer=n,this._template=i,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let i=this._viewContainer;n.forEachOperation((o,s,a)=>{if(o.previousIndex==null)i.createEmbeddedView(this._template,new Ru(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)i.remove(s===null?void 0:s);else if(s!==null){let c=i.get(s);i.move(c,a),Y7(c,o)}});for(let o=0,s=i.length;o{let s=i.get(o.currentIndex);Y7(s,o)})}static ngTemplateContextGuard(n,i){return!0}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(ac))},e.\u0275dir=ne({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let t=e;return t})();function Y7(t,e){t.context.$implicit=e.item}var nr=(()=>{let e=class e{constructor(n,i){this._viewContainer=n,this._context=new Lu,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){j7("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){j7("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,i){return!0}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me))},e.\u0275dir=ne({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let t=e;return t})(),Lu=class{constructor(){this.$implicit=null,this.ngIf=null}};function j7(t,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${t} must be a TemplateRef, but received '${$t(e)}'.`)}var _E=!0,E4=class{constructor(e,r){this._viewContainerRef=e,this._templateRef=r,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}},eg=(()=>{let e=class e{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(n){this._ngSwitch=n,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(n){this._defaultViews.push(n)}_matchCase(n){let i=_E?n===this._ngSwitch:n==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(n){if(this._defaultViews.length>0&&n!==this._defaultUsed){this._defaultUsed=n;for(let i of this._defaultViews)i.enforceState(n)}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});let t=e;return t})(),dK=(()=>{let e=class e{constructor(n,i,o){this.ngSwitch=o,o._addCase(),this._view=new E4(n,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(eg,9))},e.\u0275dir=ne({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});let t=e;return t})(),hK=(()=>{let e=class e{constructor(n,i,o){o._addDefault(new E4(n,i))}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(eg,9))},e.\u0275dir=ne({type:e,selectors:[["","ngSwitchDefault",""]],standalone:!0});let t=e;return t})();var _o=(()=>{let e=class e{constructor(n,i,o){this._ngEl=n,this._differs=i,this._renderer=o,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,i){let[o,s]=n.split("."),a=o.indexOf("-")===-1?void 0:br.DashCase;i!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,s?`${i}${s}`:i,a):this._renderer.removeStyle(this._ngEl.nativeElement,o,a)}_applyChanges(n){n.forEachRemovedItem(i=>this._setStyle(i.key,null)),n.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),n.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(du),m(st))},e.\u0275dir=ne({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let t=e;return t})(),mc=(()=>{let e=class e{constructor(n){this._viewContainerRef=n,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(n){if(this._shouldRecreateView(n)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,i,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,o):!1,get:(n,i,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,o)}})}};e.\u0275fac=function(i){return new(i||e)(m(Xe))},e.\u0275dir=ne({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[He]});let t=e;return t})();function I4(t,e){return new z(2100,!1)}var Hu=class{createSubscription(e,r){return t4(()=>e.subscribe({next:r,error:n=>{throw n}}))}dispose(e){t4(()=>e.unsubscribe())}},Vu=class{createSubscription(e,r){return e.then(r,n=>{throw n})}dispose(e){}},CE=new Vu,ME=new Hu,fK=(()=>{let e=class e{constructor(n){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=n}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(n){return this._obj?n!==this._obj?(this._dispose(),this.transform(n)):this._latestValue:(n&&this._subscribe(n),this._latestValue)}_subscribe(n){this._obj=n,this._strategy=this._selectStrategy(n),this._subscription=this._strategy.createSubscription(n,i=>this._updateLatestValue(n,i))}_selectStrategy(n){if(Us(n))return CE;if(Su(n))return ME;throw I4(e,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,i){n===this._obj&&(this._latestValue=i,this._ref.markForCheck())}};e.\u0275fac=function(i){return new(i||e)(m(ft,16))},e.\u0275pipe=en({name:"async",type:e,pure:!1,standalone:!0});let t=e;return t})();var DE="mediumDate",xE=new E("DATE_PIPE_DEFAULT_TIMEZONE"),SE=new E("DATE_PIPE_DEFAULT_OPTIONS"),pK=(()=>{let e=class e{constructor(n,i,o){this.locale=n,this.defaultTimezone=i,this.defaultOptions=o}transform(n,i,o,s){if(n==null||n===""||n!==n)return null;try{let a=i??this.defaultOptions?.dateFormat??DE,c=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Gu(n,a,s||this.locale,c)}catch(a){throw I4(e,a.message)}}};e.\u0275fac=function(i){return new(i||e)(m(Ii,16),m(xE,24),m(SE,24))},e.\u0275pipe=en({name:"date",type:e,pure:!0,standalone:!0});let t=e;return t})();var mK=(()=>{let e=class e{constructor(n){this._locale=n}transform(n,i,o){if(!tg(n))return null;o=o||this._locale;try{let s=ng(n);return vE(s,o,i)}catch(s){throw I4(e,s.message)}}};e.\u0275fac=function(i){return new(i||e)(m(Ii,16))},e.\u0275pipe=en({name:"number",type:e,pure:!0,standalone:!0});let t=e;return t})();var gK=(()=>{let e=class e{constructor(n,i="USD"){this._locale=n,this._defaultCurrencyCode=i}transform(n,i=this._defaultCurrencyCode,o="symbol",s,a){if(!tg(n))return null;a=a||this._locale,typeof o=="boolean"&&(o=o?"symbol":"code");let c=i||this._defaultCurrencyCode;o!=="code"&&(o==="symbol"||o==="symbol-narrow"?c=XT(c,o==="symbol"?"wide":"narrow",a):c=o);try{let l=ng(n);return gE(l,a,c,i,s)}catch(l){throw I4(e,l.message)}}};e.\u0275fac=function(i){return new(i||e)(m(Ii,16),m(k7,16))},e.\u0275pipe=en({name:"currency",type:e,pure:!0,standalone:!0});let t=e;return t})();function tg(t){return!(t==null||t===""||t!==t)}function ng(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new Error(`${t} is not a number`);return t}var gc=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})(),Ku="browser",TE="server";function Zu(t){return t===Ku}function vc(t){return t===TE}var Qu=(()=>{let e=class e{};e.\u0275prov=C({token:e,providedIn:"root",factory:()=>Zu(w(Yt))?new Yu(w(V),window):new ju});let t=e;return t})(),Yu=class{constructor(e,r){this.document=e,this.window=r,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){let r=EE(this.document,e);r&&(this.scrollToElement(r),r.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){let r=e.getBoundingClientRect(),n=r.left+this.window.pageXOffset,i=r.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(n-o[0],i-o[1])}};function EE(t,e){let r=t.getElementById(e)||t.getElementsByName(e)[0];if(r)return r;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),i=n.currentNode;for(;i;){let o=i.shadowRoot;if(o){let s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}i=n.nextNode()}}return null}var ju=class{setOffset(e){}getScrollPosition(){return[0,0]}scrollToPosition(e){}scrollToAnchor(e){}setHistoryScrollRestoration(e){}},Ks=class{};var wc=class{},Oi=class{},Co=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` -`).forEach(r=>{let n=r.indexOf(":");if(n>0){let i=r.slice(0,n),o=i.toLowerCase(),s=r.slice(n+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((r,n)=>{this.setHeaderEntries(n,r)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([r,n])=>{this.setHeaderEntries(r,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let r=this.headers.get(e.toLowerCase());return r&&r.length>0?r[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,r){return this.clone({name:e,value:r,op:"a"})}set(e,r){return this.clone({name:e,value:r,op:"s"})}delete(e,r){return this.clone({name:e,value:r,op:"d"})}maybeSetNormalizedName(e,r){this.normalizedNames.has(r)||this.normalizedNames.set(r,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?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(r=>{this.headers.set(r,e.headers.get(r)),this.normalizedNames.set(r,e.normalizedNames.get(r))})}clone(e){let r=new t;return r.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,r.lazyUpdate=(this.lazyUpdate||[]).concat([e]),r}applyUpdate(e){let r=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,r);let i=(e.op==="a"?this.headers.get(r):void 0)||[];i.push(...n),this.headers.set(r,i);break;case"d":let o=e.value;if(!o)this.headers.delete(r),this.normalizedNames.delete(r);else{let s=this.headers.get(r);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(r),this.normalizedNames.delete(r)):this.headers.set(r,s)}break}}setHeaderEntries(e,r){let n=(Array.isArray(r)?r:[r]).map(o=>o.toString()),i=e.toLowerCase();this.headers.set(i,n),this.maybeSetNormalizedName(e,i)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(r=>e(this.normalizedNames.get(r),this.headers.get(r)))}};var e6=class{encodeKey(e){return rg(e)}encodeValue(e){return rg(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function kE(t,e){let r=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(i=>{let o=i.indexOf("="),[s,a]=o==-1?[e.decodeKey(i),""]:[e.decodeKey(i.slice(0,o)),e.decodeValue(i.slice(o+1))],c=r.get(s)||[];c.push(a),r.set(s,c)}),r}var PE=/%(\d[a-f0-9])/gi,OE={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function rg(t){return encodeURIComponent(t).replace(PE,(e,r)=>OE[r]??e)}function k4(t){return`${t}`}var rr=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new e6,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=kE(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(r=>{let n=e.fromObject[r],i=Array.isArray(n)?n.map(k4):[k4(n)];this.map.set(r,i)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let r=this.map.get(e);return r?r[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,r){return this.clone({param:e,value:r,op:"a"})}appendAll(e){let r=[];return Object.keys(e).forEach(n=>{let i=e[n];Array.isArray(i)?i.forEach(o=>{r.push({param:n,value:o,op:"a"})}):r.push({param:n,value:i,op:"a"})}),this.clone(r)}set(e,r){return this.clone({param:e,value:r,op:"s"})}delete(e,r){return this.clone({param:e,value:r,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let r=this.encoder.encodeKey(e);return this.map.get(e).map(n=>r+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let r=new t({encoder:this.encoder});return r.cloneFrom=this.cloneFrom||this,r.updates=(this.updates||[]).concat(e),r}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 r=(e.op==="a"?this.map.get(e.param):void 0)||[];r.push(k4(e.value)),this.map.set(e.param,r);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],i=n.indexOf(k4(e.value));i!==-1&&n.splice(i,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)}},Qs=class{constructor(e){this.defaultValue=e}},t6=class{constructor(){this.map=new Map}set(e,r){return this.map.set(e,r),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function AE(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ig(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function og(t){return typeof Blob<"u"&&t instanceof Blob}function sg(t){return typeof FormData<"u"&&t instanceof FormData}function FE(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var yc=class t{constructor(e,r,n,i){this.url=r,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let o;if(AE(this.method)||i?(this.body=n!==void 0?n:null,o=i):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers||(this.headers=new Co),this.context||(this.context=new t6),!this.params)this.params=new rr,this.urlWithParams=r;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=r;else{let a=r.indexOf("?"),c=a===-1?"?":ad.set(h,e.setHeaders[h]),c)),e.setParams&&(l=Object.keys(e.setParams).reduce((d,h)=>d.set(h,e.setParams[h]),l)),new t(r,n,o,{params:l,headers:c,context:u,reportProgress:a,responseType:i,withCredentials:s})}},Zs=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(Zs||{}),bc=class{constructor(e,r=A4.Ok,n="OK"){this.headers=e.headers||new Co,this.status=e.status!==void 0?e.status:r,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},n6=class t extends bc{constructor(e={}){super(e),this.type=Zs.ResponseHeader}clone(e={}){return new t({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})}},P4=class t extends bc{constructor(e={}){super(e),this.type=Zs.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({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})}},O4=class extends bc{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,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}},A4=function(t){return t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Processing=102]="Processing",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultiStatus=207]="MultiStatus",t[t.AlreadyReported=208]="AlreadyReported",t[t.ImUsed=226]="ImUsed",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.Unused=306]="Unused",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.MisdirectedRequest=421]="MisdirectedRequest",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.Locked=423]="Locked",t[t.FailedDependency=424]="FailedDependency",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",t}(A4||{});function Ju(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var _c=(()=>{let e=class e{constructor(n){this.handler=n}request(n,i,o={}){let s;if(n instanceof yc)s=n;else{let l;o.headers instanceof Co?l=o.headers:l=new Co(o.headers);let u;o.params&&(o.params instanceof rr?u=o.params:u=new rr({fromObject:o.params})),s=new yc(n,i,o.body!==void 0?o.body:null,{headers:l,context:o.context,params:u,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=A(s).pipe(Vr(l=>this.handler.handle(l)));if(n instanceof yc||o.observe==="events")return a;let c=a.pipe(ge(l=>l instanceof P4));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(Z(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return c.pipe(Z(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return c.pipe(Z(l=>{if(l.body!==null&&typeof l.body!="string")throw new Error("Response is not a string.");return l.body}));case"json":default:return c.pipe(Z(l=>l.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,i={}){return this.request("DELETE",n,i)}get(n,i={}){return this.request("GET",n,i)}head(n,i={}){return this.request("HEAD",n,i)}jsonp(n,i){return this.request("JSONP",n,{params:new rr().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,i={}){return this.request("OPTIONS",n,i)}patch(n,i,o={}){return this.request("PATCH",n,Ju(o,i))}post(n,i,o={}){return this.request("POST",n,Ju(o,i))}put(n,i,o={}){return this.request("PUT",n,Ju(o,i))}};e.\u0275fac=function(i){return new(i||e)(g(wc))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function NE(t,e){return e(t)}function RE(t,e,r){return(n,i)=>Mr(r,()=>e(n,o=>t(o,i)))}var r6=new E(""),LE=new E(""),HE=new E("");var ag=(()=>{let e=class e extends wc{constructor(n,i){super(),this.backend=n,this.injector=i,this.chain=null,this.pendingTasks=w(Ws);let o=w(HE,{optional:!0});this.backend=o??n}handle(n){if(this.chain===null){let o=Array.from(new Set([...this.injector.get(r6),...this.injector.get(LE,[])]));this.chain=o.reduceRight((s,a)=>RE(s,a,this.injector),NE)}let i=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(un(()=>this.pendingTasks.remove(i)))}};e.\u0275fac=function(i){return new(i||e)(g(Oi),g(qt))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();var VE=/^\)\]\}',?\n/;function YE(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var cg=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new z(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?Le(i.\u0275loadImpl()):A(null)).pipe(Ze(()=>new Y(s=>{let a=i.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((v,M)=>a.setRequestHeader(v,M.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let v=n.detectContentTypeHeader();v!==null&&a.setRequestHeader("Content-Type",v)}if(n.responseType){let v=n.responseType.toLowerCase();a.responseType=v!=="json"?v:"text"}let c=n.serializeBody(),l=null,u=()=>{if(l!==null)return l;let v=a.statusText||"OK",M=new Co(a.getAllResponseHeaders()),P=YE(a)||n.url;return l=new n6({headers:M,status:a.status,statusText:v,url:P}),l},d=()=>{let{headers:v,status:M,statusText:P,url:X}=u(),$=null;M!==A4.NoContent&&($=typeof a.response>"u"?a.responseText:a.response),M===0&&(M=$?A4.Ok:0);let Ae=M>=200&&M<300;if(n.responseType==="json"&&typeof $=="string"){let _e=$;$=$.replace(VE,"");try{$=$!==""?JSON.parse($):null}catch(Ee){$=_e,Ae&&(Ae=!1,$={error:Ee,text:$})}}Ae?(s.next(new P4({body:$,headers:v,status:M,statusText:P,url:X||void 0})),s.complete()):s.error(new O4({error:$,headers:v,status:M,statusText:P,url:X||void 0}))},h=v=>{let{url:M}=u(),P=new O4({error:v,status:a.status||0,statusText:a.statusText||"Unknown Error",url:M||void 0});s.error(P)},f=!1,p=v=>{f||(s.next(u()),f=!0);let M={type:Zs.DownloadProgress,loaded:v.loaded};v.lengthComputable&&(M.total=v.total),n.responseType==="text"&&a.responseText&&(M.partialText=a.responseText),s.next(M)},y=v=>{let M={type:Zs.UploadProgress,loaded:v.loaded};v.lengthComputable&&(M.total=v.total),s.next(M)};return a.addEventListener("load",d),a.addEventListener("error",h),a.addEventListener("timeout",h),a.addEventListener("abort",h),n.reportProgress&&(a.addEventListener("progress",p),c!==null&&a.upload&&a.upload.addEventListener("progress",y)),a.send(c),s.next({type:Zs.Sent}),()=>{a.removeEventListener("error",h),a.removeEventListener("abort",h),a.removeEventListener("load",d),a.removeEventListener("timeout",h),n.reportProgress&&(a.removeEventListener("progress",p),c!==null&&a.upload&&a.upload.removeEventListener("progress",y)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(i){return new(i||e)(g(Ks))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),lg=new E("XSRF_ENABLED"),jE="XSRF-TOKEN",BE=new E("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>jE}),UE="X-XSRF-TOKEN",$E=new E("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>UE}),F4=class{},qE=(()=>{let e=class e{constructor(n,i,o){this.doc=n,this.platform=i,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=z4(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(i){return new(i||e)(g(V),g(Yt),g(BE))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function WE(t,e){let r=t.url.toLowerCase();if(!w(lg)||t.method==="GET"||t.method==="HEAD"||r.startsWith("http://")||r.startsWith("https://"))return e(t);let n=w(F4).getToken(),i=w($E);return n!=null&&!t.headers.has(i)&&(t=t.clone({headers:t.headers.set(i,n)})),e(t)}var ug=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(ug||{});function GE(t,e){return{\u0275kind:t,\u0275providers:e}}function zK(...t){let e=[_c,cg,ag,{provide:wc,useExisting:ag},{provide:Oi,useExisting:cg},{provide:r6,useValue:WE,multi:!0},{provide:lg,useValue:!0},{provide:F4,useClass:qE}];for(let r of t)e.push(...r.\u0275providers);return Wt(e)}function IK(t){return GE(ug.Interceptors,t.map(e=>({provide:r6,useValue:e,multi:!0})))}var s6=class extends x4{constructor(){super(...arguments),this.supportsDOMEvents=!0}},a6=class t extends s6{static makeCurrent(){B7(new t)}onAndCancel(e,r,n){return e.addEventListener(r,n),()=>{e.removeEventListener(r,n)}}dispatchEvent(e,r){e.dispatchEvent(r)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,r){return r=r||this.getDefaultDocument(),r.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,r){return r==="window"?window:r==="document"?e:r==="body"?e.body:null}getBaseHref(e){let r=KE();return r==null?null:ZE(r)}resetBaseElement(){Cc=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return z4(document.cookie,e)}},Cc=null;function KE(){return Cc=Cc||document.querySelector("base"),Cc?Cc.getAttribute("href"):null}function ZE(t){return new URL(t,document.baseURI).pathname}var QE=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),c6=new E("EventManagerPlugins"),pg=(()=>{let e=class e{constructor(n,i){this._zone=i,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,i,o){return this._findPluginFor(i).addEventListener(n,i,o)}getZone(){return this._zone}_findPluginFor(n){let i=this._eventNameToPlugin.get(n);if(i)return i;if(i=this._plugins.find(s=>s.supports(n)),!i)throw new z(5101,!1);return this._eventNameToPlugin.set(n,i),i}};e.\u0275fac=function(i){return new(i||e)(g(c6),g(U))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),N4=class{constructor(e){this._doc=e}},i6="ng-app-id",mg=(()=>{let e=class e{constructor(n,i,o,s={}){this.doc=n,this.appId=i,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=vc(s),this.resetHostNodes()}addStyles(n){for(let i of n)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(n){for(let i of n)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(i=>i.remove()),n.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let i of this.getAllStyles())this.addStyleToHost(n,i)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let i of this.hostNodes)this.addStyleToHost(i,n)}onStyleRemoved(n){let i=this.styleRef;i.get(n)?.elements?.forEach(o=>o.remove()),i.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${i6}="${this.appId}"]`);if(n?.length){let i=new Map;return n.forEach(o=>{o.textContent!=null&&i.set(o.textContent,o)}),i}return null}changeUsageCount(n,i){let o=this.styleRef;if(o.has(n)){let s=o.get(n);return s.usage+=i,s.usage}return o.set(n,{usage:i,elements:[]}),i}getStyleElement(n,i){let o=this.styleNodesInDOM,s=o?.get(i);if(s?.parentNode===n)return o.delete(i),s.removeAttribute(i6),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(i6,this.appId),n.appendChild(a),a}}addStyleToHost(n,i){let o=this.getStyleElement(n,i),s=this.styleRef,a=s.get(i)?.elements;a?a.push(o):s.set(i,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(K1),g(qr,8),g(Yt))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),o6={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},u6=/%COMP%/g,gg="%COMP%",XE=`_nghost-${gg}`,JE=`_ngcontent-${gg}`,ez=!0,tz=new E("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>ez});function nz(t){return JE.replace(u6,t)}function rz(t){return XE.replace(u6,t)}function vg(t,e){return e.map(r=>r.replace(u6,t))}var R4=(()=>{let e=class e{constructor(n,i,o,s,a,c,l,u=null){this.eventManager=n,this.sharedStylesHost=i,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=l,this.nonce=u,this.rendererByCompId=new Map,this.platformIsServer=vc(c),this.defaultRenderer=new Mc(n,a,l,this.platformIsServer)}createRenderer(n,i){if(!n||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===vr.ShadowDom&&(i=ke(b({},i),{encapsulation:vr.Emulated}));let o=this.getOrCreateRenderer(n,i);return o instanceof L4?o.applyToHost(n):o instanceof Dc&&o.applyStyles(),o}getOrCreateRenderer(n,i){let o=this.rendererByCompId,s=o.get(i.id);if(!s){let a=this.doc,c=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(i.encapsulation){case vr.Emulated:s=new L4(l,u,i,this.appId,d,a,c,h);break;case vr.ShadowDom:return new l6(l,u,n,i,a,c,this.nonce,h);default:s=new Dc(l,u,i,d,a,c,h);break}o.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(i){return new(i||e)(g(pg),g(mg),g(K1),g(tz),g(V),g(Yt),g(U),g(qr))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),Mc=class{constructor(e,r,n,i){this.eventManager=e,this.doc=r,this.ngZone=n,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,r){return r?this.doc.createElementNS(o6[r]||r,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,r){(hg(e)?e.content:e).appendChild(r)}insertBefore(e,r,n){e&&(hg(e)?e.content:e).insertBefore(r,n)}removeChild(e,r){e&&e.removeChild(r)}selectRootElement(e,r){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new z(-5104,!1);return r||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,r,n,i){if(i){r=i+":"+r;let o=o6[i];o?e.setAttributeNS(o,r,n):e.setAttribute(r,n)}else e.setAttribute(r,n)}removeAttribute(e,r,n){if(n){let i=o6[n];i?e.removeAttributeNS(i,r):e.removeAttribute(`${n}:${r}`)}else e.removeAttribute(r)}addClass(e,r){e.classList.add(r)}removeClass(e,r){e.classList.remove(r)}setStyle(e,r,n,i){i&(br.DashCase|br.Important)?e.style.setProperty(r,n,i&br.Important?"important":""):e.style[r]=n}removeStyle(e,r,n){n&br.DashCase?e.style.removeProperty(r):e.style[r]=""}setProperty(e,r,n){e!=null&&(e[r]=n)}setValue(e,r){e.nodeValue=r}listen(e,r,n){if(typeof e=="string"&&(e=Gs().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${r}`);return this.eventManager.addEventListener(e,r,this.decoratePreventDefault(n))}decoratePreventDefault(e){return r=>{if(r==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(r)):e(r))===!1&&r.preventDefault()}}};function hg(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var l6=class extends Mc{constructor(e,r,n,i,o,s,a,c){super(e,o,s,c),this.sharedStylesHost=r,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=vg(i.id,i.styles);for(let u of l){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=u,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,r){return super.appendChild(this.nodeOrShadowRoot(e),r)}insertBefore(e,r,n){return super.insertBefore(this.nodeOrShadowRoot(e),r,n)}removeChild(e,r){return super.removeChild(this.nodeOrShadowRoot(e),r)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Dc=class extends Mc{constructor(e,r,n,i,o,s,a,c){super(e,o,s,a),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=i,this.styles=c?vg(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},L4=class extends Dc{constructor(e,r,n,i,o,s,a,c){let l=i+"-"+n.id;super(e,r,n,o,s,a,c,l),this.contentAttr=nz(l),this.hostAttr=rz(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,r){let n=super.createElement(e,r);return super.setAttribute(n,this.contentAttr,""),n}},iz=(()=>{let e=class e extends N4{constructor(n){super(n)}supports(n){return!0}addEventListener(n,i,o){return n.addEventListener(i,o,!1),()=>this.removeEventListener(n,i,o)}removeEventListener(n,i,o){return n.removeEventListener(i,o)}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),fg=["alt","control","meta","shift"],oz={"\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"},sz={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},az=(()=>{let e=class e extends N4{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,i,o){let s=e.parseEventName(i),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Gs().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let i=n.toLowerCase().split("."),o=i.shift();if(i.length===0||!(o==="keydown"||o==="keyup"))return null;let s=e._normalizeKey(i.pop()),a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),fg.forEach(u=>{let d=i.indexOf(u);d>-1&&(i.splice(d,1),a+=u+".")}),a+=s,i.length!=0||s.length===0)return null;let l={};return l.domEventName=o,l.fullKey=a,l}static matchEventFullKeyCode(n,i){let o=oz[n.key]||n.key,s="";return i.indexOf("code.")>-1&&(o=n.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),fg.forEach(a=>{if(a!==o){let c=sz[a];c(n)&&(s+=a+".")}}),s+=o,s===i)}static eventCallback(n,i,o){return s=>{e.matchEventFullKeyCode(s,n)&&o.runGuarded(()=>i(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function WK(t,e){return O7(b({rootComponent:t},cz(e)))}function cz(t){return{appProviders:[...fz,...t?.providers??[]],platformProviders:hz}}function lz(){a6.makeCurrent()}function uz(){return new _r}function dz(){return om(document),document}var hz=[{provide:Yt,useValue:Ku},{provide:ru,useValue:lz,multi:!0},{provide:V,useFactory:dz,deps:[]}];var fz=[{provide:G1,useValue:"root"},{provide:_r,useFactory:uz,deps:[]},{provide:c6,useClass:iz,multi:!0,deps:[V,U,Yt]},{provide:c6,useClass:az,multi:!0,deps:[V]},R4,mg,pg,{provide:Jn,useExisting:R4},{provide:Ks,useClass:QE,deps:[]},[]];function pz(){return new xc(g(V))}var xc=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:function(i){let o=null;return i?o=new i:o=pz(),o},providedIn:"root"});let t=e;return t})();var Mo=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:function(i){let o=null;return i?o=new(i||e):o=g(yg),o},providedIn:"root"});let t=e;return t})();function mz(t){return new yg(t.get(V))}var yg=(()=>{let e=class e extends Mo{constructor(n){super(),this._doc=n}sanitize(n,i){if(i==null)return null;switch(n){case yn.NONE:return i;case yn.HTML:return Wr(i,"HTML")?vn(i):au(this._doc,String(i)).toString();case yn.STYLE:return Wr(i,"Style")?vn(i):i;case yn.SCRIPT:if(Wr(i,"Script"))return vn(i);throw new z(5200,!1);case yn.URL:return Wr(i,"URL")?vn(i):e4(String(i));case yn.RESOURCE_URL:if(Wr(i,"ResourceURL"))return vn(i);throw new z(5201,!1);default:throw new z(5202,!1)}}bypassSecurityTrustHtml(n){return _m(n)}bypassSecurityTrustStyle(n){return Cm(n)}bypassSecurityTrustScript(n){return Mm(n)}bypassSecurityTrustUrl(n){return Dm(n)}bypassSecurityTrustResourceUrl(n){return xm(n)}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:function(i){let o=null;return i?o=new i:o=mz(g(Ue)),o},providedIn:"root"});let t=e;return t})();var ve="primary",Yc=Symbol("RouteTitle"),g6=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r[0]:r}return null}getAll(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}};function na(t){return new g6(t)}function gz(t,e,r){let n=r.path.split("/");if(n.length>t.length||r.pathMatch==="full"&&(e.hasChildren()||n.lengthn[o]===i)}else return t===e}function Ri(t){return Tn(t)?t:Us(t)?Le(Promise.resolve(t)):A(t)}var yz={exact:zg,subset:Ig},Eg={exact:wz,subset:bz,ignored:()=>!0};function wg(t,e,r){return yz[r.paths](t.root,e.root,r.matrixParams)&&Eg[r.queryParams](t.queryParams,e.queryParams)&&!(r.fragment==="exact"&&t.fragment!==e.fragment)}function wz(t,e){return Er(t,e)}function zg(t,e,r){if(!xo(t.segments,e.segments)||!Y4(t.segments,e.segments,r)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!t.children[n]||!zg(t.children[n],e.children[n],r))return!1;return!0}function bz(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(r=>Tg(t[r],e[r]))}function Ig(t,e,r){return kg(t,e,e.segments,r)}function kg(t,e,r,n){if(t.segments.length>r.length){let i=t.segments.slice(0,r.length);return!(!xo(i,r)||e.hasChildren()||!Y4(i,r,n))}else if(t.segments.length===r.length){if(!xo(t.segments,r)||!Y4(t.segments,r,n))return!1;for(let i in e.children)if(!t.children[i]||!Ig(t.children[i],e.children[i],n))return!1;return!0}else{let i=r.slice(0,t.segments.length),o=r.slice(t.segments.length);return!xo(t.segments,i)||!Y4(t.segments,i,n)||!t.children[ve]?!1:kg(t.children[ve],e,o,n)}}function Y4(t,e,r){return e.every((n,i)=>Eg[r](t[i].parameters,n.parameters))}var Ai=class{constructor(e=new Ne([],{}),r={},n=null){this.root=e,this.queryParams=r,this.fragment=n}get queryParamMap(){return this._queryParamMap??=na(this.queryParams),this._queryParamMap}toString(){return Mz.serialize(this)}},Ne=class{constructor(e,r){this.segments=e,this.children=r,this.parent=null,Object.values(r).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return j4(this)}},Do=class{constructor(e,r){this.path=e,this.parameters=r}get parameterMap(){return this._parameterMap??=na(this.parameters),this._parameterMap}toString(){return Og(this)}};function _z(t,e){return xo(t,e)&&t.every((r,n)=>Er(r.parameters,e[n].parameters))}function xo(t,e){return t.length!==e.length?!1:t.every((r,n)=>r.path===e[n].path)}function Cz(t,e){let r=[];return Object.entries(t.children).forEach(([n,i])=>{n===ve&&(r=r.concat(e(i,n)))}),Object.entries(t.children).forEach(([n,i])=>{n!==ve&&(r=r.concat(e(i,n)))}),r}var sa=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>new Pc,providedIn:"root"});let t=e;return t})(),Pc=class{parse(e){let r=new w6(e);return new Ai(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(e){let r=`/${Sc(e.root,!0)}`,n=Sz(e.queryParams),i=typeof e.fragment=="string"?`#${Dz(e.fragment)}`:"";return`${r}${n}${i}`}},Mz=new Pc;function j4(t){return t.segments.map(e=>Og(e)).join("/")}function Sc(t,e){if(!t.hasChildren())return j4(t);if(e){let r=t.children[ve]?Sc(t.children[ve],!1):"",n=[];return Object.entries(t.children).forEach(([i,o])=>{i!==ve&&n.push(`${i}:${Sc(o,!1)}`)}),n.length>0?`${r}(${n.join("//")})`:r}else{let r=Cz(t,(n,i)=>i===ve?[Sc(t.children[ve],!1)]:[`${i}:${Sc(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[ve]!=null?`${j4(t)}/${r[0]}`:`${j4(t)}/(${r.join("//")})`}}function Pg(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function H4(t){return Pg(t).replace(/%3B/gi,";")}function Dz(t){return encodeURI(t)}function y6(t){return Pg(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function B4(t){return decodeURIComponent(t)}function bg(t){return B4(t.replace(/\+/g,"%20"))}function Og(t){return`${y6(t.path)}${xz(t.parameters)}`}function xz(t){return Object.entries(t).map(([e,r])=>`;${y6(e)}=${y6(r)}`).join("")}function Sz(t){let e=Object.entries(t).map(([r,n])=>Array.isArray(n)?n.map(i=>`${H4(r)}=${H4(i)}`).join("&"):`${H4(r)}=${H4(n)}`).filter(r=>r);return e.length?`?${e.join("&")}`:""}var Tz=/^[^\/()?;#]+/;function h6(t){let e=t.match(Tz);return e?e[0]:""}var Ez=/^[^\/()?;=#]+/;function zz(t){let e=t.match(Ez);return e?e[0]:""}var Iz=/^[^=?&#]+/;function kz(t){let e=t.match(Iz);return e?e[0]:""}var Pz=/^[^&#]+/;function Oz(t){let e=t.match(Pz);return e?e[0]:""}var w6=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ne([],{}):new Ne([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(r).length>0)&&(n[ve]=new Ne(e,r)),n}parseSegment(){let e=h6(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new z(4009,!1);return this.capture(e),new Do(B4(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let r=zz(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let i=h6(this.remaining);i&&(n=i,this.capture(n))}e[B4(r)]=B4(n)}parseQueryParam(e){let r=kz(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let s=Oz(this.remaining);s&&(n=s,this.capture(n))}let i=bg(r),o=bg(n);if(e.hasOwnProperty(i)){let s=e[i];Array.isArray(s)||(s=[s],e[i]=s),s.push(o)}else e[i]=o}parseParens(e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=h6(this.remaining),i=this.remaining[n.length];if(i!=="/"&&i!==")"&&i!==";")throw new z(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=ve);let s=this.parseChildren();r[o]=Object.keys(s).length===1?s[ve]:new Ne([],s),this.consumeOptional("//")}return r}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new z(4011,!1)}};function Ag(t){return t.segments.length>0?new Ne([],{[ve]:t}):t}function Fg(t){let e={};for(let[n,i]of Object.entries(t.children)){let o=Fg(i);if(n===ve&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[n]=o)}let r=new Ne(t.segments,e);return Az(r)}function Az(t){if(t.numberOfChildren===1&&t.children[ve]){let e=t.children[ve];return new Ne(t.segments.concat(e.segments),e.children)}return t}function ra(t){return t instanceof Ai}function Fz(t,e,r=null,n=null){let i=Ng(t);return Rg(i,e,r,n)}function Ng(t){let e;function r(o){let s={};for(let c of o.children){let l=r(c);s[c.outlet]=l}let a=new Ne(o.url,s);return o===t&&(e=a),a}let n=r(t.root),i=Ag(n);return e??i}function Rg(t,e,r,n){let i=t;for(;i.parent;)i=i.parent;if(e.length===0)return f6(i,i,i,r,n);let o=Nz(e);if(o.toRoot())return f6(i,i,new Ne([],{}),r,n);let s=Rz(o,i,t),a=s.processChildren?zc(s.segmentGroup,s.index,o.commands):Hg(s.segmentGroup,s.index,o.commands);return f6(i,s.segmentGroup,a,r,n)}function U4(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Oc(t){return typeof t=="object"&&t!=null&&t.outlets}function f6(t,e,r,n,i){let o={};n&&Object.entries(n).forEach(([c,l])=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`});let s;t===e?s=r:s=Lg(t,e,r);let a=Ag(Fg(s));return new Ai(a,o,i)}function Lg(t,e,r){let n={};return Object.entries(t.children).forEach(([i,o])=>{o===e?n[i]=r:n[i]=Lg(o,e,r)}),new Ne(t.segments,n)}var $4=class{constructor(e,r,n){if(this.isAbsolute=e,this.numberOfDoubleDots=r,this.commands=n,e&&n.length>0&&U4(n[0]))throw new z(4003,!1);let i=n.find(Oc);if(i&&i!==n.at(-1))throw new z(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Nz(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new $4(!0,0,t);let e=0,r=!1,n=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,l])=>{a[c]=typeof l=="string"?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?r=!0:a===".."?e++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new $4(r,e,n)}var ea=class{constructor(e,r,n){this.segmentGroup=e,this.processChildren=r,this.index=n}};function Rz(t,e,r){if(t.isAbsolute)return new ea(e,!0,0);if(!r)return new ea(e,!1,NaN);if(r.parent===null)return new ea(r,!0,0);let n=U4(t.commands[0])?0:1,i=r.segments.length-1+n;return Lz(r,i,t.numberOfDoubleDots)}function Lz(t,e,r){let n=t,i=e,o=r;for(;o>i;){if(o-=i,n=n.parent,!n)throw new z(4005,!1);i=n.segments.length}return new ea(n,!1,i-o)}function Hz(t){return Oc(t[0])?t[0].outlets:{[ve]:t}}function Hg(t,e,r){if(t??=new Ne([],{}),t.segments.length===0&&t.hasChildren())return zc(t,e,r);let n=Vz(t,e,r),i=r.slice(n.commandIndex);if(n.match&&n.pathIndexo!==ve)&&t.children[ve]&&t.numberOfChildren===1&&t.children[ve].segments.length===0){let o=zc(t.children[ve],e,r);return new Ne(t.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=Hg(t.children[o],e,s))}),Object.entries(t.children).forEach(([o,s])=>{n[o]===void 0&&(i[o]=s)}),new Ne(t.segments,i)}}function Vz(t,e,r){let n=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};for(;i=r.length)return o;let s=t.segments[i],a=r[n];if(Oc(a))break;let c=`${a}`,l=n0&&c===void 0)break;if(c&&l&&typeof l=="object"&&l.outlets===void 0){if(!Cg(c,l,s))return o;n+=2}else{if(!Cg(c,{},s))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}function b6(t,e,r){let n=t.segments.slice(0,e),i=0;for(;i{typeof n=="string"&&(n=[n]),n!==null&&(e[r]=b6(new Ne([],{}),0,n))}),e}function _g(t){let e={};return Object.entries(t).forEach(([r,n])=>e[r]=`${n}`),e}function Cg(t,e,r){return t==r.path&&Er(e,r.parameters)}var Ic="imperative",Tt=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(Tt||{}),Nn=class{constructor(e,r){this.id=e,this.url=r}},ia=class extends Nn{constructor(e,r,n="imperative",i=null){super(e,r),this.type=Tt.NavigationStart,this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},zr=class extends Nn{constructor(e,r,n){super(e,r),this.urlAfterRedirects=n,this.type=Tt.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Fn=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(Fn||{}),q4=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(q4||{}),Fi=class extends Nn{constructor(e,r,n,i){super(e,r),this.reason=n,this.code=i,this.type=Tt.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Ni=class extends Nn{constructor(e,r,n,i){super(e,r),this.reason=n,this.code=i,this.type=Tt.NavigationSkipped}},Ac=class extends Nn{constructor(e,r,n,i){super(e,r),this.error=n,this.target=i,this.type=Tt.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},W4=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},_6=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},C6=class extends Nn{constructor(e,r,n,i,o){super(e,r),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=o,this.type=Tt.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},M6=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},D6=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},x6=class{constructor(e){this.route=e,this.type=Tt.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},S6=class{constructor(e){this.route=e,this.type=Tt.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},T6=class{constructor(e){this.snapshot=e,this.type=Tt.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},E6=class{constructor(e){this.snapshot=e,this.type=Tt.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},z6=class{constructor(e){this.snapshot=e,this.type=Tt.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},I6=class{constructor(e){this.snapshot=e,this.type=Tt.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},G4=class{constructor(e,r,n){this.routerEvent=e,this.position=r,this.anchor=n,this.type=Tt.Scroll}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},Fc=class{},Nc=class{constructor(e){this.url=e}};var k6=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new jc,this.attachRef=null}},jc=(()=>{let e=class e{constructor(){this.contexts=new Map}onChildOutletCreated(n,i){let o=this.getOrCreateContext(n);o.outlet=i,this.contexts.set(n,o)}onChildOutletDestroyed(n){let i=this.getContext(n);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let i=this.getContext(n);return i||(i=new k6,this.contexts.set(n,i)),i}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),K4=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let r=this.pathFromRoot(e);return r.length>1?r[r.length-2]:null}children(e){let r=P6(e,this._root);return r?r.children.map(n=>n.value):[]}firstChild(e){let r=P6(e,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(e){let r=O6(e,this._root);return r.length<2?[]:r[r.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return O6(e,this._root).map(r=>r.value)}};function P6(t,e){if(t===e.value)return e;for(let r of e.children){let n=P6(t,r);if(n)return n}return null}function O6(t,e){if(t===e.value)return[e];for(let r of e.children){let n=O6(t,r);if(n.length)return n.unshift(e),n}return[]}var _n=class{constructor(e,r){this.value=e,this.children=r}toString(){return`TreeNode(${this.value})`}};function Js(t){let e={};return t&&t.children.forEach(r=>e[r.value.outlet]=r),e}var Z4=class extends K4{constructor(e,r){super(e),this.snapshot=r,B6(this,e)}toString(){return this.snapshot.toString()}};function Vg(t){let e=jz(t),r=new Re([new Do("",{})]),n=new Re({}),i=new Re({}),o=new Re({}),s=new Re(""),a=new Ir(r,n,o,s,i,ve,t,e.root);return a.snapshot=e.root,new Z4(new _n(a,[]),e)}function jz(t){let e={},r={},n={},i="",o=new Rc([],e,n,i,r,ve,t,null,{});return new Q4("",new _n(o,[]))}var Ir=class{constructor(e,r,n,i,o,s,a,c){this.urlSubject=e,this.paramsSubject=r,this.queryParamsSubject=n,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(Z(l=>l[Yc]))??A(void 0),this.url=e,this.params=r,this.queryParams=n,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Z(e=>na(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Z(e=>na(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function j6(t,e,r="emptyOnly"){let n,{routeConfig:i}=t;return e!==null&&(r==="always"||i?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:b(b({},e.params),t.params),data:b(b({},e.data),t.data),resolve:b(b(b(b({},t.data),e.data),i?.data),t._resolvedData)}:n={params:b({},t.params),data:b({},t.data),resolve:b(b({},t.data),t._resolvedData??{})},i&&jg(i)&&(n.resolve[Yc]=i.title),n}var Rc=class{get title(){return this.data?.[Yc]}constructor(e,r,n,i,o,s,a,c,l){this.url=e,this.params=r,this.queryParams=n,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=na(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=na(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),r=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${r}')`}},Q4=class extends K4{constructor(e,r){super(r),this.url=e,B6(this,r)}toString(){return Yg(this._root)}};function B6(t,e){e.value._routerState=t,e.children.forEach(r=>B6(t,r))}function Yg(t){let e=t.children.length>0?` { ${t.children.map(Yg).join(", ")} } `:"";return`${t.value}${e}`}function p6(t){if(t.snapshot){let e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,Er(e.queryParams,r.queryParams)||t.queryParamsSubject.next(r.queryParams),e.fragment!==r.fragment&&t.fragmentSubject.next(r.fragment),Er(e.params,r.params)||t.paramsSubject.next(r.params),vz(e.url,r.url)||t.urlSubject.next(r.url),Er(e.data,r.data)||t.dataSubject.next(r.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function A6(t,e){let r=Er(t.params,e.params)&&_z(t.url,e.url),n=!t.parent!=!e.parent;return r&&!n&&(!t.parent||A6(t.parent,e.parent))}function jg(t){return typeof t.title=="string"||t.title===null}var Bz=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=ve,this.activateEvents=new re,this.deactivateEvents=new re,this.attachEvents=new re,this.detachEvents=new re,this.parentContexts=w(jc),this.location=w(Xe),this.changeDetector=w(ft),this.environmentInjector=w(qt),this.inputBinder=w(t2,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:i,previousValue:o}=n.name;if(i)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new z(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new z(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new z(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,i){this.activated=n,this._activatedRoute=i,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,i){if(this.isActivated)throw new z(4013,!1);this._activatedRoute=n;let o=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,l=new F6(n,c,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:l,environmentInjector:i??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[He]});let t=e;return t})(),F6=class{constructor(e,r,n){this.route=e,this.childContexts=r,this.parent=n}get(e,r){return e===Ir?this.route:e===jc?this.childContexts:this.parent.get(e,r)}},t2=new E(""),Mg=(()=>{let e=class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){let{activatedRoute:i}=n,o=Ji([i.queryParams,i.params,i.data]).pipe(Ze(([s,a,c],l)=>(c=b(b(b({},s),a),c),l===0?A(c):Promise.resolve(c)))).subscribe(s=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(n);return}let a=A7(i.component);if(!a){this.unsubscribeFromRouteData(n);return}for(let{templateName:c}of a.inputs)n.activatedComponentRef.setInput(c,s[c])});this.outletDataSubscriptions.set(n,o)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function Uz(t,e,r){let n=Lc(t,e._root,r?r._root:void 0);return new Z4(n,e)}function Lc(t,e,r){if(r&&t.shouldReuseRoute(e.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=e.value;let i=$z(t,e,r);return new _n(n,i)}else{if(t.shouldAttach(e.value)){let o=t.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>Lc(t,a)),s}}let n=qz(e.value),i=e.children.map(o=>Lc(t,o));return new _n(n,i)}}function $z(t,e,r){return e.children.map(n=>{for(let i of r.children)if(t.shouldReuseRoute(n.value,i.value.snapshot))return Lc(t,n,i);return Lc(t,n)})}function qz(t){return new Ir(new Re(t.url),new Re(t.params),new Re(t.queryParams),new Re(t.fragment),new Re(t.data),t.outlet,t.component,t)}var Bg="ngNavigationCancelingError";function Ug(t,e){let{redirectTo:r,navigationBehaviorOptions:n}=ra(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,i=$g(!1,Fn.Redirect,e);return i.url=r,i.navigationBehaviorOptions=n,i}function $g(t,e,r){let n=new Error("NavigationCancelingError: "+(t||""));return n[Bg]=!0,n.cancellationCode=e,r&&(n.url=r),n}function Wz(t){return qg(t)&&ra(t.url)}function qg(t){return t&&t[Bg]}var Gz=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["ng-component"]],standalone:!0,features:[_t],decls:1,vars:0,template:function(i,o){i&1&&et(0,"router-outlet")},dependencies:[Bz],encapsulation:2});let t=e;return t})();function Kz(t,e){return t.providers&&!t._injector&&(t._injector=h4(t.providers,e,`Route: ${t.path}`)),t._injector??e}function U6(t){let e=t.children&&t.children.map(U6),r=e?ke(b({},t),{children:e}):b({},t);return!r.component&&!r.loadComponent&&(e||r.loadChildren)&&r.outlet&&r.outlet!==ve&&(r.component=Gz),r}function kr(t){return t.outlet||ve}function Zz(t,e){let r=t.filter(n=>kr(n)===e);return r.push(...t.filter(n=>kr(n)!==e)),r}function Bc(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let r=e.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}var Qz=(t,e,r,n)=>Z(i=>(new N6(e,i.targetRouterState,i.currentRouterState,r,n).activate(t),i)),N6=class{constructor(e,r,n,i,o){this.routeReuseStrategy=e,this.futureState=r,this.currState=n,this.forwardEvent=i,this.inputBindingEnabled=o}activate(e){let r=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,n,e),p6(this.futureState.root),this.activateChildRoutes(r,n,e)}deactivateChildRoutes(e,r,n){let i=Js(r);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],n),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(e,r,n){let i=e.value,o=r?r.value:null;if(i===o)if(i.component){let s=n.getContext(i.outlet);s&&this.deactivateChildRoutes(e,r,s.children)}else this.deactivateChildRoutes(e,r,n);else o&&this.deactivateRouteAndItsChildren(r,n)}deactivateRouteAndItsChildren(e,r){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,r):this.deactivateRouteAndOutlet(e,r)}detachAndStoreRouteSubtree(e,r){let n=r.getContext(e.value.outlet),i=n&&e.value.component?n.children:r,o=Js(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,r){let n=r.getContext(e.value.outlet),i=n&&e.value.component?n.children:r,o=Js(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,r,n){let i=Js(r);e.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],n),this.forwardEvent(new I6(o.value.snapshot))}),e.children.length&&this.forwardEvent(new E6(e.value.snapshot))}activateRoutes(e,r,n){let i=e.value,o=r?r.value:null;if(p6(i),i===o)if(i.component){let s=n.getOrCreateContext(i.outlet);this.activateChildRoutes(e,r,s.children)}else this.activateChildRoutes(e,r,n);else if(i.component){let s=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),p6(a.route.value),this.activateChildRoutes(e,null,s.children)}else{let a=Bc(i.snapshot);s.attachRef=null,s.route=i,s.injector=a,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,n)}},X4=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},ta=class{constructor(e,r){this.component=e,this.route=r}};function Xz(t,e,r){let n=t._root,i=e?e._root:null;return Tc(n,i,r,[n.value])}function Jz(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function aa(t,e){let r=Symbol(),n=e.get(t,r);return n===r?typeof t=="function"&&!tp(t)?t:e.get(t):n}function Tc(t,e,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=Js(e);return t.children.forEach(s=>{eI(s,o[s.value.outlet],r,n.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>kc(a,r.getContext(s),i)),i}function eI(t,e,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=e?e.value:null,a=r?r.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=tI(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new X4(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Tc(t,e,a?a.children:null,n,i):Tc(t,e,r,n,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new ta(a.outlet.component,s))}else s&&kc(e,a,i),i.canActivateChecks.push(new X4(n)),o.component?Tc(t,null,a?a.children:null,n,i):Tc(t,null,r,n,i);return i}function tI(t,e,r){if(typeof r=="function")return r(t,e);switch(r){case"pathParamsChange":return!xo(t.url,e.url);case"pathParamsOrQueryParamsChange":return!xo(t.url,e.url)||!Er(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!A6(t,e)||!Er(t.queryParams,e.queryParams);case"paramsChange":default:return!A6(t,e)}}function kc(t,e,r){let n=Js(t),i=t.value;Object.entries(n).forEach(([o,s])=>{i.component?e?kc(s,e.children.getContext(o),r):kc(s,null,r):kc(s,e,r)}),i.component?e&&e.outlet&&e.outlet.isActivated?r.canDeactivateChecks.push(new ta(e.outlet.component,i)):r.canDeactivateChecks.push(new ta(null,i)):r.canDeactivateChecks.push(new ta(null,i))}function Uc(t){return typeof t=="function"}function nI(t){return typeof t=="boolean"}function rI(t){return t&&Uc(t.canLoad)}function iI(t){return t&&Uc(t.canActivate)}function oI(t){return t&&Uc(t.canActivateChild)}function sI(t){return t&&Uc(t.canDeactivate)}function aI(t){return t&&Uc(t.canMatch)}function Wg(t){return t instanceof Gn||t?.name==="EmptyError"}var V4=Symbol("INITIAL_VALUE");function oa(){return Ze(t=>Ji(t.map(e=>e.pipe(ze(1),Rt(V4)))).pipe(Z(e=>{for(let r of e)if(r!==!0){if(r===V4)return V4;if(r===!1||r instanceof Ai)return r}return!0}),ge(e=>e!==V4),ze(1)))}function cI(t,e){return Ke(r=>{let{targetSnapshot:n,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=r;return s.length===0&&o.length===0?A(ke(b({},r),{guardsResult:!0})):lI(s,n,i,t).pipe(Ke(a=>a&&nI(a)?uI(n,o,t,e):A(a)),Z(a=>ke(b({},r),{guardsResult:a})))})}function lI(t,e,r,n){return Le(t).pipe(Ke(i=>mI(i.component,i.route,r,e,n)),hr(i=>i!==!0,!0))}function uI(t,e,r,n){return Le(e).pipe(Vr(i=>dr(hI(i.route.parent,n),dI(i.route,n),pI(t,i.path,r),fI(t,i.route,r))),hr(i=>i!==!0,!0))}function dI(t,e){return t!==null&&e&&e(new z6(t)),A(!0)}function hI(t,e){return t!==null&&e&&e(new T6(t)),A(!0)}function fI(t,e,r){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return A(!0);let i=n.map(o=>gs(()=>{let s=Bc(e)??r,a=aa(o,s),c=iI(a)?a.canActivate(e,t):Mr(s,()=>a(e,t));return Ri(c).pipe(hr())}));return A(i).pipe(oa())}function pI(t,e,r){let n=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>Jz(s)).filter(s=>s!==null).map(s=>gs(()=>{let a=s.guards.map(c=>{let l=Bc(s.node)??r,u=aa(c,l),d=oI(u)?u.canActivateChild(n,t):Mr(l,()=>u(n,t));return Ri(d).pipe(hr())});return A(a).pipe(oa())}));return A(o).pipe(oa())}function mI(t,e,r,n,i){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return A(!0);let s=o.map(a=>{let c=Bc(e)??i,l=aa(a,c),u=sI(l)?l.canDeactivate(t,e,r,n):Mr(c,()=>l(t,e,r,n));return Ri(u).pipe(hr())});return A(s).pipe(oa())}function gI(t,e,r,n){let i=e.canLoad;if(i===void 0||i.length===0)return A(!0);let o=i.map(s=>{let a=aa(s,t),c=rI(a)?a.canLoad(e,r):Mr(t,()=>a(e,r));return Ri(c)});return A(o).pipe(oa(),Gg(n))}function Gg(t){return G3(Fe(e=>{if(ra(e))throw Ug(t,e)}),Z(e=>e===!0))}function vI(t,e,r,n){let i=e.canMatch;if(!i||i.length===0)return A(!0);let o=i.map(s=>{let a=aa(s,t),c=aI(a)?a.canMatch(e,r):Mr(t,()=>a(e,r));return Ri(c)});return A(o).pipe(oa(),Gg(n))}var Hc=class{constructor(e){this.segmentGroup=e||null}},J4=class extends Error{constructor(e){super(),this.urlTree=e}};function Xs(t){return vi(new Hc(t))}function yI(t){return vi(new z(4e3,!1))}function wI(t){return vi($g(!1,Fn.GuardRejected))}var R6=class{constructor(e,r){this.urlSerializer=e,this.urlTree=r}lineralizeSegments(e,r){let n=[],i=r.root;for(;;){if(n=n.concat(i.segments),i.numberOfChildren===0)return A(n);if(i.numberOfChildren>1||!i.children[ve])return yI(e.redirectTo);i=i.children[ve]}}applyRedirectCommands(e,r,n){let i=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),e,n);if(r.startsWith("/"))throw new J4(i);return i}applyRedirectCreateUrlTree(e,r,n,i){let o=this.createSegmentGroup(e,r.root,n,i);return new Ai(o,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(e,r){let n={};return Object.entries(e).forEach(([i,o])=>{if(typeof o=="string"&&o.startsWith(":")){let a=o.substring(1);n[i]=r[a]}else n[i]=o}),n}createSegmentGroup(e,r,n,i){let o=this.createSegments(e,r.segments,n,i),s={};return Object.entries(r.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(e,c,n,i)}),new Ne(o,s)}createSegments(e,r,n,i){return r.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,i):this.findOrReturn(o,n))}findPosParam(e,r,n){let i=n[r.path.substring(1)];if(!i)throw new z(4001,!1);return i}findOrReturn(e,r){let n=0;for(let i of r){if(i.path===e.path)return r.splice(n),i;n++}return e}},L6={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function bI(t,e,r,n,i){let o=$6(t,e,r);return o.matched?(n=Kz(e,n),vI(n,e,r,i).pipe(Z(s=>s===!0?o:b({},L6)))):A(o)}function $6(t,e,r){if(e.path==="**")return _I(r);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||r.length>0)?b({},L6):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let i=(e.matcher||gz)(r,t,e);if(!i)return b({},L6);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?b(b({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:r.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function _I(t){return{matched:!0,parameters:t.at(-1)?.parameters??{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Dg(t,e,r,n){return r.length>0&&DI(t,r,n)?{segmentGroup:new Ne(e,MI(n,new Ne(r,t.children))),slicedSegments:[]}:r.length===0&&xI(t,r,n)?{segmentGroup:new Ne(t.segments,CI(t,r,n,t.children)),slicedSegments:r}:{segmentGroup:new Ne(t.segments,t.children),slicedSegments:r}}function CI(t,e,r,n){let i={};for(let o of r)if(n2(t,e,o)&&!n[kr(o)]){let s=new Ne([],{});i[kr(o)]=s}return b(b({},n),i)}function MI(t,e){let r={};r[ve]=e;for(let n of t)if(n.path===""&&kr(n)!==ve){let i=new Ne([],{});r[kr(n)]=i}return r}function DI(t,e,r){return r.some(n=>n2(t,e,n)&&kr(n)!==ve)}function xI(t,e,r){return r.some(n=>n2(t,e,n))}function n2(t,e,r){return(t.hasChildren()||e.length>0)&&r.pathMatch==="full"?!1:r.path===""}function SI(t,e,r,n){return kr(t)!==n&&(n===ve||!n2(e,r,t))?!1:$6(e,t,r).matched}function TI(t,e,r){return e.length===0&&!t.children[r]}var H6=class{};function EI(t,e,r,n,i,o,s="emptyOnly"){return new V6(t,e,r,n,i,s,o).recognize()}var zI=31,V6=class{constructor(e,r,n,i,o,s,a){this.injector=e,this.configLoader=r,this.rootComponentType=n,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new R6(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new z(4002,`'${e.segmentGroup}'`)}recognize(){let e=Dg(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Z(r=>{let n=new Rc([],Object.freeze({}),Object.freeze(b({},this.urlTree.queryParams)),this.urlTree.fragment,{},ve,this.rootComponentType,null,{}),i=new _n(n,r),o=new Q4("",i),s=Fz(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),this.inheritParamsAndData(o._root,null),{state:o,tree:s}}))}match(e){return this.processSegmentGroup(this.injector,this.config,e,ve).pipe(En(n=>{if(n instanceof J4)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Hc?this.noMatchError(n):n}))}inheritParamsAndData(e,r){let n=e.value,i=j6(n,r,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),e.children.forEach(o=>this.inheritParamsAndData(o,n))}processSegmentGroup(e,r,n,i){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,r,n):this.processSegment(e,r,n,n.segments,i,!0).pipe(Z(o=>o instanceof _n?[o]:[]))}processChildren(e,r,n){let i=[];for(let o of Object.keys(n.children))o==="primary"?i.unshift(o):i.push(o);return Le(i).pipe(Vr(o=>{let s=n.children[o],a=Zz(r,o);return this.processSegmentGroup(e,a,s,o)}),s0((o,s)=>(o.push(...s),o)),bi(null),i0(),Ke(o=>{if(o===null)return Xs(n);let s=Kg(o);return II(s),A(s)}))}processSegment(e,r,n,i,o,s){return Le(r).pipe(Vr(a=>this.processSegmentAgainstRoute(a._injector??e,r,a,n,i,o,s).pipe(En(c=>{if(c instanceof Hc)return A(null);throw c}))),hr(a=>!!a),En(a=>{if(Wg(a))return TI(n,i,o)?A(new H6):Xs(n);throw a}))}processSegmentAgainstRoute(e,r,n,i,o,s,a){return SI(n,i,o,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,i,n,o,s):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,i,r,n,o,s):Xs(i):Xs(i)}expandSegmentAgainstRouteUsingRedirect(e,r,n,i,o,s){let{matched:a,consumedSegments:c,positionalParamSegments:l,remainingSegments:u}=$6(r,i,o);if(!a)return Xs(r);i.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>zI&&(this.allowRedirects=!1));let d=this.applyRedirects.applyRedirectCommands(c,i.redirectTo,l);return this.applyRedirects.lineralizeSegments(i,d).pipe(Ke(h=>this.processSegment(e,n,r,h.concat(u),s,!1)))}matchSegmentAgainstRoute(e,r,n,i,o){let s=bI(r,n,i,e,this.urlSerializer);return n.path==="**"&&(r.children={}),s.pipe(Ze(a=>a.matched?(e=n._injector??e,this.getChildConfig(e,n,i).pipe(Ze(({routes:c})=>{let l=n._loadedInjector??e,{consumedSegments:u,remainingSegments:d,parameters:h}=a,f=new Rc(u,h,Object.freeze(b({},this.urlTree.queryParams)),this.urlTree.fragment,PI(n),kr(n),n.component??n._loadedComponent??null,n,OI(n)),{segmentGroup:p,slicedSegments:y}=Dg(r,u,d,c);if(y.length===0&&p.hasChildren())return this.processChildren(l,c,p).pipe(Z(M=>M===null?null:new _n(f,M)));if(c.length===0&&y.length===0)return A(new _n(f,[]));let v=kr(n)===o;return this.processSegment(l,c,p,y,v?ve:o,!0).pipe(Z(M=>new _n(f,M instanceof _n?[M]:[])))}))):Xs(r)))}getChildConfig(e,r,n){return r.children?A({routes:r.children,injector:e}):r.loadChildren?r._loadedRoutes!==void 0?A({routes:r._loadedRoutes,injector:r._loadedInjector}):gI(e,r,n,this.urlSerializer).pipe(Ke(i=>i?this.configLoader.loadChildren(e,r).pipe(Fe(o=>{r._loadedRoutes=o.routes,r._loadedInjector=o.injector})):wI(r))):A({routes:[],injector:e})}};function II(t){t.sort((e,r)=>e.value.outlet===ve?-1:r.value.outlet===ve?1:e.value.outlet.localeCompare(r.value.outlet))}function kI(t){let e=t.value.routeConfig;return e&&e.path===""}function Kg(t){let e=[],r=new Set;for(let n of t){if(!kI(n)){e.push(n);continue}let i=e.find(o=>n.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...n.children),r.add(i)):e.push(n)}for(let n of r){let i=Kg(n.children);e.push(new _n(n.value,i))}return e.filter(n=>!r.has(n))}function PI(t){return t.data||{}}function OI(t){return t.resolve||{}}function AI(t,e,r,n,i,o){return Ke(s=>EI(t,e,r,n,s.extractedUrl,i,o).pipe(Z(({state:a,tree:c})=>ke(b({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function FI(t,e){return Ke(r=>{let{targetSnapshot:n,guards:{canActivateChecks:i}}=r;if(!i.length)return A(r);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let l of Zg(c))s.add(l);let a=0;return Le(s).pipe(Vr(c=>o.has(c)?NI(c,n,t,e):(c.data=j6(c,c.parent,t).resolve,A(void 0))),Fe(()=>a++),bs(1),Ke(c=>a===s.size?A(r):Dt))})}function Zg(t){let e=t.children.map(r=>Zg(r)).flat();return[t,...e]}function NI(t,e,r,n){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!jg(i)&&(o[Yc]=i.title),RI(o,t,e,n).pipe(Z(s=>(t._resolvedData=s,t.data=j6(t,t.parent,r).resolve,null)))}function RI(t,e,r,n){let i=v6(t);if(i.length===0)return A({});let o={};return Le(i).pipe(Ke(s=>LI(t[s],e,r,n).pipe(hr(),Fe(a=>{o[s]=a}))),bs(1),eo(o),En(s=>Wg(s)?Dt:vi(s)))}function LI(t,e,r,n){let i=Bc(e)??n,o=aa(t,i),s=o.resolve?o.resolve(e,r):Mr(i,()=>o(e,r));return Ri(s)}function m6(t){return Ze(e=>{let r=t(e);return r?Le(r).pipe(Z(()=>e)):A(e)})}var Qg=(()=>{let e=class e{buildTitle(n){let i,o=n.root;for(;o!==void 0;)i=this.getResolvedTitleForRoute(o)??i,o=o.children.find(s=>s.outlet===ve);return i}getResolvedTitleForRoute(n){return n.data[Yc]}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(HI),providedIn:"root"});let t=e;return t})(),HI=(()=>{let e=class e extends Qg{constructor(n){super(),this.title=n}updateTitle(n){let i=this.buildTitle(n);i!==void 0&&this.title.setTitle(i)}};e.\u0275fac=function(i){return new(i||e)(g(xc))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),$c=new E("",{providedIn:"root",factory:()=>({})}),Vc=new E("ROUTES"),q6=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=w(m4)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return A(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let i=Ri(n.loadComponent()).pipe(Z(Xg),Fe(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),un(()=>{this.componentLoaders.delete(n)})),o=new lr(i,()=>new S).pipe(ds());return this.componentLoaders.set(n,o),o}loadChildren(n,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return A({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let s=VI(i,this.compiler,n,this.onLoadEndListener).pipe(un(()=>{this.childrenLoaders.delete(i)})),a=new lr(s,()=>new S).pipe(ds());return this.childrenLoaders.set(i,a),a}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function VI(t,e,r,n){return Ri(t.loadChildren()).pipe(Z(Xg),Ke(i=>i instanceof tc||Array.isArray(i)?A(i):Le(e.compileModuleAsync(i))),Z(i=>{n&&n(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(r).injector,s=o.get(Vc,[],{optional:!0,self:!0}).flat()),{routes:s.map(U6),injector:o}}))}function YI(t){return t&&typeof t=="object"&&"default"in t}function Xg(t){return YI(t)?t.default:t}var W6=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(jI),providedIn:"root"});let t=e;return t})(),jI=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,i){return n}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Jg=new E(""),e9=new E("");function BI(t,e,r){let n=t.get(e9),i=t.get(V);return t.get(U).runOutsideAngular(()=>{if(!i.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,Promise.resolve();let o,s=new Promise(l=>{o=l}),a=i.startViewTransition(()=>(o(),UI(t))),{onViewTransitionCreated:c}=n;return c&&Mr(t,()=>c({transition:a,from:e,to:r})),s})}function UI(t){return new Promise(e=>{bu(e,{injector:t})})}var r2=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new S,this.transitionAbortSubject=new S,this.configLoader=w(q6),this.environmentInjector=w(qt),this.urlSerializer=w(sa),this.rootContexts=w(jc),this.location=w(ki),this.inputBindingEnabled=w(t2,{optional:!0})!==null,this.titleStrategy=w(Qg),this.options=w($c,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=w(W6),this.createViewTransition=w(Jg,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>A(void 0),this.rootComponentType=null;let n=o=>this.events.next(new x6(o)),i=o=>this.events.next(new S6(o));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let i=++this.navigationId;this.transitions?.next(ke(b(b({},this.transitions.value),n),{id:i}))}setupNavigations(n,i,o){return this.transitions=new Re({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Ic,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ge(s=>s.id!==0),Z(s=>ke(b({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Ze(s=>{this.currentTransition=s;let a=!1,c=!1;return A(s).pipe(Fe(l=>{this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?ke(b({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Ze(l=>{let u=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=l.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!u&&d!=="reload"){let h="";return this.events.next(new Ni(l.id,this.urlSerializer.serialize(l.rawUrl),h,q4.IgnoredSameUrlNavigation)),l.resolve(null),Dt}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return A(l).pipe(Ze(h=>{let f=this.transitions?.getValue();return this.events.next(new ia(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),f!==this.transitions?.getValue()?Dt:Promise.resolve(h)}),AI(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Fe(h=>{s.targetSnapshot=h.targetSnapshot,s.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation=ke(b({},this.currentNavigation),{finalUrl:h.urlAfterRedirects});let f=new W4(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(f)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:h,extractedUrl:f,source:p,restoredState:y,extras:v}=l,M=new ia(h,this.urlSerializer.serialize(f),p,y);this.events.next(M);let P=Vg(this.rootComponentType).snapshot;return this.currentTransition=s=ke(b({},l),{targetSnapshot:P,urlAfterRedirects:f,extras:ke(b({},v),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=f,A(s)}else{let h="";return this.events.next(new Ni(l.id,this.urlSerializer.serialize(l.extractedUrl),h,q4.IgnoredByUrlHandlingStrategy)),l.resolve(null),Dt}}),Fe(l=>{let u=new _6(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),Z(l=>(this.currentTransition=s=ke(b({},l),{guards:Xz(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),s)),cI(this.environmentInjector,l=>this.events.next(l)),Fe(l=>{if(s.guardsResult=l.guardsResult,ra(l.guardsResult))throw Ug(this.urlSerializer,l.guardsResult);let u=new C6(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(u)}),ge(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",Fn.GuardRejected),!1)),m6(l=>{if(l.guards.canActivateChecks.length)return A(l).pipe(Fe(u=>{let d=new M6(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}),Ze(u=>{let d=!1;return A(u).pipe(FI(this.paramsInheritanceStrategy,this.environmentInjector),Fe({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(u,"",Fn.NoDataFromResolver)}}))}),Fe(u=>{let d=new D6(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}))}),m6(l=>{let u=d=>{let h=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&h.push(this.configLoader.loadComponent(d.routeConfig).pipe(Fe(f=>{d.component=f}),Z(()=>{})));for(let f of d.children)h.push(...u(f));return h};return Ji(u(l.targetSnapshot.root)).pipe(bi(null),ze(1))}),m6(()=>this.afterPreactivation()),Ze(()=>{let{currentSnapshot:l,targetSnapshot:u}=s,d=this.createViewTransition?.(this.environmentInjector,l.root,u.root);return d?Le(d).pipe(Z(()=>s)):A(s)}),Z(l=>{let u=Uz(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=s=ke(b({},l),{targetRouterState:u}),this.currentNavigation.targetRouterState=u,s}),Fe(()=>{this.events.next(new Fc)}),Qz(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),ze(1),Fe({next:l=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new zr(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{a=!0}}),ce(this.transitionAbortSubject.pipe(Fe(l=>{throw l}))),un(()=>{!a&&!c&&this.cancelNavigationTransition(s,"",Fn.SupersededByNewNavigation),this.currentNavigation?.id===s.id&&(this.currentNavigation=null)}),En(l=>{if(c=!0,qg(l))this.events.next(new Fi(s.id,this.urlSerializer.serialize(s.extractedUrl),l.message,l.cancellationCode)),Wz(l)?this.events.next(new Nc(l.url)):s.resolve(!1);else{this.events.next(new Ac(s.id,this.urlSerializer.serialize(s.extractedUrl),l,s.targetSnapshot??void 0));try{s.resolve(n.errorHandler(l))}catch(u){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(u)}}return Dt}))}))}cancelNavigationTransition(n,i,o){let s=new Fi(n.id,this.urlSerializer.serialize(n.extractedUrl),i,o);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function $I(t){return t!==Ic}var qI=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(WI),providedIn:"root"});let t=e;return t})(),Y6=class{shouldDetach(e){return!1}store(e,r){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,r){return e.routeConfig===r.routeConfig}},WI=(()=>{let e=class e extends Y6{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ls(e)))(o||e)}})(),e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),t9=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(GI),providedIn:"root"});let t=e;return t})(),GI=(()=>{let e=class e extends t9{constructor(){super(...arguments),this.location=w(ki),this.urlSerializer=w(sa),this.options=w($c,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=w(W6),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Ai,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Vg(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(i=>{i.type==="popstate"&&n(i.url,i.state)})}handleRouterEvent(n,i){if(n instanceof ia)this.stateMemento=this.createStateMemento();else if(n instanceof Ni)this.rawUrlTree=i.initialUrl;else if(n instanceof W4){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(o,i)}}else n instanceof Fc?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):n instanceof Fi&&(n.code===Fn.GuardRejected||n.code===Fn.NoDataFromResolver)?this.restoreHistory(i):n instanceof Ac?this.restoreHistory(i,!0):n instanceof zr&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,i){let o=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(o)||i.extras.replaceUrl){let s=this.browserPageId,a=b(b({},i.extras.state),this.generateNgRouterState(i.id,s));this.location.replaceState(o,"",a)}else{let s=b(b({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(n,i=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,i){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:i}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ls(e)))(o||e)}})(),e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ec=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(Ec||{});function n9(t,e){t.events.pipe(ge(r=>r instanceof zr||r instanceof Fi||r instanceof Ac||r instanceof Ni),Z(r=>r instanceof zr||r instanceof Ni?Ec.COMPLETE:(r instanceof Fi?r.code===Fn.Redirect||r.code===Fn.SupersededByNewNavigation:!1)?Ec.REDIRECTING:Ec.FAILED),ge(r=>r!==Ec.REDIRECTING),ze(1)).subscribe(()=>{e()})}function KI(t){throw t}var ZI={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},QI={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ir=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=w(p4),this.stateManager=w(t9),this.options=w($c,{optional:!0})||{},this.pendingTasks=w(Ws),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=w(r2),this.urlSerializer=w(sa),this.location=w(ki),this.urlHandlingStrategy=w(W6),this._events=new S,this.errorHandler=this.options.errorHandler||KI,this.navigated=!1,this.routeReuseStrategy=w(qI),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=w(Vc,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!w(t2,{optional:!0}),this.eventsSubscription=new ye,this.isNgZoneEnabled=w(U)instanceof U&&U.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(i=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(i,s),i instanceof Fi&&i.code!==Fn.Redirect&&i.code!==Fn.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof zr)this.navigated=!0;else if(i instanceof Nc){let a=this.urlHandlingStrategy.merge(i.url,o.currentRawUrl),c={info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||$I(o.source)};this.scheduleNavigation(a,Ic,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}JI(i)&&this._events.next(i)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ic,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",i)},0)})}navigateToSyncWithBrowser(n,i,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let l=b({},o);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(s.state=l)}let c=this.parseUrl(n);this.scheduleNavigation(c,i,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(U6),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,i={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:l}=i,u=l?this.currentUrlTree.fragment:a,d=null;switch(c){case"merge":d=b(b({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let h;try{let f=o?o.snapshot:this.routerState.snapshot.root;h=Ng(f)}catch{(typeof n[0]!="string"||!n[0].startsWith("/"))&&(n=[]),h=this.currentUrlTree.root}return Rg(h,n,d,u??null)}navigateByUrl(n,i={skipLocationChange:!1}){let o=ra(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,Ic,null,i)}navigate(n,i={skipLocationChange:!1}){return XI(n),this.navigateByUrl(this.createUrlTree(n,i),i)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,i){let o;if(i===!0?o=b({},ZI):i===!1?o=b({},QI):o=i,ra(n))return wg(this.currentUrlTree,n,o);let s=this.parseUrl(n);return wg(this.currentUrlTree,s,o)}removeEmptyProps(n){return Object.entries(n).reduce((i,[o,s])=>(s!=null&&(i[o]=s),i),{})}scheduleNavigation(n,i,o,s,a){if(this.disposed)return Promise.resolve(!1);let c,l,u;a?(c=a.resolve,l=a.reject,u=a.promise):u=new Promise((h,f)=>{c=h,l=f});let d=this.pendingTasks.add();return n9(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(h=>Promise.reject(h))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function XI(t){for(let e=0;e{let e=class e{constructor(n,i,o,s,a,c){this.router=n,this.route=i,this.tabIndexAttribute=o,this.renderer=s,this.el=a,this.locationStrategy=c,this.href=null,this.commands=null,this.onChanges=new S,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let l=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=l==="a"||l==="area",this.isAnchorElement?this.subscription=n.events.subscribe(u=>{u instanceof zr&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){n!=null?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,i,o,s,a){if(this.urlTree===null||this.isAnchorElement&&(n!==0||i||o||s||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(this.urlTree,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=this.urlTree!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;let n=this.href===null?null:Im(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(n,i){let o=this.renderer,s=this.el.nativeElement;i!==null?o.setAttribute(s,n,i):o.removeAttribute(s,n)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};e.\u0275fac=function(i){return new(i||e)(m(ir),m(Ir),Z8("tabindex"),m(st),m(oe),m(Tr))},e.\u0275dir=ne({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(i,o){i&1&&Pt("click",function(a){return o.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),i&2&&kn("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[W.HasDecoratorInputTransform,"preserveFragment","preserveFragment",ut],skipLocationChange:[W.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",ut],replaceUrl:[W.HasDecoratorInputTransform,"replaceUrl","replaceUrl",ut],routerLink:"routerLink"},standalone:!0,features:[rn,He]});let t=e;return t})();var e2=class{};var ek=(()=>{let e=class e{constructor(n,i,o,s,a){this.router=n,this.injector=o,this.preloadingStrategy=s,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(ge(n=>n instanceof zr),Vr(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,i){let o=[];for(let s of i){s.providers&&!s._injector&&(s._injector=h4(s.providers,n,`Route: ${s.path}`));let a=s._injector??n,c=s._loadedInjector??a;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&o.push(this.preloadConfig(a,s)),(s.children||s._loadedRoutes)&&o.push(this.processRoutes(c,s.children??s._loadedRoutes))}return Le(o).pipe(yi())}preloadConfig(n,i){return this.preloadingStrategy.preload(i,()=>{let o;i.loadChildren&&i.canLoad===void 0?o=this.loader.loadChildren(n,i):o=A(null);let s=o.pipe(Ke(a=>a===null?A(void 0):(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,this.processRoutes(a.injector??n,a.routes))));if(i.loadComponent&&!i._loadedComponent){let a=this.loader.loadComponent(i);return Le([s,a]).pipe(yi())}else return s})}};e.\u0275fac=function(i){return new(i||e)(g(ir),g(m4),g(qt),g(e2),g(q6))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),G6=new E(""),r9=(()=>{let e=class e{constructor(n,i,o,s,a={}){this.urlSerializer=n,this.transitions=i,this.viewportScroller=o,this.zone=s,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof ia?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof zr?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Ni&&n.code===q4.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof G4&&(n.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new G4(n,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};e.\u0275fac=function(i){n4()},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function hZ(t,...e){return Wt([{provide:Vc,multi:!0,useValue:t},[],{provide:Ir,useFactory:i9,deps:[ir]},{provide:uc,multi:!0,useFactory:o9},e.map(r=>r.\u0275providers)])}function i9(t){return t.routerState.root}function So(t,e){return{\u0275kind:t,\u0275providers:e}}function fZ(t={}){return So(4,[{provide:G6,useFactory:()=>{let r=w(Qu),n=w(U),i=w(r2),o=w(sa);return new r9(o,i,r,n,t)}}])}function o9(){let t=w(Ue);return e=>{let r=t.get(xr);if(e!==r.components[0])return;let n=t.get(ir),i=t.get(s9);t.get(K6)===1&&n.initialNavigation(),t.get(a9,null,be.Optional)?.setUpPreloading(),t.get(G6,null,be.Optional)?.init(),n.resetRootComponentType(r.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var s9=new E("",{factory:()=>new S}),K6=new E("",{providedIn:"root",factory:()=>1});function tk(){return So(2,[{provide:K6,useValue:0},{provide:g4,multi:!0,deps:[Ue],useFactory:e=>{let r=e.get(U7,Promise.resolve());return()=>r.then(()=>new Promise(n=>{let i=e.get(ir),o=e.get(s9);n9(i,()=>{n(!0)}),e.get(r2).afterPreactivation=()=>(n(!0),o.closed?A(void 0):o),i.initialNavigation()}))}}])}function nk(){return So(3,[{provide:g4,multi:!0,useFactory:()=>{let e=w(ir);return()=>{e.setUpLocationChangeListener()}}},{provide:K6,useValue:2}])}var a9=new E("");function rk(t){return So(0,[{provide:a9,useExisting:ek},{provide:e2,useExisting:t}])}function pZ(){return So(6,[{provide:Tr,useClass:qu}])}function ik(){return So(8,[Mg,{provide:t2,useExisting:Mg}])}function ok(t){let e=[{provide:Jg,useValue:BI},{provide:e9,useValue:b({skipNextTransition:!!t?.skipInitialTransition},t)}];return So(9,e)}var xg=new E("ROUTER_FORROOT_GUARD"),sk=[ki,{provide:sa,useClass:Pc},ir,jc,{provide:Ir,useFactory:i9,deps:[ir]},q6,[]],c9=(()=>{let e=class e{constructor(n){}static forRoot(n,i){return{ngModule:e,providers:[sk,[],{provide:Vc,multi:!0,useValue:n},{provide:xg,useFactory:uk,deps:[[ir,new $r,new Hs]]},{provide:$c,useValue:i||{}},i?.useHash?ck():lk(),ak(),i?.preloadingStrategy?rk(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?dk(i):[],i?.bindToComponentInputs?ik().\u0275providers:[],i?.enableViewTransitions?ok().\u0275providers:[],hk()]}}static forChild(n){return{ngModule:e,providers:[{provide:Vc,multi:!0,useValue:n}]}}};e.\u0275fac=function(i){return new(i||e)(g(xg,8))},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();function ak(){return{provide:G6,useFactory:()=>{let t=w(Qu),e=w(U),r=w($c),n=w(r2),i=w(sa);return r.scrollOffset&&t.setOffset(r.scrollOffset),new r9(i,n,t,e,r)}}}function ck(){return{provide:Tr,useClass:qu}}function lk(){return{provide:Tr,useClass:$u}}function uk(t){return"guarded"}function dk(t){return[t.initialNavigation==="disabled"?nk().\u0275providers:[],t.initialNavigation==="enabledBlocking"?tk().\u0275providers:[]]}var Sg=new E("");function hk(){return[{provide:Sg,useFactory:o9},{provide:uc,multi:!0,useExisting:Sg}]}var y9=u_(v9(),1);function CZ(t,e,r){if(!t||e==null||e.length===0)return r;if(Array.isArray(e)||(e=~e.indexOf(".")?e.split("."):[e]),e.length===1){let i=t[e[0]];return typeof i>"u"?r:i}let n=e.reduce((i,o)=>(i||{})[o],t);return typeof n>"u"?r:n}function fk(t){return(0,y9.default)(!0,{},{_:t})._}function Z6(t,e,...r){if(Array.isArray(t)||typeof t!="object")return t;let n=o=>typeof o=="object",i=(o,s)=>(Object.keys(s).filter(a=>a!=="__proto__"&&Object.prototype.hasOwnProperty.call(s,a)).forEach(a=>{let c=s[a],l=o[a];Array.isArray(l)?o[a]=e?c:[...l,...c]:typeof c=="function"?o[a]=c:c!=null&&n(c)&&l!=null&&n(l)?o[a]=i(l,c):o[a]=fk(c)}),o);return r.filter(o=>o!=null&&n(o)).forEach(o=>i(t,o)),t}function Q6(t,...e){return Z6(t,!1,...e)}var MZ=(()=>{let e=class e{constructor(){this.doc=w(V),this.list={},this.cached={},this._notify=new Re([])}get change(){return this._notify.asObservable().pipe(fr(),ge(n=>n.length!==0))}clear(){this.list={},this.cached={}}attachAttributes(n,i){i!=null&&Object.entries(i).forEach(([o,s])=>{n.setAttribute(o,s)})}load(n){Array.isArray(n)||(n=[n]);let i=[];return n.map(o=>typeof o!="object"?{path:o}:o).forEach(o=>{o.path.endsWith(".js")?i.push(this.loadScript(o.path,o.options)):i.push(this.loadStyle(o.path,o.options))}),Promise.all(i).then(o=>(this._notify.next(o),Promise.resolve(o)))}loadScript(n,i,o){let s=typeof i=="object"?i:{innerContent:i,attributes:o};return new Promise(a=>{if(this.list[n]===!0){a(ke(b({},this.cached[n]),{status:"loading"}));return}this.list[n]=!0;let c=u=>{this.cached[n]=u,a(u),this._notify.next([u])},l=this.doc.createElement("script");l.type="text/javascript",l.src=n,this.attachAttributes(l,s.attributes),s.innerContent&&(l.innerHTML=s.innerContent),l.onload=()=>c({path:n,status:"ok"}),l.onerror=u=>c({path:n,status:"error",error:u}),this.doc.getElementsByTagName("head")[0].appendChild(l)})}loadStyle(n,i,o,s){let a=typeof i=="object"?i:{rel:i,innerContent:o,attributes:s};return new Promise(c=>{if(this.list[n]===!0){c(this.cached[n]);return}this.list[n]=!0;let l=this.doc.createElement("link");l.rel=a.rel??"stylesheet",l.type="text/css",l.href=n,this.attachAttributes(l,a.attributes),a.innerContent&&(l.innerHTML=a.innerContent),this.doc.getElementsByTagName("head")[0].appendChild(l);let u={path:n,status:"ok"};this.cached[n]=u,c(u)})}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var X6=new E("alain-config",{providedIn:"root",factory:pk});function pk(){return{}}var Jr=(()=>{let e=class e{constructor(n){this.config=b({},n)}get(n,i){let o=this.config[n]||{};return i?{[i]:o[i]}:o}merge(n,...i){return Z6({},!0,...i,this.get(n))}attach(n,i,o){Object.assign(n,this.merge(i,o))}attachKey(n,i,o){Object.assign(n,this.get(i,o))}set(n,i){this.config[n]=b(b({},this.config[n]),i)}};e.\u0275fac=function(i){return new(i||e)(g(X6,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function ca(t){t||(nu(ca),t=w(js));let e=new Y(r=>t.onDestroy(r.next.bind(r)));return r=>r.pipe(ce(e))}var mk={guard_url:"/403"},o2=(()=>{let e=class e{get change(){return this.aclChange.asObservable()}get data(){return{full:this.full,roles:this.roles,abilities:this.abilities}}get guard_url(){return this.options.guard_url}constructor(n){this.roles=[],this.abilities=[],this.full=!1,this.aclChange=new Re(null),this.options=n.merge("acl",mk)}parseACLType(n){let i;return typeof n=="number"?i={ability:[n]}:Array.isArray(n)&&n.length>0&&typeof n[0]=="number"?i={ability:n}:typeof n=="object"&&!Array.isArray(n)?i=b({},n):Array.isArray(n)?i={role:n}:i={role:n==null?[]:[n]},b({except:!1},i)}set(n){this.full=!1,this.abilities=[],this.roles=[],this.add(n),this.aclChange.next(n)}setFull(n){this.full=n,this.aclChange.next(n)}setAbility(n){this.set({ability:n})}setRole(n){this.set({role:n})}add(n){n.role&&n.role.length>0&&this.roles.push(...n.role),n.ability&&n.ability.length>0&&this.abilities.push(...n.ability)}attachRole(n){for(let i of n)this.roles.includes(i)||this.roles.push(i);this.aclChange.next(this.data)}attachAbility(n){for(let i of n)this.abilities.includes(i)||this.abilities.push(i);this.aclChange.next(this.data)}removeRole(n){for(let i of n){let o=this.roles.indexOf(i);o!==-1&&this.roles.splice(o,1)}this.aclChange.next(this.data)}removeAbility(n){for(let i of n){let o=this.abilities.indexOf(i);o!==-1&&this.abilities.splice(o,1)}this.aclChange.next(this.data)}can(n){let{preCan:i}=this.options;i&&(n=i(n));let o=this.parseACLType(n),s=!1;return this.full===!0||!n?s=!0:(o.role&&o.role.length>0&&(o.mode==="allOf"?s=o.role.every(a=>this.roles.includes(a)):s=o.role.some(a=>this.roles.includes(a))),o.ability&&o.ability.length>0&&(o.mode==="allOf"?s=o.ability.every(a=>this.abilities.includes(a)):s=o.ability.some(a=>this.abilities.includes(a)))),o.except===!0?!s:s}parseAbility(n){return(typeof n=="number"||typeof n=="string"||Array.isArray(n))&&(n={ability:Array.isArray(n)?n:[n]}),delete n.role,n}canAbility(n){return this.can(this.parseAbility(n))}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var GZ=(()=>{let e=class e{set acl(n){this.set(n)}set ability(n){this.set(this.srv.parseAbility(n))}set(n){this._value=n;let i="acl__hide",o=this.el;this.srv.can(this._value)?this.renderer.removeClass(o,i):this.renderer.addClass(o,i)}constructor(){this.el=w(oe).nativeElement,this.renderer=w(st),this.srv=w(o2),this.change$=this.srv.change.pipe(ca(),ge(n=>n!=null)).subscribe(()=>this.set(this._value))}ngOnDestroy(){this.change$.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["","acl",""]],inputs:{acl:"acl",ability:[W.None,"acl-ability","ability"]},exportAs:["acl"],standalone:!0});let t=e;return t})();var KZ=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[gc]});let t=e;return t})();function Ct(t,e){gk(t)&&(t="100%");var r=vk(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function qc(t){return Math.min(1,Math.max(0,t))}function gk(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function vk(t){return typeof t=="string"&&t.indexOf("%")!==-1}function s2(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Wc(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Li(t){return t.length===1?"0"+t:String(t)}function b9(t,e,r){return{r:Ct(t,255)*255,g:Ct(e,255)*255,b:Ct(r,255)*255}}function ed(t,e,r){t=Ct(t,255),e=Ct(e,255),r=Ct(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,s=0,a=(n+i)/2;if(n===i)s=0,o=0;else{var c=n-i;switch(s=a>.5?c/(2-n-i):c/(n+i),n){case t:o=(e-r)/c+(e1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function _9(t,e,r){var n,i,o;if(t=Ct(t,360),e=Ct(e,100),r=Ct(r,100),e===0)i=r,o=r,n=r;else{var s=r<.5?r*(1+e):r+e-r*e,a=2*r-s;n=J6(a,s,t+1/3),i=J6(a,s,t),o=J6(a,s,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function To(t,e,r){t=Ct(t,255),e=Ct(e,255),r=Ct(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,s=n,a=n-i,c=n===0?0:a/n;if(n===i)o=0;else{switch(n){case t:o=(e-r)/a+(e>16,g:(t&65280)>>8,b:t&255}}var Gc={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function an(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=_k(t)),typeof t=="object"&&(ei(t.r)&&ei(t.g)&&ei(t.b)?(e=b9(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):ei(t.h)&&ei(t.s)&&ei(t.v)?(n=Wc(t.s),i=Wc(t.v),e=C9(t.h,n,i),s=!0,a="hsv"):ei(t.h)&&ei(t.s)&&ei(t.l)&&(n=Wc(t.s),o=Wc(t.l),e=_9(t.h,n,o),s=!0,a="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=s2(r),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var wk="[-\\+]?\\d+%?",bk="[-\\+]?\\d*\\.\\d+%?",Hi="(?:".concat(bk,")|(?:").concat(wk,")"),nd="[\\s|\\(]+(".concat(Hi,")[,|\\s]+(").concat(Hi,")[,|\\s]+(").concat(Hi,")\\s*\\)?"),rd="[\\s|\\(]+(".concat(Hi,")[,|\\s]+(").concat(Hi,")[,|\\s]+(").concat(Hi,")[,|\\s]+(").concat(Hi,")\\s*\\)?"),or={CSS_UNIT:new RegExp(Hi),rgb:new RegExp("rgb"+nd),rgba:new RegExp("rgba"+rd),hsl:new RegExp("hsl"+nd),hsla:new RegExp("hsla"+rd),hsv:new RegExp("hsv"+nd),hsva:new RegExp("hsva"+rd),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function _k(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(Gc[t])t=Gc[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=or.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=or.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=or.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=or.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=or.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=or.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=or.hex8.exec(t),r?{r:sn(r[1]),g:sn(r[2]),b:sn(r[3]),a:td(r[4]),format:e?"name":"hex8"}:(r=or.hex6.exec(t),r?{r:sn(r[1]),g:sn(r[2]),b:sn(r[3]),format:e?"name":"hex"}:(r=or.hex4.exec(t),r?{r:sn(r[1]+r[1]),g:sn(r[2]+r[2]),b:sn(r[3]+r[3]),a:td(r[4]+r[4]),format:e?"name":"hex8"}:(r=or.hex3.exec(t),r?{r:sn(r[1]+r[1]),g:sn(r[2]+r[2]),b:sn(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function ei(t){return!!or.CSS_UNIT.exec(String(t))}var a2=function(){function t(e,r){e===void 0&&(e=""),r===void 0&&(r={});var n;if(e instanceof t)return e;typeof e=="number"&&(e=D9(e)),this.originalInput=e;var i=an(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),r,n,i,o=e.r/255,s=e.g/255,a=e.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=s2(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=To(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=To(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=ed(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=ed(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),Eo(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),M9(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(r,", ").concat(n,")"):"rgba(".concat(e,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(r){return"".concat(Math.round(Ct(r,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(r){return Math.round(Ct(r,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Eo(this.r,this.g,this.b,!1),r=0,n=Object.entries(Gc);r=0,o=!r&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=qc(r.l),new t(r)},t.prototype.brighten=function(e){e===void 0&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),new t(r)},t.prototype.darken=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=qc(r.l),new t(r)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=qc(r.s),new t(r)},t.prototype.saturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=qc(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,new t(r)},t.prototype.mix=function(e,r){r===void 0&&(r=50);var n=this.toRgb(),i=new t(e).toRgb(),o=r/100,s={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new t(s)},t.prototype.analogous=function(e,r){e===void 0&&(e=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(new t(n));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,s=[],a=1/e;e--;)s.push(new t({h:n,s:i,v:o})),o=(o+a)%1;return s},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),n=new t(e).toRgb(),i=r.a+n.a*(1-r.a);return new t({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),n=r.h,i=[this],o=360/e,s=1;s=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-c2*e:Math.round(t.h)+c2*e:n=r?Math.round(t.h)+c2*e:Math.round(t.h)-c2*e,n<0?n+=360:n>=360&&(n-=360),n}function E9(t,e,r){if(t.h===0&&t.s===0)return t.s;let n;return r?n=t.s-x9*e:e===k9?n=t.s+x9:n=t.s+Dk*e,n>1&&(n=1),r&&e===I9&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function z9(t,e,r){let n;return r?n=t.v+xk*e:n=t.v-Sk*e,n>1&&(n=1),Number(n.toFixed(2))}function id(t,e={}){let r=[],n=an(t);for(let i=I9;i>0;i-=1){let o=S9(n),s=l2(an({h:T9(o,i,!0),s:E9(o,i,!0),v:z9(o,i,!0)}));r.push(s)}r.push(l2(n));for(let i=1;i<=k9;i+=1){let o=S9(n),s=l2(an({h:T9(o,i),s:E9(o,i),v:z9(o,i)}));r.push(s)}return e.theme==="dark"?Tk.map(({index:i,opacity:o})=>l2(Ek(an(e.backgroundColor||"#141414"),an(r[i]),o*100))):r}var P9={isTestMode:!1};var O9={},zk="[NG-ZORRO]:";function Ik(...t){let e=t.reduce((r,n)=>r+n.toString(),"");return O9[e]?!1:(O9[e]=!0,!0)}function kk(t,...e){(P9.isTestMode||v4()&&Ik(...e))&&t(...e)}var Cn=(...t)=>kk((...e)=>console.warn(zk,...e),...t);function A9(t){return t!=null&&`${t}`!="false"}function ti(t,e=0){return od(t)?Number(t):e}function od(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function zo(t){return Array.isArray(t)?t:[t]}function at(t){return t==null?"":typeof t=="string"?t:`${t}px`}function rt(t){return t instanceof oe?t.nativeElement:t}function xQ(t,e){if(!t||!e||t.length!==e.length)return!1;let r=t.length;for(let n=0;n"u"||t===null}function SQ(t,e){if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;let i=Object.prototype.hasOwnProperty.bind(e);for(let o=0;oAk(e,t))}function L9(t){if(!t.getClientRects().length)return{top:0,left:0};let e=t.getBoundingClientRect(),r=t.ownerDocument.defaultView;return{top:e.top+r.pageYOffset,left:e.left+r.pageXOffset}}function kQ(t){return t.type.startsWith("touch")}function u2(t){return!!t&&typeof t.then=="function"&&typeof t.catch=="function"}function ld(t){return typeof t=="number"&&isFinite(t)}function ud(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function PQ(t){let e=t;if(e.scrollIntoViewIfNeeded){e.scrollIntoViewIfNeeded(!1);return}if(t.scrollIntoView){t.scrollIntoView(!1);return}}var Fk=typeof window<"u",OQ=Fk&&window.mozInnerScreenX!=null;function AQ(t){return t?Object.keys(t).map(e=>{let r=t[e];return`${e}:${typeof r=="string"?r:`${r}px`}`}).join(";"):""}var sd,ad,F9={position:"absolute",top:"-9999px",width:"50px",height:"50px"};function FQ(t="vertical",e="ant"){if(typeof document>"u"||typeof window>"u")return 0;let r=t==="vertical";if(r&&sd)return sd;if(!r&&ad)return ad;let n=document.createElement("div");Object.keys(F9).forEach(o=>{n.style[o]=F9[o]}),n.className=`${e}-hide-scrollbar scroll-div-append-to-body`,r?n.style.overflowY="scroll":n.style.overflowX="scroll",document.body.appendChild(n);let i=0;return r?(i=n.offsetWidth-n.clientWidth,sd=i):(i=n.offsetHeight-n.clientHeight,ad=i),document.body.removeChild(n),i}function NQ(t,e){return t&&tn.tagName==="STYLE"&&n.getAttribute(H9(e))===t)}function V9(t,e,r={}){let n=hd(r);if(!cd.has(n)){let s=N9("",r),{parentNode:a}=s;cd.set(n,a),a.removeChild(s)}let i=Rk(e,r);if(i)return r.cspNonce&&i.nonce!==r.cspNonce&&(i.nonce=r.cspNonce),i.innerHTML!==t&&(i.innerHTML=t),i;let o=N9(t,r);return o?.setAttribute(H9(r),e),o}function LQ(t,e,r){return{[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:r}}var U9=new E("nz-config");function ZQ(t){return Wt([{provide:U9,useValue:t}])}var Lk=`-ant-${Date.now()}-${Math.random()}`;function Hk(t,e){let r={},n=(s,a)=>{let c=s.clone();return c=a?.(c)||c,c.toRgbString()},i=(s,a)=>{let c=new a2(s),l=id(c.toRgbString());r[`${a}-color`]=n(c),r[`${a}-color-disabled`]=l[1],r[`${a}-color-hover`]=l[4],r[`${a}-color-active`]=l[7],r[`${a}-color-outline`]=c.clone().setAlpha(.2).toRgbString(),r[`${a}-color-deprecated-bg`]=l[1],r[`${a}-color-deprecated-border`]=l[3]};if(e.primaryColor){i(e.primaryColor,"primary");let s=new a2(e.primaryColor),a=id(s.toRgbString());a.forEach((l,u)=>{r[`primary-${u+1}`]=l}),r["primary-color-deprecated-l-35"]=n(s,l=>l.lighten(35)),r["primary-color-deprecated-l-20"]=n(s,l=>l.lighten(20)),r["primary-color-deprecated-t-20"]=n(s,l=>l.tint(20)),r["primary-color-deprecated-t-50"]=n(s,l=>l.tint(50)),r["primary-color-deprecated-f-12"]=n(s,l=>l.setAlpha(l.getAlpha()*.12));let c=new a2(a[0]);r["primary-color-active-deprecated-f-30"]=n(c,l=>l.setAlpha(l.getAlpha()*.3)),r["primary-color-active-deprecated-d-02"]=n(c,l=>l.darken(2))}return e.successColor&&i(e.successColor,"success"),e.warningColor&&i(e.warningColor,"warning"),e.errorColor&&i(e.errorColor,"error"),e.infoColor&&i(e.infoColor,"info"),` + `)}`}function rc(t){return{toString:t}.toString()}var ap=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(ap||{}),vr=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(vr||{}),Ts={},Jt=[],W=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(W||{});function cp(t,e,r){let n=t.length;for(;;){let i=t.indexOf(e,r);if(i===-1)return i;if(i===0||t.charCodeAt(i-1)<=32){let o=e.length;if(i+o===n||t.charCodeAt(i+o)<=32)return i}r=i+1}}function I0(t,e,r){let n=0;for(;ne){s=o-1;break}}}for(;oo?h="":h=i[d+1].toLowerCase();let f=n&8?h:null;if(f&&cp(f,l,0)!==-1||n&2&&l!==h){if(Zn(n))return!1;s=!0}}}}return Zn(n)||s}function Zn(t){return(t&1)===0}function zC(t,e,r,n){if(e===null)return-1;let i=0;if(n||!r){let o=!1;for(;i-1)for(r++;r0?'="'+a+'"':"")+"]"}else n&8?i+="."+s:n&4&&(i+=" "+s);else i!==""&&!Zn(s)&&(e+=g5(o,i),i=""),n=s,o=o||!Zn(n);r++}return i!==""&&(e+=g5(o,i)),e}function FC(t){return t.map(AC).join(",")}function NC(t){let e=[],r=[],n=1,i=2;for(;n{let e=vp(t),r=ke(b({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===ap.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||vr.Emulated,styles:t.styles||Jt,_:null,schemas:t.schemas||null,tView:null,id:""});yp(r);let n=t.dependencies;return r.directiveDefs=y5(n,!1),r.pipeDefs=y5(n,!0),r.id=HC(r),r})}function RC(t){return Mi(t)||fp(t)}function LC(t){return t!==null}function te(t){return rc(()=>({type:t.type,bootstrap:t.bootstrap||Jt,declarations:t.declarations||Jt,imports:t.imports||Jt,exports:t.exports||Jt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function v5(t,e){if(t==null)return Ts;let r={};for(let n in t)if(t.hasOwnProperty(n)){let i=t[n],o,s,a=W.None;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o):(o=i,s=i),e?(r[o]=a!==W.None?[n,a]:n,e[o]=s):r[o]=n}return r}function ne(t){return rc(()=>{let e=vp(t);return yp(e),e})}function en(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone===!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function Mi(t){return t[sC]||null}function fp(t){return t[aC]||null}function pp(t){return t[cC]||null}function mp(t){let e=Mi(t)||fp(t)||pp(t);return e!==null?e.standalone:!1}function gp(t,e){let r=t[lC]||null;if(!r&&e===!0)throw new Error(`Type ${$t(t)} does not have '\u0275mod' property.`);return r}function vp(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:t.inputs||Ts,exportAs:t.exportAs||null,standalone:t.standalone===!0,signals:t.signals===!0,selectors:t.selectors||Jt,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:v5(t.inputs,e),outputs:v5(t.outputs),debugInfo:null}}function yp(t){t.features?.forEach(e=>e(t))}function y5(t,e){if(!t)return null;let r=e?pp:RC;return()=>(typeof t=="function"?t():t).map(n=>r(n)).filter(LC)}function HC(t){let e=0,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(let i of r)e=Math.imul(31,e)+i.charCodeAt(0)<<0;return e+=2147483648,"c"+e}var Cr=0,fe=1,ue=2,kt=3,Xn=4,fn=5,Es=6,qa=7,Lt=8,zs=9,yr=10,it=11,Wa=12,w5=13,Rs=14,zn=15,ic=16,_s=17,gr=18,V1=19,wp=20,Ci=21,u0=22,io=23,xt=25,L8=1;var oo=7,y1=8,Is=9,Ht=10,H8=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(H8||{});function no(t){return Array.isArray(t)&&typeof t[L8]=="object"}function Br(t){return Array.isArray(t)&&t[L8]===!0}function V8(t){return(t.flags&4)!==0}function Y1(t){return t.componentOffset>-1}function j1(t){return(t.flags&1)===1}function Yr(t){return!!t.template}function VC(t){return(t[ue]&512)!==0}function so(t,e){let r=t.hasOwnProperty(g1);return r?t[g1]:null}var k0=class{constructor(e,r,n){this.previousValue=e,this.currentValue=r,this.firstChange=n}isFirstChange(){return this.firstChange}};function bp(t,e,r,n){e!==null?e.applyValueToInputSignal(e,n):t[r]=n}function He(){return _p}function _p(t){return t.type.prototype.ngOnChanges&&(t.setInput=jC),YC}He.ngInherit=!0;function YC(){let t=Mp(this),e=t?.current;if(e){let r=t.previous;if(r===Ts)t.previous=e;else for(let n in e)r[n]=e[n];t.current=null,this.ngOnChanges(e)}}function jC(t,e,r,n,i){let o=this.declaredInputs[n],s=Mp(t)||BC(t,{previous:Ts,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[o];a[o]=new k0(l&&l.currentValue,r,c===Ts),bp(t,e,i,r)}var Cp="__ngSimpleChanges__";function Mp(t){return t[Cp]||null}function BC(t,e){return t[Cp]=e}var b5=null;var pr=function(t,e,r){b5?.(t,e,r)},Dp="svg",UC="math",$C=!1;function qC(){return $C}function wr(t){for(;Array.isArray(t);)t=t[Cr];return t}function WC(t){for(;Array.isArray(t);){if(typeof t[L8]=="object")return t;t=t[Cr]}return null}function xp(t,e){return wr(e[t])}function In(t,e){return wr(e[t.index])}function Y8(t,e){return t.data[e]}function B1(t,e){return t[e]}function Ti(t,e){let r=e[t];return no(r)?r:r[Cr]}function GC(t){return(t[ue]&4)===4}function j8(t){return(t[ue]&128)===128}function KC(t){return Br(t[kt])}function ks(t,e){return e==null?null:t[e]}function Sp(t){t[_s]=0}function ZC(t){t[ue]&1024||(t[ue]|=1024,j8(t)&&Ga(t))}function QC(t,e){for(;t>0;)e=e[Rs],t--;return e}function Tp(t){return t[ue]&9216||t[io]?.dirty}function P0(t){Tp(t)?Ga(t):t[ue]&64&&(qC()?(t[ue]|=1024,Ga(t)):t[yr].changeDetectionScheduler?.notify())}function Ga(t){t[yr].changeDetectionScheduler?.notify();let e=Ka(t);for(;e!==null&&!(e[ue]&8192||(e[ue]|=8192,!j8(e)));)e=Ka(e)}function Ep(t,e){if((t[ue]&256)===256)throw new z(911,!1);t[Ci]===null&&(t[Ci]=[]),t[Ci].push(e)}function XC(t,e){if(t[Ci]===null)return;let r=t[Ci].indexOf(e);r!==-1&&t[Ci].splice(r,1)}function Ka(t){let e=t[kt];return Br(e)?e[kt]:e}var pe={lFrame:Np(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function JC(){return pe.lFrame.elementDepthCount}function eM(){pe.lFrame.elementDepthCount++}function tM(){pe.lFrame.elementDepthCount--}function zp(){return pe.bindingsEnabled}function Ip(){return pe.skipHydrationRootTNode!==null}function nM(t){return pe.skipHydrationRootTNode===t}function rM(){pe.skipHydrationRootTNode=null}function ie(){return pe.lFrame.lView}function ot(){return pe.lFrame.tView}function pn(t){return pe.lFrame.contextLView=t,t[Lt]}function mn(t){return pe.lFrame.contextLView=null,t}function Vt(){let t=kp();for(;t!==null&&t.type===64;)t=t.parent;return t}function kp(){return pe.lFrame.currentTNode}function iM(){let t=pe.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function po(t,e){let r=pe.lFrame;r.currentTNode=t,r.isParent=e}function B8(){return pe.lFrame.isParent}function U8(){pe.lFrame.isParent=!1}function oM(){return pe.lFrame.contextLView}function mo(){let t=pe.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Pp(){return pe.lFrame.bindingIndex}function sM(t){return pe.lFrame.bindingIndex=t}function go(){return pe.lFrame.bindingIndex++}function U1(t){let e=pe.lFrame,r=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,r}function aM(){return pe.lFrame.inI18n}function cM(t,e){let r=pe.lFrame;r.bindingIndex=r.bindingRootIndex=t,O0(e)}function lM(){return pe.lFrame.currentDirectiveIndex}function O0(t){pe.lFrame.currentDirectiveIndex=t}function $8(t){let e=pe.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function Op(){return pe.lFrame.currentQueryIndex}function q8(t){pe.lFrame.currentQueryIndex=t}function uM(t){let e=t[fe];return e.type===2?e.declTNode:e.type===1?t[fn]:null}function Ap(t,e,r){if(r&be.SkipSelf){let i=e,o=t;for(;i=i.parent,i===null&&!(r&be.Host);)if(i=uM(o),i===null||(o=o[Rs],i.type&10))break;if(i===null)return!1;e=i,t=o}let n=pe.lFrame=Fp();return n.currentTNode=e,n.lView=t,!0}function W8(t){let e=Fp(),r=t[fe];pe.lFrame=e,e.currentTNode=r.firstChild,e.lView=t,e.tView=r,e.contextLView=t,e.bindingIndex=r.bindingStartIndex,e.inI18n=!1}function Fp(){let t=pe.lFrame,e=t===null?null:t.child;return e===null?Np(t):e}function Np(t){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:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function Rp(){let t=pe.lFrame;return pe.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Lp=Rp;function G8(){let t=Rp();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function dM(t){return(pe.lFrame.contextLView=QC(t,pe.lFrame.contextLView))[Lt]}function Ur(){return pe.lFrame.selectedIndex}function ao(t){pe.lFrame.selectedIndex=t}function oc(){let t=pe.lFrame;return Y8(t.tView,t.selectedIndex)}function kG(){pe.lFrame.currentNamespace=Dp}function PG(){hM()}function hM(){pe.lFrame.currentNamespace=null}function fM(){return pe.lFrame.currentNamespace}var Hp=!0;function $1(){return Hp}function q1(t){Hp=t}function pM(t,e,r){let{ngOnChanges:n,ngOnInit:i,ngDoCheck:o}=e.type.prototype;if(n){let s=_p(e);(r.preOrderHooks??=[]).push(t,s),(r.preOrderCheckHooks??=[]).push(t,s)}i&&(r.preOrderHooks??=[]).push(0-t,i),o&&((r.preOrderHooks??=[]).push(t,o),(r.preOrderCheckHooks??=[]).push(t,o))}function W1(t,e){for(let r=e.directiveStart,n=e.directiveEnd;r=n)break}else e[c]<0&&(t[_s]+=65536),(a>14>16&&(t[ue]&3)===e&&(t[ue]+=16384,_5(a,o)):_5(a,o)}var Ss=-1,co=class{constructor(e,r,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=n}};function gM(t){return t instanceof co}function vM(t){return(t.flags&8)!==0}function yM(t){return(t.flags&16)!==0}function Yp(t){return t!==Ss}function w1(t){return t&32767}function wM(t){return t>>16}function b1(t,e){let r=wM(t),n=e;for(;r>0;)n=n[Rs],r--;return n}var A0=!0;function _1(t){let e=A0;return A0=t,e}var bM=256,jp=bM-1,Bp=5,_M=0,mr={};function CM(t,e,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(ja)&&(n=r[ja]),n==null&&(n=r[ja]=_M++);let i=n&jp,o=1<>Bp)]|=o}function C1(t,e){let r=Up(t,e);if(r!==-1)return r;let n=e[fe];n.firstCreatePass&&(t.injectorIndex=e.length,h0(n.data,t),h0(e,null),h0(n.blueprint,null));let i=K8(t,e),o=t.injectorIndex;if(Yp(i)){let s=w1(i),a=b1(i,e),c=a[fe].data;for(let l=0;l<8;l++)e[o+l]=a[s+l]|c[s+l]}return e[o+8]=i,o}function h0(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Up(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function K8(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let r=0,n=null,i=e;for(;i!==null;){if(n=Kp(i),n===null)return Ss;if(r++,i=i[Rs],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return Ss}function F0(t,e,r){CM(t,e,r)}function MM(t,e){if(e==="class")return t.classes;if(e==="style")return t.styles;let r=t.attrs;if(r){let n=r.length,i=0;for(;i>20,d=n?a:a+u,h=i?a+u:l;for(let f=d;f=c&&p.type===r)return f}if(i){let f=s[c];if(f&&Yr(f)&&f.type===r)return c}return null}function lo(t,e,r,n){let i=t[r],o=e.data;if(gM(i)){let s=i;s.resolving&&dC(uC(o[r]));let a=_1(s.canSeeViewProviders);s.resolving=!0;let c,l=s.injectImpl?Xt(s.injectImpl):null,u=Ap(t,n,be.Default);try{i=t[r]=s.factory(void 0,o,t,n),e.firstCreatePass&&r>=n.directiveStart&&pM(r,o[r],e)}finally{l!==null&&Xt(l),_1(a),s.resolving=!1,Lp()}}return i}function xM(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(ja)?t[ja]:void 0;return typeof e=="number"?e>=0?e&jp:SM:e}function C5(t,e,r){let n=1<>Bp)]&n)}function M5(t,e){return!(t&be.Self)&&!(t&be.Host&&e)}var ro=class{constructor(e,r){this._tNode=e,this._lView=r}get(e,r,n){return Wp(this._tNode,this._lView,e,H1(n),r)}};function SM(){return new ro(Vt(),ie())}function Ls(t){return rc(()=>{let e=t.prototype.constructor,r=e[g1]||N0(e),n=Object.prototype,i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==n;){let o=i[g1]||N0(i);if(o&&o!==r)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function N0(t){return ep(t)?()=>{let e=N0(Ut(t));return e&&e()}:so(t)}function TM(t,e,r,n,i){let o=t,s=e;for(;o!==null&&s!==null&&s[ue]&2048&&!(s[ue]&512);){let a=Gp(o,s,r,n|be.Self,mr);if(a!==mr)return a;let c=o.parent;if(!c){let l=s[wp];if(l){let u=l.get(r,mr,n);if(u!==mr)return u}c=Kp(s),s=s[Rs]}o=c}return i}function Kp(t){let e=t[fe],r=e.type;return r===2?e.declTNode:r===1?t[fn]:null}function Z8(t){return MM(Vt(),t)}var i1="__parameters__";function EM(t){return function(...r){if(t){let n=t(...r);for(let i in n)this[i]=n[i]}}}function Q8(t,e,r){return rc(()=>{let n=EM(e);function i(...o){if(this instanceof i)return n.apply(this,o),this;let s=new i(...o);return a.annotation=s,a;function a(c,l,u){let d=c.hasOwnProperty(i1)?c[i1]:Object.defineProperty(c,i1,{value:[]})[i1];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),c}}return r&&(i.prototype=Object.create(r.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i})}var Zp=Function;function zM(t){return typeof t=="function"}function IM(t,e,r){if(t.length!==e.length)return!1;for(let n=0;nArray.isArray(r)?X8(r,e):e(r))}function Qp(t,e,r){e>=t.length?t.push(r):t.splice(e,0,r)}function M1(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function PM(t,e){let r=[];for(let n=0;ne;){let o=i-2;t[i]=t[o],i--}t[e]=r,t[e+1]=n}}function vo(t,e,r){let n=sc(t,e);return n>=0?t[n|1]=r:(n=~n,OM(t,n,e,r)),n}function f0(t,e){let r=sc(t,e);if(r>=0)return t[r|1]}function sc(t,e){return AM(t,e,1)}function AM(t,e,r){let n=0,i=t.length>>r;for(;i!==n;){let o=n+(i-n>>1),s=t[o<e?i=o:n=o+1}return~(i<({token:t})),-1),$r=R8(Q8("Optional"),8);var Hs=R8(Q8("SkipSelf"),4);var Di=new E("ENVIRONMENT_INITIALIZER"),Jp=new E("INJECTOR",-1),em=new E("INJECTOR_DEF_TYPES"),D1=class{get(e,r=Ua){if(r===Ua){let n=new Error(`NullInjectorError: No provider for ${$t(e)}!`);throw n.name="NullInjectorError",n}return r}};function Wt(t){return{\u0275providers:t}}function J8(...t){return{\u0275providers:tm(!0,t),\u0275fromNgModule:!0}}function tm(t,...e){let r=[],n=new Set,i,o=s=>{r.push(s)};return X8(e,s=>{let a=s;R0(a,o,[],n)&&(i||=[],i.push(a))}),i!==void 0&&nm(i,o),r}function nm(t,e){for(let r=0;r{e(o,n)})}}function R0(t,e,r,n){if(t=Ut(t),!t)return!1;let i=null,o=h5(t),s=!o&&Mi(t);if(!o&&!s){let c=t.ngModule;if(o=h5(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=t}let a=n.has(i);if(s){if(a)return!1;if(n.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)R0(l,e,r,n)}}else if(o){if(o.imports!=null&&!a){n.add(i);let l;try{X8(o.imports,u=>{R0(u,e,r,n)&&(l||=[],l.push(u))})}finally{}l!==void 0&&nm(l,e)}if(!a){let l=so(i)||(()=>new i);e({provide:i,useFactory:l,deps:Jt},i),e({provide:em,useValue:i,multi:!0},i),e({provide:Di,useValue:()=>g(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let l=t;eu(c,u=>{e(u,l)})}}else return!1;return i!==t&&t.providers!==void 0}function eu(t,e){for(let r of t)tp(r)&&(r=r.\u0275providers),Array.isArray(r)?eu(r,e):e(r)}var FM=Be({provide:String,useValue:Be});function rm(t){return t!==null&&typeof t=="object"&&FM in t}function NM(t){return!!(t&&t.useExisting)}function RM(t){return!!(t&&t.useFactory)}function Ps(t){return typeof t=="function"}function LM(t){return!!t.useClass}var G1=new E("Set Injector scope."),f1={},HM={},p0;function tu(){return p0===void 0&&(p0=new D1),p0}var qt=class{},Za=class extends qt{get destroyed(){return this._destroyed}constructor(e,r,n,i){super(),this.parent=r,this.source=n,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,H0(e,s=>this.processProvider(s)),this.records.set(Jp,Cs(void 0,this)),i.has("environment")&&this.records.set(qt,Cs(void 0,this));let o=this.records.get(G1);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(em,Jt,be.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of e)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let r=_i(this),n=Xt(void 0),i;try{return e()}finally{_i(r),Xt(n)}}get(e,r=Ua,n=be.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(u5))return e[u5](this);n=H1(n);let i,o=_i(this),s=Xt(void 0);try{if(!(n&be.SkipSelf)){let c=this.records.get(e);if(c===void 0){let l=UM(e)&&L1(e);l&&this.injectableDefInScope(l)?c=Cs(L0(e),f1):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c)}let a=n&be.Self?tu():this.parent;return r=n&be.Optional&&r===Ua?null:r,a.get(e,r)}catch(a){if(a.name==="NullInjectorError"){if((a[v1]=a[v1]||[]).unshift($t(e)),o)throw a;return MC(a,e,"R3InjectorError",this.source)}else throw a}finally{Xt(s),_i(o)}}resolveInjectorInitializers(){let e=_i(this),r=Xt(void 0),n;try{let i=this.get(Di,Jt,be.Self);for(let o of i)o()}finally{_i(e),Xt(r)}}toString(){let e=[],r=this.records;for(let n of r.keys())e.push($t(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new z(205,!1)}processProvider(e){e=Ut(e);let r=Ps(e)?e:Ut(e&&e.provide),n=YM(e);if(!Ps(e)&&e.multi===!0){let i=this.records.get(r);i||(i=Cs(void 0,f1,!0),i.factory=()=>z0(i.multi),this.records.set(r,i)),r=e,i.multi.push(e)}this.records.set(r,n)}hydrate(e,r){return r.value===f1&&(r.value=HM,r.value=r.factory()),typeof r.value=="object"&&r.value&&BM(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}injectableDefInScope(e){if(!e.providedIn)return!1;let r=Ut(e.providedIn);return typeof r=="string"?r==="any"||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(e){let r=this._onDestroyHooks.indexOf(e);r!==-1&&this._onDestroyHooks.splice(r,1)}};function L0(t){let e=L1(t),r=e!==null?e.factory:so(t);if(r!==null)return r;if(t instanceof E)throw new z(204,!1);if(t instanceof Function)return VM(t);throw new z(204,!1)}function VM(t){if(t.length>0)throw new z(204,!1);let r=pC(t);return r!==null?()=>r.factory(t):()=>new t}function YM(t){if(rm(t))return Cs(void 0,t.useValue);{let e=im(t);return Cs(e,f1)}}function im(t,e,r){let n;if(Ps(t)){let i=Ut(t);return so(i)||L0(i)}else if(rm(t))n=()=>Ut(t.useValue);else if(RM(t))n=()=>t.useFactory(...z0(t.deps||[]));else if(NM(t))n=()=>g(Ut(t.useExisting));else{let i=Ut(t&&(t.useClass||t.provide));if(jM(t))n=()=>new i(...z0(t.deps));else return so(i)||L0(i)}return n}function Cs(t,e,r=!1){return{factory:t,value:e,multi:r?[]:void 0}}function jM(t){return!!t.deps}function BM(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function UM(t){return typeof t=="function"||typeof t=="object"&&t instanceof E}function H0(t,e){for(let r of t)Array.isArray(r)?H0(r,e):r&&tp(r)?H0(r.\u0275providers,e):e(r)}function Mr(t,e){t instanceof Za&&t.assertNotDestroyed();let r,n=_i(t),i=Xt(void 0);try{return e()}finally{_i(n),Xt(i)}}function nu(t){if(!op()&&!bC())throw new z(-203,!1)}function D5(t,e=null,r=null,n){let i=om(t,e,r,n);return i.resolveInjectorInitializers(),i}function om(t,e=null,r=null,n,i=new Set){let o=[r||Jt,J8(t)];return n=n||(typeof t=="object"?void 0:$t(t)),new Za(o,e||tu(),n||null,i)}var Ue=(()=>{let e=class e{static create(n,i){if(Array.isArray(n))return D5({name:""},i,n,"");{let o=n.name??"";return D5({name:o},n.parent,n.providers,o)}}};e.THROW_IF_NOT_FOUND=Ua,e.NULL=new D1,e.\u0275prov=C({token:e,providedIn:"any",factory:()=>g(Jp)}),e.__NG_ELEMENT_ID__=-1;let t=e;return t})();var V0;function sm(t){V0=t}function am(){if(V0!==void 0)return V0;if(typeof document<"u")return document;throw new z(210,!1)}var K1=new E("AppId",{providedIn:"root",factory:()=>$M}),$M="ng",ru=new E("Platform Initializer"),Yt=new E("Platform ID",{providedIn:"platform",factory:()=>"unknown"});var gn=new E("AnimationModuleType"),qr=new E("CSP nonce",{providedIn:"root",factory:()=>am().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});function OG(t){return t.ownerDocument.defaultView}function AG(t){return t.ownerDocument}function cm(t){return t instanceof Function?t():t}function qM(t){return(t??w(Ue)).get(Yt)==="browser"}function lm(t){return(t.flags&128)===128}var br=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(br||{}),WM=/^>|^->||--!>|)/g,KM="\u200B$1\u200B";function ZM(t){return t.replace(WM,e=>e.replace(GM,KM))}var um=new Map,QM=0;function XM(){return QM++}function JM(t){um.set(t[V1],t)}function eD(t){um.delete(t[V1])}var x5="__ngContext__";function xi(t,e){no(e)?(t[x5]=e[V1],JM(e)):t[x5]=e}var tD;function iu(t,e){return tD(t,e)}function Ms(t,e,r,n,i){if(n!=null){let o,s=!1;Br(n)?o=n:no(n)&&(s=!0,n=n[Cr]);let a=wr(n);t===0&&r!==null?i==null?mm(e,r,a):x1(e,r,a,i||null,!0):t===1&&r!==null?x1(e,r,a,i||null,!0):t===2?vD(e,a,s):t===3&&e.destroyNode(a),o!=null&&wD(e,t,o,r,i)}}function nD(t,e){return t.createText(e)}function rD(t,e,r){t.setValue(e,r)}function iD(t,e){return t.createComment(ZM(e))}function dm(t,e,r){return t.createElement(e,r)}function oD(t,e){hm(t,e),e[Cr]=null,e[fn]=null}function sD(t,e,r,n,i,o){n[Cr]=i,n[fn]=e,X1(t,n,r,1,i,o)}function hm(t,e){e[yr].changeDetectionScheduler?.notify(),X1(t,e,e[it],2,null,null)}function aD(t){let e=t[Wa];if(!e)return m0(t[fe],t);for(;e;){let r=null;if(no(e))r=e[Wa];else{let n=e[Ht];n&&(r=n)}if(!r){for(;e&&!e[Xn]&&e!==t;)no(e)&&m0(e[fe],e),e=e[kt];e===null&&(e=t),no(e)&&m0(e[fe],e),r=e&&e[Xn]}e=r}}function cD(t,e,r,n){let i=Ht+n,o=r.length;n>0&&(r[i-1][Xn]=e),n0&&(t[r-1][Xn]=n[Xn]);let o=M1(t,Ht+e);oD(n[fe],n);let s=o[gr];s!==null&&s.detachView(o[fe]),n[kt]=null,n[Xn]=null,n[ue]&=-129}return n}function Z1(t,e){if(!(e[ue]&256)){let r=e[it];r.destroyNode&&X1(t,e,r,3,null,null),aD(e)}}function m0(t,e){if(!(e[ue]&256)){e[ue]&=-129,e[ue]|=256,e[io]&&Ef(e[io]),dD(t,e),uD(t,e),e[fe].type===1&&e[it].destroy();let r=e[ic];if(r!==null&&Br(e[kt])){r!==e[kt]&&fm(r,e);let n=e[gr];n!==null&&n.detachView(t)}eD(e)}}function uD(t,e){let r=t.cleanup,n=e[qa];if(r!==null)for(let o=0;o=0?n[s]():n[-s].unsubscribe(),o+=2}else{let s=n[r[o+1]];r[o].call(s)}n!==null&&(e[qa]=null);let i=e[Ci];if(i!==null){e[Ci]=null;for(let o=0;o-1){let{encapsulation:o}=t.data[n.directiveStart+i];if(o===vr.None||o===vr.Emulated)return null}return In(n,r)}}function x1(t,e,r,n,i){t.insertBefore(e,r,n,i)}function mm(t,e,r){t.appendChild(e,r)}function S5(t,e,r,n,i){n!==null?x1(t,e,r,n,i):mm(t,e,r)}function fD(t,e,r,n){t.removeChild(e,r,n)}function ou(t,e){return t.parentNode(e)}function pD(t,e){return t.nextSibling(e)}function gm(t,e,r){return gD(t,e,r)}function mD(t,e,r){return t.type&40?In(t,r):null}var gD=mD,T5;function Q1(t,e,r,n){let i=pm(t,n,e),o=e[it],s=n.parent||e[fn],a=gm(s,n,e);if(i!=null)if(Array.isArray(r))for(let c=0;ct,createScript:t=>t,createScriptURL:t=>t})}catch{}return o1}function J1(t){return CD()?.createHTML(t)||t}var s1;function _m(){if(s1===void 0&&(s1=null,dn.trustedTypes))try{s1=dn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return s1}function E5(t){return _m()?.createHTML(t)||t}function z5(t){return _m()?.createScriptURL(t)||t}var jr=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${J5})`}},j0=class extends jr{getTypeName(){return"HTML"}},B0=class extends jr{getTypeName(){return"Style"}},U0=class extends jr{getTypeName(){return"Script"}},$0=class extends jr{getTypeName(){return"URL"}},q0=class extends jr{getTypeName(){return"ResourceURL"}};function vn(t){return t instanceof jr?t.changingThisBreaksApplicationSecurity:t}function Wr(t,e){let r=MD(t);if(r!=null&&r!==e){if(r==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${r} (see ${J5})`)}return r===e}function MD(t){return t instanceof jr&&t.getTypeName()||null}function Cm(t){return new j0(t)}function Mm(t){return new B0(t)}function Dm(t){return new U0(t)}function xm(t){return new $0(t)}function Sm(t){return new q0(t)}function DD(t){let e=new G0(t);return xD()?new W0(e):e}var W0=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let r=new window.DOMParser().parseFromString(J1(e),"text/html").body;return r===null?this.inertDocumentHelper.getInertBodyElement(e):(r.removeChild(r.firstChild),r)}catch{return null}}},G0=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let r=this.inertDocument.createElement("template");return r.innerHTML=J1(e),r}};function xD(){try{return!!new window.DOMParser().parseFromString(J1(""),"text/html")}catch{return!1}}var SD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function e4(t){return t=String(t),t.match(SD)?t:"unsafe:"+t}function Gr(t){let e={};for(let r of t.split(","))e[r]=!0;return e}function ac(...t){let e={};for(let r of t)for(let n in r)r.hasOwnProperty(n)&&(e[n]=!0);return e}var Tm=Gr("area,br,col,hr,img,wbr"),Em=Gr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),zm=Gr("rp,rt"),TD=ac(zm,Em),ED=ac(Em,Gr("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")),zD=ac(zm,Gr("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")),I5=ac(Tm,ED,zD,TD),Im=Gr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),ID=Gr("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"),kD=Gr("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"),PD=ac(Im,ID,kD),OD=Gr("script,style,template"),K0=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let r=e.firstChild,n=!0;for(;r;){if(r.nodeType===Node.ELEMENT_NODE?n=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,n&&r.firstChild){r=r.firstChild;continue}for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let i=this.checkClobberedElement(r,r.nextSibling);if(i){r=i;break}r=this.checkClobberedElement(r,r.parentNode)}}return this.buf.join("")}startElement(e){let r=e.nodeName.toLowerCase();if(!I5.hasOwnProperty(r))return this.sanitizedSomething=!0,!OD.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);let n=e.attributes;for(let i=0;i"),!0}endElement(e){let r=e.nodeName.toLowerCase();I5.hasOwnProperty(r)&&!Tm.hasOwnProperty(r)&&(this.buf.push(""))}chars(e){this.buf.push(k5(e))}checkClobberedElement(e,r){if(r&&(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return r}},AD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,FD=/([^\#-~ |!])/g;function k5(t){return t.replace(/&/g,"&").replace(AD,function(e){let r=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(FD,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var a1;function au(t,e){let r=null;try{a1=a1||DD(t);let n=e?String(e):"";r=a1.getInertBodyElement(n);let i=5,o=n;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,n=o,o=r.innerHTML,r=a1.getInertBodyElement(n)}while(n!==o);let a=new K0().sanitizeChildren(P5(r)||r);return J1(a)}finally{if(r){let n=P5(r)||r;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function P5(t){return"content"in t&&ND(t)?t.content:null}function ND(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var yn=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(yn||{});function Dr(t){let e=cu();return e?E5(e.sanitize(yn.HTML,t)||""):Wr(t,"HTML")?E5(vn(t)):au(am(),Qn(t))}function RD(t){let e=cu();return e?e.sanitize(yn.URL,t)||"":Wr(t,"URL")?vn(t):e4(Qn(t))}function LD(t){let e=cu();if(e)return z5(e.sanitize(yn.RESOURCE_URL,t)||"");if(Wr(t,"ResourceURL"))return z5(vn(t));throw new z(904,!1)}function HD(t,e){return e==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||e==="href"&&(t==="base"||t==="link")?LD:RD}function km(t,e,r){return HD(e,r)(t)}function cu(){let t=ie();return t&&t[yr].sanitizer}var Z0=class{};var VD="h",YD="b";var jD=()=>null;function lu(t,e,r=!1){return jD(t,e,r)}var Q0=class{},S1=class{};function BD(t){let e=Error(`No component factory found for ${$t(t)}.`);return e[UD]=t,e}var UD="ngComponent";var X0=class{resolveComponentFactory(e){throw BD(e)}},Ei=(()=>{let e=class e{};e.NULL=new X0;let t=e;return t})();function $D(){return Vs(Vt(),ie())}function Vs(t,e){return new oe(In(t,e))}var oe=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=$D;let t=e;return t})();function qD(t){return t instanceof oe?t.nativeElement:t}var Jn=class{},st=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>WD();let t=e;return t})();function WD(){let t=ie(),e=Vt(),r=Ti(e.index,t);return(no(r)?r:t)[it]}var GD=(()=>{let e=class e{};e.\u0275prov=C({token:e,providedIn:"root",factory:()=>null});let t=e;return t})(),g0={};function t4(t){let e=yt(null);try{return t()}finally{yt(e)}}function Pm(t){return uu(t)?Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t:!1}function KD(t,e){if(Array.isArray(t))for(let r=0;re,e8=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||ZD}forEachItem(e){let r;for(r=this._itHead;r!==null;r=r._next)e(r)}forEachOperation(e){let r=this._itHead,n=this._removalsHead,i=0,o=null;for(;r||n;){let s=!n||r&&r.currentIndex{s=this._trackByFn(i,a),r===null||!Object.is(r.trackById,s)?(r=this._mismatch(r,a,s,i),n=!0):(n&&(r=this._verifyReinsertion(r,a,s,i)),Object.is(r.item,a)||this._addIdentityChange(r,a)),r=r._next,i++}),this.length=i;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,r,n,i){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._reinsertAfter(e,o,i)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,i),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._moveAfter(e,o,i)):e=this._addAfter(new t8(r,n),o,i)),e}_verifyReinsertion(e,r,n,i){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return o!==null?e=this._reinsertAfter(o,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;e!==null;){let r=e._next;this._addToRemovals(this._unlink(e)),e=r}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,r,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let i=e._prevRemoved,o=e._nextRemoved;return i===null?this._removalsHead=o:i._nextRemoved=o,o===null?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(e,r,n),this._addToMoves(e,n),e}_moveAfter(e,r,n){return this._unlink(e),this._insertAfter(e,r,n),this._addToMoves(e,n),e}_addAfter(e,r,n){return this._insertAfter(e,r,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,r,n){let i=r===null?this._itHead:r._next;return e._next=i,e._prev=r,i===null?this._itTail=e:i._prev=e,r===null?this._itHead=e:r._next=e,this._linkedRecords===null&&(this._linkedRecords=new T1),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let r=e._prev,n=e._next;return r===null?this._itHead=n:r._next=n,n===null?this._itTail=r:n._prev=r,e}_addToMoves(e,r){return e.previousIndex===r||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new T1),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,r){return e.item=r,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},t8=class{constructor(e,r){this.item=e,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},n8=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,r){let n;for(n=this._head;n!==null;n=n._nextDup)if((r===null||r<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let r=e._prevDup,n=e._nextDup;return r===null?this._head=n:r._nextDup=n,n===null?this._tail=r:n._prevDup=r,this._head===null}},T1=class{constructor(){this.map=new Map}put(e){let r=e.trackById,n=this.map.get(r);n||(n=new n8,this.map.set(r,n)),n.add(e)}get(e,r){let n=e,i=this.map.get(n);return i?i.get(e,r):null}remove(e){let r=e.trackById;return this.map.get(r).remove(e)&&this.map.delete(r),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function O5(t,e,r){let n=t.previousIndex;if(n===null)return n;let i=0;return r&&n{if(r&&r.key===i)this._maybeAddToChanges(r,n),this._appendAfter=r,r=r._next;else{let o=this._getOrCreateRecordForKey(i,n);r=this._insertBeforeOrAppend(r,o)}}),r){r._prev&&(r._prev._next=null),this._removalsHead=r;for(let n=r;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,r){if(e){let n=e._prev;return r._next=e,r._prev=n,e._prev=r,n&&(n._next=r),e===this._mapHead&&(this._mapHead=r),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=r,r._prev=this._appendAfter):this._mapHead=r,this._appendAfter=r,null}_getOrCreateRecordForKey(e,r){if(this._records.has(e)){let i=this._records.get(e);this._maybeAddToChanges(i,r);let o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}let n=new o8(e);return this._records.set(e,n),n.currentValue=r,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,r){Object.is(r,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=r,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,r){e instanceof Map?e.forEach(r):Object.keys(e).forEach(n=>r(e[n],n))}},o8=class{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function A5(){return new cc([new J0])}var cc=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,i){if(i!=null){let o=i.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||A5()),deps:[[e,new Hs,new $r]]}}find(n){let i=this.factories.find(o=>o.supports(n));if(i!=null)return i;throw new z(901,!1)}};e.\u0275prov=C({token:e,providedIn:"root",factory:A5});let t=e;return t})();function F5(){return new du([new r8])}var du=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,i){if(i){let o=i.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:i=>e.create(n,i||F5()),deps:[[e,new Hs,new $r]]}}find(n){let i=this.factories.find(o=>o.supports(n));if(i)return i;throw new z(901,!1)}};e.\u0275prov=C({token:e,providedIn:"root",factory:F5});let t=e;return t})();function E1(t,e,r,n,i=!1){for(;r!==null;){let o=e[r.index];o!==null&&n.push(wr(o)),Br(o)&&QD(o,n);let s=r.type;if(s&8)E1(t,e,r.child,n);else if(s&32){let a=iu(r,e),c;for(;c=a();)n.push(c)}else if(s&16){let a=vm(e,r);if(Array.isArray(a))n.push(...a);else{let c=Ka(e[zn]);E1(c[fe],c,a,n,!0)}}r=i?r.projectionNext:r.next}return n}function QD(t,e){for(let r=Ht;r{Ga(t.lView)},consumerOnSignalRead(){this.lView[io]=this}});function Am(t){return Nm(t[Wa])}function Fm(t){return Nm(t[Xn])}function Nm(t){for(;t!==null&&!Br(t);)t=t[Xn];return t}var nx="ngOriginalError";function v0(t){return t[nx]}var _r=class{constructor(){this._console=console}handleError(e){let r=this._findOriginalError(e);this._console.error("ERROR",e),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(e){let r=e&&v0(e);for(;r&&v0(r);)r=v0(r);return r||null}},Rm=new E("",{providedIn:"root",factory:()=>w(_r).handleError.bind(void 0)});var Lm=!1,rx=new E("",{providedIn:"root",factory:()=>Lm});var tn={};function k(t=1){Hm(ot(),ie(),Ur()+t,!1)}function Hm(t,e,r,n){if(!n)if((e[ue]&3)===3){let o=t.preOrderCheckHooks;o!==null&&u1(e,o,r)}else{let o=t.preOrderHooks;o!==null&&d1(e,o,0,r)}ao(r)}function m(t,e=be.Default){let r=ie();if(r===null)return g(t,e);let n=Vt();return Wp(n,r,Ut(t),e)}function n4(){let t="invalid";throw new Error(t)}function Vm(t,e,r,n,i,o){let s=yt(null);try{let a=null;i&W.SignalBased&&(a=e[n][Df]),a!==null&&a.transformFn!==void 0&&(o=a.transformFn(o)),i&W.HasDecoratorInputTransform&&(o=t.inputTransforms[n].call(e,o)),t.setInput!==null?t.setInput(e,a,o,r,n):bp(e,a,n,o)}finally{yt(s)}}function ix(t,e){let r=t.hostBindingOpCodes;if(r!==null)try{for(let n=0;nxt&&Hm(t,e,xt,!1),pr(s?2:0,i),r(n,i)}finally{ao(o),pr(s?3:1,i)}}function hu(t,e,r){if(V8(e)){let n=yt(null);try{let i=e.directiveStart,o=e.directiveEnd;for(let s=i;snull;function ux(t,e,r,n){let i=Gm(e);i.push(r),t.firstCreatePass&&Km(t).push(n,i.length-1)}function dx(t,e,r,n,i,o){let s=e?e.injectorIndex:-1,a=0;return Ip()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs: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}}function N5(t,e,r,n,i){for(let o in e){if(!e.hasOwnProperty(o))continue;let s=e[o];if(s===void 0)continue;n??={};let a,c=W.None;Array.isArray(s)?(a=s[0],c=s[1]):a=s;let l=o;if(i!==null){if(!i.hasOwnProperty(o))continue;l=i[o]}t===0?R5(n,r,l,a,c):R5(n,r,l,a)}return n}function R5(t,e,r,n,i){let o;t.hasOwnProperty(r)?(o=t[r]).push(e,n):o=t[r]=[e,n],i!==void 0&&o.push(i)}function hx(t,e,r){let n=e.directiveStart,i=e.directiveEnd,o=t.data,s=e.attrs,a=[],c=null,l=null;for(let u=n;u0;){let r=t[--e];if(typeof r=="number"&&r<0)return r}return 0}function vx(t,e,r,n){let i=r.directiveStart,o=r.directiveEnd;Y1(r)&&Dx(e,r,t.data[i+r.componentOffset]),t.firstCreatePass||C1(r,e),xi(n,e);let s=r.initialInputs;for(let a=i;a-1&&(Qa(e,n),M1(r,n))}this._attachedToViewContainer=!1}Z1(this._lView[fe],this._lView)}onDestroy(e){Ep(this._lView,e)}markForCheck(){yu(this._cdRefInjectingView||this._lView)}detach(){this._lView[ue]&=-129}reattach(){P0(this._lView),this._lView[ue]|=128}detectChanges(){this._lView[ue]|=1024,Ix(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new z(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,hm(this._lView[fe],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new z(902,!1);this._appRef=e,P0(this._lView)}},ft=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=Nx;let t=e;return t})();function Nx(t){return Rx(Vt(),ie(),(t&16)===16)}function Rx(t,e,r){if(Y1(t)&&!r){let n=Ti(t.index,e);return new uo(n,n)}else if(t.type&47){let n=e[zn];return new uo(n,e)}return null}var js=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=Lx,e.__NG_ENV_ID__=n=>n;let t=e;return t})(),l8=class extends js{constructor(e){super(),this._lView=e}onDestroy(e){return Ep(this._lView,e),()=>XC(this._lView,e)}};function Lx(){return new l8(ie())}var L5=new Set;function Bs(t){L5.has(t)||(L5.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var u8=class extends S{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,r,n){let i=e,o=r||(()=>null),s=n;if(e&&typeof e=="object"){let c=e;i=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=y0(o),i&&(i=y0(i)),s&&(s=y0(s)));let a=super.subscribe({next:i,error:o,complete:s});return e instanceof ye&&e.add(a),a}};function y0(t){return e=>{setTimeout(t,void 0,e)}}var re=u8;function H5(...t){}function Hx(){let t=typeof dn.requestAnimationFrame=="function",e=dn[t?"requestAnimationFrame":"setTimeout"],r=dn[t?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&e&&r){let n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);let i=r[Zone.__symbol__("OriginalDelegate")];i&&(r=i)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:r}}var U=class t{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new re(!1),this.onMicrotaskEmpty=new re(!1),this.onStable=new re(!1),this.onError=new re(!1),typeof Zone>"u")throw new z(908,!1);Zone.assertZonePatched();let i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!n&&r,i.shouldCoalesceRunChangeDetection=n,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=Hx().nativeRequestAnimationFrame,jx(i)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new z(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new z(909,!1)}run(e,r,n){return this._inner.run(e,r,n)}runTask(e,r,n,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,e,Vx,H5,H5);try{return o.runTask(s,r,n)}finally{o.cancelTask(s)}}runGuarded(e,r,n){return this._inner.runGuarded(e,r,n)}runOutsideAngular(e){return this._outer.run(e)}},Vx={};function wu(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Yx(t){t.isCheckStableRunning||t.lastRequestAnimationFrameId!==-1||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(dn,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,d8(t),t.isCheckStableRunning=!0,wu(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),d8(t))}function jx(t){let e=()=>{Yx(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,n,i,o,s,a)=>{if(Bx(a))return r.invokeTask(i,o,s,a);try{return V5(t),r.invokeTask(i,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),Y5(t)}},onInvoke:(r,n,i,o,s,a,c)=>{try{return V5(t),r.invoke(i,o,s,a,c)}finally{t.shouldCoalesceRunChangeDetection&&e(),Y5(t)}},onHasTask:(r,n,i,o)=>{r.hasTask(i,o),n===i&&(o.change=="microTask"?(t._hasPendingMicrotasks=o.microTask,d8(t),wu(t)):o.change=="macroTask"&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(r,n,i,o)=>(r.handleError(i,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}function d8(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.lastRequestAnimationFrameId!==-1?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function V5(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Y5(t){t._nesting--,wu(t)}function Bx(t){return!Array.isArray(t)||t.length!==1?!1:t[0].data?.__ignore_ng_zone__===!0}var Ds=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(Ds||{}),Ux={destroy(){}};function bu(t,e){!e&&nu(bu);let r=e?.injector??w(Ue);if(!qM(r))return Ux;Bs("NgAfterNextRender");let n=r.get(_u),i=n.handler??=new f8,o=e?.phase??Ds.MixedReadWrite,s=()=>{i.unregister(c),a()},a=r.get(js).onDestroy(s),c=new h8(r,o,()=>{s(),t()});return i.register(c),{destroy:s}}var h8=class{constructor(e,r,n){this.phase=r,this.callbackFn=n,this.zone=e.get(U),this.errorHandler=e.get(_r,null,{optional:!0})}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(e){this.errorHandler?.handleError(e)}}},f8=class{constructor(){this.executingCallbacks=!1,this.buckets={[Ds.EarlyRead]:new Set,[Ds.Write]:new Set,[Ds.MixedReadWrite]:new Set,[Ds.Read]:new Set},this.deferredCallbacks=new Set}register(e){(this.executingCallbacks?this.deferredCallbacks:this.buckets[e.phase]).add(e)}unregister(e){this.buckets[e.phase].delete(e),this.deferredCallbacks.delete(e)}execute(){let e=!1;this.executingCallbacks=!0;for(let r of Object.values(this.buckets))for(let n of r)e=!0,n.invoke();this.executingCallbacks=!1;for(let r of this.deferredCallbacks)this.buckets[r.phase].add(r);return this.deferredCallbacks.clear(),e}destroy(){for(let e of Object.values(this.buckets))e.clear();this.deferredCallbacks.clear()}},_u=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let o of n)o();return!!this.handler?.execute()||n.length>0}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=C({token:e,providedIn:"root",factory:()=>new e});let t=e;return t})();function $x(t,e){let r=Ti(e,t),n=r[fe];qx(n,r);let i=r[Cr];i!==null&&r[Es]===null&&(r[Es]=lu(i,r[zs])),Cu(n,r,r[Lt])}function qx(t,e){for(let r=e.length;r0&&wm(t,r,o.join(" "))}}function eS(t,e,r){let n=t.projection=[];for(let i=0;i=0;n--){let i=t[n];i.hostVars=e+=i.hostVars,i.hostAttrs=$a(i.hostAttrs,r=$a(r,i.hostAttrs))}}function c1(t){return t===Ts?{}:t===Jt?[]:t}function oS(t,e){let r=t.viewQuery;r?t.viewQuery=(n,i)=>{e(n,i),r(n,i)}:t.viewQuery=e}function sS(t,e){let r=t.contentQueries;r?t.contentQueries=(n,i,o)=>{e(n,i,o),r(n,i,o)}:t.contentQueries=e}function aS(t,e){let r=t.hostBindings;r?t.hostBindings=(n,i)=>{e(n,i),r(n,i)}:t.hostBindings=e}function rn(t){let e=t.inputConfig,r={};for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];Array.isArray(i)&&i[3]&&(r[n]=i[3])}t.inputTransforms=r}var FG=new RegExp(`^(\\d+)*(${YD}|${VD})*(.*)`);var cS=()=>null;function Xa(t,e){return cS(t,e)}function s4(t,e,r,n){let i=e.tView,s=t[ue]&4096?4096:16,a=r4(t,i,r,s,null,e,null,null,null,n?.injector??null,n?.dehydratedView??null),c=t[e.index];a[ic]=c;let l=t[gr];return l!==null&&(a[gr]=l.createEmbeddedView(i)),Cu(i,a,r),a}function n7(t,e){let r=Ht+e;if(r{let e=class e{};e.__NG_ELEMENT_ID__=lS;let t=e;return t})();function lS(){let t=Vt();return o7(t,ie())}var uS=Xe,i7=class extends uS{constructor(e,r,n){super(),this._lContainer=e,this._hostTNode=r,this._hostLView=n}get element(){return Vs(this._hostTNode,this._hostLView)}get injector(){return new ro(this._hostTNode,this._hostLView)}get parentInjector(){let e=K8(this._hostTNode,this._hostLView);if(Yp(e)){let r=b1(e,this._hostLView),n=w1(e),i=r[fe].data[n+8];return new ro(i,r)}else return new ro(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let r=B5(this._lContainer);return r!==null&&r[e]||null}get length(){return this._lContainer.length-Ht}createEmbeddedView(e,r,n){let i,o;typeof n=="number"?i=n:n!=null&&(i=n.index,o=n.injector);let s=Xa(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(r||{},o,s);return this.insertImpl(a,i,Ja(this._hostTNode,s)),a}createComponent(e,r,n,i,o){let s=e&&!zM(e),a;if(s)a=r;else{let p=r||{};a=p.index,n=p.injector,i=p.projectableNodes,o=p.environmentInjector||p.ngModuleRef}let c=s?e:new Os(Mi(e)),l=n||this.parentInjector;if(!o&&c.ngModule==null){let y=(s?l:this.parentInjector).get(qt,null);y&&(o=y)}let u=Mi(c.componentType??{}),d=Xa(this._lContainer,u?.id??null),h=d?.firstChild??null,f=c.create(l,i,h,o);return this.insertImpl(f.hostView,a,Ja(this._hostTNode,d)),f}insert(e,r){return this.insertImpl(e,r,!0)}insertImpl(e,r,n){let i=e._lView;if(KC(i)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let c=i[kt],l=new i7(c,c[fn],c[kt]);l.detach(l.indexOf(e))}}let o=this._adjustIndex(r),s=this._lContainer;return a4(s,i,o,n),e.attachToViewContainerRef(),Qp(w0(s),o,e),e}move(e,r){return this.insert(e,r)}indexOf(e){let r=B5(this._lContainer);return r!==null?r.indexOf(e):-1}remove(e){let r=this._adjustIndex(e,-1),n=Qa(this._lContainer,r);n&&(M1(w0(this._lContainer),r),Z1(n[fe],n))}detach(e){let r=this._adjustIndex(e,-1),n=Qa(this._lContainer,r);return n&&M1(w0(this._lContainer),r)!=null?new uo(n):null}_adjustIndex(e,r=0){return e??this.length+r}};function B5(t){return t[y1]}function w0(t){return t[y1]||(t[y1]=[])}function o7(t,e){let r,n=e[t.index];return Br(n)?r=n:(r=qm(n,e,null,t),e[t.index]=r,o4(e,r)),hS(r,e,t,n),new i7(r,t,e)}function dS(t,e){let r=t[it],n=r.createComment(""),i=In(e,t),o=ou(r,i);return x1(r,o,n,pD(r,i),!1),n}var hS=mS,fS=()=>!1;function pS(t,e,r){return fS(t,e,r)}function mS(t,e,r,n){if(t[oo])return;let i;r.type&8?i=wr(n):i=dS(e,r),t[oo]=i}function lc(t,e,r){return t[e]=r}function gS(t,e){return t[e]}function hn(t,e,r){let n=t[e];return Object.is(n,r)?!1:(t[e]=r,!0)}function ec(t,e,r,n){let i=hn(t,e,r);return hn(t,e+1,n)||i}function vS(t,e,r,n,i){let o=ec(t,e,r,n);return hn(t,e+2,i)||o}function s7(t,e,r,n,i,o){let s=ec(t,e,r,n);return ec(t,e+2,i,o)||s}function yS(t,e,r,n,i,o,s,a,c){let l=e.consts,u=Ys(e,t,4,s||null,ks(l,a));gu(e,r,u,ks(l,c)),W1(e,u);let d=u.tView=mu(2,u,n,i,o,e.directiveRegistry,e.pipeRegistry,null,e.schemas,l,null);return e.queries!==null&&(e.queries.template(e,u),d.queries=e.queries.embeddedTView(u)),u}function Q(t,e,r,n,i,o,s,a){let c=ie(),l=ot(),u=t+xt,d=l.firstCreatePass?yS(u,l,c,e,r,n,i,o,s):l.data[u];po(d,!1);let h=wS(l,c,d,t);$1()&&Q1(l,c,h,d),xi(h,c);let f=qm(h,c,h,d);return c[u]=f,o4(c,f),pS(f,d,c),j1(d)&&fu(l,c,d),s!=null&&pu(c,d,a),Q}var wS=bS;function bS(t,e,r,n){return q1(!0),e[it].createComment("")}function kn(t,e,r,n){let i=ie(),o=go();if(hn(i,o,e)){let s=ot(),a=oc();xx(a,i,t,e,r,n)}return kn}function Mu(t,e,r,n){return hn(t,go(),r)?e+Qn(r)+n:tn}function a7(t,e,r,n,i,o){let s=Pp(),a=ec(t,s,r,i);return U1(2),a?e+Qn(r)+n+Qn(i)+o:tn}function _S(t,e,r,n,i,o,s,a,c,l){let u=Pp(),d=s7(t,u,r,i,s,c);return U1(4),d?e+Qn(r)+n+Qn(i)+o+Qn(s)+a+Qn(c)+l:tn}function l1(t,e){return t<<17|e<<2}function ho(t){return t>>17&32767}function CS(t){return(t&2)==2}function MS(t,e){return t&131071|e<<17}function g8(t){return t|2}function As(t){return(t&131068)>>2}function b0(t,e){return t&-131069|e<<2}function DS(t){return(t&1)===1}function v8(t){return t|1}function xS(t,e,r,n,i,o){let s=o?e.classBindings:e.styleBindings,a=ho(s),c=As(s);t[n]=r;let l=!1,u;if(Array.isArray(r)){let d=r;u=d[1],(u===null||sc(d,u)>0)&&(l=!0)}else u=r;if(i)if(c!==0){let h=ho(t[a+1]);t[n+1]=l1(h,a),h!==0&&(t[h+1]=b0(t[h+1],n)),t[a+1]=MS(t[a+1],n)}else t[n+1]=l1(a,0),a!==0&&(t[a+1]=b0(t[a+1],n)),a=n;else t[n+1]=l1(c,0),a===0?a=n:t[c+1]=b0(t[c+1],n),c=n;l&&(t[n+1]=g8(t[n+1])),U5(t,u,n,!0),U5(t,u,n,!1),SS(e,u,t,n,o),s=l1(a,c),o?e.classBindings=s:e.styleBindings=s}function SS(t,e,r,n,i){let o=i?t.residualClasses:t.residualStyles;o!=null&&typeof e=="string"&&sc(o,e)>=0&&(r[n+1]=v8(r[n+1]))}function U5(t,e,r,n){let i=t[r+1],o=e===null,s=n?ho(i):As(i),a=!1;for(;s!==0&&(a===!1||o);){let c=t[s],l=t[s+1];TS(c,e)&&(a=!0,t[s+1]=n?v8(l):g8(l)),s=n?ho(l):As(l)}a&&(t[r+1]=n?g8(i):v8(i))}function TS(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?sc(t,e)>=0:!1}var wt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function c7(t){return t.substring(wt.key,wt.keyEnd)}function ES(t){return t.substring(wt.value,wt.valueEnd)}function zS(t){return d7(t),l7(t,Fs(t,0,wt.textEnd))}function l7(t,e){let r=wt.textEnd;return r===e?-1:(e=wt.keyEnd=kS(t,wt.key=e,r),Fs(t,e,r))}function IS(t){return d7(t),u7(t,Fs(t,0,wt.textEnd))}function u7(t,e){let r=wt.textEnd,n=wt.key=Fs(t,e,r);return r===n?-1:(n=wt.keyEnd=PS(t,n,r),n=$5(t,n,r,58),n=wt.value=Fs(t,n,r),n=wt.valueEnd=OS(t,n,r),$5(t,n,r,59))}function d7(t){wt.key=0,wt.keyEnd=0,wt.value=0,wt.valueEnd=0,wt.textEnd=t.length}function Fs(t,e,r){for(;e32;)e++;return e}function PS(t,e,r){let n;for(;e=65&&(n&-33)<=90||n>=48&&n<=57);)e++;return e}function $5(t,e,r,n){return e=Fs(t,e,r),e32&&(a=s),o=i,i=n,n=c&-33}return a}function q5(t,e,r,n){let i=-1,o=r;for(;o=0;r=u7(e,r))m7(t,c7(e),ES(e))}function Du(t){uc(VS,c4,t,!0)}function c4(t,e){for(let r=zS(e);r>=0;r=l7(e,r))vo(t,c7(e),!0)}function h7(t,e,r,n){let i=ie(),o=ot(),s=U1(2);if(o.firstUpdatePass&&p7(o,t,s,n),e!==tn&&hn(i,s,e)){let a=o.data[Ur()];g7(o,a,i,i[it],t,i[s+1]=jS(e,r),n,s)}}function uc(t,e,r,n){let i=ot(),o=U1(2);i.firstUpdatePass&&p7(i,null,o,n);let s=ie();if(r!==tn&&hn(s,o,r)){let a=i.data[Ur()];if(v7(a,n)&&!f7(i,o)){let c=n?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(r=S0(c,r||"")),y8(i,a,s,r,n)}else YS(i,a,s,s[it],s[o+1],s[o+1]=HS(t,e,r),n,o)}}function f7(t,e){return e>=t.expandoStartIndex}function p7(t,e,r,n){let i=t.data;if(i[r+1]===null){let o=i[Ur()],s=f7(t,r);v7(o,n)&&e===null&&!s&&(e=!1),e=FS(i,o,e,n),xS(i,o,e,r,s,n)}}function FS(t,e,r,n){let i=$8(t),o=n?e.residualClasses:e.residualStyles;if(i===null)(n?e.classBindings:e.styleBindings)===0&&(r=_0(null,t,e,r,n),r=tc(r,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==i)if(r=_0(i,t,e,r,n),o===null){let c=NS(t,e,n);c!==void 0&&Array.isArray(c)&&(c=_0(null,t,e,c[1],n),c=tc(c,e.attrs,n),RS(t,e,n,c))}else o=LS(t,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),r}function NS(t,e,r){let n=r?e.classBindings:e.styleBindings;if(As(n)!==0)return t[ho(n)]}function RS(t,e,r,n){let i=r?e.classBindings:e.styleBindings;t[ho(i)]=n}function LS(t,e,r){let n,i=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0;){let c=t[i],l=Array.isArray(c),u=l?c[1]:c,d=u===null,h=r[i+1];h===tn&&(h=d?Jt:void 0);let f=d?f0(h,n):u===n?h:void 0;if(l&&!k1(f)&&(f=f0(c,n)),k1(f)&&(a=f,s))return a;let p=t[i+1];i=s?ho(p):As(p)}if(e!==null){let c=o?e.residualClasses:e.residualStyles;c!=null&&(a=f0(c,n))}return a}function k1(t){return t!==void 0}function jS(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=$t(vn(t)))),t}function v7(t,e){return(t.flags&(e?8:16))!==0}function y7(t,e,r){let n=ie(),i=Mu(n,t,e,r);uc(vo,c4,i,!0)}function LG(t,e,r,n,i){let o=ie(),s=a7(o,t,e,r,n,i);uc(vo,c4,s,!0)}function HG(t,e,r,n,i,o,s,a,c){let l=ie(),u=_S(l,t,e,r,n,i,o,s,a,c);uc(vo,c4,u,!0)}var w8=class{destroy(e){}updateValue(e,r){}swap(e,r){let n=Math.min(e,r),i=Math.max(e,r),o=this.detach(i);if(i-n>1){let s=this.detach(n);this.attach(n,o),this.attach(i,s)}else this.attach(n,o)}move(e,r){this.attach(r,this.detach(e))}};function C0(t,e,r,n,i){return t===r&&Object.is(e,n)?1:Object.is(i(t,e),i(r,n))?-1:0}function BS(t,e,r){let n,i,o=0,s=t.length-1;if(Array.isArray(e)){let a=e.length-1;for(;o<=s&&o<=a;){let c=t.at(o),l=e[o],u=C0(o,c,o,l,r);if(u!==0){u<0&&t.updateValue(o,l),o++;continue}let d=t.at(s),h=e[a],f=C0(s,d,a,h,r);if(f!==0){f<0&&t.updateValue(s,h),s--,a--;continue}let p=r(o,c),y=r(s,d),v=r(o,l);if(Object.is(v,y)){let M=r(a,h);Object.is(M,p)?(t.swap(o,s),t.updateValue(s,h),a--,s--):t.move(s,o),t.updateValue(o,l),o++;continue}if(n??=new P1,i??=K5(t,o,s,r),b8(t,n,o,v))t.updateValue(o,l),o++,s++;else if(i.has(v))n.set(p,t.detach(o)),s--;else{let M=t.create(o,e[o]);t.attach(o,M),o++,s++}}for(;o<=a;)G5(t,n,r,o,e[o]),o++}else if(e!=null){let a=e[Symbol.iterator](),c=a.next();for(;!c.done&&o<=s;){let l=t.at(o),u=c.value,d=C0(o,l,o,u,r);if(d!==0)d<0&&t.updateValue(o,u),o++,c=a.next();else{n??=new P1,i??=K5(t,o,s,r);let h=r(o,u);if(b8(t,n,o,h))t.updateValue(o,u),o++,s++,c=a.next();else if(!i.has(h))t.attach(o,t.create(o,u)),o++,s++,c=a.next();else{let f=r(o,l);n.set(f,t.detach(o)),s--}}}for(;!c.done;)G5(t,n,r,t.length,c.value),c=a.next()}for(;o<=s;)t.destroy(t.detach(s--));n?.forEach(a=>{t.destroy(a)})}function b8(t,e,r,n){return e!==void 0&&e.has(n)?(t.attach(r,e.get(n)),e.delete(n),!0):!1}function G5(t,e,r,n,i){if(b8(t,e,n,r(n,i)))t.updateValue(n,i);else{let o=t.create(n,i);t.attach(n,o)}}function K5(t,e,r,n){let i=new Set;for(let o=e;o<=r;o++)i.add(n(o,t.at(o)));return i}var P1=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let r=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(r)?(this.kvMap.set(e,this._vMap.get(r)),this._vMap.delete(r)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,r){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let i=this._vMap;for(;i.has(n);)n=i.get(n);i.set(n,r)}else this.kvMap.set(e,r)}forEach(e){for(let[r,n]of this.kvMap)if(e(n,r),this._vMap!==void 0){let i=this._vMap;for(;i.has(n);)n=i.get(n),e(n,r)}}};function VG(t,e,r){Bs("NgControlFlow");let n=ie(),i=go(),o=D8(n,xt+t),s=0;if(hn(n,i,e)){let a=yt(null);try{if(r7(o,s),e!==-1){let c=x8(n[fe],xt+e),l=Xa(o,c.tView.ssrId),u=s4(n,c,r,{dehydratedView:l});a4(o,u,s,Ja(c,l))}}finally{yt(a)}}else{let a=n7(o,s);a!==void 0&&(a[Lt]=r)}}var _8=class{constructor(e,r,n){this.lContainer=e,this.$implicit=r,this.$index=n}get $count(){return this.lContainer.length-Ht}};function YG(t){return t}function jG(t,e){return e}var C8=class{constructor(e,r,n){this.hasEmptyBlock=e,this.trackByFn=r,this.liveCollection=n}};function BG(t,e,r,n,i,o,s,a,c,l,u,d,h){Bs("NgControlFlow");let f=c!==void 0,p=ie(),y=a?s.bind(p[zn][Lt]):s,v=new C8(f,y);p[xt+t]=v,Q(t+1,e,r,n,i,o),f&&Q(t+2,c,l,u,d,h)}var M8=class extends w8{constructor(e,r,n){super(),this.lContainer=e,this.hostLView=r,this.templateTNode=n,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-Ht}at(e){return this.getLView(e)[Lt].$implicit}attach(e,r){let n=r[Es];this.needsIndexUpdate||=e!==this.length,a4(this.lContainer,r,e,Ja(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,US(this.lContainer,e)}create(e,r){let n=Xa(this.lContainer,this.templateTNode.tView.ssrId);return s4(this.hostLView,this.templateTNode,new _8(this.lContainer,r,e),{dehydratedView:n})}destroy(e){Z1(e[fe],e)}updateValue(e,r){this.getLView(e)[Lt].$implicit=r}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(q1(!0),dm(n,i,fM()));function GS(t,e,r,n,i){let o=e.consts,s=ks(o,n),a=Ys(e,t,8,"ng-container",s);s!==null&&z1(a,s,!0);let c=ks(o,i);return gu(e,r,a,c),e.queries!==null&&e.queries.elementStart(e,a),a}function tt(t,e,r){let n=ie(),i=ot(),o=t+xt,s=i.firstCreatePass?GS(o,i,n,e,r):i.data[o];po(s,!0);let a=KS(i,n,s,t);return n[o]=a,$1()&&Q1(i,n,a,s),xi(a,n),j1(s)&&(fu(i,n,s),hu(i,s,n)),r!=null&&pu(n,s),tt}function nt(){let t=Vt(),e=ot();return B8()?U8():(t=t.parent,po(t,!1)),e.firstCreatePass&&(W1(e,t),V8(t)&&e.queries.elementEnd(t)),nt}function xu(t,e,r){return tt(t,e,r),nt(),xu}var KS=(t,e,r,n)=>(q1(!0),iD(e[it],""));function Pn(){return ie()}function ZS(t,e,r){let n=ie(),i=go();if(hn(n,i,e)){let o=ot(),s=oc();i4(o,s,n,t,e,n[it],r,!0)}return ZS}function l4(t,e,r){let n=ie(),i=go();if(hn(n,i,e)){let o=ot(),s=oc(),a=$8(o.data),c=Zm(a,s,n);i4(o,s,n,t,e,c,r,!0)}return l4}var to=void 0;function QS(t){let e=t,r=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return r===1&&n===0?1:5}var XS=["en",[["a","p"],["AM","PM"],to],[["AM","PM"],to,to],[["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"]],to,[["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"]],to,[["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 a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",to,"{1} 'at' {0}",to],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",QS],Ba={};function w7(t,e,r){typeof e!="string"&&(r=e,e=t[Qe.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),Ba[e]=t,r&&(Ba[e][Qe.ExtraData]=r)}function on(t){let e=JS(t),r=Z5(e);if(r)return r;let n=e.split("-")[0];if(r=Z5(n),r)return r;if(n==="en")return XS;throw new z(701,!1)}function Z5(t){return t in Ba||(Ba[t]=dn.ng&&dn.ng.common&&dn.ng.common.locales&&dn.ng.common.locales[t]),Ba[t]}var Qe=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(Qe||{});function JS(t){return t.toLowerCase().replace(/_/g,"-")}var O1="en-US",eT="USD";var tT=O1;function nT(t){hC(t,"Expected localeId to be defined"),typeof t=="string"&&(tT=t.toLowerCase().replace(/_/g,"-"))}function Us(t){return!!t&&typeof t.then=="function"}function Su(t){return!!t&&typeof t.subscribe=="function"}function Pt(t,e,r,n){let i=ie(),o=ot(),s=Vt();return b7(o,i,i[it],s,t,e,n),Pt}function u4(t,e){let r=Vt(),n=ie(),i=ot(),o=$8(i.data),s=Zm(o,r,n);return b7(i,n,s,r,t,e),u4}function rT(t,e,r,n){let i=t.cleanup;if(i!=null)for(let o=0;oc?a[c]:null}typeof s=="string"&&(o+=2)}return null}function b7(t,e,r,n,i,o,s){let a=j1(n),l=t.firstCreatePass&&Km(t),u=e[Lt],d=Gm(e),h=!0;if(n.type&3||s){let y=In(n,e),v=s?s(y):y,M=d.length,P=s?$=>s(wr($[n.index])):n.index,X=null;if(!s&&a&&(X=rT(t,e,i,n.index)),X!==null){let $=X.__ngLastListenerFn__||X;$.__ngNextListenerFn__=o,X.__ngLastListenerFn__=o,h=!1}else{o=X5(n,e,u,o,!1);let $=r.listen(v,i,o);d.push(o,$),l&&l.push(i,P,M,M+1)}}else o=X5(n,e,u,o,!1);let f=n.outputs,p;if(h&&f!==null&&(p=f[i])){let y=p.length;if(y)for(let v=0;v-1?Ti(t.index,e):e;yu(a);let c=Q5(e,r,n,s),l=o.__ngNextListenerFn__;for(;l;)c=Q5(e,r,l,s)&&c,l=l.__ngNextListenerFn__;return i&&c===!1&&s.preventDefault(),c}}function G(t=1){return dM(t)}function iT(t,e){let r=null,n=IC(t);for(let i=0;i{let e=class e{};e.__NG_ELEMENT_ID__=lT;let t=e;return t})(),aT=Me,cT=class extends aT{constructor(e,r,n){super(),this._declarationLView=e,this._declarationTContainer=r,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,r){return this.createEmbeddedViewImpl(e,r)}createEmbeddedViewImpl(e,r,n){let i=s4(this._declarationLView,this._declarationTContainer,e,{injector:r,dehydratedView:n});return new uo(i)}};function lT(){return d4(Vt(),ie())}function d4(t,e){return t.type&4?new cT(e,t,Vs(t,e)):null}var S8=class t{constructor(e){this.queryList=e,this.matches=null}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},T8=class t{constructor(e=[]){this.queries=e}createEmbeddedView(e){let r=e.queries;if(r!==null){let n=e.contentQueries!==null?e.contentQueries[0]:r.length,i=[];for(let o=0;o0)n.push(s[a/2]);else{let l=o[a+1],u=e[-c];for(let d=Ht;d=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=n}function $s(t){let e=oM();return B1(e,xt+t)}function er(t,e=""){let r=ie(),n=ot(),i=t+xt,o=n.firstCreatePass?Ys(n,i,1,e,null):n.data[i],s=vT(n,r,o,e,t);r[i]=s,$1()&&Q1(n,r,s,o),po(o,!1)}var vT=(t,e,r,n,i)=>(q1(!0),nD(e[it],n));function qs(t){return zi("",t,""),qs}function zi(t,e,r){let n=ie(),i=Mu(n,t,e,r);return i!==tn&&Xm(n,Ur(),i),zi}function yT(t,e,r,n,i){let o=ie(),s=a7(o,t,e,r,n,i);return s!==tn&&Xm(o,Ur(),s),yT}function wT(t,e,r){let n=ot();if(n.firstCreatePass){let i=Yr(t);k8(r,n.data,n.blueprint,i,!0),k8(e,n.data,n.blueprint,i,!1)}}function k8(t,e,r,n,i){if(t=Ut(t),Array.isArray(t))for(let o=0;o>20;if(Ps(t)||!t.multi){let f=new co(l,i,m),p=D0(c,e,i?u:u+h,d);p===-1?(F0(C1(a,s),o,c),M0(o,t,e.length),e.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(f),s.push(f)):(r[p]=f,s[p]=f)}else{let f=D0(c,e,u+h,d),p=D0(c,e,u,u+h),y=f>=0&&r[f],v=p>=0&&r[p];if(i&&!v||!i&&!y){F0(C1(a,s),o,c);let M=CT(i?_T:bT,r.length,i,n,l);!i&&v&&(r[p].providerFactory=M),M0(o,t,e.length,0),e.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),r.push(M),s.push(M)}else{let M=S7(r[i?p:f],l,!i&&n);M0(o,t,f>-1?f:p,M)}!i&&n&&v&&r[p].componentProviders++}}}function M0(t,e,r,n){let i=Ps(e),o=LM(e);if(i||o){let c=(o?Ut(e.useClass):e).prototype.ngOnDestroy;if(c){let l=t.destroyHooks||(t.destroyHooks=[]);if(!i&&e.multi){let u=l.indexOf(r);u===-1?l.push(r,[n,c]):l[u+1].push(n,c)}else l.push(r,c)}}}function S7(t,e,r){return r&&t.componentProviders++,t.multi.push(e)-1}function D0(t,e,r,n){for(let i=r;i{r.providersResolver=(n,i)=>wT(n,i?i(t):t,e)}}var Si=class{},nc=class{};var O8=class extends Si{constructor(e,r,n){super(),this._parent=r,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new I1(this);let i=gp(e);this._bootstrapComponents=cm(i.bootstrap),this._r3Injector=om(e,r,[{provide:Si,useValue:this},{provide:Ei,useValue:this.componentFactoryResolver},...n],$t(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){let e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(r=>r()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},A8=class extends nc{constructor(e){super(),this.moduleType=e}create(e){return new O8(this.moduleType,e,[])}};var F1=class extends Si{constructor(e){super(),this.componentFactoryResolver=new I1(this),this.instance=null;let r=new Za([...e.providers,{provide:Si,useValue:this},{provide:Ei,useValue:this.componentFactoryResolver}],e.parent||tu(),e.debugName,new Set(["environment"]));this.injector=r,e.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function h4(t,e,r=null){return new F1({providers:t,parent:e,debugName:r,runEnvironmentInitializers:!0}).injector}var MT=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let i=tm(!1,n.type),o=i.length>0?h4([i],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}};e.\u0275prov=C({token:e,providedIn:"environment",factory:()=>new e(g(qt))});let t=e;return t})();function _t(t){Bs("NgStandalone"),t.getStandaloneInjector=e=>e.get(MT).getOrCreateStandaloneInjector(t)}function qG(t,e,r){let n=mo()+t,i=ie();return i[n]===tn?lc(i,n,r?e.call(r):e()):gS(i,n)}function WG(t,e,r,n){return E7(ie(),mo(),t,e,r,n)}function T7(t,e,r,n,i){return z7(ie(),mo(),t,e,r,n,i)}function GG(t,e,r,n,i,o){return DT(ie(),mo(),t,e,r,n,i,o)}function f4(t,e){let r=t[e];return r===tn?void 0:r}function E7(t,e,r,n,i,o){let s=e+r;return hn(t,s,i)?lc(t,s+1,o?n.call(o,i):n(i)):f4(t,s+1)}function z7(t,e,r,n,i,o,s){let a=e+r;return ec(t,a,i,o)?lc(t,a+2,s?n.call(s,i,o):n(i,o)):f4(t,a+2)}function DT(t,e,r,n,i,o,s,a){let c=e+r;return vS(t,c,i,o,s)?lc(t,c+3,a?n.call(a,i,o,s):n(i,o,s)):f4(t,c+3)}function xT(t,e,r,n,i,o,s,a,c){let l=e+r;return s7(t,l,i,o,s,a)?lc(t,l+4,c?n.call(c,i,o,s,a):n(i,o,s,a)):f4(t,l+4)}function Tu(t,e){let r=ot(),n,i=t+xt;r.firstCreatePass?(n=ST(e,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks??=[]).push(i,n.onDestroy)):n=r.data[i];let o=n.factory||(n.factory=so(n.type,!0)),s,a=Xt(m);try{let c=_1(!1),l=o();return _1(c),gT(r,ie(),i,l),l}finally{Xt(a)}}function ST(t,e){if(e)for(let r=e.length-1;r>=0;r--){let n=e[r];if(t===n.name)return n}}function Eu(t,e,r){let n=t+xt,i=ie(),o=B1(i,n);return zu(i,n)?E7(i,mo(),e,o.transform,r,o):o.transform(r)}function KG(t,e,r,n){let i=t+xt,o=ie(),s=B1(o,i);return zu(o,i)?z7(o,mo(),e,s.transform,r,n,s):s.transform(r,n)}function ZG(t,e,r,n,i,o){let s=t+xt,a=ie(),c=B1(a,s);return zu(a,s)?xT(a,mo(),e,c.transform,r,n,i,o,c):c.transform(r,n,i,o)}function zu(t,e){return t[fe].data[e].pure}function bo(t,e){return d4(t,e)}var fo=class{constructor(e){this.full=e;let r=e.split(".");this.major=r[0],this.minor=r[1],this.patch=r.slice(2).join(".")}};var p4=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"platform"});let t=e;return t})(),F8=class{constructor(e,r){this.ngModuleFactory=e,this.componentFactories=r}},m4=(()=>{let e=class e{compileModuleSync(n){return new A8(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let i=this.compileModuleSync(n),o=gp(n),s=cm(o.declarations).reduce((a,c)=>{let l=Mi(c);return l&&a.push(new Os(l)),a},[]);return new F8(i,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Ws=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Re(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var I7=new E("");var g4=new E("Application Initializer"),k7=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,i)=>{this.resolve=n,this.reject=i}),this.appInits=w(g4,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let s=o();if(Us(s))n.push(s);else if(Su(s)){let a=new Promise((c,l)=>{s.subscribe({complete:c,error:l})});n.push(a)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{i()}).catch(o=>{this.reject(o)}),n.length===0&&i(),this.initialized=!0}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),dc=new E("appBootstrapListener");function TT(){zf(()=>{throw new z(600,!1)})}function ET(t){return t.isBoundToModule}function zT(t,e,r){try{let n=r();return Us(n)?n.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}var xr=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=w(Rm),this.afterRenderEffectManager=w(_u),this.componentTypes=[],this.components=[],this.isStable=w(Ws).hasPendingTasks.pipe(Z(n=>!n)),this._injector=w(qt)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,i){let o=n instanceof S1;if(!this._injector.get(k7).done){let f=!o&&mp(n),p=!1;throw new z(405,p)}let a;o?a=n:a=this._injector.get(Ei).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let c=ET(a)?void 0:this._injector.get(Si),l=i||a.selector,u=a.create(Ue.NULL,[],l,c),d=u.location.nativeElement,h=u.injector.get(I7,null);return h?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),x0(this.components,u),h?.unregisterApplication(d)}),this._loadComponent(u),u}tick(){if(this._runningTick)throw new z(101,!1);try{this._runningTick=!0;for(let n of this._views)n.detectChanges()}catch(n){this.internalErrorHandler(n)}finally{try{let n=this.afterRenderEffectManager.execute()}catch(n){this.internalErrorHandler(n)}this._runningTick=!1}}attachView(n){let i=n;this._views.push(i),i.attachToAppRef(this)}detachView(n){let i=n;x0(this._views,i),i.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let i=this._injector.get(dc,[]);[...this._bootstrapListeners,...i].forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>x0(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new z(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function x0(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}var IT=(()=>{let e=class e{constructor(){this.zone=w(U),this.applicationRef=w(xr)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function kT(t){return[{provide:U,useFactory:t},{provide:Di,multi:!0,useFactory:()=>{let e=w(IT,{optional:!0});return()=>e.initialize()}},{provide:Di,multi:!0,useFactory:()=>{let e=w(FT);return()=>{e.initialize()}}},{provide:Rm,useFactory:PT}]}function PT(){let t=w(U),e=w(_r);return r=>t.runOutsideAngular(()=>e.handleError(r))}function OT(t){let e=kT(()=>new U(AT(t)));return Wt([[],e])}function AT(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var FT=(()=>{let e=class e{constructor(){this.subscription=new ye,this.initialized=!1,this.zone=w(U),this.pendingTasks=w(Ws)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{U.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{U.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function NT(){return typeof $localize<"u"&&$localize.locale||O1}var Ii=new E("LocaleId",{providedIn:"root",factory:()=>w(Ii,be.Optional|be.SkipSelf)||NT()}),P7=new E("DefaultCurrencyCode",{providedIn:"root",factory:()=>eT});var O7=new E("PlatformDestroyListeners");var m1=null;function RT(t=[],e){return Ue.create({name:e,providers:[{provide:G1,useValue:"platform"},{provide:O7,useValue:new Set([()=>m1=null])},...t]})}function LT(t=[]){if(m1)return m1;let e=RT(t);return m1=e,TT(),HT(e),e}function HT(t){t.get(ru,null)?.forEach(r=>r())}function v4(){return!1}function A7(t){try{let{rootComponent:e,appProviders:r,platformProviders:n}=t,i=LT(n),o=[OT(),...r||[]],a=new F1({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,c=a.get(U);return c.run(()=>{a.resolveInjectorInitializers();let l=a.get(_r,null),u;c.runOutsideAngular(()=>{u=c.onError.subscribe({next:f=>{l.handleError(f)}})});let d=()=>a.destroy(),h=i.get(O7);return h.add(d),a.onDestroy(()=>{u.unsubscribe(),h.delete(d)}),zT(l,c,()=>{let f=a.get(k7);return f.runInitializers(),f.donePromise.then(()=>{let p=a.get(Ii,O1);nT(p||O1);let y=a.get(xr);return e!==void 0&&y.bootstrap(e),y})})})}catch(e){return Promise.reject(e)}}function ut(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function VT(t,e=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):e}function F7(t){let e=Mi(t);if(!e)return null;let r=new Os(e);return{get selector(){return r.selector},get type(){return r.componentType},get inputs(){return r.inputs},get outputs(){return r.outputs},get ngContentSelectors(){return r.ngContentSelectors},get isStandalone(){return e.standalone},get isSignal(){return e.signals}}}var Nu=null;function Gs(){return Nu}function U7(t){Nu||(Nu=t)}var x4=class{},V=new E("DocumentToken"),Bu=(()=>{let e=class e{historyGo(n){throw new Error("Not implemented")}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(YT),providedIn:"platform"});let t=e;return t})(),$7=new E("Location Initialized"),YT=(()=>{let e=class e extends Bu{constructor(){super(),this._doc=w(V),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Gs().getBaseHref(this._doc)}onPopState(n){let i=Gs().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){let i=Gs().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}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(n){this._location.pathname=n}pushState(n,i,o){this._history.pushState(n,i,o)}replaceState(n,i,o){this._history.replaceState(n,i,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>new e,providedIn:"platform"});let t=e;return t})();function Uu(t,e){if(t.length==0)return e;if(e.length==0)return t;let r=0;return t.endsWith("/")&&r++,e.startsWith("/")&&r++,r==2?t+e.substring(1):r==1?t+e:t+"/"+e}function N7(t){let e=t.match(/#|\?|$/),r=e&&e.index||t.length,n=r-(t[r-1]==="/"?1:0);return t.slice(0,n)+t.slice(r)}function Qr(t){return t&&t[0]!=="?"?"?"+t:t}var Tr=(()=>{let e=class e{historyGo(n){throw new Error("Not implemented")}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w($u),providedIn:"root"});let t=e;return t})(),q7=new E("appBaseHref"),$u=(()=>{let e=class e extends Tr{constructor(n,i){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??w(V).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return Uu(this._baseHref,n)}path(n=!1){let i=this._platformLocation.pathname+Qr(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${i}${o}`:i}pushState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));this._platformLocation.pushState(n,i,a)}replaceState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));this._platformLocation.replaceState(n,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(i){return new(i||e)(g(Bu),g(q7,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qu=(()=>{let e=class e extends Tr{constructor(n,i){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],i!=null&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let i=this._platformLocation.hash;return i==null&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(n){let i=Uu(this._baseHref,n);return i.length>0?"#"+i:i}pushState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.pushState(n,i,a)}replaceState(n,i,o,s){let a=this.prepareExternalUrl(o+Qr(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(n,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(i){return new(i||e)(g(Bu),g(q7,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ki=(()=>{let e=class e{constructor(n){this._subject=new re,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let i=this._locationStrategy.getBaseHref();this._basePath=UT(N7(R7(i))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+Qr(i))}normalize(n){return e.stripTrailingSlash(BT(this._basePath,R7(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",o=null){this._locationStrategy.pushState(o,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qr(i)),o)}replaceState(n,i="",o=null){this._locationStrategy.replaceState(o,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qr(i)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{let i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(o=>o(n,i))}subscribe(n,i,o){return this._subject.subscribe({next:n,error:i,complete:o})}};e.normalizeQueryParams=Qr,e.joinWithSlash=Uu,e.stripTrailingSlash=N7,e.\u0275fac=function(i){return new(i||e)(g(Tr))},e.\u0275prov=C({token:e,factory:()=>jT(),providedIn:"root"});let t=e;return t})();function jT(){return new ki(g(Tr))}function BT(t,e){if(!t||!e.startsWith(t))return e;let r=e.substring(t.length);return r===""||["/",";","?","#"].includes(r[0])?r:e}function R7(t){return t.replace(/\/index.html$/,"")}function UT(t){if(new RegExp("^(https?:)?//").test(t)){let[,r]=t.split(/\/\/[^\/]+/);return r}return t}var W7={ADP:[void 0,void 0,0],AFN:[void 0,"\u060B",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058F",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20BC"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09F3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xA5","\xA5"],COP:[void 0,"$",2],CRC:[void 0,"\u20A1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010D",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xA3"],ESP:[void 0,"\u20A7",0],EUR:["\u20AC"],FJD:[void 0,"$"],FKP:[void 0,"\xA3"],GBP:["\xA3"],GEL:[void 0,"\u20BE"],GHS:[void 0,"GH\u20B5"],GIP:[void 0,"\xA3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20AA"],INR:["\u20B9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xA5",void 0,0],KHR:[void 0,"\u17DB"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20A9",0],KRW:["\u20A9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20B8"],LAK:[void 0,"\u20AD",0],LBP:[void 0,"L\xA3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20AE",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20A6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20B1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20B2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20BD"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xA3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xA3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xA3",0],THB:[void 0,"\u0E3F"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20BA"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20B4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20AB",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202FCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xA4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},Wu=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}(Wu||{});var dt=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(dt||{}),xe=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(xe||{}),bn=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(bn||{}),Ot=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}(Ot||{});function $T(t){return on(t)[Qe.LocaleId]}function Pi(t,e,r){let n=on(t),i=[n[Qe.DayPeriodsFormat],n[Qe.DayPeriodsStandalone]],o=An(i,e);return An(o,r)}function qT(t,e,r){let n=on(t),i=[n[Qe.DaysFormat],n[Qe.DaysStandalone]],o=An(i,e);return An(o,r)}function WT(t,e,r){let n=on(t),i=[n[Qe.MonthsFormat],n[Qe.MonthsStandalone]],o=An(i,e);return An(o,r)}function GT(t,e){let n=on(t)[Qe.Eras];return An(n,e)}function y4(t,e){let r=on(t);return An(r[Qe.DateFormat],e)}function w4(t,e){let r=on(t);return An(r[Qe.TimeFormat],e)}function b4(t,e){let n=on(t)[Qe.DateTimeFormat];return An(n,e)}function Sr(t,e){let r=on(t),n=r[Qe.NumberSymbols][e];if(typeof n>"u"){if(e===Ot.CurrencyDecimal)return r[Qe.NumberSymbols][Ot.Decimal];if(e===Ot.CurrencyGroup)return r[Qe.NumberSymbols][Ot.Group]}return n}function G7(t,e){return on(t)[Qe.NumberFormats][e]}function KT(t){return on(t)[Qe.Currencies]}function K7(t){if(!t[Qe.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Qe.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function ZT(t){let e=on(t);return K7(e),(e[Qe.ExtraData][2]||[]).map(n=>typeof n=="string"?Iu(n):[Iu(n[0]),Iu(n[1])])}function QT(t,e,r){let n=on(t);K7(n);let i=[n[Qe.ExtraData][0],n[Qe.ExtraData][1]],o=An(i,e)||[];return An(o,r)||[]}function An(t,e){for(let r=e;r>-1;r--)if(typeof t[r]<"u")return t[r];throw new Error("Locale data API: locale data undefined")}function Iu(t){let[e,r]=t.split(":");return{hours:+e,minutes:+r}}function XT(t,e,r="en"){let n=KT(r)[t]||W7[t]||[],i=n[1];return e==="narrow"&&typeof i=="string"?i:n[0]||t}var JT=2;function eE(t){let e,r=W7[t];return r&&(e=r[2]),typeof e=="number"?e:JT}var tE=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,hc={},nE=/((?:[^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]*)/,Xr=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}(Xr||{}),Oe=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}(Oe||{}),Pe=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}(Pe||{});function Gu(t,e,r,n){let i=dE(t);e=Zr(r,e)||e;let s=[],a;for(;e;)if(a=nE.exec(e),a){s=s.concat(a.slice(1));let u=s.pop();if(!u)break;e=u}else{s.push(e);break}let c=i.getTimezoneOffset();n&&(c=Q7(n,c),i=uE(i,n,!0));let l="";return s.forEach(u=>{let d=cE(u);l+=d?d(i,r,c):u==="''"?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function S4(t,e,r){let n=new Date(0);return n.setFullYear(t,e,r),n.setHours(0,0,0),n}function Zr(t,e){let r=$T(t);if(hc[r]=hc[r]||{},hc[r][e])return hc[r][e];let n="";switch(e){case"shortDate":n=y4(t,bn.Short);break;case"mediumDate":n=y4(t,bn.Medium);break;case"longDate":n=y4(t,bn.Long);break;case"fullDate":n=y4(t,bn.Full);break;case"shortTime":n=w4(t,bn.Short);break;case"mediumTime":n=w4(t,bn.Medium);break;case"longTime":n=w4(t,bn.Long);break;case"fullTime":n=w4(t,bn.Full);break;case"short":let i=Zr(t,"shortTime"),o=Zr(t,"shortDate");n=_4(b4(t,bn.Short),[i,o]);break;case"medium":let s=Zr(t,"mediumTime"),a=Zr(t,"mediumDate");n=_4(b4(t,bn.Medium),[s,a]);break;case"long":let c=Zr(t,"longTime"),l=Zr(t,"longDate");n=_4(b4(t,bn.Long),[c,l]);break;case"full":let u=Zr(t,"fullTime"),d=Zr(t,"fullDate");n=_4(b4(t,bn.Full),[u,d]);break}return n&&(hc[r][e]=n),n}function _4(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(r,n){return e!=null&&n in e?e[n]:r})),t}function tr(t,e,r="-",n,i){let o="";(t<0||i&&t<=0)&&(i?t=-t+1:(t=-t,o=r));let s=String(t);for(;s.length0||a>-r)&&(a+=r),t===Oe.Hours)a===0&&r===-12&&(a=12);else if(t===Oe.FractionalSeconds)return rE(a,e);let c=Sr(s,Ot.MinusSign);return tr(a,e,c,n,i)}}function iE(t,e){switch(t){case Oe.FullYear:return e.getFullYear();case Oe.Month:return e.getMonth();case Oe.Date:return e.getDate();case Oe.Hours:return e.getHours();case Oe.Minutes:return e.getMinutes();case Oe.Seconds:return e.getSeconds();case Oe.FractionalSeconds:return e.getMilliseconds();case Oe.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}function We(t,e,r=dt.Format,n=!1){return function(i,o){return oE(i,o,t,e,r,n)}}function oE(t,e,r,n,i,o){switch(r){case Pe.Months:return WT(e,i,n)[t.getMonth()];case Pe.Days:return qT(e,i,n)[t.getDay()];case Pe.DayPeriods:let s=t.getHours(),a=t.getMinutes();if(o){let l=ZT(e),u=QT(e,i,n),d=l.findIndex(h=>{if(Array.isArray(h)){let[f,p]=h,y=s>=f.hours&&a>=f.minutes,v=s0?Math.floor(i/60):Math.ceil(i/60);switch(t){case Xr.Short:return(i>=0?"+":"")+tr(s,2,o)+tr(Math.abs(i%60),2,o);case Xr.ShortGMT:return"GMT"+(i>=0?"+":"")+tr(s,1,o);case Xr.Long:return"GMT"+(i>=0?"+":"")+tr(s,2,o)+":"+tr(Math.abs(i%60),2,o);case Xr.Extended:return n===0?"Z":(i>=0?"+":"")+tr(s,2,o)+":"+tr(Math.abs(i%60),2,o);default:throw new Error(`Unknown zone width "${t}"`)}}}var sE=0,D4=4;function aE(t){let e=S4(t,sE,1).getDay();return S4(t,0,1+(e<=D4?D4:D4+7)-e)}function Z7(t){return S4(t.getFullYear(),t.getMonth(),t.getDate()+(D4-t.getDay()))}function ku(t,e=!1){return function(r,n){let i;if(e){let o=new Date(r.getFullYear(),r.getMonth(),1).getDay()-1,s=r.getDate();i=1+Math.floor((s+o)/7)}else{let o=Z7(r),s=aE(o.getFullYear()),a=o.getTime()-s.getTime();i=1+Math.round(a/6048e5)}return tr(i,t,Sr(n,Ot.MinusSign))}}function M4(t,e=!1){return function(r,n){let o=Z7(r).getFullYear();return tr(o,t,Sr(n,Ot.MinusSign),e)}}var Pu={};function cE(t){if(Pu[t])return Pu[t];let e;switch(t){case"G":case"GG":case"GGG":e=We(Pe.Eras,xe.Abbreviated);break;case"GGGG":e=We(Pe.Eras,xe.Wide);break;case"GGGGG":e=We(Pe.Eras,xe.Narrow);break;case"y":e=gt(Oe.FullYear,1,0,!1,!0);break;case"yy":e=gt(Oe.FullYear,2,0,!0,!0);break;case"yyy":e=gt(Oe.FullYear,3,0,!1,!0);break;case"yyyy":e=gt(Oe.FullYear,4,0,!1,!0);break;case"Y":e=M4(1);break;case"YY":e=M4(2,!0);break;case"YYY":e=M4(3);break;case"YYYY":e=M4(4);break;case"M":case"L":e=gt(Oe.Month,1,1);break;case"MM":case"LL":e=gt(Oe.Month,2,1);break;case"MMM":e=We(Pe.Months,xe.Abbreviated);break;case"MMMM":e=We(Pe.Months,xe.Wide);break;case"MMMMM":e=We(Pe.Months,xe.Narrow);break;case"LLL":e=We(Pe.Months,xe.Abbreviated,dt.Standalone);break;case"LLLL":e=We(Pe.Months,xe.Wide,dt.Standalone);break;case"LLLLL":e=We(Pe.Months,xe.Narrow,dt.Standalone);break;case"w":e=ku(1);break;case"ww":e=ku(2);break;case"W":e=ku(1,!0);break;case"d":e=gt(Oe.Date,1);break;case"dd":e=gt(Oe.Date,2);break;case"c":case"cc":e=gt(Oe.Day,1);break;case"ccc":e=We(Pe.Days,xe.Abbreviated,dt.Standalone);break;case"cccc":e=We(Pe.Days,xe.Wide,dt.Standalone);break;case"ccccc":e=We(Pe.Days,xe.Narrow,dt.Standalone);break;case"cccccc":e=We(Pe.Days,xe.Short,dt.Standalone);break;case"E":case"EE":case"EEE":e=We(Pe.Days,xe.Abbreviated);break;case"EEEE":e=We(Pe.Days,xe.Wide);break;case"EEEEE":e=We(Pe.Days,xe.Narrow);break;case"EEEEEE":e=We(Pe.Days,xe.Short);break;case"a":case"aa":case"aaa":e=We(Pe.DayPeriods,xe.Abbreviated);break;case"aaaa":e=We(Pe.DayPeriods,xe.Wide);break;case"aaaaa":e=We(Pe.DayPeriods,xe.Narrow);break;case"b":case"bb":case"bbb":e=We(Pe.DayPeriods,xe.Abbreviated,dt.Standalone,!0);break;case"bbbb":e=We(Pe.DayPeriods,xe.Wide,dt.Standalone,!0);break;case"bbbbb":e=We(Pe.DayPeriods,xe.Narrow,dt.Standalone,!0);break;case"B":case"BB":case"BBB":e=We(Pe.DayPeriods,xe.Abbreviated,dt.Format,!0);break;case"BBBB":e=We(Pe.DayPeriods,xe.Wide,dt.Format,!0);break;case"BBBBB":e=We(Pe.DayPeriods,xe.Narrow,dt.Format,!0);break;case"h":e=gt(Oe.Hours,1,-12);break;case"hh":e=gt(Oe.Hours,2,-12);break;case"H":e=gt(Oe.Hours,1);break;case"HH":e=gt(Oe.Hours,2);break;case"m":e=gt(Oe.Minutes,1);break;case"mm":e=gt(Oe.Minutes,2);break;case"s":e=gt(Oe.Seconds,1);break;case"ss":e=gt(Oe.Seconds,2);break;case"S":e=gt(Oe.FractionalSeconds,1);break;case"SS":e=gt(Oe.FractionalSeconds,2);break;case"SSS":e=gt(Oe.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=C4(Xr.Short);break;case"ZZZZZ":e=C4(Xr.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=C4(Xr.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=C4(Xr.Long);break;default:return null}return Pu[t]=e,e}function Q7(t,e){t=t.replace(/:/g,"");let r=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(r)?e:r}function lE(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}function uE(t,e,r){let n=r?-1:1,i=t.getTimezoneOffset(),o=Q7(e,i);return lE(t,n*(o-i))}function dE(t){if(L7(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[i,o=1,s=1]=t.split("-").map(a=>+a);return S4(i,o-1,s)}let r=parseFloat(t);if(!isNaN(t-r))return new Date(r);let n;if(n=t.match(tE))return hE(n)}let e=new Date(t);if(!L7(e))throw new Error(`Unable to convert "${t}" into a date`);return e}function hE(t){let e=new Date(0),r=0,n=0,i=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=Number(t[9]+t[10]),n=Number(t[9]+t[11])),i.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-r,a=Number(t[5]||0)-n,c=Number(t[6]||0),l=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return o.call(e,s,a,c,l),e}function L7(t){return t instanceof Date&&!isNaN(t.valueOf())}var fE=/^(\d+)?\.((\d+)(-(\d+))?)?$/,H7=22,T4=".",fc="0",pE=";",mE=",",Ou="#",V7="\xA4";function X7(t,e,r,n,i,o,s=!1){let a="",c=!1;if(!isFinite(t))a=Sr(r,Ot.Infinity);else{let l=wE(t);s&&(l=yE(l));let u=e.minInt,d=e.minFrac,h=e.maxFrac;if(o){let P=o.match(fE);if(P===null)throw new Error(`${o} is not a valid digit info`);let X=P[1],$=P[3],Ae=P[5];X!=null&&(u=Au(X)),$!=null&&(d=Au($)),Ae!=null?h=Au(Ae):$!=null&&d>h&&(h=d)}bE(l,d,h);let f=l.digits,p=l.integerLen,y=l.exponent,v=[];for(c=f.every(P=>!P);p0?v=f.splice(p,f.length):(v=f,f=[0]);let M=[];for(f.length>=e.lgSize&&M.unshift(f.splice(-e.lgSize,f.length).join(""));f.length>e.gSize;)M.unshift(f.splice(-e.gSize,f.length).join(""));f.length&&M.unshift(f.join("")),a=M.join(Sr(r,n)),v.length&&(a+=Sr(r,i)+v.join("")),y&&(a+=Sr(r,Ot.Exponential)+"+"+y)}return t<0&&!c?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function gE(t,e,r,n,i){let o=G7(e,Wu.Currency),s=J7(o,Sr(e,Ot.MinusSign));return s.minFrac=eE(n),s.maxFrac=s.minFrac,X7(t,s,e,Ot.CurrencyGroup,Ot.CurrencyDecimal,i).replace(V7,r).replace(V7,"").trim()}function vE(t,e,r){let n=G7(e,Wu.Decimal),i=J7(n,Sr(e,Ot.MinusSign));return X7(t,i,e,Ot.Group,Ot.Decimal,r)}function J7(t,e="-"){let r={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(pE),i=n[0],o=n[1],s=i.indexOf(T4)!==-1?i.split(T4):[i.substring(0,i.lastIndexOf(fc)+1),i.substring(i.lastIndexOf(fc)+1)],a=s[0],c=s[1]||"";r.posPre=a.substring(0,a.indexOf(Ou));for(let u=0;u-1&&(e=e.replace(T4,"")),(o=e.search(/e/i))>0?(i<0&&(i=o),i+=+e.slice(o+1),e=e.substring(0,o)):i<0&&(i=e.length),o=0;e.charAt(o)===fc;o++);if(o===(a=e.length))n=[0],i=1;else{for(a--;e.charAt(a)===fc;)a--;for(i-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return i>H7&&(n=n.splice(0,H7-1),r=i-1,i=1),{digits:n,exponent:r,integerLen:i}}function bE(t,e,r){if(e>r)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${r}).`);let n=t.digits,i=n.length-t.integerLen,o=Math.min(Math.max(e,i),r),s=o+t.integerLen,a=n[s];if(s>0){n.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[s-1]++;for(;i=l?p.pop():c=!1),h>=10?1:0},0);u&&(n.unshift(u),t.integerLen++)}function Au(t){let e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}function eg(t,e,r){return w7(t,e,r)}function z4(t,e){e=encodeURIComponent(e);for(let r of t.split(";")){let n=r.indexOf("="),[i,o]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(i.trim()===e)return decodeURIComponent(o)}return null}var Fu=/\s+/,Y7=[],pc=(()=>{let e=class e{constructor(n,i){this._ngEl=n,this._renderer=i,this.initialClasses=Y7,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(Fu):Y7}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Fu):n}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let i of n)this._updateState(i,!0);else if(n!=null)for(let i of Object.keys(n))this._updateState(i,!!n[i]);this._applyStateDiff()}_updateState(n,i){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==i&&(o.changed=!0,o.enabled=i),o.touched=!0):this.stateMap.set(n,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let i=n[0],o=n[1];o.changed?(this._toggleClass(i,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),o.touched=!1}}_toggleClass(n,i){n=n.trim(),n.length>0&&n.split(Fu).forEach(o=>{i?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(st))},e.\u0275dir=ne({type:e,selectors:[["","ngClass",""]],inputs:{klass:[W.None,"class","klass"],ngClass:"ngClass"},standalone:!0});let t=e;return t})();var Ru=class{constructor(e,r,n,i){this.$implicit=e,this.ngForOf=r,this.index=n,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},mc=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,i,o){this._viewContainer=n,this._template=i,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let i=this._viewContainer;n.forEachOperation((o,s,a)=>{if(o.previousIndex==null)i.createEmbeddedView(this._template,new Ru(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)i.remove(s===null?void 0:s);else if(s!==null){let c=i.get(s);i.move(c,a),j7(c,o)}});for(let o=0,s=i.length;o{let s=i.get(o.currentIndex);j7(s,o)})}static ngTemplateContextGuard(n,i){return!0}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(cc))},e.\u0275dir=ne({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let t=e;return t})();function j7(t,e){t.context.$implicit=e.item}var nr=(()=>{let e=class e{constructor(n,i){this._viewContainer=n,this._context=new Lu,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){B7("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){B7("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,i){return!0}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me))},e.\u0275dir=ne({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let t=e;return t})(),Lu=class{constructor(){this.$implicit=null,this.ngIf=null}};function B7(t,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${t} must be a TemplateRef, but received '${$t(e)}'.`)}var _E=!0,E4=class{constructor(e,r){this._viewContainerRef=e,this._templateRef=r,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}},tg=(()=>{let e=class e{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(n){this._ngSwitch=n,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(n){this._defaultViews.push(n)}_matchCase(n){let i=_E?n===this._ngSwitch:n==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(n){if(this._defaultViews.length>0&&n!==this._defaultUsed){this._defaultUsed=n;for(let i of this._defaultViews)i.enforceState(n)}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});let t=e;return t})(),fK=(()=>{let e=class e{constructor(n,i,o){this.ngSwitch=o,o._addCase(),this._view=new E4(n,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(tg,9))},e.\u0275dir=ne({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});let t=e;return t})(),pK=(()=>{let e=class e{constructor(n,i,o){o._addDefault(new E4(n,i))}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(tg,9))},e.\u0275dir=ne({type:e,selectors:[["","ngSwitchDefault",""]],standalone:!0});let t=e;return t})();var _o=(()=>{let e=class e{constructor(n,i,o){this._ngEl=n,this._differs=i,this._renderer=o,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,i){let[o,s]=n.split("."),a=o.indexOf("-")===-1?void 0:br.DashCase;i!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,s?`${i}${s}`:i,a):this._renderer.removeStyle(this._ngEl.nativeElement,o,a)}_applyChanges(n){n.forEachRemovedItem(i=>this._setStyle(i.key,null)),n.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),n.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(du),m(st))},e.\u0275dir=ne({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let t=e;return t})(),gc=(()=>{let e=class e{constructor(n){this._viewContainerRef=n,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(n){if(this._shouldRecreateView(n)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,i,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,o):!1,get:(n,i,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,o)}})}};e.\u0275fac=function(i){return new(i||e)(m(Xe))},e.\u0275dir=ne({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[He]});let t=e;return t})();function I4(t,e){return new z(2100,!1)}var Hu=class{createSubscription(e,r){return t4(()=>e.subscribe({next:r,error:n=>{throw n}}))}dispose(e){t4(()=>e.unsubscribe())}},Vu=class{createSubscription(e,r){return e.then(r,n=>{throw n})}dispose(e){}},CE=new Vu,ME=new Hu,mK=(()=>{let e=class e{constructor(n){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=n}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(n){return this._obj?n!==this._obj?(this._dispose(),this.transform(n)):this._latestValue:(n&&this._subscribe(n),this._latestValue)}_subscribe(n){this._obj=n,this._strategy=this._selectStrategy(n),this._subscription=this._strategy.createSubscription(n,i=>this._updateLatestValue(n,i))}_selectStrategy(n){if(Us(n))return CE;if(Su(n))return ME;throw I4(e,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,i){n===this._obj&&(this._latestValue=i,this._ref.markForCheck())}};e.\u0275fac=function(i){return new(i||e)(m(ft,16))},e.\u0275pipe=en({name:"async",type:e,pure:!1,standalone:!0});let t=e;return t})();var DE="mediumDate",xE=new E("DATE_PIPE_DEFAULT_TIMEZONE"),SE=new E("DATE_PIPE_DEFAULT_OPTIONS"),gK=(()=>{let e=class e{constructor(n,i,o){this.locale=n,this.defaultTimezone=i,this.defaultOptions=o}transform(n,i,o,s){if(n==null||n===""||n!==n)return null;try{let a=i??this.defaultOptions?.dateFormat??DE,c=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Gu(n,a,s||this.locale,c)}catch(a){throw I4(e,a.message)}}};e.\u0275fac=function(i){return new(i||e)(m(Ii,16),m(xE,24),m(SE,24))},e.\u0275pipe=en({name:"date",type:e,pure:!0,standalone:!0});let t=e;return t})();var vK=(()=>{let e=class e{constructor(n){this._locale=n}transform(n,i,o){if(!ng(n))return null;o=o||this._locale;try{let s=rg(n);return vE(s,o,i)}catch(s){throw I4(e,s.message)}}};e.\u0275fac=function(i){return new(i||e)(m(Ii,16))},e.\u0275pipe=en({name:"number",type:e,pure:!0,standalone:!0});let t=e;return t})();var yK=(()=>{let e=class e{constructor(n,i="USD"){this._locale=n,this._defaultCurrencyCode=i}transform(n,i=this._defaultCurrencyCode,o="symbol",s,a){if(!ng(n))return null;a=a||this._locale,typeof o=="boolean"&&(o=o?"symbol":"code");let c=i||this._defaultCurrencyCode;o!=="code"&&(o==="symbol"||o==="symbol-narrow"?c=XT(c,o==="symbol"?"wide":"narrow",a):c=o);try{let l=rg(n);return gE(l,a,c,i,s)}catch(l){throw I4(e,l.message)}}};e.\u0275fac=function(i){return new(i||e)(m(Ii,16),m(P7,16))},e.\u0275pipe=en({name:"currency",type:e,pure:!0,standalone:!0});let t=e;return t})();function ng(t){return!(t==null||t===""||t!==t)}function rg(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new Error(`${t} is not a number`);return t}var vc=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})(),Ku="browser",TE="server";function Zu(t){return t===Ku}function yc(t){return t===TE}var Qu=(()=>{let e=class e{};e.\u0275prov=C({token:e,providedIn:"root",factory:()=>Zu(w(Yt))?new Yu(w(V),window):new ju});let t=e;return t})(),Yu=class{constructor(e,r){this.document=e,this.window=r,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){let r=EE(this.document,e);r&&(this.scrollToElement(r),r.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){let r=e.getBoundingClientRect(),n=r.left+this.window.pageXOffset,i=r.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(n-o[0],i-o[1])}};function EE(t,e){let r=t.getElementById(e)||t.getElementsByName(e)[0];if(r)return r;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),i=n.currentNode;for(;i;){let o=i.shadowRoot;if(o){let s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}i=n.nextNode()}}return null}var ju=class{setOffset(e){}getScrollPosition(){return[0,0]}scrollToPosition(e){}scrollToAnchor(e){}setHistoryScrollRestoration(e){}},Ks=class{};var bc=class{},Oi=class{},Co=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` +`).forEach(r=>{let n=r.indexOf(":");if(n>0){let i=r.slice(0,n),o=i.toLowerCase(),s=r.slice(n+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((r,n)=>{this.setHeaderEntries(n,r)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([r,n])=>{this.setHeaderEntries(r,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let r=this.headers.get(e.toLowerCase());return r&&r.length>0?r[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,r){return this.clone({name:e,value:r,op:"a"})}set(e,r){return this.clone({name:e,value:r,op:"s"})}delete(e,r){return this.clone({name:e,value:r,op:"d"})}maybeSetNormalizedName(e,r){this.normalizedNames.has(r)||this.normalizedNames.set(r,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?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(r=>{this.headers.set(r,e.headers.get(r)),this.normalizedNames.set(r,e.normalizedNames.get(r))})}clone(e){let r=new t;return r.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,r.lazyUpdate=(this.lazyUpdate||[]).concat([e]),r}applyUpdate(e){let r=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,r);let i=(e.op==="a"?this.headers.get(r):void 0)||[];i.push(...n),this.headers.set(r,i);break;case"d":let o=e.value;if(!o)this.headers.delete(r),this.normalizedNames.delete(r);else{let s=this.headers.get(r);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(r),this.normalizedNames.delete(r)):this.headers.set(r,s)}break}}setHeaderEntries(e,r){let n=(Array.isArray(r)?r:[r]).map(o=>o.toString()),i=e.toLowerCase();this.headers.set(i,n),this.maybeSetNormalizedName(e,i)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(r=>e(this.normalizedNames.get(r),this.headers.get(r)))}};var e6=class{encodeKey(e){return ig(e)}encodeValue(e){return ig(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function kE(t,e){let r=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(i=>{let o=i.indexOf("="),[s,a]=o==-1?[e.decodeKey(i),""]:[e.decodeKey(i.slice(0,o)),e.decodeValue(i.slice(o+1))],c=r.get(s)||[];c.push(a),r.set(s,c)}),r}var PE=/%(\d[a-f0-9])/gi,OE={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ig(t){return encodeURIComponent(t).replace(PE,(e,r)=>OE[r]??e)}function k4(t){return`${t}`}var rr=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new e6,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=kE(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(r=>{let n=e.fromObject[r],i=Array.isArray(n)?n.map(k4):[k4(n)];this.map.set(r,i)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let r=this.map.get(e);return r?r[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,r){return this.clone({param:e,value:r,op:"a"})}appendAll(e){let r=[];return Object.keys(e).forEach(n=>{let i=e[n];Array.isArray(i)?i.forEach(o=>{r.push({param:n,value:o,op:"a"})}):r.push({param:n,value:i,op:"a"})}),this.clone(r)}set(e,r){return this.clone({param:e,value:r,op:"s"})}delete(e,r){return this.clone({param:e,value:r,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let r=this.encoder.encodeKey(e);return this.map.get(e).map(n=>r+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let r=new t({encoder:this.encoder});return r.cloneFrom=this.cloneFrom||this,r.updates=(this.updates||[]).concat(e),r}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 r=(e.op==="a"?this.map.get(e.param):void 0)||[];r.push(k4(e.value)),this.map.set(e.param,r);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],i=n.indexOf(k4(e.value));i!==-1&&n.splice(i,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)}},Qs=class{constructor(e){this.defaultValue=e}},t6=class{constructor(){this.map=new Map}set(e,r){return this.map.set(e,r),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function AE(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function og(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function sg(t){return typeof Blob<"u"&&t instanceof Blob}function ag(t){return typeof FormData<"u"&&t instanceof FormData}function FE(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var wc=class t{constructor(e,r,n,i){this.url=r,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let o;if(AE(this.method)||i?(this.body=n!==void 0?n:null,o=i):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers||(this.headers=new Co),this.context||(this.context=new t6),!this.params)this.params=new rr,this.urlWithParams=r;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=r;else{let a=r.indexOf("?"),c=a===-1?"?":ad.set(h,e.setHeaders[h]),c)),e.setParams&&(l=Object.keys(e.setParams).reduce((d,h)=>d.set(h,e.setParams[h]),l)),new t(r,n,o,{params:l,headers:c,context:u,reportProgress:a,responseType:i,withCredentials:s})}},Zs=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(Zs||{}),_c=class{constructor(e,r=A4.Ok,n="OK"){this.headers=e.headers||new Co,this.status=e.status!==void 0?e.status:r,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},n6=class t extends _c{constructor(e={}){super(e),this.type=Zs.ResponseHeader}clone(e={}){return new t({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})}},P4=class t extends _c{constructor(e={}){super(e),this.type=Zs.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({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})}},O4=class extends _c{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,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}},A4=function(t){return t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Processing=102]="Processing",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultiStatus=207]="MultiStatus",t[t.AlreadyReported=208]="AlreadyReported",t[t.ImUsed=226]="ImUsed",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.Unused=306]="Unused",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.MisdirectedRequest=421]="MisdirectedRequest",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.Locked=423]="Locked",t[t.FailedDependency=424]="FailedDependency",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",t}(A4||{});function Ju(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var Cc=(()=>{let e=class e{constructor(n){this.handler=n}request(n,i,o={}){let s;if(n instanceof wc)s=n;else{let l;o.headers instanceof Co?l=o.headers:l=new Co(o.headers);let u;o.params&&(o.params instanceof rr?u=o.params:u=new rr({fromObject:o.params})),s=new wc(n,i,o.body!==void 0?o.body:null,{headers:l,context:o.context,params:u,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=A(s).pipe(Vr(l=>this.handler.handle(l)));if(n instanceof wc||o.observe==="events")return a;let c=a.pipe(ge(l=>l instanceof P4));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(Z(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return c.pipe(Z(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return c.pipe(Z(l=>{if(l.body!==null&&typeof l.body!="string")throw new Error("Response is not a string.");return l.body}));case"json":default:return c.pipe(Z(l=>l.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,i={}){return this.request("DELETE",n,i)}get(n,i={}){return this.request("GET",n,i)}head(n,i={}){return this.request("HEAD",n,i)}jsonp(n,i){return this.request("JSONP",n,{params:new rr().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,i={}){return this.request("OPTIONS",n,i)}patch(n,i,o={}){return this.request("PATCH",n,Ju(o,i))}post(n,i,o={}){return this.request("POST",n,Ju(o,i))}put(n,i,o={}){return this.request("PUT",n,Ju(o,i))}};e.\u0275fac=function(i){return new(i||e)(g(bc))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function NE(t,e){return e(t)}function RE(t,e,r){return(n,i)=>Mr(r,()=>e(n,o=>t(o,i)))}var r6=new E(""),LE=new E(""),HE=new E("");var cg=(()=>{let e=class e extends bc{constructor(n,i){super(),this.backend=n,this.injector=i,this.chain=null,this.pendingTasks=w(Ws);let o=w(HE,{optional:!0});this.backend=o??n}handle(n){if(this.chain===null){let o=Array.from(new Set([...this.injector.get(r6),...this.injector.get(LE,[])]));this.chain=o.reduceRight((s,a)=>RE(s,a,this.injector),NE)}let i=this.pendingTasks.add();return this.chain(n,o=>this.backend.handle(o)).pipe(un(()=>this.pendingTasks.remove(i)))}};e.\u0275fac=function(i){return new(i||e)(g(Oi),g(qt))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();var VE=/^\)\]\}',?\n/;function YE(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var lg=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new z(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?Le(i.\u0275loadImpl()):A(null)).pipe(Ze(()=>new Y(s=>{let a=i.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((v,M)=>a.setRequestHeader(v,M.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let v=n.detectContentTypeHeader();v!==null&&a.setRequestHeader("Content-Type",v)}if(n.responseType){let v=n.responseType.toLowerCase();a.responseType=v!=="json"?v:"text"}let c=n.serializeBody(),l=null,u=()=>{if(l!==null)return l;let v=a.statusText||"OK",M=new Co(a.getAllResponseHeaders()),P=YE(a)||n.url;return l=new n6({headers:M,status:a.status,statusText:v,url:P}),l},d=()=>{let{headers:v,status:M,statusText:P,url:X}=u(),$=null;M!==A4.NoContent&&($=typeof a.response>"u"?a.responseText:a.response),M===0&&(M=$?A4.Ok:0);let Ae=M>=200&&M<300;if(n.responseType==="json"&&typeof $=="string"){let _e=$;$=$.replace(VE,"");try{$=$!==""?JSON.parse($):null}catch(Ee){$=_e,Ae&&(Ae=!1,$={error:Ee,text:$})}}Ae?(s.next(new P4({body:$,headers:v,status:M,statusText:P,url:X||void 0})),s.complete()):s.error(new O4({error:$,headers:v,status:M,statusText:P,url:X||void 0}))},h=v=>{let{url:M}=u(),P=new O4({error:v,status:a.status||0,statusText:a.statusText||"Unknown Error",url:M||void 0});s.error(P)},f=!1,p=v=>{f||(s.next(u()),f=!0);let M={type:Zs.DownloadProgress,loaded:v.loaded};v.lengthComputable&&(M.total=v.total),n.responseType==="text"&&a.responseText&&(M.partialText=a.responseText),s.next(M)},y=v=>{let M={type:Zs.UploadProgress,loaded:v.loaded};v.lengthComputable&&(M.total=v.total),s.next(M)};return a.addEventListener("load",d),a.addEventListener("error",h),a.addEventListener("timeout",h),a.addEventListener("abort",h),n.reportProgress&&(a.addEventListener("progress",p),c!==null&&a.upload&&a.upload.addEventListener("progress",y)),a.send(c),s.next({type:Zs.Sent}),()=>{a.removeEventListener("error",h),a.removeEventListener("abort",h),a.removeEventListener("load",d),a.removeEventListener("timeout",h),n.reportProgress&&(a.removeEventListener("progress",p),c!==null&&a.upload&&a.upload.removeEventListener("progress",y)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(i){return new(i||e)(g(Ks))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ug=new E("XSRF_ENABLED"),jE="XSRF-TOKEN",BE=new E("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>jE}),UE="X-XSRF-TOKEN",$E=new E("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>UE}),F4=class{},qE=(()=>{let e=class e{constructor(n,i,o){this.doc=n,this.platform=i,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=z4(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(i){return new(i||e)(g(V),g(Yt),g(BE))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function WE(t,e){let r=t.url.toLowerCase();if(!w(ug)||t.method==="GET"||t.method==="HEAD"||r.startsWith("http://")||r.startsWith("https://"))return e(t);let n=w(F4).getToken(),i=w($E);return n!=null&&!t.headers.has(i)&&(t=t.clone({headers:t.headers.set(i,n)})),e(t)}var dg=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(dg||{});function GE(t,e){return{\u0275kind:t,\u0275providers:e}}function kK(...t){let e=[Cc,lg,cg,{provide:bc,useExisting:cg},{provide:Oi,useExisting:lg},{provide:r6,useValue:WE,multi:!0},{provide:ug,useValue:!0},{provide:F4,useClass:qE}];for(let r of t)e.push(...r.\u0275providers);return Wt(e)}function PK(t){return GE(dg.Interceptors,t.map(e=>({provide:r6,useValue:e,multi:!0})))}var s6=class extends x4{constructor(){super(...arguments),this.supportsDOMEvents=!0}},a6=class t extends s6{static makeCurrent(){U7(new t)}onAndCancel(e,r,n){return e.addEventListener(r,n),()=>{e.removeEventListener(r,n)}}dispatchEvent(e,r){e.dispatchEvent(r)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,r){return r=r||this.getDefaultDocument(),r.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,r){return r==="window"?window:r==="document"?e:r==="body"?e.body:null}getBaseHref(e){let r=KE();return r==null?null:ZE(r)}resetBaseElement(){Mc=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return z4(document.cookie,e)}},Mc=null;function KE(){return Mc=Mc||document.querySelector("base"),Mc?Mc.getAttribute("href"):null}function ZE(t){return new URL(t,document.baseURI).pathname}var QE=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),c6=new E("EventManagerPlugins"),mg=(()=>{let e=class e{constructor(n,i){this._zone=i,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,i,o){return this._findPluginFor(i).addEventListener(n,i,o)}getZone(){return this._zone}_findPluginFor(n){let i=this._eventNameToPlugin.get(n);if(i)return i;if(i=this._plugins.find(s=>s.supports(n)),!i)throw new z(5101,!1);return this._eventNameToPlugin.set(n,i),i}};e.\u0275fac=function(i){return new(i||e)(g(c6),g(U))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),N4=class{constructor(e){this._doc=e}},i6="ng-app-id",gg=(()=>{let e=class e{constructor(n,i,o,s={}){this.doc=n,this.appId=i,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=yc(s),this.resetHostNodes()}addStyles(n){for(let i of n)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(n){for(let i of n)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(i=>i.remove()),n.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let i of this.getAllStyles())this.addStyleToHost(n,i)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let i of this.hostNodes)this.addStyleToHost(i,n)}onStyleRemoved(n){let i=this.styleRef;i.get(n)?.elements?.forEach(o=>o.remove()),i.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${i6}="${this.appId}"]`);if(n?.length){let i=new Map;return n.forEach(o=>{o.textContent!=null&&i.set(o.textContent,o)}),i}return null}changeUsageCount(n,i){let o=this.styleRef;if(o.has(n)){let s=o.get(n);return s.usage+=i,s.usage}return o.set(n,{usage:i,elements:[]}),i}getStyleElement(n,i){let o=this.styleNodesInDOM,s=o?.get(i);if(s?.parentNode===n)return o.delete(i),s.removeAttribute(i6),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(i6,this.appId),n.appendChild(a),a}}addStyleToHost(n,i){let o=this.getStyleElement(n,i),s=this.styleRef,a=s.get(i)?.elements;a?a.push(o):s.set(i,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(K1),g(qr,8),g(Yt))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),o6={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},u6=/%COMP%/g,vg="%COMP%",XE=`_nghost-${vg}`,JE=`_ngcontent-${vg}`,ez=!0,tz=new E("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>ez});function nz(t){return JE.replace(u6,t)}function rz(t){return XE.replace(u6,t)}function yg(t,e){return e.map(r=>r.replace(u6,t))}var R4=(()=>{let e=class e{constructor(n,i,o,s,a,c,l,u=null){this.eventManager=n,this.sharedStylesHost=i,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=l,this.nonce=u,this.rendererByCompId=new Map,this.platformIsServer=yc(c),this.defaultRenderer=new Dc(n,a,l,this.platformIsServer)}createRenderer(n,i){if(!n||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===vr.ShadowDom&&(i=ke(b({},i),{encapsulation:vr.Emulated}));let o=this.getOrCreateRenderer(n,i);return o instanceof L4?o.applyToHost(n):o instanceof xc&&o.applyStyles(),o}getOrCreateRenderer(n,i){let o=this.rendererByCompId,s=o.get(i.id);if(!s){let a=this.doc,c=this.ngZone,l=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(i.encapsulation){case vr.Emulated:s=new L4(l,u,i,this.appId,d,a,c,h);break;case vr.ShadowDom:return new l6(l,u,n,i,a,c,this.nonce,h);default:s=new xc(l,u,i,d,a,c,h);break}o.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(i){return new(i||e)(g(mg),g(gg),g(K1),g(tz),g(V),g(Yt),g(U),g(qr))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),Dc=class{constructor(e,r,n,i){this.eventManager=e,this.doc=r,this.ngZone=n,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,r){return r?this.doc.createElementNS(o6[r]||r,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,r){(fg(e)?e.content:e).appendChild(r)}insertBefore(e,r,n){e&&(fg(e)?e.content:e).insertBefore(r,n)}removeChild(e,r){e&&e.removeChild(r)}selectRootElement(e,r){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new z(-5104,!1);return r||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,r,n,i){if(i){r=i+":"+r;let o=o6[i];o?e.setAttributeNS(o,r,n):e.setAttribute(r,n)}else e.setAttribute(r,n)}removeAttribute(e,r,n){if(n){let i=o6[n];i?e.removeAttributeNS(i,r):e.removeAttribute(`${n}:${r}`)}else e.removeAttribute(r)}addClass(e,r){e.classList.add(r)}removeClass(e,r){e.classList.remove(r)}setStyle(e,r,n,i){i&(br.DashCase|br.Important)?e.style.setProperty(r,n,i&br.Important?"important":""):e.style[r]=n}removeStyle(e,r,n){n&br.DashCase?e.style.removeProperty(r):e.style[r]=""}setProperty(e,r,n){e!=null&&(e[r]=n)}setValue(e,r){e.nodeValue=r}listen(e,r,n){if(typeof e=="string"&&(e=Gs().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${r}`);return this.eventManager.addEventListener(e,r,this.decoratePreventDefault(n))}decoratePreventDefault(e){return r=>{if(r==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(r)):e(r))===!1&&r.preventDefault()}}};function fg(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var l6=class extends Dc{constructor(e,r,n,i,o,s,a,c){super(e,o,s,c),this.sharedStylesHost=r,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=yg(i.id,i.styles);for(let u of l){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=u,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,r){return super.appendChild(this.nodeOrShadowRoot(e),r)}insertBefore(e,r,n){return super.insertBefore(this.nodeOrShadowRoot(e),r,n)}removeChild(e,r){return super.removeChild(this.nodeOrShadowRoot(e),r)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},xc=class extends Dc{constructor(e,r,n,i,o,s,a,c){super(e,o,s,a),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=i,this.styles=c?yg(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},L4=class extends xc{constructor(e,r,n,i,o,s,a,c){let l=i+"-"+n.id;super(e,r,n,o,s,a,c,l),this.contentAttr=nz(l),this.hostAttr=rz(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,r){let n=super.createElement(e,r);return super.setAttribute(n,this.contentAttr,""),n}},iz=(()=>{let e=class e extends N4{constructor(n){super(n)}supports(n){return!0}addEventListener(n,i,o){return n.addEventListener(i,o,!1),()=>this.removeEventListener(n,i,o)}removeEventListener(n,i,o){return n.removeEventListener(i,o)}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),pg=["alt","control","meta","shift"],oz={"\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"},sz={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},az=(()=>{let e=class e extends N4{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,i,o){let s=e.parseEventName(i),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Gs().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let i=n.toLowerCase().split("."),o=i.shift();if(i.length===0||!(o==="keydown"||o==="keyup"))return null;let s=e._normalizeKey(i.pop()),a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),pg.forEach(u=>{let d=i.indexOf(u);d>-1&&(i.splice(d,1),a+=u+".")}),a+=s,i.length!=0||s.length===0)return null;let l={};return l.domEventName=o,l.fullKey=a,l}static matchEventFullKeyCode(n,i){let o=oz[n.key]||n.key,s="";return i.indexOf("code.")>-1&&(o=n.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),pg.forEach(a=>{if(a!==o){let c=sz[a];c(n)&&(s+=a+".")}}),s+=o,s===i)}static eventCallback(n,i,o){return s=>{e.matchEventFullKeyCode(s,n)&&o.runGuarded(()=>i(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function KK(t,e){return A7(b({rootComponent:t},cz(e)))}function cz(t){return{appProviders:[...fz,...t?.providers??[]],platformProviders:hz}}function lz(){a6.makeCurrent()}function uz(){return new _r}function dz(){return sm(document),document}var hz=[{provide:Yt,useValue:Ku},{provide:ru,useValue:lz,multi:!0},{provide:V,useFactory:dz,deps:[]}];var fz=[{provide:G1,useValue:"root"},{provide:_r,useFactory:uz,deps:[]},{provide:c6,useClass:iz,multi:!0,deps:[V,U,Yt]},{provide:c6,useClass:az,multi:!0,deps:[V]},R4,gg,mg,{provide:Jn,useExisting:R4},{provide:Ks,useClass:QE,deps:[]},[]];function pz(){return new Sc(g(V))}var Sc=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:function(i){let o=null;return i?o=new i:o=pz(),o},providedIn:"root"});let t=e;return t})();var Mo=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:function(i){let o=null;return i?o=new(i||e):o=g(wg),o},providedIn:"root"});let t=e;return t})();function mz(t){return new wg(t.get(V))}var wg=(()=>{let e=class e extends Mo{constructor(n){super(),this._doc=n}sanitize(n,i){if(i==null)return null;switch(n){case yn.NONE:return i;case yn.HTML:return Wr(i,"HTML")?vn(i):au(this._doc,String(i)).toString();case yn.STYLE:return Wr(i,"Style")?vn(i):i;case yn.SCRIPT:if(Wr(i,"Script"))return vn(i);throw new z(5200,!1);case yn.URL:return Wr(i,"URL")?vn(i):e4(String(i));case yn.RESOURCE_URL:if(Wr(i,"ResourceURL"))return vn(i);throw new z(5201,!1);default:throw new z(5202,!1)}}bypassSecurityTrustHtml(n){return Cm(n)}bypassSecurityTrustStyle(n){return Mm(n)}bypassSecurityTrustScript(n){return Dm(n)}bypassSecurityTrustUrl(n){return xm(n)}bypassSecurityTrustResourceUrl(n){return Sm(n)}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:function(i){let o=null;return i?o=new i:o=mz(g(Ue)),o},providedIn:"root"});let t=e;return t})();var ve="primary",jc=Symbol("RouteTitle"),g6=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r[0]:r}return null}getAll(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}};function na(t){return new g6(t)}function gz(t,e,r){let n=r.path.split("/");if(n.length>t.length||r.pathMatch==="full"&&(e.hasChildren()||n.lengthn[o]===i)}else return t===e}function Ri(t){return Tn(t)?t:Us(t)?Le(Promise.resolve(t)):A(t)}var yz={exact:Ig,subset:kg},zg={exact:wz,subset:bz,ignored:()=>!0};function bg(t,e,r){return yz[r.paths](t.root,e.root,r.matrixParams)&&zg[r.queryParams](t.queryParams,e.queryParams)&&!(r.fragment==="exact"&&t.fragment!==e.fragment)}function wz(t,e){return Er(t,e)}function Ig(t,e,r){if(!xo(t.segments,e.segments)||!Y4(t.segments,e.segments,r)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!t.children[n]||!Ig(t.children[n],e.children[n],r))return!1;return!0}function bz(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(r=>Eg(t[r],e[r]))}function kg(t,e,r){return Pg(t,e,e.segments,r)}function Pg(t,e,r,n){if(t.segments.length>r.length){let i=t.segments.slice(0,r.length);return!(!xo(i,r)||e.hasChildren()||!Y4(i,r,n))}else if(t.segments.length===r.length){if(!xo(t.segments,r)||!Y4(t.segments,r,n))return!1;for(let i in e.children)if(!t.children[i]||!kg(t.children[i],e.children[i],n))return!1;return!0}else{let i=r.slice(0,t.segments.length),o=r.slice(t.segments.length);return!xo(t.segments,i)||!Y4(t.segments,i,n)||!t.children[ve]?!1:Pg(t.children[ve],e,o,n)}}function Y4(t,e,r){return e.every((n,i)=>zg[r](t[i].parameters,n.parameters))}var Ai=class{constructor(e=new Ne([],{}),r={},n=null){this.root=e,this.queryParams=r,this.fragment=n}get queryParamMap(){return this._queryParamMap??=na(this.queryParams),this._queryParamMap}toString(){return Mz.serialize(this)}},Ne=class{constructor(e,r){this.segments=e,this.children=r,this.parent=null,Object.values(r).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return j4(this)}},Do=class{constructor(e,r){this.path=e,this.parameters=r}get parameterMap(){return this._parameterMap??=na(this.parameters),this._parameterMap}toString(){return Ag(this)}};function _z(t,e){return xo(t,e)&&t.every((r,n)=>Er(r.parameters,e[n].parameters))}function xo(t,e){return t.length!==e.length?!1:t.every((r,n)=>r.path===e[n].path)}function Cz(t,e){let r=[];return Object.entries(t.children).forEach(([n,i])=>{n===ve&&(r=r.concat(e(i,n)))}),Object.entries(t.children).forEach(([n,i])=>{n!==ve&&(r=r.concat(e(i,n)))}),r}var sa=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>new Oc,providedIn:"root"});let t=e;return t})(),Oc=class{parse(e){let r=new w6(e);return new Ai(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(e){let r=`/${Tc(e.root,!0)}`,n=Sz(e.queryParams),i=typeof e.fragment=="string"?`#${Dz(e.fragment)}`:"";return`${r}${n}${i}`}},Mz=new Oc;function j4(t){return t.segments.map(e=>Ag(e)).join("/")}function Tc(t,e){if(!t.hasChildren())return j4(t);if(e){let r=t.children[ve]?Tc(t.children[ve],!1):"",n=[];return Object.entries(t.children).forEach(([i,o])=>{i!==ve&&n.push(`${i}:${Tc(o,!1)}`)}),n.length>0?`${r}(${n.join("//")})`:r}else{let r=Cz(t,(n,i)=>i===ve?[Tc(t.children[ve],!1)]:[`${i}:${Tc(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[ve]!=null?`${j4(t)}/${r[0]}`:`${j4(t)}/(${r.join("//")})`}}function Og(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function H4(t){return Og(t).replace(/%3B/gi,";")}function Dz(t){return encodeURI(t)}function y6(t){return Og(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function B4(t){return decodeURIComponent(t)}function _g(t){return B4(t.replace(/\+/g,"%20"))}function Ag(t){return`${y6(t.path)}${xz(t.parameters)}`}function xz(t){return Object.entries(t).map(([e,r])=>`;${y6(e)}=${y6(r)}`).join("")}function Sz(t){let e=Object.entries(t).map(([r,n])=>Array.isArray(n)?n.map(i=>`${H4(r)}=${H4(i)}`).join("&"):`${H4(r)}=${H4(n)}`).filter(r=>r);return e.length?`?${e.join("&")}`:""}var Tz=/^[^\/()?;#]+/;function h6(t){let e=t.match(Tz);return e?e[0]:""}var Ez=/^[^\/()?;=#]+/;function zz(t){let e=t.match(Ez);return e?e[0]:""}var Iz=/^[^=?&#]+/;function kz(t){let e=t.match(Iz);return e?e[0]:""}var Pz=/^[^&#]+/;function Oz(t){let e=t.match(Pz);return e?e[0]:""}var w6=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ne([],{}):new Ne([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(r).length>0)&&(n[ve]=new Ne(e,r)),n}parseSegment(){let e=h6(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new z(4009,!1);return this.capture(e),new Do(B4(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let r=zz(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let i=h6(this.remaining);i&&(n=i,this.capture(n))}e[B4(r)]=B4(n)}parseQueryParam(e){let r=kz(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let s=Oz(this.remaining);s&&(n=s,this.capture(n))}let i=_g(r),o=_g(n);if(e.hasOwnProperty(i)){let s=e[i];Array.isArray(s)||(s=[s],e[i]=s),s.push(o)}else e[i]=o}parseParens(e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=h6(this.remaining),i=this.remaining[n.length];if(i!=="/"&&i!==")"&&i!==";")throw new z(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=ve);let s=this.parseChildren();r[o]=Object.keys(s).length===1?s[ve]:new Ne([],s),this.consumeOptional("//")}return r}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new z(4011,!1)}};function Fg(t){return t.segments.length>0?new Ne([],{[ve]:t}):t}function Ng(t){let e={};for(let[n,i]of Object.entries(t.children)){let o=Ng(i);if(n===ve&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[n]=o)}let r=new Ne(t.segments,e);return Az(r)}function Az(t){if(t.numberOfChildren===1&&t.children[ve]){let e=t.children[ve];return new Ne(t.segments.concat(e.segments),e.children)}return t}function ra(t){return t instanceof Ai}function Fz(t,e,r=null,n=null){let i=Rg(t);return Lg(i,e,r,n)}function Rg(t){let e;function r(o){let s={};for(let c of o.children){let l=r(c);s[c.outlet]=l}let a=new Ne(o.url,s);return o===t&&(e=a),a}let n=r(t.root),i=Fg(n);return e??i}function Lg(t,e,r,n){let i=t;for(;i.parent;)i=i.parent;if(e.length===0)return f6(i,i,i,r,n);let o=Nz(e);if(o.toRoot())return f6(i,i,new Ne([],{}),r,n);let s=Rz(o,i,t),a=s.processChildren?Ic(s.segmentGroup,s.index,o.commands):Vg(s.segmentGroup,s.index,o.commands);return f6(i,s.segmentGroup,a,r,n)}function U4(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Ac(t){return typeof t=="object"&&t!=null&&t.outlets}function f6(t,e,r,n,i){let o={};n&&Object.entries(n).forEach(([c,l])=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`});let s;t===e?s=r:s=Hg(t,e,r);let a=Fg(Ng(s));return new Ai(a,o,i)}function Hg(t,e,r){let n={};return Object.entries(t.children).forEach(([i,o])=>{o===e?n[i]=r:n[i]=Hg(o,e,r)}),new Ne(t.segments,n)}var $4=class{constructor(e,r,n){if(this.isAbsolute=e,this.numberOfDoubleDots=r,this.commands=n,e&&n.length>0&&U4(n[0]))throw new z(4003,!1);let i=n.find(Ac);if(i&&i!==n.at(-1))throw new z(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Nz(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new $4(!0,0,t);let e=0,r=!1,n=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,l])=>{a[c]=typeof l=="string"?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?r=!0:a===".."?e++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new $4(r,e,n)}var ea=class{constructor(e,r,n){this.segmentGroup=e,this.processChildren=r,this.index=n}};function Rz(t,e,r){if(t.isAbsolute)return new ea(e,!0,0);if(!r)return new ea(e,!1,NaN);if(r.parent===null)return new ea(r,!0,0);let n=U4(t.commands[0])?0:1,i=r.segments.length-1+n;return Lz(r,i,t.numberOfDoubleDots)}function Lz(t,e,r){let n=t,i=e,o=r;for(;o>i;){if(o-=i,n=n.parent,!n)throw new z(4005,!1);i=n.segments.length}return new ea(n,!1,i-o)}function Hz(t){return Ac(t[0])?t[0].outlets:{[ve]:t}}function Vg(t,e,r){if(t??=new Ne([],{}),t.segments.length===0&&t.hasChildren())return Ic(t,e,r);let n=Vz(t,e,r),i=r.slice(n.commandIndex);if(n.match&&n.pathIndexo!==ve)&&t.children[ve]&&t.numberOfChildren===1&&t.children[ve].segments.length===0){let o=Ic(t.children[ve],e,r);return new Ne(t.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=Vg(t.children[o],e,s))}),Object.entries(t.children).forEach(([o,s])=>{n[o]===void 0&&(i[o]=s)}),new Ne(t.segments,i)}}function Vz(t,e,r){let n=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};for(;i=r.length)return o;let s=t.segments[i],a=r[n];if(Ac(a))break;let c=`${a}`,l=n0&&c===void 0)break;if(c&&l&&typeof l=="object"&&l.outlets===void 0){if(!Mg(c,l,s))return o;n+=2}else{if(!Mg(c,{},s))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}function b6(t,e,r){let n=t.segments.slice(0,e),i=0;for(;i{typeof n=="string"&&(n=[n]),n!==null&&(e[r]=b6(new Ne([],{}),0,n))}),e}function Cg(t){let e={};return Object.entries(t).forEach(([r,n])=>e[r]=`${n}`),e}function Mg(t,e,r){return t==r.path&&Er(e,r.parameters)}var kc="imperative",Tt=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(Tt||{}),Nn=class{constructor(e,r){this.id=e,this.url=r}},ia=class extends Nn{constructor(e,r,n="imperative",i=null){super(e,r),this.type=Tt.NavigationStart,this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},zr=class extends Nn{constructor(e,r,n){super(e,r),this.urlAfterRedirects=n,this.type=Tt.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Fn=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(Fn||{}),q4=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(q4||{}),Fi=class extends Nn{constructor(e,r,n,i){super(e,r),this.reason=n,this.code=i,this.type=Tt.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Ni=class extends Nn{constructor(e,r,n,i){super(e,r),this.reason=n,this.code=i,this.type=Tt.NavigationSkipped}},Fc=class extends Nn{constructor(e,r,n,i){super(e,r),this.error=n,this.target=i,this.type=Tt.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},W4=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},_6=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},C6=class extends Nn{constructor(e,r,n,i,o){super(e,r),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=o,this.type=Tt.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},M6=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},D6=class extends Nn{constructor(e,r,n,i){super(e,r),this.urlAfterRedirects=n,this.state=i,this.type=Tt.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},x6=class{constructor(e){this.route=e,this.type=Tt.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},S6=class{constructor(e){this.route=e,this.type=Tt.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},T6=class{constructor(e){this.snapshot=e,this.type=Tt.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},E6=class{constructor(e){this.snapshot=e,this.type=Tt.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},z6=class{constructor(e){this.snapshot=e,this.type=Tt.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},I6=class{constructor(e){this.snapshot=e,this.type=Tt.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},G4=class{constructor(e,r,n){this.routerEvent=e,this.position=r,this.anchor=n,this.type=Tt.Scroll}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},Nc=class{},Rc=class{constructor(e){this.url=e}};var k6=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Bc,this.attachRef=null}},Bc=(()=>{let e=class e{constructor(){this.contexts=new Map}onChildOutletCreated(n,i){let o=this.getOrCreateContext(n);o.outlet=i,this.contexts.set(n,o)}onChildOutletDestroyed(n){let i=this.getContext(n);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let i=this.getContext(n);return i||(i=new k6,this.contexts.set(n,i)),i}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),K4=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let r=this.pathFromRoot(e);return r.length>1?r[r.length-2]:null}children(e){let r=P6(e,this._root);return r?r.children.map(n=>n.value):[]}firstChild(e){let r=P6(e,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(e){let r=O6(e,this._root);return r.length<2?[]:r[r.length-2].children.map(i=>i.value).filter(i=>i!==e)}pathFromRoot(e){return O6(e,this._root).map(r=>r.value)}};function P6(t,e){if(t===e.value)return e;for(let r of e.children){let n=P6(t,r);if(n)return n}return null}function O6(t,e){if(t===e.value)return[e];for(let r of e.children){let n=O6(t,r);if(n.length)return n.unshift(e),n}return[]}var _n=class{constructor(e,r){this.value=e,this.children=r}toString(){return`TreeNode(${this.value})`}};function Js(t){let e={};return t&&t.children.forEach(r=>e[r.value.outlet]=r),e}var Z4=class extends K4{constructor(e,r){super(e),this.snapshot=r,B6(this,e)}toString(){return this.snapshot.toString()}};function Yg(t){let e=jz(t),r=new Re([new Do("",{})]),n=new Re({}),i=new Re({}),o=new Re({}),s=new Re(""),a=new Ir(r,n,o,s,i,ve,t,e.root);return a.snapshot=e.root,new Z4(new _n(a,[]),e)}function jz(t){let e={},r={},n={},i="",o=new Lc([],e,n,i,r,ve,t,null,{});return new Q4("",new _n(o,[]))}var Ir=class{constructor(e,r,n,i,o,s,a,c){this.urlSubject=e,this.paramsSubject=r,this.queryParamsSubject=n,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(Z(l=>l[jc]))??A(void 0),this.url=e,this.params=r,this.queryParams=n,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Z(e=>na(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Z(e=>na(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function j6(t,e,r="emptyOnly"){let n,{routeConfig:i}=t;return e!==null&&(r==="always"||i?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:b(b({},e.params),t.params),data:b(b({},e.data),t.data),resolve:b(b(b(b({},t.data),e.data),i?.data),t._resolvedData)}:n={params:b({},t.params),data:b({},t.data),resolve:b(b({},t.data),t._resolvedData??{})},i&&Bg(i)&&(n.resolve[jc]=i.title),n}var Lc=class{get title(){return this.data?.[jc]}constructor(e,r,n,i,o,s,a,c,l){this.url=e,this.params=r,this.queryParams=n,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=na(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=na(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),r=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${r}')`}},Q4=class extends K4{constructor(e,r){super(r),this.url=e,B6(this,r)}toString(){return jg(this._root)}};function B6(t,e){e.value._routerState=t,e.children.forEach(r=>B6(t,r))}function jg(t){let e=t.children.length>0?` { ${t.children.map(jg).join(", ")} } `:"";return`${t.value}${e}`}function p6(t){if(t.snapshot){let e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,Er(e.queryParams,r.queryParams)||t.queryParamsSubject.next(r.queryParams),e.fragment!==r.fragment&&t.fragmentSubject.next(r.fragment),Er(e.params,r.params)||t.paramsSubject.next(r.params),vz(e.url,r.url)||t.urlSubject.next(r.url),Er(e.data,r.data)||t.dataSubject.next(r.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function A6(t,e){let r=Er(t.params,e.params)&&_z(t.url,e.url),n=!t.parent!=!e.parent;return r&&!n&&(!t.parent||A6(t.parent,e.parent))}function Bg(t){return typeof t.title=="string"||t.title===null}var Bz=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=ve,this.activateEvents=new re,this.deactivateEvents=new re,this.attachEvents=new re,this.detachEvents=new re,this.parentContexts=w(Bc),this.location=w(Xe),this.changeDetector=w(ft),this.environmentInjector=w(qt),this.inputBinder=w(t2,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:i,previousValue:o}=n.name;if(i)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new z(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new z(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new z(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,i){this.activated=n,this._activatedRoute=i,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,i){if(this.isActivated)throw new z(4013,!1);this._activatedRoute=n;let o=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,l=new F6(n,c,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:l,environmentInjector:i??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[He]});let t=e;return t})(),F6=class{constructor(e,r,n){this.route=e,this.childContexts=r,this.parent=n}get(e,r){return e===Ir?this.route:e===Bc?this.childContexts:this.parent.get(e,r)}},t2=new E(""),Dg=(()=>{let e=class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){let{activatedRoute:i}=n,o=Ji([i.queryParams,i.params,i.data]).pipe(Ze(([s,a,c],l)=>(c=b(b(b({},s),a),c),l===0?A(c):Promise.resolve(c)))).subscribe(s=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(n);return}let a=F7(i.component);if(!a){this.unsubscribeFromRouteData(n);return}for(let{templateName:c}of a.inputs)n.activatedComponentRef.setInput(c,s[c])});this.outletDataSubscriptions.set(n,o)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function Uz(t,e,r){let n=Hc(t,e._root,r?r._root:void 0);return new Z4(n,e)}function Hc(t,e,r){if(r&&t.shouldReuseRoute(e.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=e.value;let i=$z(t,e,r);return new _n(n,i)}else{if(t.shouldAttach(e.value)){let o=t.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>Hc(t,a)),s}}let n=qz(e.value),i=e.children.map(o=>Hc(t,o));return new _n(n,i)}}function $z(t,e,r){return e.children.map(n=>{for(let i of r.children)if(t.shouldReuseRoute(n.value,i.value.snapshot))return Hc(t,n,i);return Hc(t,n)})}function qz(t){return new Ir(new Re(t.url),new Re(t.params),new Re(t.queryParams),new Re(t.fragment),new Re(t.data),t.outlet,t.component,t)}var Ug="ngNavigationCancelingError";function $g(t,e){let{redirectTo:r,navigationBehaviorOptions:n}=ra(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,i=qg(!1,Fn.Redirect,e);return i.url=r,i.navigationBehaviorOptions=n,i}function qg(t,e,r){let n=new Error("NavigationCancelingError: "+(t||""));return n[Ug]=!0,n.cancellationCode=e,r&&(n.url=r),n}function Wz(t){return Wg(t)&&ra(t.url)}function Wg(t){return t&&t[Ug]}var Gz=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["ng-component"]],standalone:!0,features:[_t],decls:1,vars:0,template:function(i,o){i&1&&et(0,"router-outlet")},dependencies:[Bz],encapsulation:2});let t=e;return t})();function Kz(t,e){return t.providers&&!t._injector&&(t._injector=h4(t.providers,e,`Route: ${t.path}`)),t._injector??e}function U6(t){let e=t.children&&t.children.map(U6),r=e?ke(b({},t),{children:e}):b({},t);return!r.component&&!r.loadComponent&&(e||r.loadChildren)&&r.outlet&&r.outlet!==ve&&(r.component=Gz),r}function kr(t){return t.outlet||ve}function Zz(t,e){let r=t.filter(n=>kr(n)===e);return r.push(...t.filter(n=>kr(n)!==e)),r}function Uc(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let r=e.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}var Qz=(t,e,r,n)=>Z(i=>(new N6(e,i.targetRouterState,i.currentRouterState,r,n).activate(t),i)),N6=class{constructor(e,r,n,i,o){this.routeReuseStrategy=e,this.futureState=r,this.currState=n,this.forwardEvent=i,this.inputBindingEnabled=o}activate(e){let r=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,n,e),p6(this.futureState.root),this.activateChildRoutes(r,n,e)}deactivateChildRoutes(e,r,n){let i=Js(r);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],n),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(e,r,n){let i=e.value,o=r?r.value:null;if(i===o)if(i.component){let s=n.getContext(i.outlet);s&&this.deactivateChildRoutes(e,r,s.children)}else this.deactivateChildRoutes(e,r,n);else o&&this.deactivateRouteAndItsChildren(r,n)}deactivateRouteAndItsChildren(e,r){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,r):this.deactivateRouteAndOutlet(e,r)}detachAndStoreRouteSubtree(e,r){let n=r.getContext(e.value.outlet),i=n&&e.value.component?n.children:r,o=Js(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,r){let n=r.getContext(e.value.outlet),i=n&&e.value.component?n.children:r,o=Js(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,r,n){let i=Js(r);e.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],n),this.forwardEvent(new I6(o.value.snapshot))}),e.children.length&&this.forwardEvent(new E6(e.value.snapshot))}activateRoutes(e,r,n){let i=e.value,o=r?r.value:null;if(p6(i),i===o)if(i.component){let s=n.getOrCreateContext(i.outlet);this.activateChildRoutes(e,r,s.children)}else this.activateChildRoutes(e,r,n);else if(i.component){let s=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),p6(a.route.value),this.activateChildRoutes(e,null,s.children)}else{let a=Uc(i.snapshot);s.attachRef=null,s.route=i,s.injector=a,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,n)}},X4=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},ta=class{constructor(e,r){this.component=e,this.route=r}};function Xz(t,e,r){let n=t._root,i=e?e._root:null;return Ec(n,i,r,[n.value])}function Jz(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function aa(t,e){let r=Symbol(),n=e.get(t,r);return n===r?typeof t=="function"&&!np(t)?t:e.get(t):n}function Ec(t,e,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=Js(e);return t.children.forEach(s=>{eI(s,o[s.value.outlet],r,n.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Pc(a,r.getContext(s),i)),i}function eI(t,e,r,n,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=e?e.value:null,a=r?r.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=tI(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new X4(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ec(t,e,a?a.children:null,n,i):Ec(t,e,r,n,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new ta(a.outlet.component,s))}else s&&Pc(e,a,i),i.canActivateChecks.push(new X4(n)),o.component?Ec(t,null,a?a.children:null,n,i):Ec(t,null,r,n,i);return i}function tI(t,e,r){if(typeof r=="function")return r(t,e);switch(r){case"pathParamsChange":return!xo(t.url,e.url);case"pathParamsOrQueryParamsChange":return!xo(t.url,e.url)||!Er(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!A6(t,e)||!Er(t.queryParams,e.queryParams);case"paramsChange":default:return!A6(t,e)}}function Pc(t,e,r){let n=Js(t),i=t.value;Object.entries(n).forEach(([o,s])=>{i.component?e?Pc(s,e.children.getContext(o),r):Pc(s,null,r):Pc(s,e,r)}),i.component?e&&e.outlet&&e.outlet.isActivated?r.canDeactivateChecks.push(new ta(e.outlet.component,i)):r.canDeactivateChecks.push(new ta(null,i)):r.canDeactivateChecks.push(new ta(null,i))}function $c(t){return typeof t=="function"}function nI(t){return typeof t=="boolean"}function rI(t){return t&&$c(t.canLoad)}function iI(t){return t&&$c(t.canActivate)}function oI(t){return t&&$c(t.canActivateChild)}function sI(t){return t&&$c(t.canDeactivate)}function aI(t){return t&&$c(t.canMatch)}function Gg(t){return t instanceof Gn||t?.name==="EmptyError"}var V4=Symbol("INITIAL_VALUE");function oa(){return Ze(t=>Ji(t.map(e=>e.pipe(ze(1),Rt(V4)))).pipe(Z(e=>{for(let r of e)if(r!==!0){if(r===V4)return V4;if(r===!1||r instanceof Ai)return r}return!0}),ge(e=>e!==V4),ze(1)))}function cI(t,e){return Ke(r=>{let{targetSnapshot:n,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=r;return s.length===0&&o.length===0?A(ke(b({},r),{guardsResult:!0})):lI(s,n,i,t).pipe(Ke(a=>a&&nI(a)?uI(n,o,t,e):A(a)),Z(a=>ke(b({},r),{guardsResult:a})))})}function lI(t,e,r,n){return Le(t).pipe(Ke(i=>mI(i.component,i.route,r,e,n)),hr(i=>i!==!0,!0))}function uI(t,e,r,n){return Le(e).pipe(Vr(i=>dr(hI(i.route.parent,n),dI(i.route,n),pI(t,i.path,r),fI(t,i.route,r))),hr(i=>i!==!0,!0))}function dI(t,e){return t!==null&&e&&e(new z6(t)),A(!0)}function hI(t,e){return t!==null&&e&&e(new T6(t)),A(!0)}function fI(t,e,r){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return A(!0);let i=n.map(o=>gs(()=>{let s=Uc(e)??r,a=aa(o,s),c=iI(a)?a.canActivate(e,t):Mr(s,()=>a(e,t));return Ri(c).pipe(hr())}));return A(i).pipe(oa())}function pI(t,e,r){let n=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>Jz(s)).filter(s=>s!==null).map(s=>gs(()=>{let a=s.guards.map(c=>{let l=Uc(s.node)??r,u=aa(c,l),d=oI(u)?u.canActivateChild(n,t):Mr(l,()=>u(n,t));return Ri(d).pipe(hr())});return A(a).pipe(oa())}));return A(o).pipe(oa())}function mI(t,e,r,n,i){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return A(!0);let s=o.map(a=>{let c=Uc(e)??i,l=aa(a,c),u=sI(l)?l.canDeactivate(t,e,r,n):Mr(c,()=>l(t,e,r,n));return Ri(u).pipe(hr())});return A(s).pipe(oa())}function gI(t,e,r,n){let i=e.canLoad;if(i===void 0||i.length===0)return A(!0);let o=i.map(s=>{let a=aa(s,t),c=rI(a)?a.canLoad(e,r):Mr(t,()=>a(e,r));return Ri(c)});return A(o).pipe(oa(),Kg(n))}function Kg(t){return G3(Fe(e=>{if(ra(e))throw $g(t,e)}),Z(e=>e===!0))}function vI(t,e,r,n){let i=e.canMatch;if(!i||i.length===0)return A(!0);let o=i.map(s=>{let a=aa(s,t),c=aI(a)?a.canMatch(e,r):Mr(t,()=>a(e,r));return Ri(c)});return A(o).pipe(oa(),Kg(n))}var Vc=class{constructor(e){this.segmentGroup=e||null}},J4=class extends Error{constructor(e){super(),this.urlTree=e}};function Xs(t){return vi(new Vc(t))}function yI(t){return vi(new z(4e3,!1))}function wI(t){return vi(qg(!1,Fn.GuardRejected))}var R6=class{constructor(e,r){this.urlSerializer=e,this.urlTree=r}lineralizeSegments(e,r){let n=[],i=r.root;for(;;){if(n=n.concat(i.segments),i.numberOfChildren===0)return A(n);if(i.numberOfChildren>1||!i.children[ve])return yI(e.redirectTo);i=i.children[ve]}}applyRedirectCommands(e,r,n){let i=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),e,n);if(r.startsWith("/"))throw new J4(i);return i}applyRedirectCreateUrlTree(e,r,n,i){let o=this.createSegmentGroup(e,r.root,n,i);return new Ai(o,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(e,r){let n={};return Object.entries(e).forEach(([i,o])=>{if(typeof o=="string"&&o.startsWith(":")){let a=o.substring(1);n[i]=r[a]}else n[i]=o}),n}createSegmentGroup(e,r,n,i){let o=this.createSegments(e,r.segments,n,i),s={};return Object.entries(r.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(e,c,n,i)}),new Ne(o,s)}createSegments(e,r,n,i){return r.map(o=>o.path.startsWith(":")?this.findPosParam(e,o,i):this.findOrReturn(o,n))}findPosParam(e,r,n){let i=n[r.path.substring(1)];if(!i)throw new z(4001,!1);return i}findOrReturn(e,r){let n=0;for(let i of r){if(i.path===e.path)return r.splice(n),i;n++}return e}},L6={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function bI(t,e,r,n,i){let o=$6(t,e,r);return o.matched?(n=Kz(e,n),vI(n,e,r,i).pipe(Z(s=>s===!0?o:b({},L6)))):A(o)}function $6(t,e,r){if(e.path==="**")return _I(r);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||r.length>0)?b({},L6):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let i=(e.matcher||gz)(r,t,e);if(!i)return b({},L6);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?b(b({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:r.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function _I(t){return{matched:!0,parameters:t.at(-1)?.parameters??{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function xg(t,e,r,n){return r.length>0&&DI(t,r,n)?{segmentGroup:new Ne(e,MI(n,new Ne(r,t.children))),slicedSegments:[]}:r.length===0&&xI(t,r,n)?{segmentGroup:new Ne(t.segments,CI(t,r,n,t.children)),slicedSegments:r}:{segmentGroup:new Ne(t.segments,t.children),slicedSegments:r}}function CI(t,e,r,n){let i={};for(let o of r)if(n2(t,e,o)&&!n[kr(o)]){let s=new Ne([],{});i[kr(o)]=s}return b(b({},n),i)}function MI(t,e){let r={};r[ve]=e;for(let n of t)if(n.path===""&&kr(n)!==ve){let i=new Ne([],{});r[kr(n)]=i}return r}function DI(t,e,r){return r.some(n=>n2(t,e,n)&&kr(n)!==ve)}function xI(t,e,r){return r.some(n=>n2(t,e,n))}function n2(t,e,r){return(t.hasChildren()||e.length>0)&&r.pathMatch==="full"?!1:r.path===""}function SI(t,e,r,n){return kr(t)!==n&&(n===ve||!n2(e,r,t))?!1:$6(e,t,r).matched}function TI(t,e,r){return e.length===0&&!t.children[r]}var H6=class{};function EI(t,e,r,n,i,o,s="emptyOnly"){return new V6(t,e,r,n,i,s,o).recognize()}var zI=31,V6=class{constructor(e,r,n,i,o,s,a){this.injector=e,this.configLoader=r,this.rootComponentType=n,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new R6(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new z(4002,`'${e.segmentGroup}'`)}recognize(){let e=xg(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Z(r=>{let n=new Lc([],Object.freeze({}),Object.freeze(b({},this.urlTree.queryParams)),this.urlTree.fragment,{},ve,this.rootComponentType,null,{}),i=new _n(n,r),o=new Q4("",i),s=Fz(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),this.inheritParamsAndData(o._root,null),{state:o,tree:s}}))}match(e){return this.processSegmentGroup(this.injector,this.config,e,ve).pipe(En(n=>{if(n instanceof J4)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Vc?this.noMatchError(n):n}))}inheritParamsAndData(e,r){let n=e.value,i=j6(n,r,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),e.children.forEach(o=>this.inheritParamsAndData(o,n))}processSegmentGroup(e,r,n,i){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,r,n):this.processSegment(e,r,n,n.segments,i,!0).pipe(Z(o=>o instanceof _n?[o]:[]))}processChildren(e,r,n){let i=[];for(let o of Object.keys(n.children))o==="primary"?i.unshift(o):i.push(o);return Le(i).pipe(Vr(o=>{let s=n.children[o],a=Zz(r,o);return this.processSegmentGroup(e,a,s,o)}),s0((o,s)=>(o.push(...s),o)),bi(null),i0(),Ke(o=>{if(o===null)return Xs(n);let s=Zg(o);return II(s),A(s)}))}processSegment(e,r,n,i,o,s){return Le(r).pipe(Vr(a=>this.processSegmentAgainstRoute(a._injector??e,r,a,n,i,o,s).pipe(En(c=>{if(c instanceof Vc)return A(null);throw c}))),hr(a=>!!a),En(a=>{if(Gg(a))return TI(n,i,o)?A(new H6):Xs(n);throw a}))}processSegmentAgainstRoute(e,r,n,i,o,s,a){return SI(n,i,o,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,i,n,o,s):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,i,r,n,o,s):Xs(i):Xs(i)}expandSegmentAgainstRouteUsingRedirect(e,r,n,i,o,s){let{matched:a,consumedSegments:c,positionalParamSegments:l,remainingSegments:u}=$6(r,i,o);if(!a)return Xs(r);i.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>zI&&(this.allowRedirects=!1));let d=this.applyRedirects.applyRedirectCommands(c,i.redirectTo,l);return this.applyRedirects.lineralizeSegments(i,d).pipe(Ke(h=>this.processSegment(e,n,r,h.concat(u),s,!1)))}matchSegmentAgainstRoute(e,r,n,i,o){let s=bI(r,n,i,e,this.urlSerializer);return n.path==="**"&&(r.children={}),s.pipe(Ze(a=>a.matched?(e=n._injector??e,this.getChildConfig(e,n,i).pipe(Ze(({routes:c})=>{let l=n._loadedInjector??e,{consumedSegments:u,remainingSegments:d,parameters:h}=a,f=new Lc(u,h,Object.freeze(b({},this.urlTree.queryParams)),this.urlTree.fragment,PI(n),kr(n),n.component??n._loadedComponent??null,n,OI(n)),{segmentGroup:p,slicedSegments:y}=xg(r,u,d,c);if(y.length===0&&p.hasChildren())return this.processChildren(l,c,p).pipe(Z(M=>M===null?null:new _n(f,M)));if(c.length===0&&y.length===0)return A(new _n(f,[]));let v=kr(n)===o;return this.processSegment(l,c,p,y,v?ve:o,!0).pipe(Z(M=>new _n(f,M instanceof _n?[M]:[])))}))):Xs(r)))}getChildConfig(e,r,n){return r.children?A({routes:r.children,injector:e}):r.loadChildren?r._loadedRoutes!==void 0?A({routes:r._loadedRoutes,injector:r._loadedInjector}):gI(e,r,n,this.urlSerializer).pipe(Ke(i=>i?this.configLoader.loadChildren(e,r).pipe(Fe(o=>{r._loadedRoutes=o.routes,r._loadedInjector=o.injector})):wI(r))):A({routes:[],injector:e})}};function II(t){t.sort((e,r)=>e.value.outlet===ve?-1:r.value.outlet===ve?1:e.value.outlet.localeCompare(r.value.outlet))}function kI(t){let e=t.value.routeConfig;return e&&e.path===""}function Zg(t){let e=[],r=new Set;for(let n of t){if(!kI(n)){e.push(n);continue}let i=e.find(o=>n.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...n.children),r.add(i)):e.push(n)}for(let n of r){let i=Zg(n.children);e.push(new _n(n.value,i))}return e.filter(n=>!r.has(n))}function PI(t){return t.data||{}}function OI(t){return t.resolve||{}}function AI(t,e,r,n,i,o){return Ke(s=>EI(t,e,r,n,s.extractedUrl,i,o).pipe(Z(({state:a,tree:c})=>ke(b({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function FI(t,e){return Ke(r=>{let{targetSnapshot:n,guards:{canActivateChecks:i}}=r;if(!i.length)return A(r);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let l of Qg(c))s.add(l);let a=0;return Le(s).pipe(Vr(c=>o.has(c)?NI(c,n,t,e):(c.data=j6(c,c.parent,t).resolve,A(void 0))),Fe(()=>a++),bs(1),Ke(c=>a===s.size?A(r):Dt))})}function Qg(t){let e=t.children.map(r=>Qg(r)).flat();return[t,...e]}function NI(t,e,r,n){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!Bg(i)&&(o[jc]=i.title),RI(o,t,e,n).pipe(Z(s=>(t._resolvedData=s,t.data=j6(t,t.parent,r).resolve,null)))}function RI(t,e,r,n){let i=v6(t);if(i.length===0)return A({});let o={};return Le(i).pipe(Ke(s=>LI(t[s],e,r,n).pipe(hr(),Fe(a=>{o[s]=a}))),bs(1),eo(o),En(s=>Gg(s)?Dt:vi(s)))}function LI(t,e,r,n){let i=Uc(e)??n,o=aa(t,i),s=o.resolve?o.resolve(e,r):Mr(i,()=>o(e,r));return Ri(s)}function m6(t){return Ze(e=>{let r=t(e);return r?Le(r).pipe(Z(()=>e)):A(e)})}var Xg=(()=>{let e=class e{buildTitle(n){let i,o=n.root;for(;o!==void 0;)i=this.getResolvedTitleForRoute(o)??i,o=o.children.find(s=>s.outlet===ve);return i}getResolvedTitleForRoute(n){return n.data[jc]}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(HI),providedIn:"root"});let t=e;return t})(),HI=(()=>{let e=class e extends Xg{constructor(n){super(),this.title=n}updateTitle(n){let i=this.buildTitle(n);i!==void 0&&this.title.setTitle(i)}};e.\u0275fac=function(i){return new(i||e)(g(Sc))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qc=new E("",{providedIn:"root",factory:()=>({})}),Yc=new E("ROUTES"),q6=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=w(m4)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return A(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let i=Ri(n.loadComponent()).pipe(Z(Jg),Fe(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),un(()=>{this.componentLoaders.delete(n)})),o=new lr(i,()=>new S).pipe(ds());return this.componentLoaders.set(n,o),o}loadChildren(n,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return A({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let s=VI(i,this.compiler,n,this.onLoadEndListener).pipe(un(()=>{this.childrenLoaders.delete(i)})),a=new lr(s,()=>new S).pipe(ds());return this.childrenLoaders.set(i,a),a}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function VI(t,e,r,n){return Ri(t.loadChildren()).pipe(Z(Jg),Ke(i=>i instanceof nc||Array.isArray(i)?A(i):Le(e.compileModuleAsync(i))),Z(i=>{n&&n(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(r).injector,s=o.get(Yc,[],{optional:!0,self:!0}).flat()),{routes:s.map(U6),injector:o}}))}function YI(t){return t&&typeof t=="object"&&"default"in t}function Jg(t){return YI(t)?t.default:t}var W6=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(jI),providedIn:"root"});let t=e;return t})(),jI=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,i){return n}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),e9=new E(""),t9=new E("");function BI(t,e,r){let n=t.get(t9),i=t.get(V);return t.get(U).runOutsideAngular(()=>{if(!i.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,Promise.resolve();let o,s=new Promise(l=>{o=l}),a=i.startViewTransition(()=>(o(),UI(t))),{onViewTransitionCreated:c}=n;return c&&Mr(t,()=>c({transition:a,from:e,to:r})),s})}function UI(t){return new Promise(e=>{bu(e,{injector:t})})}var r2=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new S,this.transitionAbortSubject=new S,this.configLoader=w(q6),this.environmentInjector=w(qt),this.urlSerializer=w(sa),this.rootContexts=w(Bc),this.location=w(ki),this.inputBindingEnabled=w(t2,{optional:!0})!==null,this.titleStrategy=w(Xg),this.options=w(qc,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=w(W6),this.createViewTransition=w(e9,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>A(void 0),this.rootComponentType=null;let n=o=>this.events.next(new x6(o)),i=o=>this.events.next(new S6(o));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let i=++this.navigationId;this.transitions?.next(ke(b(b({},this.transitions.value),n),{id:i}))}setupNavigations(n,i,o){return this.transitions=new Re({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:kc,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ge(s=>s.id!==0),Z(s=>ke(b({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Ze(s=>{this.currentTransition=s;let a=!1,c=!1;return A(s).pipe(Fe(l=>{this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?ke(b({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Ze(l=>{let u=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=l.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!u&&d!=="reload"){let h="";return this.events.next(new Ni(l.id,this.urlSerializer.serialize(l.rawUrl),h,q4.IgnoredSameUrlNavigation)),l.resolve(null),Dt}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return A(l).pipe(Ze(h=>{let f=this.transitions?.getValue();return this.events.next(new ia(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),f!==this.transitions?.getValue()?Dt:Promise.resolve(h)}),AI(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Fe(h=>{s.targetSnapshot=h.targetSnapshot,s.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation=ke(b({},this.currentNavigation),{finalUrl:h.urlAfterRedirects});let f=new W4(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(f)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:h,extractedUrl:f,source:p,restoredState:y,extras:v}=l,M=new ia(h,this.urlSerializer.serialize(f),p,y);this.events.next(M);let P=Yg(this.rootComponentType).snapshot;return this.currentTransition=s=ke(b({},l),{targetSnapshot:P,urlAfterRedirects:f,extras:ke(b({},v),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=f,A(s)}else{let h="";return this.events.next(new Ni(l.id,this.urlSerializer.serialize(l.extractedUrl),h,q4.IgnoredByUrlHandlingStrategy)),l.resolve(null),Dt}}),Fe(l=>{let u=new _6(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),Z(l=>(this.currentTransition=s=ke(b({},l),{guards:Xz(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),s)),cI(this.environmentInjector,l=>this.events.next(l)),Fe(l=>{if(s.guardsResult=l.guardsResult,ra(l.guardsResult))throw $g(this.urlSerializer,l.guardsResult);let u=new C6(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(u)}),ge(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",Fn.GuardRejected),!1)),m6(l=>{if(l.guards.canActivateChecks.length)return A(l).pipe(Fe(u=>{let d=new M6(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}),Ze(u=>{let d=!1;return A(u).pipe(FI(this.paramsInheritanceStrategy,this.environmentInjector),Fe({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(u,"",Fn.NoDataFromResolver)}}))}),Fe(u=>{let d=new D6(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}))}),m6(l=>{let u=d=>{let h=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&h.push(this.configLoader.loadComponent(d.routeConfig).pipe(Fe(f=>{d.component=f}),Z(()=>{})));for(let f of d.children)h.push(...u(f));return h};return Ji(u(l.targetSnapshot.root)).pipe(bi(null),ze(1))}),m6(()=>this.afterPreactivation()),Ze(()=>{let{currentSnapshot:l,targetSnapshot:u}=s,d=this.createViewTransition?.(this.environmentInjector,l.root,u.root);return d?Le(d).pipe(Z(()=>s)):A(s)}),Z(l=>{let u=Uz(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=s=ke(b({},l),{targetRouterState:u}),this.currentNavigation.targetRouterState=u,s}),Fe(()=>{this.events.next(new Nc)}),Qz(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),ze(1),Fe({next:l=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new zr(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{a=!0}}),ce(this.transitionAbortSubject.pipe(Fe(l=>{throw l}))),un(()=>{!a&&!c&&this.cancelNavigationTransition(s,"",Fn.SupersededByNewNavigation),this.currentNavigation?.id===s.id&&(this.currentNavigation=null)}),En(l=>{if(c=!0,Wg(l))this.events.next(new Fi(s.id,this.urlSerializer.serialize(s.extractedUrl),l.message,l.cancellationCode)),Wz(l)?this.events.next(new Rc(l.url)):s.resolve(!1);else{this.events.next(new Fc(s.id,this.urlSerializer.serialize(s.extractedUrl),l,s.targetSnapshot??void 0));try{s.resolve(n.errorHandler(l))}catch(u){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(u)}}return Dt}))}))}cancelNavigationTransition(n,i,o){let s=new Fi(n.id,this.urlSerializer.serialize(n.extractedUrl),i,o);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function $I(t){return t!==kc}var qI=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(WI),providedIn:"root"});let t=e;return t})(),Y6=class{shouldDetach(e){return!1}store(e,r){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,r){return e.routeConfig===r.routeConfig}},WI=(()=>{let e=class e extends Y6{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ls(e)))(o||e)}})(),e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),n9=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:()=>w(GI),providedIn:"root"});let t=e;return t})(),GI=(()=>{let e=class e extends n9{constructor(){super(...arguments),this.location=w(ki),this.urlSerializer=w(sa),this.options=w(qc,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=w(W6),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Ai,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Yg(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(i=>{i.type==="popstate"&&n(i.url,i.state)})}handleRouterEvent(n,i){if(n instanceof ia)this.stateMemento=this.createStateMemento();else if(n instanceof Ni)this.rawUrlTree=i.initialUrl;else if(n instanceof W4){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(o,i)}}else n instanceof Nc?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):n instanceof Fi&&(n.code===Fn.GuardRejected||n.code===Fn.NoDataFromResolver)?this.restoreHistory(i):n instanceof Fc?this.restoreHistory(i,!0):n instanceof zr&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,i){let o=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(o)||i.extras.replaceUrl){let s=this.browserPageId,a=b(b({},i.extras.state),this.generateNgRouterState(i.id,s));this.location.replaceState(o,"",a)}else{let s=b(b({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(n,i=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,i){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:i}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ls(e)))(o||e)}})(),e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),zc=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(zc||{});function r9(t,e){t.events.pipe(ge(r=>r instanceof zr||r instanceof Fi||r instanceof Fc||r instanceof Ni),Z(r=>r instanceof zr||r instanceof Ni?zc.COMPLETE:(r instanceof Fi?r.code===Fn.Redirect||r.code===Fn.SupersededByNewNavigation:!1)?zc.REDIRECTING:zc.FAILED),ge(r=>r!==zc.REDIRECTING),ze(1)).subscribe(()=>{e()})}function KI(t){throw t}var ZI={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},QI={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ir=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=w(p4),this.stateManager=w(n9),this.options=w(qc,{optional:!0})||{},this.pendingTasks=w(Ws),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=w(r2),this.urlSerializer=w(sa),this.location=w(ki),this.urlHandlingStrategy=w(W6),this._events=new S,this.errorHandler=this.options.errorHandler||KI,this.navigated=!1,this.routeReuseStrategy=w(qI),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=w(Yc,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!w(t2,{optional:!0}),this.eventsSubscription=new ye,this.isNgZoneEnabled=w(U)instanceof U&&U.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(i=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(i,s),i instanceof Fi&&i.code!==Fn.Redirect&&i.code!==Fn.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof zr)this.navigated=!0;else if(i instanceof Rc){let a=this.urlHandlingStrategy.merge(i.url,o.currentRawUrl),c={info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||$I(o.source)};this.scheduleNavigation(a,kc,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}JI(i)&&this._events.next(i)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),kc,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",i)},0)})}navigateToSyncWithBrowser(n,i,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let l=b({},o);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(s.state=l)}let c=this.parseUrl(n);this.scheduleNavigation(c,i,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(U6),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,i={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:l}=i,u=l?this.currentUrlTree.fragment:a,d=null;switch(c){case"merge":d=b(b({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let h;try{let f=o?o.snapshot:this.routerState.snapshot.root;h=Rg(f)}catch{(typeof n[0]!="string"||!n[0].startsWith("/"))&&(n=[]),h=this.currentUrlTree.root}return Lg(h,n,d,u??null)}navigateByUrl(n,i={skipLocationChange:!1}){let o=ra(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,kc,null,i)}navigate(n,i={skipLocationChange:!1}){return XI(n),this.navigateByUrl(this.createUrlTree(n,i),i)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,i){let o;if(i===!0?o=b({},ZI):i===!1?o=b({},QI):o=i,ra(n))return bg(this.currentUrlTree,n,o);let s=this.parseUrl(n);return bg(this.currentUrlTree,s,o)}removeEmptyProps(n){return Object.entries(n).reduce((i,[o,s])=>(s!=null&&(i[o]=s),i),{})}scheduleNavigation(n,i,o,s,a){if(this.disposed)return Promise.resolve(!1);let c,l,u;a?(c=a.resolve,l=a.reject,u=a.promise):u=new Promise((h,f)=>{c=h,l=f});let d=this.pendingTasks.add();return r9(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(h=>Promise.reject(h))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function XI(t){for(let e=0;e{let e=class e{constructor(n,i,o,s,a,c){this.router=n,this.route=i,this.tabIndexAttribute=o,this.renderer=s,this.el=a,this.locationStrategy=c,this.href=null,this.commands=null,this.onChanges=new S,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let l=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=l==="a"||l==="area",this.isAnchorElement?this.subscription=n.events.subscribe(u=>{u instanceof zr&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){n!=null?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,i,o,s,a){if(this.urlTree===null||this.isAnchorElement&&(n!==0||i||o||s||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(this.urlTree,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=this.urlTree!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;let n=this.href===null?null:km(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",n)}applyAttributeValue(n,i){let o=this.renderer,s=this.el.nativeElement;i!==null?o.setAttribute(s,n,i):o.removeAttribute(s,n)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};e.\u0275fac=function(i){return new(i||e)(m(ir),m(Ir),Z8("tabindex"),m(st),m(oe),m(Tr))},e.\u0275dir=ne({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(i,o){i&1&&Pt("click",function(a){return o.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),i&2&&kn("target",o.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[W.HasDecoratorInputTransform,"preserveFragment","preserveFragment",ut],skipLocationChange:[W.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",ut],replaceUrl:[W.HasDecoratorInputTransform,"replaceUrl","replaceUrl",ut],routerLink:"routerLink"},standalone:!0,features:[rn,He]});let t=e;return t})();var e2=class{};var ek=(()=>{let e=class e{constructor(n,i,o,s,a){this.router=n,this.injector=o,this.preloadingStrategy=s,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(ge(n=>n instanceof zr),Vr(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,i){let o=[];for(let s of i){s.providers&&!s._injector&&(s._injector=h4(s.providers,n,`Route: ${s.path}`));let a=s._injector??n,c=s._loadedInjector??a;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&o.push(this.preloadConfig(a,s)),(s.children||s._loadedRoutes)&&o.push(this.processRoutes(c,s.children??s._loadedRoutes))}return Le(o).pipe(yi())}preloadConfig(n,i){return this.preloadingStrategy.preload(i,()=>{let o;i.loadChildren&&i.canLoad===void 0?o=this.loader.loadChildren(n,i):o=A(null);let s=o.pipe(Ke(a=>a===null?A(void 0):(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,this.processRoutes(a.injector??n,a.routes))));if(i.loadComponent&&!i._loadedComponent){let a=this.loader.loadComponent(i);return Le([s,a]).pipe(yi())}else return s})}};e.\u0275fac=function(i){return new(i||e)(g(ir),g(m4),g(qt),g(e2),g(q6))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),G6=new E(""),i9=(()=>{let e=class e{constructor(n,i,o,s,a={}){this.urlSerializer=n,this.transitions=i,this.viewportScroller=o,this.zone=s,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof ia?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof zr?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Ni&&n.code===q4.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof G4&&(n.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new G4(n,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};e.\u0275fac=function(i){n4()},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function pZ(t,...e){return Wt([{provide:Yc,multi:!0,useValue:t},[],{provide:Ir,useFactory:o9,deps:[ir]},{provide:dc,multi:!0,useFactory:s9},e.map(r=>r.\u0275providers)])}function o9(t){return t.routerState.root}function So(t,e){return{\u0275kind:t,\u0275providers:e}}function mZ(t={}){return So(4,[{provide:G6,useFactory:()=>{let r=w(Qu),n=w(U),i=w(r2),o=w(sa);return new i9(o,i,r,n,t)}}])}function s9(){let t=w(Ue);return e=>{let r=t.get(xr);if(e!==r.components[0])return;let n=t.get(ir),i=t.get(a9);t.get(K6)===1&&n.initialNavigation(),t.get(c9,null,be.Optional)?.setUpPreloading(),t.get(G6,null,be.Optional)?.init(),n.resetRootComponentType(r.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var a9=new E("",{factory:()=>new S}),K6=new E("",{providedIn:"root",factory:()=>1});function tk(){return So(2,[{provide:K6,useValue:0},{provide:g4,multi:!0,deps:[Ue],useFactory:e=>{let r=e.get($7,Promise.resolve());return()=>r.then(()=>new Promise(n=>{let i=e.get(ir),o=e.get(a9);r9(i,()=>{n(!0)}),e.get(r2).afterPreactivation=()=>(n(!0),o.closed?A(void 0):o),i.initialNavigation()}))}}])}function nk(){return So(3,[{provide:g4,multi:!0,useFactory:()=>{let e=w(ir);return()=>{e.setUpLocationChangeListener()}}},{provide:K6,useValue:2}])}var c9=new E("");function rk(t){return So(0,[{provide:c9,useExisting:ek},{provide:e2,useExisting:t}])}function gZ(){return So(6,[{provide:Tr,useClass:qu}])}function ik(){return So(8,[Dg,{provide:t2,useExisting:Dg}])}function ok(t){let e=[{provide:e9,useValue:BI},{provide:t9,useValue:b({skipNextTransition:!!t?.skipInitialTransition},t)}];return So(9,e)}var Sg=new E("ROUTER_FORROOT_GUARD"),sk=[ki,{provide:sa,useClass:Oc},ir,Bc,{provide:Ir,useFactory:o9,deps:[ir]},q6,[]],l9=(()=>{let e=class e{constructor(n){}static forRoot(n,i){return{ngModule:e,providers:[sk,[],{provide:Yc,multi:!0,useValue:n},{provide:Sg,useFactory:uk,deps:[[ir,new $r,new Hs]]},{provide:qc,useValue:i||{}},i?.useHash?ck():lk(),ak(),i?.preloadingStrategy?rk(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?dk(i):[],i?.bindToComponentInputs?ik().\u0275providers:[],i?.enableViewTransitions?ok().\u0275providers:[],hk()]}}static forChild(n){return{ngModule:e,providers:[{provide:Yc,multi:!0,useValue:n}]}}};e.\u0275fac=function(i){return new(i||e)(g(Sg,8))},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();function ak(){return{provide:G6,useFactory:()=>{let t=w(Qu),e=w(U),r=w(qc),n=w(r2),i=w(sa);return r.scrollOffset&&t.setOffset(r.scrollOffset),new i9(i,n,t,e,r)}}}function ck(){return{provide:Tr,useClass:qu}}function lk(){return{provide:Tr,useClass:$u}}function uk(t){return"guarded"}function dk(t){return[t.initialNavigation==="disabled"?nk().\u0275providers:[],t.initialNavigation==="enabledBlocking"?tk().\u0275providers:[]]}var Tg=new E("");function hk(){return[{provide:Tg,useFactory:s9},{provide:dc,multi:!0,useExisting:Tg}]}var w9=u_(y9(),1);function DZ(t,e,r){if(!t||e==null||e.length===0)return r;if(Array.isArray(e)||(e=~e.indexOf(".")?e.split("."):[e]),e.length===1){let i=t[e[0]];return typeof i>"u"?r:i}let n=e.reduce((i,o)=>(i||{})[o],t);return typeof n>"u"?r:n}function fk(t){return(0,w9.default)(!0,{},{_:t})._}function Z6(t,e,...r){if(Array.isArray(t)||typeof t!="object")return t;let n=o=>typeof o=="object",i=(o,s)=>(Object.keys(s).filter(a=>a!=="__proto__"&&Object.prototype.hasOwnProperty.call(s,a)).forEach(a=>{let c=s[a],l=o[a];Array.isArray(l)?o[a]=e?c:[...l,...c]:typeof c=="function"?o[a]=c:c!=null&&n(c)&&l!=null&&n(l)?o[a]=i(l,c):o[a]=fk(c)}),o);return r.filter(o=>o!=null&&n(o)).forEach(o=>i(t,o)),t}function Q6(t,...e){return Z6(t,!1,...e)}var xZ=(()=>{let e=class e{constructor(){this.doc=w(V),this.list={},this.cached={},this._notify=new Re([])}get change(){return this._notify.asObservable().pipe(fr(),ge(n=>n.length!==0))}clear(){this.list={},this.cached={}}attachAttributes(n,i){i!=null&&Object.entries(i).forEach(([o,s])=>{n.setAttribute(o,s)})}load(n){Array.isArray(n)||(n=[n]);let i=[];return n.map(o=>typeof o!="object"?{path:o}:o).forEach(o=>{o.path.endsWith(".js")?i.push(this.loadScript(o.path,o.options)):i.push(this.loadStyle(o.path,o.options))}),Promise.all(i).then(o=>(this._notify.next(o),Promise.resolve(o)))}loadScript(n,i,o){let s=typeof i=="object"?i:{innerContent:i,attributes:o};return new Promise(a=>{if(this.list[n]===!0){a(ke(b({},this.cached[n]),{status:"loading"}));return}this.list[n]=!0;let c=u=>{this.cached[n]=u,a(u),this._notify.next([u])},l=this.doc.createElement("script");l.type="text/javascript",l.src=n,this.attachAttributes(l,s.attributes),s.innerContent&&(l.innerHTML=s.innerContent),l.onload=()=>c({path:n,status:"ok"}),l.onerror=u=>c({path:n,status:"error",error:u}),this.doc.getElementsByTagName("head")[0].appendChild(l)})}loadStyle(n,i,o,s){let a=typeof i=="object"?i:{rel:i,innerContent:o,attributes:s};return new Promise(c=>{if(this.list[n]===!0){c(this.cached[n]);return}this.list[n]=!0;let l=this.doc.createElement("link");l.rel=a.rel??"stylesheet",l.type="text/css",l.href=n,this.attachAttributes(l,a.attributes),a.innerContent&&(l.innerHTML=a.innerContent),this.doc.getElementsByTagName("head")[0].appendChild(l);let u={path:n,status:"ok"};this.cached[n]=u,c(u)})}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var X6=new E("alain-config",{providedIn:"root",factory:pk});function pk(){return{}}var Jr=(()=>{let e=class e{constructor(n){this.config=b({},n)}get(n,i){let o=this.config[n]||{};return i?{[i]:o[i]}:o}merge(n,...i){return Z6({},!0,...i,this.get(n))}attach(n,i,o){Object.assign(n,this.merge(i,o))}attachKey(n,i,o){Object.assign(n,this.get(i,o))}set(n,i){this.config[n]=b(b({},this.config[n]),i)}};e.\u0275fac=function(i){return new(i||e)(g(X6,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function ca(t){t||(nu(ca),t=w(js));let e=new Y(r=>t.onDestroy(r.next.bind(r)));return r=>r.pipe(ce(e))}var mk={guard_url:"/403"},o2=(()=>{let e=class e{get change(){return this.aclChange.asObservable()}get data(){return{full:this.full,roles:this.roles,abilities:this.abilities}}get guard_url(){return this.options.guard_url}constructor(n){this.roles=[],this.abilities=[],this.full=!1,this.aclChange=new Re(null),this.options=n.merge("acl",mk)}parseACLType(n){let i;return typeof n=="number"?i={ability:[n]}:Array.isArray(n)&&n.length>0&&typeof n[0]=="number"?i={ability:n}:typeof n=="object"&&!Array.isArray(n)?i=b({},n):Array.isArray(n)?i={role:n}:i={role:n==null?[]:[n]},b({except:!1},i)}set(n){this.full=!1,this.abilities=[],this.roles=[],this.add(n),this.aclChange.next(n)}setFull(n){this.full=n,this.aclChange.next(n)}setAbility(n){this.set({ability:n})}setRole(n){this.set({role:n})}add(n){n.role&&n.role.length>0&&this.roles.push(...n.role),n.ability&&n.ability.length>0&&this.abilities.push(...n.ability)}attachRole(n){for(let i of n)this.roles.includes(i)||this.roles.push(i);this.aclChange.next(this.data)}attachAbility(n){for(let i of n)this.abilities.includes(i)||this.abilities.push(i);this.aclChange.next(this.data)}removeRole(n){for(let i of n){let o=this.roles.indexOf(i);o!==-1&&this.roles.splice(o,1)}this.aclChange.next(this.data)}removeAbility(n){for(let i of n){let o=this.abilities.indexOf(i);o!==-1&&this.abilities.splice(o,1)}this.aclChange.next(this.data)}can(n){let{preCan:i}=this.options;i&&(n=i(n));let o=this.parseACLType(n),s=!1;return this.full===!0||!n?s=!0:(o.role&&o.role.length>0&&(o.mode==="allOf"?s=o.role.every(a=>this.roles.includes(a)):s=o.role.some(a=>this.roles.includes(a))),o.ability&&o.ability.length>0&&(o.mode==="allOf"?s=o.ability.every(a=>this.abilities.includes(a)):s=o.ability.some(a=>this.abilities.includes(a)))),o.except===!0?!s:s}parseAbility(n){return(typeof n=="number"||typeof n=="string"||Array.isArray(n))&&(n={ability:Array.isArray(n)?n:[n]}),delete n.role,n}canAbility(n){return this.can(this.parseAbility(n))}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ZZ=(()=>{let e=class e{set acl(n){this.set(n)}set ability(n){this.set(this.srv.parseAbility(n))}set(n){this._value=n;let i="acl__hide",o=this.el;this.srv.can(this._value)?this.renderer.removeClass(o,i):this.renderer.addClass(o,i)}constructor(){this.el=w(oe).nativeElement,this.renderer=w(st),this.srv=w(o2),this.change$=this.srv.change.pipe(ca(),ge(n=>n!=null)).subscribe(()=>this.set(this._value))}ngOnDestroy(){this.change$.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["","acl",""]],inputs:{acl:"acl",ability:[W.None,"acl-ability","ability"]},exportAs:["acl"],standalone:!0});let t=e;return t})();var QZ=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[vc]});let t=e;return t})();function Ct(t,e){gk(t)&&(t="100%");var r=vk(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function Wc(t){return Math.min(1,Math.max(0,t))}function gk(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function vk(t){return typeof t=="string"&&t.indexOf("%")!==-1}function s2(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Gc(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Li(t){return t.length===1?"0"+t:String(t)}function _9(t,e,r){return{r:Ct(t,255)*255,g:Ct(e,255)*255,b:Ct(r,255)*255}}function ed(t,e,r){t=Ct(t,255),e=Ct(e,255),r=Ct(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,s=0,a=(n+i)/2;if(n===i)s=0,o=0;else{var c=n-i;switch(s=a>.5?c/(2-n-i):c/(n+i),n){case t:o=(e-r)/c+(e1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function C9(t,e,r){var n,i,o;if(t=Ct(t,360),e=Ct(e,100),r=Ct(r,100),e===0)i=r,o=r,n=r;else{var s=r<.5?r*(1+e):r+e-r*e,a=2*r-s;n=J6(a,s,t+1/3),i=J6(a,s,t),o=J6(a,s,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function To(t,e,r){t=Ct(t,255),e=Ct(e,255),r=Ct(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,s=n,a=n-i,c=n===0?0:a/n;if(n===i)o=0;else{switch(n){case t:o=(e-r)/a+(e>16,g:(t&65280)>>8,b:t&255}}var Kc={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function an(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=_k(t)),typeof t=="object"&&(ei(t.r)&&ei(t.g)&&ei(t.b)?(e=_9(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):ei(t.h)&&ei(t.s)&&ei(t.v)?(n=Gc(t.s),i=Gc(t.v),e=M9(t.h,n,i),s=!0,a="hsv"):ei(t.h)&&ei(t.s)&&ei(t.l)&&(n=Gc(t.s),o=Gc(t.l),e=C9(t.h,n,o),s=!0,a="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=s2(r),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var wk="[-\\+]?\\d+%?",bk="[-\\+]?\\d*\\.\\d+%?",Hi="(?:".concat(bk,")|(?:").concat(wk,")"),nd="[\\s|\\(]+(".concat(Hi,")[,|\\s]+(").concat(Hi,")[,|\\s]+(").concat(Hi,")\\s*\\)?"),rd="[\\s|\\(]+(".concat(Hi,")[,|\\s]+(").concat(Hi,")[,|\\s]+(").concat(Hi,")[,|\\s]+(").concat(Hi,")\\s*\\)?"),or={CSS_UNIT:new RegExp(Hi),rgb:new RegExp("rgb"+nd),rgba:new RegExp("rgba"+rd),hsl:new RegExp("hsl"+nd),hsla:new RegExp("hsla"+rd),hsv:new RegExp("hsv"+nd),hsva:new RegExp("hsva"+rd),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function _k(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(Kc[t])t=Kc[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=or.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=or.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=or.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=or.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=or.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=or.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=or.hex8.exec(t),r?{r:sn(r[1]),g:sn(r[2]),b:sn(r[3]),a:td(r[4]),format:e?"name":"hex8"}:(r=or.hex6.exec(t),r?{r:sn(r[1]),g:sn(r[2]),b:sn(r[3]),format:e?"name":"hex"}:(r=or.hex4.exec(t),r?{r:sn(r[1]+r[1]),g:sn(r[2]+r[2]),b:sn(r[3]+r[3]),a:td(r[4]+r[4]),format:e?"name":"hex8"}:(r=or.hex3.exec(t),r?{r:sn(r[1]+r[1]),g:sn(r[2]+r[2]),b:sn(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function ei(t){return!!or.CSS_UNIT.exec(String(t))}var a2=function(){function t(e,r){e===void 0&&(e=""),r===void 0&&(r={});var n;if(e instanceof t)return e;typeof e=="number"&&(e=x9(e)),this.originalInput=e;var i=an(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),r,n,i,o=e.r/255,s=e.g/255,a=e.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=s2(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=To(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=To(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=ed(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=ed(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),Eo(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),D9(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(r,", ").concat(n,")"):"rgba(".concat(e,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(r){return"".concat(Math.round(Ct(r,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(r){return Math.round(Ct(r,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Eo(this.r,this.g,this.b,!1),r=0,n=Object.entries(Kc);r=0,o=!r&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=Wc(r.l),new t(r)},t.prototype.brighten=function(e){e===void 0&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),new t(r)},t.prototype.darken=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=Wc(r.l),new t(r)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=Wc(r.s),new t(r)},t.prototype.saturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=Wc(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,new t(r)},t.prototype.mix=function(e,r){r===void 0&&(r=50);var n=this.toRgb(),i=new t(e).toRgb(),o=r/100,s={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new t(s)},t.prototype.analogous=function(e,r){e===void 0&&(e=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(new t(n));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,s=[],a=1/e;e--;)s.push(new t({h:n,s:i,v:o})),o=(o+a)%1;return s},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),n=new t(e).toRgb(),i=r.a+n.a*(1-r.a);return new t({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),n=r.h,i=[this],o=360/e,s=1;s=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-c2*e:Math.round(t.h)+c2*e:n=r?Math.round(t.h)+c2*e:Math.round(t.h)-c2*e,n<0?n+=360:n>=360&&(n-=360),n}function z9(t,e,r){if(t.h===0&&t.s===0)return t.s;let n;return r?n=t.s-S9*e:e===P9?n=t.s+S9:n=t.s+Dk*e,n>1&&(n=1),r&&e===k9&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function I9(t,e,r){let n;return r?n=t.v+xk*e:n=t.v-Sk*e,n>1&&(n=1),Number(n.toFixed(2))}function id(t,e={}){let r=[],n=an(t);for(let i=k9;i>0;i-=1){let o=T9(n),s=l2(an({h:E9(o,i,!0),s:z9(o,i,!0),v:I9(o,i,!0)}));r.push(s)}r.push(l2(n));for(let i=1;i<=P9;i+=1){let o=T9(n),s=l2(an({h:E9(o,i),s:z9(o,i),v:I9(o,i)}));r.push(s)}return e.theme==="dark"?Tk.map(({index:i,opacity:o})=>l2(Ek(an(e.backgroundColor||"#141414"),an(r[i]),o*100))):r}var O9={isTestMode:!1};var A9={},zk="[NG-ZORRO]:";function Ik(...t){let e=t.reduce((r,n)=>r+n.toString(),"");return A9[e]?!1:(A9[e]=!0,!0)}function kk(t,...e){(O9.isTestMode||v4()&&Ik(...e))&&t(...e)}var Cn=(...t)=>kk((...e)=>console.warn(zk,...e),...t);function F9(t){return t!=null&&`${t}`!="false"}function ti(t,e=0){return od(t)?Number(t):e}function od(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function zo(t){return Array.isArray(t)?t:[t]}function at(t){return t==null?"":typeof t=="string"?t:`${t}px`}function rt(t){return t instanceof oe?t.nativeElement:t}function TQ(t,e){if(!t||!e||t.length!==e.length)return!1;let r=t.length;for(let n=0;n"u"||t===null}function EQ(t,e){if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;let i=Object.prototype.hasOwnProperty.bind(e);for(let o=0;oAk(e,t))}function H9(t){if(!t.getClientRects().length)return{top:0,left:0};let e=t.getBoundingClientRect(),r=t.ownerDocument.defaultView;return{top:e.top+r.pageYOffset,left:e.left+r.pageXOffset}}function OQ(t){return t.type.startsWith("touch")}function u2(t){return!!t&&typeof t.then=="function"&&typeof t.catch=="function"}function ld(t){return typeof t=="number"&&isFinite(t)}function ud(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function AQ(t){let e=t;if(e.scrollIntoViewIfNeeded){e.scrollIntoViewIfNeeded(!1);return}if(t.scrollIntoView){t.scrollIntoView(!1);return}}var Fk=typeof window<"u",FQ=Fk&&window.mozInnerScreenX!=null;function NQ(t){return t?Object.keys(t).map(e=>{let r=t[e];return`${e}:${typeof r=="string"?r:`${r}px`}`}).join(";"):""}var sd,ad,N9={position:"absolute",top:"-9999px",width:"50px",height:"50px"};function RQ(t="vertical",e="ant"){if(typeof document>"u"||typeof window>"u")return 0;let r=t==="vertical";if(r&&sd)return sd;if(!r&&ad)return ad;let n=document.createElement("div");Object.keys(N9).forEach(o=>{n.style[o]=N9[o]}),n.className=`${e}-hide-scrollbar scroll-div-append-to-body`,r?n.style.overflowY="scroll":n.style.overflowX="scroll",document.body.appendChild(n);let i=0;return r?(i=n.offsetWidth-n.clientWidth,sd=i):(i=n.offsetHeight-n.clientHeight,ad=i),document.body.removeChild(n),i}function LQ(t,e){return t&&tn.tagName==="STYLE"&&n.getAttribute(V9(e))===t)}function Y9(t,e,r={}){let n=hd(r);if(!cd.has(n)){let s=R9("",r),{parentNode:a}=s;cd.set(n,a),a.removeChild(s)}let i=Rk(e,r);if(i)return r.cspNonce&&i.nonce!==r.cspNonce&&(i.nonce=r.cspNonce),i.innerHTML!==t&&(i.innerHTML=t),i;let o=R9(t,r);return o?.setAttribute(V9(r),e),o}function VQ(t,e,r){return{[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:r}}var $9=new E("nz-config");function XQ(t){return Wt([{provide:$9,useValue:t}])}var Lk=`-ant-${Date.now()}-${Math.random()}`;function Hk(t,e){let r={},n=(s,a)=>{let c=s.clone();return c=a?.(c)||c,c.toRgbString()},i=(s,a)=>{let c=new a2(s),l=id(c.toRgbString());r[`${a}-color`]=n(c),r[`${a}-color-disabled`]=l[1],r[`${a}-color-hover`]=l[4],r[`${a}-color-active`]=l[7],r[`${a}-color-outline`]=c.clone().setAlpha(.2).toRgbString(),r[`${a}-color-deprecated-bg`]=l[1],r[`${a}-color-deprecated-border`]=l[3]};if(e.primaryColor){i(e.primaryColor,"primary");let s=new a2(e.primaryColor),a=id(s.toRgbString());a.forEach((l,u)=>{r[`primary-${u+1}`]=l}),r["primary-color-deprecated-l-35"]=n(s,l=>l.lighten(35)),r["primary-color-deprecated-l-20"]=n(s,l=>l.lighten(20)),r["primary-color-deprecated-t-20"]=n(s,l=>l.tint(20)),r["primary-color-deprecated-t-50"]=n(s,l=>l.tint(50)),r["primary-color-deprecated-f-12"]=n(s,l=>l.setAlpha(l.getAlpha()*.12));let c=new a2(a[0]);r["primary-color-active-deprecated-f-30"]=n(c,l=>l.setAlpha(l.getAlpha()*.3)),r["primary-color-active-deprecated-d-02"]=n(c,l=>l.darken(2))}return e.successColor&&i(e.successColor,"success"),e.warningColor&&i(e.warningColor,"warning"),e.errorColor&&i(e.errorColor,"error"),e.infoColor&&i(e.infoColor,"info"),` :root { ${Object.keys(r).map(s=>`--${t}-${s}: ${r[s]};`).join(` `)} } - `.trim()}function Y9(t,e,r){let n=Hk(t,e);dd()?V9(n,`${Lk}-dynamic-theme`,{cspNonce:r}):Cn("NzConfigService: SSR do not support dynamic theme with css variables.")}var j9=function(t){return t!==void 0},B9="ant",Rn=(()=>{let e=class e{constructor(n,i){this.configUpdated$=new S,this.config=n||{},this.cspNonce=i,this.config.theme&&Y9(this.getConfig().prefixCls?.prefixCls||B9,this.config.theme,i)}getConfig(){return this.config}getConfigForComponent(n){return this.config[n]}getConfigChangeEventForComponent(n){return this.configUpdated$.pipe(ge(i=>i===n),eo(void 0))}set(n,i){this.config[n]=b(b({},this.config[n]),i),n==="theme"&&this.config.theme&&Y9(this.getConfig().prefixCls?.prefixCls||B9,this.config.theme,this.cspNonce),this.configUpdated$.next(n)}};e.\u0275fac=function(i){return new(i||e)(g(U9,8),g(qr,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Ln(){return function(e,r,n){let i=`$$__zorroConfigDecorator__${r}`;return Object.defineProperty(e,i,{configurable:!0,writable:!0,enumerable:!1}),{get(){let o=n?.get?n.get.bind(this)():this[i],s=(this.propertyAssignCounter?.[r]||0)>1,a=this.nzConfigService.getConfigForComponent(this._nzModuleName)?.[r];return s&&j9(o)?o:j9(a)?a:o},set(o){this.propertyAssignCounter=this.propertyAssignCounter||{},this.propertyAssignCounter[r]=(this.propertyAssignCounter[r]||0)+1,n?.set?n.set.bind(this)(o):this[i]=o},configurable:!0,enumerable:!0}}}var he=function(t){return t[t.State=0]="State",t[t.Transition=1]="Transition",t[t.Sequence=2]="Sequence",t[t.Group=3]="Group",t[t.Animate=4]="Animate",t[t.Keyframes=5]="Keyframes",t[t.Style=6]="Style",t[t.Trigger=7]="Trigger",t[t.Reference=8]="Reference",t[t.AnimateChild=9]="AnimateChild",t[t.AnimateRef=10]="AnimateRef",t[t.Query=11]="Query",t[t.Stagger=12]="Stagger",t}(he||{}),Pr="*";function $9(t,e){return{type:he.Trigger,name:t,definitions:e,options:{}}}function fd(t,e=null){return{type:he.Animate,styles:e,timings:t}}function q9(t,e=null){return{type:he.Sequence,steps:t,options:e}}function Yi(t){return{type:he.Style,styles:t,offset:null}}function pd(t,e,r){return{type:he.State,name:t,styles:e,options:r}}function md(t,e,r=null){return{type:he.Transition,expr:t,animation:e,options:r}}function XQ(t,e,r=null){return{type:he.Query,selector:t,animation:e,options:r}}function JQ(t,e){return{type:he.Stagger,timings:t,animation:e}}var Vi=class{constructor(e=0,r=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+r}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let r=e=="start"?this._onStartFns:this._onDoneFns;r.forEach(n=>n()),r.length=0}},Qc=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let r=0,n=0,i=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++r==o&&this._onFinish()}),s.onDestroy(()=>{++n==o&&this._onDestroy()}),s.onStart(()=>{++i==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let r=e*this.totalTime;this.players.forEach(n=>{let i=n.totalTime?Math.min(1,r/n.totalTime):1;n.setPosition(i)})}getPosition(){let e=this.players.reduce((r,n)=>r===null||n.totalTime>r.totalTime?n:r,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let r=e=="start"?this._onStartFns:this._onDoneFns;r.forEach(n=>n()),r.length=0}},d2="!";function W9(t){return new z(3e3,!1)}function Vk(){return new z(3100,!1)}function Yk(){return new z(3101,!1)}function jk(t){return new z(3001,!1)}function Bk(t){return new z(3003,!1)}function Uk(t){return new z(3004,!1)}function $k(t,e){return new z(3005,!1)}function qk(){return new z(3006,!1)}function Wk(){return new z(3007,!1)}function Gk(t,e){return new z(3008,!1)}function Kk(t){return new z(3002,!1)}function Zk(t,e,r,n,i){return new z(3010,!1)}function Qk(){return new z(3011,!1)}function Xk(){return new z(3012,!1)}function Jk(){return new z(3200,!1)}function eP(){return new z(3202,!1)}function tP(){return new z(3013,!1)}function nP(t){return new z(3014,!1)}function rP(t){return new z(3015,!1)}function iP(t){return new z(3016,!1)}function oP(t,e){return new z(3404,!1)}function sP(t){return new z(3502,!1)}function aP(t){return new z(3503,!1)}function cP(){return new z(3300,!1)}function lP(t){return new z(3504,!1)}function uP(t){return new z(3301,!1)}function dP(t,e){return new z(3302,!1)}function hP(t){return new z(3303,!1)}function fP(t,e){return new z(3400,!1)}function pP(t){return new z(3401,!1)}function mP(t){return new z(3402,!1)}function gP(t,e){return new z(3505,!1)}function ji(t){switch(t.length){case 0:return new Vi;case 1:return t[0];default:return new Qc(t)}}function av(t,e,r=new Map,n=new Map){let i=[],o=[],s=-1,a=null;if(e.forEach(c=>{let l=c.get("offset"),u=l==s,d=u&&a||new Map;c.forEach((h,f)=>{let p=f,y=h;if(f!=="offset")switch(p=t.normalizePropertyName(p,i),y){case d2:y=r.get(f);break;case Pr:y=n.get(f);break;default:y=t.normalizeStyleValue(f,p,y,i);break}d.set(p,y)}),u||o.push(d),a=d,s=l}),i.length)throw sP(i);return o}function Rd(t,e,r,n){switch(e){case"start":t.onStart(()=>n(r&&gd(r,"start",t)));break;case"done":t.onDone(()=>n(r&&gd(r,"done",t)));break;case"destroy":t.onDestroy(()=>n(r&&gd(r,"destroy",t)));break}}function gd(t,e,r){let n=r.totalTime,i=!!r.disabled,o=Ld(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,n??t.totalTime,i),s=t._data;return s!=null&&(o._data=s),o}function Ld(t,e,r,n,i="",o=0,s){return{element:t,triggerName:e,fromState:r,toState:n,phaseName:i,totalTime:o,disabled:!!s}}function xn(t,e,r){let n=t.get(e);return n||t.set(e,n=r),n}function G9(t){let e=t.indexOf(":"),r=t.substring(1,e),n=t.slice(e+1);return[r,n]}var vP=typeof document>"u"?null:document.documentElement;function Hd(t){let e=t.parentNode||t.host||null;return e===vP?null:e}function yP(t){return t.substring(1,6)=="ebkit"}var Io=null,K9=!1;function wP(t){Io||(Io=bP()||{},K9=Io.style?"WebkitAppearance"in Io.style:!1);let e=!0;return Io.style&&!yP(t)&&(e=t in Io.style,!e&&K9&&(e="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Io.style)),e}function bP(){return typeof document<"u"?document.body:null}function cv(t,e){for(;e;){if(e===t)return!0;e=Hd(e)}return!1}function lv(t,e,r){if(r)return Array.from(t.querySelectorAll(e));let n=t.querySelector(e);return n?[n]:[]}var Vd=(()=>{let e=class e{validateStyleProperty(n){return wP(n)}matchesElement(n,i){return!1}containsElement(n,i){return cv(n,i)}getParentElement(n){return Hd(n)}query(n,i,o){return lv(n,i,o)}computeStyle(n,i,o){return o||""}animate(n,i,o,s,a,c=[],l){return new Vi(o,s)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),il=(()=>{let e=class e{};e.NOOP=new Vd;let t=e;return t})(),Oo=class{};var _P=1e3,uv="{{",CP="}}",dv="ng-enter",Cd="ng-leave",h2="ng-trigger",v2=".ng-trigger",Z9="ng-animating",Md=".ng-animating";function ni(t){if(typeof t=="number")return t;let e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Dd(parseFloat(e[1]),e[2])}function Dd(t,e){switch(e){case"s":return t*_P;default:return t}}function y2(t,e,r){return t.hasOwnProperty("duration")?t:MP(t,e,r)}function MP(t,e,r){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,o=0,s="";if(typeof t=="string"){let a=t.match(n);if(a===null)return e.push(W9(t)),{duration:0,delay:0,easing:""};i=Dd(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=Dd(parseFloat(c),a[4]));let l=a[5];l&&(s=l)}else i=t;if(!r){let a=!1,c=e.length;i<0&&(e.push(Vk()),a=!0),o<0&&(e.push(Yk()),a=!0),a&&e.splice(c,0,W9(t))}return{duration:i,delay:o,easing:s}}function DP(t){return t.length?t[0]instanceof Map?t:t.map(e=>new Map(Object.entries(e))):[]}function Or(t,e,r){e.forEach((n,i)=>{let o=Yd(i);r&&!r.has(i)&&r.set(i,t.style[o]),t.style[o]=n})}function Po(t,e){e.forEach((r,n)=>{let i=Yd(n);t.style[i]=""})}function Xc(t){return Array.isArray(t)?t.length==1?t[0]:q9(t):t}function xP(t,e,r){let n=e.params||{},i=hv(t);i.length&&i.forEach(o=>{n.hasOwnProperty(o)||r.push(jk(o))})}var xd=new RegExp(`${uv}\\s*(.+?)\\s*${CP}`,"g");function hv(t){let e=[];if(typeof t=="string"){let r;for(;r=xd.exec(t);)e.push(r[1]);xd.lastIndex=0}return e}function el(t,e,r){let n=`${t}`,i=n.replace(xd,(o,s)=>{let a=e[s];return a==null&&(r.push(Bk(s)),a=""),a.toString()});return i==n?t:i}var SP=/-+([a-z0-9])/g;function Yd(t){return t.replace(SP,(...e)=>e[1].toUpperCase())}function TP(t,e){return t===0||e===0}function EP(t,e,r){if(r.size&&e.length){let n=e[0],i=[];if(r.forEach((o,s)=>{n.has(s)||i.push(s),n.set(s,o)}),i.length)for(let o=1;os.set(a,jd(t,a)))}}return e}function Dn(t,e,r){switch(e.type){case he.Trigger:return t.visitTrigger(e,r);case he.State:return t.visitState(e,r);case he.Transition:return t.visitTransition(e,r);case he.Sequence:return t.visitSequence(e,r);case he.Group:return t.visitGroup(e,r);case he.Animate:return t.visitAnimate(e,r);case he.Keyframes:return t.visitKeyframes(e,r);case he.Style:return t.visitStyle(e,r);case he.Reference:return t.visitReference(e,r);case he.AnimateChild:return t.visitAnimateChild(e,r);case he.AnimateRef:return t.visitAnimateRef(e,r);case he.Query:return t.visitQuery(e,r);case he.Stagger:return t.visitStagger(e,r);default:throw Uk(e.type)}}function jd(t,e){return window.getComputedStyle(t)[e]}var zP=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),w2=class extends Oo{normalizePropertyName(e,r){return Yd(e)}normalizeStyleValue(e,r,n,i){let o="",s=n.toString().trim();if(zP.has(r)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push($k(e,n))}return s+o}};var b2="*";function IP(t,e){let r=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(n=>kP(n,r,e)):r.push(t),r}function kP(t,e,r){if(t[0]==":"){let c=PP(t,r);if(typeof c=="function"){e.push(c);return}t=c}let n=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return r.push(rP(t)),e;let i=n[1],o=n[2],s=n[3];e.push(Q9(i,s));let a=i==b2&&s==b2;o[0]=="<"&&!a&&e.push(Q9(s,i))}function PP(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(r,n)=>parseFloat(n)>parseFloat(r);case":decrement":return(r,n)=>parseFloat(n) *"}}var f2=new Set(["true","1"]),p2=new Set(["false","0"]);function Q9(t,e){let r=f2.has(t)||p2.has(t),n=f2.has(e)||p2.has(e);return(i,o)=>{let s=t==b2||t==i,a=e==b2||e==o;return!s&&r&&typeof i=="boolean"&&(s=i?f2.has(t):p2.has(t)),!a&&n&&typeof o=="boolean"&&(a=o?f2.has(e):p2.has(e)),s&&a}}var fv=":self",OP=new RegExp(`s*${fv}s*,?`,"g");function pv(t,e,r,n){return new Sd(t).build(e,r,n)}var X9="",Sd=class{constructor(e){this._driver=e}build(e,r,n){let i=new Td(r);return this._resetContextStyleTimingState(i),Dn(this,Xc(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=X9,e.collectedStyles=new Map,e.collectedStyles.set(X9,new Map),e.currentTime=0}visitTrigger(e,r){let n=r.queryCount=0,i=r.depCount=0,o=[],s=[];return e.name.charAt(0)=="@"&&r.errors.push(qk()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(r),a.type==he.State){let c=a,l=c.name;l.toString().split(/\s*,\s*/).forEach(u=>{c.name=u,o.push(this.visitState(c,r))}),c.name=l}else if(a.type==he.Transition){let c=this.visitTransition(a,r);n+=c.queryCount,i+=c.depCount,s.push(c)}else r.errors.push(Wk())}),{type:he.Trigger,name:e.name,states:o,transitions:s,queryCount:n,depCount:i,options:null}}visitState(e,r){let n=this.visitStyle(e.styles,r),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){let o=new Set,s=i||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{hv(c).forEach(l=>{s.hasOwnProperty(l)||o.add(l)})})}),o.size&&r.errors.push(Gk(e.name,[...o.values()]))}return{type:he.State,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,r){r.queryCount=0,r.depCount=0;let n=Dn(this,Xc(e.animation),r),i=IP(e.expr,r.errors);return{type:he.Transition,matchers:i,animation:n,queryCount:r.queryCount,depCount:r.depCount,options:ko(e.options)}}visitSequence(e,r){return{type:he.Sequence,steps:e.steps.map(n=>Dn(this,n,r)),options:ko(e.options)}}visitGroup(e,r){let n=r.currentTime,i=0,o=e.steps.map(s=>{r.currentTime=n;let a=Dn(this,s,r);return i=Math.max(i,r.currentTime),a});return r.currentTime=i,{type:he.Group,steps:o,options:ko(e.options)}}visitAnimate(e,r){let n=RP(e.timings,r.errors);r.currentAnimateTimings=n;let i,o=e.styles?e.styles:Yi({});if(o.type==he.Keyframes)i=this.visitKeyframes(o,r);else{let s=e.styles,a=!1;if(!s){a=!0;let l={};n.easing&&(l.easing=n.easing),s=Yi(l)}r.currentTime+=n.duration+n.delay;let c=this.visitStyle(s,r);c.isEmptyStep=a,i=c}return r.currentAnimateTimings=null,{type:he.Animate,timings:n,style:i,options:null}}visitStyle(e,r){let n=this._makeStyleAst(e,r);return this._validateStyleAst(n,r),n}_makeStyleAst(e,r){let n=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===Pr?n.push(a):r.errors.push(Kk(a)):n.push(new Map(Object.entries(a)));let o=!1,s=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let c of a.values())if(c.toString().indexOf(uv)>=0){o=!0;break}}}),{type:he.Style,styles:n,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,r){let n=r.currentAnimateTimings,i=r.currentTime,o=r.currentTime;n&&o>0&&(o-=n.duration+n.delay),e.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,c)=>{let l=r.collectedStyles.get(r.currentQuerySelector),u=l.get(c),d=!0;u&&(o!=i&&o>=u.startTime&&i<=u.endTime&&(r.errors.push(Zk(c,u.startTime,u.endTime,o,i)),d=!1),o=u.startTime),d&&l.set(c,{startTime:o,endTime:i}),r.options&&xP(a,r.options,r.errors)})})}visitKeyframes(e,r){let n={type:he.Keyframes,styles:[],options:null};if(!r.currentAnimateTimings)return r.errors.push(Qk()),n;let i=1,o=0,s=[],a=!1,c=!1,l=0,u=e.steps.map(M=>{let P=this._makeStyleAst(M,r),X=P.offset!=null?P.offset:NP(P.styles),$=0;return X!=null&&(o++,$=P.offset=X),c=c||$<0||$>1,a=a||$0&&o{let X=h>0?P==f?1:h*P:s[P],$=X*v;r.currentTime=p+y.delay+$,y.duration=$,this._validateStyleAst(M,r),M.offset=X,n.styles.push(M)}),n}visitReference(e,r){return{type:he.Reference,animation:Dn(this,Xc(e.animation),r),options:ko(e.options)}}visitAnimateChild(e,r){return r.depCount++,{type:he.AnimateChild,options:ko(e.options)}}visitAnimateRef(e,r){return{type:he.AnimateRef,animation:this.visitReference(e.animation,r),options:ko(e.options)}}visitQuery(e,r){let n=r.currentQuerySelector,i=e.options||{};r.queryCount++,r.currentQuery=e;let[o,s]=AP(e.selector);r.currentQuerySelector=n.length?n+" "+o:o,xn(r.collectedStyles,r.currentQuerySelector,new Map);let a=Dn(this,Xc(e.animation),r);return r.currentQuery=null,r.currentQuerySelector=n,{type:he.Query,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:ko(e.options)}}visitStagger(e,r){r.currentQuery||r.errors.push(tP());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:y2(e.timings,r.errors,!0);return{type:he.Stagger,animation:Dn(this,Xc(e.animation),r),timings:n,options:null}}};function AP(t){let e=!!t.split(/\s*,\s*/).find(r=>r==fv);return e&&(t=t.replace(OP,"")),t=t.replace(/@\*/g,v2).replace(/@\w+/g,r=>v2+"-"+r.slice(1)).replace(/:animating/g,Md),[t,e]}function FP(t){return t?b({},t):null}var Td=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function NP(t){if(typeof t=="string")return null;let e=null;if(Array.isArray(t))t.forEach(r=>{if(r instanceof Map&&r.has("offset")){let n=r;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let r=t;e=parseFloat(r.get("offset")),r.delete("offset")}return e}function RP(t,e){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let o=y2(t,e).duration;return vd(o,0,"")}let r=t;if(r.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=vd(0,0,"");return o.dynamic=!0,o.strValue=r,o}let i=y2(r,e);return vd(i.duration,i.delay,i.easing)}function ko(t){return t?(t=b({},t),t.params&&(t.params=FP(t.params))):t={},t}function vd(t,e,r){return{duration:t,delay:e,easing:r}}function Bd(t,e,r,n,i,o,s=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:r,postStyleProps:n,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var tl=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,r){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...r)}has(e){return this._map.has(e)}clear(){this._map.clear()}},LP=1,HP=":enter",VP=new RegExp(HP,"g"),YP=":leave",jP=new RegExp(YP,"g");function mv(t,e,r,n,i,o=new Map,s=new Map,a,c,l=[]){return new Ed().buildKeyframes(t,e,r,n,i,o,s,a,c,l)}var Ed=class{buildKeyframes(e,r,n,i,o,s,a,c,l,u=[]){l=l||new tl;let d=new zd(e,r,l,i,o,u,[]);d.options=c;let h=c.delay?ni(c.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,c),Dn(this,n,d);let f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let y=f.length-1;y>=0;y--){let v=f[y];if(v.element===r){p=v;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,c)}return f.length?f.map(p=>p.buildKeyframes()):[Bd(r,[],[],[],0,h,"",!1)]}visitTrigger(e,r){}visitState(e,r){}visitTransition(e,r){}visitAnimateChild(e,r){let n=r.subInstructions.get(r.element);if(n){let i=r.createSubContext(e.options),o=r.currentTimeline.currentTime,s=this._visitSubInstructions(n,i,i.options);o!=s&&r.transformIntoNewTimeline(s)}r.previousNode=e}visitAnimateRef(e,r){let n=r.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],r,n),this.visitReference(e.animation,n),r.transformIntoNewTimeline(n.currentTimeline.currentTime),r.previousNode=e}_applyAnimationRefDelays(e,r,n){for(let i of e){let o=i?.delay;if(o){let s=typeof o=="number"?o:ni(el(o,i?.params??{},r.errors));n.delayNextStep(s)}}}_visitSubInstructions(e,r,n){let o=r.currentTimeline.currentTime,s=n.duration!=null?ni(n.duration):null,a=n.delay!=null?ni(n.delay):null;return s!==0&&e.forEach(c=>{let l=r.appendInstructionToTimeline(c,s,a);o=Math.max(o,l.duration+l.delay)}),o}visitReference(e,r){r.updateOptions(e.options,!0),Dn(this,e.animation,r),r.previousNode=e}visitSequence(e,r){let n=r.subContextCount,i=r,o=e.options;if(o&&(o.params||o.delay)&&(i=r.createSubContext(o),i.transformIntoNewTimeline(),o.delay!=null)){i.previousNode.type==he.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=_2);let s=ni(o.delay);i.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>Dn(this,s,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),r.previousNode=e}visitGroup(e,r){let n=[],i=r.currentTimeline.currentTime,o=e.options&&e.options.delay?ni(e.options.delay):0;e.steps.forEach(s=>{let a=r.createSubContext(e.options);o&&a.delayNextStep(o),Dn(this,s,a),i=Math.max(i,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(s=>r.currentTimeline.mergeTimelineCollectedStyles(s)),r.transformIntoNewTimeline(i),r.previousNode=e}_visitTiming(e,r){if(e.dynamic){let n=e.strValue,i=r.params?el(n,r.params,r.errors):n;return y2(i,r.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,r){let n=r.currentAnimateTimings=this._visitTiming(e.timings,r),i=r.currentTimeline;n.delay&&(r.incrementTime(n.delay),i.snapshotCurrentStyles());let o=e.style;o.type==he.Keyframes?this.visitKeyframes(o,r):(r.incrementTime(n.duration),this.visitStyle(o,r),i.applyStylesToKeyframe()),r.currentAnimateTimings=null,r.previousNode=e}visitStyle(e,r){let n=r.currentTimeline,i=r.currentAnimateTimings;!i&&n.hasCurrentStyleProperties()&&n.forwardFrame();let o=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(o):n.setStyles(e.styles,o,r.errors,r.options),r.previousNode=e}visitKeyframes(e,r){let n=r.currentAnimateTimings,i=r.currentTimeline.duration,o=n.duration,a=r.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(c=>{let l=c.offset||0;a.forwardTime(l*o),a.setStyles(c.styles,c.easing,r.errors,r.options),a.applyStylesToKeyframe()}),r.currentTimeline.mergeTimelineCollectedStyles(a),r.transformIntoNewTimeline(i+o),r.previousNode=e}visitQuery(e,r){let n=r.currentTimeline.currentTime,i=e.options||{},o=i.delay?ni(i.delay):0;o&&(r.previousNode.type===he.Style||n==0&&r.currentTimeline.hasCurrentStyleProperties())&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=_2);let s=n,a=r.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,r.errors);r.currentQueryTotal=a.length;let c=null;a.forEach((l,u)=>{r.currentQueryIndex=u;let d=r.createSubContext(e.options,l);o&&d.delayNextStep(o),l===r.element&&(c=d.currentTimeline),Dn(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe();let h=d.currentTimeline.currentTime;s=Math.max(s,h)}),r.currentQueryIndex=0,r.currentQueryTotal=0,r.transformIntoNewTimeline(s),c&&(r.currentTimeline.mergeTimelineCollectedStyles(c),r.currentTimeline.snapshotCurrentStyles()),r.previousNode=e}visitStagger(e,r){let n=r.parentContext,i=r.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(r.currentQueryTotal-1),c=s*r.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=n.currentStaggerTime;break}let u=r.currentTimeline;c&&u.delayNextStep(c);let d=u.currentTime;Dn(this,e.animation,r),r.previousNode=e,n.currentStaggerTime=i.currentTime-d+(i.startTime-n.currentTimeline.startTime)}},_2={},zd=class t{constructor(e,r,n,i,o,s,a,c){this._driver=e,this.element=r,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=_2,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new C2(this._driver,r,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,r){if(!e)return;let n=e,i=this.options;n.duration!=null&&(i.duration=ni(n.duration)),n.delay!=null&&(i.delay=ni(n.delay));let o=n.params;if(o){let s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!r||!s.hasOwnProperty(a))&&(s[a]=el(o[a],s,this.errors))})}}_copyOptions(){let e={};if(this.options){let r=this.options.params;if(r){let n=e.params={};Object.keys(r).forEach(i=>{n[i]=r[i]})}}return e}createSubContext(e=null,r,n){let i=r||this.element,o=new t(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=_2,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,r,n){let i={duration:r??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},o=new Id(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(o),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,r,n,i,o,s){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(VP,"."+this._enterClassName),e=e.replace(jP,"."+this._leaveClassName);let c=n!=1,l=this._driver.query(this.element,e,c);n!==0&&(l=n<0?l.slice(l.length+n,l.length):l.slice(0,n)),a.push(...l)}return!o&&a.length==0&&s.push(nP(r)),a}},C2=class t{constructor(e,r,n,i){this._driver=e,this.element=r,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(r),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(r,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let r=this._keyframes.size===1&&this._pendingStyles.size;this.duration||r?(this.forwardTime(this.currentTime+e),r&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,r){return this.applyStylesToKeyframe(),new t(this._driver,e,r||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=LP,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,r){this._localTimelineStyles.set(e,r),this._globalTimelineStyles.set(e,r),this._styleSummary.set(e,{time:this.currentTime,value:r})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[r,n]of this._globalTimelineStyles)this._backFill.set(r,n||Pr),this._currentKeyframe.set(r,Pr);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,r,n,i){r&&this._previousKeyframe.set("easing",r);let o=i&&i.params||{},s=BP(e,this._globalTimelineStyles);for(let[a,c]of s){let l=el(c,o,n);this._pendingStyles.set(a,l),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Pr),this._updateStyle(a,l)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,r)=>{this._currentKeyframe.set(r,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,r)=>{this._currentKeyframe.has(r)||this._currentKeyframe.set(r,e)}))}snapshotCurrentStyles(){for(let[e,r]of this._localTimelineStyles)this._pendingStyles.set(e,r),this._updateStyle(e,r)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let r in this._currentKeyframe)e.push(r);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((r,n)=>{let i=this._styleSummary.get(n);(!i||r.time>i.time)&&this._updateStyle(n,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,r=new Set,n=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,c)=>{let l=new Map([...this._backFill,...a]);l.forEach((u,d)=>{u===d2?e.add(d):u===Pr&&r.add(d)}),n||l.set("offset",c/this.duration),i.push(l)});let o=[...e.values()],s=[...r.values()];if(n){let a=i[0],c=new Map(a);a.set("offset",0),c.set("offset",1),i=[a,c]}return Bd(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)}},Id=class extends C2{constructor(e,r,n,i,o,s,a=!1){super(e,r,s.delay),this.keyframes=n,this.preStyleProps=i,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:r,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&r){let o=[],s=n+r,a=r/s,c=new Map(e[0]);c.set("offset",0),o.push(c);let l=new Map(e[0]);l.set("offset",J9(a)),o.push(l);let u=e.length-1;for(let d=1;d<=u;d++){let h=new Map(e[d]),f=h.get("offset"),p=r+f*n;h.set("offset",J9(p/s)),o.push(h)}n=s,r=0,i="",e=o}return Bd(this.element,e,this.preStyleProps,this.postStyleProps,n,r,i,!0)}};function J9(t,e=3){let r=Math.pow(10,e-1);return Math.round(t*r)/r}function BP(t,e){let r=new Map,n;return t.forEach(i=>{if(i==="*"){n??=e.keys();for(let o of n)r.set(o,Pr)}else for(let[o,s]of i)r.set(o,s)}),r}function ev(t,e,r,n,i,o,s,a,c,l,u,d,h){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:r,fromStyles:o,toState:n,toStyles:s,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:u,totalTime:d,errors:h}}var yd={},M2=class{constructor(e,r,n){this._triggerName=e,this.ast=r,this._stateStyles=n}match(e,r,n,i){return UP(this.ast.matchers,e,r,n,i)}buildStyles(e,r,n){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(r,n):new Map}build(e,r,n,i,o,s,a,c,l,u){let d=[],h=this.ast.options&&this.ast.options.params||yd,f=a&&a.params||yd,p=this.buildStyles(n,f,d),y=c&&c.params||yd,v=this.buildStyles(i,y,d),M=new Set,P=new Map,X=new Map,$=i==="void",Ae={params:gv(y,h),delay:this.ast.options?.delay},_e=u?[]:mv(e,r,this.ast.animation,o,s,p,v,Ae,l,d),Ee=0;return _e.forEach($e=>{Ee=Math.max($e.duration+$e.delay,Ee)}),d.length?ev(r,this._triggerName,n,i,$,p,v,[],[],P,X,Ee,d):(_e.forEach($e=>{let Mt=$e.element,Bt=xn(P,Mt,new Set);$e.preStyleProps.forEach(ln=>Bt.add(ln));let di=xn(X,Mt,new Set);$e.postStyleProps.forEach(ln=>di.add(ln)),Mt!==r&&M.add(Mt)}),ev(r,this._triggerName,n,i,$,p,v,_e,[...M.values()],P,X,Ee))}};function UP(t,e,r,n,i){return t.some(o=>o(e,r,n,i))}function gv(t,e){let r=b({},e);return Object.entries(t).forEach(([n,i])=>{i!=null&&(r[n]=i)}),r}var kd=class{constructor(e,r,n){this.styles=e,this.defaultParams=r,this.normalizer=n}buildStyles(e,r){let n=new Map,i=gv(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=el(s,i,r));let c=this.normalizer.normalizePropertyName(a,r);s=this.normalizer.normalizeStyleValue(a,c,s,r),n.set(a,s)})}),n}};function $P(t,e,r){return new Pd(t,e,r)}var Pd=class{constructor(e,r,n){this.name=e,this.ast=r,this._normalizer=n,this.transitionFactories=[],this.states=new Map,r.states.forEach(i=>{let o=i.options&&i.options.params||{};this.states.set(i.name,new kd(i.style,o,n))}),tv(this.states,"true","1"),tv(this.states,"false","0"),r.transitions.forEach(i=>{this.transitionFactories.push(new M2(e,i,this.states))}),this.fallbackTransition=qP(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,r,n,i){return this.transitionFactories.find(s=>s.match(e,r,n,i))||null}matchStyles(e,r,n){return this.fallbackTransition.buildStyles(e,r,n)}};function qP(t,e,r){let n=[(s,a)=>!0],i={type:he.Sequence,steps:[],options:null},o={type:he.Transition,animation:i,matchers:n,options:null,queryCount:0,depCount:0};return new M2(t,o,e)}function tv(t,e,r){t.has(e)?t.has(r)||t.set(r,t.get(e)):t.has(r)&&t.set(e,t.get(r))}var WP=new tl,Od=class{constructor(e,r,n){this.bodyNode=e,this._driver=r,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,r){let n=[],i=[],o=pv(this._driver,r,n,i);if(n.length)throw aP(n);i.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,r,n){let i=e.element,o=av(this._normalizer,e.keyframes,r,n);return this._driver.animate(i,o,e.duration,e.delay,e.easing,[],!0)}create(e,r,n={}){let i=[],o=this._animations.get(e),s,a=new Map;if(o?(s=mv(this._driver,r,o,dv,Cd,new Map,new Map,n,WP,i),s.forEach(u=>{let d=xn(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(i.push(cP()),s=[]),i.length)throw lP(i);a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,Pr))})});let c=s.map(u=>{let d=a.get(u.element);return this._buildPlayer(u,new Map,d)}),l=ji(c);return this._playersById.set(e,l),l.onDestroy(()=>this.destroy(e)),this.players.push(l),l}destroy(e){let r=this._getPlayer(e);r.destroy(),this._playersById.delete(e);let n=this.players.indexOf(r);n>=0&&this.players.splice(n,1)}_getPlayer(e){let r=this._playersById.get(e);if(!r)throw uP(e);return r}listen(e,r,n,i){let o=Ld(r,"","","");return Rd(this._getPlayer(e),n,o,i),()=>{}}command(e,r,n,i){if(n=="register"){this.register(e,i[0]);return}if(n=="create"){let s=i[0]||{};this.create(e,r,s);return}let o=this._getPlayer(e);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},nv="ng-animate-queued",GP=".ng-animate-queued",wd="ng-animate-disabled",KP=".ng-animate-disabled",ZP="ng-star-inserted",QP=".ng-star-inserted",XP=[],vv={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},JP={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sr="__ng_removed",nl=class{get params(){return this.options.params}constructor(e,r=""){this.namespaceId=r;let n=e&&e.hasOwnProperty("value"),i=n?e.value:e;if(this.value=tO(i),n){let o=e,{value:s}=o,a=ss(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let r=e.params;if(r){let n=this.options.params;Object.keys(r).forEach(i=>{n[i]==null&&(n[i]=r[i])})}}},Jc="void",bd=new nl(Jc),Ad=class{constructor(e,r,n){this.id=e,this.hostElement=r,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Hn(r,this._hostClassName)}listen(e,r,n,i){if(!this._triggers.has(r))throw dP(n,r);if(n==null||n.length==0)throw hP(r);if(!nO(n))throw fP(n,r);let o=xn(this._elementListeners,e,[]),s={name:r,phase:n,callback:i};o.push(s);let a=xn(this._engine.statesByElement,e,new Map);return a.has(r)||(Hn(e,h2),Hn(e,h2+"-"+r),a.set(r,bd)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(r)||a.delete(r)})}}register(e,r){return this._triggers.has(e)?!1:(this._triggers.set(e,r),!0)}_getTrigger(e){let r=this._triggers.get(e);if(!r)throw pP(e);return r}trigger(e,r,n,i=!0){let o=this._getTrigger(r),s=new rl(this.id,r,e),a=this._engine.statesByElement.get(e);a||(Hn(e,h2),Hn(e,h2+"-"+r),this._engine.statesByElement.set(e,a=new Map));let c=a.get(r),l=new nl(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),a.set(r,l),c||(c=bd),!(l.value===Jc)&&c.value===l.value){if(!oO(c.params,l.params)){let y=[],v=o.matchStyles(c.value,c.params,y),M=o.matchStyles(l.value,l.params,y);y.length?this._engine.reportError(y):this._engine.afterFlush(()=>{Po(e,v),Or(e,M)})}return}let h=xn(this._engine.playersByElement,e,[]);h.forEach(y=>{y.namespaceId==this.id&&y.triggerName==r&&y.queued&&y.destroy()});let f=o.matchTransition(c.value,l.value,e,l.params),p=!1;if(!f){if(!i)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:r,transition:f,fromState:c,toState:l,player:s,isFallbackTransition:p}),p||(Hn(e,nv),s.onStart(()=>{la(e,nv)})),s.onDone(()=>{let y=this.players.indexOf(s);y>=0&&this.players.splice(y,1);let v=this._engine.playersByElement.get(e);if(v){let M=v.indexOf(s);M>=0&&v.splice(M,1)}}),this.players.push(s),h.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(r=>r.delete(e)),this._elementListeners.forEach((r,n)=>{this._elementListeners.set(n,r.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let r=this._engine.playersByElement.get(e);r&&(r.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,r){let n=this._engine.driver.query(e,v2,!0);n.forEach(i=>{if(i[sr])return;let o=this._engine.fetchNamespacesByElement(i);o.size?o.forEach(s=>s.triggerLeaveAnimation(i,r,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,r,n,i){let o=this._engine.statesByElement.get(e),s=new Map;if(o){let a=[];if(o.forEach((c,l)=>{if(s.set(l,c.value),this._triggers.has(l)){let u=this.trigger(e,l,Jc,i);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,r,s),n&&ji(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let r=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(r&&n){let i=new Set;r.forEach(o=>{let s=o.name;if(i.has(s))return;i.add(s);let c=this._triggers.get(s).fallbackTransition,l=n.get(s)||bd,u=new nl(Jc),d=new rl(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:c,fromState:l,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(e,r){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,r),this.triggerLeaveAnimation(e,r,!0))return;let i=!1;if(n.totalAnimations){let o=n.players.length?n.playersByQueriedElement.get(e):[];if(o&&o.length)i=!0;else{let s=e;for(;s=s.parentNode;)if(n.statesByElement.get(s)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,r);else{let o=e[sr];(!o||o===vv)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,r))}}insertNode(e,r){Hn(e,this._hostClassName)}drainQueuedTransitions(e){let r=[];return this._queue.forEach(n=>{let i=n.player;if(i.destroyed)return;let o=n.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==n.triggerName){let c=Ld(o,n.triggerName,n.fromState.value,n.toState.value);c._data=e,Rd(n.player,a.phase,c,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):r.push(n)}),this._queue=[],r.sort((n,i)=>{let o=n.transition.ast.depCount,s=i.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(n.element,i.element)?1:-1})}destroy(e){this.players.forEach(r=>r.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Fd=class{_onRemovalComplete(e,r){this.onRemovalComplete(e,r)}constructor(e,r,n){this.bodyNode=e,this.driver=r,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(r=>{r.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,r){let n=new Ad(e,r,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,r)?this._balanceNamespaceList(n,r):(this.newHostElements.set(r,n),this.collectEnterElement(r)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,r){let n=this._namespaceList,i=this.namespacesByHostElement;if(n.length-1>=0){let s=!1,a=this.driver.getParentElement(r);for(;a;){let c=i.get(a);if(c){let l=n.indexOf(c);n.splice(l+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||n.unshift(e)}else n.push(e);return i.set(r,e),e}register(e,r){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,r)),n}registerTrigger(e,r,n){let i=this._namespaceLookup[e];i&&i.register(r,n)&&this.totalAnimations++}destroy(e,r){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let i=this._namespaceList.indexOf(n);i>=0&&this._namespaceList.splice(i,1),n.destroy(r),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let r=new Set,n=this.statesByElement.get(e);if(n){for(let i of n.values())if(i.namespaceId){let o=this._fetchNamespace(i.namespaceId);o&&r.add(o)}}return r}trigger(e,r,n,i){if(m2(r)){let o=this._fetchNamespace(e);if(o)return o.trigger(r,n,i),!0}return!1}insertNode(e,r,n,i){if(!m2(r))return;let o=r[sr];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(r);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){let s=this._fetchNamespace(e);s&&s.insertNode(r,n)}i&&this.collectEnterElement(r)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,r){r?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Hn(e,wd)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),la(e,wd))}removeNode(e,r,n){if(m2(r)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(r,n):this.markElementAsRemoved(e,r,!1,n);let o=this.namespacesByHostElement.get(r);o&&o.id!==e&&o.removeNode(r,n)}else this._onRemovalComplete(r,n)}markElementAsRemoved(e,r,n,i,o){this.collectedLeaveElements.push(r),r[sr]={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,r,n,i,o){return m2(r)?this._fetchNamespace(e).listen(r,n,i,o):()=>{}}_buildInstruction(e,r,n,i,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,r,o)}destroyInnerAnimations(e){let r=this.driver.query(e,v2,!0);r.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(r=this.driver.query(e,Md,!0),r.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let r=this.playersByElement.get(e);r&&r.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let r=this.playersByQueriedElement.get(e);r&&r.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return ji(this.players).onDone(()=>e());e()})}processLeaveNode(e){let r=e[sr];if(r&&r.setForRemoval){if(e[sr]=vv,r.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(r.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,r.setForRemoval)}e.classList?.contains(wd)&&this.markElementAsDisabled(e,!1),this.driver.query(e,KP,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let r=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,i)=>this._balanceNamespaceList(n,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],r.length?ji(r).onDone(()=>{n.forEach(i=>i())}):n.forEach(i=>i())}}reportError(e){throw mP(e)}_flushAnimations(e,r){let n=new tl,i=[],o=new Map,s=[],a=new Map,c=new Map,l=new Map,u=new Set;this.disabledNodes.forEach(O=>{u.add(O);let B=this.driver.query(O,GP,!0);for(let J=0;J{let J=dv+y++;p.set(B,J),O.forEach(Ce=>Hn(Ce,J))});let v=[],M=new Set,P=new Set;for(let O=0;OM.add(Ce)):P.add(B))}let X=new Map,$=ov(h,Array.from(M));$.forEach((O,B)=>{let J=Cd+y++;X.set(B,J),O.forEach(Ce=>Hn(Ce,J))}),e.push(()=>{f.forEach((O,B)=>{let J=p.get(B);O.forEach(Ce=>la(Ce,J))}),$.forEach((O,B)=>{let J=X.get(B);O.forEach(Ce=>la(Ce,J))}),v.forEach(O=>{this.processLeaveNode(O)})});let Ae=[],_e=[];for(let O=this._namespaceList.length-1;O>=0;O--)this._namespaceList[O].drainQueuedTransitions(r).forEach(J=>{let Ce=J.player,mt=J.element;if(Ae.push(Ce),this.collectedEnterElements.length){let ht=mt[sr];if(ht&&ht.setForMove){if(ht.previousTriggersValues&&ht.previousTriggersValues.has(J.triggerName)){let qe=ht.previousTriggersValues.get(J.triggerName),we=this.statesByElement.get(J.element);if(we&&we.has(J.triggerName)){let zt=we.get(J.triggerName);zt.value=qe,we.set(J.triggerName,zt)}}Ce.destroy();return}}let Zt=!d||!this.driver.containsElement(d,mt),vt=X.get(mt),Un=p.get(mt),Ye=this._buildInstruction(J,n,Un,vt,Zt);if(Ye.errors&&Ye.errors.length){_e.push(Ye);return}if(Zt){Ce.onStart(()=>Po(mt,Ye.fromStyles)),Ce.onDestroy(()=>Or(mt,Ye.toStyles)),i.push(Ce);return}if(J.isFallbackTransition){Ce.onStart(()=>Po(mt,Ye.fromStyles)),Ce.onDestroy(()=>Or(mt,Ye.toStyles)),i.push(Ce);return}let Aa=[];Ye.timelines.forEach(ht=>{ht.stretchStartingKeyframe=!0,this.disabledNodes.has(ht.element)||Aa.push(ht)}),Ye.timelines=Aa,n.append(mt,Ye.timelines);let Tl={instruction:Ye,player:Ce,element:mt};s.push(Tl),Ye.queriedElements.forEach(ht=>xn(a,ht,[]).push(Ce)),Ye.preStyleProps.forEach((ht,qe)=>{if(ht.size){let we=c.get(qe);we||c.set(qe,we=new Set),ht.forEach((zt,hi)=>we.add(hi))}}),Ye.postStyleProps.forEach((ht,qe)=>{let we=l.get(qe);we||l.set(qe,we=new Set),ht.forEach((zt,hi)=>we.add(hi))})});if(_e.length){let O=[];_e.forEach(B=>{O.push(gP(B.triggerName,B.errors))}),Ae.forEach(B=>B.destroy()),this.reportError(O)}let Ee=new Map,$e=new Map;s.forEach(O=>{let B=O.element;n.has(B)&&($e.set(B,B),this._beforeAnimationBuild(O.player.namespaceId,O.instruction,Ee))}),i.forEach(O=>{let B=O.element;this._getPreviousPlayers(B,!1,O.namespaceId,O.triggerName,null).forEach(Ce=>{xn(Ee,B,[]).push(Ce),Ce.destroy()})});let Mt=v.filter(O=>sv(O,c,l)),Bt=new Map;iv(Bt,this.driver,P,l,Pr).forEach(O=>{sv(O,c,l)&&Mt.push(O)});let ln=new Map;f.forEach((O,B)=>{iv(ln,this.driver,new Set(O),c,d2)}),Mt.forEach(O=>{let B=Bt.get(O),J=ln.get(O);Bt.set(O,new Map([...B?.entries()??[],...J?.entries()??[]]))});let Rr=[],os=[],pt={};s.forEach(O=>{let{element:B,player:J,instruction:Ce}=O;if(n.has(B)){if(u.has(B)){J.onDestroy(()=>Or(B,Ce.toStyles)),J.disabled=!0,J.overrideTotalTime(Ce.totalTime),i.push(J);return}let mt=pt;if($e.size>1){let vt=B,Un=[];for(;vt=vt.parentNode;){let Ye=$e.get(vt);if(Ye){mt=Ye;break}Un.push(vt)}Un.forEach(Ye=>$e.set(Ye,mt))}let Zt=this._buildAnimation(J.namespaceId,Ce,Ee,o,ln,Bt);if(J.setRealPlayer(Zt),mt===pt)Rr.push(J);else{let vt=this.playersByElement.get(mt);vt&&vt.length&&(J.parentPlayer=ji(vt)),i.push(J)}}else Po(B,Ce.fromStyles),J.onDestroy(()=>Or(B,Ce.toStyles)),os.push(J),u.has(B)&&i.push(J)}),os.forEach(O=>{let B=o.get(O.element);if(B&&B.length){let J=ji(B);O.setRealPlayer(J)}}),i.forEach(O=>{O.parentPlayer?O.syncPlayerEvents(O.parentPlayer):O.destroy()});for(let O=0;O!Zt.destroyed);mt.length?rO(this,B,mt):this.processLeaveNode(B)}return v.length=0,Rr.forEach(O=>{this.players.push(O),O.onDone(()=>{O.destroy();let B=this.players.indexOf(O);this.players.splice(B,1)}),O.play()}),Rr}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,r,n,i,o){let s=[];if(r){let a=this.playersByQueriedElement.get(e);a&&(s=a)}else{let a=this.playersByElement.get(e);if(a){let c=!o||o==Jc;a.forEach(l=>{l.queued||!c&&l.triggerName!=i||s.push(l)})}}return(n||i)&&(s=s.filter(a=>!(n&&n!=a.namespaceId||i&&i!=a.triggerName))),s}_beforeAnimationBuild(e,r,n){let i=r.triggerName,o=r.element,s=r.isRemovalTransition?void 0:e,a=r.isRemovalTransition?void 0:i;for(let c of r.timelines){let l=c.element,u=l!==o,d=xn(n,l,[]);this._getPreviousPlayers(l,u,s,a,r.toState).forEach(f=>{let p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Po(o,r.fromStyles)}_buildAnimation(e,r,n,i,o,s){let a=r.triggerName,c=r.element,l=[],u=new Set,d=new Set,h=r.timelines.map(p=>{let y=p.element;u.add(y);let v=y[sr];if(v&&v.removedBeforeQueried)return new Vi(p.duration,p.delay);let M=y!==c,P=iO((n.get(y)||XP).map(Ee=>Ee.getRealPlayer())).filter(Ee=>{let $e=Ee;return $e.element?$e.element===y:!1}),X=o.get(y),$=s.get(y),Ae=av(this._normalizer,p.keyframes,X,$),_e=this._buildPlayer(p,Ae,P);if(p.subTimeline&&i&&d.add(y),M){let Ee=new rl(e,a,y);Ee.setRealPlayer(_e),l.push(Ee)}return _e});l.forEach(p=>{xn(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>eO(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Hn(p,Z9));let f=ji(h);return f.onDestroy(()=>{u.forEach(p=>la(p,Z9)),Or(c,r.toStyles)}),d.forEach(p=>{xn(i,p,[]).push(f)}),f}_buildPlayer(e,r,n){return r.length>0?this.driver.animate(e.element,r,e.duration,e.delay,e.easing,n):new Vi(e.duration,e.delay)}},rl=class{constructor(e,r,n){this.namespaceId=e,this.triggerName=r,this.element=n,this._player=new Vi,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((r,n)=>{r.forEach(i=>Rd(e,n,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let r=this._player;r.triggerCallback&&e.onStart(()=>r.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,r){xn(this._queuedCallbacks,e,[]).push(r)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let r=this._player;r.triggerCallback&&r.triggerCallback(e)}};function eO(t,e,r){let n=t.get(e);if(n){if(n.length){let i=n.indexOf(r);n.splice(i,1)}n.length==0&&t.delete(e)}return n}function tO(t){return t??null}function m2(t){return t&&t.nodeType===1}function nO(t){return t=="start"||t=="done"}function rv(t,e){let r=t.style.display;return t.style.display=e??"none",r}function iv(t,e,r,n,i){let o=[];r.forEach(c=>o.push(rv(c)));let s=[];n.forEach((c,l)=>{let u=new Map;c.forEach(d=>{let h=e.computeStyle(l,d,i);u.set(d,h),(!h||h.length==0)&&(l[sr]=JP,s.push(l))}),t.set(l,u)});let a=0;return r.forEach(c=>rv(c,o[a++])),s}function ov(t,e){let r=new Map;if(t.forEach(a=>r.set(a,[])),e.length==0)return r;let n=1,i=new Set(e),o=new Map;function s(a){if(!a)return n;let c=o.get(a);if(c)return c;let l=a.parentNode;return r.has(l)?c=l:i.has(l)?c=n:c=s(l),o.set(a,c),c}return e.forEach(a=>{let c=s(a);c!==n&&r.get(c).push(a)}),r}function Hn(t,e){t.classList?.add(e)}function la(t,e){t.classList?.remove(e)}function rO(t,e,r){ji(r).onDone(()=>t.processLeaveNode(e))}function iO(t){let e=[];return yv(t,e),e}function yv(t,e){for(let r=0;ri.add(o)):e.set(t,n),r.delete(t),!0}var ua=class{constructor(e,r,n){this._driver=r,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(i,o)=>{},this._transitionEngine=new Fd(e.body,r,n),this._timelineEngine=new Od(e.body,r,n),this._transitionEngine.onRemovalComplete=(i,o)=>this.onRemovalComplete(i,o)}registerTrigger(e,r,n,i,o){let s=e+"-"+i,a=this._triggerCache[s];if(!a){let c=[],l=[],u=pv(this._driver,o,c,l);if(c.length)throw oP(i,c);l.length&&void 0,a=$P(i,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(r,i,a)}register(e,r){this._transitionEngine.register(e,r)}destroy(e,r){this._transitionEngine.destroy(e,r)}onInsert(e,r,n,i){this._transitionEngine.insertNode(e,r,n,i)}onRemove(e,r,n){this._transitionEngine.removeNode(e,r,n)}disableAnimations(e,r){this._transitionEngine.markElementAsDisabled(e,r)}process(e,r,n,i){if(n.charAt(0)=="@"){let[o,s]=G9(n),a=i;this._timelineEngine.command(o,r,s,a)}else this._transitionEngine.trigger(e,r,n,i)}listen(e,r,n,i,o){if(n.charAt(0)=="@"){let[s,a]=G9(n);return this._timelineEngine.listen(s,r,a,o)}return this._transitionEngine.listen(e,r,n,i,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function sO(t,e){let r=null,n=null;return Array.isArray(e)&&e.length?(r=_d(e[0]),e.length>1&&(n=_d(e[e.length-1]))):e instanceof Map&&(r=_d(e)),r||n?new aO(t,r,n):null}var aO=(()=>{let e=class e{constructor(n,i,o){this._element=n,this._startStyles=i,this._endStyles=o,this._state=0;let s=e.initialStylesByElement.get(n);s||e.initialStylesByElement.set(n,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Or(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Or(this._element,this._initialStyles),this._endStyles&&(Or(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(Po(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Po(this._element,this._endStyles),this._endStyles=null),Or(this._element,this._initialStyles),this._state=3)}};e.initialStylesByElement=new WeakMap;let t=e;return t})();function _d(t){let e=null;return t.forEach((r,n)=>{cO(n)&&(e=e||new Map,e.set(n,r))}),e}function cO(t){return t==="display"||t==="position"}var D2=class{constructor(e,r,n,i){this.element=e,this.keyframes=r,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let r=()=>this._onFinish();this.domPlayer.addEventListener("finish",r),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",r)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let r=[];return e.forEach(n=>{r.push(Object.fromEntries(n))}),r}_triggerWebAnimation(e,r,n){return e.animate(this._convertKeyframesToObject(r),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,i)=>{i!=="offset"&&e.set(i,this._finished?n:jd(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let r=e==="start"?this._onStartFns:this._onDoneFns;r.forEach(n=>n()),r.length=0}},x2=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}matchesElement(e,r){return!1}containsElement(e,r){return cv(e,r)}getParentElement(e){return Hd(e)}query(e,r,n){return lv(e,r,n)}computeStyle(e,r,n){return jd(e,r)}animate(e,r,n,i,o,s=[]){let a=i==0?"both":"forwards",c={duration:n,delay:i,fill:a};o&&(c.easing=o);let l=new Map,u=s.filter(f=>f instanceof D2);TP(n,i)&&u.forEach(f=>{f.currentSnapshot.forEach((p,y)=>l.set(y,p))});let d=DP(r).map(f=>new Map(f));d=EP(e,d,l);let h=sO(e,d);return new D2(e,d,c,h)}};var g2="@",wv="@.disabled",S2=class{constructor(e,r,n,i){this.namespaceId=e,this.delegate=r,this.engine=n,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,r){return this.delegate.createElement(e,r)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,r){this.delegate.appendChild(e,r),this.engine.onInsert(this.namespaceId,r,e,!1)}insertBefore(e,r,n,i=!0){this.delegate.insertBefore(e,r,n),this.engine.onInsert(this.namespaceId,r,e,i)}removeChild(e,r,n){this.engine.onRemove(this.namespaceId,r,this.delegate)}selectRootElement(e,r){return this.delegate.selectRootElement(e,r)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,r,n,i){this.delegate.setAttribute(e,r,n,i)}removeAttribute(e,r,n){this.delegate.removeAttribute(e,r,n)}addClass(e,r){this.delegate.addClass(e,r)}removeClass(e,r){this.delegate.removeClass(e,r)}setStyle(e,r,n,i){this.delegate.setStyle(e,r,n,i)}removeStyle(e,r,n){this.delegate.removeStyle(e,r,n)}setProperty(e,r,n){r.charAt(0)==g2&&r==wv?this.disableAnimations(e,!!n):this.delegate.setProperty(e,r,n)}setValue(e,r){this.delegate.setValue(e,r)}listen(e,r,n){return this.delegate.listen(e,r,n)}disableAnimations(e,r){this.engine.disableAnimations(e,r)}},Nd=class extends S2{constructor(e,r,n,i,o){super(r,n,i,o),this.factory=e,this.namespaceId=r}setProperty(e,r,n){r.charAt(0)==g2?r.charAt(1)=="."&&r==wv?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,r.slice(1),n):this.delegate.setProperty(e,r,n)}listen(e,r,n){if(r.charAt(0)==g2){let i=lO(e),o=r.slice(1),s="";return o.charAt(0)!=g2&&([o,s]=uO(o)),this.engine.listen(this.namespaceId,i,o,s,a=>{let c=a._data||-1;this.factory.scheduleListenerCallback(c,n,a)})}return this.delegate.listen(e,r,n)}};function lO(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function uO(t){let e=t.indexOf("."),r=t.substring(0,e),n=t.slice(e+1);return[r,n]}var T2=class{constructor(e,r,n){this.delegate=e,this.engine=r,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,r.onRemovalComplete=(i,o)=>{let s=o?.parentNode(i);s&&o.removeChild(s,i)}}createRenderer(e,r){let n="",i=this.delegate.createRenderer(e,r);if(!e||!r?.data?.animation){let l=this._rendererCache,u=l.get(i);if(!u){let d=()=>l.delete(i);u=new S2(n,i,this.engine,d),l.set(i,u)}return u}let o=r.id,s=r.id+"-"+this._currentId;this._currentId++,this.engine.register(s,e);let a=l=>{Array.isArray(l)?l.forEach(a):this.engine.registerTrigger(o,s,e,l.name,l)};return r.data.animation.forEach(a),new Nd(this,s,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,r,n){if(e>=0&&er(n));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),i.push([r,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var hO=(()=>{let e=class e extends ua{constructor(n,i,o,s){super(n,i,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(i){return new(i||e)(g(V),g(il),g(Oo),g(xr))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function fO(){return new w2}function pO(t,e,r){return new T2(t,e,r)}var bv=[{provide:Oo,useFactory:fO},{provide:ua,useClass:hO},{provide:Jn,useFactory:pO,deps:[R4,ua,U]}],mO=[{provide:il,useFactory:()=>new x2},{provide:gn,useValue:"BrowserAnimations"},...bv],fX=[{provide:il,useClass:Vd},{provide:gn,useValue:"NoopAnimations"},...bv];function pX(){return[...mO]}var E2=2,_v=.16,gO=.05,vO=.05,yO=.15,Sv=5,Tv=4,wO=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Cv(t){var e=t.r,r=t.g,n=t.b,i=To(e,r,n);return{h:i.h*360,s:i.s,v:i.v}}function z2(t){var e=t.r,r=t.g,n=t.b;return"#".concat(Eo(e,r,n,!1))}function bO(t,e,r){var n=r/100,i={r:(e.r-t.r)*n+t.r,g:(e.g-t.g)*n+t.g,b:(e.b-t.b)*n+t.b};return i}function Mv(t,e,r){var n;return Math.round(t.h)>=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-E2*e:Math.round(t.h)+E2*e:n=r?Math.round(t.h)+E2*e:Math.round(t.h)-E2*e,n<0?n+=360:n>=360&&(n-=360),n}function Dv(t,e,r){if(t.h===0&&t.s===0)return t.s;var n;return r?n=t.s-_v*e:e===Tv?n=t.s+_v:n=t.s+gO*e,n>1&&(n=1),r&&e===Sv&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function xv(t,e,r){var n;return r?n=t.v+vO*e:n=t.v-yO*e,n>1&&(n=1),Number(n.toFixed(2))}function da(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=an(t),i=Sv;i>0;i-=1){var o=Cv(n),s=z2(an({h:Mv(o,i,!0),s:Dv(o,i,!0),v:xv(o,i,!0)}));r.push(s)}r.push(z2(n));for(var a=1;a<=Tv;a+=1){var c=Cv(n),l=z2(an({h:Mv(c,a),s:Dv(c,a),v:xv(c,a)}));r.push(l)}return e.theme==="dark"?wO.map(function(u){var d=u.index,h=u.opacity,f=z2(bO(an(e.backgroundColor||"#141414"),an(r[d]),h*100));return f}):r}var Ud={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},At={},$d={};Object.keys(Ud).forEach(function(t){At[t]=da(Ud[t]),At[t].primary=At[t][5],$d[t]=da(Ud[t],{theme:"dark",backgroundColor:"#141414"}),$d[t].primary=$d[t][5]});var bX=At.red,_X=At.volcano,CX=At.gold,MX=At.orange,DX=At.yellow,xX=At.lime,SX=At.green,TX=At.cyan,EX=At.blue,zX=At.geekblue,IX=At.purple,kX=At.magenta,PX=At.grey,OX=At.grey;var ri="[@ant-design/icons-angular]:";function _O(t){console.error(`${ri} ${t}.`)}function Iv(t){v4()&&console.warn(`${ri} ${t}.`)}function Ev(t){return da(t)[0]}function I2(t,e){switch(e){case"fill":return`${t}-fill`;case"outline":return`${t}-o`;case"twotone":return`${t}-twotone`;case void 0:return t;default:throw new Error(`${ri}Theme "${e}" is not a recognized theme!`)}}function CO(t,e,r,n){return`${I2(t,e)}-${r}-${n}`}function MO(t){return t==="o"?"outline":t}function DO(t){return t.endsWith("-fill")||t.endsWith("-o")||t.endsWith("-twotone")}function kv(t){return typeof t=="object"&&typeof t.name=="string"&&(typeof t.theme=="string"||t.theme===void 0)&&typeof t.icon=="string"}function xO(t){let e=t.split("-"),r=MO(e.splice(e.length-1,1)[0]);return{name:e.join("-"),theme:r,icon:""}}function SO(t){return t.cloneNode(!0)}function TO(t){return t.replace(/['"]#333['"]/g,'"primaryColor"').replace(/['"]#E6E6E6['"]/g,'"secondaryColor"').replace(/['"]#D9D9D9['"]/g,'"secondaryColor"').replace(/['"]#D8D8D8['"]/g,'"secondaryColor"')}function k2(t){let e=t.split(":");switch(e.length){case 1:return[t,""];case 2:return[e[1],e[0]];default:throw new Error(`${ri}The icon type ${t} is not valid!`)}}function EO(t){return k2(t)[1]!==""}function zO(){return new Error(`${ri}Type should have a namespace. Try "namespace:${name}".`)}function zv(t){return new Error(`${ri}the icon ${t} does not exist or is not registered.`)}function IO(){return _O('you need to import "HttpClientModule" to use dynamic importing.'),null}function kO(t){return new Error(`${ri}The url "${t}" is unsafe.`)}function PO(){return new Error(`${ri} tag not found.`)}function OO(){return new Error(`${ri}Importing timeout error.`)}var AO="__ant_icon_load",FO=new E("ant_icons"),qd=(()=>{let e=class e{set twoToneColor({primaryColor:n,secondaryColor:i}){this._twoToneColorPalette.primaryColor=n,this._twoToneColorPalette.secondaryColor=i||Ev(n)}get twoToneColor(){return b({},this._twoToneColorPalette)}get _disableDynamicLoading(){return!1}constructor(n,i,o,s,a){this._rendererFactory=n,this._handler=i,this._document=o,this.sanitizer=s,this._antIcons=a,this.defaultTheme="outline",this._svgDefinitions=new Map,this._svgRenderedDefinitions=new Map,this._inProgressFetches=new Map,this._assetsUrlRoot="",this._twoToneColorPalette={primaryColor:"#333333",secondaryColor:"#E6E6E6"},this._enableJsonpLoading=!1,this._jsonpIconLoad$=new S,this._renderer=this._rendererFactory.createRenderer(null,null),this._handler&&(this._http=new _c(this._handler)),this._antIcons&&this.addIcon(...this._antIcons)}useJsonpLoading(){this._enableJsonpLoading?Iv("You are already using jsonp loading."):(this._enableJsonpLoading=!0,window[AO]=n=>{this._jsonpIconLoad$.next(n)})}changeAssetsSource(n){this._assetsUrlRoot=n.endsWith("/")?n:n+"/"}addIcon(...n){n.forEach(i=>{this._svgDefinitions.set(I2(i.name,i.theme),i)})}addIconLiteral(n,i){let[o,s]=k2(n);if(!s)throw zO();this.addIcon({name:n,icon:i})}clear(){this._svgDefinitions.clear(),this._svgRenderedDefinitions.clear()}getRenderedContent(n,i){let o=kv(n)?n:this._svgDefinitions.get(n)||null;if(!o&&this._disableDynamicLoading)throw zv(n);return(o?A(o):this._loadIconDynamically(n)).pipe(Z(a=>{if(!a)throw zv(n);return this._loadSVGFromCacheOrCreateNew(a,i)}))}getCachedIcons(){return this._svgDefinitions}_loadIconDynamically(n){if(!this._http&&!this._enableJsonpLoading)return A(IO());let i=this._inProgressFetches.get(n);if(!i){let[o,s]=k2(n),a=s?{name:n,icon:""}:xO(o),c=this._enableJsonpLoading?".js":".svg",l=(s?`${this._assetsUrlRoot}assets/${s}/${o}`:`${this._assetsUrlRoot}assets/${a.theme}/${a.name}`)+c,u=this.sanitizer.sanitize(yn.URL,l);if(!u)throw kO(l);i=(this._enableJsonpLoading?this._loadIconDynamicallyWithJsonp(a,u):this._http.get(u,{responseType:"text"}).pipe(Z(h=>ke(b({},a),{icon:h})))).pipe(Fe(h=>this.addIcon(h)),un(()=>this._inProgressFetches.delete(n)),En(()=>A(null)),fr()),this._inProgressFetches.set(n,i)}return i}_loadIconDynamicallyWithJsonp(n,i){return new Y(o=>{let s=this._document.createElement("script"),a=setTimeout(()=>{c(),o.error(OO())},6e3);s.src=i;function c(){s.parentNode.removeChild(s),clearTimeout(a)}this._document.body.appendChild(s),this._jsonpIconLoad$.pipe(ge(l=>l.name===n.name&&l.theme===n.theme),ze(1)).subscribe(l=>{o.next(l),c()})})}_loadSVGFromCacheOrCreateNew(n,i){let o,s=i||this._twoToneColorPalette.primaryColor,a=Ev(s)||this._twoToneColorPalette.secondaryColor,c=n.theme==="twotone"?CO(n.name,n.theme,s,a):n.theme===void 0?n.name:I2(n.name,n.theme),l=this._svgRenderedDefinitions.get(c);return l?o=l.icon:(o=this._setSVGAttribute(this._colorizeSVGIcon(this._createSVGElementFromString(EO(n.name)?n.icon:TO(n.icon)),n.theme==="twotone",s,a)),this._svgRenderedDefinitions.set(c,ke(b({},n),{icon:o}))),SO(o)}_createSVGElementFromString(n){let i=this._document.createElement("div");i.innerHTML=n;let o=i.querySelector("svg");if(!o)throw PO;return o}_setSVGAttribute(n){return this._renderer.setAttribute(n,"width","1em"),this._renderer.setAttribute(n,"height","1em"),n}_colorizeSVGIcon(n,i,o,s){if(i){let a=n.childNodes,c=a.length;for(let l=0;l{let e=class e{constructor(n,i,o){this._iconService=n,this._elementRef=i,this._renderer=o}ngOnChanges(n){(n.type||n.theme||n.twoToneColor)&&this._changeIcon()}_changeIcon(){return new Promise(n=>{if(!this.type){this._clearSVGElement(),n(null);return}let i=this._getSelfRenderMeta();this._iconService.getRenderedContent(this._parseIconType(this.type,this.theme),this.twoToneColor).subscribe(o=>{let s=this._getSelfRenderMeta();NO(i,s)?(this._setSVGElement(o),n(o)):n(null)})})}_getSelfRenderMeta(){return{type:this.type,theme:this.theme,twoToneColor:this.twoToneColor}}_parseIconType(n,i){if(kv(n))return n;{let[o,s]=k2(n);return s?n:DO(o)?(i&&Iv(`'type' ${o} already gets a theme inside so 'theme' ${i} would be ignored`),o):I2(o,i||this._iconService.defaultTheme)}}_setSVGElement(n){this._clearSVGElement(),this._renderer.appendChild(this._elementRef.nativeElement,n)}_clearSVGElement(){let n=this._elementRef.nativeElement,i=n.childNodes,o=i.length;for(let s=o-1;s>=0;s--){let a=i[s];a.tagName?.toLowerCase()==="svg"&&this._renderer.removeChild(n,a)}}};e.\u0275fac=function(i){return new(i||e)(m(qd),m(oe),m(st))},e.\u0275dir=ne({type:e,selectors:[["","antIcon",""]],inputs:{type:"type",theme:"theme",twoToneColor:"twoToneColor"},features:[He]});let t=e;return t})();var KX={name:"alipay-circle",theme:"outline",icon:''};var ZX={name:"appstore",theme:"outline",icon:''};var Ov={name:"bars",theme:"outline",icon:''};var Wd={name:"bell",theme:"outline",icon:''};var QX={name:"arrow-down",theme:"outline",icon:''};var Av={name:"calendar",theme:"outline",icon:''},Fv={name:"caret-down",theme:"fill",icon:''};var Nv={name:"caret-up",theme:"fill",icon:''};var Rv={name:"check-circle",theme:"fill",icon:''},Lv={name:"check-circle",theme:"outline",icon:''};var Hv={name:"check",theme:"outline",icon:''};var Vv={name:"caret-down",theme:"outline",icon:''};var Yv={name:"close-circle",theme:"fill",icon:''};var jv={name:"close-circle",theme:"outline",icon:''},Bv={name:"clock-circle",theme:"outline",icon:''};var Uv={name:"close",theme:"outline",icon:''};var $v={name:"caret-up",theme:"outline",icon:''};var qv={name:"copy",theme:"outline",icon:''};var ol={name:"delete",theme:"outline",icon:''};var Wv={name:"double-left",theme:"outline",icon:''};var XX={name:"copyright",theme:"outline",icon:''},Gv={name:"double-right",theme:"outline",icon:''};var Kv={name:"down",theme:"outline",icon:''};var Zv={name:"edit",theme:"outline",icon:''},Qv={name:"ellipsis",theme:"outline",icon:''};var Xv={name:"exclamation-circle",theme:"outline",icon:''};var Jv={name:"exclamation-circle",theme:"fill",icon:''};var ey={name:"file",theme:"fill",icon:''};var ty={name:"filter",theme:"fill",icon:''};var JX={name:"fullscreen",theme:"outline",icon:''};var eJ={name:"fullscreen-exit",theme:"outline",icon:''};var tJ={name:"github",theme:"outline",icon:''};var ny={name:"info-circle",theme:"outline",icon:''};var Gd={name:"inbox",theme:"outline",icon:''};var ry={name:"info-circle",theme:"fill",icon:''};var iy={name:"file",theme:"outline",icon:''};var oy={name:"left",theme:"outline",icon:''};var nJ={name:"logout",theme:"outline",icon:''};var rJ={name:"lock",theme:"outline",icon:''};var iJ={name:"mail",theme:"outline",icon:''};var sy={name:"loading",theme:"outline",icon:''};var ay={name:"eye",theme:"outline",icon:''};var cy={name:"menu-unfold",theme:"outline",icon:''};var ly={name:"menu-fold",theme:"outline",icon:''};var uy={name:"paper-clip",theme:"outline",icon:''};var Kd={name:"plus",theme:"outline",icon:''};var dy={name:"question-circle",theme:"outline",icon:''};var hy={name:"right",theme:"outline",icon:''};var fy={name:"rotate-left",theme:"outline",icon:''};var py={name:"rotate-right",theme:"outline",icon:''};var my={name:"search",theme:"outline",icon:''};var Zd={name:"star",theme:"fill",icon:''};var gy={name:"swap-right",theme:"outline",icon:''};var oJ={name:"taobao-circle",theme:"outline",icon:''};var sJ={name:"tool",theme:"outline",icon:''};var aJ={name:"setting",theme:"outline",icon:''};var vy={name:"upload",theme:"outline",icon:''},yy={name:"up",theme:"outline",icon:''};var cJ={name:"user",theme:"outline",icon:''};var wy={name:"vertical-align-top",theme:"outline",icon:''};var lJ={name:"weibo-circle",theme:"outline",icon:''};var by={name:"zoom-in",theme:"outline",icon:''};var _y={name:"zoom-out",theme:"outline",icon:''};var Xd;try{Xd=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Xd=!1}var Ge=(()=>{let e=class e{constructor(n){this._platformId=n,this.isBrowser=this._platformId?Zu(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||Xd)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};e.\u0275fac=function(i){return new(i||e)(g(Yt))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),gJ=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var sl;function RO(){if(sl==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>sl=!0}))}finally{sl=sl||!1}return sl}function Fo(t){return RO()?t:!!t.capture}var ar=function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t}(ar||{}),P2,Ao;function O2(){if(Ao==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Ao=!1,Ao;if("scrollBehavior"in document.documentElement.style)Ao=!0;else{let t=Element.prototype.scrollTo;t?Ao=!/\{\s*\[native code\]\s*\}/.test(t.toString()):Ao=!1}}return Ao}function ha(){if(typeof document!="object"||!document)return ar.NORMAL;if(P2==null){let t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let r=document.createElement("div"),n=r.style;n.width="2px",n.height="1px",t.appendChild(r),document.body.appendChild(t),P2=ar.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,P2=t.scrollLeft===0?ar.NEGATED:ar.INVERTED),t.remove()}return P2}var Qd;function LO(){if(Qd==null){let t=typeof document<"u"?document.head:null;Qd=!!(t&&(t.createShadowRoot||t.attachShadow))}return Qd}function al(t){if(LO()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Cy(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}function cn(t){return t.composedPath?t.composedPath()[0]:t.target}function Jd(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var HO=[Ov,Av,Nv,$v,Fv,Vv,Rv,Lv,Hv,Bv,jv,Yv,Uv,qv,ol,Wv,Gv,Kv,Zv,Qv,Jv,Xv,ay,ey,iy,ty,ry,ny,oy,sy,uy,dy,hy,py,fy,Zd,my,Zd,vy,wy,yy,gy,by,_y],Dy=new E("nz_icons"),OJ=new E("nz_icon_default_twotone_color"),My="#1890ff",fa=(()=>{let e=class e extends qd{get _disableDynamicLoading(){return!this.platform.isBrowser}ngOnDestroy(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null)}normalizeSvgElement(n){n.getAttribute("viewBox")||this._renderer.setAttribute(n,"viewBox","0 0 1024 1024"),(!n.getAttribute("width")||!n.getAttribute("height"))&&(this._renderer.setAttribute(n,"width","1em"),this._renderer.setAttribute(n,"height","1em")),n.getAttribute("fill")||this._renderer.setAttribute(n,"fill","currentColor")}fetchFromIconfont(n){let{scriptUrl:i}=n;if(this._document&&!this.iconfontCache.has(i)){let o=this._renderer.createElement("script");this._renderer.setAttribute(o,"src",i),this._renderer.setAttribute(o,"data-namespace",i.replace(/^(https?|http):/g,"")),this._renderer.appendChild(this._document.body,o),this.iconfontCache.add(i)}}createIconfontIcon(n){return this._createSVGElementFromString(``)}constructor(n,i,o,s,a,c,l){super(n,a,c,i,[...HO,...l||[]]),this.nzConfigService=o,this.platform=s,this.configUpdated$=new S,this.iconfontCache=new Set,this.subscription=null,this.onConfigChange(),this.configDefaultTwotoneColor(),this.configDefaultTheme()}onConfigChange(){this.subscription=this.nzConfigService.getConfigChangeEventForComponent("icon").subscribe(()=>{this.configDefaultTwotoneColor(),this.configDefaultTheme(),this.configUpdated$.next()})}configDefaultTheme(){let n=this.getConfig();this.defaultTheme=n.nzTheme||"outline"}configDefaultTwotoneColor(){let i=this.getConfig().nzTwotoneColor||My,o=My;i&&(i.startsWith("#")?o=i:Cn("Twotone color must be a hex color!")),this.twoToneColor={primaryColor:o}}getConfig(){return this.nzConfigService.getConfigForComponent("icon")||{}}};e.\u0275fac=function(i){return new(i||e)(g(Jn),g(Mo),g(Rn),g(Ge),g(Oi,8),g(V,8),g(Dy,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),xy=new E("nz_icons_patch"),Sy=(()=>{let e=class e{constructor(n,i){this.extraIcons=n,this.rootIconService=i,this.patched=!1}doPatch(){this.patched||(this.extraIcons.forEach(n=>this.rootIconService.addIcon(n)),this.patched=!0)}};e.\u0275fac=function(i){return new(i||e)(g(xy,2),g(fa))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ii=(()=>{let e=class e extends Pv{set nzSpin(n){this.spin=n}set nzType(n){this.type=n}set nzTheme(n){this.theme=n}set nzTwotoneColor(n){this.twoToneColor=n}set nzIconfont(n){this.iconfont=n}constructor(n,i,o,s,a,c){super(s,o,a),this.ngZone=n,this.changeDetectorRef=i,this.iconService=s,this.renderer=a,this.cacheClassName=null,this.nzRotate=0,this.spin=!1,this.destroy$=new S,c&&c.doPatch(),this.el=o.nativeElement}ngOnChanges(n){let{nzType:i,nzTwotoneColor:o,nzSpin:s,nzTheme:a,nzRotate:c}=n;i||o||s||a?this.changeIcon2():c?this.handleRotate(this.el.firstChild):this._setSVGElement(this.iconService.createIconfontIcon(`#${this.iconfont}`))}ngOnInit(){this.renderer.setAttribute(this.el,"class",`anticon ${this.el.className}`.trim())}ngAfterContentChecked(){if(!this.type){let n=this.el.children,i=n.length;if(!this.type&&n.length)for(;i--;){let o=n[i];o.tagName.toLowerCase()==="svg"&&this.iconService.normalizeSvgElement(o)}}}ngOnDestroy(){this.destroy$.next()}changeIcon2(){this.setClassName(),this.ngZone.runOutsideAngular(()=>{Le(this._changeIcon()).pipe(ce(this.destroy$)).subscribe({next:n=>{this.ngZone.run(()=>{this.changeDetectorRef.detectChanges(),n&&(this.setSVGData(n),this.handleSpin(n),this.handleRotate(n))})},error:Cn})})}handleSpin(n){this.spin||this.type==="loading"?this.renderer.addClass(n,"anticon-spin"):this.renderer.removeClass(n,"anticon-spin")}handleRotate(n){this.nzRotate?this.renderer.setAttribute(n,"style",`transform: rotate(${this.nzRotate}deg)`):this.renderer.removeAttribute(n,"style")}setClassName(){this.cacheClassName&&this.renderer.removeClass(this.el,this.cacheClassName),this.cacheClassName=`anticon-${this.type}`,this.renderer.addClass(this.el,this.cacheClassName)}setSVGData(n){this.renderer.setAttribute(n,"data-icon",this.type),this.renderer.setAttribute(n,"aria-hidden","true")}};e.\u0275fac=function(i){return new(i||e)(m(U),m(ft),m(oe),m(fa),m(st),m(Sy,8))},e.\u0275dir=ne({type:e,selectors:[["","nz-icon",""]],hostVars:2,hostBindings:function(i,o){i&2&&St("anticon",!0)},inputs:{nzSpin:"nzSpin",nzRotate:"nzRotate",nzType:"nzType",nzTheme:"nzTheme",nzTwotoneColor:"nzTwotoneColor",nzIconfont:"nzIconfont"},exportAs:["nzIcon"],standalone:!0,features:[nn,He]});let t=e;return je([Je()],t.prototype,"nzSpin",null),t})(),No=(()=>{let e=class e{static forRoot(n){return{ngModule:e,providers:[{provide:Dy,useValue:n}]}}static forChild(n){return{ngModule:e,providers:[Sy,{provide:xy,useValue:n}]}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var eh=(()=>{let e=class e{setHiddenAttribute(){this.hidden?typeof this.hidden=="string"?this.renderer.setAttribute(this.elementRef.nativeElement,"hidden",this.hidden):this.renderer.setAttribute(this.elementRef.nativeElement,"hidden",""):this.renderer.removeAttribute(this.elementRef.nativeElement,"hidden")}constructor(n,i){this.elementRef=n,this.renderer=i,this.hidden=null,this.renderer.setAttribute(this.elementRef.nativeElement,"hidden","")}ngOnChanges(){this.setHiddenAttribute()}ngAfterViewInit(){this.setHiddenAttribute()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(st))},e.\u0275dir=ne({type:e,selectors:[["","nz-button",""],["nz-button-group"],["","nz-icon",""],["","nz-menu-item",""],["","nz-submenu",""],["nz-select-top-control"],["nz-select-placeholder"],["nz-input-group"]],inputs:{hidden:"hidden"},standalone:!0,features:[He]});let t=e;return t})(),Ty=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var th=class{get waveAttributeName(){return this.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"}constructor(e,r,n,i,o){this.triggerElement=e,this.ngZone=r,this.insertExtraNode=n,this.platformId=i,this.cspNonce=o,this.waveTransitionDuration=400,this.styleForPseudo=null,this.extraNode=null,this.lastTime=0,this.onClick=s=>{!this.triggerElement||!this.triggerElement.getAttribute||this.triggerElement.getAttribute("disabled")||s.target.tagName==="INPUT"||this.triggerElement.className.indexOf("disabled")>=0||this.fadeOutWave()},this.platform=new Ge(this.platformId),this.clickHandler=this.onClick.bind(this),this.bindTriggerEvent()}bindTriggerEvent(){this.platform.isBrowser&&this.ngZone.runOutsideAngular(()=>{this.removeTriggerEvent(),this.triggerElement&&this.triggerElement.addEventListener("click",this.clickHandler,!0)})}removeTriggerEvent(){this.triggerElement&&this.triggerElement.removeEventListener("click",this.clickHandler,!0)}removeStyleAndExtraNode(){this.styleForPseudo&&document.body.contains(this.styleForPseudo)&&(document.body.removeChild(this.styleForPseudo),this.styleForPseudo=null),this.insertExtraNode&&this.triggerElement.contains(this.extraNode)&&this.triggerElement.removeChild(this.extraNode)}destroy(){this.removeTriggerEvent(),this.removeStyleAndExtraNode()}fadeOutWave(){let e=this.triggerElement,r=this.getWaveColor(e);e.setAttribute(this.waveAttributeName,"true"),!(Date.now(){let e=class e{constructor(n,i){this.configUpdated$=new S,this.config=n||{},this.cspNonce=i,this.config.theme&&j9(this.getConfig().prefixCls?.prefixCls||U9,this.config.theme,i)}getConfig(){return this.config}getConfigForComponent(n){return this.config[n]}getConfigChangeEventForComponent(n){return this.configUpdated$.pipe(ge(i=>i===n),eo(void 0))}set(n,i){this.config[n]=b(b({},this.config[n]),i),n==="theme"&&this.config.theme&&j9(this.getConfig().prefixCls?.prefixCls||U9,this.config.theme,this.cspNonce),this.configUpdated$.next(n)}};e.\u0275fac=function(i){return new(i||e)(g($9,8),g(qr,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Ln(){return function(e,r,n){let i=`$$__zorroConfigDecorator__${r}`;return Object.defineProperty(e,i,{configurable:!0,writable:!0,enumerable:!1}),{get(){let o=n?.get?n.get.bind(this)():this[i],s=(this.propertyAssignCounter?.[r]||0)>1,a=this.nzConfigService.getConfigForComponent(this._nzModuleName)?.[r];return s&&B9(o)?o:B9(a)?a:o},set(o){this.propertyAssignCounter=this.propertyAssignCounter||{},this.propertyAssignCounter[r]=(this.propertyAssignCounter[r]||0)+1,n?.set?n.set.bind(this)(o):this[i]=o},configurable:!0,enumerable:!0}}}var he=function(t){return t[t.State=0]="State",t[t.Transition=1]="Transition",t[t.Sequence=2]="Sequence",t[t.Group=3]="Group",t[t.Animate=4]="Animate",t[t.Keyframes=5]="Keyframes",t[t.Style=6]="Style",t[t.Trigger=7]="Trigger",t[t.Reference=8]="Reference",t[t.AnimateChild=9]="AnimateChild",t[t.AnimateRef=10]="AnimateRef",t[t.Query=11]="Query",t[t.Stagger=12]="Stagger",t}(he||{}),Pr="*";function q9(t,e){return{type:he.Trigger,name:t,definitions:e,options:{}}}function fd(t,e=null){return{type:he.Animate,styles:e,timings:t}}function W9(t,e=null){return{type:he.Sequence,steps:t,options:e}}function Yi(t){return{type:he.Style,styles:t,offset:null}}function pd(t,e,r){return{type:he.State,name:t,styles:e,options:r}}function md(t,e,r=null){return{type:he.Transition,expr:t,animation:e,options:r}}function eX(t,e,r=null){return{type:he.Query,selector:t,animation:e,options:r}}function tX(t,e){return{type:he.Stagger,timings:t,animation:e}}var Vi=class{constructor(e=0,r=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+r}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let r=e=="start"?this._onStartFns:this._onDoneFns;r.forEach(n=>n()),r.length=0}},Xc=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let r=0,n=0,i=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++r==o&&this._onFinish()}),s.onDestroy(()=>{++n==o&&this._onDestroy()}),s.onStart(()=>{++i==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let r=e*this.totalTime;this.players.forEach(n=>{let i=n.totalTime?Math.min(1,r/n.totalTime):1;n.setPosition(i)})}getPosition(){let e=this.players.reduce((r,n)=>r===null||n.totalTime>r.totalTime?n:r,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let r=e=="start"?this._onStartFns:this._onDoneFns;r.forEach(n=>n()),r.length=0}},d2="!";function G9(t){return new z(3e3,!1)}function Vk(){return new z(3100,!1)}function Yk(){return new z(3101,!1)}function jk(t){return new z(3001,!1)}function Bk(t){return new z(3003,!1)}function Uk(t){return new z(3004,!1)}function $k(t,e){return new z(3005,!1)}function qk(){return new z(3006,!1)}function Wk(){return new z(3007,!1)}function Gk(t,e){return new z(3008,!1)}function Kk(t){return new z(3002,!1)}function Zk(t,e,r,n,i){return new z(3010,!1)}function Qk(){return new z(3011,!1)}function Xk(){return new z(3012,!1)}function Jk(){return new z(3200,!1)}function eP(){return new z(3202,!1)}function tP(){return new z(3013,!1)}function nP(t){return new z(3014,!1)}function rP(t){return new z(3015,!1)}function iP(t){return new z(3016,!1)}function oP(t,e){return new z(3404,!1)}function sP(t){return new z(3502,!1)}function aP(t){return new z(3503,!1)}function cP(){return new z(3300,!1)}function lP(t){return new z(3504,!1)}function uP(t){return new z(3301,!1)}function dP(t,e){return new z(3302,!1)}function hP(t){return new z(3303,!1)}function fP(t,e){return new z(3400,!1)}function pP(t){return new z(3401,!1)}function mP(t){return new z(3402,!1)}function gP(t,e){return new z(3505,!1)}function ji(t){switch(t.length){case 0:return new Vi;case 1:return t[0];default:return new Xc(t)}}function cv(t,e,r=new Map,n=new Map){let i=[],o=[],s=-1,a=null;if(e.forEach(c=>{let l=c.get("offset"),u=l==s,d=u&&a||new Map;c.forEach((h,f)=>{let p=f,y=h;if(f!=="offset")switch(p=t.normalizePropertyName(p,i),y){case d2:y=r.get(f);break;case Pr:y=n.get(f);break;default:y=t.normalizeStyleValue(f,p,y,i);break}d.set(p,y)}),u||o.push(d),a=d,s=l}),i.length)throw sP(i);return o}function Rd(t,e,r,n){switch(e){case"start":t.onStart(()=>n(r&&gd(r,"start",t)));break;case"done":t.onDone(()=>n(r&&gd(r,"done",t)));break;case"destroy":t.onDestroy(()=>n(r&&gd(r,"destroy",t)));break}}function gd(t,e,r){let n=r.totalTime,i=!!r.disabled,o=Ld(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,n??t.totalTime,i),s=t._data;return s!=null&&(o._data=s),o}function Ld(t,e,r,n,i="",o=0,s){return{element:t,triggerName:e,fromState:r,toState:n,phaseName:i,totalTime:o,disabled:!!s}}function xn(t,e,r){let n=t.get(e);return n||t.set(e,n=r),n}function K9(t){let e=t.indexOf(":"),r=t.substring(1,e),n=t.slice(e+1);return[r,n]}var vP=typeof document>"u"?null:document.documentElement;function Hd(t){let e=t.parentNode||t.host||null;return e===vP?null:e}function yP(t){return t.substring(1,6)=="ebkit"}var Io=null,Z9=!1;function wP(t){Io||(Io=bP()||{},Z9=Io.style?"WebkitAppearance"in Io.style:!1);let e=!0;return Io.style&&!yP(t)&&(e=t in Io.style,!e&&Z9&&(e="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in Io.style)),e}function bP(){return typeof document<"u"?document.body:null}function lv(t,e){for(;e;){if(e===t)return!0;e=Hd(e)}return!1}function uv(t,e,r){if(r)return Array.from(t.querySelectorAll(e));let n=t.querySelector(e);return n?[n]:[]}var Vd=(()=>{let e=class e{validateStyleProperty(n){return wP(n)}matchesElement(n,i){return!1}containsElement(n,i){return lv(n,i)}getParentElement(n){return Hd(n)}query(n,i,o){return uv(n,i,o)}computeStyle(n,i,o){return o||""}animate(n,i,o,s,a,c=[],l){return new Vi(o,s)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ol=(()=>{let e=class e{};e.NOOP=new Vd;let t=e;return t})(),Oo=class{};var _P=1e3,dv="{{",CP="}}",hv="ng-enter",Cd="ng-leave",h2="ng-trigger",v2=".ng-trigger",Q9="ng-animating",Md=".ng-animating";function ni(t){if(typeof t=="number")return t;let e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Dd(parseFloat(e[1]),e[2])}function Dd(t,e){switch(e){case"s":return t*_P;default:return t}}function y2(t,e,r){return t.hasOwnProperty("duration")?t:MP(t,e,r)}function MP(t,e,r){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,o=0,s="";if(typeof t=="string"){let a=t.match(n);if(a===null)return e.push(G9(t)),{duration:0,delay:0,easing:""};i=Dd(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=Dd(parseFloat(c),a[4]));let l=a[5];l&&(s=l)}else i=t;if(!r){let a=!1,c=e.length;i<0&&(e.push(Vk()),a=!0),o<0&&(e.push(Yk()),a=!0),a&&e.splice(c,0,G9(t))}return{duration:i,delay:o,easing:s}}function DP(t){return t.length?t[0]instanceof Map?t:t.map(e=>new Map(Object.entries(e))):[]}function Or(t,e,r){e.forEach((n,i)=>{let o=Yd(i);r&&!r.has(i)&&r.set(i,t.style[o]),t.style[o]=n})}function Po(t,e){e.forEach((r,n)=>{let i=Yd(n);t.style[i]=""})}function Jc(t){return Array.isArray(t)?t.length==1?t[0]:W9(t):t}function xP(t,e,r){let n=e.params||{},i=fv(t);i.length&&i.forEach(o=>{n.hasOwnProperty(o)||r.push(jk(o))})}var xd=new RegExp(`${dv}\\s*(.+?)\\s*${CP}`,"g");function fv(t){let e=[];if(typeof t=="string"){let r;for(;r=xd.exec(t);)e.push(r[1]);xd.lastIndex=0}return e}function tl(t,e,r){let n=`${t}`,i=n.replace(xd,(o,s)=>{let a=e[s];return a==null&&(r.push(Bk(s)),a=""),a.toString()});return i==n?t:i}var SP=/-+([a-z0-9])/g;function Yd(t){return t.replace(SP,(...e)=>e[1].toUpperCase())}function TP(t,e){return t===0||e===0}function EP(t,e,r){if(r.size&&e.length){let n=e[0],i=[];if(r.forEach((o,s)=>{n.has(s)||i.push(s),n.set(s,o)}),i.length)for(let o=1;os.set(a,jd(t,a)))}}return e}function Dn(t,e,r){switch(e.type){case he.Trigger:return t.visitTrigger(e,r);case he.State:return t.visitState(e,r);case he.Transition:return t.visitTransition(e,r);case he.Sequence:return t.visitSequence(e,r);case he.Group:return t.visitGroup(e,r);case he.Animate:return t.visitAnimate(e,r);case he.Keyframes:return t.visitKeyframes(e,r);case he.Style:return t.visitStyle(e,r);case he.Reference:return t.visitReference(e,r);case he.AnimateChild:return t.visitAnimateChild(e,r);case he.AnimateRef:return t.visitAnimateRef(e,r);case he.Query:return t.visitQuery(e,r);case he.Stagger:return t.visitStagger(e,r);default:throw Uk(e.type)}}function jd(t,e){return window.getComputedStyle(t)[e]}var zP=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),w2=class extends Oo{normalizePropertyName(e,r){return Yd(e)}normalizeStyleValue(e,r,n,i){let o="",s=n.toString().trim();if(zP.has(r)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push($k(e,n))}return s+o}};var b2="*";function IP(t,e){let r=[];return typeof t=="string"?t.split(/\s*,\s*/).forEach(n=>kP(n,r,e)):r.push(t),r}function kP(t,e,r){if(t[0]==":"){let c=PP(t,r);if(typeof c=="function"){e.push(c);return}t=c}let n=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return r.push(rP(t)),e;let i=n[1],o=n[2],s=n[3];e.push(X9(i,s));let a=i==b2&&s==b2;o[0]=="<"&&!a&&e.push(X9(s,i))}function PP(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(r,n)=>parseFloat(n)>parseFloat(r);case":decrement":return(r,n)=>parseFloat(n) *"}}var f2=new Set(["true","1"]),p2=new Set(["false","0"]);function X9(t,e){let r=f2.has(t)||p2.has(t),n=f2.has(e)||p2.has(e);return(i,o)=>{let s=t==b2||t==i,a=e==b2||e==o;return!s&&r&&typeof i=="boolean"&&(s=i?f2.has(t):p2.has(t)),!a&&n&&typeof o=="boolean"&&(a=o?f2.has(e):p2.has(e)),s&&a}}var pv=":self",OP=new RegExp(`s*${pv}s*,?`,"g");function mv(t,e,r,n){return new Sd(t).build(e,r,n)}var J9="",Sd=class{constructor(e){this._driver=e}build(e,r,n){let i=new Td(r);return this._resetContextStyleTimingState(i),Dn(this,Jc(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=J9,e.collectedStyles=new Map,e.collectedStyles.set(J9,new Map),e.currentTime=0}visitTrigger(e,r){let n=r.queryCount=0,i=r.depCount=0,o=[],s=[];return e.name.charAt(0)=="@"&&r.errors.push(qk()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(r),a.type==he.State){let c=a,l=c.name;l.toString().split(/\s*,\s*/).forEach(u=>{c.name=u,o.push(this.visitState(c,r))}),c.name=l}else if(a.type==he.Transition){let c=this.visitTransition(a,r);n+=c.queryCount,i+=c.depCount,s.push(c)}else r.errors.push(Wk())}),{type:he.Trigger,name:e.name,states:o,transitions:s,queryCount:n,depCount:i,options:null}}visitState(e,r){let n=this.visitStyle(e.styles,r),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){let o=new Set,s=i||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{fv(c).forEach(l=>{s.hasOwnProperty(l)||o.add(l)})})}),o.size&&r.errors.push(Gk(e.name,[...o.values()]))}return{type:he.State,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,r){r.queryCount=0,r.depCount=0;let n=Dn(this,Jc(e.animation),r),i=IP(e.expr,r.errors);return{type:he.Transition,matchers:i,animation:n,queryCount:r.queryCount,depCount:r.depCount,options:ko(e.options)}}visitSequence(e,r){return{type:he.Sequence,steps:e.steps.map(n=>Dn(this,n,r)),options:ko(e.options)}}visitGroup(e,r){let n=r.currentTime,i=0,o=e.steps.map(s=>{r.currentTime=n;let a=Dn(this,s,r);return i=Math.max(i,r.currentTime),a});return r.currentTime=i,{type:he.Group,steps:o,options:ko(e.options)}}visitAnimate(e,r){let n=RP(e.timings,r.errors);r.currentAnimateTimings=n;let i,o=e.styles?e.styles:Yi({});if(o.type==he.Keyframes)i=this.visitKeyframes(o,r);else{let s=e.styles,a=!1;if(!s){a=!0;let l={};n.easing&&(l.easing=n.easing),s=Yi(l)}r.currentTime+=n.duration+n.delay;let c=this.visitStyle(s,r);c.isEmptyStep=a,i=c}return r.currentAnimateTimings=null,{type:he.Animate,timings:n,style:i,options:null}}visitStyle(e,r){let n=this._makeStyleAst(e,r);return this._validateStyleAst(n,r),n}_makeStyleAst(e,r){let n=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===Pr?n.push(a):r.errors.push(Kk(a)):n.push(new Map(Object.entries(a)));let o=!1,s=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let c of a.values())if(c.toString().indexOf(dv)>=0){o=!0;break}}}),{type:he.Style,styles:n,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,r){let n=r.currentAnimateTimings,i=r.currentTime,o=r.currentTime;n&&o>0&&(o-=n.duration+n.delay),e.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,c)=>{let l=r.collectedStyles.get(r.currentQuerySelector),u=l.get(c),d=!0;u&&(o!=i&&o>=u.startTime&&i<=u.endTime&&(r.errors.push(Zk(c,u.startTime,u.endTime,o,i)),d=!1),o=u.startTime),d&&l.set(c,{startTime:o,endTime:i}),r.options&&xP(a,r.options,r.errors)})})}visitKeyframes(e,r){let n={type:he.Keyframes,styles:[],options:null};if(!r.currentAnimateTimings)return r.errors.push(Qk()),n;let i=1,o=0,s=[],a=!1,c=!1,l=0,u=e.steps.map(M=>{let P=this._makeStyleAst(M,r),X=P.offset!=null?P.offset:NP(P.styles),$=0;return X!=null&&(o++,$=P.offset=X),c=c||$<0||$>1,a=a||$0&&o{let X=h>0?P==f?1:h*P:s[P],$=X*v;r.currentTime=p+y.delay+$,y.duration=$,this._validateStyleAst(M,r),M.offset=X,n.styles.push(M)}),n}visitReference(e,r){return{type:he.Reference,animation:Dn(this,Jc(e.animation),r),options:ko(e.options)}}visitAnimateChild(e,r){return r.depCount++,{type:he.AnimateChild,options:ko(e.options)}}visitAnimateRef(e,r){return{type:he.AnimateRef,animation:this.visitReference(e.animation,r),options:ko(e.options)}}visitQuery(e,r){let n=r.currentQuerySelector,i=e.options||{};r.queryCount++,r.currentQuery=e;let[o,s]=AP(e.selector);r.currentQuerySelector=n.length?n+" "+o:o,xn(r.collectedStyles,r.currentQuerySelector,new Map);let a=Dn(this,Jc(e.animation),r);return r.currentQuery=null,r.currentQuerySelector=n,{type:he.Query,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:ko(e.options)}}visitStagger(e,r){r.currentQuery||r.errors.push(tP());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:y2(e.timings,r.errors,!0);return{type:he.Stagger,animation:Dn(this,Jc(e.animation),r),timings:n,options:null}}};function AP(t){let e=!!t.split(/\s*,\s*/).find(r=>r==pv);return e&&(t=t.replace(OP,"")),t=t.replace(/@\*/g,v2).replace(/@\w+/g,r=>v2+"-"+r.slice(1)).replace(/:animating/g,Md),[t,e]}function FP(t){return t?b({},t):null}var Td=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function NP(t){if(typeof t=="string")return null;let e=null;if(Array.isArray(t))t.forEach(r=>{if(r instanceof Map&&r.has("offset")){let n=r;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(t instanceof Map&&t.has("offset")){let r=t;e=parseFloat(r.get("offset")),r.delete("offset")}return e}function RP(t,e){if(t.hasOwnProperty("duration"))return t;if(typeof t=="number"){let o=y2(t,e).duration;return vd(o,0,"")}let r=t;if(r.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=vd(0,0,"");return o.dynamic=!0,o.strValue=r,o}let i=y2(r,e);return vd(i.duration,i.delay,i.easing)}function ko(t){return t?(t=b({},t),t.params&&(t.params=FP(t.params))):t={},t}function vd(t,e,r){return{duration:t,delay:e,easing:r}}function Bd(t,e,r,n,i,o,s=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:r,postStyleProps:n,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var nl=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,r){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...r)}has(e){return this._map.has(e)}clear(){this._map.clear()}},LP=1,HP=":enter",VP=new RegExp(HP,"g"),YP=":leave",jP=new RegExp(YP,"g");function gv(t,e,r,n,i,o=new Map,s=new Map,a,c,l=[]){return new Ed().buildKeyframes(t,e,r,n,i,o,s,a,c,l)}var Ed=class{buildKeyframes(e,r,n,i,o,s,a,c,l,u=[]){l=l||new nl;let d=new zd(e,r,l,i,o,u,[]);d.options=c;let h=c.delay?ni(c.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,c),Dn(this,n,d);let f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let y=f.length-1;y>=0;y--){let v=f[y];if(v.element===r){p=v;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,c)}return f.length?f.map(p=>p.buildKeyframes()):[Bd(r,[],[],[],0,h,"",!1)]}visitTrigger(e,r){}visitState(e,r){}visitTransition(e,r){}visitAnimateChild(e,r){let n=r.subInstructions.get(r.element);if(n){let i=r.createSubContext(e.options),o=r.currentTimeline.currentTime,s=this._visitSubInstructions(n,i,i.options);o!=s&&r.transformIntoNewTimeline(s)}r.previousNode=e}visitAnimateRef(e,r){let n=r.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],r,n),this.visitReference(e.animation,n),r.transformIntoNewTimeline(n.currentTimeline.currentTime),r.previousNode=e}_applyAnimationRefDelays(e,r,n){for(let i of e){let o=i?.delay;if(o){let s=typeof o=="number"?o:ni(tl(o,i?.params??{},r.errors));n.delayNextStep(s)}}}_visitSubInstructions(e,r,n){let o=r.currentTimeline.currentTime,s=n.duration!=null?ni(n.duration):null,a=n.delay!=null?ni(n.delay):null;return s!==0&&e.forEach(c=>{let l=r.appendInstructionToTimeline(c,s,a);o=Math.max(o,l.duration+l.delay)}),o}visitReference(e,r){r.updateOptions(e.options,!0),Dn(this,e.animation,r),r.previousNode=e}visitSequence(e,r){let n=r.subContextCount,i=r,o=e.options;if(o&&(o.params||o.delay)&&(i=r.createSubContext(o),i.transformIntoNewTimeline(),o.delay!=null)){i.previousNode.type==he.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=_2);let s=ni(o.delay);i.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>Dn(this,s,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),r.previousNode=e}visitGroup(e,r){let n=[],i=r.currentTimeline.currentTime,o=e.options&&e.options.delay?ni(e.options.delay):0;e.steps.forEach(s=>{let a=r.createSubContext(e.options);o&&a.delayNextStep(o),Dn(this,s,a),i=Math.max(i,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(s=>r.currentTimeline.mergeTimelineCollectedStyles(s)),r.transformIntoNewTimeline(i),r.previousNode=e}_visitTiming(e,r){if(e.dynamic){let n=e.strValue,i=r.params?tl(n,r.params,r.errors):n;return y2(i,r.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,r){let n=r.currentAnimateTimings=this._visitTiming(e.timings,r),i=r.currentTimeline;n.delay&&(r.incrementTime(n.delay),i.snapshotCurrentStyles());let o=e.style;o.type==he.Keyframes?this.visitKeyframes(o,r):(r.incrementTime(n.duration),this.visitStyle(o,r),i.applyStylesToKeyframe()),r.currentAnimateTimings=null,r.previousNode=e}visitStyle(e,r){let n=r.currentTimeline,i=r.currentAnimateTimings;!i&&n.hasCurrentStyleProperties()&&n.forwardFrame();let o=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(o):n.setStyles(e.styles,o,r.errors,r.options),r.previousNode=e}visitKeyframes(e,r){let n=r.currentAnimateTimings,i=r.currentTimeline.duration,o=n.duration,a=r.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(c=>{let l=c.offset||0;a.forwardTime(l*o),a.setStyles(c.styles,c.easing,r.errors,r.options),a.applyStylesToKeyframe()}),r.currentTimeline.mergeTimelineCollectedStyles(a),r.transformIntoNewTimeline(i+o),r.previousNode=e}visitQuery(e,r){let n=r.currentTimeline.currentTime,i=e.options||{},o=i.delay?ni(i.delay):0;o&&(r.previousNode.type===he.Style||n==0&&r.currentTimeline.hasCurrentStyleProperties())&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=_2);let s=n,a=r.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,r.errors);r.currentQueryTotal=a.length;let c=null;a.forEach((l,u)=>{r.currentQueryIndex=u;let d=r.createSubContext(e.options,l);o&&d.delayNextStep(o),l===r.element&&(c=d.currentTimeline),Dn(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe();let h=d.currentTimeline.currentTime;s=Math.max(s,h)}),r.currentQueryIndex=0,r.currentQueryTotal=0,r.transformIntoNewTimeline(s),c&&(r.currentTimeline.mergeTimelineCollectedStyles(c),r.currentTimeline.snapshotCurrentStyles()),r.previousNode=e}visitStagger(e,r){let n=r.parentContext,i=r.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(r.currentQueryTotal-1),c=s*r.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=n.currentStaggerTime;break}let u=r.currentTimeline;c&&u.delayNextStep(c);let d=u.currentTime;Dn(this,e.animation,r),r.previousNode=e,n.currentStaggerTime=i.currentTime-d+(i.startTime-n.currentTimeline.startTime)}},_2={},zd=class t{constructor(e,r,n,i,o,s,a,c){this._driver=e,this.element=r,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=_2,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new C2(this._driver,r,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,r){if(!e)return;let n=e,i=this.options;n.duration!=null&&(i.duration=ni(n.duration)),n.delay!=null&&(i.delay=ni(n.delay));let o=n.params;if(o){let s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!r||!s.hasOwnProperty(a))&&(s[a]=tl(o[a],s,this.errors))})}}_copyOptions(){let e={};if(this.options){let r=this.options.params;if(r){let n=e.params={};Object.keys(r).forEach(i=>{n[i]=r[i]})}}return e}createSubContext(e=null,r,n){let i=r||this.element,o=new t(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=_2,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,r,n){let i={duration:r??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},o=new Id(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(o),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,r,n,i,o,s){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(VP,"."+this._enterClassName),e=e.replace(jP,"."+this._leaveClassName);let c=n!=1,l=this._driver.query(this.element,e,c);n!==0&&(l=n<0?l.slice(l.length+n,l.length):l.slice(0,n)),a.push(...l)}return!o&&a.length==0&&s.push(nP(r)),a}},C2=class t{constructor(e,r,n,i){this._driver=e,this.element=r,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(r),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(r,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let r=this._keyframes.size===1&&this._pendingStyles.size;this.duration||r?(this.forwardTime(this.currentTime+e),r&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,r){return this.applyStylesToKeyframe(),new t(this._driver,e,r||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=LP,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,r){this._localTimelineStyles.set(e,r),this._globalTimelineStyles.set(e,r),this._styleSummary.set(e,{time:this.currentTime,value:r})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[r,n]of this._globalTimelineStyles)this._backFill.set(r,n||Pr),this._currentKeyframe.set(r,Pr);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,r,n,i){r&&this._previousKeyframe.set("easing",r);let o=i&&i.params||{},s=BP(e,this._globalTimelineStyles);for(let[a,c]of s){let l=tl(c,o,n);this._pendingStyles.set(a,l),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Pr),this._updateStyle(a,l)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,r)=>{this._currentKeyframe.set(r,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,r)=>{this._currentKeyframe.has(r)||this._currentKeyframe.set(r,e)}))}snapshotCurrentStyles(){for(let[e,r]of this._localTimelineStyles)this._pendingStyles.set(e,r),this._updateStyle(e,r)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let r in this._currentKeyframe)e.push(r);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((r,n)=>{let i=this._styleSummary.get(n);(!i||r.time>i.time)&&this._updateStyle(n,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,r=new Set,n=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,c)=>{let l=new Map([...this._backFill,...a]);l.forEach((u,d)=>{u===d2?e.add(d):u===Pr&&r.add(d)}),n||l.set("offset",c/this.duration),i.push(l)});let o=[...e.values()],s=[...r.values()];if(n){let a=i[0],c=new Map(a);a.set("offset",0),c.set("offset",1),i=[a,c]}return Bd(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)}},Id=class extends C2{constructor(e,r,n,i,o,s,a=!1){super(e,r,s.delay),this.keyframes=n,this.preStyleProps=i,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:r,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&r){let o=[],s=n+r,a=r/s,c=new Map(e[0]);c.set("offset",0),o.push(c);let l=new Map(e[0]);l.set("offset",ev(a)),o.push(l);let u=e.length-1;for(let d=1;d<=u;d++){let h=new Map(e[d]),f=h.get("offset"),p=r+f*n;h.set("offset",ev(p/s)),o.push(h)}n=s,r=0,i="",e=o}return Bd(this.element,e,this.preStyleProps,this.postStyleProps,n,r,i,!0)}};function ev(t,e=3){let r=Math.pow(10,e-1);return Math.round(t*r)/r}function BP(t,e){let r=new Map,n;return t.forEach(i=>{if(i==="*"){n??=e.keys();for(let o of n)r.set(o,Pr)}else for(let[o,s]of i)r.set(o,s)}),r}function tv(t,e,r,n,i,o,s,a,c,l,u,d,h){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:r,fromStyles:o,toState:n,toStyles:s,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:u,totalTime:d,errors:h}}var yd={},M2=class{constructor(e,r,n){this._triggerName=e,this.ast=r,this._stateStyles=n}match(e,r,n,i){return UP(this.ast.matchers,e,r,n,i)}buildStyles(e,r,n){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(r,n):new Map}build(e,r,n,i,o,s,a,c,l,u){let d=[],h=this.ast.options&&this.ast.options.params||yd,f=a&&a.params||yd,p=this.buildStyles(n,f,d),y=c&&c.params||yd,v=this.buildStyles(i,y,d),M=new Set,P=new Map,X=new Map,$=i==="void",Ae={params:vv(y,h),delay:this.ast.options?.delay},_e=u?[]:gv(e,r,this.ast.animation,o,s,p,v,Ae,l,d),Ee=0;return _e.forEach($e=>{Ee=Math.max($e.duration+$e.delay,Ee)}),d.length?tv(r,this._triggerName,n,i,$,p,v,[],[],P,X,Ee,d):(_e.forEach($e=>{let Mt=$e.element,Bt=xn(P,Mt,new Set);$e.preStyleProps.forEach(ln=>Bt.add(ln));let di=xn(X,Mt,new Set);$e.postStyleProps.forEach(ln=>di.add(ln)),Mt!==r&&M.add(Mt)}),tv(r,this._triggerName,n,i,$,p,v,_e,[...M.values()],P,X,Ee))}};function UP(t,e,r,n,i){return t.some(o=>o(e,r,n,i))}function vv(t,e){let r=b({},e);return Object.entries(t).forEach(([n,i])=>{i!=null&&(r[n]=i)}),r}var kd=class{constructor(e,r,n){this.styles=e,this.defaultParams=r,this.normalizer=n}buildStyles(e,r){let n=new Map,i=vv(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=tl(s,i,r));let c=this.normalizer.normalizePropertyName(a,r);s=this.normalizer.normalizeStyleValue(a,c,s,r),n.set(a,s)})}),n}};function $P(t,e,r){return new Pd(t,e,r)}var Pd=class{constructor(e,r,n){this.name=e,this.ast=r,this._normalizer=n,this.transitionFactories=[],this.states=new Map,r.states.forEach(i=>{let o=i.options&&i.options.params||{};this.states.set(i.name,new kd(i.style,o,n))}),nv(this.states,"true","1"),nv(this.states,"false","0"),r.transitions.forEach(i=>{this.transitionFactories.push(new M2(e,i,this.states))}),this.fallbackTransition=qP(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,r,n,i){return this.transitionFactories.find(s=>s.match(e,r,n,i))||null}matchStyles(e,r,n){return this.fallbackTransition.buildStyles(e,r,n)}};function qP(t,e,r){let n=[(s,a)=>!0],i={type:he.Sequence,steps:[],options:null},o={type:he.Transition,animation:i,matchers:n,options:null,queryCount:0,depCount:0};return new M2(t,o,e)}function nv(t,e,r){t.has(e)?t.has(r)||t.set(r,t.get(e)):t.has(r)&&t.set(e,t.get(r))}var WP=new nl,Od=class{constructor(e,r,n){this.bodyNode=e,this._driver=r,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,r){let n=[],i=[],o=mv(this._driver,r,n,i);if(n.length)throw aP(n);i.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,r,n){let i=e.element,o=cv(this._normalizer,e.keyframes,r,n);return this._driver.animate(i,o,e.duration,e.delay,e.easing,[],!0)}create(e,r,n={}){let i=[],o=this._animations.get(e),s,a=new Map;if(o?(s=gv(this._driver,r,o,hv,Cd,new Map,new Map,n,WP,i),s.forEach(u=>{let d=xn(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(i.push(cP()),s=[]),i.length)throw lP(i);a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,Pr))})});let c=s.map(u=>{let d=a.get(u.element);return this._buildPlayer(u,new Map,d)}),l=ji(c);return this._playersById.set(e,l),l.onDestroy(()=>this.destroy(e)),this.players.push(l),l}destroy(e){let r=this._getPlayer(e);r.destroy(),this._playersById.delete(e);let n=this.players.indexOf(r);n>=0&&this.players.splice(n,1)}_getPlayer(e){let r=this._playersById.get(e);if(!r)throw uP(e);return r}listen(e,r,n,i){let o=Ld(r,"","","");return Rd(this._getPlayer(e),n,o,i),()=>{}}command(e,r,n,i){if(n=="register"){this.register(e,i[0]);return}if(n=="create"){let s=i[0]||{};this.create(e,r,s);return}let o=this._getPlayer(e);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},rv="ng-animate-queued",GP=".ng-animate-queued",wd="ng-animate-disabled",KP=".ng-animate-disabled",ZP="ng-star-inserted",QP=".ng-star-inserted",XP=[],yv={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},JP={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sr="__ng_removed",rl=class{get params(){return this.options.params}constructor(e,r=""){this.namespaceId=r;let n=e&&e.hasOwnProperty("value"),i=n?e.value:e;if(this.value=tO(i),n){let o=e,{value:s}=o,a=ss(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let r=e.params;if(r){let n=this.options.params;Object.keys(r).forEach(i=>{n[i]==null&&(n[i]=r[i])})}}},el="void",bd=new rl(el),Ad=class{constructor(e,r,n){this.id=e,this.hostElement=r,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Hn(r,this._hostClassName)}listen(e,r,n,i){if(!this._triggers.has(r))throw dP(n,r);if(n==null||n.length==0)throw hP(r);if(!nO(n))throw fP(n,r);let o=xn(this._elementListeners,e,[]),s={name:r,phase:n,callback:i};o.push(s);let a=xn(this._engine.statesByElement,e,new Map);return a.has(r)||(Hn(e,h2),Hn(e,h2+"-"+r),a.set(r,bd)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(r)||a.delete(r)})}}register(e,r){return this._triggers.has(e)?!1:(this._triggers.set(e,r),!0)}_getTrigger(e){let r=this._triggers.get(e);if(!r)throw pP(e);return r}trigger(e,r,n,i=!0){let o=this._getTrigger(r),s=new il(this.id,r,e),a=this._engine.statesByElement.get(e);a||(Hn(e,h2),Hn(e,h2+"-"+r),this._engine.statesByElement.set(e,a=new Map));let c=a.get(r),l=new rl(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),a.set(r,l),c||(c=bd),!(l.value===el)&&c.value===l.value){if(!oO(c.params,l.params)){let y=[],v=o.matchStyles(c.value,c.params,y),M=o.matchStyles(l.value,l.params,y);y.length?this._engine.reportError(y):this._engine.afterFlush(()=>{Po(e,v),Or(e,M)})}return}let h=xn(this._engine.playersByElement,e,[]);h.forEach(y=>{y.namespaceId==this.id&&y.triggerName==r&&y.queued&&y.destroy()});let f=o.matchTransition(c.value,l.value,e,l.params),p=!1;if(!f){if(!i)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:r,transition:f,fromState:c,toState:l,player:s,isFallbackTransition:p}),p||(Hn(e,rv),s.onStart(()=>{la(e,rv)})),s.onDone(()=>{let y=this.players.indexOf(s);y>=0&&this.players.splice(y,1);let v=this._engine.playersByElement.get(e);if(v){let M=v.indexOf(s);M>=0&&v.splice(M,1)}}),this.players.push(s),h.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(r=>r.delete(e)),this._elementListeners.forEach((r,n)=>{this._elementListeners.set(n,r.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let r=this._engine.playersByElement.get(e);r&&(r.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,r){let n=this._engine.driver.query(e,v2,!0);n.forEach(i=>{if(i[sr])return;let o=this._engine.fetchNamespacesByElement(i);o.size?o.forEach(s=>s.triggerLeaveAnimation(i,r,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,r,n,i){let o=this._engine.statesByElement.get(e),s=new Map;if(o){let a=[];if(o.forEach((c,l)=>{if(s.set(l,c.value),this._triggers.has(l)){let u=this.trigger(e,l,el,i);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,r,s),n&&ji(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let r=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(r&&n){let i=new Set;r.forEach(o=>{let s=o.name;if(i.has(s))return;i.add(s);let c=this._triggers.get(s).fallbackTransition,l=n.get(s)||bd,u=new rl(el),d=new il(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:c,fromState:l,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(e,r){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,r),this.triggerLeaveAnimation(e,r,!0))return;let i=!1;if(n.totalAnimations){let o=n.players.length?n.playersByQueriedElement.get(e):[];if(o&&o.length)i=!0;else{let s=e;for(;s=s.parentNode;)if(n.statesByElement.get(s)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,r);else{let o=e[sr];(!o||o===yv)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,r))}}insertNode(e,r){Hn(e,this._hostClassName)}drainQueuedTransitions(e){let r=[];return this._queue.forEach(n=>{let i=n.player;if(i.destroyed)return;let o=n.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==n.triggerName){let c=Ld(o,n.triggerName,n.fromState.value,n.toState.value);c._data=e,Rd(n.player,a.phase,c,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):r.push(n)}),this._queue=[],r.sort((n,i)=>{let o=n.transition.ast.depCount,s=i.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(n.element,i.element)?1:-1})}destroy(e){this.players.forEach(r=>r.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Fd=class{_onRemovalComplete(e,r){this.onRemovalComplete(e,r)}constructor(e,r,n){this.bodyNode=e,this.driver=r,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(r=>{r.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,r){let n=new Ad(e,r,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,r)?this._balanceNamespaceList(n,r):(this.newHostElements.set(r,n),this.collectEnterElement(r)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,r){let n=this._namespaceList,i=this.namespacesByHostElement;if(n.length-1>=0){let s=!1,a=this.driver.getParentElement(r);for(;a;){let c=i.get(a);if(c){let l=n.indexOf(c);n.splice(l+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||n.unshift(e)}else n.push(e);return i.set(r,e),e}register(e,r){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,r)),n}registerTrigger(e,r,n){let i=this._namespaceLookup[e];i&&i.register(r,n)&&this.totalAnimations++}destroy(e,r){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let i=this._namespaceList.indexOf(n);i>=0&&this._namespaceList.splice(i,1),n.destroy(r),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let r=new Set,n=this.statesByElement.get(e);if(n){for(let i of n.values())if(i.namespaceId){let o=this._fetchNamespace(i.namespaceId);o&&r.add(o)}}return r}trigger(e,r,n,i){if(m2(r)){let o=this._fetchNamespace(e);if(o)return o.trigger(r,n,i),!0}return!1}insertNode(e,r,n,i){if(!m2(r))return;let o=r[sr];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(r);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){let s=this._fetchNamespace(e);s&&s.insertNode(r,n)}i&&this.collectEnterElement(r)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,r){r?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Hn(e,wd)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),la(e,wd))}removeNode(e,r,n){if(m2(r)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(r,n):this.markElementAsRemoved(e,r,!1,n);let o=this.namespacesByHostElement.get(r);o&&o.id!==e&&o.removeNode(r,n)}else this._onRemovalComplete(r,n)}markElementAsRemoved(e,r,n,i,o){this.collectedLeaveElements.push(r),r[sr]={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,r,n,i,o){return m2(r)?this._fetchNamespace(e).listen(r,n,i,o):()=>{}}_buildInstruction(e,r,n,i,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,r,o)}destroyInnerAnimations(e){let r=this.driver.query(e,v2,!0);r.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(r=this.driver.query(e,Md,!0),r.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let r=this.playersByElement.get(e);r&&r.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let r=this.playersByQueriedElement.get(e);r&&r.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return ji(this.players).onDone(()=>e());e()})}processLeaveNode(e){let r=e[sr];if(r&&r.setForRemoval){if(e[sr]=yv,r.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(r.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,r.setForRemoval)}e.classList?.contains(wd)&&this.markElementAsDisabled(e,!1),this.driver.query(e,KP,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let r=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,i)=>this._balanceNamespaceList(n,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],r.length?ji(r).onDone(()=>{n.forEach(i=>i())}):n.forEach(i=>i())}}reportError(e){throw mP(e)}_flushAnimations(e,r){let n=new nl,i=[],o=new Map,s=[],a=new Map,c=new Map,l=new Map,u=new Set;this.disabledNodes.forEach(O=>{u.add(O);let B=this.driver.query(O,GP,!0);for(let J=0;J{let J=hv+y++;p.set(B,J),O.forEach(Ce=>Hn(Ce,J))});let v=[],M=new Set,P=new Set;for(let O=0;OM.add(Ce)):P.add(B))}let X=new Map,$=sv(h,Array.from(M));$.forEach((O,B)=>{let J=Cd+y++;X.set(B,J),O.forEach(Ce=>Hn(Ce,J))}),e.push(()=>{f.forEach((O,B)=>{let J=p.get(B);O.forEach(Ce=>la(Ce,J))}),$.forEach((O,B)=>{let J=X.get(B);O.forEach(Ce=>la(Ce,J))}),v.forEach(O=>{this.processLeaveNode(O)})});let Ae=[],_e=[];for(let O=this._namespaceList.length-1;O>=0;O--)this._namespaceList[O].drainQueuedTransitions(r).forEach(J=>{let Ce=J.player,mt=J.element;if(Ae.push(Ce),this.collectedEnterElements.length){let ht=mt[sr];if(ht&&ht.setForMove){if(ht.previousTriggersValues&&ht.previousTriggersValues.has(J.triggerName)){let qe=ht.previousTriggersValues.get(J.triggerName),we=this.statesByElement.get(J.element);if(we&&we.has(J.triggerName)){let zt=we.get(J.triggerName);zt.value=qe,we.set(J.triggerName,zt)}}Ce.destroy();return}}let Zt=!d||!this.driver.containsElement(d,mt),vt=X.get(mt),Un=p.get(mt),Ye=this._buildInstruction(J,n,Un,vt,Zt);if(Ye.errors&&Ye.errors.length){_e.push(Ye);return}if(Zt){Ce.onStart(()=>Po(mt,Ye.fromStyles)),Ce.onDestroy(()=>Or(mt,Ye.toStyles)),i.push(Ce);return}if(J.isFallbackTransition){Ce.onStart(()=>Po(mt,Ye.fromStyles)),Ce.onDestroy(()=>Or(mt,Ye.toStyles)),i.push(Ce);return}let Aa=[];Ye.timelines.forEach(ht=>{ht.stretchStartingKeyframe=!0,this.disabledNodes.has(ht.element)||Aa.push(ht)}),Ye.timelines=Aa,n.append(mt,Ye.timelines);let El={instruction:Ye,player:Ce,element:mt};s.push(El),Ye.queriedElements.forEach(ht=>xn(a,ht,[]).push(Ce)),Ye.preStyleProps.forEach((ht,qe)=>{if(ht.size){let we=c.get(qe);we||c.set(qe,we=new Set),ht.forEach((zt,hi)=>we.add(hi))}}),Ye.postStyleProps.forEach((ht,qe)=>{let we=l.get(qe);we||l.set(qe,we=new Set),ht.forEach((zt,hi)=>we.add(hi))})});if(_e.length){let O=[];_e.forEach(B=>{O.push(gP(B.triggerName,B.errors))}),Ae.forEach(B=>B.destroy()),this.reportError(O)}let Ee=new Map,$e=new Map;s.forEach(O=>{let B=O.element;n.has(B)&&($e.set(B,B),this._beforeAnimationBuild(O.player.namespaceId,O.instruction,Ee))}),i.forEach(O=>{let B=O.element;this._getPreviousPlayers(B,!1,O.namespaceId,O.triggerName,null).forEach(Ce=>{xn(Ee,B,[]).push(Ce),Ce.destroy()})});let Mt=v.filter(O=>av(O,c,l)),Bt=new Map;ov(Bt,this.driver,P,l,Pr).forEach(O=>{av(O,c,l)&&Mt.push(O)});let ln=new Map;f.forEach((O,B)=>{ov(ln,this.driver,new Set(O),c,d2)}),Mt.forEach(O=>{let B=Bt.get(O),J=ln.get(O);Bt.set(O,new Map([...B?.entries()??[],...J?.entries()??[]]))});let Rr=[],os=[],pt={};s.forEach(O=>{let{element:B,player:J,instruction:Ce}=O;if(n.has(B)){if(u.has(B)){J.onDestroy(()=>Or(B,Ce.toStyles)),J.disabled=!0,J.overrideTotalTime(Ce.totalTime),i.push(J);return}let mt=pt;if($e.size>1){let vt=B,Un=[];for(;vt=vt.parentNode;){let Ye=$e.get(vt);if(Ye){mt=Ye;break}Un.push(vt)}Un.forEach(Ye=>$e.set(Ye,mt))}let Zt=this._buildAnimation(J.namespaceId,Ce,Ee,o,ln,Bt);if(J.setRealPlayer(Zt),mt===pt)Rr.push(J);else{let vt=this.playersByElement.get(mt);vt&&vt.length&&(J.parentPlayer=ji(vt)),i.push(J)}}else Po(B,Ce.fromStyles),J.onDestroy(()=>Or(B,Ce.toStyles)),os.push(J),u.has(B)&&i.push(J)}),os.forEach(O=>{let B=o.get(O.element);if(B&&B.length){let J=ji(B);O.setRealPlayer(J)}}),i.forEach(O=>{O.parentPlayer?O.syncPlayerEvents(O.parentPlayer):O.destroy()});for(let O=0;O!Zt.destroyed);mt.length?rO(this,B,mt):this.processLeaveNode(B)}return v.length=0,Rr.forEach(O=>{this.players.push(O),O.onDone(()=>{O.destroy();let B=this.players.indexOf(O);this.players.splice(B,1)}),O.play()}),Rr}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,r,n,i,o){let s=[];if(r){let a=this.playersByQueriedElement.get(e);a&&(s=a)}else{let a=this.playersByElement.get(e);if(a){let c=!o||o==el;a.forEach(l=>{l.queued||!c&&l.triggerName!=i||s.push(l)})}}return(n||i)&&(s=s.filter(a=>!(n&&n!=a.namespaceId||i&&i!=a.triggerName))),s}_beforeAnimationBuild(e,r,n){let i=r.triggerName,o=r.element,s=r.isRemovalTransition?void 0:e,a=r.isRemovalTransition?void 0:i;for(let c of r.timelines){let l=c.element,u=l!==o,d=xn(n,l,[]);this._getPreviousPlayers(l,u,s,a,r.toState).forEach(f=>{let p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}Po(o,r.fromStyles)}_buildAnimation(e,r,n,i,o,s){let a=r.triggerName,c=r.element,l=[],u=new Set,d=new Set,h=r.timelines.map(p=>{let y=p.element;u.add(y);let v=y[sr];if(v&&v.removedBeforeQueried)return new Vi(p.duration,p.delay);let M=y!==c,P=iO((n.get(y)||XP).map(Ee=>Ee.getRealPlayer())).filter(Ee=>{let $e=Ee;return $e.element?$e.element===y:!1}),X=o.get(y),$=s.get(y),Ae=cv(this._normalizer,p.keyframes,X,$),_e=this._buildPlayer(p,Ae,P);if(p.subTimeline&&i&&d.add(y),M){let Ee=new il(e,a,y);Ee.setRealPlayer(_e),l.push(Ee)}return _e});l.forEach(p=>{xn(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>eO(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Hn(p,Q9));let f=ji(h);return f.onDestroy(()=>{u.forEach(p=>la(p,Q9)),Or(c,r.toStyles)}),d.forEach(p=>{xn(i,p,[]).push(f)}),f}_buildPlayer(e,r,n){return r.length>0?this.driver.animate(e.element,r,e.duration,e.delay,e.easing,n):new Vi(e.duration,e.delay)}},il=class{constructor(e,r,n){this.namespaceId=e,this.triggerName=r,this.element=n,this._player=new Vi,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((r,n)=>{r.forEach(i=>Rd(e,n,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let r=this._player;r.triggerCallback&&e.onStart(()=>r.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,r){xn(this._queuedCallbacks,e,[]).push(r)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let r=this._player;r.triggerCallback&&r.triggerCallback(e)}};function eO(t,e,r){let n=t.get(e);if(n){if(n.length){let i=n.indexOf(r);n.splice(i,1)}n.length==0&&t.delete(e)}return n}function tO(t){return t??null}function m2(t){return t&&t.nodeType===1}function nO(t){return t=="start"||t=="done"}function iv(t,e){let r=t.style.display;return t.style.display=e??"none",r}function ov(t,e,r,n,i){let o=[];r.forEach(c=>o.push(iv(c)));let s=[];n.forEach((c,l)=>{let u=new Map;c.forEach(d=>{let h=e.computeStyle(l,d,i);u.set(d,h),(!h||h.length==0)&&(l[sr]=JP,s.push(l))}),t.set(l,u)});let a=0;return r.forEach(c=>iv(c,o[a++])),s}function sv(t,e){let r=new Map;if(t.forEach(a=>r.set(a,[])),e.length==0)return r;let n=1,i=new Set(e),o=new Map;function s(a){if(!a)return n;let c=o.get(a);if(c)return c;let l=a.parentNode;return r.has(l)?c=l:i.has(l)?c=n:c=s(l),o.set(a,c),c}return e.forEach(a=>{let c=s(a);c!==n&&r.get(c).push(a)}),r}function Hn(t,e){t.classList?.add(e)}function la(t,e){t.classList?.remove(e)}function rO(t,e,r){ji(r).onDone(()=>t.processLeaveNode(e))}function iO(t){let e=[];return wv(t,e),e}function wv(t,e){for(let r=0;ri.add(o)):e.set(t,n),r.delete(t),!0}var ua=class{constructor(e,r,n){this._driver=r,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(i,o)=>{},this._transitionEngine=new Fd(e.body,r,n),this._timelineEngine=new Od(e.body,r,n),this._transitionEngine.onRemovalComplete=(i,o)=>this.onRemovalComplete(i,o)}registerTrigger(e,r,n,i,o){let s=e+"-"+i,a=this._triggerCache[s];if(!a){let c=[],l=[],u=mv(this._driver,o,c,l);if(c.length)throw oP(i,c);l.length&&void 0,a=$P(i,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(r,i,a)}register(e,r){this._transitionEngine.register(e,r)}destroy(e,r){this._transitionEngine.destroy(e,r)}onInsert(e,r,n,i){this._transitionEngine.insertNode(e,r,n,i)}onRemove(e,r,n){this._transitionEngine.removeNode(e,r,n)}disableAnimations(e,r){this._transitionEngine.markElementAsDisabled(e,r)}process(e,r,n,i){if(n.charAt(0)=="@"){let[o,s]=K9(n),a=i;this._timelineEngine.command(o,r,s,a)}else this._transitionEngine.trigger(e,r,n,i)}listen(e,r,n,i,o){if(n.charAt(0)=="@"){let[s,a]=K9(n);return this._timelineEngine.listen(s,r,a,o)}return this._transitionEngine.listen(e,r,n,i,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function sO(t,e){let r=null,n=null;return Array.isArray(e)&&e.length?(r=_d(e[0]),e.length>1&&(n=_d(e[e.length-1]))):e instanceof Map&&(r=_d(e)),r||n?new aO(t,r,n):null}var aO=(()=>{let e=class e{constructor(n,i,o){this._element=n,this._startStyles=i,this._endStyles=o,this._state=0;let s=e.initialStylesByElement.get(n);s||e.initialStylesByElement.set(n,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Or(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Or(this._element,this._initialStyles),this._endStyles&&(Or(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(Po(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Po(this._element,this._endStyles),this._endStyles=null),Or(this._element,this._initialStyles),this._state=3)}};e.initialStylesByElement=new WeakMap;let t=e;return t})();function _d(t){let e=null;return t.forEach((r,n)=>{cO(n)&&(e=e||new Map,e.set(n,r))}),e}function cO(t){return t==="display"||t==="position"}var D2=class{constructor(e,r,n,i){this.element=e,this.keyframes=r,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let r=()=>this._onFinish();this.domPlayer.addEventListener("finish",r),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",r)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let r=[];return e.forEach(n=>{r.push(Object.fromEntries(n))}),r}_triggerWebAnimation(e,r,n){return e.animate(this._convertKeyframesToObject(r),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,i)=>{i!=="offset"&&e.set(i,this._finished?n:jd(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let r=e==="start"?this._onStartFns:this._onDoneFns;r.forEach(n=>n()),r.length=0}},x2=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}matchesElement(e,r){return!1}containsElement(e,r){return lv(e,r)}getParentElement(e){return Hd(e)}query(e,r,n){return uv(e,r,n)}computeStyle(e,r,n){return jd(e,r)}animate(e,r,n,i,o,s=[]){let a=i==0?"both":"forwards",c={duration:n,delay:i,fill:a};o&&(c.easing=o);let l=new Map,u=s.filter(f=>f instanceof D2);TP(n,i)&&u.forEach(f=>{f.currentSnapshot.forEach((p,y)=>l.set(y,p))});let d=DP(r).map(f=>new Map(f));d=EP(e,d,l);let h=sO(e,d);return new D2(e,d,c,h)}};var g2="@",bv="@.disabled",S2=class{constructor(e,r,n,i){this.namespaceId=e,this.delegate=r,this.engine=n,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,r){return this.delegate.createElement(e,r)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,r){this.delegate.appendChild(e,r),this.engine.onInsert(this.namespaceId,r,e,!1)}insertBefore(e,r,n,i=!0){this.delegate.insertBefore(e,r,n),this.engine.onInsert(this.namespaceId,r,e,i)}removeChild(e,r,n){this.engine.onRemove(this.namespaceId,r,this.delegate)}selectRootElement(e,r){return this.delegate.selectRootElement(e,r)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,r,n,i){this.delegate.setAttribute(e,r,n,i)}removeAttribute(e,r,n){this.delegate.removeAttribute(e,r,n)}addClass(e,r){this.delegate.addClass(e,r)}removeClass(e,r){this.delegate.removeClass(e,r)}setStyle(e,r,n,i){this.delegate.setStyle(e,r,n,i)}removeStyle(e,r,n){this.delegate.removeStyle(e,r,n)}setProperty(e,r,n){r.charAt(0)==g2&&r==bv?this.disableAnimations(e,!!n):this.delegate.setProperty(e,r,n)}setValue(e,r){this.delegate.setValue(e,r)}listen(e,r,n){return this.delegate.listen(e,r,n)}disableAnimations(e,r){this.engine.disableAnimations(e,r)}},Nd=class extends S2{constructor(e,r,n,i,o){super(r,n,i,o),this.factory=e,this.namespaceId=r}setProperty(e,r,n){r.charAt(0)==g2?r.charAt(1)=="."&&r==bv?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,r.slice(1),n):this.delegate.setProperty(e,r,n)}listen(e,r,n){if(r.charAt(0)==g2){let i=lO(e),o=r.slice(1),s="";return o.charAt(0)!=g2&&([o,s]=uO(o)),this.engine.listen(this.namespaceId,i,o,s,a=>{let c=a._data||-1;this.factory.scheduleListenerCallback(c,n,a)})}return this.delegate.listen(e,r,n)}};function lO(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}function uO(t){let e=t.indexOf("."),r=t.substring(0,e),n=t.slice(e+1);return[r,n]}var T2=class{constructor(e,r,n){this.delegate=e,this.engine=r,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,r.onRemovalComplete=(i,o)=>{let s=o?.parentNode(i);s&&o.removeChild(s,i)}}createRenderer(e,r){let n="",i=this.delegate.createRenderer(e,r);if(!e||!r?.data?.animation){let l=this._rendererCache,u=l.get(i);if(!u){let d=()=>l.delete(i);u=new S2(n,i,this.engine,d),l.set(i,u)}return u}let o=r.id,s=r.id+"-"+this._currentId;this._currentId++,this.engine.register(s,e);let a=l=>{Array.isArray(l)?l.forEach(a):this.engine.registerTrigger(o,s,e,l.name,l)};return r.data.animation.forEach(a),new Nd(this,s,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,r,n){if(e>=0&&er(n));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),i.push([r,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var hO=(()=>{let e=class e extends ua{constructor(n,i,o,s){super(n,i,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(i){return new(i||e)(g(V),g(ol),g(Oo),g(xr))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function fO(){return new w2}function pO(t,e,r){return new T2(t,e,r)}var _v=[{provide:Oo,useFactory:fO},{provide:ua,useClass:hO},{provide:Jn,useFactory:pO,deps:[R4,ua,U]}],mO=[{provide:ol,useFactory:()=>new x2},{provide:gn,useValue:"BrowserAnimations"},..._v],mX=[{provide:ol,useClass:Vd},{provide:gn,useValue:"NoopAnimations"},..._v];function gX(){return[...mO]}var E2=2,Cv=.16,gO=.05,vO=.05,yO=.15,Tv=5,Ev=4,wO=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Mv(t){var e=t.r,r=t.g,n=t.b,i=To(e,r,n);return{h:i.h*360,s:i.s,v:i.v}}function z2(t){var e=t.r,r=t.g,n=t.b;return"#".concat(Eo(e,r,n,!1))}function bO(t,e,r){var n=r/100,i={r:(e.r-t.r)*n+t.r,g:(e.g-t.g)*n+t.g,b:(e.b-t.b)*n+t.b};return i}function Dv(t,e,r){var n;return Math.round(t.h)>=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-E2*e:Math.round(t.h)+E2*e:n=r?Math.round(t.h)+E2*e:Math.round(t.h)-E2*e,n<0?n+=360:n>=360&&(n-=360),n}function xv(t,e,r){if(t.h===0&&t.s===0)return t.s;var n;return r?n=t.s-Cv*e:e===Ev?n=t.s+Cv:n=t.s+gO*e,n>1&&(n=1),r&&e===Tv&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function Sv(t,e,r){var n;return r?n=t.v+vO*e:n=t.v-yO*e,n>1&&(n=1),Number(n.toFixed(2))}function da(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=an(t),i=Tv;i>0;i-=1){var o=Mv(n),s=z2(an({h:Dv(o,i,!0),s:xv(o,i,!0),v:Sv(o,i,!0)}));r.push(s)}r.push(z2(n));for(var a=1;a<=Ev;a+=1){var c=Mv(n),l=z2(an({h:Dv(c,a),s:xv(c,a),v:Sv(c,a)}));r.push(l)}return e.theme==="dark"?wO.map(function(u){var d=u.index,h=u.opacity,f=z2(bO(an(e.backgroundColor||"#141414"),an(r[d]),h*100));return f}):r}var Ud={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},At={},$d={};Object.keys(Ud).forEach(function(t){At[t]=da(Ud[t]),At[t].primary=At[t][5],$d[t]=da(Ud[t],{theme:"dark",backgroundColor:"#141414"}),$d[t].primary=$d[t][5]});var CX=At.red,MX=At.volcano,DX=At.gold,xX=At.orange,SX=At.yellow,TX=At.lime,EX=At.green,zX=At.cyan,IX=At.blue,kX=At.geekblue,PX=At.purple,OX=At.magenta,AX=At.grey,FX=At.grey;var ri="[@ant-design/icons-angular]:";function _O(t){console.error(`${ri} ${t}.`)}function kv(t){v4()&&console.warn(`${ri} ${t}.`)}function zv(t){return da(t)[0]}function I2(t,e){switch(e){case"fill":return`${t}-fill`;case"outline":return`${t}-o`;case"twotone":return`${t}-twotone`;case void 0:return t;default:throw new Error(`${ri}Theme "${e}" is not a recognized theme!`)}}function CO(t,e,r,n){return`${I2(t,e)}-${r}-${n}`}function MO(t){return t==="o"?"outline":t}function DO(t){return t.endsWith("-fill")||t.endsWith("-o")||t.endsWith("-twotone")}function Pv(t){return typeof t=="object"&&typeof t.name=="string"&&(typeof t.theme=="string"||t.theme===void 0)&&typeof t.icon=="string"}function xO(t){let e=t.split("-"),r=MO(e.splice(e.length-1,1)[0]);return{name:e.join("-"),theme:r,icon:""}}function SO(t){return t.cloneNode(!0)}function TO(t){return t.replace(/['"]#333['"]/g,'"primaryColor"').replace(/['"]#E6E6E6['"]/g,'"secondaryColor"').replace(/['"]#D9D9D9['"]/g,'"secondaryColor"').replace(/['"]#D8D8D8['"]/g,'"secondaryColor"')}function k2(t){let e=t.split(":");switch(e.length){case 1:return[t,""];case 2:return[e[1],e[0]];default:throw new Error(`${ri}The icon type ${t} is not valid!`)}}function EO(t){return k2(t)[1]!==""}function zO(){return new Error(`${ri}Type should have a namespace. Try "namespace:${name}".`)}function Iv(t){return new Error(`${ri}the icon ${t} does not exist or is not registered.`)}function IO(){return _O('you need to import "HttpClientModule" to use dynamic importing.'),null}function kO(t){return new Error(`${ri}The url "${t}" is unsafe.`)}function PO(){return new Error(`${ri} tag not found.`)}function OO(){return new Error(`${ri}Importing timeout error.`)}var AO="__ant_icon_load",FO=new E("ant_icons"),qd=(()=>{let e=class e{set twoToneColor({primaryColor:n,secondaryColor:i}){this._twoToneColorPalette.primaryColor=n,this._twoToneColorPalette.secondaryColor=i||zv(n)}get twoToneColor(){return b({},this._twoToneColorPalette)}get _disableDynamicLoading(){return!1}constructor(n,i,o,s,a){this._rendererFactory=n,this._handler=i,this._document=o,this.sanitizer=s,this._antIcons=a,this.defaultTheme="outline",this._svgDefinitions=new Map,this._svgRenderedDefinitions=new Map,this._inProgressFetches=new Map,this._assetsUrlRoot="",this._twoToneColorPalette={primaryColor:"#333333",secondaryColor:"#E6E6E6"},this._enableJsonpLoading=!1,this._jsonpIconLoad$=new S,this._renderer=this._rendererFactory.createRenderer(null,null),this._handler&&(this._http=new Cc(this._handler)),this._antIcons&&this.addIcon(...this._antIcons)}useJsonpLoading(){this._enableJsonpLoading?kv("You are already using jsonp loading."):(this._enableJsonpLoading=!0,window[AO]=n=>{this._jsonpIconLoad$.next(n)})}changeAssetsSource(n){this._assetsUrlRoot=n.endsWith("/")?n:n+"/"}addIcon(...n){n.forEach(i=>{this._svgDefinitions.set(I2(i.name,i.theme),i)})}addIconLiteral(n,i){let[o,s]=k2(n);if(!s)throw zO();this.addIcon({name:n,icon:i})}clear(){this._svgDefinitions.clear(),this._svgRenderedDefinitions.clear()}getRenderedContent(n,i){let o=Pv(n)?n:this._svgDefinitions.get(n)||null;if(!o&&this._disableDynamicLoading)throw Iv(n);return(o?A(o):this._loadIconDynamically(n)).pipe(Z(a=>{if(!a)throw Iv(n);return this._loadSVGFromCacheOrCreateNew(a,i)}))}getCachedIcons(){return this._svgDefinitions}_loadIconDynamically(n){if(!this._http&&!this._enableJsonpLoading)return A(IO());let i=this._inProgressFetches.get(n);if(!i){let[o,s]=k2(n),a=s?{name:n,icon:""}:xO(o),c=this._enableJsonpLoading?".js":".svg",l=(s?`${this._assetsUrlRoot}assets/${s}/${o}`:`${this._assetsUrlRoot}assets/${a.theme}/${a.name}`)+c,u=this.sanitizer.sanitize(yn.URL,l);if(!u)throw kO(l);i=(this._enableJsonpLoading?this._loadIconDynamicallyWithJsonp(a,u):this._http.get(u,{responseType:"text"}).pipe(Z(h=>ke(b({},a),{icon:h})))).pipe(Fe(h=>this.addIcon(h)),un(()=>this._inProgressFetches.delete(n)),En(()=>A(null)),fr()),this._inProgressFetches.set(n,i)}return i}_loadIconDynamicallyWithJsonp(n,i){return new Y(o=>{let s=this._document.createElement("script"),a=setTimeout(()=>{c(),o.error(OO())},6e3);s.src=i;function c(){s.parentNode.removeChild(s),clearTimeout(a)}this._document.body.appendChild(s),this._jsonpIconLoad$.pipe(ge(l=>l.name===n.name&&l.theme===n.theme),ze(1)).subscribe(l=>{o.next(l),c()})})}_loadSVGFromCacheOrCreateNew(n,i){let o,s=i||this._twoToneColorPalette.primaryColor,a=zv(s)||this._twoToneColorPalette.secondaryColor,c=n.theme==="twotone"?CO(n.name,n.theme,s,a):n.theme===void 0?n.name:I2(n.name,n.theme),l=this._svgRenderedDefinitions.get(c);return l?o=l.icon:(o=this._setSVGAttribute(this._colorizeSVGIcon(this._createSVGElementFromString(EO(n.name)?n.icon:TO(n.icon)),n.theme==="twotone",s,a)),this._svgRenderedDefinitions.set(c,ke(b({},n),{icon:o}))),SO(o)}_createSVGElementFromString(n){let i=this._document.createElement("div");i.innerHTML=n;let o=i.querySelector("svg");if(!o)throw PO;return o}_setSVGAttribute(n){return this._renderer.setAttribute(n,"width","1em"),this._renderer.setAttribute(n,"height","1em"),n}_colorizeSVGIcon(n,i,o,s){if(i){let a=n.childNodes,c=a.length;for(let l=0;l{let e=class e{constructor(n,i,o){this._iconService=n,this._elementRef=i,this._renderer=o}ngOnChanges(n){(n.type||n.theme||n.twoToneColor)&&this._changeIcon()}_changeIcon(){return new Promise(n=>{if(!this.type){this._clearSVGElement(),n(null);return}let i=this._getSelfRenderMeta();this._iconService.getRenderedContent(this._parseIconType(this.type,this.theme),this.twoToneColor).subscribe(o=>{let s=this._getSelfRenderMeta();NO(i,s)?(this._setSVGElement(o),n(o)):n(null)})})}_getSelfRenderMeta(){return{type:this.type,theme:this.theme,twoToneColor:this.twoToneColor}}_parseIconType(n,i){if(Pv(n))return n;{let[o,s]=k2(n);return s?n:DO(o)?(i&&kv(`'type' ${o} already gets a theme inside so 'theme' ${i} would be ignored`),o):I2(o,i||this._iconService.defaultTheme)}}_setSVGElement(n){this._clearSVGElement(),this._renderer.appendChild(this._elementRef.nativeElement,n)}_clearSVGElement(){let n=this._elementRef.nativeElement,i=n.childNodes,o=i.length;for(let s=o-1;s>=0;s--){let a=i[s];a.tagName?.toLowerCase()==="svg"&&this._renderer.removeChild(n,a)}}};e.\u0275fac=function(i){return new(i||e)(m(qd),m(oe),m(st))},e.\u0275dir=ne({type:e,selectors:[["","antIcon",""]],inputs:{type:"type",theme:"theme",twoToneColor:"twoToneColor"},features:[He]});let t=e;return t})();var QX={name:"alipay-circle",theme:"outline",icon:''};var XX={name:"appstore",theme:"outline",icon:''};var Av={name:"bars",theme:"outline",icon:''};var Wd={name:"bell",theme:"outline",icon:''};var JX={name:"arrow-down",theme:"outline",icon:''};var Fv={name:"calendar",theme:"outline",icon:''},Nv={name:"caret-down",theme:"fill",icon:''};var Rv={name:"caret-up",theme:"fill",icon:''};var Lv={name:"check-circle",theme:"fill",icon:''},Hv={name:"check-circle",theme:"outline",icon:''};var Vv={name:"check",theme:"outline",icon:''};var Yv={name:"caret-down",theme:"outline",icon:''};var jv={name:"close-circle",theme:"fill",icon:''};var Bv={name:"close-circle",theme:"outline",icon:''},Uv={name:"clock-circle",theme:"outline",icon:''};var $v={name:"close",theme:"outline",icon:''};var qv={name:"caret-up",theme:"outline",icon:''};var Wv={name:"copy",theme:"outline",icon:''};var sl={name:"delete",theme:"outline",icon:''};var Gv={name:"double-left",theme:"outline",icon:''};var eJ={name:"copyright",theme:"outline",icon:''},Kv={name:"double-right",theme:"outline",icon:''};var Zv={name:"down",theme:"outline",icon:''};var Qv={name:"edit",theme:"outline",icon:''},Xv={name:"ellipsis",theme:"outline",icon:''};var Jv={name:"exclamation-circle",theme:"outline",icon:''};var ey={name:"exclamation-circle",theme:"fill",icon:''};var ty={name:"file",theme:"fill",icon:''};var ny={name:"filter",theme:"fill",icon:''};var tJ={name:"fullscreen",theme:"outline",icon:''};var nJ={name:"fullscreen-exit",theme:"outline",icon:''};var rJ={name:"github",theme:"outline",icon:''};var ry={name:"info-circle",theme:"outline",icon:''};var Gd={name:"inbox",theme:"outline",icon:''};var iy={name:"info-circle",theme:"fill",icon:''};var oy={name:"file",theme:"outline",icon:''};var sy={name:"left",theme:"outline",icon:''};var iJ={name:"logout",theme:"outline",icon:''};var oJ={name:"lock",theme:"outline",icon:''};var sJ={name:"mail",theme:"outline",icon:''};var ay={name:"loading",theme:"outline",icon:''};var cy={name:"eye",theme:"outline",icon:''};var ly={name:"menu-unfold",theme:"outline",icon:''};var uy={name:"menu-fold",theme:"outline",icon:''};var dy={name:"paper-clip",theme:"outline",icon:''};var Kd={name:"plus",theme:"outline",icon:''};var hy={name:"question-circle",theme:"outline",icon:''};var fy={name:"right",theme:"outline",icon:''};var py={name:"rotate-left",theme:"outline",icon:''};var my={name:"rotate-right",theme:"outline",icon:''};var gy={name:"search",theme:"outline",icon:''};var Zd={name:"star",theme:"fill",icon:''};var vy={name:"swap-right",theme:"outline",icon:''};var aJ={name:"taobao-circle",theme:"outline",icon:''};var cJ={name:"tool",theme:"outline",icon:''};var lJ={name:"setting",theme:"outline",icon:''};var yy={name:"upload",theme:"outline",icon:''},wy={name:"up",theme:"outline",icon:''};var uJ={name:"user",theme:"outline",icon:''};var by={name:"vertical-align-top",theme:"outline",icon:''};var dJ={name:"weibo-circle",theme:"outline",icon:''};var _y={name:"zoom-in",theme:"outline",icon:''};var Cy={name:"zoom-out",theme:"outline",icon:''};var Xd;try{Xd=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Xd=!1}var Ge=(()=>{let e=class e{constructor(n){this._platformId=n,this.isBrowser=this._platformId?Zu(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||Xd)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};e.\u0275fac=function(i){return new(i||e)(g(Yt))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),yJ=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var al;function RO(){if(al==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>al=!0}))}finally{al=al||!1}return al}function Fo(t){return RO()?t:!!t.capture}var ar=function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t}(ar||{}),P2,Ao;function O2(){if(Ao==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Ao=!1,Ao;if("scrollBehavior"in document.documentElement.style)Ao=!0;else{let t=Element.prototype.scrollTo;t?Ao=!/\{\s*\[native code\]\s*\}/.test(t.toString()):Ao=!1}}return Ao}function ha(){if(typeof document!="object"||!document)return ar.NORMAL;if(P2==null){let t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let r=document.createElement("div"),n=r.style;n.width="2px",n.height="1px",t.appendChild(r),document.body.appendChild(t),P2=ar.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,P2=t.scrollLeft===0?ar.NEGATED:ar.INVERTED),t.remove()}return P2}var Qd;function LO(){if(Qd==null){let t=typeof document<"u"?document.head:null;Qd=!!(t&&(t.createShadowRoot||t.attachShadow))}return Qd}function cl(t){if(LO()){let e=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function My(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}function cn(t){return t.composedPath?t.composedPath()[0]:t.target}function Jd(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var HO=[Av,Fv,Rv,qv,Nv,Yv,Lv,Hv,Vv,Uv,Bv,jv,$v,Wv,sl,Gv,Kv,Zv,Qv,Xv,ey,Jv,cy,ty,oy,ny,iy,ry,sy,ay,dy,hy,fy,my,py,Zd,gy,Zd,yy,by,wy,vy,_y,Cy],xy=new E("nz_icons"),FJ=new E("nz_icon_default_twotone_color"),Dy="#1890ff",fa=(()=>{let e=class e extends qd{get _disableDynamicLoading(){return!this.platform.isBrowser}ngOnDestroy(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null)}normalizeSvgElement(n){n.getAttribute("viewBox")||this._renderer.setAttribute(n,"viewBox","0 0 1024 1024"),(!n.getAttribute("width")||!n.getAttribute("height"))&&(this._renderer.setAttribute(n,"width","1em"),this._renderer.setAttribute(n,"height","1em")),n.getAttribute("fill")||this._renderer.setAttribute(n,"fill","currentColor")}fetchFromIconfont(n){let{scriptUrl:i}=n;if(this._document&&!this.iconfontCache.has(i)){let o=this._renderer.createElement("script");this._renderer.setAttribute(o,"src",i),this._renderer.setAttribute(o,"data-namespace",i.replace(/^(https?|http):/g,"")),this._renderer.appendChild(this._document.body,o),this.iconfontCache.add(i)}}createIconfontIcon(n){return this._createSVGElementFromString(``)}constructor(n,i,o,s,a,c,l){super(n,a,c,i,[...HO,...l||[]]),this.nzConfigService=o,this.platform=s,this.configUpdated$=new S,this.iconfontCache=new Set,this.subscription=null,this.onConfigChange(),this.configDefaultTwotoneColor(),this.configDefaultTheme()}onConfigChange(){this.subscription=this.nzConfigService.getConfigChangeEventForComponent("icon").subscribe(()=>{this.configDefaultTwotoneColor(),this.configDefaultTheme(),this.configUpdated$.next()})}configDefaultTheme(){let n=this.getConfig();this.defaultTheme=n.nzTheme||"outline"}configDefaultTwotoneColor(){let i=this.getConfig().nzTwotoneColor||Dy,o=Dy;i&&(i.startsWith("#")?o=i:Cn("Twotone color must be a hex color!")),this.twoToneColor={primaryColor:o}}getConfig(){return this.nzConfigService.getConfigForComponent("icon")||{}}};e.\u0275fac=function(i){return new(i||e)(g(Jn),g(Mo),g(Rn),g(Ge),g(Oi,8),g(V,8),g(xy,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Sy=new E("nz_icons_patch"),Ty=(()=>{let e=class e{constructor(n,i){this.extraIcons=n,this.rootIconService=i,this.patched=!1}doPatch(){this.patched||(this.extraIcons.forEach(n=>this.rootIconService.addIcon(n)),this.patched=!0)}};e.\u0275fac=function(i){return new(i||e)(g(Sy,2),g(fa))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ii=(()=>{let e=class e extends Ov{set nzSpin(n){this.spin=n}set nzType(n){this.type=n}set nzTheme(n){this.theme=n}set nzTwotoneColor(n){this.twoToneColor=n}set nzIconfont(n){this.iconfont=n}constructor(n,i,o,s,a,c){super(s,o,a),this.ngZone=n,this.changeDetectorRef=i,this.iconService=s,this.renderer=a,this.cacheClassName=null,this.nzRotate=0,this.spin=!1,this.destroy$=new S,c&&c.doPatch(),this.el=o.nativeElement}ngOnChanges(n){let{nzType:i,nzTwotoneColor:o,nzSpin:s,nzTheme:a,nzRotate:c}=n;i||o||s||a?this.changeIcon2():c?this.handleRotate(this.el.firstChild):this._setSVGElement(this.iconService.createIconfontIcon(`#${this.iconfont}`))}ngOnInit(){this.renderer.setAttribute(this.el,"class",`anticon ${this.el.className}`.trim())}ngAfterContentChecked(){if(!this.type){let n=this.el.children,i=n.length;if(!this.type&&n.length)for(;i--;){let o=n[i];o.tagName.toLowerCase()==="svg"&&this.iconService.normalizeSvgElement(o)}}}ngOnDestroy(){this.destroy$.next()}changeIcon2(){this.setClassName(),this.ngZone.runOutsideAngular(()=>{Le(this._changeIcon()).pipe(ce(this.destroy$)).subscribe({next:n=>{this.ngZone.run(()=>{this.changeDetectorRef.detectChanges(),n&&(this.setSVGData(n),this.handleSpin(n),this.handleRotate(n))})},error:Cn})})}handleSpin(n){this.spin||this.type==="loading"?this.renderer.addClass(n,"anticon-spin"):this.renderer.removeClass(n,"anticon-spin")}handleRotate(n){this.nzRotate?this.renderer.setAttribute(n,"style",`transform: rotate(${this.nzRotate}deg)`):this.renderer.removeAttribute(n,"style")}setClassName(){this.cacheClassName&&this.renderer.removeClass(this.el,this.cacheClassName),this.cacheClassName=`anticon-${this.type}`,this.renderer.addClass(this.el,this.cacheClassName)}setSVGData(n){this.renderer.setAttribute(n,"data-icon",this.type),this.renderer.setAttribute(n,"aria-hidden","true")}};e.\u0275fac=function(i){return new(i||e)(m(U),m(ft),m(oe),m(fa),m(st),m(Ty,8))},e.\u0275dir=ne({type:e,selectors:[["","nz-icon",""]],hostVars:2,hostBindings:function(i,o){i&2&&St("anticon",!0)},inputs:{nzSpin:"nzSpin",nzRotate:"nzRotate",nzType:"nzType",nzTheme:"nzTheme",nzTwotoneColor:"nzTwotoneColor",nzIconfont:"nzIconfont"},exportAs:["nzIcon"],standalone:!0,features:[nn,He]});let t=e;return je([Je()],t.prototype,"nzSpin",null),t})(),No=(()=>{let e=class e{static forRoot(n){return{ngModule:e,providers:[{provide:xy,useValue:n}]}}static forChild(n){return{ngModule:e,providers:[Ty,{provide:Sy,useValue:n}]}}};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var eh=(()=>{let e=class e{setHiddenAttribute(){this.hidden?typeof this.hidden=="string"?this.renderer.setAttribute(this.elementRef.nativeElement,"hidden",this.hidden):this.renderer.setAttribute(this.elementRef.nativeElement,"hidden",""):this.renderer.removeAttribute(this.elementRef.nativeElement,"hidden")}constructor(n,i){this.elementRef=n,this.renderer=i,this.hidden=null,this.renderer.setAttribute(this.elementRef.nativeElement,"hidden","")}ngOnChanges(){this.setHiddenAttribute()}ngAfterViewInit(){this.setHiddenAttribute()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(st))},e.\u0275dir=ne({type:e,selectors:[["","nz-button",""],["nz-button-group"],["","nz-icon",""],["","nz-menu-item",""],["","nz-submenu",""],["nz-select-top-control"],["nz-select-placeholder"],["nz-input-group"]],inputs:{hidden:"hidden"},standalone:!0,features:[He]});let t=e;return t})(),Ey=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var th=class{get waveAttributeName(){return this.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"}constructor(e,r,n,i,o){this.triggerElement=e,this.ngZone=r,this.insertExtraNode=n,this.platformId=i,this.cspNonce=o,this.waveTransitionDuration=400,this.styleForPseudo=null,this.extraNode=null,this.lastTime=0,this.onClick=s=>{!this.triggerElement||!this.triggerElement.getAttribute||this.triggerElement.getAttribute("disabled")||s.target.tagName==="INPUT"||this.triggerElement.className.indexOf("disabled")>=0||this.fadeOutWave()},this.platform=new Ge(this.platformId),this.clickHandler=this.onClick.bind(this),this.bindTriggerEvent()}bindTriggerEvent(){this.platform.isBrowser&&this.ngZone.runOutsideAngular(()=>{this.removeTriggerEvent(),this.triggerElement&&this.triggerElement.addEventListener("click",this.clickHandler,!0)})}removeTriggerEvent(){this.triggerElement&&this.triggerElement.removeEventListener("click",this.clickHandler,!0)}removeStyleAndExtraNode(){this.styleForPseudo&&document.body.contains(this.styleForPseudo)&&(document.body.removeChild(this.styleForPseudo),this.styleForPseudo=null),this.insertExtraNode&&this.triggerElement.contains(this.extraNode)&&this.triggerElement.removeChild(this.extraNode)}destroy(){this.removeTriggerEvent(),this.removeStyleAndExtraNode()}fadeOutWave(){let e=this.triggerElement,r=this.getWaveColor(e);e.setAttribute(this.waveAttributeName,"true"),!(Date.now(){e.removeAttribute(this.waveAttributeName),this.removeStyleAndExtraNode()},this.waveTransitionDuration))}isValidColor(e){return!!e&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&this.isNotGrey(e)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(e)&&e!=="transparent"}isNotGrey(e){let r=e.match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return r&&r[1]&&r[2]&&r[3]?!(r[1]===r[2]&&r[2]===r[3]):!0}getWaveColor(e){let r=getComputedStyle(e);return r.getPropertyValue("border-top-color")||r.getPropertyValue("border-color")||r.getPropertyValue("background-color")}runTimeoutOutsideZone(e,r){this.ngZone.runOutsideAngular(()=>setTimeout(e,r))}},YO={disabled:!1},Ey=new E("nz-wave-global-options");function jO(t){return Wt([{provide:Ey,useValue:t}])}var nh=(()=>{let e=class e{get disabled(){return this.waveDisabled}get rendererRef(){return this.waveRenderer}constructor(n,i,o,s,a,c){this.ngZone=n,this.elementRef=i,this.config=o,this.animationType=s,this.platformId=a,this.cspNonce=c,this.nzWaveExtraNode=!1,this.waveDisabled=!1,this.waveDisabled=this.isConfigDisabled()}isConfigDisabled(){let n=!1;return this.config&&typeof this.config.disabled=="boolean"&&(n=this.config.disabled),this.animationType==="NoopAnimations"&&(n=!0),n}ngOnDestroy(){this.waveRenderer&&this.waveRenderer.destroy()}ngOnInit(){this.renderWaveIfEnabled()}renderWaveIfEnabled(){!this.waveDisabled&&this.elementRef.nativeElement&&(this.waveRenderer=new th(this.elementRef.nativeElement,this.ngZone,this.nzWaveExtraNode,this.platformId,this.cspNonce))}disable(){this.waveDisabled=!0,this.waveRenderer&&(this.waveRenderer.removeTriggerEvent(),this.waveRenderer.removeStyleAndExtraNode())}enable(){this.waveDisabled=this.isConfigDisabled()||!1,this.waveRenderer&&this.waveRenderer.bindTriggerEvent()}};e.\u0275fac=function(i){return new(i||e)(m(U),m(oe),m(Ey,8),m(gn,8),m(Yt),m(qr,8))},e.\u0275dir=ne({type:e,selectors:[["","nz-wave",""],["button","nz-button","",3,"nzType","link",3,"nzType","text"]],inputs:{nzWaveExtraNode:"nzWaveExtraNode"},exportAs:["nzWave"],standalone:!0});let t=e;return t})(),zy=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[jO(YO)]});let t=e;return t})();var UO=new E("cdk-dir-doc",{providedIn:"root",factory:$O});function $O(){return w(V)}var qO=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function WO(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?qO.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var Ft=(()=>{let e=class e{constructor(n){if(this.value="ltr",this.change=new re,n){let i=n.body?n.body.dir:null,o=n.documentElement?n.documentElement.dir:null;this.value=WO(i||o||"ltr")}}ngOnDestroy(){this.change.complete()}};e.\u0275fac=function(i){return new(i||e)(g(UO,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Ro=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var GO=["nz-button",""];function KO(t,e){t&1&&et(0,"span",1)}var ZO=["*"],Iy="button",F2=(()=>{let e=class e{insertSpan(n,i){n.forEach(o=>{if(o.nodeName==="#text"){let s=i.createElement("span"),a=i.parentNode(o);i.insertBefore(a,s,o),i.appendChild(s,o)}})}get iconOnly(){let n=Array.from(this.elementRef?.nativeElement?.childNodes||[]),i=n.every(a=>a.nodeName!=="#text"),o=n.filter(a=>!(a.nodeName==="#comment"||a?.attributes?.getNamedItem("nz-icon"))).length==0;return!!this.nzIconDirectiveElement&&o&&i}constructor(n,i,o,s,a,c){this.ngZone=n,this.elementRef=i,this.cdr=o,this.renderer=s,this.nzConfigService=a,this.directionality=c,this._nzModuleName=Iy,this.nzBlock=!1,this.nzGhost=!1,this.nzSearch=!1,this.nzLoading=!1,this.nzDanger=!1,this.disabled=!1,this.tabIndex=null,this.nzType=null,this.nzShape=null,this.nzSize="default",this.dir="ltr",this.destroy$=new S,this.loading$=new S,this.nzConfigService.getConfigChangeEventForComponent(Iy).pipe(ce(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.directionality.change?.pipe(ce(this.destroy$)).subscribe(n=>{this.dir=n,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{Kn(this.elementRef.nativeElement,"click",{capture:!0}).pipe(ce(this.destroy$)).subscribe(n=>{(this.disabled&&n.target?.tagName==="A"||this.nzLoading)&&(n.preventDefault(),n.stopImmediatePropagation())})})}ngOnChanges(n){let{nzLoading:i}=n;i&&this.loading$.next(this.nzLoading)}ngAfterViewInit(){this.insertSpan(this.elementRef.nativeElement.childNodes,this.renderer)}ngAfterContentInit(){this.loading$.pipe(Rt(this.nzLoading),ge(()=>!!this.nzIconDirectiveElement),ce(this.destroy$)).subscribe(n=>{let i=this.nzIconDirectiveElement.nativeElement;n?this.renderer.setStyle(i,"display","none"):this.renderer.removeStyle(i,"display")})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(m(U),m(oe),m(ft),m(st),m(Rn),m(Ft,8))},e.\u0275cmp=bt({type:e,selectors:[["button","nz-button",""],["a","nz-button",""]],contentQueries:function(i,o,s){if(i&1&&wn(s,ii,5,oe),i&2){let a;ct(a=lt())&&(o.nzIconDirectiveElement=a.first)}},hostAttrs:[1,"ant-btn"],hostVars:32,hostBindings:function(i,o){i&2&&(kn("tabindex",o.disabled?-1:o.tabIndex===null?null:o.tabIndex)("disabled",o.disabled||null),St("ant-btn-primary",o.nzType==="primary")("ant-btn-dashed",o.nzType==="dashed")("ant-btn-link",o.nzType==="link")("ant-btn-text",o.nzType==="text")("ant-btn-circle",o.nzShape==="circle")("ant-btn-round",o.nzShape==="round")("ant-btn-lg",o.nzSize==="large")("ant-btn-sm",o.nzSize==="small")("ant-btn-dangerous",o.nzDanger)("ant-btn-loading",o.nzLoading)("ant-btn-background-ghost",o.nzGhost)("ant-btn-block",o.nzBlock)("ant-input-search-button",o.nzSearch)("ant-btn-rtl",o.dir==="rtl")("ant-btn-icon-only",o.iconOnly))},inputs:{nzBlock:"nzBlock",nzGhost:"nzGhost",nzSearch:"nzSearch",nzLoading:"nzLoading",nzDanger:"nzDanger",disabled:"disabled",tabIndex:"tabIndex",nzType:"nzType",nzShape:"nzShape",nzSize:"nzSize"},exportAs:["nzButton"],standalone:!0,features:[He,_t],attrs:GO,ngContentSelectors:ZO,decls:2,vars:1,consts:[["nz-icon","","nzType","loading",4,"ngIf"],["nz-icon","","nzType","loading"]],template:function(i,o){i&1&&(yo(),Q(0,KO,1,0,"span",0),wo(1)),i&2&&I("ngIf",o.nzLoading)},dependencies:[No,ii,nr],encapsulation:2,changeDetection:0});let t=e;return je([Je()],t.prototype,"nzBlock",void 0),je([Je()],t.prototype,"nzGhost",void 0),je([Je()],t.prototype,"nzSearch",void 0),je([Je()],t.prototype,"nzLoading",void 0),je([Je()],t.prototype,"nzDanger",void 0),je([Je()],t.prototype,"disabled",void 0),je([Ln()],t.prototype,"nzSize",void 0),t})();var rh=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[F2,Ty,zy]});let t=e;return t})();function jt(t){"@babel/helpers - typeof";return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(t)}function de(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function _(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function T(t){_(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||jt(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function pa(t,e){_(2,arguments);var r=T(t),n=de(e);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function ma(t,e){_(2,arguments);var r=T(t),n=de(e);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),o=new Date(r.getTime());o.setMonth(r.getMonth()+n+1,0);var s=o.getDate();return i>=s?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function ll(t,e){_(2,arguments);var r=T(t).getTime(),n=de(e);return new Date(r+n)}var XO={};function Et(){return XO}function Ho(t,e){var r,n,i,o,s,a,c,l;_(1,arguments);var u=Et(),d=de((r=(n=(i=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=T(t),f=h.getDay(),p=(f=i.getTime()?r+1:e.getTime()>=s.getTime()?r:r-1}function oh(t){_(1,arguments);var e=ih(t),r=new Date(0);r.setFullYear(e,0,4),r.setHours(0,0,0,0);var n=Bi(r);return n}function cr(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Ui(t){_(1,arguments);var e=T(t);return e.setHours(0,0,0,0),e}var JO=864e5;function Vo(t,e){_(2,arguments);var r=Ui(t),n=Ui(e),i=r.getTime()-cr(r),o=n.getTime()-cr(n);return Math.round((i-o)/JO)}function N2(t,e){_(2,arguments);var r=de(e);return ll(t,r*1e3)}function R2(t,e){_(2,arguments);var r=de(e);return ma(t,r*12)}function Yo(t,e){_(2,arguments);var r=T(t),n=T(e),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}var eA=365.2425,tA=Math.pow(10,8)*24*60*60*1e3,jo=6e4,Bo=36e5,ky=1e3,pte=-tA;var nA=3600;var Py=nA*24,mte=Py*7,rA=Py*eA,iA=rA/12,gte=iA*3;function Uo(t,e){_(2,arguments);var r=Ui(t),n=Ui(e);return r.getTime()===n.getTime()}function sh(t){return _(1,arguments),t instanceof Date||jt(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function ga(t){if(_(1,arguments),!sh(t)&&typeof t!="number")return!1;var e=T(t);return!isNaN(Number(e))}function va(t,e){_(2,arguments);var r=T(t),n=T(e),i=r.getFullYear()-n.getFullYear(),o=r.getMonth()-n.getMonth();return i*12+o}function L2(t,e){_(2,arguments);var r=T(t),n=T(e);return r.getFullYear()-n.getFullYear()}function $o(t,e){return _(2,arguments),T(t).getTime()-T(e).getTime()}var Oy={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},oA="trunc";function ya(t){return t?Oy[t]:Oy[oA]}function H2(t,e,r){_(2,arguments);var n=$o(t,e)/Bo;return ya(r?.roundingMethod)(n)}function V2(t,e,r){_(2,arguments);var n=$o(t,e)/jo;return ya(r?.roundingMethod)(n)}function Y2(t){_(1,arguments);var e=T(t);return e.setHours(23,59,59,999),e}function j2(t){_(1,arguments);var e=T(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function wa(t){_(1,arguments);var e=T(t);return Y2(e).getTime()===j2(e).getTime()}function ah(t,e){_(2,arguments);var r=T(t),n=T(e),i=Yo(r,n),o=Math.abs(va(r,n)),s;if(o<1)s=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);var a=Yo(r,n)===-i;wa(T(t))&&o===1&&Yo(t,n)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function ba(t,e,r){_(2,arguments);var n=$o(t,e)/1e3;return ya(r?.roundingMethod)(n)}function B2(t){_(1,arguments);var e=T(t);return e.setSeconds(0,0),e}function ul(t){_(1,arguments);var e=T(t);return e.setDate(1),e.setHours(0,0,0,0),e}function dl(t,e){_(2,arguments);var r=de(e);return ll(t,-r)}var sA=864e5;function ch(t){_(1,arguments);var e=T(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),i=r-n;return Math.floor(i/sA)+1}function Vn(t){_(1,arguments);var e=1,r=T(t),n=r.getUTCDay(),i=(n=i.getTime()?r+1:e.getTime()>=s.getTime()?r:r-1}function lh(t){_(1,arguments);var e=hl(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var n=Vn(r);return n}var aA=6048e5;function fl(t){_(1,arguments);var e=T(t),r=Vn(e).getTime()-lh(e).getTime();return Math.round(r/aA)+1}function Sn(t,e){var r,n,i,o,s,a,c,l;_(1,arguments);var u=Et(),d=de((r=(n=(i=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=T(t),f=h.getUTCDay(),p=(f=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var y=Sn(p,e),v=new Date(0);v.setUTCFullYear(d,0,f),v.setUTCHours(0,0,0,0);var M=Sn(v,e);return u.getTime()>=y.getTime()?d+1:u.getTime()>=M.getTime()?d:d-1}function uh(t,e){var r,n,i,o,s,a,c,l;_(1,arguments);var u=Et(),d=de((r=(n=(i=(o=e?.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=qo(t,e),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=Sn(f,e);return p}var cA=6048e5;function pl(t,e){_(1,arguments);var r=T(t),n=Sn(r,e).getTime()-uh(r,e).getTime();return Math.round(n/cA)+1}function Ie(t,e){for(var r=t<0?"-":"",n=Math.abs(t).toString();n.length0?n:1-n;return Ie(r==="yy"?i%100:i,r.length)},M:function(e,r){var n=e.getUTCMonth();return r==="M"?String(n+1):Ie(n+1,2)},d:function(e,r){return Ie(e.getUTCDate(),r.length)},a:function(e,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,r){return Ie(e.getUTCHours()%12||12,r.length)},H:function(e,r){return Ie(e.getUTCHours(),r.length)},m:function(e,r){return Ie(e.getUTCMinutes(),r.length)},s:function(e,r){return Ie(e.getUTCSeconds(),r.length)},S:function(e,r){var n=r.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Ie(o,r.length)}},oi=lA;var _a={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},uA={G:function(e,r,n){var i=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,r,n){if(r==="yo"){var i=e.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return oi.y(e,r)},Y:function(e,r,n,i){var o=qo(e,i),s=o>0?o:1-o;if(r==="YY"){var a=s%100;return Ie(a,2)}return r==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ie(s,r.length)},R:function(e,r){var n=hl(e);return Ie(n,r.length)},u:function(e,r){var n=e.getUTCFullYear();return Ie(n,r.length)},Q:function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Ie(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Ie(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,r,n){var i=e.getUTCMonth();switch(r){case"M":case"MM":return oi.M(e,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,r,n){var i=e.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Ie(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,r,n,i){var o=pl(e,i);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):Ie(o,r.length)},I:function(e,r,n){var i=fl(e);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Ie(i,r.length)},d:function(e,r,n){return r==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):oi.d(e,r)},D:function(e,r,n){var i=ch(e);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ie(i,r.length)},E:function(e,r,n){var i=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,r,n,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,n,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return Ie(s,r.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,n){var i=e.getUTCDay(),o=i===0?7:i;switch(r){case"i":return String(o);case"ii":return Ie(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,r,n){var i=e.getUTCHours(),o=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,n){var i=e.getUTCHours(),o;switch(i===12?o=_a.noon:i===0?o=_a.midnight:o=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,n){var i=e.getUTCHours(),o;switch(i>=17?o=_a.evening:i>=12?o=_a.afternoon:i>=4?o=_a.morning:o=_a.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,n){if(r==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return oi.h(e,r)},H:function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):oi.H(e,r)},K:function(e,r,n){var i=e.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ie(i,r.length)},k:function(e,r,n){var i=e.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ie(i,r.length)},m:function(e,r,n){return r==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):oi.m(e,r)},s:function(e,r,n){return r==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):oi.s(e,r)},S:function(e,r){return oi.S(e,r)},X:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();if(s===0)return"Z";switch(r){case"X":return Fy(s);case"XXXX":case"XX":return Wo(s);case"XXXXX":case"XXX":default:return Wo(s,":")}},x:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(r){case"x":return Fy(s);case"xxxx":case"xx":return Wo(s);case"xxxxx":case"xxx":default:return Wo(s,":")}},O:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Ay(s,":");case"OOOO":default:return"GMT"+Wo(s,":")}},z:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Ay(s,":");case"zzzz":default:return"GMT"+Wo(s,":")}},t:function(e,r,n,i){var o=i._originalDate||e,s=Math.floor(o.getTime()/1e3);return Ie(s,r.length)},T:function(e,r,n,i){var o=i._originalDate||e,s=o.getTime();return Ie(s,r.length)}};function Ay(t,e){var r=t>0?"-":"+",n=Math.abs(t),i=Math.floor(n/60),o=n%60;if(o===0)return r+String(i);var s=e||"";return r+String(i)+s+Ie(o,2)}function Fy(t,e){if(t%60===0){var r=t>0?"-":"+";return r+Ie(Math.abs(t)/60,2)}return Wo(t,e)}function Wo(t,e){var r=e||"",n=t>0?"-":"+",i=Math.abs(t),o=Ie(Math.floor(i/60),2),s=Ie(i%60,2);return n+o+r+s}var Ny=uA;var Ry=function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Ly=function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},dA=function(e,r){var n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return Ry(e,r);var s;switch(i){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",Ry(i,r)).replace("{{time}}",Ly(o,r))},hA={p:Ly,P:dA},ml=hA;var fA=["D","DD"],pA=["YY","YYYY"];function U2(t){return fA.indexOf(t)!==-1}function $2(t){return pA.indexOf(t)!==-1}function Ca(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var mA={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},gA=function(e,r,n){var i,o=mA[e];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},Hy=gA;function gl(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,n=t.formats[r]||t.formats[t.defaultWidth];return n}}var vA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bA={date:gl({formats:vA,defaultWidth:"full"}),time:gl({formats:yA,defaultWidth:"full"}),dateTime:gl({formats:wA,defaultWidth:"full"})},Vy=bA;var _A={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},CA=function(e,r,n,i){return _A[e]},Yy=CA;function Go(t){return function(e,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=r!=null&&r.width?String(r.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var a=t.defaultWidth,c=r!=null&&r.width?String(r.width):t.defaultWidth;i=t.values[c]||t.values[a]}var l=t.argumentCallback?t.argumentCallback(e):e;return i[l]}}var MA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xA={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},SA={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},TA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},EA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zA=function(e,r){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},IA={ordinalNumber:zA,era:Go({values:MA,defaultWidth:"wide"}),quarter:Go({values:DA,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Go({values:xA,defaultWidth:"wide"}),day:Go({values:SA,defaultWidth:"wide"}),dayPeriod:Go({values:TA,defaultWidth:"wide",formattingValues:EA,defaultFormattingWidth:"wide"})},jy=IA;function Ko(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var s=o[0],a=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(a)?PA(a,function(d){return d.test(s)}):kA(a,function(d){return d.test(s)}),l;l=t.valueCallback?t.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;var u=e.slice(s.length);return{value:l,rest:u}}}function kA(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function PA(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var i=n[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=r.valueCallback?r.valueCallback(s):s;var a=e.slice(i.length);return{value:s,rest:a}}}var OA=/^(\d+)(th|st|nd|rd)?/i,AA=/\d+/i,FA={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},NA={any:[/^b/i,/^(a|c)/i]},RA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},LA={any:[/1/i,/2/i,/3/i,/4/i]},HA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},VA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YA={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jA={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},BA={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},UA={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$A={ordinalNumber:dh({matchPattern:OA,parsePattern:AA,valueCallback:function(e){return parseInt(e,10)}}),era:Ko({matchPatterns:FA,defaultMatchWidth:"wide",parsePatterns:NA,defaultParseWidth:"any"}),quarter:Ko({matchPatterns:RA,defaultMatchWidth:"wide",parsePatterns:LA,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Ko({matchPatterns:HA,defaultMatchWidth:"wide",parsePatterns:VA,defaultParseWidth:"any"}),day:Ko({matchPatterns:YA,defaultMatchWidth:"wide",parsePatterns:jA,defaultParseWidth:"any"}),dayPeriod:Ko({matchPatterns:BA,defaultMatchWidth:"any",parsePatterns:UA,defaultParseWidth:"any"})},By=$A;var qA={code:"en-US",formatDistance:Hy,formatLong:Vy,formatRelative:Yy,localize:jy,match:By,options:{weekStartsOn:0,firstWeekContainsDate:1}},Uy=qA;var Ma=Uy;var WA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KA=/^'([^]*?)'?$/,ZA=/''/g,QA=/[a-zA-Z]/;function Zo(t,e,r){var n,i,o,s,a,c,l,u,d,h,f,p,y,v,M,P,X,$;_(2,arguments);var Ae=String(e),_e=Et(),Ee=(n=(i=r?.locale)!==null&&i!==void 0?i:_e.locale)!==null&&n!==void 0?n:Ma,$e=de((o=(s=(a=(c=r?.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(l=r.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:_e.firstWeekContainsDate)!==null&&s!==void 0?s:(d=_e.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!($e>=1&&$e<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Mt=de((f=(p=(y=(v=r?.weekStartsOn)!==null&&v!==void 0?v:r==null||(M=r.locale)===null||M===void 0||(P=M.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&y!==void 0?y:_e.weekStartsOn)!==null&&p!==void 0?p:(X=_e.locale)===null||X===void 0||($=X.options)===null||$===void 0?void 0:$.weekStartsOn)!==null&&f!==void 0?f:0);if(!(Mt>=0&&Mt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Ee.localize)throw new RangeError("locale must contain localize property");if(!Ee.formatLong)throw new RangeError("locale must contain formatLong property");var Bt=T(t);if(!ga(Bt))throw new RangeError("Invalid time value");var di=cr(Bt),ln=dl(Bt,di),Rr={firstWeekContainsDate:$e,weekStartsOn:Mt,locale:Ee,_originalDate:Bt},os=Ae.match(GA).map(function(pt){var O=pt[0];if(O==="p"||O==="P"){var B=ml[O];return B(pt,Ee.formatLong)}return pt}).join("").match(WA).map(function(pt){if(pt==="''")return"'";var O=pt[0];if(O==="'")return XA(pt);var B=Ny[O];if(B)return!(r!=null&&r.useAdditionalWeekYearTokens)&&$2(pt)&&Ca(pt,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&U2(pt)&&Ca(pt,e,String(t)),B(ln,pt,Ee.localize,Rr);if(O.match(QA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return pt}).join("");return os}function XA(t){var e=t.match(KA);return e?e[1].replace(ZA,"'"):t}function Qo(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function hh(t){return Qo({},t)}var $y=1440,JA=2520,fh=43200,eF=86400;function ph(t,e,r){var n,i;_(2,arguments);var o=Et(),s=(n=(i=r?.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:Ma;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=Yo(t,e);if(isNaN(a))throw new RangeError("Invalid time value");var c=Qo(hh(r),{addSuffix:!!r?.addSuffix,comparison:a}),l,u;a>0?(l=T(e),u=T(t)):(l=T(t),u=T(e));var d=ba(u,l),h=(cr(u)-cr(l))/1e3,f=Math.round((d-h)/60),p;if(f<2)return r!=null&&r.includeSeconds?d<5?s.formatDistance("lessThanXSeconds",5,c):d<10?s.formatDistance("lessThanXSeconds",10,c):d<20?s.formatDistance("lessThanXSeconds",20,c):d<40?s.formatDistance("halfAMinute",0,c):d<60?s.formatDistance("lessThanXMinutes",1,c):s.formatDistance("xMinutes",1,c):f===0?s.formatDistance("lessThanXMinutes",1,c):s.formatDistance("xMinutes",f,c);if(f<45)return s.formatDistance("xMinutes",f,c);if(f<90)return s.formatDistance("aboutXHours",1,c);if(f<$y){var y=Math.round(f/60);return s.formatDistance("aboutXHours",y,c)}else{if(ft.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}function x(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vl(t,e){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vl(t,e)}function R(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e)}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Da(t)}function vh(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yh(t,e){if(e&&(jt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(t)}function L(t){var e=vh();return function(){var n=Da(t),i;if(e){var o=Da(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yh(this,i)}}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wh(t,e){if(jt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(jt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yl(t){var e=wh(t,"string");return jt(e)=="symbol"?e:String(e)}function qy(t,e){for(var r=0;r0,n=r?e:1-e,i;if(n<=50)i=t||100;else{var o=n+50,s=Math.floor(o/100)*100,a=t>=o%100;i=t+s-(a?100:0)}return r?i:1-i}function J2(t){return t%400===0||t%4===0&&t%100!==0}var Qy=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var c=X2(s.year,a);return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}var l=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var Xy=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var c=qo(i,a);if(s.isTwoDigitYear){var l=X2(s.year,c);return i.setUTCFullYear(l,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Sn(i,a)}var u=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(u,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Sn(i,a)}}]),r}(j);var Jy=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var nw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var rw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var iw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);function bh(t,e,r){_(2,arguments);var n=T(t),i=de(e),o=pl(n,r)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}var ow=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return Sn(bh(i,s,a),a)}}]),r}(j);function _h(t,e){_(2,arguments);var r=T(t),n=de(e),i=fl(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}var sw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return Vn(_h(i,s))}}]),r}(j);var rF=[31,28,31,30,31,30,31,31,30,31,30,31],iF=[31,29,31,30,31,30,31,31,30,31,30,31],aw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=iF[c]:o>=1&&o<=rF[c]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),r}(j);var cw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),r}(j);function Xo(t,e,r){var n,i,o,s,a,c,l,u;_(2,arguments);var d=Et(),h=de((n=(i=(o=(s=r?.weekStartsOn)!==null&&s!==void 0?s:r==null||(a=r.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=T(t),p=de(e),y=f.getUTCDay(),v=p%7,M=(v+7)%7,P=(M=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Xo(i,s,a),i.setUTCHours(0,0,0,0),i}}]),r}(j);var uw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Xo(i,s,a),i.setUTCHours(0,0,0,0),i}}]),r}(j);var dw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Xo(i,s,a),i.setUTCHours(0,0,0,0),i}}]),r}(j);function Ch(t,e){_(2,arguments);var r=de(e);r%7===0&&(r=r-7);var n=1,i=T(t),o=i.getUTCDay(),s=r%7,a=(s+7)%7,c=(a=1&&o<=7}},{key:"set",value:function(i,o,s){return i=Ch(i,s),i.setUTCHours(0,0,0,0),i}}]),r}(j);var fw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),r}(j);var vw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),r}(j);var yw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),r}(j);var ww=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),r}(j);var bw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),r}(j);var _w=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),r}(j);var Cw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&Bt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var di=de((p=(y=(v=(M=n?.weekStartsOn)!==null&&M!==void 0?M:n==null||(P=n.locale)===null||P===void 0||(X=P.options)===null||X===void 0?void 0:X.weekStartsOn)!==null&&v!==void 0?v:$e.weekStartsOn)!==null&&y!==void 0?y:($=$e.locale)===null||$===void 0||(Ae=$.options)===null||Ae===void 0?void 0:Ae.weekStartsOn)!==null&&p!==void 0?p:0);if(!(di>=0&&di<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(Ee==="")return _e===""?T(r):new Date(NaN);var ln={firstWeekContainsDate:Bt,weekStartsOn:di,locale:Mt},Rr=[new Ky],os=Ee.match(sF).map(function(qe){var we=qe[0];if(we in ml){var zt=ml[we];return zt(qe,Mt.formatLong)}return qe}).join("").match(oF),pt=[],O=Z2(os),B;try{var J=function(){var we=B.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&$2(we)&&Ca(we,Ee,t),!(n!=null&&n.useAdditionalDayOfYearTokens)&&U2(we)&&Ca(we,Ee,t);var zt=we[0],hi=Tw[zt];if(hi){var vf=hi.incompatibleTokens;if(Array.isArray(vf)){var yf=pt.find(function(wf){return vf.includes(wf.token)||wf.token===zt});if(yf)throw new RangeError("The format string mustn't contain `".concat(yf.fullToken,"` and `").concat(we,"` at the same time"))}else if(hi.incompatibleTokens==="*"&&pt.length>0)throw new RangeError("The format string mustn't contain `".concat(we,"` and any other token at the same time"));pt.push({token:zt,fullToken:we});var F3=hi.run(_e,we,Mt.match,ln);if(!F3)return{v:new Date(NaN)};Rr.push(F3.setter),_e=F3.rest}else{if(zt.match(uF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+zt+"`");if(we==="''"?we="'":zt==="'"&&(we=dF(we)),_e.indexOf(we)===0)_e=_e.slice(we.length);else return{v:new Date(NaN)}}};for(O.s();!(B=O.n()).done;){var Ce=J();if(jt(Ce)==="object")return Ce.v}}catch(qe){O.e(qe)}finally{O.f()}if(_e.length>0&&lF.test(_e))return new Date(NaN);var mt=Rr.map(function(qe){return qe.priority}).sort(function(qe,we){return we-qe}).filter(function(qe,we,zt){return zt.indexOf(qe)===we}).map(function(qe){return Rr.filter(function(we){return we.priority===qe}).sort(function(we,zt){return zt.subPriority-we.subPriority})}).map(function(qe){return qe[0]}),Zt=T(r);if(isNaN(Zt.getTime()))return new Date(NaN);var vt=dl(Zt,cr(Zt)),Un={},Ye=Z2(mt),Aa;try{for(Ye.s();!(Aa=Ye.n()).done;){var Tl=Aa.value;if(!Tl.validate(vt,ln))return new Date(NaN);var ht=Tl.set(vt,Un,ln);Array.isArray(ht)?(vt=ht[0],Qo(Un,ht[1])):vt=ht}}catch(qe){Ye.e(qe)}finally{Ye.f()}return vt}function dF(t){return t.match(aF)[1].replace(cF,"'")}function e3(t){_(1,arguments);var e=T(t);return e.setMinutes(0,0,0),e}function t3(t,e){_(2,arguments);var r=e3(t),n=e3(e);return r.getTime()===n.getTime()}function n3(t,e){_(2,arguments);var r=B2(t),n=B2(e);return r.getTime()===n.getTime()}function r3(t,e){_(2,arguments);var r=T(t),n=T(e);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function i3(t){_(1,arguments);var e=T(t);return e.setMilliseconds(0),e}function o3(t,e){_(2,arguments);var r=i3(t),n=i3(e);return r.getTime()===n.getTime()}function s3(t,e){_(2,arguments);var r=T(t),n=T(e);return r.getFullYear()===n.getFullYear()}function a3(t){return _(1,arguments),Uo(t,Date.now())}function l3(t,e){var r;_(1,arguments);var n=de((r=e?.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=mF(t),o;if(i.date){var s=gF(i.date,n);o=vF(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),c=0,l;if(i.time&&(c=yF(i.time),isNaN(c)))return new Date(NaN);if(i.timezone){if(l=wF(i.timezone),isNaN(l))return new Date(NaN)}else{var u=new Date(a+c),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(a+c+l)}var c3={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},hF=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,fF=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,pF=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mF(t){var e={},r=t.split(c3.dateTimeDelimiter),n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],c3.timeZoneDelimiter.test(e.date)&&(e.date=t.split(c3.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){var i=c3.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}function gF(t,e){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?i:o*100,restDateString:t.slice((n[1]||n[2]).length)}}function vF(t,e){if(e===null)return new Date(NaN);var r=t.match(hF);if(!r)return new Date(NaN);var n=!!r[4],i=wl(r[1]),o=wl(r[2])-1,s=wl(r[3]),a=wl(r[4]),c=wl(r[5])-1;if(n)return DF(e,a,c)?bF(e,a,c):new Date(NaN);var l=new Date(0);return!CF(e,o,s)||!MF(e,i)?new Date(NaN):(l.setUTCFullYear(e,o,Math.max(i,s)),l)}function wl(t){return t?parseInt(t):1}function yF(t){var e=t.match(fF);if(!e)return NaN;var r=Mh(e[1]),n=Mh(e[2]),i=Mh(e[3]);return xF(r,n,i)?r*Bo+n*jo+i*1e3:NaN}function Mh(t){return t&&parseFloat(t.replace(",","."))||0}function wF(t){if(t==="Z")return 0;var e=t.match(pF);if(!e)return 0;var r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return SF(n,i)?r*(n*Bo+i*jo):NaN}function bF(t,e,r){var n=new Date(0);n.setUTCFullYear(t,0,4);var i=n.getUTCDay()||7,o=(e-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+o),n}var _F=[31,null,31,30,31,30,31,31,30,31,30,31];function Ew(t){return t%400===0||t%4===0&&t%100!==0}function CF(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(_F[e]||(Ew(t)?29:28))}function MF(t,e){return e>=1&&e<=(Ew(t)?366:365)}function DF(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}function xF(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}function SF(t,e){return e>=0&&e<=59}function u3(t,e){_(2,arguments);var r=T(t),n=de(e),i=r.getFullYear(),o=r.getDate(),s=new Date(0);s.setFullYear(i,n,15),s.setHours(0,0,0,0);var a=mh(s);return r.setMonth(n,Math.min(o,a)),r}function d3(t,e,r){var n,i,o,s,a,c,l,u;_(2,arguments);var d=Et(),h=de((n=(i=(o=(s=r?.weekStartsOn)!==null&&s!==void 0?s:r==null||(a=r.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=T(t),p=de(e),y=f.getDay(),v=p%7,M=(v+7)%7,P=7-h,X=p<0||p>6?p-(y+P)%7:(M+P)%7-(y+P)%7;return pa(f,X)}function h3(t,e){_(2,arguments);var r=T(t),n=de(e);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function R3e(t){let[e,r]=t;return!!e&&!!r&&r.isBeforeDay(e)}function L3e(t,e,r="month",n="left"){let[i,o]=t,s=i||new bl,a=o||(e?s:s.add(1,r));return i&&!o?(s=i,a=e?i:i.add(1,r)):!i&&o?(s=e?o:o.add(-1,r),a=o):i&&o&&!e&&(i.isSame(o,r)||n==="left"?a=s.add(1,r):s=a.add(-1,r)),[s,a]}function H3e(t){return Array.isArray(t)?t.map(e=>e instanceof bl?e.clone():null):t instanceof bl?t.clone():null}var bl=class t{constructor(e){if(e)if(e instanceof Date)this.nativeDate=e;else if(typeof e=="string"||typeof e=="number")Cn('The string type is not recommended for date-picker, use "Date" type'),this.nativeDate=new Date(e);else throw new Error('The input date type is not supported ("Date" is now recommended)');else this.nativeDate=new Date}calendarStart(e){return new t(Ho(ul(this.nativeDate),e))}getYear(){return this.nativeDate.getFullYear()}getMonth(){return this.nativeDate.getMonth()}getDay(){return this.nativeDate.getDay()}getTime(){return this.nativeDate.getTime()}getDate(){return this.nativeDate.getDate()}getHours(){return this.nativeDate.getHours()}getMinutes(){return this.nativeDate.getMinutes()}getSeconds(){return this.nativeDate.getSeconds()}getMilliseconds(){return this.nativeDate.getMilliseconds()}clone(){return new t(new Date(this.nativeDate))}setHms(e,r,n){let i=new Date(this.nativeDate.setHours(e,r,n));return new t(i)}setYear(e){return new t(h3(this.nativeDate,e))}addYears(e){return new t(R2(this.nativeDate,e))}setMonth(e){return new t(u3(this.nativeDate,e))}addMonths(e){return new t(ma(this.nativeDate,e))}setDay(e,r){return new t(d3(this.nativeDate,e,r))}setDate(e){let r=new Date(this.nativeDate);return r.setDate(e),new t(r)}addDays(e){return this.setDate(this.getDate()+e)}add(e,r){switch(r){case"decade":return this.addYears(e*10);case"year":return this.addYears(e);case"month":return this.addMonths(e);default:return this.addMonths(e)}}isSame(e,r="day"){let n;switch(r){case"decade":n=(i,o)=>Math.abs(i.getFullYear()-o.getFullYear())<11;break;case"year":n=s3;break;case"month":n=r3;break;case"day":n=Uo;break;case"hour":n=t3;break;case"minute":n=n3;break;case"second":n=o3;break;default:n=Uo;break}return n(this.nativeDate,this.toNativeDate(e))}isSameYear(e){return this.isSame(e,"year")}isSameMonth(e){return this.isSame(e,"month")}isSameDay(e){return this.isSame(e,"day")}isSameHour(e){return this.isSame(e,"hour")}isSameMinute(e){return this.isSame(e,"minute")}isSameSecond(e){return this.isSame(e,"second")}isBefore(e,r="day"){if(e===null)return!1;let n;switch(r){case"year":n=L2;break;case"month":n=va;break;case"day":n=Vo;break;case"hour":n=H2;break;case"minute":n=V2;break;case"second":n=ba;break;default:n=Vo;break}return n(this.nativeDate,this.toNativeDate(e))<0}isBeforeYear(e){return this.isBefore(e,"year")}isBeforeMonth(e){return this.isBefore(e,"month")}isBeforeDay(e){return this.isBefore(e,"day")}isToday(){return a3(this.nativeDate)}isValid(){return ga(this.nativeDate)}isFirstDayOfMonth(){return G2(this.nativeDate)}isLastDayOfMonth(){return wa(this.nativeDate)}toNativeDate(e){return e instanceof t?e.nativeDate:e}},V3e=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],f3=class{constructor(e,r){this.format=e,this.localeId=r,this.regex=null,this.matchMap={hour:null,minute:null,second:null,periodNarrow:null,periodWide:null,periodAbbreviated:null},this.genRegexp()}toDate(e){let r=this.getTimeResult(e),n=new Date;return Mn(r?.hour)&&n.setHours(r.hour),Mn(r?.minute)&&n.setMinutes(r.minute),Mn(r?.second)&&n.setSeconds(r.second),r?.period===1&&n.getHours()<12&&n.setHours(n.getHours()+12),n}getTimeResult(e){let r=this.regex.exec(e),n=null;return r?(Mn(this.matchMap.periodNarrow)&&(n=Pi(this.localeId,dt.Format,xe.Narrow).indexOf(r[this.matchMap.periodNarrow+1])),Mn(this.matchMap.periodWide)&&(n=Pi(this.localeId,dt.Format,xe.Wide).indexOf(r[this.matchMap.periodWide+1])),Mn(this.matchMap.periodAbbreviated)&&(n=Pi(this.localeId,dt.Format,xe.Abbreviated).indexOf(r[this.matchMap.periodAbbreviated+1])),{hour:Mn(this.matchMap.hour)?Number.parseInt(r[this.matchMap.hour+1],10):null,minute:Mn(this.matchMap.minute)?Number.parseInt(r[this.matchMap.minute+1],10):null,second:Mn(this.matchMap.second)?Number.parseInt(r[this.matchMap.second+1],10):null,period:n}):null}genRegexp(){let e=this.format.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$&"),r=/h{1,2}/i,n=/m{1,2}/,i=/s{1,2}/,o=/aaaaa/,s=/aaaa/,a=/a{1,3}/,c=r.exec(this.format),l=n.exec(this.format),u=i.exec(this.format),d=o.exec(this.format),h=null,f=null;d||(h=s.exec(this.format)),!h&&!d&&(f=a.exec(this.format)),[c,l,u,d,h,f].filter(y=>!!y).sort((y,v)=>y.index-v.index).forEach((y,v)=>{switch(y){case c:this.matchMap.hour=v,e=e.replace(r,"(\\d{1,2})");break;case l:this.matchMap.minute=v,e=e.replace(n,"(\\d{1,2})");break;case u:this.matchMap.second=v,e=e.replace(i,"(\\d{1,2})");break;case d:this.matchMap.periodNarrow=v;let M=Pi(this.localeId,dt.Format,xe.Narrow).join("|");e=e.replace(o,`(${M})`);break;case h:this.matchMap.periodWide=v;let P=Pi(this.localeId,dt.Format,xe.Wide).join("|");e=e.replace(s,`(${P})`);break;case f:this.matchMap.periodAbbreviated=v;let X=Pi(this.localeId,dt.Format,xe.Abbreviated).join("|");e=e.replace(a,`(${X})`);break}}),this.regex=new RegExp(e)}};var TF={locale:"en",Pagination:{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},DatePicker:{lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},timePickerLocale:{placeholder:"Select time",rangePlaceholder:["Start time","End time"]}},TimePicker:{placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Calendar:{lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},timePickerLocale:{placeholder:"Select time",rangePlaceholder:["Start time","End time"]}},global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",selectNone:"Clear all data"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Image:{preview:"Preview"},CronExpression:{cronError:"Invalid cron expression",second:"second",minute:"minute",hour:"hour",day:"day",month:"month",week:"week"},QRCode:{expired:"QR code expired",refresh:"Refresh"}},EF={locale:"zh-cn",Pagination:{items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},DatePicker:{lang:{placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"],locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708 (\u7FFB\u9875\u4E0A\u952E)",nextMonth:"\u4E0B\u4E2A\u6708 (\u7FFB\u9875\u4E0B\u952E)",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",yearFormat:"YYYY\u5E74",dayFormat:"D\u65E5",dateFormat:"YYYY\u5E74M\u6708D\u65E5",dateTimeFormat:"YYYY\u5E74M\u6708D\u65E5 HH\u65F6mm\u5206ss\u79D2",previousYear:"\u4E0A\u4E00\u5E74 (Control\u952E\u52A0\u5DE6\u65B9\u5411\u952E)",nextYear:"\u4E0B\u4E00\u5E74 (Control\u952E\u52A0\u53F3\u65B9\u5411\u952E)",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA"},timePickerLocale:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]}},TimePicker:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]},Calendar:{lang:{placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"],locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708 (\u7FFB\u9875\u4E0A\u952E)",nextMonth:"\u4E0B\u4E2A\u6708 (\u7FFB\u9875\u4E0B\u952E)",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",yearFormat:"YYYY\u5E74",dayFormat:"D\u65E5",dateFormat:"YYYY\u5E74M\u6708D\u65E5",dateTimeFormat:"YYYY\u5E74M\u6708D\u65E5 HH\u65F6mm\u5206ss\u79D2",previousYear:"\u4E0A\u4E00\u5E74 (Control\u952E\u52A0\u5DE6\u65B9\u5411\u952E)",nextYear:"\u4E0B\u4E00\u5E74 (Control\u952E\u52A0\u53F3\u65B9\u5411\u952E)",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA"},timePickerLocale:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]}},global:{placeholder:"\u8BF7\u9009\u62E9"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F",filterCheckall:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",selectNone:"\u6E05\u7A7A\u6240\u6709"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00"},PageHeader:{back:"\u8FD4\u56DE"},Image:{preview:"\u9884\u89C8"},CronExpression:{cronError:"cron \u8868\u8FBE\u5F0F\u4E0D\u5408\u6CD5",second:"\u79D2",minute:"\u5206\u949F",hour:"\u5C0F\u65F6",day:"\u65E5",month:"\u6708",week:"\u5468"},QRCode:{expired:"\u4E8C\u7EF4\u7801\u8FC7\u671F",refresh:"\u70B9\u51FB\u5237\u65B0"}},zw=new E("nz-i18n");function Iw(t){return Wt([{provide:zw,useValue:t}])}var Sh=new E("nz-date-locale"),$i=(()=>{let e=class e{get localeChange(){return this._change.asObservable()}constructor(n,i){this._change=new Re(this._locale),this.setLocale(n||EF),this.setDateLocale(i||null)}translate(n,i){let o=this._getObjectPath(this._locale,n);return typeof o=="string"?(i&&Object.keys(i).forEach(s=>o=o.replace(new RegExp(`%${s}%`,"g"),i[s])),o):n}setLocale(n){this._locale&&this._locale.locale===n.locale||(this._locale=n,this._change.next(n))}getLocale(){return this._locale}getLocaleId(){return this._locale?this._locale.locale:""}setDateLocale(n){this.dateLocale=n}getDateLocale(){return this.dateLocale}getLocaleData(n,i){let o=n?this._getObjectPath(this._locale,n):this._locale;return!o&&!i&&Cn(`Missing translations for "${n}" in language "${this._locale.locale}". + }`,document.body.appendChild(this.styleForPseudo)),this.insertExtraNode&&(this.extraNode||(this.extraNode=document.createElement("div")),this.extraNode.className="ant-click-animating-node",e.appendChild(this.extraNode)),this.lastTime=Date.now(),this.runTimeoutOutsideZone(()=>{e.removeAttribute(this.waveAttributeName),this.removeStyleAndExtraNode()},this.waveTransitionDuration))}isValidColor(e){return!!e&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&this.isNotGrey(e)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(e)&&e!=="transparent"}isNotGrey(e){let r=e.match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return r&&r[1]&&r[2]&&r[3]?!(r[1]===r[2]&&r[2]===r[3]):!0}getWaveColor(e){let r=getComputedStyle(e);return r.getPropertyValue("border-top-color")||r.getPropertyValue("border-color")||r.getPropertyValue("background-color")}runTimeoutOutsideZone(e,r){this.ngZone.runOutsideAngular(()=>setTimeout(e,r))}},YO={disabled:!1},zy=new E("nz-wave-global-options");function jO(t){return Wt([{provide:zy,useValue:t}])}var nh=(()=>{let e=class e{get disabled(){return this.waveDisabled}get rendererRef(){return this.waveRenderer}constructor(n,i,o,s,a,c){this.ngZone=n,this.elementRef=i,this.config=o,this.animationType=s,this.platformId=a,this.cspNonce=c,this.nzWaveExtraNode=!1,this.waveDisabled=!1,this.waveDisabled=this.isConfigDisabled()}isConfigDisabled(){let n=!1;return this.config&&typeof this.config.disabled=="boolean"&&(n=this.config.disabled),this.animationType==="NoopAnimations"&&(n=!0),n}ngOnDestroy(){this.waveRenderer&&this.waveRenderer.destroy()}ngOnInit(){this.renderWaveIfEnabled()}renderWaveIfEnabled(){!this.waveDisabled&&this.elementRef.nativeElement&&(this.waveRenderer=new th(this.elementRef.nativeElement,this.ngZone,this.nzWaveExtraNode,this.platformId,this.cspNonce))}disable(){this.waveDisabled=!0,this.waveRenderer&&(this.waveRenderer.removeTriggerEvent(),this.waveRenderer.removeStyleAndExtraNode())}enable(){this.waveDisabled=this.isConfigDisabled()||!1,this.waveRenderer&&this.waveRenderer.bindTriggerEvent()}};e.\u0275fac=function(i){return new(i||e)(m(U),m(oe),m(zy,8),m(gn,8),m(Yt),m(qr,8))},e.\u0275dir=ne({type:e,selectors:[["","nz-wave",""],["button","nz-button","",3,"nzType","link",3,"nzType","text"]],inputs:{nzWaveExtraNode:"nzWaveExtraNode"},exportAs:["nzWave"],standalone:!0});let t=e;return t})(),Iy=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[jO(YO)]});let t=e;return t})();var UO=new E("cdk-dir-doc",{providedIn:"root",factory:$O});function $O(){return w(V)}var qO=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function WO(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?qO.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var Ft=(()=>{let e=class e{constructor(n){if(this.value="ltr",this.change=new re,n){let i=n.body?n.body.dir:null,o=n.documentElement?n.documentElement.dir:null;this.value=WO(i||o||"ltr")}}ngOnDestroy(){this.change.complete()}};e.\u0275fac=function(i){return new(i||e)(g(UO,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Ro=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var GO=["nz-button",""];function KO(t,e){t&1&&et(0,"span",1)}var ZO=["*"],ky="button",F2=(()=>{let e=class e{insertSpan(n,i){n.forEach(o=>{if(o.nodeName==="#text"){let s=i.createElement("span"),a=i.parentNode(o);i.insertBefore(a,s,o),i.appendChild(s,o)}})}get iconOnly(){let n=Array.from(this.elementRef?.nativeElement?.childNodes||[]),i=n.every(a=>a.nodeName!=="#text"),o=n.filter(a=>!(a.nodeName==="#comment"||a?.attributes?.getNamedItem("nz-icon"))).length==0;return!!this.nzIconDirectiveElement&&o&&i}constructor(n,i,o,s,a,c){this.ngZone=n,this.elementRef=i,this.cdr=o,this.renderer=s,this.nzConfigService=a,this.directionality=c,this._nzModuleName=ky,this.nzBlock=!1,this.nzGhost=!1,this.nzSearch=!1,this.nzLoading=!1,this.nzDanger=!1,this.disabled=!1,this.tabIndex=null,this.nzType=null,this.nzShape=null,this.nzSize="default",this.dir="ltr",this.destroy$=new S,this.loading$=new S,this.nzConfigService.getConfigChangeEventForComponent(ky).pipe(ce(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.directionality.change?.pipe(ce(this.destroy$)).subscribe(n=>{this.dir=n,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{Kn(this.elementRef.nativeElement,"click",{capture:!0}).pipe(ce(this.destroy$)).subscribe(n=>{(this.disabled&&n.target?.tagName==="A"||this.nzLoading)&&(n.preventDefault(),n.stopImmediatePropagation())})})}ngOnChanges(n){let{nzLoading:i}=n;i&&this.loading$.next(this.nzLoading)}ngAfterViewInit(){this.insertSpan(this.elementRef.nativeElement.childNodes,this.renderer)}ngAfterContentInit(){this.loading$.pipe(Rt(this.nzLoading),ge(()=>!!this.nzIconDirectiveElement),ce(this.destroy$)).subscribe(n=>{let i=this.nzIconDirectiveElement.nativeElement;n?this.renderer.setStyle(i,"display","none"):this.renderer.removeStyle(i,"display")})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(m(U),m(oe),m(ft),m(st),m(Rn),m(Ft,8))},e.\u0275cmp=bt({type:e,selectors:[["button","nz-button",""],["a","nz-button",""]],contentQueries:function(i,o,s){if(i&1&&wn(s,ii,5,oe),i&2){let a;ct(a=lt())&&(o.nzIconDirectiveElement=a.first)}},hostAttrs:[1,"ant-btn"],hostVars:32,hostBindings:function(i,o){i&2&&(kn("tabindex",o.disabled?-1:o.tabIndex===null?null:o.tabIndex)("disabled",o.disabled||null),St("ant-btn-primary",o.nzType==="primary")("ant-btn-dashed",o.nzType==="dashed")("ant-btn-link",o.nzType==="link")("ant-btn-text",o.nzType==="text")("ant-btn-circle",o.nzShape==="circle")("ant-btn-round",o.nzShape==="round")("ant-btn-lg",o.nzSize==="large")("ant-btn-sm",o.nzSize==="small")("ant-btn-dangerous",o.nzDanger)("ant-btn-loading",o.nzLoading)("ant-btn-background-ghost",o.nzGhost)("ant-btn-block",o.nzBlock)("ant-input-search-button",o.nzSearch)("ant-btn-rtl",o.dir==="rtl")("ant-btn-icon-only",o.iconOnly))},inputs:{nzBlock:"nzBlock",nzGhost:"nzGhost",nzSearch:"nzSearch",nzLoading:"nzLoading",nzDanger:"nzDanger",disabled:"disabled",tabIndex:"tabIndex",nzType:"nzType",nzShape:"nzShape",nzSize:"nzSize"},exportAs:["nzButton"],standalone:!0,features:[He,_t],attrs:GO,ngContentSelectors:ZO,decls:2,vars:1,consts:[["nz-icon","","nzType","loading",4,"ngIf"],["nz-icon","","nzType","loading"]],template:function(i,o){i&1&&(yo(),Q(0,KO,1,0,"span",0),wo(1)),i&2&&I("ngIf",o.nzLoading)},dependencies:[No,ii,nr],encapsulation:2,changeDetection:0});let t=e;return je([Je()],t.prototype,"nzBlock",void 0),je([Je()],t.prototype,"nzGhost",void 0),je([Je()],t.prototype,"nzSearch",void 0),je([Je()],t.prototype,"nzLoading",void 0),je([Je()],t.prototype,"nzDanger",void 0),je([Je()],t.prototype,"disabled",void 0),je([Ln()],t.prototype,"nzSize",void 0),t})();var rh=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[F2,Ey,Iy]});let t=e;return t})();function jt(t){"@babel/helpers - typeof";return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(t)}function de(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function _(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function T(t){_(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||jt(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function pa(t,e){_(2,arguments);var r=T(t),n=de(e);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function ma(t,e){_(2,arguments);var r=T(t),n=de(e);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),o=new Date(r.getTime());o.setMonth(r.getMonth()+n+1,0);var s=o.getDate();return i>=s?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function ul(t,e){_(2,arguments);var r=T(t).getTime(),n=de(e);return new Date(r+n)}var XO={};function Et(){return XO}function Ho(t,e){var r,n,i,o,s,a,c,l;_(1,arguments);var u=Et(),d=de((r=(n=(i=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=T(t),f=h.getDay(),p=(f=i.getTime()?r+1:e.getTime()>=s.getTime()?r:r-1}function oh(t){_(1,arguments);var e=ih(t),r=new Date(0);r.setFullYear(e,0,4),r.setHours(0,0,0,0);var n=Bi(r);return n}function cr(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function Ui(t){_(1,arguments);var e=T(t);return e.setHours(0,0,0,0),e}var JO=864e5;function Vo(t,e){_(2,arguments);var r=Ui(t),n=Ui(e),i=r.getTime()-cr(r),o=n.getTime()-cr(n);return Math.round((i-o)/JO)}function N2(t,e){_(2,arguments);var r=de(e);return ul(t,r*1e3)}function R2(t,e){_(2,arguments);var r=de(e);return ma(t,r*12)}function Yo(t,e){_(2,arguments);var r=T(t),n=T(e),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}var eA=365.2425,tA=Math.pow(10,8)*24*60*60*1e3,jo=6e4,Bo=36e5,Py=1e3,gte=-tA;var nA=3600;var Oy=nA*24,vte=Oy*7,rA=Oy*eA,iA=rA/12,yte=iA*3;function Uo(t,e){_(2,arguments);var r=Ui(t),n=Ui(e);return r.getTime()===n.getTime()}function sh(t){return _(1,arguments),t instanceof Date||jt(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function ga(t){if(_(1,arguments),!sh(t)&&typeof t!="number")return!1;var e=T(t);return!isNaN(Number(e))}function va(t,e){_(2,arguments);var r=T(t),n=T(e),i=r.getFullYear()-n.getFullYear(),o=r.getMonth()-n.getMonth();return i*12+o}function L2(t,e){_(2,arguments);var r=T(t),n=T(e);return r.getFullYear()-n.getFullYear()}function $o(t,e){return _(2,arguments),T(t).getTime()-T(e).getTime()}var Ay={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},oA="trunc";function ya(t){return t?Ay[t]:Ay[oA]}function H2(t,e,r){_(2,arguments);var n=$o(t,e)/Bo;return ya(r?.roundingMethod)(n)}function V2(t,e,r){_(2,arguments);var n=$o(t,e)/jo;return ya(r?.roundingMethod)(n)}function Y2(t){_(1,arguments);var e=T(t);return e.setHours(23,59,59,999),e}function j2(t){_(1,arguments);var e=T(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function wa(t){_(1,arguments);var e=T(t);return Y2(e).getTime()===j2(e).getTime()}function ah(t,e){_(2,arguments);var r=T(t),n=T(e),i=Yo(r,n),o=Math.abs(va(r,n)),s;if(o<1)s=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);var a=Yo(r,n)===-i;wa(T(t))&&o===1&&Yo(t,n)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function ba(t,e,r){_(2,arguments);var n=$o(t,e)/1e3;return ya(r?.roundingMethod)(n)}function B2(t){_(1,arguments);var e=T(t);return e.setSeconds(0,0),e}function dl(t){_(1,arguments);var e=T(t);return e.setDate(1),e.setHours(0,0,0,0),e}function hl(t,e){_(2,arguments);var r=de(e);return ul(t,-r)}var sA=864e5;function ch(t){_(1,arguments);var e=T(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),i=r-n;return Math.floor(i/sA)+1}function Vn(t){_(1,arguments);var e=1,r=T(t),n=r.getUTCDay(),i=(n=i.getTime()?r+1:e.getTime()>=s.getTime()?r:r-1}function lh(t){_(1,arguments);var e=fl(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var n=Vn(r);return n}var aA=6048e5;function pl(t){_(1,arguments);var e=T(t),r=Vn(e).getTime()-lh(e).getTime();return Math.round(r/aA)+1}function Sn(t,e){var r,n,i,o,s,a,c,l;_(1,arguments);var u=Et(),d=de((r=(n=(i=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=T(t),f=h.getUTCDay(),p=(f=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var y=Sn(p,e),v=new Date(0);v.setUTCFullYear(d,0,f),v.setUTCHours(0,0,0,0);var M=Sn(v,e);return u.getTime()>=y.getTime()?d+1:u.getTime()>=M.getTime()?d:d-1}function uh(t,e){var r,n,i,o,s,a,c,l;_(1,arguments);var u=Et(),d=de((r=(n=(i=(o=e?.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(s=e.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=qo(t,e),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=Sn(f,e);return p}var cA=6048e5;function ml(t,e){_(1,arguments);var r=T(t),n=Sn(r,e).getTime()-uh(r,e).getTime();return Math.round(n/cA)+1}function Ie(t,e){for(var r=t<0?"-":"",n=Math.abs(t).toString();n.length0?n:1-n;return Ie(r==="yy"?i%100:i,r.length)},M:function(e,r){var n=e.getUTCMonth();return r==="M"?String(n+1):Ie(n+1,2)},d:function(e,r){return Ie(e.getUTCDate(),r.length)},a:function(e,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,r){return Ie(e.getUTCHours()%12||12,r.length)},H:function(e,r){return Ie(e.getUTCHours(),r.length)},m:function(e,r){return Ie(e.getUTCMinutes(),r.length)},s:function(e,r){return Ie(e.getUTCSeconds(),r.length)},S:function(e,r){var n=r.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Ie(o,r.length)}},oi=lA;var _a={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},uA={G:function(e,r,n){var i=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,r,n){if(r==="yo"){var i=e.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return oi.y(e,r)},Y:function(e,r,n,i){var o=qo(e,i),s=o>0?o:1-o;if(r==="YY"){var a=s%100;return Ie(a,2)}return r==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ie(s,r.length)},R:function(e,r){var n=fl(e);return Ie(n,r.length)},u:function(e,r){var n=e.getUTCFullYear();return Ie(n,r.length)},Q:function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Ie(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,r,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Ie(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,r,n){var i=e.getUTCMonth();switch(r){case"M":case"MM":return oi.M(e,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,r,n){var i=e.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Ie(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,r,n,i){var o=ml(e,i);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):Ie(o,r.length)},I:function(e,r,n){var i=pl(e);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Ie(i,r.length)},d:function(e,r,n){return r==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):oi.d(e,r)},D:function(e,r,n){var i=ch(e);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ie(i,r.length)},E:function(e,r,n){var i=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,r,n,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(s);case"ee":return Ie(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,n,i){var o=e.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(s);case"cc":return Ie(s,r.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,n){var i=e.getUTCDay(),o=i===0?7:i;switch(r){case"i":return String(o);case"ii":return Ie(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,r,n){var i=e.getUTCHours(),o=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,n){var i=e.getUTCHours(),o;switch(i===12?o=_a.noon:i===0?o=_a.midnight:o=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,n){var i=e.getUTCHours(),o;switch(i>=17?o=_a.evening:i>=12?o=_a.afternoon:i>=4?o=_a.morning:o=_a.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,n){if(r==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return oi.h(e,r)},H:function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):oi.H(e,r)},K:function(e,r,n){var i=e.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ie(i,r.length)},k:function(e,r,n){var i=e.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ie(i,r.length)},m:function(e,r,n){return r==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):oi.m(e,r)},s:function(e,r,n){return r==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):oi.s(e,r)},S:function(e,r){return oi.S(e,r)},X:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();if(s===0)return"Z";switch(r){case"X":return Ny(s);case"XXXX":case"XX":return Wo(s);case"XXXXX":case"XXX":default:return Wo(s,":")}},x:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(r){case"x":return Ny(s);case"xxxx":case"xx":return Wo(s);case"xxxxx":case"xxx":default:return Wo(s,":")}},O:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Fy(s,":");case"OOOO":default:return"GMT"+Wo(s,":")}},z:function(e,r,n,i){var o=i._originalDate||e,s=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Fy(s,":");case"zzzz":default:return"GMT"+Wo(s,":")}},t:function(e,r,n,i){var o=i._originalDate||e,s=Math.floor(o.getTime()/1e3);return Ie(s,r.length)},T:function(e,r,n,i){var o=i._originalDate||e,s=o.getTime();return Ie(s,r.length)}};function Fy(t,e){var r=t>0?"-":"+",n=Math.abs(t),i=Math.floor(n/60),o=n%60;if(o===0)return r+String(i);var s=e||"";return r+String(i)+s+Ie(o,2)}function Ny(t,e){if(t%60===0){var r=t>0?"-":"+";return r+Ie(Math.abs(t)/60,2)}return Wo(t,e)}function Wo(t,e){var r=e||"",n=t>0?"-":"+",i=Math.abs(t),o=Ie(Math.floor(i/60),2),s=Ie(i%60,2);return n+o+r+s}var Ry=uA;var Ly=function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Hy=function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},dA=function(e,r){var n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return Ly(e,r);var s;switch(i){case"P":s=r.dateTime({width:"short"});break;case"PP":s=r.dateTime({width:"medium"});break;case"PPP":s=r.dateTime({width:"long"});break;case"PPPP":default:s=r.dateTime({width:"full"});break}return s.replace("{{date}}",Ly(i,r)).replace("{{time}}",Hy(o,r))},hA={p:Hy,P:dA},gl=hA;var fA=["D","DD"],pA=["YY","YYYY"];function U2(t){return fA.indexOf(t)!==-1}function $2(t){return pA.indexOf(t)!==-1}function Ca(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var mA={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},gA=function(e,r,n){var i,o=mA[e];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},Vy=gA;function vl(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,n=t.formats[r]||t.formats[t.defaultWidth];return n}}var vA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bA={date:vl({formats:vA,defaultWidth:"full"}),time:vl({formats:yA,defaultWidth:"full"}),dateTime:vl({formats:wA,defaultWidth:"full"})},Yy=bA;var _A={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},CA=function(e,r,n,i){return _A[e]},jy=CA;function Go(t){return function(e,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=r!=null&&r.width?String(r.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var a=t.defaultWidth,c=r!=null&&r.width?String(r.width):t.defaultWidth;i=t.values[c]||t.values[a]}var l=t.argumentCallback?t.argumentCallback(e):e;return i[l]}}var MA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xA={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},SA={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},TA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},EA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zA=function(e,r){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},IA={ordinalNumber:zA,era:Go({values:MA,defaultWidth:"wide"}),quarter:Go({values:DA,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Go({values:xA,defaultWidth:"wide"}),day:Go({values:SA,defaultWidth:"wide"}),dayPeriod:Go({values:TA,defaultWidth:"wide",formattingValues:EA,defaultFormattingWidth:"wide"})},By=IA;function Ko(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var s=o[0],a=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(a)?PA(a,function(d){return d.test(s)}):kA(a,function(d){return d.test(s)}),l;l=t.valueCallback?t.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;var u=e.slice(s.length);return{value:l,rest:u}}}function kA(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function PA(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(t.matchPattern);if(!n)return null;var i=n[0],o=e.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=r.valueCallback?r.valueCallback(s):s;var a=e.slice(i.length);return{value:s,rest:a}}}var OA=/^(\d+)(th|st|nd|rd)?/i,AA=/\d+/i,FA={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},NA={any:[/^b/i,/^(a|c)/i]},RA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},LA={any:[/1/i,/2/i,/3/i,/4/i]},HA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},VA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},YA={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jA={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},BA={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},UA={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},$A={ordinalNumber:dh({matchPattern:OA,parsePattern:AA,valueCallback:function(e){return parseInt(e,10)}}),era:Ko({matchPatterns:FA,defaultMatchWidth:"wide",parsePatterns:NA,defaultParseWidth:"any"}),quarter:Ko({matchPatterns:RA,defaultMatchWidth:"wide",parsePatterns:LA,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Ko({matchPatterns:HA,defaultMatchWidth:"wide",parsePatterns:VA,defaultParseWidth:"any"}),day:Ko({matchPatterns:YA,defaultMatchWidth:"wide",parsePatterns:jA,defaultParseWidth:"any"}),dayPeriod:Ko({matchPatterns:BA,defaultMatchWidth:"any",parsePatterns:UA,defaultParseWidth:"any"})},Uy=$A;var qA={code:"en-US",formatDistance:Vy,formatLong:Yy,formatRelative:jy,localize:By,match:Uy,options:{weekStartsOn:0,firstWeekContainsDate:1}},$y=qA;var Ma=$y;var WA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KA=/^'([^]*?)'?$/,ZA=/''/g,QA=/[a-zA-Z]/;function Zo(t,e,r){var n,i,o,s,a,c,l,u,d,h,f,p,y,v,M,P,X,$;_(2,arguments);var Ae=String(e),_e=Et(),Ee=(n=(i=r?.locale)!==null&&i!==void 0?i:_e.locale)!==null&&n!==void 0?n:Ma,$e=de((o=(s=(a=(c=r?.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(l=r.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:_e.firstWeekContainsDate)!==null&&s!==void 0?s:(d=_e.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!($e>=1&&$e<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Mt=de((f=(p=(y=(v=r?.weekStartsOn)!==null&&v!==void 0?v:r==null||(M=r.locale)===null||M===void 0||(P=M.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&y!==void 0?y:_e.weekStartsOn)!==null&&p!==void 0?p:(X=_e.locale)===null||X===void 0||($=X.options)===null||$===void 0?void 0:$.weekStartsOn)!==null&&f!==void 0?f:0);if(!(Mt>=0&&Mt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Ee.localize)throw new RangeError("locale must contain localize property");if(!Ee.formatLong)throw new RangeError("locale must contain formatLong property");var Bt=T(t);if(!ga(Bt))throw new RangeError("Invalid time value");var di=cr(Bt),ln=hl(Bt,di),Rr={firstWeekContainsDate:$e,weekStartsOn:Mt,locale:Ee,_originalDate:Bt},os=Ae.match(GA).map(function(pt){var O=pt[0];if(O==="p"||O==="P"){var B=gl[O];return B(pt,Ee.formatLong)}return pt}).join("").match(WA).map(function(pt){if(pt==="''")return"'";var O=pt[0];if(O==="'")return XA(pt);var B=Ry[O];if(B)return!(r!=null&&r.useAdditionalWeekYearTokens)&&$2(pt)&&Ca(pt,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&U2(pt)&&Ca(pt,e,String(t)),B(ln,pt,Ee.localize,Rr);if(O.match(QA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return pt}).join("");return os}function XA(t){var e=t.match(KA);return e?e[1].replace(ZA,"'"):t}function Qo(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function hh(t){return Qo({},t)}var qy=1440,JA=2520,fh=43200,eF=86400;function ph(t,e,r){var n,i;_(2,arguments);var o=Et(),s=(n=(i=r?.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:Ma;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=Yo(t,e);if(isNaN(a))throw new RangeError("Invalid time value");var c=Qo(hh(r),{addSuffix:!!r?.addSuffix,comparison:a}),l,u;a>0?(l=T(e),u=T(t)):(l=T(t),u=T(e));var d=ba(u,l),h=(cr(u)-cr(l))/1e3,f=Math.round((d-h)/60),p;if(f<2)return r!=null&&r.includeSeconds?d<5?s.formatDistance("lessThanXSeconds",5,c):d<10?s.formatDistance("lessThanXSeconds",10,c):d<20?s.formatDistance("lessThanXSeconds",20,c):d<40?s.formatDistance("halfAMinute",0,c):d<60?s.formatDistance("lessThanXMinutes",1,c):s.formatDistance("xMinutes",1,c):f===0?s.formatDistance("lessThanXMinutes",1,c):s.formatDistance("xMinutes",f,c);if(f<45)return s.formatDistance("xMinutes",f,c);if(f<90)return s.formatDistance("aboutXHours",1,c);if(ft.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}function x(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yl(t,e){return yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yl(t,e)}function R(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yl(t,e)}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Da(t)}function vh(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yh(t,e){if(e&&(jt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(t)}function L(t){var e=vh();return function(){var n=Da(t),i;if(e){var o=Da(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return yh(this,i)}}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wh(t,e){if(jt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(jt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wl(t){var e=wh(t,"string");return jt(e)=="symbol"?e:String(e)}function Wy(t,e){for(var r=0;r0,n=r?e:1-e,i;if(n<=50)i=t||100;else{var o=n+50,s=Math.floor(o/100)*100,a=t>=o%100;i=t+s-(a?100:0)}return r?i:1-i}function J2(t){return t%400===0||t%4===0&&t%100!==0}var Xy=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var c=X2(s.year,a);return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}var l=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var Jy=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var c=qo(i,a);if(s.isTwoDigitYear){var l=X2(s.year,c);return i.setUTCFullYear(l,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Sn(i,a)}var u=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(u,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),Sn(i,a)}}]),r}(j);var ew=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var rw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var iw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);var ow=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),r}(j);function bh(t,e,r){_(2,arguments);var n=T(t),i=de(e),o=ml(n,r)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}var sw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return Sn(bh(i,s,a),a)}}]),r}(j);function _h(t,e){_(2,arguments);var r=T(t),n=de(e),i=pl(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}var aw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return Vn(_h(i,s))}}]),r}(j);var rF=[31,28,31,30,31,30,31,31,30,31,30,31],iF=[31,29,31,30,31,30,31,31,30,31,30,31],cw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=iF[c]:o>=1&&o<=rF[c]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),r}(j);var lw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),r}(j);function Xo(t,e,r){var n,i,o,s,a,c,l,u;_(2,arguments);var d=Et(),h=de((n=(i=(o=(s=r?.weekStartsOn)!==null&&s!==void 0?s:r==null||(a=r.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=T(t),p=de(e),y=f.getUTCDay(),v=p%7,M=(v+7)%7,P=(M=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Xo(i,s,a),i.setUTCHours(0,0,0,0),i}}]),r}(j);var dw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Xo(i,s,a),i.setUTCHours(0,0,0,0),i}}]),r}(j);var hw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=Xo(i,s,a),i.setUTCHours(0,0,0,0),i}}]),r}(j);function Ch(t,e){_(2,arguments);var r=de(e);r%7===0&&(r=r-7);var n=1,i=T(t),o=i.getUTCDay(),s=r%7,a=(s+7)%7,c=(a=1&&o<=7}},{key:"set",value:function(i,o,s){return i=Ch(i,s),i.setUTCHours(0,0,0,0),i}}]),r}(j);var pw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),r}(j);var yw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),r}(j);var ww=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),r}(j);var bw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),r}(j);var _w=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),r}(j);var Cw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),r}(j);var Mw=function(t){R(r,t);var e=L(r);function r(){var n;F(this,r);for(var i=arguments.length,o=new Array(i),s=0;s=1&&Bt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var di=de((p=(y=(v=(M=n?.weekStartsOn)!==null&&M!==void 0?M:n==null||(P=n.locale)===null||P===void 0||(X=P.options)===null||X===void 0?void 0:X.weekStartsOn)!==null&&v!==void 0?v:$e.weekStartsOn)!==null&&y!==void 0?y:($=$e.locale)===null||$===void 0||(Ae=$.options)===null||Ae===void 0?void 0:Ae.weekStartsOn)!==null&&p!==void 0?p:0);if(!(di>=0&&di<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(Ee==="")return _e===""?T(r):new Date(NaN);var ln={firstWeekContainsDate:Bt,weekStartsOn:di,locale:Mt},Rr=[new Zy],os=Ee.match(sF).map(function(qe){var we=qe[0];if(we in gl){var zt=gl[we];return zt(qe,Mt.formatLong)}return qe}).join("").match(oF),pt=[],O=Z2(os),B;try{var J=function(){var we=B.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&$2(we)&&Ca(we,Ee,t),!(n!=null&&n.useAdditionalDayOfYearTokens)&&U2(we)&&Ca(we,Ee,t);var zt=we[0],hi=Ew[zt];if(hi){var vf=hi.incompatibleTokens;if(Array.isArray(vf)){var yf=pt.find(function(wf){return vf.includes(wf.token)||wf.token===zt});if(yf)throw new RangeError("The format string mustn't contain `".concat(yf.fullToken,"` and `").concat(we,"` at the same time"))}else if(hi.incompatibleTokens==="*"&&pt.length>0)throw new RangeError("The format string mustn't contain `".concat(we,"` and any other token at the same time"));pt.push({token:zt,fullToken:we});var F3=hi.run(_e,we,Mt.match,ln);if(!F3)return{v:new Date(NaN)};Rr.push(F3.setter),_e=F3.rest}else{if(zt.match(uF))throw new RangeError("Format string contains an unescaped latin alphabet character `"+zt+"`");if(we==="''"?we="'":zt==="'"&&(we=dF(we)),_e.indexOf(we)===0)_e=_e.slice(we.length);else return{v:new Date(NaN)}}};for(O.s();!(B=O.n()).done;){var Ce=J();if(jt(Ce)==="object")return Ce.v}}catch(qe){O.e(qe)}finally{O.f()}if(_e.length>0&&lF.test(_e))return new Date(NaN);var mt=Rr.map(function(qe){return qe.priority}).sort(function(qe,we){return we-qe}).filter(function(qe,we,zt){return zt.indexOf(qe)===we}).map(function(qe){return Rr.filter(function(we){return we.priority===qe}).sort(function(we,zt){return zt.subPriority-we.subPriority})}).map(function(qe){return qe[0]}),Zt=T(r);if(isNaN(Zt.getTime()))return new Date(NaN);var vt=hl(Zt,cr(Zt)),Un={},Ye=Z2(mt),Aa;try{for(Ye.s();!(Aa=Ye.n()).done;){var El=Aa.value;if(!El.validate(vt,ln))return new Date(NaN);var ht=El.set(vt,Un,ln);Array.isArray(ht)?(vt=ht[0],Qo(Un,ht[1])):vt=ht}}catch(qe){Ye.e(qe)}finally{Ye.f()}return vt}function dF(t){return t.match(aF)[1].replace(cF,"'")}function e3(t){_(1,arguments);var e=T(t);return e.setMinutes(0,0,0),e}function t3(t,e){_(2,arguments);var r=e3(t),n=e3(e);return r.getTime()===n.getTime()}function n3(t,e){_(2,arguments);var r=B2(t),n=B2(e);return r.getTime()===n.getTime()}function r3(t,e){_(2,arguments);var r=T(t),n=T(e);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function i3(t){_(1,arguments);var e=T(t);return e.setMilliseconds(0),e}function o3(t,e){_(2,arguments);var r=i3(t),n=i3(e);return r.getTime()===n.getTime()}function s3(t,e){_(2,arguments);var r=T(t),n=T(e);return r.getFullYear()===n.getFullYear()}function a3(t){return _(1,arguments),Uo(t,Date.now())}function l3(t,e){var r;_(1,arguments);var n=de((r=e?.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof t=="string"||Object.prototype.toString.call(t)==="[object String]"))return new Date(NaN);var i=mF(t),o;if(i.date){var s=gF(i.date,n);o=vF(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),c=0,l;if(i.time&&(c=yF(i.time),isNaN(c)))return new Date(NaN);if(i.timezone){if(l=wF(i.timezone),isNaN(l))return new Date(NaN)}else{var u=new Date(a+c),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(a+c+l)}var c3={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},hF=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,fF=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,pF=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mF(t){var e={},r=t.split(c3.dateTimeDelimiter),n;if(r.length>2)return e;if(/:/.test(r[0])?n=r[0]:(e.date=r[0],n=r[1],c3.timeZoneDelimiter.test(e.date)&&(e.date=t.split(c3.timeZoneDelimiter)[0],n=t.substr(e.date.length,t.length))),n){var i=c3.timezone.exec(n);i?(e.time=n.replace(i[1],""),e.timezone=i[1]):e.time=n}return e}function gF(t,e){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(r);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?i:o*100,restDateString:t.slice((n[1]||n[2]).length)}}function vF(t,e){if(e===null)return new Date(NaN);var r=t.match(hF);if(!r)return new Date(NaN);var n=!!r[4],i=bl(r[1]),o=bl(r[2])-1,s=bl(r[3]),a=bl(r[4]),c=bl(r[5])-1;if(n)return DF(e,a,c)?bF(e,a,c):new Date(NaN);var l=new Date(0);return!CF(e,o,s)||!MF(e,i)?new Date(NaN):(l.setUTCFullYear(e,o,Math.max(i,s)),l)}function bl(t){return t?parseInt(t):1}function yF(t){var e=t.match(fF);if(!e)return NaN;var r=Mh(e[1]),n=Mh(e[2]),i=Mh(e[3]);return xF(r,n,i)?r*Bo+n*jo+i*1e3:NaN}function Mh(t){return t&&parseFloat(t.replace(",","."))||0}function wF(t){if(t==="Z")return 0;var e=t.match(pF);if(!e)return 0;var r=e[1]==="+"?-1:1,n=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return SF(n,i)?r*(n*Bo+i*jo):NaN}function bF(t,e,r){var n=new Date(0);n.setUTCFullYear(t,0,4);var i=n.getUTCDay()||7,o=(e-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+o),n}var _F=[31,null,31,30,31,30,31,31,30,31,30,31];function zw(t){return t%400===0||t%4===0&&t%100!==0}function CF(t,e,r){return e>=0&&e<=11&&r>=1&&r<=(_F[e]||(zw(t)?29:28))}function MF(t,e){return e>=1&&e<=(zw(t)?366:365)}function DF(t,e,r){return e>=1&&e<=53&&r>=0&&r<=6}function xF(t,e,r){return t===24?e===0&&r===0:r>=0&&r<60&&e>=0&&e<60&&t>=0&&t<25}function SF(t,e){return e>=0&&e<=59}function u3(t,e){_(2,arguments);var r=T(t),n=de(e),i=r.getFullYear(),o=r.getDate(),s=new Date(0);s.setFullYear(i,n,15),s.setHours(0,0,0,0);var a=mh(s);return r.setMonth(n,Math.min(o,a)),r}function d3(t,e,r){var n,i,o,s,a,c,l,u;_(2,arguments);var d=Et(),h=de((n=(i=(o=(s=r?.weekStartsOn)!==null&&s!==void 0?s:r==null||(a=r.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=T(t),p=de(e),y=f.getDay(),v=p%7,M=(v+7)%7,P=7-h,X=p<0||p>6?p-(y+P)%7:(M+P)%7-(y+P)%7;return pa(f,X)}function h3(t,e){_(2,arguments);var r=T(t),n=de(e);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function H3e(t){let[e,r]=t;return!!e&&!!r&&r.isBeforeDay(e)}function V3e(t,e,r="month",n="left"){let[i,o]=t,s=i||new _l,a=o||(e?s:s.add(1,r));return i&&!o?(s=i,a=e?i:i.add(1,r)):!i&&o?(s=e?o:o.add(-1,r),a=o):i&&o&&!e&&(i.isSame(o,r)||n==="left"?a=s.add(1,r):s=a.add(-1,r)),[s,a]}function Y3e(t){return Array.isArray(t)?t.map(e=>e instanceof _l?e.clone():null):t instanceof _l?t.clone():null}var _l=class t{constructor(e){if(e)if(e instanceof Date)this.nativeDate=e;else if(typeof e=="string"||typeof e=="number")Cn('The string type is not recommended for date-picker, use "Date" type'),this.nativeDate=new Date(e);else throw new Error('The input date type is not supported ("Date" is now recommended)');else this.nativeDate=new Date}calendarStart(e){return new t(Ho(dl(this.nativeDate),e))}getYear(){return this.nativeDate.getFullYear()}getMonth(){return this.nativeDate.getMonth()}getDay(){return this.nativeDate.getDay()}getTime(){return this.nativeDate.getTime()}getDate(){return this.nativeDate.getDate()}getHours(){return this.nativeDate.getHours()}getMinutes(){return this.nativeDate.getMinutes()}getSeconds(){return this.nativeDate.getSeconds()}getMilliseconds(){return this.nativeDate.getMilliseconds()}clone(){return new t(new Date(this.nativeDate))}setHms(e,r,n){let i=new Date(this.nativeDate.setHours(e,r,n));return new t(i)}setYear(e){return new t(h3(this.nativeDate,e))}addYears(e){return new t(R2(this.nativeDate,e))}setMonth(e){return new t(u3(this.nativeDate,e))}addMonths(e){return new t(ma(this.nativeDate,e))}setDay(e,r){return new t(d3(this.nativeDate,e,r))}setDate(e){let r=new Date(this.nativeDate);return r.setDate(e),new t(r)}addDays(e){return this.setDate(this.getDate()+e)}add(e,r){switch(r){case"decade":return this.addYears(e*10);case"year":return this.addYears(e);case"month":return this.addMonths(e);default:return this.addMonths(e)}}isSame(e,r="day"){let n;switch(r){case"decade":n=(i,o)=>Math.abs(i.getFullYear()-o.getFullYear())<11;break;case"year":n=s3;break;case"month":n=r3;break;case"day":n=Uo;break;case"hour":n=t3;break;case"minute":n=n3;break;case"second":n=o3;break;default:n=Uo;break}return n(this.nativeDate,this.toNativeDate(e))}isSameYear(e){return this.isSame(e,"year")}isSameMonth(e){return this.isSame(e,"month")}isSameDay(e){return this.isSame(e,"day")}isSameHour(e){return this.isSame(e,"hour")}isSameMinute(e){return this.isSame(e,"minute")}isSameSecond(e){return this.isSame(e,"second")}isBefore(e,r="day"){if(e===null)return!1;let n;switch(r){case"year":n=L2;break;case"month":n=va;break;case"day":n=Vo;break;case"hour":n=H2;break;case"minute":n=V2;break;case"second":n=ba;break;default:n=Vo;break}return n(this.nativeDate,this.toNativeDate(e))<0}isBeforeYear(e){return this.isBefore(e,"year")}isBeforeMonth(e){return this.isBefore(e,"month")}isBeforeDay(e){return this.isBefore(e,"day")}isToday(){return a3(this.nativeDate)}isValid(){return ga(this.nativeDate)}isFirstDayOfMonth(){return G2(this.nativeDate)}isLastDayOfMonth(){return wa(this.nativeDate)}toNativeDate(e){return e instanceof t?e.nativeDate:e}},j3e=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],f3=class{constructor(e,r){this.format=e,this.localeId=r,this.regex=null,this.matchMap={hour:null,minute:null,second:null,periodNarrow:null,periodWide:null,periodAbbreviated:null},this.genRegexp()}toDate(e){let r=this.getTimeResult(e),n=new Date;return Mn(r?.hour)&&n.setHours(r.hour),Mn(r?.minute)&&n.setMinutes(r.minute),Mn(r?.second)&&n.setSeconds(r.second),r?.period===1&&n.getHours()<12&&n.setHours(n.getHours()+12),n}getTimeResult(e){let r=this.regex.exec(e),n=null;return r?(Mn(this.matchMap.periodNarrow)&&(n=Pi(this.localeId,dt.Format,xe.Narrow).indexOf(r[this.matchMap.periodNarrow+1])),Mn(this.matchMap.periodWide)&&(n=Pi(this.localeId,dt.Format,xe.Wide).indexOf(r[this.matchMap.periodWide+1])),Mn(this.matchMap.periodAbbreviated)&&(n=Pi(this.localeId,dt.Format,xe.Abbreviated).indexOf(r[this.matchMap.periodAbbreviated+1])),{hour:Mn(this.matchMap.hour)?Number.parseInt(r[this.matchMap.hour+1],10):null,minute:Mn(this.matchMap.minute)?Number.parseInt(r[this.matchMap.minute+1],10):null,second:Mn(this.matchMap.second)?Number.parseInt(r[this.matchMap.second+1],10):null,period:n}):null}genRegexp(){let e=this.format.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$&"),r=/h{1,2}/i,n=/m{1,2}/,i=/s{1,2}/,o=/aaaaa/,s=/aaaa/,a=/a{1,3}/,c=r.exec(this.format),l=n.exec(this.format),u=i.exec(this.format),d=o.exec(this.format),h=null,f=null;d||(h=s.exec(this.format)),!h&&!d&&(f=a.exec(this.format)),[c,l,u,d,h,f].filter(y=>!!y).sort((y,v)=>y.index-v.index).forEach((y,v)=>{switch(y){case c:this.matchMap.hour=v,e=e.replace(r,"(\\d{1,2})");break;case l:this.matchMap.minute=v,e=e.replace(n,"(\\d{1,2})");break;case u:this.matchMap.second=v,e=e.replace(i,"(\\d{1,2})");break;case d:this.matchMap.periodNarrow=v;let M=Pi(this.localeId,dt.Format,xe.Narrow).join("|");e=e.replace(o,`(${M})`);break;case h:this.matchMap.periodWide=v;let P=Pi(this.localeId,dt.Format,xe.Wide).join("|");e=e.replace(s,`(${P})`);break;case f:this.matchMap.periodAbbreviated=v;let X=Pi(this.localeId,dt.Format,xe.Abbreviated).join("|");e=e.replace(a,`(${X})`);break}}),this.regex=new RegExp(e)}};var TF={locale:"en",Pagination:{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},DatePicker:{lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},timePickerLocale:{placeholder:"Select time",rangePlaceholder:["Start time","End time"]}},TimePicker:{placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Calendar:{lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},timePickerLocale:{placeholder:"Select time",rangePlaceholder:["Start time","End time"]}},global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",selectNone:"Clear all data"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Image:{preview:"Preview"},CronExpression:{cronError:"Invalid cron expression",second:"second",minute:"minute",hour:"hour",day:"day",month:"month",week:"week"},QRCode:{expired:"QR code expired",refresh:"Refresh"}},EF={locale:"zh-cn",Pagination:{items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},DatePicker:{lang:{placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"],locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708 (\u7FFB\u9875\u4E0A\u952E)",nextMonth:"\u4E0B\u4E2A\u6708 (\u7FFB\u9875\u4E0B\u952E)",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",yearFormat:"YYYY\u5E74",dayFormat:"D\u65E5",dateFormat:"YYYY\u5E74M\u6708D\u65E5",dateTimeFormat:"YYYY\u5E74M\u6708D\u65E5 HH\u65F6mm\u5206ss\u79D2",previousYear:"\u4E0A\u4E00\u5E74 (Control\u952E\u52A0\u5DE6\u65B9\u5411\u952E)",nextYear:"\u4E0B\u4E00\u5E74 (Control\u952E\u52A0\u53F3\u65B9\u5411\u952E)",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA"},timePickerLocale:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]}},TimePicker:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]},Calendar:{lang:{placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"],locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708 (\u7FFB\u9875\u4E0A\u952E)",nextMonth:"\u4E0B\u4E2A\u6708 (\u7FFB\u9875\u4E0B\u952E)",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",yearFormat:"YYYY\u5E74",dayFormat:"D\u65E5",dateFormat:"YYYY\u5E74M\u6708D\u65E5",dateTimeFormat:"YYYY\u5E74M\u6708D\u65E5 HH\u65F6mm\u5206ss\u79D2",previousYear:"\u4E0A\u4E00\u5E74 (Control\u952E\u52A0\u5DE6\u65B9\u5411\u952E)",nextYear:"\u4E0B\u4E00\u5E74 (Control\u952E\u52A0\u53F3\u65B9\u5411\u952E)",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA"},timePickerLocale:{placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]}},global:{placeholder:"\u8BF7\u9009\u62E9"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F",filterCheckall:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",selectNone:"\u6E05\u7A7A\u6240\u6709"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00"},PageHeader:{back:"\u8FD4\u56DE"},Image:{preview:"\u9884\u89C8"},CronExpression:{cronError:"cron \u8868\u8FBE\u5F0F\u4E0D\u5408\u6CD5",second:"\u79D2",minute:"\u5206\u949F",hour:"\u5C0F\u65F6",day:"\u65E5",month:"\u6708",week:"\u5468"},QRCode:{expired:"\u4E8C\u7EF4\u7801\u8FC7\u671F",refresh:"\u70B9\u51FB\u5237\u65B0"}},Iw=new E("nz-i18n");function kw(t){return Wt([{provide:Iw,useValue:t}])}var Sh=new E("nz-date-locale"),$i=(()=>{let e=class e{get localeChange(){return this._change.asObservable()}constructor(n,i){this._change=new Re(this._locale),this.setLocale(n||EF),this.setDateLocale(i||null)}translate(n,i){let o=this._getObjectPath(this._locale,n);return typeof o=="string"?(i&&Object.keys(i).forEach(s=>o=o.replace(new RegExp(`%${s}%`,"g"),i[s])),o):n}setLocale(n){this._locale&&this._locale.locale===n.locale||(this._locale=n,this._change.next(n))}getLocale(){return this._locale}getLocaleId(){return this._locale?this._locale.locale:""}setDateLocale(n){this.dateLocale=n}getDateLocale(){return this.dateLocale}getLocaleData(n,i){let o=n?this._getObjectPath(this._locale,n):this._locale;return!o&&!i&&Cn(`Missing translations for "${n}" in language "${this._locale.locale}". You can use "NzI18nService.setLocale" as a temporary fix. Welcome to submit a pull request to help us optimize the translations! -https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md`),o||i||this._getObjectPath(TF,n)||{}}_getObjectPath(n,i){let o=n,s=i.split("."),a=s.length,c=0;for(;o&&c{let e=class e{constructor(n){this._locale=n}transform(n,i){return this._locale.translate(n,i)}};e.\u0275fac=function(i){return new(i||e)(m($i,16))},e.\u0275pipe=en({name:"nzI18n",type:e,pure:!0,standalone:!0});let t=e;return t})(),kw=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})(),Pw=new E("date-config"),zF={firstDayOfWeek:void 0};function IF(t){return b(b({},zF),t)}function kF(){let t=w($i),e=w(Pw,{optional:!0});return t.getDateLocale()?new Dh(t,e):new xh(t,e)}var Ow=(()=>{let e=class e{constructor(n,i){this.i18n=n,this.config=IF(i)}};e.\u0275fac=function(i){return new(i||e)(g($i),g(Pw,8))},e.\u0275prov=C({token:e,factory:()=>kF(),providedIn:"root"});let t=e;return t})(),Dh=class extends Ow{getISOWeek(e){return W2(e)}getFirstDayOfWeek(){let e;try{e=this.i18n.getDateLocale().options.weekStartsOn}catch{e=1}return this.config.firstDayOfWeek==null?e:this.config.firstDayOfWeek}format(e,r){return e?Zo(e,r,{locale:this.i18n.getDateLocale()}):""}parseDate(e,r){return Ta(e,r,new Date,{locale:this.i18n.getDateLocale(),weekStartsOn:this.getFirstDayOfWeek()})}parseTime(e,r){return this.parseDate(e,r)}},xh=class extends Ow{getISOWeek(e){return+this.format(e,"w")}getFirstDayOfWeek(){if(this.config.firstDayOfWeek===void 0){let e=this.i18n.getLocaleId();return e&&["zh-cn","zh-tw"].indexOf(e.toLowerCase())>-1?1:0}return this.config.firstDayOfWeek}format(e,r){return e?Gu(e,r,this.i18n.getLocaleId()):""}parseDate(e){return new Date(e)}parseTime(e,r){return new f3(r,this.i18n.getLocaleId()).toDate(e)}};var Th=class{};function Aw(t){return t&&typeof t.connect=="function"&&!(t instanceof lr)}var p3=class extends Th{constructor(e){super(),this._data=e}connect(){return Tn(this._data)?this._data:A(this._data)}disconnect(){}},_l=function(t){return t[t.REPLACED=0]="REPLACED",t[t.INSERTED=1]="INSERTED",t[t.MOVED=2]="MOVED",t[t.REMOVED=3]="REMOVED",t}(_l||{}),Eh=new E("_ViewRepeater");var m3=class{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(e,r,n,i,o){e.forEachOperation((s,a,c)=>{let l,u;if(s.previousIndex==null){let d=()=>n(s,a,c);l=this._insertView(d,c,r,i(s)),u=l?_l.INSERTED:_l.REPLACED}else c==null?(this._detachAndCacheView(a,r),u=_l.REMOVED):(l=this._moveView(a,c,r,i(s)),u=_l.MOVED);o&&o({context:l?.context,operation:u,record:s})})}detach(){for(let e of this._viewCache)e.destroy();this._viewCache=[]}_insertView(e,r,n,i){let o=this._insertViewFromCache(r,n);if(o){o.context.$implicit=i;return}let s=e();return n.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(e,r){let n=r.detach(e);this._maybeCacheView(n,r)}_moveView(e,r,n,i){let o=n.get(e);return n.move(o,r),o.context.$implicit=i,o}_maybeCacheView(e,r){if(this._viewCache.length0?o/this._itemSize:0;if(r.end>i){let c=Math.ceil(n/this._itemSize),l=Math.max(0,Math.min(s,i-c));s!=l&&(s=l,o=l*this._itemSize,r.start=Math.floor(s)),r.end=Math.max(0,Math.min(i,r.start+c))}let a=o-r.start*this._itemSize;if(a0&&(r.end=Math.min(i,r.end+l),r.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(r),this._viewport.setRenderedContentOffset(this._itemSize*r.start),this._scrolledIndexChange.next(Math.floor(s))}};function FF(t){return t._scrollStrategy}var M0e=(()=>{let e=class e{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new zh(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(n){this._itemSize=ti(n)}get minBufferPx(){return this._minBufferPx}set minBufferPx(n){this._minBufferPx=ti(n)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(n){this._maxBufferPx=ti(n)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},standalone:!0,features:[Kr([{provide:Lw,useFactory:FF,deps:[R1(()=>e)]}]),He]});let t=e;return t})(),NF=20,Jo=(()=>{let e=class e{constructor(n,i,o){this._ngZone=n,this._platform=i,this._scrolled=new S,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=o}register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let i=this.scrollContainers.get(n);i&&(i.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=NF){return this._platform.isBrowser?new Y(i=>{this._globalSubscription||this._addGlobalListener();let o=n>0?this._scrolled.pipe(Ha(n)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):A()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((n,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(n,i){let o=this.getAncestorScrollContainers(n);return this.scrolled(i).pipe(ge(s=>!s||o.indexOf(s)>-1))}getAncestorScrollContainers(n){let i=[];return this.scrollContainers.forEach((o,s)=>{this._scrollableContainsElement(s,n)&&i.push(s)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(n,i){let o=rt(i),s=n.getElementRef().nativeElement;do if(o==s)return!0;while(o=o.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let n=this._getWindow();return Kn(n.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}};e.\u0275fac=function(i){return new(i||e)(g(U),g(Ge),g(V,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ih=(()=>{let e=class e{constructor(n,i,o,s){this.elementRef=n,this.scrollDispatcher=i,this.ngZone=o,this.dir=s,this._destroyed=new S,this._elementScrolled=new Y(a=>this.ngZone.runOutsideAngular(()=>Kn(this.elementRef.nativeElement,"scroll").pipe(ce(this._destroyed)).subscribe(a)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(n){let i=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";n.left==null&&(n.left=o?n.end:n.start),n.right==null&&(n.right=o?n.start:n.end),n.bottom!=null&&(n.top=i.scrollHeight-i.clientHeight-n.bottom),o&&ha()!=ar.NORMAL?(n.left!=null&&(n.right=i.scrollWidth-i.clientWidth-n.left),ha()==ar.INVERTED?n.left=n.right:ha()==ar.NEGATED&&(n.left=n.right?-n.right:n.right)):n.right!=null&&(n.left=i.scrollWidth-i.clientWidth-n.right),this._applyScrollToOptions(n)}_applyScrollToOptions(n){let i=this.elementRef.nativeElement;O2()?i.scrollTo(n):(n.top!=null&&(i.scrollTop=n.top),n.left!=null&&(i.scrollLeft=n.left))}measureScrollOffset(n){let i="left",o="right",s=this.elementRef.nativeElement;if(n=="top")return s.scrollTop;if(n=="bottom")return s.scrollHeight-s.clientHeight-s.scrollTop;let a=this.dir&&this.dir.value=="rtl";return n=="start"?n=a?o:i:n=="end"&&(n=a?i:o),a&&ha()==ar.INVERTED?n==i?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:a&&ha()==ar.NEGATED?n==i?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:n==i?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(Jo),m(U),m(Ft,8))},e.\u0275dir=ne({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0});let t=e;return t})(),RF=20,es=(()=>{let e=class e{constructor(n,i,o){this._platform=n,this._change=new S,this._changeListener=s=>{this._change.next(s)},this._document=o,i.runOutsideAngular(()=>{if(n.isBrowser){let s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let n=this._getWindow();n.removeEventListener("resize",this._changeListener),n.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:i,height:o}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+o,right:n.left+i,height:o,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,i=this._getWindow(),o=n.documentElement,s=o.getBoundingClientRect(),a=-s.top||n.body.scrollTop||i.scrollY||o.scrollTop||0,c=-s.left||n.body.scrollLeft||i.scrollX||o.scrollLeft||0;return{top:a,left:c}}change(n=RF){return n>0?this._change.pipe(Ha(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(U),g(V,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Fw=new E("VIRTUAL_SCROLLABLE"),LF=(()=>{let e=class e extends Ih{constructor(n,i,o,s){super(n,i,o,s)}measureViewportSize(n){let i=this.elementRef.nativeElement;return n==="horizontal"?i.clientWidth:i.clientHeight}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(Jo),m(U),m(Ft,8))},e.\u0275dir=ne({type:e,features:[nn]});let t=e;return t})();function HF(t,e){return t.start==e.start&&t.end==e.end}var VF=typeof requestAnimationFrame<"u"?La:e0,YF=(()=>{let e=class e extends LF{get orientation(){return this._orientation}set orientation(n){this._orientation!==n&&(this._orientation=n,this._calculateSpacerSize())}constructor(n,i,o,s,a,c,l,u){super(n,c,o,a),this.elementRef=n,this._changeDetectorRef=i,this._scrollStrategy=s,this.scrollable=u,this._platform=w(Ge),this._detachedSubject=new S,this._renderedRangeSubject=new S,this._orientation="vertical",this.appendOnly=!1,this.scrolledIndexChange=new Y(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.next(h))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=ye.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Rt(null),Ha(0,VF),ce(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(n){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=n,this._forOf.dataStream.pipe(ce(this._detachedSubject)).subscribe(i=>{let o=i.length;o!==this._dataLength&&(this._dataLength=o,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(n){return this.getElementRef().nativeElement.getBoundingClientRect()[n]}setTotalContentSize(n){this._totalContentSize!==n&&(this._totalContentSize=n,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(n){HF(this._renderedRange,n)||(this.appendOnly&&(n={start:0,end:Math.max(this._renderedRange.end,n.end)}),this._renderedRangeSubject.next(this._renderedRange=n),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(n,i="to-start"){n=this.appendOnly&&i==="to-start"?0:n;let o=this.dir&&this.dir.value=="rtl",s=this.orientation=="horizontal",a=s?"X":"Y",l=`translate${a}(${Number((s&&o?-1:1)*n)}px)`;this._renderedContentOffset=n,i==="to-end"&&(l+=` translate${a}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(n,i="auto"){let o={behavior:i};this.orientation==="horizontal"?o.start=n:o.top=n,this.scrollable.scrollTo(o)}scrollToIndex(n,i="auto"){this._scrollStrategy.scrollToIndex(n,i)}measureScrollOffset(n){let i;return this.scrollable==this?i=o=>super.measureScrollOffset(o):i=o=>this.scrollable.measureScrollOffset(o),Math.max(0,i(n??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(n){let i,o="left",s="right",a=this.dir?.value=="rtl";n=="start"?i=a?s:o:n=="end"?i=a?o:s:n?i=n:i=this.orientation==="horizontal"?"left":"top";let c=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-c}measureRenderedContentSize(){let n=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?n.offsetWidth:n.offsetHeight}measureRangeSize(n){return this._forOf?this._forOf.measureRangeSize(n,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(n){n&&this._runAfterChangeDetection.push(n),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());let n=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of n)i()}_calculateSpacerSize(){this._totalContentHeight=this.orientation==="horizontal"?"":`${this._totalContentSize}px`,this._totalContentWidth=this.orientation==="horizontal"?`${this._totalContentSize}px`:""}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(ft),m(U),m(Lw,8),m(Ft,8),m(Jo),m(es),m(Fw,8))},e.\u0275cmp=bt({type:e,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,o){if(i&1&&On(OF,7),i&2){let s;ct(s=lt())&&(o._contentWrapper=s.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,o){i&2&&St("cdk-virtual-scroll-orientation-horizontal",o.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",o.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[W.HasDecoratorInputTransform,"appendOnly","appendOnly",ut]},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[Kr([{provide:Ih,useFactory:(n,i)=>n||i,deps:[[new $r,new Qp(Fw)],e]}]),rn,nn,_t],ngContentSelectors:AF,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(i,o){i&1&&(yo(),se(0,"div",0,1),wo(2),le(),et(3,"div",2)),i&2&&(k(3),Gt("width",o._totalContentWidth)("height",o._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0});let t=e;return t})();function Nw(t,e,r){let n=r;if(!n.getBoundingClientRect)return 0;let i=n.getBoundingClientRect();return t==="horizontal"?e==="start"?i.left:i.right:e==="start"?i.top:i.bottom}var D0e=(()=>{let e=class e{get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(n){this._cdkVirtualForOf=n,Aw(n)?this._dataSourceChanges.next(n):this._dataSourceChanges.next(new p3(Tn(n)?n:Array.from(n||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(n){this._needsUpdate=!0,this._cdkVirtualForTrackBy=n?(i,o)=>n(i+(this._renderedRange?this._renderedRange.start:0),o):void 0}set cdkVirtualForTemplate(n){n&&(this._needsUpdate=!0,this._template=n)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(n){this._viewRepeater.viewCacheSize=ti(n)}constructor(n,i,o,s,a,c){this._viewContainerRef=n,this._template=i,this._differs=o,this._viewRepeater=s,this._viewport=a,this.viewChange=new S,this._dataSourceChanges=new S,this.dataStream=this._dataSourceChanges.pipe(Rt(null),o0(),Ze(([l,u])=>this._changeDataSource(l,u)),c0(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new S,this.dataStream.subscribe(l=>{this._data=l,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(ce(this._destroyed)).subscribe(l=>{this._renderedRange=l,this.viewChange.observers.length&&c.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(n,i){if(n.start>=n.end)return 0;n.startthis._renderedRange.end;let o=n.start-this._renderedRange.start,s=n.end-n.start,a,c;for(let l=0;l-1;l--){let u=this._viewContainerRef.get(l+o);if(u&&u.rootNodes.length){c=u.rootNodes[u.rootNodes.length-1];break}}return a&&c?Nw(i,"end",c)-Nw(i,"start",a):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let n=this._differ.diff(this._renderedItems);n?this._applyChanges(n):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((n,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(n,i):i)),this._needsUpdate=!0)}_changeDataSource(n,i){return n&&n.disconnect(this),this._needsUpdate=!0,i?i.connect(this):A()}_updateContext(){let n=this._data.length,i=this._viewContainerRef.length;for(;i--;){let o=this._viewContainerRef.get(i);o.context.index=this._renderedRange.start+i,o.context.count=n,this._updateComputedContextProperties(o.context),o.detectChanges()}}_applyChanges(n){this._viewRepeater.applyChanges(n,this._viewContainerRef,(s,a,c)=>this._getEmbeddedViewArgs(s,c),s=>s.item),n.forEachIdentityChange(s=>{let a=this._viewContainerRef.get(s.currentIndex);a.context.$implicit=s.item});let i=this._data.length,o=this._viewContainerRef.length;for(;o--;){let s=this._viewContainerRef.get(o);s.context.index=this._renderedRange.start+o,s.context.count=i,this._updateComputedContextProperties(s.context)}}_updateComputedContextProperties(n){n.first=n.index===0,n.last=n.index===n.count-1,n.even=n.index%2===0,n.odd=!n.even}_getEmbeddedViewArgs(n,i){return{templateRef:this._template,context:{$implicit:n.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(ac),m(Eh),m(YF,4),m(U))},e.\u0275dir=ne({type:e,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},standalone:!0,features:[Kr([{provide:Eh,useClass:m3}])]});let t=e;return t})();var Rw=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})(),kh=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[Ro,Rw,Ro,Rw]});let t=e;return t})();var Cl=class{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},si=class extends Cl{constructor(e,r,n,i,o){super(),this.component=e,this.viewContainerRef=r,this.injector=n,this.componentFactoryResolver=i,this.projectableNodes=o}},ai=class extends Cl{constructor(e,r,n,i){super(),this.templateRef=e,this.viewContainerRef=r,this.context=n,this.injector=i}get origin(){return this.templateRef.elementRef}attach(e,r=this.context){return this.context=r,super.attach(e)}detach(){return this.context=void 0,super.detach()}},Ph=class extends Cl{constructor(e){super(),this.element=e instanceof oe?e.nativeElement:e}},Ea=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof si)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof ai)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Ph)return this._attachedPortal=e,this.attachDomPortal(e)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var g3=class extends Ea{constructor(e,r,n,i,o){super(),this.outletElement=e,this._componentFactoryResolver=r,this._appRef=n,this._defaultInjector=i,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let c=this._document.createComment("dom-portal");a.parentNode.insertBefore(c,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}attachComponentPortal(e){let n=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),i;return e.viewContainerRef?(i=e.viewContainerRef.createComponent(n,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>i.destroy())):(i=n.create(e.injector||this._defaultInjector||Ue.NULL),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(i.hostView),i.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(i)),this._attachedPortal=e,i}attachTemplatePortal(e){let r=e.viewContainerRef,n=r.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(i=>this.outletElement.appendChild(i)),n.detectChanges(),this.setDisposeFn(()=>{let i=r.indexOf(n);i!==-1&&r.remove(i)}),this._attachedPortal=e,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Ar=(()=>{let e=class e extends Ea{constructor(n,i,o){super(),this._componentFactoryResolver=n,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new re,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let c=this._document.createComment("dom-portal");s.setAttachedHost(this),a.parentNode.insertBefore(c,a),this._getRootNode().appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let i=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,s=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component),a=i.createComponent(s,i.length,n.injector||i.injector,n.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=n,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(n){n.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}};e.\u0275fac=function(i){return new(i||e)(m(Ei),m(Xe),m(V))},e.\u0275dir=ne({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[W.None,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[nn]});let t=e;return t})();var ts=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();function za(t,...e){return e.length?e.some(r=>t[r]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var Yw=O2(),Oh=class{constructor(e,r){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=r}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=at(-this._previousScrollPosition.left),e.style.top=at(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,r=this._document.body,n=e.style,i=r.style,o=n.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Yw&&(n.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Yw&&(n.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let r=this._document.body,n=this._viewportRuler.getViewportSize();return r.scrollHeight>n.height||r.scrollWidth>n.width}};var Ah=class{constructor(e,r,n,i){this._scrollDispatcher=e,this._ngZone=r,this._viewportRuler=n,this._config=i,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(ge(r=>!r||!this._overlayRef.overlayElement.contains(r.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let r=this._viewportRuler.getViewportScrollPosition().top;Math.abs(r-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},v3=class{enable(){}disable(){}attach(){}};function Fh(t,e){return e.some(r=>{let n=t.bottomr.bottom,o=t.rightr.right;return n||i||o||s})}function jw(t,e){return e.some(r=>{let n=t.topr.bottom,o=t.leftr.right;return n||i||o||s})}var Nh=class{constructor(e,r,n,i){this._scrollDispatcher=e,this._viewportRuler=r,this._ngZone=n,this._config=i,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let r=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:i}=this._viewportRuler.getViewportSize();Fh(r,[{width:n,height:i,bottom:i,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},jF=(()=>{let e=class e{constructor(n,i,o,s){this._scrollDispatcher=n,this._viewportRuler=i,this._ngZone=o,this.noop=()=>new v3,this.close=a=>new Ah(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new Oh(this._viewportRuler,this._document),this.reposition=a=>new Nh(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=s}};e.\u0275fac=function(i){return new(i||e)(g(Jo),g(es),g(U),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qi=class{constructor(e){if(this.scrollStrategy=new v3,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let r=Object.keys(e);for(let n of r)e[n]!==void 0&&(this[n]=e[n])}}},Bw=class{constructor(e,r,n,i,o){this.offsetX=n,this.offsetY=i,this.panelClass=o,this.originX=e.originX,this.originY=e.originY,this.overlayX=r.overlayX,this.overlayY=r.overlayY}};var Rh=class{constructor(e,r){this.connectionPair=e,this.scrollableViewProperties=r}};var Gw=(()=>{let e=class e{constructor(n){this._attachedOverlays=[],this._document=n}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let i=this._attachedOverlays.indexOf(n);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Vh=(()=>{let e=class e extends Gw{constructor(n,i){super(n),this._ngZone=i,this._keydownListener=o=>{let s=this._attachedOverlays;for(let a=s.length-1;a>-1;a--)if(s[a]._keydownEvents.observers.length>0){let c=s[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>c.next(o)):c.next(o);break}}}add(n){super.add(n),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(U,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),BF=(()=>{let e=class e extends Gw{constructor(n,i,o){super(n),this._platform=i,this._ngZone=o,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cn(s)},this._clickListener=s=>{let a=cn(s),c=s.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let u=l.length-1;u>-1;u--){let d=l[u];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(a)||d.overlayElement.contains(c))break;let h=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(n){if(super.add(n),!this._isAttached){let i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let n=this._document.body;n.removeEventListener("pointerdown",this._pointerDownListener,!0),n.removeEventListener("click",this._clickListener,!0),n.removeEventListener("auxclick",this._clickListener,!0),n.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(n.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(n){n.addEventListener("pointerdown",this._pointerDownListener,!0),n.addEventListener("click",this._clickListener,!0),n.addEventListener("auxclick",this._clickListener,!0),n.addEventListener("contextmenu",this._clickListener,!0)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(Ge),g(U,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Kw=(()=>{let e=class e{constructor(n,i){this._platform=i,this._document=n}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Jd()){let o=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;sthis._backdropClick.next(d),this._backdropTransitionendHandler=d=>{this._disposeBackdrop(d.target)},this._keydownEvents=new S,this._outsidePointerEvents=new S,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let r=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(ze(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof r?.onDestroy=="function"&&r.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),r}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=b(b({},this._config),e),this._updateElementSize()}setDirection(e){this._config=ke(b({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=at(this._config.width),e.height=at(this._config.height),e.minWidth=at(this._config.minWidth),e.minHeight=at(this._config.minHeight),e.maxWidth=at(this._config.maxWidth),e.maxHeight=at(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,r,n){let i=zo(r||[]).filter(o=>!!o);i.length&&(n?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{let e=this._ngZone.onStable.pipe(ce(vs(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},Uw="cdk-overlay-connected-position-bounding-box",UF=/([A-Za-z%]+)$/,Lh=class{get positions(){return this._preferredPositions}constructor(e,r,n,i,o){this._viewportRuler=r,this._document=n,this._platform=i,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new S,this._resizeSubscription=ye.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(Uw),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,r=this._overlayRect,n=this._viewportRect,i=this._containerRect,o=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(e,i,a),l=this._getOverlayPoint(c,r,a),u=this._getOverlayFit(l,r,n,a);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(u,l,n)){o.push({position:a,origin:c,overlayRect:r,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleAreac&&(c=u,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&ns(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Uw),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let r=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,r)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,r,n){let i;if(n.originX=="center")i=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;i=n.originX=="start"?s:a}r.left<0&&(i-=r.left);let o;return n.originY=="center"?o=e.top+e.height/2:o=n.originY=="top"?e.top:e.bottom,r.top<0&&(o-=r.top),{x:i,y:o}}_getOverlayPoint(e,r,n){let i;n.overlayX=="center"?i=-r.width/2:n.overlayX==="start"?i=this._isRtl()?-r.width:0:i=this._isRtl()?0:-r.width;let o;return n.overlayY=="center"?o=-r.height/2:o=n.overlayY=="top"?0:-r.height,{x:e.x+i,y:e.y+o}}_getOverlayFit(e,r,n,i){let o=qw(r),{x:s,y:a}=e,c=this._getOffset(i,"x"),l=this._getOffset(i,"y");c&&(s+=c),l&&(a+=l);let u=0-s,d=s+o.width-n.width,h=0-a,f=a+o.height-n.height,p=this._subtractOverflows(o.width,u,d),y=this._subtractOverflows(o.height,h,f),v=p*y;return{visibleArea:v,isCompletelyWithinViewport:o.width*o.height===v,fitsInViewportVertically:y===o.height,fitsInViewportHorizontally:p==o.width}}_canFitWithFlexibleDimensions(e,r,n){if(this._hasFlexibleDimensions){let i=n.bottom-r.y,o=n.right-r.x,s=$w(this._overlayRef.getConfig().minHeight),a=$w(this._overlayRef.getConfig().minWidth),c=e.fitsInViewportVertically||s!=null&&s<=i,l=e.fitsInViewportHorizontally||a!=null&&a<=o;return c&&l}return!1}_pushOverlayOnScreen(e,r,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let i=qw(r),o=this._viewportRect,s=Math.max(e.x+i.width-o.width,0),a=Math.max(e.y+i.height-o.height,0),c=Math.max(o.top-n.top-e.y,0),l=Math.max(o.left-n.left-e.x,0),u=0,d=0;return i.width<=o.width?u=l||-s:u=e.xp&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-p/2)}let c=r.overlayX==="start"&&!i||r.overlayX==="end"&&i,l=r.overlayX==="end"&&!i||r.overlayX==="start"&&i,u,d,h;if(l)h=n.width-e.x+this._viewportMargin,u=e.x-this._viewportMargin;else if(c)d=e.x,u=n.right-e.x;else{let f=Math.min(n.right-e.x+n.left,e.x),p=this._lastBoundingBoxSize.width;u=f*2,d=e.x-f,u>p&&!this._isInitialRender&&!this._growAfterOpen&&(d=e.x-p/2)}return{top:s,left:d,bottom:a,right:h,width:u,height:o}}_setBoundingBoxStyles(e,r){let n=this._calculateBoundingBoxRect(e,r);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=at(n.height),i.top=at(n.top),i.bottom=at(n.bottom),i.width=at(n.width),i.left=at(n.left),i.right=at(n.right),r.overlayX==="center"?i.alignItems="center":i.alignItems=r.overlayX==="end"?"flex-end":"flex-start",r.overlayY==="center"?i.justifyContent="center":i.justifyContent=r.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=at(o)),s&&(i.maxWidth=at(s))}this._lastBoundingBoxSize=n,ns(this._boundingBox.style,i)}_resetBoundingBoxStyles(){ns(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){ns(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,r){let n={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let u=this._viewportRuler.getViewportScrollPosition();ns(n,this._getExactOverlayY(r,e,u)),ns(n,this._getExactOverlayX(r,e,u))}else n.position="static";let a="",c=this._getOffset(r,"x"),l=this._getOffset(r,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),n.transform=a.trim(),s.maxHeight&&(i?n.maxHeight=at(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(i?n.maxWidth=at(s.maxWidth):o&&(n.maxWidth="")),ns(this._pane.style,n)}_getExactOverlayY(e,r,n){let i={top:"",bottom:""},o=this._getOverlayPoint(r,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=at(o.y);return i}_getExactOverlayX(e,r,n){let i={left:"",right:""},o=this._getOverlayPoint(r,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(o.x+this._overlayRect.width)}px`}else i.left=at(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),r=this._pane.getBoundingClientRect(),n=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:jw(e,n),isOriginOutsideView:Fh(e,n),isOverlayClipped:jw(r,n),isOverlayOutsideView:Fh(r,n)}}_subtractOverflows(e,...r){return r.reduce((n,i)=>n-Math.max(i,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,r=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+r-this._viewportMargin,width:e-2*this._viewportMargin,height:r-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,r){return r==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&zo(e).forEach(r=>{r!==""&&this._appliedPanelClasses.indexOf(r)===-1&&(this._appliedPanelClasses.push(r),this._pane.classList.add(r))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof oe)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let r=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+r,height:n,width:r}}};function ns(t,e){for(let r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function $w(t){if(typeof t!="number"&&t!=null){let[e,r]=t.split(UF);return!r||r==="px"?parseFloat(e):null}return t||null}function qw(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}var Ww="cdk-global-overlay-wrapper",Hh=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let r=e.getConfig();this._overlayRef=e,this._width&&!r.width&&e.updateSize({width:this._width}),this._height&&!r.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Ww),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,r=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:a}=n,c=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),u=this._xPosition,d=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",f="",p="",y="";c?y="flex-start":u==="center"?(y="center",h?p=d:f=d):h?u==="left"||u==="end"?(y="flex-end",f=d):(u==="right"||u==="start")&&(y="flex-start",p=d):u==="left"||u==="start"?(y="flex-start",f=d):(u==="right"||u==="end")&&(y="flex-end",p=d),e.position=this._cssPosition,e.marginLeft=c?"0":f,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=c?"0":p,r.justifyContent=y,r.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,r=this._overlayRef.hostElement,n=r.style;r.classList.remove(Ww),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},$F=(()=>{let e=class e{constructor(n,i,o,s){this._viewportRuler=n,this._document=i,this._platform=o,this._overlayContainer=s}global(){return new Hh}flexibleConnectedTo(n){return new Lh(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}};e.\u0275fac=function(i){return new(i||e)(g(es),g(V),g(Ge),g(Kw))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qF=0,ci=(()=>{let e=class e{constructor(n,i,o,s,a,c,l,u,d,h,f,p){this.scrollStrategies=n,this._overlayContainer=i,this._componentFactoryResolver=o,this._positionBuilder=s,this._keyboardDispatcher=a,this._injector=c,this._ngZone=l,this._document=u,this._directionality=d,this._location=h,this._outsideClickDispatcher=f,this._animationsModuleType=p}create(n){let i=this._createHostElement(),o=this._createPaneElement(i),s=this._createPortalOutlet(o),a=new qi(n);return a.direction=a.direction||this._directionality.value,new Wi(s,i,o,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations")}position(){return this._positionBuilder}_createPaneElement(n){let i=this._document.createElement("div");return i.id=`cdk-overlay-${qF++}`,i.classList.add("cdk-overlay-pane"),n.appendChild(i),i}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(xr)),new g3(n,this._componentFactoryResolver,this._appRef,this._injector,this._document)}};e.\u0275fac=function(i){return new(i||e)(g(jF),g(Kw),g(Ei),g($F),g(Vh),g(Ue),g(U),g(V),g(Ft),g(ki),g(BF),g(gn,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),WF=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Zw=new E("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=w(ci);return()=>t.scrollStrategies.reposition()}}),GF=(()=>{let e=class e{constructor(n){this.elementRef=n}};e.\u0275fac=function(i){return new(i||e)(m(oe))},e.\u0275dir=ne({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0});let t=e;return t})(),K0e=(()=>{let e=class e{get offsetX(){return this._offsetX}set offsetX(n){this._offsetX=n,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(n){this._offsetY=n,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(n){this._disposeOnNavigation=n}constructor(n,i,o,s,a){this._overlay=n,this._dir=a,this._backdropSubscription=ye.EMPTY,this._attachSubscription=ye.EMPTY,this._detachSubscription=ye.EMPTY,this._positionSubscription=ye.EMPTY,this._disposeOnNavigation=!1,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new re,this.positionChange=new re,this.attach=new re,this.detach=new re,this.overlayKeydown=new re,this.overlayOutsideClick=new re,this._templatePortal=new ai(i,o),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(n){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),n.origin&&this.open&&this._position.apply()),n.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=WF);let n=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=n.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=n.detachments().subscribe(()=>this.detach.emit()),n.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),i.keyCode===27&&!this.disableClose&&!za(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){let n=this._position=this.positionStrategy||this._createPositionStrategy(),i=new qi({direction:this._dir,positionStrategy:n,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(i.width=this.width),(this.height||this.height===0)&&(i.height=this.height),(this.minWidth||this.minWidth===0)&&(i.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(n){let i=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return n.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let n=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(n),n}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof GF?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(n=>{this.backdropClick.emit(n)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(l0(()=>this.positionChange.observers.length>0)).subscribe(n=>{this.positionChange.emit(n),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)(m(ci),m(Me),m(Xe),m(Zw),m(Ft,8))},e.\u0275dir=ne({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[W.None,"cdkConnectedOverlayOrigin","origin"],positions:[W.None,"cdkConnectedOverlayPositions","positions"],positionStrategy:[W.None,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[W.None,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[W.None,"cdkConnectedOverlayOffsetY","offsetY"],width:[W.None,"cdkConnectedOverlayWidth","width"],height:[W.None,"cdkConnectedOverlayHeight","height"],minWidth:[W.None,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[W.None,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[W.None,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[W.None,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[W.None,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[W.None,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[W.None,"cdkConnectedOverlayOpen","open"],disableClose:[W.None,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[W.None,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[W.HasDecoratorInputTransform,"cdkConnectedOverlayHasBackdrop","hasBackdrop",ut],lockPosition:[W.HasDecoratorInputTransform,"cdkConnectedOverlayLockPosition","lockPosition",ut],flexibleDimensions:[W.HasDecoratorInputTransform,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",ut],growAfterOpen:[W.HasDecoratorInputTransform,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",ut],push:[W.HasDecoratorInputTransform,"cdkConnectedOverlayPush","push",ut],disposeOnNavigation:[W.HasDecoratorInputTransform,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",ut]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[rn,He]});let t=e;return t})();function KF(t){return()=>t.scrollStrategies.reposition()}var ZF={provide:Zw,deps:[ci],useFactory:KF},Qw=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[ci,ZF],imports:[Ro,ts,kh,kh]});let t=e;return t})();var Fr=(()=>{let e=class e{static ngTemplateContextGuard(n,i){return!0}recreateView(){this.viewContainer.clear();let n=this.nzStringTemplateOutlet instanceof Me,i=n?this.nzStringTemplateOutlet:this.templateRef;this.embeddedViewRef=this.viewContainer.createEmbeddedView(i,n?this.nzStringTemplateOutletContext:this.context)}updateContext(){let i=this.nzStringTemplateOutlet instanceof Me?this.nzStringTemplateOutletContext:this.context,o=this.embeddedViewRef.context;if(i)for(let s of Object.keys(i))o[s]=i[s]}constructor(n,i){this.viewContainer=n,this.templateRef=i,this.embeddedViewRef=null,this.context=new Yh,this.nzStringTemplateOutletContext=null,this.nzStringTemplateOutlet=null}ngOnChanges(n){let{nzStringTemplateOutletContext:i,nzStringTemplateOutlet:o}=n,s=()=>{let c=!1;if(o)if(o.firstChange)c=!0;else{let d=o.previousValue instanceof Me,h=o.currentValue instanceof Me;c=d||h}return i&&(d=>{let h=Object.keys(d.previousValue||{}),f=Object.keys(d.currentValue||{});if(h.length===f.length){for(let p of f)if(h.indexOf(p)===-1)return!0;return!1}else return!0})(i)||c};o&&(this.context.$implicit=o.currentValue),s()?this.recreateView():this.updateContext()}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me))},e.\u0275dir=ne({type:e,selectors:[["","nzStringTemplateOutlet",""]],inputs:{nzStringTemplateOutletContext:"nzStringTemplateOutletContext",nzStringTemplateOutlet:"nzStringTemplateOutlet"},exportAs:["nzStringTemplateOutlet"],standalone:!0,features:[He]});let t=e;return t})(),Yh=class{},Nr=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var Nt=class Nt{transform(e,r=0,n="B",i){if(!(ld(e)&&ld(r)&&r%1===0&&r>=0))return e;let o=e,s=n;for(;s!=="B";)o*=1024,s=Nt.formats[s].prev;if(i){let a=Nt.formats[i],c=ud(Nt.calculateResult(a,o),r);return Nt.formatResult(c,i)}for(let a in Nt.formats)if(Nt.formats.hasOwnProperty(a)){let c=Nt.formats[a];if(o{let e=class e{transform(n,i="px"){return typeof n=="number"?`${n}${i}`:n}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"nzToCssUnit",type:e,pure:!0,standalone:!0});let t=e;return t})();var Uh=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var eb=["moz","ms","webkit"];function XF(){let t=0;return function(e){let r=new Date().getTime(),n=Math.max(0,16-(r-t)),i=setTimeout(()=>{e(r+n)},n);return t=r+n,i}}function JF(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);let t=eb.filter(e=>`${e}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:XF()}function i8e(t){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(t);let e=eb.filter(r=>`${r}CancelAnimationFrame`in window||`${r}CancelRequestAnimationFrame`in window)[0];return e?(window[`${e}CancelAnimationFrame`]||window[`${e}CancelRequestAnimationFrame`]).call(this,t):clearTimeout(t)}var tb=JF();var nb=(()=>{let e=class e{create(n){return typeof MutationObserver>"u"?null:new MutationObserver(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),eN=(()=>{let e=class e{constructor(n){this._mutationObserverFactory=n,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((n,i)=>this._cleanupObserver(i))}observe(n){let i=rt(n);return new Y(o=>{let a=this._observeElement(i).subscribe(o);return()=>{a.unsubscribe(),this._unobserveElement(i)}})}_observeElement(n){if(this._observedElements.has(n))this._observedElements.get(n).count++;else{let i=new S,o=this._mutationObserverFactory.create(s=>i.next(s));o&&o.observe(n,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(n,{observer:o,stream:i,count:1})}return this._observedElements.get(n).stream}_unobserveElement(n){this._observedElements.has(n)&&(this._observedElements.get(n).count--,this._observedElements.get(n).count||this._cleanupObserver(n))}_cleanupObserver(n){if(this._observedElements.has(n)){let{observer:i,stream:o}=this._observedElements.get(n);i&&i.disconnect(),o.complete(),this._observedElements.delete(n)}}};e.\u0275fac=function(i){return new(i||e)(g(nb))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),m8e=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(n){this._debounce=ti(n),this._subscribe()}constructor(n,i,o){this._contentObserver=n,this._elementRef=i,this._ngZone=o,this.event=new re,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let n=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?n.pipe(wi(this.debounce)):n).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)(m(eN),m(oe),m(U))},e.\u0275dir=ne({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[W.HasDecoratorInputTransform,"cdkObserveContentDisabled","disabled",ut],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[rn]});let t=e;return t})(),rb=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[nb]});let t=e;return t})();var ib=new Set,rs,tN=(()=>{let e=class e{constructor(n,i){this._platform=n,this._nonce=i,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):rN}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&nN(n,this._nonce),this._matchMedia(n)}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(qr,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function nN(t,e){if(!ib.has(t))try{rs||(rs=document.createElement("style"),e&&(rs.nonce=e),rs.setAttribute("type","text/css"),document.head.appendChild(rs)),rs.sheet&&(rs.sheet.insertRule(`@media ${t} {body{ }}`,0),ib.add(t))}catch(r){console.error(r)}}function rN(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var sb=(()=>{let e=class e{constructor(n,i){this._mediaMatcher=n,this._zone=i,this._queries=new Map,this._destroySubject=new S}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return ob(zo(n)).some(o=>this._registerQuery(o).mql.matches)}observe(n){let o=ob(zo(n)).map(a=>this._registerQuery(a).observable),s=Ji(o);return s=dr(s.pipe(ze(1)),s.pipe(Va(1),wi(0))),s.pipe(Z(a=>{let c={matches:!1,breakpoints:{}};return a.forEach(({matches:l,query:u})=>{c.matches=c.matches||l,c.breakpoints[u]=l}),c}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);let i=this._mediaMatcher.matchMedia(n),s={observable:new Y(a=>{let c=l=>this._zone.run(()=>a.next(l));return i.addListener(c),()=>{i.removeListener(c)}}).pipe(Rt(i),Z(({matches:a})=>({query:n,matches:a})),ce(this._destroySubject)),mql:i};return this._queries.set(n,s),s}};e.\u0275fac=function(i){return new(i||e)(g(tN),g(U))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function ob(t){return t.map(e=>e.split(",")).reduce((e,r)=>e.concat(r)).map(e=>e.trim())}var qh=class{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new S,this._typeaheadSubscription=ye.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=r=>r.disabled,this._pressedLetters=[],this.tabOut=new S,this.change=new S,e instanceof Ns&&(this._itemChangesSubscription=e.changes.subscribe(r=>{if(this._activeItem){let i=r.toArray().indexOf(this._activeItem);i>-1&&i!==this._activeItemIndex&&(this._activeItemIndex=i)}}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Fe(r=>this._pressedLetters.push(r)),wi(e),ge(()=>this._pressedLetters.length>0),Z(()=>this._pressedLetters.join(""))).subscribe(r=>{let n=this._getItemsArray();for(let i=1;i!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(r){case 9:this.tabOut.next();return;case 40:if(this._vertical&&i){this.setNextItemActive();break}else return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&i){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&i){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&i){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&i){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&r<=90||r>=48&&r<=57)&&this._letterKeyStream.next(String.fromCharCode(r)));return}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){let r=this._getItemsArray(),n=typeof e=="number"?e:r.indexOf(e),i=r[n];this._activeItem=i??null,this._activeItemIndex=n}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){let r=this._getItemsArray();for(let n=1;n<=r.length;n++){let i=(this._activeItemIndex+e*n+r.length)%r.length,o=r[i];if(!this._skipPredicateFn(o)){this.setActiveItem(i);return}}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,r){let n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(e+=r,!n[e])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof Ns?this._items.toArray():this._items}};var ab=class extends qh{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}};var CN=(()=>{let e=class e{constructor(n){this._platform=n}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return DN(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let i=MN(PN(n));if(i&&(cb(i)===-1||!this.isVisible(i)))return!1;let o=n.nodeName.toLowerCase(),s=cb(n);return n.hasAttribute("contenteditable")?s!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!IN(n)?!1:o==="audio"?n.hasAttribute("controls")?s!==-1:!1:o==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,i){return kN(n)&&!this.isDisabled(n)&&(i?.ignoreVisibility||this.isVisible(n))}};e.\u0275fac=function(i){return new(i||e)(g(Ge))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function MN(t){try{return t.frameElement}catch{return null}}function DN(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function xN(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function SN(t){return EN(t)&&t.type=="hidden"}function TN(t){return zN(t)&&t.hasAttribute("href")}function EN(t){return t.nodeName.toLowerCase()=="input"}function zN(t){return t.nodeName.toLowerCase()=="a"}function db(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function cb(t){if(!db(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function IN(t){let e=t.nodeName.toLowerCase(),r=e==="input"&&t.type;return r==="text"||r==="password"||e==="select"||e==="textarea"}function kN(t){return SN(t)?!1:xN(t)||TN(t)||t.hasAttribute("contenteditable")||db(t)}function PN(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Wh=class{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,r,n,i,o=!1){this._element=e,this._checker=r,this._ngZone=n,this._document=i,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let e=this._startAnchor,r=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),r&&(r.removeEventListener("focus",this.endAnchorListener),r.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(r=>{this._executeOnStable(()=>r(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(r=>{this._executeOnStable(()=>r(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(r=>{this._executeOnStable(()=>r(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let r=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?r.length?r[0]:this._getFirstTabbableElement(this._element):r.length?r[r.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let r=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(r){if(!this._checker.isFocusable(r)){let n=this._getFirstTabbableElement(r);return n?.focus(e),!!n}return r.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let r=this._getRegionBoundary("start");return r&&r.focus(e),!!r}focusLastTabbableElement(e){let r=this._getRegionBoundary("end");return r&&r.focus(e),!!r}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let r=e.children;for(let n=0;n=0;n--){let i=r[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(r[n]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,r){e?r.setAttribute("tabindex","0"):r.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(ze(1)).subscribe(e)}},ka=(()=>{let e=class e{constructor(n,i,o){this._checker=n,this._ngZone=i,this._document=o}create(n,i=!1){return new Wh(n,this._checker,this._ngZone,this._document,i)}};e.\u0275fac=function(i){return new(i||e)(g(CN),g(U),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),j8e=(()=>{let e=class e{get enabled(){return this.focusTrap?.enabled||!1}set enabled(n){this.focusTrap&&(this.focusTrap.enabled=n)}constructor(n,i,o){this._elementRef=n,this._focusTrapFactory=i,this._previouslyFocusedElement=null,w(Ge).isBrowser&&(this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0))}ngOnDestroy(){this.focusTrap?.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap?.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap&&!this.focusTrap.hasAttached()&&this.focusTrap.attachAnchors()}ngOnChanges(n){let i=n.autoCapture;i&&!i.firstChange&&this.autoCapture&&this.focusTrap?.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=Cy(),this.focusTrap?.focusInitialElementWhenReady()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(ka),m(V))},e.\u0275dir=ne({type:e,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:[W.HasDecoratorInputTransform,"cdkTrapFocus","enabled",ut],autoCapture:[W.HasDecoratorInputTransform,"cdkTrapFocusAutoCapture","autoCapture",ut]},exportAs:["cdkTrapFocus"],standalone:!0,features:[rn,He]});let t=e;return t})();function Gh(t){return t.buttons===0||t.detail===0}function Kh(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}var ON=new E("cdk-input-modality-detector-options"),AN={ignoreKeys:[18,17,224,91,16]},hb=650,Ia=Fo({passive:!0,capture:!0}),FN=(()=>{let e=class e{get mostRecentModality(){return this._modality.value}constructor(n,i,o,s){this._platform=n,this._mostRecentTarget=null,this._modality=new Re(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(c=>c===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cn(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs{if(Kh(a)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cn(a)},this._options=b(b({},AN),s),this.modalityDetected=this._modality.pipe(Va(1)),this.modalityChanged=this.modalityDetected.pipe(ws()),n.isBrowser&&i.runOutsideAngular(()=>{o.addEventListener("keydown",this._onKeydown,Ia),o.addEventListener("mousedown",this._onMousedown,Ia),o.addEventListener("touchstart",this._onTouchstart,Ia)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Ia),document.removeEventListener("mousedown",this._onMousedown,Ia),document.removeEventListener("touchstart",this._onTouchstart,Ia))}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(U),g(V),g(ON,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var b3=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(b3||{}),NN=new E("cdk-focus-monitor-default-options"),w3=Fo({passive:!0,capture:!0}),RN=(()=>{let e=class e{constructor(n,i,o,s,a){this._ngZone=n,this._platform=i,this._inputModalityDetector=o,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new S,this._rootNodeFocusAndBlurListener=c=>{let l=cn(c);for(let u=l;u;u=u.parentElement)c.type==="focus"?this._onFocus(c,u):this._onBlur(c,u)},this._document=s,this._detectionMode=a?.detectionMode||b3.IMMEDIATE}monitor(n,i=!1){let o=rt(n);if(!this._platform.isBrowser||o.nodeType!==1)return A();let s=al(o)||this._getDocument(),a=this._elementInfo.get(o);if(a)return i&&(a.checkChildren=!0),a.subject;let c={checkChildren:i,subject:new S,rootNode:s};return this._elementInfo.set(o,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let i=rt(n),o=this._elementInfo.get(i);o&&(o.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(o))}focusVia(n,i,o){let s=rt(n),a=this._getDocument().activeElement;s===a?this._getClosestElementsInfo(s).forEach(([c,l])=>this._originChanged(c,i,l)):(this._setOrigin(i),typeof s.focus=="function"&&s.focus(o))}ngOnDestroy(){this._elementInfo.forEach((n,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===b3.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,i){n.classList.toggle("cdk-focused",!!i),n.classList.toggle("cdk-touch-focused",i==="touch"),n.classList.toggle("cdk-keyboard-focused",i==="keyboard"),n.classList.toggle("cdk-mouse-focused",i==="mouse"),n.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(n,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&i,this._detectionMode===b3.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?hb:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(n,i){let o=this._elementInfo.get(i),s=cn(n);!o||!o.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),o)}_onBlur(n,i){let o=this._elementInfo.get(i);!o||o.checkChildren&&n.relatedTarget instanceof Node&&i.contains(n.relatedTarget)||(this._setClasses(i),this._emitOrigin(o,null))}_emitOrigin(n,i){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(i))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let i=n.rootNode,o=this._rootNodeFocusListenerCount.get(i)||0;o||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,w3),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,w3)}),this._rootNodeFocusListenerCount.set(i,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ce(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let i=n.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let o=this._rootNodeFocusListenerCount.get(i);o>1?this._rootNodeFocusListenerCount.set(i,o-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,w3),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,w3),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,i,o){this._setClasses(n,i),this._emitOrigin(o,i),this._lastFocusOrigin=i}_getClosestElementsInfo(n){let i=[];return this._elementInfo.forEach((o,s)=>{(s===n||o.checkChildren&&s.contains(n))&&i.push([s,o])}),i}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:i,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!i||i===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let a=0;a{let e=class e{constructor(n,i){this._elementRef=n,this._focusMonitor=i,this._focusOrigin=null,this.cdkFocusChange=new re}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let n=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(n,n.nodeType===1&&n.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(i=>{this._focusOrigin=i,this.cdkFocusChange.emit(i)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(RN))},e.\u0275dir=ne({type:e,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"],standalone:!0});let t=e;return t})(),is=function(t){return t[t.NONE=0]="NONE",t[t.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",t[t.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",t}(is||{}),lb="cdk-high-contrast-black-on-white",ub="cdk-high-contrast-white-on-black",$h="cdk-high-contrast-active",LN=(()=>{let e=class e{constructor(n,i){this._platform=n,this._document=i,this._breakpointSubscription=w(sb).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return is.NONE;let n=this._document.createElement("div");n.style.backgroundColor="rgb(1,2,3)",n.style.position="absolute",this._document.body.appendChild(n);let i=this._document.defaultView||window,o=i&&i.getComputedStyle?i.getComputedStyle(n):null,s=(o&&o.backgroundColor||"").replace(/ /g,"");switch(n.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return is.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return is.BLACK_ON_WHITE}return is.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let n=this._document.body.classList;n.remove($h,lb,ub),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();i===is.BLACK_ON_WHITE?n.add($h,lb):i===is.WHITE_ON_BLACK&&n.add($h,ub)}}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),U8e=(()=>{let e=class e{constructor(n){n._applyBodyHighContrastModeCssClasses()}};e.\u0275fac=function(i){return new(i||e)(g(LN))},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[rb]});let t=e;return t})();var HN=["nz-modal-close",""];function VN(t,e){if(t&1&&(tt(0),et(1,"span",2),nt()),t&2){let r=e.$implicit;k(),I("nzType",r)}}var gb=["modalElement"];function YN(t,e){if(t&1){let r=Pn();se(0,"button",16),Pt("click",function(){pn(r);let i=G();return mn(i.onCloseClick())}),le()}}function jN(t,e){if(t&1&&(tt(0),et(1,"span",17),nt()),t&2){let r=G();k(),I("innerHTML",r.config.nzTitle,Dr)}}function BN(t,e){}function UN(t,e){if(t&1&&et(0,"div",17),t&2){let r=G();I("innerHTML",r.config.nzContent,Dr)}}function $N(t,e){if(t&1){let r=Pn();se(0,"button",18),Pt("click",function(){pn(r);let i=G();return mn(i.onCancel())}),er(1),le()}if(t&2){let r=G();I("nzLoading",!!r.config.nzCancelLoading)("disabled",r.config.nzCancelDisabled),kn("cdkFocusInitial",r.config.nzAutofocus==="cancel"||null),k(),zi(" ",r.config.nzCancelText||r.locale.cancelText," ")}}function qN(t,e){if(t&1){let r=Pn();se(0,"button",19),Pt("click",function(){pn(r);let i=G();return mn(i.onOk())}),er(1),le()}if(t&2){let r=G();I("nzType",r.config.nzOkType)("nzLoading",!!r.config.nzOkLoading)("disabled",r.config.nzOkDisabled)("nzDanger",r.config.nzOkDanger),kn("cdkFocusInitial",r.config.nzAutofocus==="ok"||null),k(),zi(" ",r.config.nzOkText||r.locale.okText," ")}}var WN=["nz-modal-footer",""];function GN(t,e){if(t&1&&et(0,"div",5),t&2){let r=G(3);I("innerHTML",r.config.nzFooter,Dr)}}function KN(t,e){if(t&1){let r=Pn();se(0,"button",7),Pt("click",function(){let o=pn(r).$implicit,s=G(4);return mn(s.onButtonClick(o))}),er(1),le()}if(t&2){let r=e.$implicit,n=G(4);I("hidden",!n.getButtonCallableProp(r,"show"))("nzLoading",n.getButtonCallableProp(r,"loading"))("disabled",n.getButtonCallableProp(r,"disabled"))("nzType",r.type)("nzDanger",r.danger)("nzShape",r.shape)("nzSize",r.size)("nzGhost",r.ghost),k(),zi(" ",r.label," ")}}function ZN(t,e){if(t&1&&(tt(0),Q(1,KN,2,9,"button",6),nt()),t&2){let r=G(3);k(),I("ngForOf",r.buttons)}}function QN(t,e){if(t&1&&(tt(0),Q(1,GN,1,1,"div",3)(2,ZN,2,1,"ng-container",4),nt()),t&2){let r=G(2);k(),I("ngIf",!r.buttonsFooter),k(),I("ngIf",r.buttonsFooter)}}var XN=(t,e)=>({$implicit:t,modalRef:e});function JN(t,e){if(t&1&&(tt(0),Q(1,QN,3,2,"ng-container",2),nt()),t&2){let r=G();k(),I("nzStringTemplateOutlet",r.config.nzFooter)("nzStringTemplateOutletContext",S7(2,XN,r.config.nzData,r.modalRef))}}function eR(t,e){if(t&1){let r=Pn();se(0,"button",10),Pt("click",function(){pn(r);let i=G(2);return mn(i.onCancel())}),er(1),le()}if(t&2){let r=G(2);I("nzLoading",!!r.config.nzCancelLoading)("disabled",r.config.nzCancelDisabled),kn("cdkFocusInitial",r.config.nzAutofocus==="cancel"||null),k(),zi(" ",r.config.nzCancelText||r.locale.cancelText," ")}}function tR(t,e){if(t&1){let r=Pn();se(0,"button",11),Pt("click",function(){pn(r);let i=G(2);return mn(i.onOk())}),er(1),le()}if(t&2){let r=G(2);I("nzType",r.config.nzOkType)("nzDanger",r.config.nzOkDanger)("nzLoading",!!r.config.nzOkLoading)("disabled",r.config.nzOkDisabled),kn("cdkFocusInitial",r.config.nzAutofocus==="ok"||null),k(),zi(" ",r.config.nzOkText||r.locale.okText," ")}}function nR(t,e){if(t&1&&Q(0,eR,2,4,"button",8)(1,tR,2,6,"button",9),t&2){let r=G();I("ngIf",r.config.nzCancelText!==null),k(),I("ngIf",r.config.nzOkText!==null)}}var rR=["nz-modal-title",""];function iR(t,e){if(t&1&&(tt(0),et(1,"div",2),nt()),t&2){let r=G();k(),I("innerHTML",r.config.nzTitle,Dr)}}function oR(t,e){if(t&1){let r=Pn();se(0,"button",9),Pt("click",function(){pn(r);let i=G();return mn(i.onCloseClick())}),le()}}function sR(t,e){t&1&&et(0,"div",10)}function aR(t,e){}function cR(t,e){if(t&1&&et(0,"div",11),t&2){let r=G();I("innerHTML",r.config.nzContent,Dr)}}function lR(t,e){if(t&1){let r=Pn();se(0,"div",12),Pt("cancelTriggered",function(){pn(r);let i=G();return mn(i.onCloseClick())})("okTriggered",function(){pn(r);let i=G();return mn(i.onOkClick())}),le()}if(t&2){let r=G();I("modalRef",r.modalRef)}}var pb=()=>{},li=class{constructor(){this.nzCentered=!1,this.nzClosable=!0,this.nzOkLoading=!1,this.nzOkDisabled=!1,this.nzCancelDisabled=!1,this.nzCancelLoading=!1,this.nzNoAnimation=!1,this.nzAutofocus="auto",this.nzKeyboard=!0,this.nzZIndex=1e3,this.nzWidth=520,this.nzCloseIcon="close",this.nzOkType="primary",this.nzOkDanger=!1,this.nzModalType="default",this.nzOnCancel=pb,this.nzOnOk=pb,this.nzIconType="question-circle"}},Gi={enter:"ant-zoom-enter",enterActive:"ant-zoom-enter-active",leave:"ant-zoom-leave",leaveActive:"ant-zoom-leave-active"},Pa={enter:"ant-fade-enter",enterActive:"ant-fade-enter-active",leave:"ant-fade-leave",leaveActive:"ant-fade-leave-active"},_3="ant-modal-mask",C3="modal",uR=new E("NZ_MODAL_DATA"),vb={modalContainer:$9("modalContainer",[pd("void, exit",Yi({})),pd("enter",Yi({})),md("* => enter",fd(".24s",Yi({}))),md("* => void, * => exit",fd(".2s",Yi({})))])},Zh=(()=>{let e=class e{constructor(n){this.config=n}};e.\u0275fac=function(i){return new(i||e)(m(li))},e.\u0275cmp=bt({type:e,selectors:[["button","nz-modal-close",""]],hostAttrs:["aria-label","Close",1,"ant-modal-close"],exportAs:["NzModalCloseBuiltin"],standalone:!0,features:[_t],attrs:HN,decls:2,vars:1,consts:[[1,"ant-modal-close-x"],[4,"nzStringTemplateOutlet"],["nz-icon","",1,"ant-modal-close-icon",3,"nzType"]],template:function(i,o){i&1&&(se(0,"span",0),Q(1,VN,2,1,"ng-container",1),le()),i&2&&(k(),I("nzStringTemplateOutlet",o.config.nzCloseIcon))},dependencies:[No,ii,Nr,Fr],encapsulation:2,changeDetection:0});let t=e;return t})();function dR(t,e){return b(b({},e),t)}function Ml(t,e,r){return typeof t>"u"?typeof e>"u"?r:e:t}function mb(){throw Error("Attempting to attach modal content after content is already attached")}var yb=(()=>{let e=class e extends Ea{get showMask(){let n=this.nzConfigService.getConfigForComponent(C3)||{};return!!Ml(this.config.nzMask,n.nzMask,!0)}get maskClosable(){let n=this.nzConfigService.getConfigForComponent(C3)||{};return!!Ml(this.config.nzMaskClosable,n.nzMaskClosable,!0)}constructor(n,i,o,s,a,c,l,u,d,h){super(),this.ngZone=n,this.host=i,this.focusTrapFactory=o,this.cdr=s,this.render=a,this.overlayRef=c,this.nzConfigService=l,this.config=u,this.animationType=h,this.animationStateChanged=new re,this.containerClick=new re,this.cancelTriggered=new re,this.okTriggered=new re,this.state="enter",this.isStringContent=!1,this.dir="ltr",this.elementFocusedBeforeModalWasOpened=null,this.mouseDown=!1,this.oldMaskStyle=null,this.destroy$=new S,this.document=d,this.dir=c.getDirection(),this.isStringContent=typeof u.nzContent=="string",this.nzConfigService.getConfigChangeEventForComponent(C3).pipe(ce(this.destroy$)).subscribe(()=>{this.updateMaskClassname()})}onContainerClick(n){n.target===n.currentTarget&&!this.mouseDown&&this.showMask&&this.maskClosable&&this.containerClick.emit()}onCloseClick(){this.cancelTriggered.emit()}onOkClick(){this.okTriggered.emit()}attachComponentPortal(n){return this.portalOutlet.hasAttached()&&mb(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this.portalOutlet.attachComponentPortal(n)}attachTemplatePortal(n){return this.portalOutlet.hasAttached()&&mb(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this.portalOutlet.attachTemplatePortal(n)}attachStringContent(){this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop()}getNativeElement(){return this.host.nativeElement}animationDisabled(){return this.config.nzNoAnimation||this.animationType==="NoopAnimations"}setModalTransformOrigin(){let n=this.modalElementRef.nativeElement;if(this.elementFocusedBeforeModalWasOpened){let i=this.elementFocusedBeforeModalWasOpened.getBoundingClientRect(),o=L9(this.elementFocusedBeforeModalWasOpened),s=o.left+i.width/2,a=o.top+i.height/2,c=`${s-n.offsetLeft}px ${a-n.offsetTop}px 0px`;this.render.setStyle(n,"transform-origin",c)}}savePreviouslyFocusedElement(){this.focusTrap||(this.focusTrap=this.focusTrapFactory.create(this.host.nativeElement)),this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement,this.host.nativeElement.focus&&this.ngZone.runOutsideAngular(()=>tb(()=>this.host.nativeElement.focus())))}trapFocus(){let n=this.host.nativeElement;if(this.config.nzAutofocus)this.focusTrap.focusInitialElementWhenReady();else{let i=this.document.activeElement;i!==n&&!n.contains(i)&&n.focus()}}restoreFocus(){let n=this.elementFocusedBeforeModalWasOpened;if(n&&typeof n.focus=="function"){let i=this.document.activeElement,o=this.host.nativeElement;(!i||i===this.document.body||i===o||o.contains(i))&&n.focus()}this.focusTrap&&this.focusTrap.destroy()}setEnterAnimationClass(){if(this.animationDisabled())return;this.setModalTransformOrigin();let n=this.modalElementRef.nativeElement,i=this.overlayRef.backdropElement;n.classList.add(Gi.enter),n.classList.add(Gi.enterActive),i&&(i.classList.add(Pa.enter),i.classList.add(Pa.enterActive))}setExitAnimationClass(){let n=this.modalElementRef.nativeElement;n.classList.add(Gi.leave),n.classList.add(Gi.leaveActive),this.setMaskExitAnimationClass()}setMaskExitAnimationClass(n=!1){let i=this.overlayRef.backdropElement;if(i){if(this.animationDisabled()||n){i.classList.remove(_3);return}i.classList.add(Pa.leave),i.classList.add(Pa.leaveActive)}}cleanAnimationClass(){if(this.animationDisabled())return;let n=this.overlayRef.backdropElement,i=this.modalElementRef.nativeElement;n&&(n.classList.remove(Pa.enter),n.classList.remove(Pa.enterActive)),i.classList.remove(Gi.enter),i.classList.remove(Gi.enterActive),i.classList.remove(Gi.leave),i.classList.remove(Gi.leaveActive)}setZIndexForBackdrop(){let n=this.overlayRef.backdropElement;n&&Mn(this.config.nzZIndex)&&this.render.setStyle(n,"z-index",this.config.nzZIndex)}bindBackdropStyle(){let n=this.overlayRef.backdropElement;if(n){if(this.oldMaskStyle){let i=this.oldMaskStyle;Object.keys(i).forEach(o=>{this.render.removeStyle(n,o)}),this.oldMaskStyle=null}if(this.setZIndexForBackdrop(),typeof this.config.nzMaskStyle=="object"&&Object.keys(this.config.nzMaskStyle).length){let i=b({},this.config.nzMaskStyle);Object.keys(i).forEach(o=>{this.render.setStyle(n,o,i[o])}),this.oldMaskStyle=i}}}updateMaskClassname(){let n=this.overlayRef.backdropElement;n&&(this.showMask?n.classList.add(_3):n.classList.remove(_3))}onAnimationDone(n){n.toState==="enter"?this.trapFocus():n.toState==="exit"&&this.restoreFocus(),this.cleanAnimationClass(),this.animationStateChanged.emit(n)}onAnimationStart(n){n.toState==="enter"?(this.setEnterAnimationClass(),this.bindBackdropStyle()):n.toState==="exit"&&this.setExitAnimationClass(),this.animationStateChanged.emit(n)}startExitAnimation(){this.state="exit",this.cdr.markForCheck()}ngOnDestroy(){this.setMaskExitAnimationClass(!0),this.destroy$.next(!0),this.destroy$.complete()}setupMouseListeners(n){this.ngZone.runOutsideAngular(()=>{Kn(this.host.nativeElement,"mouseup").pipe(ce(this.destroy$)).subscribe(()=>{this.mouseDown&&setTimeout(()=>{this.mouseDown=!1})}),Kn(n.nativeElement,"mousedown").pipe(ce(this.destroy$)).subscribe(()=>{this.mouseDown=!0})})}};e.\u0275fac=function(i){n4()},e.\u0275dir=ne({type:e,features:[nn]});let t=e;return t})(),wb=(()=>{let e=class e extends yb{constructor(n,i,o,s,a,c,l,u,d,h,f){super(n,o,s,a,c,l,u,d,h,f),this.i18n=i,this.config=d,this.cancelTriggered=new re,this.okTriggered=new re,this.i18n.localeChange.pipe(ce(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Modal")})}ngOnInit(){this.setupMouseListeners(this.modalElementRef)}onCancel(){this.cancelTriggered.emit()}onOk(){this.okTriggered.emit()}};e.\u0275fac=function(i){return new(i||e)(m(U),m($i),m(oe),m(ka),m(ft),m(st),m(Wi),m(Rn),m(li),m(V,8),m(gn,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-modal-confirm-container"]],viewQuery:function(i,o){if(i&1&&(On(Ar,7),On(gb,7)),i&2){let s;ct(s=lt())&&(o.portalOutlet=s.first),ct(s=lt())&&(o.modalElementRef=s.first)}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:10,hostBindings:function(i,o){i&1&&(u4("@modalContainer.start",function(a){return o.onAnimationStart(a)})("@modalContainer.done",function(a){return o.onAnimationDone(a)}),Pt("click",function(a){return o.onContainerClick(a)})),i&2&&(l4("@.disabled",o.config.nzNoAnimation)("@modalContainer",o.state),Du(o.config.nzWrapClassName?"ant-modal-wrap "+o.config.nzWrapClassName:"ant-modal-wrap"),Gt("z-index",o.config.nzZIndex),St("ant-modal-wrap-rtl",o.dir==="rtl")("ant-modal-centered",o.config.nzCentered))},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalConfirmContainer"],standalone:!0,features:[nn,_t],decls:17,vars:13,consts:[["role","document",1,"ant-modal",3,"ngClass","ngStyle"],["modalElement",""],[1,"ant-modal-content"],["nz-modal-close","",3,"click",4,"ngIf"],[1,"ant-modal-body",3,"ngStyle"],[1,"ant-modal-confirm-body-wrapper"],[1,"ant-modal-confirm-body"],["nz-icon","",3,"nzType"],[1,"ant-modal-confirm-title"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-confirm-content"],["cdkPortalOutlet",""],[3,"innerHTML",4,"ngIf"],[1,"ant-modal-confirm-btns"],["nz-button","",3,"nzLoading","disabled","click",4,"ngIf"],["nz-button","",3,"nzType","nzLoading","disabled","nzDanger","click",4,"ngIf"],["nz-modal-close","",3,"click"],[3,"innerHTML"],["nz-button","",3,"nzLoading","disabled","click"],["nz-button","",3,"nzType","nzLoading","disabled","nzDanger","click"]],template:function(i,o){i&1&&(se(0,"div",0,1),Tu(2,"nzToCssUnit"),se(3,"div",2),Q(4,YN,1,0,"button",3),se(5,"div",4)(6,"div",5)(7,"div",6),et(8,"span",7),se(9,"span",8),Q(10,jN,2,1,"ng-container",9),le(),se(11,"div",10),Q(12,BN,0,0,"ng-template",11)(13,UN,1,1,"div",12),le()(),se(14,"div",13),Q(15,$N,2,4,"button",14)(16,qN,2,6,"button",15),le()()()()()),i&2&&(Gt("width",Eu(2,11,o.config==null?null:o.config.nzWidth)),I("ngClass",o.config.nzClassName)("ngStyle",o.config.nzStyle),k(4),I("ngIf",o.config.nzClosable),k(),I("ngStyle",o.config.nzBodyStyle),k(3),I("nzType",o.config.nzIconType),k(2),I("nzStringTemplateOutlet",o.config.nzTitle),k(3),I("ngIf",o.isStringContent),k(2),I("ngIf",o.config.nzCancelText!==null),k(),I("ngIf",o.config.nzOkText!==null))},dependencies:[fc,_o,Uh,Bh,No,ii,nr,Zh,Nr,Fr,ts,Ar,rh,F2,eh,nh],encapsulation:2,data:{animation:[vb.modalContainer]}});let t=e;return t})(),bb=(()=>{let e=class e{constructor(n,i){this.i18n=n,this.config=i,this.buttonsFooter=!1,this.buttons=[],this.cancelTriggered=new re,this.okTriggered=new re,this.destroy$=new S,Array.isArray(i.nzFooter)&&(this.buttonsFooter=!0,this.buttons=i.nzFooter.map(hR)),this.i18n.localeChange.pipe(ce(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Modal")})}onCancel(){this.cancelTriggered.emit()}onOk(){this.okTriggered.emit()}getButtonCallableProp(n,i){let o=n[i],s=this.modalRef.getContentComponent();return typeof o=="function"?o.apply(n,s&&[s]):o}onButtonClick(n){if(!this.getButtonCallableProp(n,"loading")){let o=this.getButtonCallableProp(n,"onClick");n.autoLoading&&u2(o)&&(n.loading=!0,o.then(()=>n.loading=!1).catch(s=>{throw n.loading=!1,s}))}}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(m($i),m(li))},e.\u0275cmp=bt({type:e,selectors:[["div","nz-modal-footer",""]],hostAttrs:[1,"ant-modal-footer"],inputs:{modalRef:"modalRef"},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["NzModalFooterBuiltin"],standalone:!0,features:[_t],attrs:WN,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["defaultFooterButtons",""],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[3,"innerHTML",4,"ngIf"],[4,"ngIf"],[3,"innerHTML"],["nz-button","",3,"hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost","click",4,"ngFor","ngForOf"],["nz-button","",3,"hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost","click"],["nz-button","",3,"nzLoading","disabled","click",4,"ngIf"],["nz-button","",3,"nzType","nzDanger","nzLoading","disabled","click",4,"ngIf"],["nz-button","",3,"nzLoading","disabled","click"],["nz-button","",3,"nzType","nzDanger","nzLoading","disabled","click"]],template:function(i,o){if(i&1&&Q(0,JN,2,5,"ng-container",0)(1,nR,2,2,"ng-template",null,1,bo),i&2){let s=$s(2);I("ngIf",o.config.nzFooter)("ngIfElse",s)}},dependencies:[nr,Nr,Fr,pc,rh,F2,eh,nh],encapsulation:2});let t=e;return t})();function hR(t){return b({type:null,size:"default",autoLoading:!0,show:!0,loading:!1,disabled:!1},t)}var _b=(()=>{let e=class e{constructor(n){this.config=n}};e.\u0275fac=function(i){return new(i||e)(m(li))},e.\u0275cmp=bt({type:e,selectors:[["div","nz-modal-title",""]],hostAttrs:[1,"ant-modal-header"],exportAs:["NzModalTitleBuiltin"],standalone:!0,features:[_t],attrs:rR,decls:2,vars:1,consts:[[1,"ant-modal-title"],[4,"nzStringTemplateOutlet"],[3,"innerHTML"]],template:function(i,o){i&1&&(se(0,"div",0),Q(1,iR,2,1,"ng-container",1),le()),i&2&&(k(),I("nzStringTemplateOutlet",o.config.nzTitle))},dependencies:[Nr,Fr],encapsulation:2,changeDetection:0});let t=e;return t})(),Cb=(()=>{let e=class e extends yb{constructor(n,i,o,s,a,c,l,u,d,h){super(n,i,o,s,a,c,l,u,d,h),this.config=u}ngOnInit(){this.setupMouseListeners(this.modalElementRef)}};e.\u0275fac=function(i){return new(i||e)(m(U),m(oe),m(ka),m(ft),m(st),m(Wi),m(Rn),m(li),m(V,8),m(gn,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-modal-container"]],viewQuery:function(i,o){if(i&1&&(On(Ar,7),On(gb,7)),i&2){let s;ct(s=lt())&&(o.portalOutlet=s.first),ct(s=lt())&&(o.modalElementRef=s.first)}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:10,hostBindings:function(i,o){i&1&&(u4("@modalContainer.start",function(a){return o.onAnimationStart(a)})("@modalContainer.done",function(a){return o.onAnimationDone(a)}),Pt("click",function(a){return o.onContainerClick(a)})),i&2&&(l4("@.disabled",o.config.nzNoAnimation)("@modalContainer",o.state),Du(o.config.nzWrapClassName?"ant-modal-wrap "+o.config.nzWrapClassName:"ant-modal-wrap"),Gt("z-index",o.config.nzZIndex),St("ant-modal-wrap-rtl",o.dir==="rtl")("ant-modal-centered",o.config.nzCentered))},exportAs:["nzModalContainer"],standalone:!0,features:[nn,_t],decls:10,vars:11,consts:[["role","document",1,"ant-modal",3,"ngClass","ngStyle"],["modalElement",""],[1,"ant-modal-content"],["nz-modal-close","",3,"click",4,"ngIf"],["nz-modal-title","",4,"ngIf"],[1,"ant-modal-body",3,"ngStyle"],["cdkPortalOutlet",""],[3,"innerHTML",4,"ngIf"],["nz-modal-footer","",3,"modalRef","cancelTriggered","okTriggered",4,"ngIf"],["nz-modal-close","",3,"click"],["nz-modal-title",""],[3,"innerHTML"],["nz-modal-footer","",3,"modalRef","cancelTriggered","okTriggered"]],template:function(i,o){i&1&&(se(0,"div",0,1),Tu(2,"nzToCssUnit"),se(3,"div",2),Q(4,oR,1,0,"button",3)(5,sR,1,0,"div",4),se(6,"div",5),Q(7,aR,0,0,"ng-template",6)(8,cR,1,1,"div",7),le(),Q(9,lR,1,1,"div",8),le()()),i&2&&(Gt("width",Eu(2,9,o.config==null?null:o.config.nzWidth)),I("ngClass",o.config.nzClassName)("ngStyle",o.config.nzStyle),k(4),I("ngIf",o.config.nzClosable),k(),I("ngIf",o.config.nzTitle),k(),I("ngStyle",o.config.nzBodyStyle),k(2),I("ngIf",o.isStringContent),k(),I("ngIf",o.config.nzFooter!==null))},dependencies:[fc,_o,nr,Zh,_b,ts,Ar,bb,Uh,Bh],encapsulation:2,data:{animation:[vb.modalContainer]}});let t=e;return t})(),M3=class{constructor(e,r,n){this.overlayRef=e,this.config=r,this.containerInstance=n,this.componentInstance=null,this.state=0,this.afterClose=new S,this.afterOpen=new S,this.destroy$=new S,n.animationStateChanged.pipe(ge(i=>i.phaseName==="done"&&i.toState==="enter"),ze(1)).subscribe(()=>{this.afterOpen.next(),this.afterOpen.complete(),r.nzAfterOpen instanceof re&&r.nzAfterOpen.emit()}),n.animationStateChanged.pipe(ge(i=>i.phaseName==="done"&&i.toState==="exit"),ze(1)).subscribe(()=>{clearTimeout(this.closeTimeout),this._finishDialogClose()}),n.containerClick.pipe(ze(1),ce(this.destroy$)).subscribe(()=>{!this.config.nzCancelLoading&&!this.config.nzOkLoading&&this.trigger("cancel")}),e.keydownEvents().pipe(ge(i=>this.config.nzKeyboard&&!this.config.nzCancelLoading&&!this.config.nzOkLoading&&i.keyCode===27&&!za(i))).subscribe(i=>{i.preventDefault(),this.trigger("cancel")}),n.cancelTriggered.pipe(ce(this.destroy$)).subscribe(()=>this.trigger("cancel")),n.okTriggered.pipe(ce(this.destroy$)).subscribe(()=>this.trigger("ok")),e.detachments().subscribe(()=>{this.afterClose.next(this.result),this.afterClose.complete(),r.nzAfterClose instanceof re&&r.nzAfterClose.emit(this.result),this.componentInstance=null,this.overlayRef.dispose()})}getContentComponent(){return this.componentInstance}getElement(){return this.containerInstance.getNativeElement()}destroy(e){this.close(e)}triggerOk(){return this.trigger("ok")}triggerCancel(){return this.trigger("cancel")}close(e){this.state===0&&(this.result=e,this.containerInstance.animationStateChanged.pipe(ge(r=>r.phaseName==="start"),ze(1)).subscribe(r=>{this.overlayRef.detachBackdrop(),this.closeTimeout=setTimeout(()=>{this._finishDialogClose()},r.totalTime+100)}),this.containerInstance.startExitAnimation(),this.state=1)}updateConfig(e){Object.assign(this.config,e),this.containerInstance.bindBackdropStyle(),this.containerInstance.cdr.markForCheck()}getState(){return this.state}getConfig(){return this.config}getBackdropElement(){return this.overlayRef.backdropElement}trigger(e){return L3(this,null,function*(){if(this.state===1)return;let r={ok:this.config.nzOnOk,cancel:this.config.nzOnCancel}[e],n={ok:"nzOkLoading",cancel:"nzCancelLoading"}[e];if(!this.config[n]){if(r instanceof re)r.emit(this.getContentComponent());else if(typeof r=="function"){let o=r(this.getContentComponent());if(u2(o)){this.config[n]=!0;let s=!1;try{s=yield o}finally{this.config[n]=!1,this.closeWhitResult(s)}}else this.closeWhitResult(o)}}})}closeWhitResult(e){e!==!1&&this.close(e)}_finishDialogClose(){this.state=2,this.overlayRef.dispose(),this.destroy$.next()}},Qh=(()=>{let e=class e{get openModals(){return this.parentModal?this.parentModal.openModals:this.openModalsAtThisLevel}get _afterAllClosed(){let n=this.parentModal;return n?n._afterAllClosed:this.afterAllClosedAtThisLevel}constructor(n,i,o,s,a){this.overlay=n,this.injector=i,this.nzConfigService=o,this.parentModal=s,this.directionality=a,this.openModalsAtThisLevel=[],this.afterAllClosedAtThisLevel=new S,this.afterAllClose=gs(()=>this.openModals.length?this._afterAllClosed:this._afterAllClosed.pipe(Rt(void 0)))}create(n){return this.open(n.nzContent,n)}closeAll(){this.closeModals(this.openModals)}confirm(n={},i="confirm"){return"nzFooter"in n&&Cn(`The Confirm-Modal doesn't support "nzFooter", this property will be ignored.`),"nzWidth"in n||(n.nzWidth=416),"nzMaskClosable"in n||(n.nzMaskClosable=!1),n.nzModalType="confirm",n.nzClassName=`ant-modal-confirm ant-modal-confirm-${i} ${n.nzClassName||""}`,this.create(n)}info(n={}){return this.confirmFactory(n,"info")}success(n={}){return this.confirmFactory(n,"success")}error(n={}){return this.confirmFactory(n,"error")}warning(n={}){return this.confirmFactory(n,"warning")}open(n,i){let o=dR(i||{},new li),s=this.createOverlay(o),a=this.attachModalContainer(s,o),c=this.attachModalContent(n,a,s,o);return a.modalRef=c,this.openModals.push(c),c.afterClose.subscribe(()=>this.removeOpenModal(c)),c}removeOpenModal(n){let i=this.openModals.indexOf(n);i>-1&&(this.openModals.splice(i,1),this.openModals.length||this._afterAllClosed.next())}closeModals(n){let i=n.length;for(;i--;)n[i].close(),this.openModals.length||this._afterAllClosed.next()}createOverlay(n){let i=this.nzConfigService.getConfigForComponent(C3)||{},o=new qi({hasBackdrop:!0,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global(),disposeOnNavigation:Ml(n.nzCloseOnNavigation,i.nzCloseOnNavigation,!0),direction:Ml(n.nzDirection,i.nzDirection,this.directionality.value)});return Ml(n.nzMask,i.nzMask,!0)&&(o.backdropClass=_3),this.overlay.create(o)}attachModalContainer(n,i){let o=i&&i.nzViewContainerRef&&i.nzViewContainerRef.injector,s=Ue.create({parent:o||this.injector,providers:[{provide:Wi,useValue:n},{provide:li,useValue:i}]}),a=i.nzModalType==="confirm"?wb:Cb,c=new si(a,i.nzViewContainerRef,s);return n.attach(c).instance}attachModalContent(n,i,o,s){let a=new M3(o,s,i);if(n instanceof Me)i.attachTemplatePortal(new ai(n,null,{$implicit:s.nzData,modalRef:a}));else if(Mn(n)&&typeof n!="string"){let c=this.createInjector(a,s),l=i.attachComponentPortal(new si(n,s.nzViewContainerRef,c));a.componentInstance=l.instance}else i.attachStringContent();return a}createInjector(n,i){let o=i&&i.nzViewContainerRef&&i.nzViewContainerRef.injector;return Ue.create({parent:o||this.injector,providers:[{provide:M3,useValue:n},{provide:uR,useValue:i.nzData}]})}confirmFactory(n={},i){let o={info:"info-circle",success:"check-circle",error:"close-circle",warning:"exclamation-circle"};return"nzIconType"in n||(n.nzIconType=o[i]),"nzCancelText"in n||(n.nzCancelText=null),this.confirm(n,i)}ngOnDestroy(){this.closeModals(this.openModalsAtThisLevel),this.afterAllClosedAtThisLevel.complete()}};e.\u0275fac=function(i){return new(i||e)(g(ci),g(Ue),g(Rn),g(e,12),g(Ft,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();var Mb=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[Qh],imports:[Zh,bb,_b,Cb,wb]});let t=e;return t})();var Db="nz-animate-disabled",xb=(()=>{let e=class e{constructor(n,i,o){this.element=n,this.renderer=i,this.animationType=o,this.nzNoAnimation=!1}ngOnChanges(){this.updateClass()}ngAfterViewInit(){this.updateClass()}updateClass(){let n=rt(this.element);n&&(this.nzNoAnimation||this.animationType==="NoopAnimations"?this.renderer.addClass(n,Db):this.renderer.removeClass(n,Db))}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(st),m(gn,8))},e.\u0275dir=ne({type:e,selectors:[["","nzNoAnimation",""]],inputs:{nzNoAnimation:"nzNoAnimation"},exportAs:["nzNoAnimation"],standalone:!0,features:[He]});let t=e;return je([Je()],t.prototype,"nzNoAnimation",void 0),t})();var fR=["drawerTemplate"];function pR(t,e){if(t&1){let r=Pn();se(0,"div",11),Pt("click",function(){pn(r);let i=G(2);return mn(i.maskClick())}),le()}if(t&2){let r=G(2);I("ngStyle",r.nzMaskStyle)}}function mR(t,e){if(t&1&&(tt(0),et(1,"span",19),nt()),t&2){let r=e.$implicit;k(),I("nzType",r)}}function gR(t,e){if(t&1){let r=Pn();se(0,"button",17),Pt("click",function(){pn(r);let i=G(3);return mn(i.closeClick())}),Q(1,mR,2,1,"ng-container",18),le()}if(t&2){let r=G(3);k(),I("nzStringTemplateOutlet",r.nzCloseIcon)}}function vR(t,e){if(t&1&&(tt(0),et(1,"div",21),nt()),t&2){let r=G(4);k(),I("innerHTML",r.nzTitle,Dr)}}function yR(t,e){if(t&1&&(se(0,"div",20),Q(1,vR,2,1,"ng-container",18),le()),t&2){let r=G(3);k(),I("nzStringTemplateOutlet",r.nzTitle)}}function wR(t,e){if(t&1&&(tt(0),et(1,"div",21),nt()),t&2){let r=G(4);k(),I("innerHTML",r.nzExtra,Dr)}}function bR(t,e){if(t&1&&(se(0,"div",22),Q(1,wR,2,1,"ng-container",18),le()),t&2){let r=G(3);k(),I("nzStringTemplateOutlet",r.nzExtra)}}function _R(t,e){if(t&1&&(se(0,"div",12)(1,"div",13),Q(2,gR,2,1,"button",14)(3,yR,2,1,"div",15),le(),Q(4,bR,2,1,"div",16),le()),t&2){let r=G(2);St("ant-drawer-header-close-only",!r.nzTitle),k(2),I("ngIf",r.nzClosable),k(),I("ngIf",r.nzTitle),k(),I("ngIf",r.nzExtra)}}function CR(t,e){}function MR(t,e){t&1&&xu(0)}function DR(t,e){if(t&1&&(tt(0),Q(1,MR,1,0,"ng-container",24),nt()),t&2){let r=G(3);k(),I("ngTemplateOutlet",r.nzContent)("ngTemplateOutletContext",r.templateContext)}}function xR(t,e){if(t&1&&(tt(0),Q(1,DR,2,2,"ng-container",23),nt()),t&2){let r=G(2);k(),I("ngIf",r.isTemplateRef(r.nzContent))}}function SR(t,e){}function TR(t,e){if(t&1&&(tt(0),Q(1,SR,0,0,"ng-template",25),nt()),t&2){let r=G(3);k(),I("ngTemplateOutlet",r.contentFromContentChild)}}function ER(t,e){if(t&1&&Q(0,TR,2,1,"ng-container",23),t&2){let r=G(2);I("ngIf",r.contentFromContentChild&&(r.isOpen||r.inAnimation))}}function zR(t,e){if(t&1&&(tt(0),et(1,"div",21),nt()),t&2){let r=G(3);k(),I("innerHTML",r.nzFooter,Dr)}}function IR(t,e){if(t&1&&(se(0,"div",26),Q(1,zR,2,1,"ng-container",18),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzFooter)}}function kR(t,e){if(t&1&&(se(0,"div",1),Q(1,pR,1,1,"div",2),se(2,"div")(3,"div",3)(4,"div",4),Q(5,_R,5,5,"div",5),se(6,"div",6),Q(7,CR,0,0,"ng-template",7)(8,xR,2,1,"ng-container",8)(9,ER,1,1,"ng-template",null,9,bo),le(),Q(11,IR,2,1,"div",10),le()()()()),t&2){let r=$s(10),n=G();Gt("transform",n.offsetTransform)("transition",n.placementChanging?"none":null)("z-index",n.nzZIndex),St("ant-drawer-rtl",n.dir==="rtl")("ant-drawer-open",n.isOpen)("no-mask",!n.nzMask)("ant-drawer-top",n.nzPlacement==="top")("ant-drawer-bottom",n.nzPlacement==="bottom")("ant-drawer-right",n.nzPlacement==="right")("ant-drawer-left",n.nzPlacement==="left"),I("nzNoAnimation",n.nzNoAnimation),k(),I("ngIf",n.nzMask),k(),v7("ant-drawer-content-wrapper ",n.nzWrapClassName,""),Gt("width",n.width)("height",n.height)("transform",n.transform)("transition",n.placementChanging?"none":null),k(2),Gt("height",n.isLeftOrRight?"100%":null),k(),I("ngIf",n.nzTitle||n.nzClosable),k(),I("ngStyle",n.nzBodyStyle),k(2),I("ngIf",n.nzContent)("ngIfElse",r),k(3),I("ngIf",n.nzFooter)}}var PR=(()=>{let e=class e{constructor(n){this.templateRef=n}};e.\u0275fac=function(i){return new(i||e)(m(Me))},e.\u0275dir=ne({type:e,selectors:[["","nzDrawerContent",""]],exportAs:["nzDrawerContent"],standalone:!0});let t=e;return t})(),Sb=378,Tb=736,OR=new E("NZ_DRAWER_DATA"),D3=class{},AR=300,FR="drawer",Eb=(()=>{let e=class e extends D3{set nzVisible(n){this.isOpen=n}get nzVisible(){return this.isOpen}get offsetTransform(){if(!this.isOpen||this.nzOffsetX+this.nzOffsetY===0)return null;switch(this.nzPlacement){case"left":return`translateX(${this.nzOffsetX}px)`;case"right":return`translateX(-${this.nzOffsetX}px)`;case"top":return`translateY(${this.nzOffsetY}px)`;case"bottom":return`translateY(-${this.nzOffsetY}px)`}}get transform(){if(this.isOpen)return null;switch(this.nzPlacement){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)"}}get width(){if(this.isLeftOrRight){let n=this.nzSize==="large"?Tb:Sb;return this.nzWidth===void 0?Kc(n):Kc(this.nzWidth)}return null}get height(){if(!this.isLeftOrRight){let n=this.nzSize==="large"?Tb:Sb;return this.nzHeight===void 0?Kc(n):Kc(this.nzHeight)}return null}get isLeftOrRight(){return this.nzPlacement==="left"||this.nzPlacement==="right"}get afterOpen(){return this.nzAfterOpen.asObservable()}get afterClose(){return this.nzAfterClose.asObservable()}isTemplateRef(n){return n instanceof Me}constructor(n,i,o,s,a,c,l,u,d,h,f){super(),this.cdr=n,this.document=i,this.nzConfigService=o,this.renderer=s,this.overlay=a,this.injector=c,this.changeDetectorRef=l,this.focusTrapFactory=u,this.viewContainerRef=d,this.overlayKeyboardDispatcher=h,this.directionality=f,this._nzModuleName=FR,this.nzCloseIcon="close",this.nzClosable=!0,this.nzMaskClosable=!0,this.nzMask=!0,this.nzCloseOnNavigation=!0,this.nzNoAnimation=!1,this.nzKeyboard=!0,this.nzPlacement="right",this.nzSize="default",this.nzMaskStyle={},this.nzBodyStyle={},this.nzZIndex=1e3,this.nzOffsetX=0,this.nzOffsetY=0,this.componentInstance=null,this.nzOnViewInit=new re,this.nzOnClose=new re,this.nzVisibleChange=new re,this.destroy$=new S,this.placementChanging=!1,this.placementChangeTimeoutId=-1,this.isOpen=!1,this.inAnimation=!1,this.templateContext={$implicit:void 0,drawerRef:this},this.nzAfterOpen=new S,this.nzAfterClose=new S,this.nzDirection=void 0,this.dir="ltr"}ngOnInit(){this.directionality.change?.pipe(ce(this.destroy$)).subscribe(n=>{this.dir=n,this.cdr.detectChanges()}),this.dir=this.nzDirection||this.directionality.value,this.attachOverlay(),this.updateOverlayStyle(),this.updateBodyOverflow(),this.templateContext={$implicit:this.nzData||this.nzContentParams,drawerRef:this},this.changeDetectorRef.detectChanges()}ngAfterViewInit(){this.attachBodyContent(),this.nzOnViewInit.observers.length&&setTimeout(()=>{this.nzOnViewInit.emit()})}ngOnChanges(n){let{nzPlacement:i,nzVisible:o}=n;o&&(n.nzVisible.currentValue?this.open():this.close()),i&&!i.isFirstChange()&&this.triggerPlacementChangeCycleOnce()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),clearTimeout(this.placementChangeTimeoutId),this.disposeOverlay()}getAnimationDuration(){return this.nzNoAnimation?0:AR}triggerPlacementChangeCycleOnce(){this.nzNoAnimation||(this.placementChanging=!0,this.changeDetectorRef.markForCheck(),clearTimeout(this.placementChangeTimeoutId),this.placementChangeTimeoutId=setTimeout(()=>{this.placementChanging=!1,this.changeDetectorRef.markForCheck()},this.getAnimationDuration()))}close(n){this.isOpen=!1,this.inAnimation=!0,this.nzVisibleChange.emit(!1),this.updateOverlayStyle(),this.overlayKeyboardDispatcher.remove(this.overlayRef),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.updateBodyOverflow(),this.restoreFocus(),this.inAnimation=!1,this.nzAfterClose.next(n),this.nzAfterClose.complete(),this.componentInstance=null},this.getAnimationDuration())}open(){this.attachOverlay(),this.isOpen=!0,this.inAnimation=!0,this.nzVisibleChange.emit(!0),this.overlayKeyboardDispatcher.add(this.overlayRef),this.updateOverlayStyle(),this.updateBodyOverflow(),this.savePreviouslyFocusedElement(),this.trapFocus(),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.inAnimation=!1,this.changeDetectorRef.detectChanges(),this.nzAfterOpen.next()},this.getAnimationDuration())}getContentComponent(){return this.componentInstance}closeClick(){this.nzOnClose.emit()}maskClick(){this.nzMaskClosable&&this.nzMask&&this.nzOnClose.emit()}attachBodyContent(){if(this.bodyPortalOutlet.dispose(),this.nzContent instanceof Kp){let n=Ue.create({parent:this.injector,providers:[{provide:D3,useValue:this},{provide:OR,useValue:this.nzData}]}),i=new si(this.nzContent,null,n),o=this.bodyPortalOutlet.attachComponentPortal(i);this.componentInstance=o.instance,Object.assign(o.instance,this.nzData||this.nzContentParams),o.changeDetectorRef.detectChanges()}}attachOverlay(){this.overlayRef||(this.portal=new ai(this.drawerTemplate,this.viewContainerRef),this.overlayRef=this.overlay.create(this.getOverlayConfig())),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.overlayRef.keydownEvents().pipe(ce(this.destroy$)).subscribe(n=>{n.keyCode===27&&this.isOpen&&this.nzKeyboard&&this.nzOnClose.emit()}),this.overlayRef.detachments().pipe(ce(this.destroy$)).subscribe(()=>{this.disposeOverlay()}))}disposeOverlay(){this.overlayRef?.dispose(),this.overlayRef=null}getOverlayConfig(){return new qi({disposeOnNavigation:this.nzCloseOnNavigation,positionStrategy:this.overlay.position().global(),scrollStrategy:this.overlay.scrollStrategies.block()})}updateOverlayStyle(){this.overlayRef&&this.overlayRef.overlayElement&&this.renderer.setStyle(this.overlayRef.overlayElement,"pointer-events",this.isOpen?"auto":"none")}updateBodyOverflow(){this.overlayRef&&(this.isOpen?this.overlayRef.getConfig().scrollStrategy.enable():this.overlayRef.getConfig().scrollStrategy.disable())}savePreviouslyFocusedElement(){this.document&&!this.previouslyFocusedElement&&(this.previouslyFocusedElement=this.document.activeElement,this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.blur=="function"&&this.previouslyFocusedElement.blur())}trapFocus(){!this.focusTrap&&this.overlayRef&&this.overlayRef.overlayElement&&(this.focusTrap=this.focusTrapFactory.create(this.overlayRef.overlayElement),this.focusTrap.focusInitialElement())}restoreFocus(){this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.focus=="function"&&this.previouslyFocusedElement.focus(),this.focusTrap&&this.focusTrap.destroy()}};e.\u0275fac=function(i){return new(i||e)(m(ft),m(V,8),m(Rn),m(st),m(ci),m(Ue),m(ft),m(ka),m(Xe),m(Vh),m(Ft,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-drawer"]],contentQueries:function(i,o,s){if(i&1&&wn(s,PR,7,Me),i&2){let a;ct(a=lt())&&(o.contentFromContentChild=a.first)}},viewQuery:function(i,o){if(i&1&&(On(fR,7),On(Ar,5)),i&2){let s;ct(s=lt())&&(o.drawerTemplate=s.first),ct(s=lt())&&(o.bodyPortalOutlet=s.first)}},inputs:{nzContent:"nzContent",nzCloseIcon:"nzCloseIcon",nzClosable:"nzClosable",nzMaskClosable:"nzMaskClosable",nzMask:"nzMask",nzCloseOnNavigation:"nzCloseOnNavigation",nzNoAnimation:"nzNoAnimation",nzKeyboard:"nzKeyboard",nzTitle:"nzTitle",nzExtra:"nzExtra",nzFooter:"nzFooter",nzPlacement:"nzPlacement",nzSize:"nzSize",nzMaskStyle:"nzMaskStyle",nzBodyStyle:"nzBodyStyle",nzWrapClassName:"nzWrapClassName",nzWidth:"nzWidth",nzHeight:"nzHeight",nzZIndex:"nzZIndex",nzOffsetX:"nzOffsetX",nzOffsetY:"nzOffsetY",nzVisible:"nzVisible"},outputs:{nzOnViewInit:"nzOnViewInit",nzOnClose:"nzOnClose",nzVisibleChange:"nzVisibleChange"},exportAs:["nzDrawer"],standalone:!0,features:[nn,He,_t],decls:2,vars:0,consts:[["drawerTemplate",""],[1,"ant-drawer",3,"nzNoAnimation"],["class","ant-drawer-mask",3,"ngStyle","click",4,"ngIf"],[1,"ant-drawer-content"],[1,"ant-drawer-wrapper-body"],["class","ant-drawer-header",3,"ant-drawer-header-close-only",4,"ngIf"],[1,"ant-drawer-body",3,"ngStyle"],["cdkPortalOutlet",""],[4,"ngIf","ngIfElse"],["contentElseTemp",""],["class","ant-drawer-footer",4,"ngIf"],[1,"ant-drawer-mask",3,"ngStyle","click"],[1,"ant-drawer-header"],[1,"ant-drawer-header-title"],["aria-label","Close","class","ant-drawer-close","style","--scroll-bar: 0px;",3,"click",4,"ngIf"],["class","ant-drawer-title",4,"ngIf"],["class","ant-drawer-extra",4,"ngIf"],["aria-label","Close",1,"ant-drawer-close",2,"--scroll-bar","0px",3,"click"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType"],[1,"ant-drawer-title"],[3,"innerHTML"],[1,"ant-drawer-extra"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngTemplateOutlet"],[1,"ant-drawer-footer"]],template:function(i,o){i&1&&Q(0,kR,12,40,"ng-template",null,0,bo)},dependencies:[xb,nr,_o,Nr,Fr,No,ii,ts,Ar,mc],encapsulation:2,changeDetection:0});let t=e;return je([Je()],t.prototype,"nzClosable",void 0),je([Ln(),Je()],t.prototype,"nzMaskClosable",void 0),je([Ln(),Je()],t.prototype,"nzMask",void 0),je([Ln(),Je()],t.prototype,"nzCloseOnNavigation",void 0),je([Je()],t.prototype,"nzNoAnimation",void 0),je([Je()],t.prototype,"nzKeyboard",void 0),je([Ln()],t.prototype,"nzDirection",void 0),t})(),Xh=class{constructor(e,r){this.overlay=e,this.options=r,this.unsubscribe$=new S;let o=this.options,{nzOnCancel:n}=o,i=ss(o,["nzOnCancel"]);this.overlayRef=this.overlay.create(),this.drawerRef=this.overlayRef.attach(new si(Eb)).instance,this.updateOptions(i),this.drawerRef.savePreviouslyFocusedElement(),this.drawerRef.nzOnViewInit.pipe(ce(this.unsubscribe$)).subscribe(()=>{this.drawerRef.open()}),this.drawerRef.nzOnClose.subscribe(()=>{n?n().then(s=>{s!==!1&&this.drawerRef.close()}):this.drawerRef.close()}),this.drawerRef.afterClose.pipe(ce(this.unsubscribe$)).subscribe(()=>{this.overlayRef.dispose(),this.drawerRef=null,this.unsubscribe$.next(),this.unsubscribe$.complete()})}getInstance(){return this.drawerRef}updateOptions(e){Object.assign(this.drawerRef,e)}},Jh=(()=>{let e=class e{constructor(n){this.overlay=n}create(n){return new Xh(this.overlay,n).getInstance()}};e.\u0275fac=function(i){return new(i||e)(g(ci))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),zb=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[Jh],imports:[Eb]});let t=e;return t})();function lf(t,e,r){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];i?t.setProperty(n,i,r?.has(n)?"important":""):t.removeProperty(n)}return t}function Oa(t,e){let r=e?"":"none";lf(t.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":r,"-ms-user-select":r,"-webkit-user-select":r,"-moz-user-select":r})}function Ib(t,e,r){lf(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},r)}function E3(t,e){return e&&e!="none"?t+" "+e:t}function kb(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function NR(t){let e=getComputedStyle(t),r=ef(e,"transition-property"),n=r.find(a=>a==="transform"||a==="all");if(!n)return 0;let i=r.indexOf(n),o=ef(e,"transition-duration"),s=ef(e,"transition-delay");return kb(o[i])+kb(s[i])}function ef(t,e){return t.getPropertyValue(e).split(",").map(n=>n.trim())}function uf(t){let e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function nf(t,e,r){let{top:n,bottom:i,left:o,right:s}=t;return r>=n&&r<=i&&e>=o&&e<=s}function xl(t,e,r){t.top+=e,t.bottom=t.top+t.height,t.left+=r,t.right=t.left+t.width}function Pb(t,e,r,n){let{top:i,right:o,bottom:s,left:a,width:c,height:l}=t,u=c*e,d=l*e;return n>i-d&&na-u&&r{this.positions.set(r,{scrollPosition:{top:r.scrollTop,left:r.scrollLeft},clientRect:uf(r)})})}handleScroll(e){let r=cn(e),n=this.positions.get(r);if(!n)return null;let i=n.scrollPosition,o,s;if(r===this._document){let l=this.getViewportScrollPosition();o=l.top,s=l.left}else o=r.scrollTop,s=r.scrollLeft;let a=i.top-o,c=i.left-s;return this.positions.forEach((l,u)=>{l.clientRect&&r!==u&&r.contains(u)&&xl(l.clientRect,a,c)}),i.top=o,i.left=s,{top:a,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Ob(t){let e=t.cloneNode(!0),r=e.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;iOa(r,e)))}constructor(e,r,n,i,o,s){this._config=r,this._document=n,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new S,this._pointerMoveSubscription=ye.EMPTY,this._pointerUpSubscription=ye.EMPTY,this._scrollSubscription=ye.EMPTY,this._resizeSubscription=ye.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new S,this.started=new S,this.released=new S,this.ended=new S,this.entered=new S,this.exited=new S,this.dropped=new S,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&this._initializeDragSequence(c,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let c=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){let u=Math.abs(c.x-this._pickupPositionOnPage.x),d=Math.abs(c.y-this._pickupPositionOnPage.y);if(u+d>=this._config.dragStartThreshold){let f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!f){this._endDragSequence(a);return}(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();let l=this._getConstrainedPointerPosition(c);if(this._hasMoved=!0,this._lastKnownPointerPosition=c,this._updatePointerDirectionDelta(l),this._dropContainer)this._updateActiveDropContainer(l,c);else{let u=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,d=this._activeTransform;d.x=l.x-u.x+this._passiveTransform.x,d.y=l.y-u.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:l,event:a,distance:this._getDragDistance(l),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(r.parentDragRef||null),this._parentPositions=new z3(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>rt(n)),this._handles.forEach(n=>Oa(n,this.disabled)),this._toggleNativeDragInteractions();let r=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&r.add(n)}),this._disabledHandles=r,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let r=rt(e);return r!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{r.addEventListener("mousedown",this._pointerDown,x3),r.addEventListener("touchstart",this._pointerDown,Rb),r.addEventListener("dragstart",this._nativeDragStart,x3)}),this._initialTransform=void 0,this._rootElement=r),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?rt(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Oa(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Oa(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let r=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(r),dropPoint:r,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){Dl(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let r=this._dropContainer;if(r){let n=this._rootElement,i=n.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();i.insertBefore(s,n),this._initialTransform=n.style.transform||"",this._preview=this._createPreviewElement(),Ib(n,!1,tf),this._document.body.appendChild(i.replaceChild(o,n)),this._getPreviewInsertionPoint(i,a).appendChild(this._preview),this.started.next({source:this,event:e}),r.start(),this._initialContainer=r,this._initialIndex=r.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(r?r.getScrollableParents():[])}_initializeDragSequence(e,r){this._parentDragRef&&r.stopPropagation();let n=this.isDragging(),i=Dl(r),o=!i&&r.button!==0,s=this._rootElement,a=cn(r),c=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+LR>Date.now(),l=i?Kh(r):Gh(r);if(a&&a.draggable&&r.type==="mousedown"&&r.preventDefault(),n||o||c||l)return;if(this._handles.length){let h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=uf(this._boundaryElement));let u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,r);let d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(r);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,r)}_cleanupDragArtifacts(e){Ib(this._rootElement,!0,tf),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let r=this._dropContainer,n=r.getItemIndex(this),i=this._getPointerPositionOnPage(e),o=this._getDragDistance(i),s=r._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:r,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i,event:e}),r.drop(this,n,this._initialIndex,this._initialContainer,s,o,i,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:r},{x:n,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,r);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,r)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,r,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,i),this._dropContainer._sortItem(this,e,r,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,r):this._applyPreviewTransform(e-this._pickupPositionInElement.x,r-this._pickupPositionInElement.y))}_createPreviewElement(){let e=this._previewTemplate,r=this.previewClass,n=e?e.template:null,i;if(n&&e){let o=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),i=Hb(s,this._document),this._previewRef=s,e.matchSize?Vb(i,o):i.style.transform=T3(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=Ob(this._rootElement),Vb(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return lf(i.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},tf),Oa(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),r&&(Array.isArray(r)?r.forEach(o=>i.classList.add(o)):i.classList.add(r)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let r=NR(this._preview);return r===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let i=s=>{(!s||cn(s)===this._preview&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",i),n(),clearTimeout(o))},o=setTimeout(i,r*1.5);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,r=e?e.template:null,n;return r?(this._placeholderRef=e.viewContainer.createEmbeddedView(r,e.context),this._placeholderRef.detectChanges(),n=Hb(this._placeholderRef,this._document)):n=Ob(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,r,n){let i=r===this._rootElement?null:r,o=i?i.getBoundingClientRect():e,s=Dl(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),c=s.pageX-o.left-a.left,l=s.pageY-o.top-a.top;return{x:o.left-e.left+c,y:o.top-e.top+l}}_getPointerPositionOnPage(e){let r=this._getViewportScrollPosition(),n=Dl(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=n.pageX-r.left,o=n.pageY-r.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(e){let r=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:i}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||r==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||r==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:c,height:l}=this._getPreviewRect(),u=a.top+s,d=a.bottom-(l-s),h=a.left+o,f=a.right-(c-o);n=Lb(n,h,f),i=Lb(i,u,d)}return{x:n,y:i}}_updatePointerDirectionDelta(e){let{x:r,y:n}=e,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(r-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=r>o.x?1:-1,o.x=r),a>this._config.pointerDirectionChangeThreshold&&(i.y=n>o.y?1:-1,o.y=n),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Oa(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,x3),e.removeEventListener("touchstart",this._pointerDown,Rb),e.removeEventListener("dragstart",this._nativeDragStart,x3)}_applyRootElementTransform(e,r){let n=T3(e,r),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=E3(n,this._initialTransform)}_applyPreviewTransform(e,r){let n=this._previewTemplate?.template?void 0:this._initialTransform,i=T3(e,r);this._preview.style.transform=E3(i,n)}_getDragDistance(e){let r=this._pickupPositionOnPage;return r?{x:e.x-r.x,y:e.y-r.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:r}=this._passiveTransform;if(e===0&&r===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||n.width===0&&n.height===0)return;let o=i.left-n.left,s=n.right-i.right,a=i.top-n.top,c=n.bottom-i.bottom;i.width>n.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,i.height>n.height?(a>0&&(r+=a),c>0&&(r-=c)):r=0,(e!==this._passiveTransform.x||r!==this._passiveTransform.y)&&this.setFreeDragPosition({y:r,x:e})}_getDragStartDelay(e){let r=this.dragStartDelay;return typeof r=="number"?r:Dl(e)?r.touch:r?r.mouse:0}_updateOnScroll(e){let r=this._parentPositions.handleScroll(e);if(r){let n=cn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&xl(this._boundaryRect,r.top,r.left),this._pickupPositionOnPage.x+=r.left,this._pickupPositionOnPage.y+=r.top,this._dropContainer||(this._activeTransform.x-=r.left,this._activeTransform.y-=r.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=al(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,r){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let i=this._document;return r||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return rt(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(e){return this._handles.find(r=>e.target&&(e.target===r||r.contains(e.target)))}};function T3(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function Lb(t,e,r){return Math.max(e,Math.min(r,t))}function Dl(t){return t.type[0]==="t"}function Hb(t,e){let r=t.rootNodes;if(r.length===1&&r[0].nodeType===e.ELEMENT_NODE)return r[0];let n=e.createElement("div");return r.forEach(i=>n.appendChild(i)),n}function Vb(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=T3(e.left,e.top)}function HR(t,e,r){let n=Yb(e,t.length-1),i=Yb(r,t.length-1);if(n===i)return;let o=t[n],s=i0)return null;let a=this.orientation==="horizontal",c=o.findIndex(v=>v.drag===e),l=o[s],u=o[c].clientRect,d=l.clientRect,h=c>s?1:-1,f=this._getItemOffsetPx(u,d,h),p=this._getSiblingOffsetPx(c,o,h),y=o.slice();return HR(o,c,s),o.forEach((v,M)=>{if(y[M]===v)return;let P=v.drag===e,X=P?f:p,$=P?e.getPlaceholderElement():v.drag.getRootElement();v.offset+=X,a?($.style.transform=E3(`translate3d(${Math.round(v.offset)}px, 0, 0)`,v.initialTransform),xl(v.clientRect,0,X)):($.style.transform=E3(`translate3d(0, ${Math.round(v.offset)}px, 0)`,v.initialTransform),xl(v.clientRect,X,0))}),this._previousSwap.overlaps=nf(d,r,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=a?i.x:i.y,{previousIndex:c,currentIndex:s}}enter(e,r,n,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(e,r,n):i,s=this._activeDraggables,a=s.indexOf(e),c=e.getPlaceholderElement(),l=s[o];if(l===e&&(l=s[o+1]),!l&&(o==null||o===-1||o-1&&s.splice(a,1),l&&!this._dragDropRegistry.isDragging(l)){let u=l.getRootElement();u.parentElement.insertBefore(c,u),s.splice(o,0,e)}else rt(this._element).appendChild(c),s.push(e);c.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables.forEach(e=>{let r=e.getRootElement();if(r){let n=this._itemPositions.find(i=>i.drag===e)?.initialTransform;r.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===e)}updateOnScroll(e,r){this._itemPositions.forEach(({clientRect:n})=>{xl(n,e,r)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(r=>{let n=r.getVisibleElement();return{drag:r,offset:0,initialTransform:n.style.transform||"",clientRect:uf(n)}}).sort((r,n)=>e?r.clientRect.left-n.clientRect.left:r.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,r,n){let i=this.orientation==="horizontal",o=i?r.left-e.left:r.top-e.top;return n===-1&&(o+=i?r.width-e.width:r.height-e.height),o}_getSiblingOffsetPx(e,r,n){let i=this.orientation==="horizontal",o=r[e].clientRect,s=r[e+n*-1],a=o[i?"width":"height"]*n;if(s){let c=i?"left":"top",l=i?"right":"bottom";n===-1?a-=s.clientRect[c]-o[l]:a+=o[c]-s.clientRect[l]}return a}_shouldEnterAsFirstChild(e,r){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,i=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let s=n[n.length-1].clientRect;return i?e>=s.right:r>=s.bottom}else{let s=n[0].clientRect;return i?e<=s.left:r<=s.top}}_getItemIndexFromPointerPosition(e,r,n,i){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:c})=>{if(a===e)return!1;if(i){let l=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return o?r>=Math.floor(c.left)&&r=Math.floor(c.top)&&n!0,this.sortPredicate=()=>!0,this.beforeStarted=new S,this.entered=new S,this.exited=new S,this.dropped=new S,this.sorted=new S,this.receivingStarted=new S,this.receivingStopped=new S,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=ye.EMPTY,this._verticalScrollDirection=Bn.NONE,this._horizontalScrollDirection=Kt.NONE,this._stopScrollTimers=new S,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),n0(0,La).pipe(ce(this._stopScrollTimers)).subscribe(()=>{let s=this._scrollNode,a=this.autoScrollStep;this._verticalScrollDirection===Bn.UP?s.scrollBy(0,-a):this._verticalScrollDirection===Bn.DOWN&&s.scrollBy(0,a),this._horizontalScrollDirection===Kt.LEFT?s.scrollBy(-a,0):this._horizontalScrollDirection===Kt.RIGHT&&s.scrollBy(a,0)})},this.element=rt(e),this._document=n,this.withScrollableParents([this.element]),r.registerDropContainer(this),this._parentPositions=new z3(n),this._sortStrategy=new of(this.element,r),this._sortStrategy.withSortPredicate((s,a)=>this.sortPredicate(s,a,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,r,n,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(e)),this._sortStrategy.enter(e,r,n,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,r,n,i,o,s,a,c={}){this._reset(),this.dropped.next({item:e,currentIndex:r,previousIndex:n,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a,event:c})}withItems(e){let r=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(r.filter(i=>i.isDragging()).every(i=>e.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._sortStrategy.direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._sortStrategy.orientation=e,this}withScrollableParents(e){let r=rt(this.element);return this._scrollableElements=e.indexOf(r)===-1?[r,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,r,n,i){if(this.sortingDisabled||!this._domRect||!Pb(this._domRect,jb,r,n))return;let o=this._sortStrategy.sort(e,r,n,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,r){if(this.autoScrollDisabled)return;let n,i=Bn.NONE,o=Kt.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||Pb(s.clientRect,jb,e,r)&&([i,o]=VR(a,s.clientRect,this._sortStrategy.direction,e,r),(i||o)&&(n=a))}),!i&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),c={width:s,height:a,top:0,right:s,bottom:a,left:0};i=Ub(c,r),o=$b(c,e),n=window}n&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=n,(i||o)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=rt(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){let e=rt(this.element);this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(e).clientRect}_reset(){this._isDragging=!1;let e=rt(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(r=>r._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,r){return this._domRect!=null&&nf(this._domRect,e,r)}_getSiblingContainerFromPosition(e,r,n){return this._siblings.find(i=>i._canReceive(e,r,n))}_canReceive(e,r,n){if(!this._domRect||!nf(this._domRect,r,n)||!this.enterPredicate(e,this))return!1;let i=this._getShadowRoot().elementFromPoint(r,n);if(!i)return!1;let o=rt(this.element);return i===o||o.contains(i)}_startReceiving(e,r){let n=this._activeSiblings;!n.has(e)&&r.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:r}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let r=this._parentPositions.handleScroll(e);r&&this._sortStrategy.updateOnScroll(r.top,r.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=al(rt(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(r=>r.isDragging());this._siblings.forEach(r=>r._startReceiving(this,e))}};function Ub(t,e){let{top:r,bottom:n,height:i}=t,o=i*Bb;return e>=r-o&&e<=r+o?Bn.UP:e>=n-o&&e<=n+o?Bn.DOWN:Bn.NONE}function $b(t,e){let{left:r,right:n,width:i}=t,o=i*Bb;return e>=r-o&&e<=r+o?Kt.LEFT:e>=n-o&&e<=n+o?Kt.RIGHT:Kt.NONE}function VR(t,e,r,n,i){let o=Ub(e,i),s=$b(e,n),a=Bn.NONE,c=Kt.NONE;if(o){let l=t.scrollTop;o===Bn.UP?l>0&&(a=Bn.UP):t.scrollHeight-l>t.clientHeight&&(a=Bn.DOWN)}if(s){let l=t.scrollLeft;r==="rtl"?s===Kt.RIGHT?l<0&&(c=Kt.RIGHT):t.scrollWidth+l>t.clientWidth&&(c=Kt.LEFT):s===Kt.LEFT?l>0&&(c=Kt.LEFT):t.scrollWidth-l>t.clientWidth&&(c=Kt.RIGHT)}return[a,c]}var S3=Fo({passive:!1,capture:!0}),YR=(()=>{let e=class e{constructor(n,i){this._ngZone=n,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new S,this.pointerUp=new S,this.scroll=new S,this._preventDefaultWhileDragging=o=>{this._activeDragInstances.length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=i}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,S3)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,S3)}startDragging(n,i){if(!(this._activeDragInstances.indexOf(n)>-1)&&(this._activeDragInstances.push(n),this._activeDragInstances.length===1)){let o=i.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:S3}),o||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:S3}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,a)=>{this._document.addEventListener(a,s.handler,s.options)})})}}stopDragging(n){let i=this._activeDragInstances.indexOf(n);i>-1&&(this._activeDragInstances.splice(i,1),this._activeDragInstances.length===0&&this._clearGlobalListeners())}isDragging(n){return this._activeDragInstances.indexOf(n)>-1}scrolled(n){let i=[this.scroll];return n&&n!==this._document&&i.push(new Y(o=>this._ngZone.runOutsideAngular(()=>{let a=c=>{this._activeDragInstances.length&&o.next(c)};return n.addEventListener("scroll",a,!0),()=>{n.removeEventListener("scroll",a,!0)}}))),vs(...i)}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((n,i)=>{this._document.removeEventListener(i,n.handler,n.options)}),this._globalListeners.clear()}};e.\u0275fac=function(i){return new(i||e)(g(U),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),jR={dragStartThreshold:5,pointerDirectionChangeThreshold:5},df=(()=>{let e=class e{constructor(n,i,o,s){this._document=n,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=s}createDrag(n,i=jR){return new rf(n,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(n){return new sf(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(U),g(es),g(YR))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),af=new E("CDK_DRAG_PARENT");var cf=new E("CdkDragHandle"),g6e=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._stateChanges.next(this)}constructor(n,i){this.element=n,this._stateChanges=new S,this._disabled=!1,this._parentDrag=i}ngOnDestroy(){this._stateChanges.complete()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(af,12))},e.\u0275dir=ne({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[W.HasDecoratorInputTransform,"cdkDragHandleDisabled","disabled",ut]},standalone:!0,features:[Kr([{provide:cf,useExisting:e}]),rn]});let t=e;return t})(),BR=new E("CdkDragPlaceholder");var UR=new E("CdkDragPreview");var $R=new E("CDK_DRAG_CONFIG"),qR="cdk-drag",WR=new E("CdkDropList"),v6e=(()=>{let e=class e{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}constructor(n,i,o,s,a,c,l,u,d,h,f){this.element=n,this.dropContainer=i,this._ngZone=s,this._viewContainerRef=a,this._dir=l,this._changeDetectorRef=d,this._selfHandle=h,this._parentDrag=f,this._destroyed=new S,this.started=new re,this.released=new re,this.ended=new re,this.entered=new re,this.exited=new re,this.dropped=new re,this.moved=new Y(p=>{let y=this._dragRef.moved.pipe(Z(v=>({source:this,pointerPosition:v.pointerPosition,event:v.event,delta:v.delta,distance:v.distance}))).subscribe(p);return()=>{y.unsubscribe()}}),this._dragRef=u.createDrag(n,{dragStartThreshold:c&&c.dragStartThreshold!=null?c.dragStartThreshold:5,pointerDirectionChangeThreshold:c&&c.pointerDirectionChangeThreshold!=null?c.pointerDirectionChangeThreshold:5,zIndex:c?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),c&&this._assignDefaults(c),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(ze(1),ce(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(n){let i=n.rootElementSelector,o=n.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let n=e._dragInstances.indexOf(this);n>-1&&e._dragInstances.splice(n,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){let n=this.element.nativeElement,i=n;this.rootElementSelector&&(i=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):rt(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let i=this._dir,o=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.dragStartDelay=typeof o=="object"&&o?o:ti(o),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),i&&n.withDirection(i.value)}}),n.beforeStarted.pipe(ze(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains(qR)){n.withParent(e._dragInstances.find(o=>o.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(n){n.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),n.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),n.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),n.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(n){let{lockAxis:i,dragStartDelay:o,constrainPosition:s,previewClass:a,boundaryElement:c,draggingDisabled:l,rootElementSelector:u,previewContainer:d}=n;this.disabled=l??!1,this.dragStartDelay=o||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),a&&(this.previewClass=a),c&&(this.boundaryElement=c),u&&(this.rootElementSelector=u),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.changes.pipe(Rt(this._handles),Fe(n=>{let i=n.filter(o=>o._parentDrag===this).map(o=>o.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Ze(n=>vs(...n.map(i=>i._stateChanges.pipe(Rt(i))))),ce(this._destroyed)).subscribe(n=>{let i=this._dragRef,o=n.element.nativeElement;n.disabled?i.disableHandle(o):i.enableHandle(o)})}};e._dragInstances=[],e.\u0275fac=function(i){return new(i||e)(m(oe),m(WR,12),m(V),m(U),m(Xe),m($R,8),m(Ft,8),m(df),m(ft),m(cf,10),m(af,12))},e.\u0275dir=ne({type:e,selectors:[["","cdkDrag",""]],contentQueries:function(i,o,s){if(i&1&&(wn(s,UR,5),wn(s,BR,5),wn(s,cf,5)),i&2){let a;ct(a=lt())&&(o._previewTemplate=a.first),ct(a=lt())&&(o._placeholderTemplate=a.first),ct(a=lt())&&(o._handles=a)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,o){i&2&&St("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[W.None,"cdkDragData","data"],lockAxis:[W.None,"cdkDragLockAxis","lockAxis"],rootElementSelector:[W.None,"cdkDragRootElement","rootElementSelector"],boundaryElement:[W.None,"cdkDragBoundary","boundaryElement"],dragStartDelay:[W.None,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[W.None,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[W.HasDecoratorInputTransform,"cdkDragDisabled","disabled",ut],constrainPosition:[W.None,"cdkDragConstrainPosition","constrainPosition"],previewClass:[W.None,"cdkDragPreviewClass","previewClass"],previewContainer:[W.None,"cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[Kr([{provide:af,useExisting:e}]),rn,He]});let t=e;return t})();function GR(t,e){let{formatString:r,defaultValue:n,timestampSecond:i}=b({formatString:"yyyy-MM-dd HH:mm:ss",defaultValue:new Date(NaN),timestampSecond:!1},typeof e=="string"?{formatString:e}:e);if(t==null)return n;if(t instanceof Date)return t;if(typeof t=="number"||typeof t=="string"&&/^[0-9]+$/.test(t)){let s=+t;return new Date(i?s*1e3:s)}let o=l3(t);return isNaN(o)&&(o=Ta(t,r,new Date)),isNaN(o)?n:o}function qb(t,e,r){if(t=GR(t),isNaN(t))return"";let n={locale:r};return e==="fn"?q2(t,n):Zo(t,e,n)}var hf=class{get now(){return new Date}get date(){return this.removeTime(this.now)}removeTime(e){return new Date(e.toDateString())}format(e,r="yyyy-MM-dd HH:mm:ss"){return Zo(e,r)}genTick(e){return new Array(e).fill(0).map((r,n)=>n)}getDiffDays(e,r){return Vo(e,typeof r=="number"?pa(this.date,r):r||this.date)}disabledBeforeDate(e){return r=>this.getDiffDays(r,e?.offsetDays)<0}disabledAfterDate(e){return r=>this.getDiffDays(r,e?.offsetDays)>0}baseDisabledTime(e,r){let n=this.genTick(24),i=this.genTick(60);return o=>{let s=o;if(s==null)return{};let a=N2(this.now,r||0),c=a.getHours(),l=a.getMinutes(),u=s.getHours(),d=this.getDiffDays(this.removeTime(s))===0;return{nzDisabledHours:()=>d?e==="before"?n.slice(0,c):n.slice(c+1):[],nzDisabledMinutes:()=>d&&u===c?e==="before"?i.slice(0,l):i.slice(l+1):[],nzDisabledSeconds:()=>{if(d&&u===c&&s.getMinutes()===l){let h=a.getSeconds();return e==="before"?i.slice(0,h):i.slice(h+1)}return[]}}}}disabledBeforeTime(e){return this.baseDisabledTime("before",e?.offsetSeconds)}disabledAfterTime(e){return this.baseDisabledTime("after",e?.offsetSeconds)}},S6e=new hf;function X6e(){let t=w(V);if(vc(w(Yt)))return()=>{};let r=t.querySelector("body");r.style.overflow="hidden";let n=!1;return()=>{if(n)return;n=!0;let i=t.querySelector(".preloader");if(i==null)return;let o="preloader-hidden";i.addEventListener("transitionend",()=>{i.className=o}),i.className+=` ${o}-add ${o}-add-active`,r.style.overflow=""}}var O3=new E("alainI18nToken",{providedIn:"root",factory:()=>new ZR(w(Jr))}),KR=(()=>{let e=class e{get change(){return this._change$.asObservable().pipe(ge(n=>n!=null))}get defaultLang(){return this._defaultLang}get currentLang(){return this._currentLang}get data(){return this._data}constructor(n){this._change$=new Re(null),this._currentLang="",this._defaultLang="",this._data={},this.cog=n.merge("themeI18n",{interpolation:["{{","}}"]})}flatData(n,i){let o={};for(let s of Object.keys(n)){let a=n[s];if(typeof a=="object"){let c=this.flatData(a,i.concat(s));Object.keys(c).forEach(l=>o[l]=c[l])}else o[(s?i.concat(s):i).join(".")]=`${a}`}return o}fanyi(n,i){let o=this._data[n]||"";if(!o)return n;if(!i)return o;if(typeof i=="object"){let s=this.cog.interpolation,a=i;Object.keys(a).forEach(c=>o=o.replace(new RegExp(`${s[0]}\\s?${c}\\s?${s[1]}`,"g"),`${a[c]}`))}return(Array.isArray(i)?i:[i]).forEach((s,a)=>o=o.replace(new RegExp(`\\{\\s?${a}\\s?\\}`,"g"),`${s}`)),o}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ZR=(()=>{let e=class e extends KR{use(n,i){this._data=this.flatData(i??{},[]),this._currentLang=n,this._change$.next(n)}getLangs(){return[]}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ls(e)))(o||e)}})(),e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),QR=(()=>{let e=class e{constructor(){this.i18nSrv=w(O3,{optional:!0}),this.aclService=w(o2,{optional:!0}),this._change$=new Re([]),this.data=[],this.openStrictly=!1,this.i18n$=this.i18nSrv?.change.subscribe(()=>this.resume())}get change(){return this._change$.pipe(fr())}get menus(){return this.data}visit(n,i){let o=(s,a,c)=>{for(let l of s)i(l,a,c),l.children&&l.children.length>0?o(l.children,l,c+1):l.children=[]};o(n,null,0)}add(n){this.data=n,this.resume()}fixItem(n){if(n._aclResult=!0,n.link||(n.link=""),n.externalLink||(n.externalLink=""),n.badge&&(n.badgeDot!==!0&&(n.badgeDot=!1),n.badgeStatus||(n.badgeStatus="error")),Array.isArray(n.children)||(n.children=[]),typeof n.icon=="string"){let i="class",o=n.icon;~n.icon.indexOf("anticon-")?(i="icon",o=o.split("-").slice(1).join("-")):/^https?:\/\//.test(n.icon)&&(i="img"),n.icon={type:i,value:o}}n.icon!=null&&(n.icon=b({theme:"outline",spin:!1},n.icon)),n.text=n.i18n&&this.i18nSrv?this.i18nSrv.fanyi(n.i18n):n.text,n.group=n.group!==!1,n._hidden=typeof n.hide>"u"?!1:n.hide,n.disabled=typeof n.disabled>"u"?!1:n.disabled,n._aclResult=n.acl&&this.aclService?this.aclService.can(n.acl):!0,n.open=n.open!=null?n.open:!1}resume(n){let i=1,o=[];this.visit(this.data,(s,a,c)=>{s._id=i++,s._parent=a,s._depth=c,this.fixItem(s),a&&s.shortcut===!0&&a.shortcutRoot!==!0&&o.push(s),n&&n(s,a,c)}),this.loadShortcut(o),this._change$.next(this.data)}loadShortcut(n){if(n.length===0||this.data.length===0)return;let i=this.data[0].children,o=i.findIndex(a=>a.shortcutRoot===!0);if(o===-1){o=i.findIndex(c=>c.link.includes("dashboard")),o=(o!==-1?o:-1)+1;let a={text:"\u5FEB\u6377\u83DC\u5355",i18n:"shortcut",icon:"icon-rocket",children:[]};this.data[0].children.splice(o,0,a)}let s=this.data[0].children[o];s.i18n&&this.i18nSrv&&(s.text=this.i18nSrv.fanyi(s.i18n)),s=Object.assign(s,{shortcutRoot:!0,_id:-1,_parent:null,_depth:1}),s.children=n.map(a=>(a._depth=2,a._parent=s,a))}clear(){this.data=[],this._change$.next(this.data)}find(n){let i=b({recursive:!1,ignoreHide:!1},n);if(i.key!=null)return this.getItem(i.key);let o=i.url,s=null;for(;!s&&o&&(this.visit(i.data??this.data,a=>{if(!(i.ignoreHide&&a.hide)){if(i.cb){let c=i.cb(a);!s&&typeof c=="boolean"&&c&&(s=a)}a.link!=null&&a.link===o&&(s=a)}}),!!i.recursive);)/[?;]/g.test(o)?o=o.split(/[?;]/g)[0]:o=o.split("/").slice(0,-1).join("/");return s}getPathByUrl(n,i=!1){let o=[],s=this.find({url:n,recursive:i});if(!s)return o;do o.splice(0,0,s),s=s._parent;while(s);return o}getItem(n){let i=null;return this.visit(this.data,o=>{i==null&&o.key===n&&(i=o)}),i}setItem(n,i,o){let s=typeof n=="string"?this.getItem(n):n;s!=null&&(Object.keys(i).forEach(a=>{s[a]=i[a]}),this.fixItem(s),o?.emit!==!1&&this._change$.next(this.data))}open(n,i){let o=typeof n=="string"?this.find({key:n}):n;if(o!=null){this.visit(this.menus,s=>{s._selected=!1,this.openStrictly||(s.open=!1)});do o._selected=!0,o.open=!0,o=o._parent;while(o);i?.emit!==!1&&this._change$.next(this.data)}}openAll(n){this.toggleOpen(null,{allStatus:n})}toggleOpen(n,i){let o=typeof n=="string"?this.find({key:n}):n;if(o==null)this.visit(this.menus,s=>{s._selected=!1,s.open=i?.allStatus===!0});else{if(!this.openStrictly){this.visit(this.menus,a=>{a!==o&&(a.open=!1)});let s=o._parent;for(;s;)s.open=!0,s=s._parent}o.open=!o.open}i?.emit!==!1&&this._change$.next(this.data)}ngOnDestroy(){this._change$.unsubscribe(),this.i18n$?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Qb=new E("ALAIN_SETTING_KEYS"),Xb={provide:Qb,useValue:{layout:"layout",user:"user",app:"app"}},J6e=(()=>{let e=class e{constructor(){this.KEYS=w(Qb),this.platform=w(Ge),this.notify$=new S,this._app=null,this._user=null,this._layout=null}getData(n){return this.platform.isBrowser&&JSON.parse(localStorage.getItem(n)||"null")||null}setData(n,i){this.platform.isBrowser&&localStorage.setItem(n,JSON.stringify(i))}get layout(){return this._layout||(this._layout=b({fixed:!0,collapsed:!1,boxed:!1,lang:null},this.getData(this.KEYS.layout)),this.setData(this.KEYS.layout,this._layout)),this._layout}get app(){return this._app||(this._app=b({year:new Date().getFullYear()},this.getData(this.KEYS.app)),this.setData(this.KEYS.app,this._app)),this._app}get user(){return this._user||(this._user=b({},this.getData(this.KEYS.user)),this.setData(this.KEYS.user,this._user)),this._user}get notify(){return this.notify$.asObservable()}setLayout(n,i){return typeof n=="string"?this.layout[n]=i:this._layout=n,this.setData(this.KEYS.layout,this._layout),this.notify$.next({type:"layout",name:n,value:i}),!0}getLayout(){return this._layout}setApp(n){this._app=n,this.setData(this.KEYS.app,n),this.notify$.next({type:"app",value:n})}getApp(){return this._app}setUser(n){this._user=n,this.setData(this.KEYS.user,n),this.notify$.next({type:"user",value:n})}getUser(){return this._user}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),I3=6,XR=24,ede=(()=>{let e=class e{constructor(n){if(this.cog=n.merge("themeResponsive",{rules:{1:{xs:24},2:{xs:24,sm:12},3:{xs:24,sm:12,md:8},4:{xs:24,sm:12,md:8,lg:6},5:{xs:24,sm:12,md:8,lg:6,xl:4},6:{xs:24,sm:12,md:8,lg:6,xl:4,xxl:2}}}),Object.keys(this.cog.rules).map(i=>+i).some(i=>i<1||i>I3))throw new Error(`[theme] the responseive rule index value range must be 1-${I3}`)}genCls(n,i=1){let o=b({},this.cog.rules[n>I3?I3:Math.max(n,1)]),s="ant-col",a=XR/i,c=u=>u==null||i<=1||n>=i?u:Math.max(u,n*a),l=[`${s}-xs-${c(o.xs)}`];return o.sm&&l.push(`${s}-sm-${c(o.sm)}`),o.md&&l.push(`${s}-md-${c(o.md)}`),o.lg&&l.push(`${s}-lg-${c(o.lg)}`),o.xl&&l.push(`${s}-xl-${c(o.xl)}`),o.xxl&&l.push(`${s}-xxl-${c(o.xxl)}`),l}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var tde=(()=>{let e=class e{constructor(){this.destroy$=w(js),this._prefix="",this._suffix="",this._separator=" - ",this._reverse=!1,this.DELAY_TIME=25,this.doc=w(V),this.injector=w(Ue),this.title=w(xc),this.menuSrv=w(QR),this.i18nSrv=w(O3,{optional:!0}),this.default="Not Page Name",this.i18nSrv?.change.pipe(ca()).subscribe(()=>this.setTitle())}set separator(n){this._separator=n}set prefix(n){this._prefix=n}set suffix(n){this._suffix=n}set reverse(n){this._reverse=n}getByElement(){return A("").pipe(ys(this.DELAY_TIME),Z(()=>{let n=(this.selector!=null?this.doc.querySelector(this.selector):null)||this.doc.querySelector(".alain-default__content-title h1")||this.doc.querySelector(".page-header__title");if(n){let i="";return n.childNodes.forEach(o=>{!i&&o.nodeType===3&&(i=o.textContent.trim())}),i||n.firstChild.textContent.trim()}return""}))}getByRoute(){let n=this.injector.get(Ir);for(;n.firstChild;)n=n.firstChild;let i=n.snapshot&&n.snapshot.data||{};return i.titleI18n&&this.i18nSrv&&(i.title=this.i18nSrv.fanyi(i.titleI18n)),Tn(i.title)?i.title:A(i.title)}getByMenu(){let n=this.menuSrv.getPathByUrl(this.injector.get(ir).url);if(!n||n.length<=0)return A("");let i=n[n.length-1],o;return i.i18n&&this.i18nSrv&&(o=this.i18nSrv.fanyi(i.i18n)),A(o||i.text)}setTitle(n){this.tit$?.unsubscribe(),this.tit$=A(n).pipe(Ze(i=>i?A(i):this.getByRoute()),Ze(i=>i?A(i):this.getByMenu()),Ze(i=>i?A(i):this.getByElement()),Z(i=>i||this.default),Z(i=>Array.isArray(i)?i:[i]),ca(this.destroy$)).subscribe(i=>{let o=[];this._prefix&&o.push(this._prefix),o.push(...i.filter(s=>!!s)),this._suffix&&o.push(this._suffix),this._reverse&&(o=o.reverse()),this.title.setTitle(o.join(this._separator))})}setTitleByI18n(n,i){this.setTitle(this.i18nSrv?.fanyi(n,i))}ngOnDestroy(){this.tit$?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),nde=(()=>{let e=class e{constructor(){this.i18n=w(O3)}transform(n,i){return this.i18n.fanyi(n,i)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"i18n",type:e,pure:!0,standalone:!0});let t=e;return t})();var ff="MODAL-DRAG",JR=(()=>{let e=class e{constructor(){this.srv=w(Qh),this.drag=w(df),this.doc=w(V)}createDragRef(n,i){let o=this.doc.querySelector(i),s=o.firstChild,a=n.handleCls?o.querySelector(n.handleCls):null;return a&&a.classList.add(`${ff}-HANDLE`),this.drag.createDrag(a??s).withHandles([a??s]).withBoundaryElement(o).withRootElement(s)}create(n,i,o){return o=Q6({size:"lg",exact:!0,includeTabs:!1},o),new Y(s=>{let{size:a,includeTabs:c,modalOptions:l,drag:u,useNzData:d}=o,h=[],f="";a&&(typeof a=="number"?f=`${a}px`:["sm","md","lg","xl"].includes(a)?h.push(`modal-${a}`):f=a),c&&h.push("modal-include-tabs"),l&&l.nzWrapClassName&&(h.push(l.nzWrapClassName),delete l.nzWrapClassName);let p,y=`${ff}-${+new Date}`,v;u!=null&&u!==!1&&(p=b({handleCls:".modal-header, .ant-modal-title"},typeof u=="object"?u:{}),h.push(ff,y));let M=this.srv.create(b({nzWrapClassName:h.join(" "),nzContent:n,nzWidth:f||void 0,nzFooter:null,nzData:i},l));d!==!0&&Object.assign(M.componentInstance,i),M.afterOpen.pipe(ze(1),ge(()=>p!=null)).subscribe(()=>{v=this.createDragRef(p,`.${y}`)}),M.afterClose.pipe(ze(1)).subscribe(P=>{o.exact===!0?P!=null&&s.next(P):s.next(P),s.complete(),v?.dispose()})})}createStatic(n,i,o){let s=b({nzMaskClosable:!1},o&&o.modalOptions);return this.create(n,i,ke(b({},o),{modalOptions:s}))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),eL=(()=>{let e=class e{constructor(){this.srv=w(Jh),this.parentDrawer=w(e,{optional:!0,skipSelf:!0}),this.openDrawersAtThisLevel=[]}get openDrawers(){return this.parentDrawer?this.parentDrawer.openDrawers:this.openDrawersAtThisLevel}create(n,i,o,s){return s=Q6({size:"md",footer:!0,footerHeight:50,exact:!0,drawerOptions:{nzPlacement:"right",nzWrapClassName:""}},s),new Y(a=>{let{size:c,footer:l,footerHeight:u,drawerOptions:d}=s,h={nzContent:i,nzContentParams:o,nzTitle:n};typeof c=="number"?h[d.nzPlacement==="top"||d.nzPlacement==="bottom"?"nzHeight":"nzWidth"]=s.size:d.nzWidth||(h.nzWrapClassName=`${d.nzWrapClassName} drawer-${s.size}`.trim(),delete d.nzWrapClassName),l&&(h.nzBodyStyle={"padding-bottom.px":u+24});let f=this.srv.create(b(b({},h),d));this.openDrawers.push(f);let p=f.afterClose.subscribe(y=>{s.exact===!0?y!=null&&a.next(y):a.next(y),a.complete(),p.unsubscribe(),this.close(f)})})}close(n){let i=this.openDrawers.indexOf(n);i!==-1&&this.openDrawers.splice(i,1)}closeAll(){let n=this.openDrawers.length;for(;n--;)this.openDrawers[n].close()}static(n,i,o,s){let a=b({nzMaskClosable:!1},s&&s.drawerOptions);return this.create(n,i,o,ke(b({},s),{drawerOptions:a}))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),tL=(()=>{let e=class e{constructor(n){this.http=w(_c),this.lc=0,this.cog=n.merge("themeHttp",{nullValueHandling:"include",dateValueHandling:"timestamp"})}get loading(){return this.lc>0}get loadingCount(){return this.lc}parseParams(n){let i={};if(n instanceof rr)return n;let{nullValueHandling:o,dateValueHandling:s}=this.cog;return Object.keys(n).forEach(a=>{let c=n[a];o==="ignore"&&c==null||(c instanceof Date&&(s==="timestamp"||s==="timestampSecond")&&(c=s==="timestamp"?c.valueOf():Math.trunc(c.valueOf()/1e3)),i[a]=c)}),new rr({fromObject:i})}appliedUrl(n,i){if(!i)return n;n+=~n.indexOf("?")?"":"?";let o=[];return Object.keys(i).forEach(s=>{o.push(`${s}=${i[s]}`)}),n+o.join("&")}setCount(n){Promise.resolve(null).then(()=>this.lc=n<=0?0:n)}push(){this.setCount(++this.lc)}pop(){this.setCount(--this.lc)}cleanLoading(){this.setCount(0)}get(n,i,o={}){return this.request("GET",n,b({params:i},o))}post(n,i,o,s={}){return this.request("POST",n,b({body:i,params:o},s))}delete(n,i,o={}){return this.request("DELETE",n,b({params:i},o))}jsonp(n,i,o="JSONP_CALLBACK"){return A(null).pipe(ys(0),Fe(()=>this.push()),Ze(()=>this.http.jsonp(this.appliedUrl(n,i),o)),un(()=>this.pop()))}patch(n,i,o,s={}){return this.request("PATCH",n,b({body:i,params:o},s))}put(n,i,o,s={}){return this.request("PUT",n,b({body:i,params:o},s))}form(n,i,o,s={}){return this.request("POST",n,ke(b({body:i,params:o},s),{headers:{"content-type":"application/x-www-form-urlencoded"}}))}request(n,i,o={}){return o.params&&(o.params=this.parseParams(o.params)),A(null).pipe(ys(0),Fe(()=>this.push()),Ze(()=>this.http.request(n,i,o)),un(()=>this.pop()))}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var nL="__api_params";function k3(t,e=nL){let r=t[e];return typeof r>"u"&&(r=t[e]={}),r}function Sl(t){return function(e){return function(r,n,i){let o=k3(k3(r),n),s=o[t];typeof s>"u"&&(s=o[t]=[]),s.push({key:e,index:i})}}}var rde=Sl("path"),ide=Sl("query"),ode=Sl("body")(),sde=Sl("headers"),ade=Sl("payload")();function Wb(t,e,r){if(!(!t[e]||!Array.isArray(t[e])||t[e].length<=0))return r[t[e][0].index]}function rL(t,e){return Array.isArray(t)||Array.isArray(e)?Object.assign([],t,e):b(b({},t),e)}function ui(t){return function(e="",r){return(n,i,o)=>(o.value=function(...s){r=r||{};let a=this.injector,c=a.get(tL,null);if(c==null)throw new TypeError("Not found '_HttpClient', You can import 'AlainThemeModule' && 'HttpClientModule' in your root module.");let l=k3(this),u=k3(l,i),d=e||"";if(d=[l.baseUrl||"",d.startsWith("/")?d.substring(1):d].join("/"),d.length>1&&d.endsWith("/")&&(d=d.substring(0,d.length-1)),r.acl){let v=a.get(o2,null);if(v&&!v.can(r.acl))return vi(()=>({url:d,status:401,statusText:"From Http Decorator"}));delete r.acl}d=d.replace(/::/g,"^^"),(u.path||[]).filter(v=>typeof s[v.index]<"u").forEach(v=>{d=d.replace(new RegExp(`:${v.key}`,"g"),encodeURIComponent(s[v.index]))}),d=d.replace(/\^\^/g,":");let h=(u.query||[]).reduce((v,M)=>(v[M.key]=s[M.index],v),{}),f=(u.headers||[]).reduce((v,M)=>(v[M.key]=s[M.index],v),{});t==="FORM"&&(f["content-type"]="application/x-www-form-urlencoded");let p=Wb(u,"payload",s),y=["POST","PUT","PATCH","DELETE"].some(v=>v===t);return c.request(t,d,b({body:y?rL(Wb(u,"body",s),p):null,params:y?h:b(b({},h),p),headers:b(b({},l.baseHeaders),f)},r))},o)}}var cde=ui("OPTIONS"),lde=ui("GET"),ude=ui("POST"),dde=ui("DELETE"),hde=ui("PUT"),fde=ui("HEAD"),pde=ui("PATCH"),mde=ui("JSONP"),gde=ui("FORM"),vde=new Qs(()=>!1),yde=new Qs(()=>!1),wde=new Qs(()=>!1),A3=new E("delon-locale"),P3={abbr:"zh-CN",exception:{403:"\u62B1\u6B49\uFF0C\u4F60\u65E0\u6743\u8BBF\u95EE\u8BE5\u9875\u9762",404:"\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728",500:"\u62B1\u6B49\uFF0C\u670D\u52A1\u5668\u51FA\u9519\u4E86",backToHome:"\u8FD4\u56DE\u9996\u9875"},noticeIcon:{emptyText:"\u6682\u65E0\u6570\u636E",clearText:"\u6E05\u7A7A"},reuseTab:{close:"\u5173\u95ED\u6807\u7B7E",closeOther:"\u5173\u95ED\u5176\u5B83\u6807\u7B7E",closeRight:"\u5173\u95ED\u53F3\u4FA7\u6807\u7B7E",refresh:"\u5237\u65B0"},tagSelect:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"},miniProgress:{target:"\u76EE\u6807\u503C\uFF1A"},st:{total:"\u5171 {{total}} \u6761",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E"},sf:{submit:"\u63D0\u4EA4",reset:"\u91CD\u7F6E",search:"\u641C\u7D22",edit:"\u4FDD\u5B58",addText:"\u6DFB\u52A0",removeText:"\u79FB\u9664",checkAllText:"\u5168\u9009",error:{"false schema":"\u5E03\u5C14\u6A21\u5F0F\u51FA\u9519",$ref:"\u65E0\u6CD5\u627E\u5230\u5F15\u7528{ref}",additionalItems:"\u4E0D\u5141\u8BB8\u8D85\u8FC7{limit}\u4E2A\u5143\u7D20",additionalProperties:"\u4E0D\u5141\u8BB8\u6709\u989D\u5916\u7684\u5C5E\u6027",anyOf:"\u6570\u636E\u5E94\u4E3A anyOf \u6240\u6307\u5B9A\u7684\u5176\u4E2D\u4E00\u4E2A",dependencies:"\u5E94\u5F53\u62E5\u6709\u5C5E\u6027{property}\u7684\u4F9D\u8D56\u5C5E\u6027{deps}",enum:"\u5E94\u5F53\u662F\u9884\u8BBE\u5B9A\u7684\u679A\u4E3E\u503C\u4E4B\u4E00",format:"\u683C\u5F0F\u4E0D\u6B63\u786E",type:"\u7C7B\u578B\u5E94\u5F53\u662F {type}",required:"\u5FC5\u586B\u9879",maxLength:"\u81F3\u591A {limit} \u4E2A\u5B57\u7B26",minLength:"\u81F3\u5C11 {limit} \u4E2A\u5B57\u7B26\u4EE5\u4E0A",minimum:"\u5FC5\u987B {comparison}{limit}",formatMinimum:"\u5FC5\u987B {comparison}{limit}",maximum:"\u5FC5\u987B {comparison}{limit}",formatMaximum:"\u5FC5\u987B {comparison}{limit}",maxItems:"\u4E0D\u5E94\u591A\u4E8E {limit} \u4E2A\u9879",minItems:"\u4E0D\u5E94\u5C11\u4E8E {limit} \u4E2A\u9879",maxProperties:"\u4E0D\u5E94\u591A\u4E8E {limit} \u4E2A\u5C5E\u6027",minProperties:"\u4E0D\u5E94\u5C11\u4E8E {limit} \u4E2A\u5C5E\u6027",multipleOf:"\u5E94\u5F53\u662F {multipleOf} \u7684\u6574\u6570\u500D",not:'\u4E0D\u5E94\u5F53\u5339\u914D "not" schema',oneOf:'\u53EA\u80FD\u5339\u914D\u4E00\u4E2A "oneOf" \u4E2D\u7684 schema',pattern:"\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E",uniqueItems:"\u4E0D\u5E94\u5F53\u542B\u6709\u91CD\u590D\u9879 (\u7B2C {j} \u9879\u4E0E\u7B2C {i} \u9879\u662F\u91CD\u590D\u7684)",custom:"\u683C\u5F0F\u4E0D\u6B63\u786E",propertyNames:'\u5C5E\u6027\u540D "{propertyName}" \u65E0\u6548',patternRequired:"\u5E94\u5F53\u6709\u5C5E\u6027\u5339\u914D\u6A21\u5F0F {missingPattern}",switch:'\u7531\u4E8E {caseIndex} \u5931\u8D25\uFF0C\u672A\u901A\u8FC7 "switch" \u6821\u9A8C',const:"\u5E94\u5F53\u7B49\u4E8E\u5E38\u91CF",contains:"\u5E94\u5F53\u5305\u542B\u4E00\u4E2A\u6709\u6548\u9879",formatExclusiveMaximum:"formatExclusiveMaximum \u5E94\u5F53\u662F\u5E03\u5C14\u503C",formatExclusiveMinimum:"formatExclusiveMinimum \u5E94\u5F53\u662F\u5E03\u5C14\u503C",if:'\u5E94\u5F53\u5339\u914D\u6A21\u5F0F "{failingKeyword}"'}},onboarding:{skip:"\u8DF3\u8FC7",prev:"\u4E0A\u4E00\u9879",next:"\u4E0B\u4E00\u9879",done:"\u5B8C\u6210"}},gf=(()=>{let e=class e{constructor(n){this._locale=P3,this.change$=new Re(this._locale),this.setLocale(n||P3)}get change(){return this.change$.asObservable()}setLocale(n){this._locale&&this._locale.abbr===n.abbr||(this._locale=n,this.change$.next(n))}get locale(){return this._locale}getData(n){return this._locale[n]||{}}};e.\u0275fac=function(i){return new(i||e)(g(A3))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function iL(t,e){return t||new gf(e)}var Jb={provide:gf,useFactory:iL,deps:[[new $r,new Hs,gf],A3]},oL=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[{provide:A3,useValue:P3},Jb]});let t=e;return t})();var bde=(()=>{let e=class e{constructor(){this.nzI18n=w($i),this.defFormat=w(Jr).get("themePipe")?.dateFormat??"yyyy-MM-dd HH:mm"}transform(n,i){return qb(n,i??this.defFormat,this.nzI18n.getDateLocale())}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"_date",type:e,pure:!0,standalone:!0});let t=e;return t})();var Gb='',Kb='',pf='class="yn__yes"',mf='class="yn__no"';function sL(t,e){let r="",{yes:n,no:i,mode:o}=b({},e);switch(n=n||"\u662F",i=i||"\u5426",o){case"full":r=t?`${Gb}${n}`:`${Kb}${i}`;break;case"text":r=t?`${n}`:`${i}`;break;default:r=t?`${Gb}`:`${Kb}`;break}return r}var _de=(()=>{let e=class e{constructor(){this.dom=w(Mo)}transform(n,i,o,s,a=!0){let c=sL(n,{yes:i,no:o,mode:s});return a?this.dom.bypassSecurityTrustHtml(c):c}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"yn",type:e,pure:!0,standalone:!0});let t=e;return t})();var Zb=[JR,eL];var aL=[Wd,ol,Kd,Gd],Cde=(()=>{let e=class e{constructor(n){n.addIcon(...aL)}static forRoot(){return{ngModule:e,providers:Zb}}static forChild(){return{ngModule:e,providers:Zb}}};e.\u0275fac=function(i){return new(i||e)(g(fa))},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[Xb],imports:[gc,c9,Qw,kw,oL]});let t=e;return t})();function Mde(t){let e=t?.defaultLang,r=[{provide:X6,useValue:t?.config},{provide:A3,useValue:e?.delon??P3},Jb,J8([zb,Mb]),Xb];e&&(J7(e.ng,e.abbr),r.push({provide:Ii,useValue:e.abbr},Iw(e.zorro),{provide:Sh,useValue:e.date}));let n=t?.i18nClass;n&&r.push({provide:O3,useClass:n,multi:!1});let i=[Wd,ol,Kd,Gd,ly,cy,...t.icons??[]];return r.push({provide:Di,multi:!0,useValue:()=>{w(fa,{optional:!0})?.addIcon(...i)}}),Wt(r)}var Dde=new fo("17.1.0");function cL(t,e){if(t&1&&(se(0,"div",4),et(1,"div",5),le()),t&2){let r=e.$implicit;I("ngClass",r)}}function lL(t,e){if(t&1&&(se(0,"div",2),Q(1,cL,2,1,"div",3),le()),t&2){let r=e.$implicit;k(),I("ngForOf",r)}}function uL(t,e){t&1&&wo(0)}var t_=["*"];function dL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzTitle)}}function hL(t,e){if(t&1&&(se(0,"div",11),Q(1,dL,2,1,"ng-container",12),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzTitle)}}function fL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzExtra)}}function pL(t,e){if(t&1&&(se(0,"div",13),Q(1,fL,2,1,"ng-container",12),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzExtra)}}function mL(t,e){}function gL(t,e){if(t&1&&(tt(0),Q(1,mL,0,0,"ng-template",14),nt()),t&2){let r=G(2);k(),I("ngTemplateOutlet",r.listOfNzCardTabComponent.template)}}function vL(t,e){if(t&1&&(se(0,"div",6)(1,"div",7),Q(2,hL,2,1,"div",8)(3,pL,2,1,"div",9),le(),Q(4,gL,2,1,"ng-container",10),le()),t&2){let r=G();k(2),I("ngIf",r.nzTitle),k(),I("ngIf",r.nzExtra),k(),I("ngIf",r.listOfNzCardTabComponent)}}function yL(t,e){}function wL(t,e){if(t&1&&(se(0,"div",15),Q(1,yL,0,0,"ng-template",14),le()),t&2){let r=G();k(),I("ngTemplateOutlet",r.nzCover)}}function bL(t,e){t&1&&(tt(0),wo(1),nt())}function _L(t,e){t&1&&et(0,"nz-card-loading")}function CL(t,e){}function ML(t,e){if(t&1&&(se(0,"li")(1,"span"),Q(2,CL,0,0,"ng-template",14),le()()),t&2){let r=e.$implicit,n=G(2);Gt("width",100/n.nzActions.length,"%"),k(2),I("ngTemplateOutlet",r)}}function DL(t,e){if(t&1&&(se(0,"ul",16),Q(1,ML,3,3,"li",17),le()),t&2){let r=G();k(),I("ngForOf",r.nzActions)}}function xL(t,e){}function SL(t,e){if(t&1&&(se(0,"div",2),Q(1,xL,0,0,"ng-template",3),le()),t&2){let r=G();k(),I("ngTemplateOutlet",r.nzAvatar)}}function TL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzTitle)}}function EL(t,e){if(t&1&&(se(0,"div",7),Q(1,TL,2,1,"ng-container",8),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzTitle)}}function zL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzDescription)}}function IL(t,e){if(t&1&&(se(0,"div",9),Q(1,zL,2,1,"ng-container",8),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzDescription)}}function kL(t,e){if(t&1&&(se(0,"div",4),Q(1,EL,2,1,"div",5)(2,IL,2,1,"div",6),le()),t&2){let r=G();k(),I("ngIf",r.nzTitle),k(),I("ngIf",r.nzDescription)}}var PL=(()=>{let e=class e{constructor(){this.nzHoverable=!0}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(i,o){i&2&&St("ant-card-hoverable",o.nzHoverable)},inputs:{nzHoverable:"nzHoverable"},exportAs:["nzCardGrid"],standalone:!0});let t=e;return je([Je()],t.prototype,"nzHoverable",void 0),t})(),OL=(()=>{let e=class e{constructor(){this.listOfLoading=[["ant-col-22"],["ant-col-8","ant-col-15"],["ant-col-6","ant-col-18"],["ant-col-13","ant-col-9"],["ant-col-4","ant-col-3","ant-col-16"],["ant-col-8","ant-col-6","ant-col-8"]]}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["nz-card-loading"]],hostAttrs:[1,"ant-card-loading-content"],exportAs:["nzCardLoading"],standalone:!0,features:[_t],decls:2,vars:1,consts:[[1,"ant-card-loading-content"],["class","ant-row","style","margin-left: -4px; margin-right: -4px;",4,"ngFor","ngForOf"],[1,"ant-row",2,"margin-left","-4px","margin-right","-4px"],["style","padding-left: 4px; padding-right: 4px;",3,"ngClass",4,"ngFor","ngForOf"],[2,"padding-left","4px","padding-right","4px",3,"ngClass"],[1,"ant-card-loading-block"]],template:function(i,o){i&1&&(se(0,"div",0),Q(1,lL,2,1,"div",1),le()),i&2&&(k(),I("ngForOf",o.listOfLoading))},dependencies:[pc,fc],encapsulation:2,changeDetection:0});let t=e;return t})(),AL=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["nz-card-tab"]],viewQuery:function(i,o){if(i&1&&On(Me,7),i&2){let s;ct(s=lt())&&(o.template=s.first)}},exportAs:["nzCardTab"],standalone:!0,features:[_t],ngContentSelectors:t_,decls:1,vars:0,template:function(i,o){i&1&&(yo(),Q(0,uL,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let t=e;return t})(),e_="card",FL=(()=>{let e=class e{constructor(n,i,o){this.nzConfigService=n,this.cdr=i,this.directionality=o,this._nzModuleName=e_,this.nzBordered=!0,this.nzBorderless=!1,this.nzLoading=!1,this.nzHoverable=!1,this.nzBodyStyle=null,this.nzActions=[],this.nzType=null,this.nzSize="default",this.dir="ltr",this.destroy$=new S,this.nzConfigService.getConfigChangeEventForComponent(e_).pipe(ce(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.directionality.change?.pipe(ce(this.destroy$)).subscribe(n=>{this.dir=n,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(m(Rn),m(ft),m(Ft,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-card"]],contentQueries:function(i,o,s){if(i&1&&(wn(s,AL,5),wn(s,PL,4)),i&2){let a;ct(a=lt())&&(o.listOfNzCardTabComponent=a.first),ct(a=lt())&&(o.listOfNzCardGridDirective=a)}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(i,o){i&2&&St("ant-card-loading",o.nzLoading)("ant-card-bordered",o.nzBorderless===!1&&o.nzBordered)("ant-card-hoverable",o.nzHoverable)("ant-card-small",o.nzSize==="small")("ant-card-contain-grid",o.listOfNzCardGridDirective&&o.listOfNzCardGridDirective.length)("ant-card-type-inner",o.nzType==="inner")("ant-card-contain-tabs",!!o.listOfNzCardTabComponent)("ant-card-rtl",o.dir==="rtl")},inputs:{nzBordered:"nzBordered",nzBorderless:"nzBorderless",nzLoading:"nzLoading",nzHoverable:"nzHoverable",nzBodyStyle:"nzBodyStyle",nzCover:"nzCover",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],standalone:!0,features:[_t],ngContentSelectors:t_,decls:7,vars:6,consts:[["class","ant-card-head",4,"ngIf"],["class","ant-card-cover",4,"ngIf"],[1,"ant-card-body",3,"ngStyle"],[4,"ngIf","ngIfElse"],["loadingTemplate",""],["class","ant-card-actions",4,"ngIf"],[1,"ant-card-head"],[1,"ant-card-head-wrapper"],["class","ant-card-head-title",4,"ngIf"],["class","ant-card-extra",4,"ngIf"],[4,"ngIf"],[1,"ant-card-head-title"],[4,"nzStringTemplateOutlet"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[1,"ant-card-cover"],[1,"ant-card-actions"],[3,"width",4,"ngFor","ngForOf"]],template:function(i,o){if(i&1&&(yo(),Q(0,vL,5,3,"div",0)(1,wL,2,1,"div",1),se(2,"div",2),Q(3,bL,2,0,"ng-container",3)(4,_L,1,0,"ng-template",null,4,bo),le(),Q(6,DL,2,1,"ul",5)),i&2){let s=$s(5);I("ngIf",o.nzTitle||o.nzExtra||o.listOfNzCardTabComponent),k(),I("ngIf",o.nzCover),k(),I("ngStyle",o.nzBodyStyle),k(),I("ngIf",!o.nzLoading)("ngIfElse",s),k(3),I("ngIf",o.nzActions.length)}},dependencies:[nr,Nr,Fr,mc,_o,OL,pc],encapsulation:2,changeDetection:0});let t=e;return je([Ln(),Je()],t.prototype,"nzBordered",void 0),je([Ln(),Je()],t.prototype,"nzBorderless",void 0),je([Je()],t.prototype,"nzLoading",void 0),je([Ln(),Je()],t.prototype,"nzHoverable",void 0),je([Ln()],t.prototype,"nzSize",void 0),t})(),NL=(()=>{let e=class e{constructor(){this.nzTitle=null,this.nzDescription=null,this.nzAvatar=null}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["nz-card-meta"]],hostAttrs:[1,"ant-card-meta"],inputs:{nzTitle:"nzTitle",nzDescription:"nzDescription",nzAvatar:"nzAvatar"},exportAs:["nzCardMeta"],standalone:!0,features:[_t],decls:2,vars:2,consts:[["class","ant-card-meta-avatar",4,"ngIf"],["class","ant-card-meta-detail",4,"ngIf"],[1,"ant-card-meta-avatar"],[3,"ngTemplateOutlet"],[1,"ant-card-meta-detail"],["class","ant-card-meta-title",4,"ngIf"],["class","ant-card-meta-description",4,"ngIf"],[1,"ant-card-meta-title"],[4,"nzStringTemplateOutlet"],[1,"ant-card-meta-description"]],template:function(i,o){i&1&&Q(0,SL,2,1,"div",0)(1,kL,3,2,"div",1),i&2&&(I("ngIf",o.nzAvatar),k(),I("ngIf",o.nzTitle||o.nzDescription))},dependencies:[nr,mc,Nr,Fr],encapsulation:2,changeDetection:0});let t=e;return t})(),qde=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[FL,NL,Ro]});let t=e;return t})();function Xde(t){return new Promise(e=>{let r=null;try{r=document.createElement("textarea"),r.style.height="0px",r.style.opacity="0",r.style.width="0px",document.body.appendChild(r),r.value=t,r.select(),document.execCommand("copy"),e(t)}finally{r&&r.parentNode&&r.parentNode.removeChild(r)}})}function Jde(t){let e=t.childNodes;for(let r=0;r{let e=class e{constructor(){this._doc=w(V),this.platform=w(Ge)}_getDoc(){return this._doc||document}_getWin(){return this._getDoc().defaultView||window}getScrollPosition(n){if(!this.platform.isBrowser)return[0,0];let i=this._getWin();return n&&n!==i?[n.scrollLeft,n.scrollTop]:[i.scrollX,i.scrollY]}scrollToPosition(n,i){this.platform.isBrowser&&(n||this._getWin()).scrollTo(i[0],i[1])}scrollToElement(n,i=0){if(!this.platform.isBrowser)return;n||(n=this._getDoc().body),n.scrollIntoView();let o=this._getWin();o&&o.scrollBy&&(o.scrollBy(0,n.getBoundingClientRect().top-i),o.scrollY<20&&o.scrollBy(0,-o.scrollY))}scrollToTop(n=0){this.platform.isBrowser&&this.scrollToElement(this._getDoc().body,n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function RL(t,e,r){Object.keys(e).forEach(n=>r.removeClass(t,n))}function LL(t,e,r){for(let n in e)e[n]&&r.addClass(t,n)}function the(t,e,r,n=!1){n===!0?e.removeAttribute(t,"class"):RL(t,r,e),r=b({},r),LL(t,r,e)}export{b as a,ke as b,HL as c,ss as d,c_ as e,VL as f,u_ as g,L3 as h,YL as i,ye as j,Y as k,ds as l,S as m,Re as n,fi as o,e0 as p,La as q,Dt as r,je as s,Le as t,A as u,vi as v,Tn as w,k_ as x,Z as y,Ji as z,Ke as A,gs as B,V_ as C,Kn as D,Hr as E,n0 as F,vs as G,ge as H,G_ as I,K_ as J,Ha as K,En as L,Q_ as M,wi as N,ze as O,eo as P,ys as Q,ws as R,a5 as S,un as T,hr as U,eC as V,tC as W,fr as X,Va as Y,Rt as Z,Ze as _,ce as $,Fe as aa,nC as ba,rC as ca,z as da,R1 as ea,C as fa,ee as ga,E as ha,g as ia,w as ja,W as ka,bt as la,te as ma,ne as na,en as oa,He as pa,pn as qa,mn as ra,zG as sa,IG as ta,Ls as ua,Kp as va,Di as wa,Wt as xa,Ue as ya,Yt as za,gn as Aa,kG as Ba,PG as Ca,Dr as Da,RD as Ea,oe as Fa,Jn as Ga,st as Ha,k as Ia,m as Ja,ft as Ka,js as La,re as Ma,U as Na,nn as Oa,rn as Pa,Xe as Qa,Q as Ra,kn as Sa,I as Ta,Gt as Ua,St as Va,FG as Wa,Du as Xa,v7 as Ya,NG as Za,RG as _a,LG as $a,HG as ab,VG as bb,YG as cb,jG as db,se as eb,le as fb,et as gb,tt as hb,nt as ib,xu as jb,Pn as kb,ZS as lb,l4 as mb,Us as nb,Pt as ob,u4 as pb,G as qb,yo as rb,wo as sb,oT as tb,b7 as ub,Ns as vb,Me as wb,wn as xb,On as yb,ct as zb,lt as Ab,$s as Bb,er as Cb,qs as Db,zi as Eb,yT as Fb,Kr as Gb,_t as Hb,UG as Ib,$G as Jb,S7 as Kb,qG as Lb,Tu as Mb,Eu as Nb,WG as Ob,GG as Pb,bo as Qb,fo as Rb,g4 as Sb,Ii as Tb,k7 as Ub,v4 as Vb,ut as Wb,VT as Xb,Gs as Yb,V as Zb,vE as _b,fc as $b,pc as ac,nr as bc,eg as cc,dK as dc,hK as ec,_o as fc,mc as gc,fK as hc,pK as ic,mK as jc,gK as kc,gc as lc,Zu as mc,rr as nc,Qs as oc,t6 as pc,bc as qc,O4 as rc,_c as sc,zK as tc,IK as uc,WK as vc,Mo as wc,ve as xc,ia as yc,zr as zc,Fi as Ac,Ac as Bc,x6 as Cc,S6 as Dc,Ir as Ec,Bz as Fc,$c as Gc,ir as Hc,dZ as Ic,hZ as Jc,fZ as Kc,pZ as Lc,ik as Mc,ok as Nc,c9 as Oc,CZ as Pc,fk as Qc,Z6 as Rc,Q6 as Sc,MZ as Tc,Jr as Uc,ca as Vc,o2 as Wc,GZ as Xc,KZ as Yc,Ge as Zc,gJ as _c,Fo as $c,Ft as ad,Ro as bd,Ck as cd,Mk as dd,hQ as ed,fQ as fd,P9 as gd,zk as hd,Cn as id,ti as jd,rt as kd,xQ as ld,Mn as md,Pk as nd,SQ as od,TQ as pd,EQ as qd,Ok as rd,Ak as sd,Kc as td,zQ as ud,Je as vd,IQ as wd,kQ as xd,PQ as yd,AQ as zd,FQ as Ad,NQ as Bd,RQ as Cd,LQ as Dd,ZQ as Ed,Rn as Fd,Ln as Gd,M0e as Hd,es as Id,YF as Jd,D0e as Kd,kh as Ld,za as Md,m8e as Nd,rb as Od,tN as Pd,ab as Qd,j8e as Rd,RN as Sd,B8e as Td,U8e as Ud,g6e as Vd,v6e as Wd,si as Xd,ai as Yd,Ar as Zd,ts as _d,qi as $d,Bw as ae,Wi as be,ci as ce,GF as de,K0e as ee,Qw as fe,$9 as ge,fd as he,Yi as ie,pd as je,md as ke,XQ as le,JQ as me,pX as ne,KX as oe,ZX as pe,QX as qe,XX as re,JX as se,eJ as te,tJ as ue,nJ as ve,rJ as we,iJ as xe,oJ as ye,sJ as ze,aJ as Ae,cJ as Be,lJ as Ce,ii as De,No as Ee,eh as Fe,nh as Ge,zy as He,F2 as Ie,rh as Je,Fr as Ke,Nr as Le,i8e as Me,tb as Ne,_ as Oe,ga as Pe,Sn as Qe,gl as Re,Go as Se,Ko as Te,dh as Ue,Zo as Ve,R3e as We,L3e as Xe,H3e as Ye,bl as Ze,EF as _e,$i as $e,J3e as af,kw as bf,Ow as cf,uR as df,Qh as ef,Mb as ff,xb as gf,PR as hf,Eb as if,zb as jf,GR as kf,qb as lf,X6e as mf,O3 as nf,QR as of,J6e as pf,ede as qf,tde as rf,nde as sf,JR as tf,eL as uf,tL as vf,yde as wf,P3 as xf,gf as yf,oL as zf,bde as Af,sL as Bf,_de as Cf,Cde as Df,Mde as Ef,Dde as Ff,Xde as Gf,Jde as Hf,ehe as If,the as Jf,FL as Kf,qde as Lf}; +https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md`),o||i||this._getObjectPath(TF,n)||{}}_getObjectPath(n,i){let o=n,s=i.split("."),a=s.length,c=0;for(;o&&c{let e=class e{constructor(n){this._locale=n}transform(n,i){return this._locale.translate(n,i)}};e.\u0275fac=function(i){return new(i||e)(m($i,16))},e.\u0275pipe=en({name:"nzI18n",type:e,pure:!0,standalone:!0});let t=e;return t})(),Pw=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})(),Ow=new E("date-config"),zF={firstDayOfWeek:void 0};function IF(t){return b(b({},zF),t)}function kF(){let t=w($i),e=w(Ow,{optional:!0});return t.getDateLocale()?new Dh(t,e):new xh(t,e)}var Aw=(()=>{let e=class e{constructor(n,i){this.i18n=n,this.config=IF(i)}};e.\u0275fac=function(i){return new(i||e)(g($i),g(Ow,8))},e.\u0275prov=C({token:e,factory:()=>kF(),providedIn:"root"});let t=e;return t})(),Dh=class extends Aw{getISOWeek(e){return W2(e)}getFirstDayOfWeek(){let e;try{e=this.i18n.getDateLocale().options.weekStartsOn}catch{e=1}return this.config.firstDayOfWeek==null?e:this.config.firstDayOfWeek}format(e,r){return e?Zo(e,r,{locale:this.i18n.getDateLocale()}):""}parseDate(e,r){return Ta(e,r,new Date,{locale:this.i18n.getDateLocale(),weekStartsOn:this.getFirstDayOfWeek()})}parseTime(e,r){return this.parseDate(e,r)}},xh=class extends Aw{getISOWeek(e){return+this.format(e,"w")}getFirstDayOfWeek(){if(this.config.firstDayOfWeek===void 0){let e=this.i18n.getLocaleId();return e&&["zh-cn","zh-tw"].indexOf(e.toLowerCase())>-1?1:0}return this.config.firstDayOfWeek}format(e,r){return e?Gu(e,r,this.i18n.getLocaleId()):""}parseDate(e){return new Date(e)}parseTime(e,r){return new f3(r,this.i18n.getLocaleId()).toDate(e)}};var Th=class{};function Fw(t){return t&&typeof t.connect=="function"&&!(t instanceof lr)}var p3=class extends Th{constructor(e){super(),this._data=e}connect(){return Tn(this._data)?this._data:A(this._data)}disconnect(){}},Cl=function(t){return t[t.REPLACED=0]="REPLACED",t[t.INSERTED=1]="INSERTED",t[t.MOVED=2]="MOVED",t[t.REMOVED=3]="REMOVED",t}(Cl||{}),Eh=new E("_ViewRepeater");var m3=class{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(e,r,n,i,o){e.forEachOperation((s,a,c)=>{let l,u;if(s.previousIndex==null){let d=()=>n(s,a,c);l=this._insertView(d,c,r,i(s)),u=l?Cl.INSERTED:Cl.REPLACED}else c==null?(this._detachAndCacheView(a,r),u=Cl.REMOVED):(l=this._moveView(a,c,r,i(s)),u=Cl.MOVED);o&&o({context:l?.context,operation:u,record:s})})}detach(){for(let e of this._viewCache)e.destroy();this._viewCache=[]}_insertView(e,r,n,i){let o=this._insertViewFromCache(r,n);if(o){o.context.$implicit=i;return}let s=e();return n.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(e,r){let n=r.detach(e);this._maybeCacheView(n,r)}_moveView(e,r,n,i){let o=n.get(e);return n.move(o,r),o.context.$implicit=i,o}_maybeCacheView(e,r){if(this._viewCache.length0?o/this._itemSize:0;if(r.end>i){let c=Math.ceil(n/this._itemSize),l=Math.max(0,Math.min(s,i-c));s!=l&&(s=l,o=l*this._itemSize,r.start=Math.floor(s)),r.end=Math.max(0,Math.min(i,r.start+c))}let a=o-r.start*this._itemSize;if(a0&&(r.end=Math.min(i,r.end+l),r.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(r),this._viewport.setRenderedContentOffset(this._itemSize*r.start),this._scrolledIndexChange.next(Math.floor(s))}};function FF(t){return t._scrollStrategy}var x0e=(()=>{let e=class e{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new zh(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(n){this._itemSize=ti(n)}get minBufferPx(){return this._minBufferPx}set minBufferPx(n){this._minBufferPx=ti(n)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(n){this._maxBufferPx=ti(n)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},standalone:!0,features:[Kr([{provide:Hw,useFactory:FF,deps:[R1(()=>e)]}]),He]});let t=e;return t})(),NF=20,Jo=(()=>{let e=class e{constructor(n,i,o){this._ngZone=n,this._platform=i,this._scrolled=new S,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=o}register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let i=this.scrollContainers.get(n);i&&(i.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=NF){return this._platform.isBrowser?new Y(i=>{this._globalSubscription||this._addGlobalListener();let o=n>0?this._scrolled.pipe(Va(n)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):A()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((n,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(n,i){let o=this.getAncestorScrollContainers(n);return this.scrolled(i).pipe(ge(s=>!s||o.indexOf(s)>-1))}getAncestorScrollContainers(n){let i=[];return this.scrollContainers.forEach((o,s)=>{this._scrollableContainsElement(s,n)&&i.push(s)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(n,i){let o=rt(i),s=n.getElementRef().nativeElement;do if(o==s)return!0;while(o=o.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let n=this._getWindow();return Kn(n.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}};e.\u0275fac=function(i){return new(i||e)(g(U),g(Ge),g(V,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ih=(()=>{let e=class e{constructor(n,i,o,s){this.elementRef=n,this.scrollDispatcher=i,this.ngZone=o,this.dir=s,this._destroyed=new S,this._elementScrolled=new Y(a=>this.ngZone.runOutsideAngular(()=>Kn(this.elementRef.nativeElement,"scroll").pipe(ce(this._destroyed)).subscribe(a)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(n){let i=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";n.left==null&&(n.left=o?n.end:n.start),n.right==null&&(n.right=o?n.start:n.end),n.bottom!=null&&(n.top=i.scrollHeight-i.clientHeight-n.bottom),o&&ha()!=ar.NORMAL?(n.left!=null&&(n.right=i.scrollWidth-i.clientWidth-n.left),ha()==ar.INVERTED?n.left=n.right:ha()==ar.NEGATED&&(n.left=n.right?-n.right:n.right)):n.right!=null&&(n.left=i.scrollWidth-i.clientWidth-n.right),this._applyScrollToOptions(n)}_applyScrollToOptions(n){let i=this.elementRef.nativeElement;O2()?i.scrollTo(n):(n.top!=null&&(i.scrollTop=n.top),n.left!=null&&(i.scrollLeft=n.left))}measureScrollOffset(n){let i="left",o="right",s=this.elementRef.nativeElement;if(n=="top")return s.scrollTop;if(n=="bottom")return s.scrollHeight-s.clientHeight-s.scrollTop;let a=this.dir&&this.dir.value=="rtl";return n=="start"?n=a?o:i:n=="end"&&(n=a?i:o),a&&ha()==ar.INVERTED?n==i?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:a&&ha()==ar.NEGATED?n==i?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:n==i?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(Jo),m(U),m(Ft,8))},e.\u0275dir=ne({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0});let t=e;return t})(),RF=20,es=(()=>{let e=class e{constructor(n,i,o){this._platform=n,this._change=new S,this._changeListener=s=>{this._change.next(s)},this._document=o,i.runOutsideAngular(()=>{if(n.isBrowser){let s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let n=this._getWindow();n.removeEventListener("resize",this._changeListener),n.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:i,height:o}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+o,right:n.left+i,height:o,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,i=this._getWindow(),o=n.documentElement,s=o.getBoundingClientRect(),a=-s.top||n.body.scrollTop||i.scrollY||o.scrollTop||0,c=-s.left||n.body.scrollLeft||i.scrollX||o.scrollLeft||0;return{top:a,left:c}}change(n=RF){return n>0?this._change.pipe(Va(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(U),g(V,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Nw=new E("VIRTUAL_SCROLLABLE"),LF=(()=>{let e=class e extends Ih{constructor(n,i,o,s){super(n,i,o,s)}measureViewportSize(n){let i=this.elementRef.nativeElement;return n==="horizontal"?i.clientWidth:i.clientHeight}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(Jo),m(U),m(Ft,8))},e.\u0275dir=ne({type:e,features:[nn]});let t=e;return t})();function HF(t,e){return t.start==e.start&&t.end==e.end}var VF=typeof requestAnimationFrame<"u"?Ha:e0,YF=(()=>{let e=class e extends LF{get orientation(){return this._orientation}set orientation(n){this._orientation!==n&&(this._orientation=n,this._calculateSpacerSize())}constructor(n,i,o,s,a,c,l,u){super(n,c,o,a),this.elementRef=n,this._changeDetectorRef=i,this._scrollStrategy=s,this.scrollable=u,this._platform=w(Ge),this._detachedSubject=new S,this._renderedRangeSubject=new S,this._orientation="vertical",this.appendOnly=!1,this.scrolledIndexChange=new Y(d=>this._scrollStrategy.scrolledIndexChange.subscribe(h=>Promise.resolve().then(()=>this.ngZone.run(()=>d.next(h))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=ye.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Rt(null),Va(0,VF),ce(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(n){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=n,this._forOf.dataStream.pipe(ce(this._detachedSubject)).subscribe(i=>{let o=i.length;o!==this._dataLength&&(this._dataLength=o,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(n){return this.getElementRef().nativeElement.getBoundingClientRect()[n]}setTotalContentSize(n){this._totalContentSize!==n&&(this._totalContentSize=n,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(n){HF(this._renderedRange,n)||(this.appendOnly&&(n={start:0,end:Math.max(this._renderedRange.end,n.end)}),this._renderedRangeSubject.next(this._renderedRange=n),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(n,i="to-start"){n=this.appendOnly&&i==="to-start"?0:n;let o=this.dir&&this.dir.value=="rtl",s=this.orientation=="horizontal",a=s?"X":"Y",l=`translate${a}(${Number((s&&o?-1:1)*n)}px)`;this._renderedContentOffset=n,i==="to-end"&&(l+=` translate${a}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(n,i="auto"){let o={behavior:i};this.orientation==="horizontal"?o.start=n:o.top=n,this.scrollable.scrollTo(o)}scrollToIndex(n,i="auto"){this._scrollStrategy.scrollToIndex(n,i)}measureScrollOffset(n){let i;return this.scrollable==this?i=o=>super.measureScrollOffset(o):i=o=>this.scrollable.measureScrollOffset(o),Math.max(0,i(n??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(n){let i,o="left",s="right",a=this.dir?.value=="rtl";n=="start"?i=a?s:o:n=="end"?i=a?o:s:n?i=n:i=this.orientation==="horizontal"?"left":"top";let c=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-c}measureRenderedContentSize(){let n=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?n.offsetWidth:n.offsetHeight}measureRangeSize(n){return this._forOf?this._forOf.measureRangeSize(n,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(n){n&&this._runAfterChangeDetection.push(n),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());let n=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of n)i()}_calculateSpacerSize(){this._totalContentHeight=this.orientation==="horizontal"?"":`${this._totalContentSize}px`,this._totalContentWidth=this.orientation==="horizontal"?`${this._totalContentSize}px`:""}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(ft),m(U),m(Hw,8),m(Ft,8),m(Jo),m(es),m(Nw,8))},e.\u0275cmp=bt({type:e,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,o){if(i&1&&On(OF,7),i&2){let s;ct(s=lt())&&(o._contentWrapper=s.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,o){i&2&&St("cdk-virtual-scroll-orientation-horizontal",o.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",o.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[W.HasDecoratorInputTransform,"appendOnly","appendOnly",ut]},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[Kr([{provide:Ih,useFactory:(n,i)=>n||i,deps:[[new $r,new Xp(Nw)],e]}]),rn,nn,_t],ngContentSelectors:AF,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(i,o){i&1&&(yo(),se(0,"div",0,1),wo(2),le(),et(3,"div",2)),i&2&&(k(3),Gt("width",o._totalContentWidth)("height",o._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0});let t=e;return t})();function Rw(t,e,r){let n=r;if(!n.getBoundingClientRect)return 0;let i=n.getBoundingClientRect();return t==="horizontal"?e==="start"?i.left:i.right:e==="start"?i.top:i.bottom}var S0e=(()=>{let e=class e{get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(n){this._cdkVirtualForOf=n,Fw(n)?this._dataSourceChanges.next(n):this._dataSourceChanges.next(new p3(Tn(n)?n:Array.from(n||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(n){this._needsUpdate=!0,this._cdkVirtualForTrackBy=n?(i,o)=>n(i+(this._renderedRange?this._renderedRange.start:0),o):void 0}set cdkVirtualForTemplate(n){n&&(this._needsUpdate=!0,this._template=n)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(n){this._viewRepeater.viewCacheSize=ti(n)}constructor(n,i,o,s,a,c){this._viewContainerRef=n,this._template=i,this._differs=o,this._viewRepeater=s,this._viewport=a,this.viewChange=new S,this._dataSourceChanges=new S,this.dataStream=this._dataSourceChanges.pipe(Rt(null),o0(),Ze(([l,u])=>this._changeDataSource(l,u)),c0(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new S,this.dataStream.subscribe(l=>{this._data=l,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(ce(this._destroyed)).subscribe(l=>{this._renderedRange=l,this.viewChange.observers.length&&c.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(n,i){if(n.start>=n.end)return 0;n.startthis._renderedRange.end;let o=n.start-this._renderedRange.start,s=n.end-n.start,a,c;for(let l=0;l-1;l--){let u=this._viewContainerRef.get(l+o);if(u&&u.rootNodes.length){c=u.rootNodes[u.rootNodes.length-1];break}}return a&&c?Rw(i,"end",c)-Rw(i,"start",a):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let n=this._differ.diff(this._renderedItems);n?this._applyChanges(n):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((n,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(n,i):i)),this._needsUpdate=!0)}_changeDataSource(n,i){return n&&n.disconnect(this),this._needsUpdate=!0,i?i.connect(this):A()}_updateContext(){let n=this._data.length,i=this._viewContainerRef.length;for(;i--;){let o=this._viewContainerRef.get(i);o.context.index=this._renderedRange.start+i,o.context.count=n,this._updateComputedContextProperties(o.context),o.detectChanges()}}_applyChanges(n){this._viewRepeater.applyChanges(n,this._viewContainerRef,(s,a,c)=>this._getEmbeddedViewArgs(s,c),s=>s.item),n.forEachIdentityChange(s=>{let a=this._viewContainerRef.get(s.currentIndex);a.context.$implicit=s.item});let i=this._data.length,o=this._viewContainerRef.length;for(;o--;){let s=this._viewContainerRef.get(o);s.context.index=this._renderedRange.start+o,s.context.count=i,this._updateComputedContextProperties(s.context)}}_updateComputedContextProperties(n){n.first=n.index===0,n.last=n.index===n.count-1,n.even=n.index%2===0,n.odd=!n.even}_getEmbeddedViewArgs(n,i){return{templateRef:this._template,context:{$implicit:n.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me),m(cc),m(Eh),m(YF,4),m(U))},e.\u0275dir=ne({type:e,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},standalone:!0,features:[Kr([{provide:Eh,useClass:m3}])]});let t=e;return t})();var Lw=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})(),kh=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[Ro,Lw,Ro,Lw]});let t=e;return t})();var Ml=class{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},si=class extends Ml{constructor(e,r,n,i,o){super(),this.component=e,this.viewContainerRef=r,this.injector=n,this.componentFactoryResolver=i,this.projectableNodes=o}},ai=class extends Ml{constructor(e,r,n,i){super(),this.templateRef=e,this.viewContainerRef=r,this.context=n,this.injector=i}get origin(){return this.templateRef.elementRef}attach(e,r=this.context){return this.context=r,super.attach(e)}detach(){return this.context=void 0,super.detach()}},Ph=class extends Ml{constructor(e){super(),this.element=e instanceof oe?e.nativeElement:e}},Ea=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof si)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof ai)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof Ph)return this._attachedPortal=e,this.attachDomPortal(e)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var g3=class extends Ea{constructor(e,r,n,i,o){super(),this.outletElement=e,this._componentFactoryResolver=r,this._appRef=n,this._defaultInjector=i,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let c=this._document.createComment("dom-portal");a.parentNode.insertBefore(c,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}attachComponentPortal(e){let n=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),i;return e.viewContainerRef?(i=e.viewContainerRef.createComponent(n,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>i.destroy())):(i=n.create(e.injector||this._defaultInjector||Ue.NULL),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(i.hostView),i.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(i)),this._attachedPortal=e,i}attachTemplatePortal(e){let r=e.viewContainerRef,n=r.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(i=>this.outletElement.appendChild(i)),n.detectChanges(),this.setDisposeFn(()=>{let i=r.indexOf(n);i!==-1&&r.remove(i)}),this._attachedPortal=e,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Ar=(()=>{let e=class e extends Ea{constructor(n,i,o){super(),this._componentFactoryResolver=n,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new re,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let c=this._document.createComment("dom-portal");s.setAttachedHost(this),a.parentNode.insertBefore(c,a),this._getRootNode().appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let i=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,s=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component),a=i.createComponent(s,i.length,n.injector||i.injector,n.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=n,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(n){n.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}};e.\u0275fac=function(i){return new(i||e)(m(Ei),m(Xe),m(V))},e.\u0275dir=ne({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[W.None,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[nn]});let t=e;return t})();var ts=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();function za(t,...e){return e.length?e.some(r=>t[r]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var jw=O2(),Oh=class{constructor(e,r){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=r}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=at(-this._previousScrollPosition.left),e.style.top=at(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,r=this._document.body,n=e.style,i=r.style,o=n.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),jw&&(n.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),jw&&(n.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let r=this._document.body,n=this._viewportRuler.getViewportSize();return r.scrollHeight>n.height||r.scrollWidth>n.width}};var Ah=class{constructor(e,r,n,i){this._scrollDispatcher=e,this._ngZone=r,this._viewportRuler=n,this._config=i,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(ge(r=>!r||!this._overlayRef.overlayElement.contains(r.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let r=this._viewportRuler.getViewportScrollPosition().top;Math.abs(r-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},v3=class{enable(){}disable(){}attach(){}};function Fh(t,e){return e.some(r=>{let n=t.bottomr.bottom,o=t.rightr.right;return n||i||o||s})}function Bw(t,e){return e.some(r=>{let n=t.topr.bottom,o=t.leftr.right;return n||i||o||s})}var Nh=class{constructor(e,r,n,i){this._scrollDispatcher=e,this._viewportRuler=r,this._ngZone=n,this._config=i,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let r=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:i}=this._viewportRuler.getViewportSize();Fh(r,[{width:n,height:i,bottom:i,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},jF=(()=>{let e=class e{constructor(n,i,o,s){this._scrollDispatcher=n,this._viewportRuler=i,this._ngZone=o,this.noop=()=>new v3,this.close=a=>new Ah(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new Oh(this._viewportRuler,this._document),this.reposition=a=>new Nh(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=s}};e.\u0275fac=function(i){return new(i||e)(g(Jo),g(es),g(U),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qi=class{constructor(e){if(this.scrollStrategy=new v3,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let r=Object.keys(e);for(let n of r)e[n]!==void 0&&(this[n]=e[n])}}},Uw=class{constructor(e,r,n,i,o){this.offsetX=n,this.offsetY=i,this.panelClass=o,this.originX=e.originX,this.originY=e.originY,this.overlayX=r.overlayX,this.overlayY=r.overlayY}};var Rh=class{constructor(e,r){this.connectionPair=e,this.scrollableViewProperties=r}};var Kw=(()=>{let e=class e{constructor(n){this._attachedOverlays=[],this._document=n}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let i=this._attachedOverlays.indexOf(n);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}};e.\u0275fac=function(i){return new(i||e)(g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Vh=(()=>{let e=class e extends Kw{constructor(n,i){super(n),this._ngZone=i,this._keydownListener=o=>{let s=this._attachedOverlays;for(let a=s.length-1;a>-1;a--)if(s[a]._keydownEvents.observers.length>0){let c=s[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>c.next(o)):c.next(o);break}}}add(n){super.add(n),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(U,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),BF=(()=>{let e=class e extends Kw{constructor(n,i,o){super(n),this._platform=i,this._ngZone=o,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=cn(s)},this._clickListener=s=>{let a=cn(s),c=s.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let u=l.length-1;u>-1;u--){let d=l[u];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(a)||d.overlayElement.contains(c))break;let h=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(n){if(super.add(n),!this._isAttached){let i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let n=this._document.body;n.removeEventListener("pointerdown",this._pointerDownListener,!0),n.removeEventListener("click",this._clickListener,!0),n.removeEventListener("auxclick",this._clickListener,!0),n.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(n.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(n){n.addEventListener("pointerdown",this._pointerDownListener,!0),n.addEventListener("click",this._clickListener,!0),n.addEventListener("auxclick",this._clickListener,!0),n.addEventListener("contextmenu",this._clickListener,!0)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(Ge),g(U,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Zw=(()=>{let e=class e{constructor(n,i){this._platform=i,this._document=n}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Jd()){let o=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;sthis._backdropClick.next(d),this._backdropTransitionendHandler=d=>{this._disposeBackdrop(d.target)},this._keydownEvents=new S,this._outsidePointerEvents=new S,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let r=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(ze(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof r?.onDestroy=="function"&&r.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),r}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=b(b({},this._config),e),this._updateElementSize()}setDirection(e){this._config=ke(b({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=at(this._config.width),e.height=at(this._config.height),e.minWidth=at(this._config.minWidth),e.minHeight=at(this._config.minHeight),e.maxWidth=at(this._config.maxWidth),e.maxHeight=at(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,r,n){let i=zo(r||[]).filter(o=>!!o);i.length&&(n?e.classList.add(...i):e.classList.remove(...i))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{let e=this._ngZone.onStable.pipe(ce(vs(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},$w="cdk-overlay-connected-position-bounding-box",UF=/([A-Za-z%]+)$/,Lh=class{get positions(){return this._preferredPositions}constructor(e,r,n,i,o){this._viewportRuler=r,this._document=n,this._platform=i,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new S,this._resizeSubscription=ye.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add($w),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,r=this._overlayRect,n=this._viewportRect,i=this._containerRect,o=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(e,i,a),l=this._getOverlayPoint(c,r,a),u=this._getOverlayFit(l,r,n,a);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(u,l,n)){o.push({position:a,origin:c,overlayRect:r,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleAreac&&(c=u,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&ns(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove($w),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let r=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,r)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,r,n){let i;if(n.originX=="center")i=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;i=n.originX=="start"?s:a}r.left<0&&(i-=r.left);let o;return n.originY=="center"?o=e.top+e.height/2:o=n.originY=="top"?e.top:e.bottom,r.top<0&&(o-=r.top),{x:i,y:o}}_getOverlayPoint(e,r,n){let i;n.overlayX=="center"?i=-r.width/2:n.overlayX==="start"?i=this._isRtl()?-r.width:0:i=this._isRtl()?0:-r.width;let o;return n.overlayY=="center"?o=-r.height/2:o=n.overlayY=="top"?0:-r.height,{x:e.x+i,y:e.y+o}}_getOverlayFit(e,r,n,i){let o=Ww(r),{x:s,y:a}=e,c=this._getOffset(i,"x"),l=this._getOffset(i,"y");c&&(s+=c),l&&(a+=l);let u=0-s,d=s+o.width-n.width,h=0-a,f=a+o.height-n.height,p=this._subtractOverflows(o.width,u,d),y=this._subtractOverflows(o.height,h,f),v=p*y;return{visibleArea:v,isCompletelyWithinViewport:o.width*o.height===v,fitsInViewportVertically:y===o.height,fitsInViewportHorizontally:p==o.width}}_canFitWithFlexibleDimensions(e,r,n){if(this._hasFlexibleDimensions){let i=n.bottom-r.y,o=n.right-r.x,s=qw(this._overlayRef.getConfig().minHeight),a=qw(this._overlayRef.getConfig().minWidth),c=e.fitsInViewportVertically||s!=null&&s<=i,l=e.fitsInViewportHorizontally||a!=null&&a<=o;return c&&l}return!1}_pushOverlayOnScreen(e,r,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let i=Ww(r),o=this._viewportRect,s=Math.max(e.x+i.width-o.width,0),a=Math.max(e.y+i.height-o.height,0),c=Math.max(o.top-n.top-e.y,0),l=Math.max(o.left-n.left-e.x,0),u=0,d=0;return i.width<=o.width?u=l||-s:u=e.xp&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-p/2)}let c=r.overlayX==="start"&&!i||r.overlayX==="end"&&i,l=r.overlayX==="end"&&!i||r.overlayX==="start"&&i,u,d,h;if(l)h=n.width-e.x+this._viewportMargin,u=e.x-this._viewportMargin;else if(c)d=e.x,u=n.right-e.x;else{let f=Math.min(n.right-e.x+n.left,e.x),p=this._lastBoundingBoxSize.width;u=f*2,d=e.x-f,u>p&&!this._isInitialRender&&!this._growAfterOpen&&(d=e.x-p/2)}return{top:s,left:d,bottom:a,right:h,width:u,height:o}}_setBoundingBoxStyles(e,r){let n=this._calculateBoundingBoxRect(e,r);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=at(n.height),i.top=at(n.top),i.bottom=at(n.bottom),i.width=at(n.width),i.left=at(n.left),i.right=at(n.right),r.overlayX==="center"?i.alignItems="center":i.alignItems=r.overlayX==="end"?"flex-end":"flex-start",r.overlayY==="center"?i.justifyContent="center":i.justifyContent=r.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=at(o)),s&&(i.maxWidth=at(s))}this._lastBoundingBoxSize=n,ns(this._boundingBox.style,i)}_resetBoundingBoxStyles(){ns(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){ns(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,r){let n={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let u=this._viewportRuler.getViewportScrollPosition();ns(n,this._getExactOverlayY(r,e,u)),ns(n,this._getExactOverlayX(r,e,u))}else n.position="static";let a="",c=this._getOffset(r,"x"),l=this._getOffset(r,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),n.transform=a.trim(),s.maxHeight&&(i?n.maxHeight=at(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(i?n.maxWidth=at(s.maxWidth):o&&(n.maxWidth="")),ns(this._pane.style,n)}_getExactOverlayY(e,r,n){let i={top:"",bottom:""},o=this._getOverlayPoint(r,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=at(o.y);return i}_getExactOverlayX(e,r,n){let i={left:"",right:""},o=this._getOverlayPoint(r,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(o.x+this._overlayRect.width)}px`}else i.left=at(o.x);return i}_getScrollVisibility(){let e=this._getOriginRect(),r=this._pane.getBoundingClientRect(),n=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Bw(e,n),isOriginOutsideView:Fh(e,n),isOverlayClipped:Bw(r,n),isOverlayOutsideView:Fh(r,n)}}_subtractOverflows(e,...r){return r.reduce((n,i)=>n-Math.max(i,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,r=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+r-this._viewportMargin,width:e-2*this._viewportMargin,height:r-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,r){return r==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&zo(e).forEach(r=>{r!==""&&this._appliedPanelClasses.indexOf(r)===-1&&(this._appliedPanelClasses.push(r),this._pane.classList.add(r))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof oe)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let r=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+r,height:n,width:r}}};function ns(t,e){for(let r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function qw(t){if(typeof t!="number"&&t!=null){let[e,r]=t.split(UF);return!r||r==="px"?parseFloat(e):null}return t||null}function Ww(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}var Gw="cdk-global-overlay-wrapper",Hh=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let r=e.getConfig();this._overlayRef=e,this._width&&!r.width&&e.updateSize({width:this._width}),this._height&&!r.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Gw),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,r=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:a}=n,c=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),u=this._xPosition,d=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",f="",p="",y="";c?y="flex-start":u==="center"?(y="center",h?p=d:f=d):h?u==="left"||u==="end"?(y="flex-end",f=d):(u==="right"||u==="start")&&(y="flex-start",p=d):u==="left"||u==="start"?(y="flex-start",f=d):(u==="right"||u==="end")&&(y="flex-end",p=d),e.position=this._cssPosition,e.marginLeft=c?"0":f,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=c?"0":p,r.justifyContent=y,r.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,r=this._overlayRef.hostElement,n=r.style;r.classList.remove(Gw),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},$F=(()=>{let e=class e{constructor(n,i,o,s){this._viewportRuler=n,this._document=i,this._platform=o,this._overlayContainer=s}global(){return new Hh}flexibleConnectedTo(n){return new Lh(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}};e.\u0275fac=function(i){return new(i||e)(g(es),g(V),g(Ge),g(Zw))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),qF=0,ci=(()=>{let e=class e{constructor(n,i,o,s,a,c,l,u,d,h,f,p){this.scrollStrategies=n,this._overlayContainer=i,this._componentFactoryResolver=o,this._positionBuilder=s,this._keyboardDispatcher=a,this._injector=c,this._ngZone=l,this._document=u,this._directionality=d,this._location=h,this._outsideClickDispatcher=f,this._animationsModuleType=p}create(n){let i=this._createHostElement(),o=this._createPaneElement(i),s=this._createPortalOutlet(o),a=new qi(n);return a.direction=a.direction||this._directionality.value,new Wi(s,i,o,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations")}position(){return this._positionBuilder}_createPaneElement(n){let i=this._document.createElement("div");return i.id=`cdk-overlay-${qF++}`,i.classList.add("cdk-overlay-pane"),n.appendChild(i),i}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(xr)),new g3(n,this._componentFactoryResolver,this._appRef,this._injector,this._document)}};e.\u0275fac=function(i){return new(i||e)(g(jF),g(Zw),g(Ei),g($F),g(Vh),g(Ue),g(U),g(V),g(Ft),g(ki),g(BF),g(gn,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),WF=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],Qw=new E("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=w(ci);return()=>t.scrollStrategies.reposition()}}),GF=(()=>{let e=class e{constructor(n){this.elementRef=n}};e.\u0275fac=function(i){return new(i||e)(m(oe))},e.\u0275dir=ne({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0});let t=e;return t})(),Q0e=(()=>{let e=class e{get offsetX(){return this._offsetX}set offsetX(n){this._offsetX=n,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(n){this._offsetY=n,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(n){this._disposeOnNavigation=n}constructor(n,i,o,s,a){this._overlay=n,this._dir=a,this._backdropSubscription=ye.EMPTY,this._attachSubscription=ye.EMPTY,this._detachSubscription=ye.EMPTY,this._positionSubscription=ye.EMPTY,this._disposeOnNavigation=!1,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new re,this.positionChange=new re,this.attach=new re,this.detach=new re,this.overlayKeydown=new re,this.overlayOutsideClick=new re,this._templatePortal=new ai(i,o),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(n){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),n.origin&&this.open&&this._position.apply()),n.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=WF);let n=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=n.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=n.detachments().subscribe(()=>this.detach.emit()),n.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),i.keyCode===27&&!this.disableClose&&!za(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){let n=this._position=this.positionStrategy||this._createPositionStrategy(),i=new qi({direction:this._dir,positionStrategy:n,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(i.width=this.width),(this.height||this.height===0)&&(i.height=this.height),(this.minWidth||this.minWidth===0)&&(i.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(n){let i=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return n.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let n=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(n),n}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof GF?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(n=>{this.backdropClick.emit(n)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(l0(()=>this.positionChange.observers.length>0)).subscribe(n=>{this.positionChange.emit(n),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)(m(ci),m(Me),m(Xe),m(Qw),m(Ft,8))},e.\u0275dir=ne({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[W.None,"cdkConnectedOverlayOrigin","origin"],positions:[W.None,"cdkConnectedOverlayPositions","positions"],positionStrategy:[W.None,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[W.None,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[W.None,"cdkConnectedOverlayOffsetY","offsetY"],width:[W.None,"cdkConnectedOverlayWidth","width"],height:[W.None,"cdkConnectedOverlayHeight","height"],minWidth:[W.None,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[W.None,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[W.None,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[W.None,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[W.None,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[W.None,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[W.None,"cdkConnectedOverlayOpen","open"],disableClose:[W.None,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[W.None,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[W.HasDecoratorInputTransform,"cdkConnectedOverlayHasBackdrop","hasBackdrop",ut],lockPosition:[W.HasDecoratorInputTransform,"cdkConnectedOverlayLockPosition","lockPosition",ut],flexibleDimensions:[W.HasDecoratorInputTransform,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",ut],growAfterOpen:[W.HasDecoratorInputTransform,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",ut],push:[W.HasDecoratorInputTransform,"cdkConnectedOverlayPush","push",ut],disposeOnNavigation:[W.HasDecoratorInputTransform,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",ut]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[rn,He]});let t=e;return t})();function KF(t){return()=>t.scrollStrategies.reposition()}var ZF={provide:Qw,deps:[ci],useFactory:KF},Xw=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[ci,ZF],imports:[Ro,ts,kh,kh]});let t=e;return t})();var Fr=(()=>{let e=class e{static ngTemplateContextGuard(n,i){return!0}recreateView(){this.viewContainer.clear();let n=this.nzStringTemplateOutlet instanceof Me,i=n?this.nzStringTemplateOutlet:this.templateRef;this.embeddedViewRef=this.viewContainer.createEmbeddedView(i,n?this.nzStringTemplateOutletContext:this.context)}updateContext(){let i=this.nzStringTemplateOutlet instanceof Me?this.nzStringTemplateOutletContext:this.context,o=this.embeddedViewRef.context;if(i)for(let s of Object.keys(i))o[s]=i[s]}constructor(n,i){this.viewContainer=n,this.templateRef=i,this.embeddedViewRef=null,this.context=new Yh,this.nzStringTemplateOutletContext=null,this.nzStringTemplateOutlet=null}ngOnChanges(n){let{nzStringTemplateOutletContext:i,nzStringTemplateOutlet:o}=n,s=()=>{let c=!1;if(o)if(o.firstChange)c=!0;else{let d=o.previousValue instanceof Me,h=o.currentValue instanceof Me;c=d||h}return i&&(d=>{let h=Object.keys(d.previousValue||{}),f=Object.keys(d.currentValue||{});if(h.length===f.length){for(let p of f)if(h.indexOf(p)===-1)return!0;return!1}else return!0})(i)||c};o&&(this.context.$implicit=o.currentValue),s()?this.recreateView():this.updateContext()}};e.\u0275fac=function(i){return new(i||e)(m(Xe),m(Me))},e.\u0275dir=ne({type:e,selectors:[["","nzStringTemplateOutlet",""]],inputs:{nzStringTemplateOutletContext:"nzStringTemplateOutletContext",nzStringTemplateOutlet:"nzStringTemplateOutlet"},exportAs:["nzStringTemplateOutlet"],standalone:!0,features:[He]});let t=e;return t})(),Yh=class{},Nr=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var Nt=class Nt{transform(e,r=0,n="B",i){if(!(ld(e)&&ld(r)&&r%1===0&&r>=0))return e;let o=e,s=n;for(;s!=="B";)o*=1024,s=Nt.formats[s].prev;if(i){let a=Nt.formats[i],c=ud(Nt.calculateResult(a,o),r);return Nt.formatResult(c,i)}for(let a in Nt.formats)if(Nt.formats.hasOwnProperty(a)){let c=Nt.formats[a];if(o{let e=class e{transform(n,i="px"){return typeof n=="number"?`${n}${i}`:n}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"nzToCssUnit",type:e,pure:!0,standalone:!0});let t=e;return t})();var Uh=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({});let t=e;return t})();var tb=["moz","ms","webkit"];function XF(){let t=0;return function(e){let r=new Date().getTime(),n=Math.max(0,16-(r-t)),i=setTimeout(()=>{e(r+n)},n);return t=r+n,i}}function JF(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);let t=tb.filter(e=>`${e}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:XF()}function s8e(t){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(t);let e=tb.filter(r=>`${r}CancelAnimationFrame`in window||`${r}CancelRequestAnimationFrame`in window)[0];return e?(window[`${e}CancelAnimationFrame`]||window[`${e}CancelRequestAnimationFrame`]).call(this,t):clearTimeout(t)}var nb=JF();var rb=(()=>{let e=class e{create(n){return typeof MutationObserver>"u"?null:new MutationObserver(n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),eN=(()=>{let e=class e{constructor(n){this._mutationObserverFactory=n,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((n,i)=>this._cleanupObserver(i))}observe(n){let i=rt(n);return new Y(o=>{let a=this._observeElement(i).subscribe(o);return()=>{a.unsubscribe(),this._unobserveElement(i)}})}_observeElement(n){if(this._observedElements.has(n))this._observedElements.get(n).count++;else{let i=new S,o=this._mutationObserverFactory.create(s=>i.next(s));o&&o.observe(n,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(n,{observer:o,stream:i,count:1})}return this._observedElements.get(n).stream}_unobserveElement(n){this._observedElements.has(n)&&(this._observedElements.get(n).count--,this._observedElements.get(n).count||this._cleanupObserver(n))}_cleanupObserver(n){if(this._observedElements.has(n)){let{observer:i,stream:o}=this._observedElements.get(n);i&&i.disconnect(),o.complete(),this._observedElements.delete(n)}}};e.\u0275fac=function(i){return new(i||e)(g(rb))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),v8e=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(n){this._debounce=ti(n),this._subscribe()}constructor(n,i,o){this._contentObserver=n,this._elementRef=i,this._ngZone=o,this.event=new re,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let n=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?n.pipe(wi(this.debounce)):n).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)(m(eN),m(oe),m(U))},e.\u0275dir=ne({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[W.HasDecoratorInputTransform,"cdkObserveContentDisabled","disabled",ut],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[rn]});let t=e;return t})(),ib=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[rb]});let t=e;return t})();var ob=new Set,rs,tN=(()=>{let e=class e{constructor(n,i){this._platform=n,this._nonce=i,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):rN}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&nN(n,this._nonce),this._matchMedia(n)}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(qr,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function nN(t,e){if(!ob.has(t))try{rs||(rs=document.createElement("style"),e&&(rs.nonce=e),rs.setAttribute("type","text/css"),document.head.appendChild(rs)),rs.sheet&&(rs.sheet.insertRule(`@media ${t} {body{ }}`,0),ob.add(t))}catch(r){console.error(r)}}function rN(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var ab=(()=>{let e=class e{constructor(n,i){this._mediaMatcher=n,this._zone=i,this._queries=new Map,this._destroySubject=new S}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return sb(zo(n)).some(o=>this._registerQuery(o).mql.matches)}observe(n){let o=sb(zo(n)).map(a=>this._registerQuery(a).observable),s=Ji(o);return s=dr(s.pipe(ze(1)),s.pipe(Ya(1),wi(0))),s.pipe(Z(a=>{let c={matches:!1,breakpoints:{}};return a.forEach(({matches:l,query:u})=>{c.matches=c.matches||l,c.breakpoints[u]=l}),c}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);let i=this._mediaMatcher.matchMedia(n),s={observable:new Y(a=>{let c=l=>this._zone.run(()=>a.next(l));return i.addListener(c),()=>{i.removeListener(c)}}).pipe(Rt(i),Z(({matches:a})=>({query:n,matches:a})),ce(this._destroySubject)),mql:i};return this._queries.set(n,s),s}};e.\u0275fac=function(i){return new(i||e)(g(tN),g(U))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function sb(t){return t.map(e=>e.split(",")).reduce((e,r)=>e.concat(r)).map(e=>e.trim())}var qh=class{constructor(e){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new S,this._typeaheadSubscription=ye.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=r=>r.disabled,this._pressedLetters=[],this.tabOut=new S,this.change=new S,e instanceof Ns&&(this._itemChangesSubscription=e.changes.subscribe(r=>{if(this._activeItem){let i=r.toArray().indexOf(this._activeItem);i>-1&&i!==this._activeItemIndex&&(this._activeItemIndex=i)}}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Fe(r=>this._pressedLetters.push(r)),wi(e),ge(()=>this._pressedLetters.length>0),Z(()=>this._pressedLetters.join(""))).subscribe(r=>{let n=this._getItemsArray();for(let i=1;i!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(r){case 9:this.tabOut.next();return;case 40:if(this._vertical&&i){this.setNextItemActive();break}else return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&i){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&i){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&i){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&i){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&r<=90||r>=48&&r<=57)&&this._letterKeyStream.next(String.fromCharCode(r)));return}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){let r=this._getItemsArray(),n=typeof e=="number"?e:r.indexOf(e),i=r[n];this._activeItem=i??null,this._activeItemIndex=n}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){let r=this._getItemsArray();for(let n=1;n<=r.length;n++){let i=(this._activeItemIndex+e*n+r.length)%r.length,o=r[i];if(!this._skipPredicateFn(o)){this.setActiveItem(i);return}}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,r){let n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(e+=r,!n[e])return;this.setActiveItem(e)}}_getItemsArray(){return this._items instanceof Ns?this._items.toArray():this._items}};var cb=class extends qh{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}};var CN=(()=>{let e=class e{constructor(n){this._platform=n}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return DN(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let i=MN(PN(n));if(i&&(lb(i)===-1||!this.isVisible(i)))return!1;let o=n.nodeName.toLowerCase(),s=lb(n);return n.hasAttribute("contenteditable")?s!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!IN(n)?!1:o==="audio"?n.hasAttribute("controls")?s!==-1:!1:o==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,i){return kN(n)&&!this.isDisabled(n)&&(i?.ignoreVisibility||this.isVisible(n))}};e.\u0275fac=function(i){return new(i||e)(g(Ge))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function MN(t){try{return t.frameElement}catch{return null}}function DN(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function xN(t){let e=t.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function SN(t){return EN(t)&&t.type=="hidden"}function TN(t){return zN(t)&&t.hasAttribute("href")}function EN(t){return t.nodeName.toLowerCase()=="input"}function zN(t){return t.nodeName.toLowerCase()=="a"}function hb(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let e=t.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function lb(t){if(!hb(t))return null;let e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function IN(t){let e=t.nodeName.toLowerCase(),r=e==="input"&&t.type;return r==="text"||r==="password"||e==="select"||e==="textarea"}function kN(t){return SN(t)?!1:xN(t)||TN(t)||t.hasAttribute("contenteditable")||hb(t)}function PN(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Wh=class{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,r,n,i,o=!1){this._element=e,this._checker=r,this._ngZone=n,this._document=i,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let e=this._startAnchor,r=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),r&&(r.removeEventListener("focus",this.endAnchorListener),r.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(r=>{this._executeOnStable(()=>r(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(r=>{this._executeOnStable(()=>r(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(r=>{this._executeOnStable(()=>r(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let r=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?r.length?r[0]:this._getFirstTabbableElement(this._element):r.length?r[r.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let r=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(r){if(!this._checker.isFocusable(r)){let n=this._getFirstTabbableElement(r);return n?.focus(e),!!n}return r.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let r=this._getRegionBoundary("start");return r&&r.focus(e),!!r}focusLastTabbableElement(e){let r=this._getRegionBoundary("end");return r&&r.focus(e),!!r}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let r=e.children;for(let n=0;n=0;n--){let i=r[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(r[n]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,r){e?r.setAttribute("tabindex","0"):r.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(ze(1)).subscribe(e)}},ka=(()=>{let e=class e{constructor(n,i,o){this._checker=n,this._ngZone=i,this._document=o}create(n,i=!1){return new Wh(n,this._checker,this._ngZone,this._document,i)}};e.\u0275fac=function(i){return new(i||e)(g(CN),g(U),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),U8e=(()=>{let e=class e{get enabled(){return this.focusTrap?.enabled||!1}set enabled(n){this.focusTrap&&(this.focusTrap.enabled=n)}constructor(n,i,o){this._elementRef=n,this._focusTrapFactory=i,this._previouslyFocusedElement=null,w(Ge).isBrowser&&(this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0))}ngOnDestroy(){this.focusTrap?.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap?.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap&&!this.focusTrap.hasAttached()&&this.focusTrap.attachAnchors()}ngOnChanges(n){let i=n.autoCapture;i&&!i.firstChange&&this.autoCapture&&this.focusTrap?.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=My(),this.focusTrap?.focusInitialElementWhenReady()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(ka),m(V))},e.\u0275dir=ne({type:e,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:[W.HasDecoratorInputTransform,"cdkTrapFocus","enabled",ut],autoCapture:[W.HasDecoratorInputTransform,"cdkTrapFocusAutoCapture","autoCapture",ut]},exportAs:["cdkTrapFocus"],standalone:!0,features:[rn,He]});let t=e;return t})();function Gh(t){return t.buttons===0||t.detail===0}function Kh(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}var ON=new E("cdk-input-modality-detector-options"),AN={ignoreKeys:[18,17,224,91,16]},fb=650,Ia=Fo({passive:!0,capture:!0}),FN=(()=>{let e=class e{get mostRecentModality(){return this._modality.value}constructor(n,i,o,s){this._platform=n,this._mostRecentTarget=null,this._modality=new Re(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(c=>c===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=cn(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs{if(Kh(a)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=cn(a)},this._options=b(b({},AN),s),this.modalityDetected=this._modality.pipe(Ya(1)),this.modalityChanged=this.modalityDetected.pipe(ws()),n.isBrowser&&i.runOutsideAngular(()=>{o.addEventListener("keydown",this._onKeydown,Ia),o.addEventListener("mousedown",this._onMousedown,Ia),o.addEventListener("touchstart",this._onTouchstart,Ia)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Ia),document.removeEventListener("mousedown",this._onMousedown,Ia),document.removeEventListener("touchstart",this._onTouchstart,Ia))}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(U),g(V),g(ON,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var b3=function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t}(b3||{}),NN=new E("cdk-focus-monitor-default-options"),w3=Fo({passive:!0,capture:!0}),RN=(()=>{let e=class e{constructor(n,i,o,s,a){this._ngZone=n,this._platform=i,this._inputModalityDetector=o,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new S,this._rootNodeFocusAndBlurListener=c=>{let l=cn(c);for(let u=l;u;u=u.parentElement)c.type==="focus"?this._onFocus(c,u):this._onBlur(c,u)},this._document=s,this._detectionMode=a?.detectionMode||b3.IMMEDIATE}monitor(n,i=!1){let o=rt(n);if(!this._platform.isBrowser||o.nodeType!==1)return A();let s=cl(o)||this._getDocument(),a=this._elementInfo.get(o);if(a)return i&&(a.checkChildren=!0),a.subject;let c={checkChildren:i,subject:new S,rootNode:s};return this._elementInfo.set(o,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let i=rt(n),o=this._elementInfo.get(i);o&&(o.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(o))}focusVia(n,i,o){let s=rt(n),a=this._getDocument().activeElement;s===a?this._getClosestElementsInfo(s).forEach(([c,l])=>this._originChanged(c,i,l)):(this._setOrigin(i),typeof s.focus=="function"&&s.focus(o))}ngOnDestroy(){this._elementInfo.forEach((n,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===b3.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,i){n.classList.toggle("cdk-focused",!!i),n.classList.toggle("cdk-touch-focused",i==="touch"),n.classList.toggle("cdk-keyboard-focused",i==="keyboard"),n.classList.toggle("cdk-mouse-focused",i==="mouse"),n.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(n,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&i,this._detectionMode===b3.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?fb:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(n,i){let o=this._elementInfo.get(i),s=cn(n);!o||!o.checkChildren&&i!==s||this._originChanged(i,this._getFocusOrigin(s),o)}_onBlur(n,i){let o=this._elementInfo.get(i);!o||o.checkChildren&&n.relatedTarget instanceof Node&&i.contains(n.relatedTarget)||(this._setClasses(i),this._emitOrigin(o,null))}_emitOrigin(n,i){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(i))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let i=n.rootNode,o=this._rootNodeFocusListenerCount.get(i)||0;o||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,w3),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,w3)}),this._rootNodeFocusListenerCount.set(i,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ce(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let i=n.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let o=this._rootNodeFocusListenerCount.get(i);o>1?this._rootNodeFocusListenerCount.set(i,o-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,w3),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,w3),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,i,o){this._setClasses(n,i),this._emitOrigin(o,i),this._lastFocusOrigin=i}_getClosestElementsInfo(n){let i=[];return this._elementInfo.forEach((o,s)=>{(s===n||o.checkChildren&&s.contains(n))&&i.push([s,o])}),i}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:i,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!i||i===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let a=0;a{let e=class e{constructor(n,i){this._elementRef=n,this._focusMonitor=i,this._focusOrigin=null,this.cdkFocusChange=new re}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let n=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(n,n.nodeType===1&&n.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(i=>{this._focusOrigin=i,this.cdkFocusChange.emit(i)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(RN))},e.\u0275dir=ne({type:e,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"],standalone:!0});let t=e;return t})(),is=function(t){return t[t.NONE=0]="NONE",t[t.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",t[t.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",t}(is||{}),ub="cdk-high-contrast-black-on-white",db="cdk-high-contrast-white-on-black",$h="cdk-high-contrast-active",LN=(()=>{let e=class e{constructor(n,i){this._platform=n,this._document=i,this._breakpointSubscription=w(ab).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return is.NONE;let n=this._document.createElement("div");n.style.backgroundColor="rgb(1,2,3)",n.style.position="absolute",this._document.body.appendChild(n);let i=this._document.defaultView||window,o=i&&i.getComputedStyle?i.getComputedStyle(n):null,s=(o&&o.backgroundColor||"").replace(/ /g,"");switch(n.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return is.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return is.BLACK_ON_WHITE}return is.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let n=this._document.body.classList;n.remove($h,ub,db),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();i===is.BLACK_ON_WHITE?n.add($h,ub):i===is.WHITE_ON_BLACK&&n.add($h,db)}}};e.\u0275fac=function(i){return new(i||e)(g(Ge),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),q8e=(()=>{let e=class e{constructor(n){n._applyBodyHighContrastModeCssClasses()}};e.\u0275fac=function(i){return new(i||e)(g(LN))},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[ib]});let t=e;return t})();var HN=["nz-modal-close",""];function VN(t,e){if(t&1&&(tt(0),et(1,"span",2),nt()),t&2){let r=e.$implicit;k(),I("nzType",r)}}var vb=["modalElement"];function YN(t,e){if(t&1){let r=Pn();se(0,"button",16),Pt("click",function(){pn(r);let i=G();return mn(i.onCloseClick())}),le()}}function jN(t,e){if(t&1&&(tt(0),et(1,"span",17),nt()),t&2){let r=G();k(),I("innerHTML",r.config.nzTitle,Dr)}}function BN(t,e){}function UN(t,e){if(t&1&&et(0,"div",17),t&2){let r=G();I("innerHTML",r.config.nzContent,Dr)}}function $N(t,e){if(t&1){let r=Pn();se(0,"button",18),Pt("click",function(){pn(r);let i=G();return mn(i.onCancel())}),er(1),le()}if(t&2){let r=G();I("nzLoading",!!r.config.nzCancelLoading)("disabled",r.config.nzCancelDisabled),kn("cdkFocusInitial",r.config.nzAutofocus==="cancel"||null),k(),zi(" ",r.config.nzCancelText||r.locale.cancelText," ")}}function qN(t,e){if(t&1){let r=Pn();se(0,"button",19),Pt("click",function(){pn(r);let i=G();return mn(i.onOk())}),er(1),le()}if(t&2){let r=G();I("nzType",r.config.nzOkType)("nzLoading",!!r.config.nzOkLoading)("disabled",r.config.nzOkDisabled)("nzDanger",r.config.nzOkDanger),kn("cdkFocusInitial",r.config.nzAutofocus==="ok"||null),k(),zi(" ",r.config.nzOkText||r.locale.okText," ")}}var WN=["nz-modal-footer",""];function GN(t,e){if(t&1&&et(0,"div",5),t&2){let r=G(3);I("innerHTML",r.config.nzFooter,Dr)}}function KN(t,e){if(t&1){let r=Pn();se(0,"button",7),Pt("click",function(){let o=pn(r).$implicit,s=G(4);return mn(s.onButtonClick(o))}),er(1),le()}if(t&2){let r=e.$implicit,n=G(4);I("hidden",!n.getButtonCallableProp(r,"show"))("nzLoading",n.getButtonCallableProp(r,"loading"))("disabled",n.getButtonCallableProp(r,"disabled"))("nzType",r.type)("nzDanger",r.danger)("nzShape",r.shape)("nzSize",r.size)("nzGhost",r.ghost),k(),zi(" ",r.label," ")}}function ZN(t,e){if(t&1&&(tt(0),Q(1,KN,2,9,"button",6),nt()),t&2){let r=G(3);k(),I("ngForOf",r.buttons)}}function QN(t,e){if(t&1&&(tt(0),Q(1,GN,1,1,"div",3)(2,ZN,2,1,"ng-container",4),nt()),t&2){let r=G(2);k(),I("ngIf",!r.buttonsFooter),k(),I("ngIf",r.buttonsFooter)}}var XN=(t,e)=>({$implicit:t,modalRef:e});function JN(t,e){if(t&1&&(tt(0),Q(1,QN,3,2,"ng-container",2),nt()),t&2){let r=G();k(),I("nzStringTemplateOutlet",r.config.nzFooter)("nzStringTemplateOutletContext",T7(2,XN,r.config.nzData,r.modalRef))}}function eR(t,e){if(t&1){let r=Pn();se(0,"button",10),Pt("click",function(){pn(r);let i=G(2);return mn(i.onCancel())}),er(1),le()}if(t&2){let r=G(2);I("nzLoading",!!r.config.nzCancelLoading)("disabled",r.config.nzCancelDisabled),kn("cdkFocusInitial",r.config.nzAutofocus==="cancel"||null),k(),zi(" ",r.config.nzCancelText||r.locale.cancelText," ")}}function tR(t,e){if(t&1){let r=Pn();se(0,"button",11),Pt("click",function(){pn(r);let i=G(2);return mn(i.onOk())}),er(1),le()}if(t&2){let r=G(2);I("nzType",r.config.nzOkType)("nzDanger",r.config.nzOkDanger)("nzLoading",!!r.config.nzOkLoading)("disabled",r.config.nzOkDisabled),kn("cdkFocusInitial",r.config.nzAutofocus==="ok"||null),k(),zi(" ",r.config.nzOkText||r.locale.okText," ")}}function nR(t,e){if(t&1&&Q(0,eR,2,4,"button",8)(1,tR,2,6,"button",9),t&2){let r=G();I("ngIf",r.config.nzCancelText!==null),k(),I("ngIf",r.config.nzOkText!==null)}}var rR=["nz-modal-title",""];function iR(t,e){if(t&1&&(tt(0),et(1,"div",2),nt()),t&2){let r=G();k(),I("innerHTML",r.config.nzTitle,Dr)}}function oR(t,e){if(t&1){let r=Pn();se(0,"button",9),Pt("click",function(){pn(r);let i=G();return mn(i.onCloseClick())}),le()}}function sR(t,e){t&1&&et(0,"div",10)}function aR(t,e){}function cR(t,e){if(t&1&&et(0,"div",11),t&2){let r=G();I("innerHTML",r.config.nzContent,Dr)}}function lR(t,e){if(t&1){let r=Pn();se(0,"div",12),Pt("cancelTriggered",function(){pn(r);let i=G();return mn(i.onCloseClick())})("okTriggered",function(){pn(r);let i=G();return mn(i.onOkClick())}),le()}if(t&2){let r=G();I("modalRef",r.modalRef)}}var mb=()=>{},li=class{constructor(){this.nzCentered=!1,this.nzClosable=!0,this.nzOkLoading=!1,this.nzOkDisabled=!1,this.nzCancelDisabled=!1,this.nzCancelLoading=!1,this.nzNoAnimation=!1,this.nzAutofocus="auto",this.nzKeyboard=!0,this.nzZIndex=1e3,this.nzWidth=520,this.nzCloseIcon="close",this.nzOkType="primary",this.nzOkDanger=!1,this.nzModalType="default",this.nzOnCancel=mb,this.nzOnOk=mb,this.nzIconType="question-circle"}},Gi={enter:"ant-zoom-enter",enterActive:"ant-zoom-enter-active",leave:"ant-zoom-leave",leaveActive:"ant-zoom-leave-active"},Pa={enter:"ant-fade-enter",enterActive:"ant-fade-enter-active",leave:"ant-fade-leave",leaveActive:"ant-fade-leave-active"},_3="ant-modal-mask",C3="modal",uR=new E("NZ_MODAL_DATA"),yb={modalContainer:q9("modalContainer",[pd("void, exit",Yi({})),pd("enter",Yi({})),md("* => enter",fd(".24s",Yi({}))),md("* => void, * => exit",fd(".2s",Yi({})))])},Zh=(()=>{let e=class e{constructor(n){this.config=n}};e.\u0275fac=function(i){return new(i||e)(m(li))},e.\u0275cmp=bt({type:e,selectors:[["button","nz-modal-close",""]],hostAttrs:["aria-label","Close",1,"ant-modal-close"],exportAs:["NzModalCloseBuiltin"],standalone:!0,features:[_t],attrs:HN,decls:2,vars:1,consts:[[1,"ant-modal-close-x"],[4,"nzStringTemplateOutlet"],["nz-icon","",1,"ant-modal-close-icon",3,"nzType"]],template:function(i,o){i&1&&(se(0,"span",0),Q(1,VN,2,1,"ng-container",1),le()),i&2&&(k(),I("nzStringTemplateOutlet",o.config.nzCloseIcon))},dependencies:[No,ii,Nr,Fr],encapsulation:2,changeDetection:0});let t=e;return t})();function dR(t,e){return b(b({},e),t)}function Dl(t,e,r){return typeof t>"u"?typeof e>"u"?r:e:t}function gb(){throw Error("Attempting to attach modal content after content is already attached")}var wb=(()=>{let e=class e extends Ea{get showMask(){let n=this.nzConfigService.getConfigForComponent(C3)||{};return!!Dl(this.config.nzMask,n.nzMask,!0)}get maskClosable(){let n=this.nzConfigService.getConfigForComponent(C3)||{};return!!Dl(this.config.nzMaskClosable,n.nzMaskClosable,!0)}constructor(n,i,o,s,a,c,l,u,d,h){super(),this.ngZone=n,this.host=i,this.focusTrapFactory=o,this.cdr=s,this.render=a,this.overlayRef=c,this.nzConfigService=l,this.config=u,this.animationType=h,this.animationStateChanged=new re,this.containerClick=new re,this.cancelTriggered=new re,this.okTriggered=new re,this.state="enter",this.isStringContent=!1,this.dir="ltr",this.elementFocusedBeforeModalWasOpened=null,this.mouseDown=!1,this.oldMaskStyle=null,this.destroy$=new S,this.document=d,this.dir=c.getDirection(),this.isStringContent=typeof u.nzContent=="string",this.nzConfigService.getConfigChangeEventForComponent(C3).pipe(ce(this.destroy$)).subscribe(()=>{this.updateMaskClassname()})}onContainerClick(n){n.target===n.currentTarget&&!this.mouseDown&&this.showMask&&this.maskClosable&&this.containerClick.emit()}onCloseClick(){this.cancelTriggered.emit()}onOkClick(){this.okTriggered.emit()}attachComponentPortal(n){return this.portalOutlet.hasAttached()&&gb(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this.portalOutlet.attachComponentPortal(n)}attachTemplatePortal(n){return this.portalOutlet.hasAttached()&&gb(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this.portalOutlet.attachTemplatePortal(n)}attachStringContent(){this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop()}getNativeElement(){return this.host.nativeElement}animationDisabled(){return this.config.nzNoAnimation||this.animationType==="NoopAnimations"}setModalTransformOrigin(){let n=this.modalElementRef.nativeElement;if(this.elementFocusedBeforeModalWasOpened){let i=this.elementFocusedBeforeModalWasOpened.getBoundingClientRect(),o=H9(this.elementFocusedBeforeModalWasOpened),s=o.left+i.width/2,a=o.top+i.height/2,c=`${s-n.offsetLeft}px ${a-n.offsetTop}px 0px`;this.render.setStyle(n,"transform-origin",c)}}savePreviouslyFocusedElement(){this.focusTrap||(this.focusTrap=this.focusTrapFactory.create(this.host.nativeElement)),this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement,this.host.nativeElement.focus&&this.ngZone.runOutsideAngular(()=>nb(()=>this.host.nativeElement.focus())))}trapFocus(){let n=this.host.nativeElement;if(this.config.nzAutofocus)this.focusTrap.focusInitialElementWhenReady();else{let i=this.document.activeElement;i!==n&&!n.contains(i)&&n.focus()}}restoreFocus(){let n=this.elementFocusedBeforeModalWasOpened;if(n&&typeof n.focus=="function"){let i=this.document.activeElement,o=this.host.nativeElement;(!i||i===this.document.body||i===o||o.contains(i))&&n.focus()}this.focusTrap&&this.focusTrap.destroy()}setEnterAnimationClass(){if(this.animationDisabled())return;this.setModalTransformOrigin();let n=this.modalElementRef.nativeElement,i=this.overlayRef.backdropElement;n.classList.add(Gi.enter),n.classList.add(Gi.enterActive),i&&(i.classList.add(Pa.enter),i.classList.add(Pa.enterActive))}setExitAnimationClass(){let n=this.modalElementRef.nativeElement;n.classList.add(Gi.leave),n.classList.add(Gi.leaveActive),this.setMaskExitAnimationClass()}setMaskExitAnimationClass(n=!1){let i=this.overlayRef.backdropElement;if(i){if(this.animationDisabled()||n){i.classList.remove(_3);return}i.classList.add(Pa.leave),i.classList.add(Pa.leaveActive)}}cleanAnimationClass(){if(this.animationDisabled())return;let n=this.overlayRef.backdropElement,i=this.modalElementRef.nativeElement;n&&(n.classList.remove(Pa.enter),n.classList.remove(Pa.enterActive)),i.classList.remove(Gi.enter),i.classList.remove(Gi.enterActive),i.classList.remove(Gi.leave),i.classList.remove(Gi.leaveActive)}setZIndexForBackdrop(){let n=this.overlayRef.backdropElement;n&&Mn(this.config.nzZIndex)&&this.render.setStyle(n,"z-index",this.config.nzZIndex)}bindBackdropStyle(){let n=this.overlayRef.backdropElement;if(n){if(this.oldMaskStyle){let i=this.oldMaskStyle;Object.keys(i).forEach(o=>{this.render.removeStyle(n,o)}),this.oldMaskStyle=null}if(this.setZIndexForBackdrop(),typeof this.config.nzMaskStyle=="object"&&Object.keys(this.config.nzMaskStyle).length){let i=b({},this.config.nzMaskStyle);Object.keys(i).forEach(o=>{this.render.setStyle(n,o,i[o])}),this.oldMaskStyle=i}}}updateMaskClassname(){let n=this.overlayRef.backdropElement;n&&(this.showMask?n.classList.add(_3):n.classList.remove(_3))}onAnimationDone(n){n.toState==="enter"?this.trapFocus():n.toState==="exit"&&this.restoreFocus(),this.cleanAnimationClass(),this.animationStateChanged.emit(n)}onAnimationStart(n){n.toState==="enter"?(this.setEnterAnimationClass(),this.bindBackdropStyle()):n.toState==="exit"&&this.setExitAnimationClass(),this.animationStateChanged.emit(n)}startExitAnimation(){this.state="exit",this.cdr.markForCheck()}ngOnDestroy(){this.setMaskExitAnimationClass(!0),this.destroy$.next(!0),this.destroy$.complete()}setupMouseListeners(n){this.ngZone.runOutsideAngular(()=>{Kn(this.host.nativeElement,"mouseup").pipe(ce(this.destroy$)).subscribe(()=>{this.mouseDown&&setTimeout(()=>{this.mouseDown=!1})}),Kn(n.nativeElement,"mousedown").pipe(ce(this.destroy$)).subscribe(()=>{this.mouseDown=!0})})}};e.\u0275fac=function(i){n4()},e.\u0275dir=ne({type:e,features:[nn]});let t=e;return t})(),bb=(()=>{let e=class e extends wb{constructor(n,i,o,s,a,c,l,u,d,h,f){super(n,o,s,a,c,l,u,d,h,f),this.i18n=i,this.config=d,this.cancelTriggered=new re,this.okTriggered=new re,this.i18n.localeChange.pipe(ce(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Modal")})}ngOnInit(){this.setupMouseListeners(this.modalElementRef)}onCancel(){this.cancelTriggered.emit()}onOk(){this.okTriggered.emit()}};e.\u0275fac=function(i){return new(i||e)(m(U),m($i),m(oe),m(ka),m(ft),m(st),m(Wi),m(Rn),m(li),m(V,8),m(gn,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-modal-confirm-container"]],viewQuery:function(i,o){if(i&1&&(On(Ar,7),On(vb,7)),i&2){let s;ct(s=lt())&&(o.portalOutlet=s.first),ct(s=lt())&&(o.modalElementRef=s.first)}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:10,hostBindings:function(i,o){i&1&&(u4("@modalContainer.start",function(a){return o.onAnimationStart(a)})("@modalContainer.done",function(a){return o.onAnimationDone(a)}),Pt("click",function(a){return o.onContainerClick(a)})),i&2&&(l4("@.disabled",o.config.nzNoAnimation)("@modalContainer",o.state),Du(o.config.nzWrapClassName?"ant-modal-wrap "+o.config.nzWrapClassName:"ant-modal-wrap"),Gt("z-index",o.config.nzZIndex),St("ant-modal-wrap-rtl",o.dir==="rtl")("ant-modal-centered",o.config.nzCentered))},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalConfirmContainer"],standalone:!0,features:[nn,_t],decls:17,vars:13,consts:[["role","document",1,"ant-modal",3,"ngClass","ngStyle"],["modalElement",""],[1,"ant-modal-content"],["nz-modal-close","",3,"click",4,"ngIf"],[1,"ant-modal-body",3,"ngStyle"],[1,"ant-modal-confirm-body-wrapper"],[1,"ant-modal-confirm-body"],["nz-icon","",3,"nzType"],[1,"ant-modal-confirm-title"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-confirm-content"],["cdkPortalOutlet",""],[3,"innerHTML",4,"ngIf"],[1,"ant-modal-confirm-btns"],["nz-button","",3,"nzLoading","disabled","click",4,"ngIf"],["nz-button","",3,"nzType","nzLoading","disabled","nzDanger","click",4,"ngIf"],["nz-modal-close","",3,"click"],[3,"innerHTML"],["nz-button","",3,"nzLoading","disabled","click"],["nz-button","",3,"nzType","nzLoading","disabled","nzDanger","click"]],template:function(i,o){i&1&&(se(0,"div",0,1),Tu(2,"nzToCssUnit"),se(3,"div",2),Q(4,YN,1,0,"button",3),se(5,"div",4)(6,"div",5)(7,"div",6),et(8,"span",7),se(9,"span",8),Q(10,jN,2,1,"ng-container",9),le(),se(11,"div",10),Q(12,BN,0,0,"ng-template",11)(13,UN,1,1,"div",12),le()(),se(14,"div",13),Q(15,$N,2,4,"button",14)(16,qN,2,6,"button",15),le()()()()()),i&2&&(Gt("width",Eu(2,11,o.config==null?null:o.config.nzWidth)),I("ngClass",o.config.nzClassName)("ngStyle",o.config.nzStyle),k(4),I("ngIf",o.config.nzClosable),k(),I("ngStyle",o.config.nzBodyStyle),k(3),I("nzType",o.config.nzIconType),k(2),I("nzStringTemplateOutlet",o.config.nzTitle),k(3),I("ngIf",o.isStringContent),k(2),I("ngIf",o.config.nzCancelText!==null),k(),I("ngIf",o.config.nzOkText!==null))},dependencies:[pc,_o,Uh,Bh,No,ii,nr,Zh,Nr,Fr,ts,Ar,rh,F2,eh,nh],encapsulation:2,data:{animation:[yb.modalContainer]}});let t=e;return t})(),_b=(()=>{let e=class e{constructor(n,i){this.i18n=n,this.config=i,this.buttonsFooter=!1,this.buttons=[],this.cancelTriggered=new re,this.okTriggered=new re,this.destroy$=new S,Array.isArray(i.nzFooter)&&(this.buttonsFooter=!0,this.buttons=i.nzFooter.map(hR)),this.i18n.localeChange.pipe(ce(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Modal")})}onCancel(){this.cancelTriggered.emit()}onOk(){this.okTriggered.emit()}getButtonCallableProp(n,i){let o=n[i],s=this.modalRef.getContentComponent();return typeof o=="function"?o.apply(n,s&&[s]):o}onButtonClick(n){if(!this.getButtonCallableProp(n,"loading")){let o=this.getButtonCallableProp(n,"onClick");n.autoLoading&&u2(o)&&(n.loading=!0,o.then(()=>n.loading=!1).catch(s=>{throw n.loading=!1,s}))}}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(m($i),m(li))},e.\u0275cmp=bt({type:e,selectors:[["div","nz-modal-footer",""]],hostAttrs:[1,"ant-modal-footer"],inputs:{modalRef:"modalRef"},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["NzModalFooterBuiltin"],standalone:!0,features:[_t],attrs:WN,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["defaultFooterButtons",""],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[3,"innerHTML",4,"ngIf"],[4,"ngIf"],[3,"innerHTML"],["nz-button","",3,"hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost","click",4,"ngFor","ngForOf"],["nz-button","",3,"hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost","click"],["nz-button","",3,"nzLoading","disabled","click",4,"ngIf"],["nz-button","",3,"nzType","nzDanger","nzLoading","disabled","click",4,"ngIf"],["nz-button","",3,"nzLoading","disabled","click"],["nz-button","",3,"nzType","nzDanger","nzLoading","disabled","click"]],template:function(i,o){if(i&1&&Q(0,JN,2,5,"ng-container",0)(1,nR,2,2,"ng-template",null,1,bo),i&2){let s=$s(2);I("ngIf",o.config.nzFooter)("ngIfElse",s)}},dependencies:[nr,Nr,Fr,mc,rh,F2,eh,nh],encapsulation:2});let t=e;return t})();function hR(t){return b({type:null,size:"default",autoLoading:!0,show:!0,loading:!1,disabled:!1},t)}var Cb=(()=>{let e=class e{constructor(n){this.config=n}};e.\u0275fac=function(i){return new(i||e)(m(li))},e.\u0275cmp=bt({type:e,selectors:[["div","nz-modal-title",""]],hostAttrs:[1,"ant-modal-header"],exportAs:["NzModalTitleBuiltin"],standalone:!0,features:[_t],attrs:rR,decls:2,vars:1,consts:[[1,"ant-modal-title"],[4,"nzStringTemplateOutlet"],[3,"innerHTML"]],template:function(i,o){i&1&&(se(0,"div",0),Q(1,iR,2,1,"ng-container",1),le()),i&2&&(k(),I("nzStringTemplateOutlet",o.config.nzTitle))},dependencies:[Nr,Fr],encapsulation:2,changeDetection:0});let t=e;return t})(),Mb=(()=>{let e=class e extends wb{constructor(n,i,o,s,a,c,l,u,d,h){super(n,i,o,s,a,c,l,u,d,h),this.config=u}ngOnInit(){this.setupMouseListeners(this.modalElementRef)}};e.\u0275fac=function(i){return new(i||e)(m(U),m(oe),m(ka),m(ft),m(st),m(Wi),m(Rn),m(li),m(V,8),m(gn,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-modal-container"]],viewQuery:function(i,o){if(i&1&&(On(Ar,7),On(vb,7)),i&2){let s;ct(s=lt())&&(o.portalOutlet=s.first),ct(s=lt())&&(o.modalElementRef=s.first)}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:10,hostBindings:function(i,o){i&1&&(u4("@modalContainer.start",function(a){return o.onAnimationStart(a)})("@modalContainer.done",function(a){return o.onAnimationDone(a)}),Pt("click",function(a){return o.onContainerClick(a)})),i&2&&(l4("@.disabled",o.config.nzNoAnimation)("@modalContainer",o.state),Du(o.config.nzWrapClassName?"ant-modal-wrap "+o.config.nzWrapClassName:"ant-modal-wrap"),Gt("z-index",o.config.nzZIndex),St("ant-modal-wrap-rtl",o.dir==="rtl")("ant-modal-centered",o.config.nzCentered))},exportAs:["nzModalContainer"],standalone:!0,features:[nn,_t],decls:10,vars:11,consts:[["role","document",1,"ant-modal",3,"ngClass","ngStyle"],["modalElement",""],[1,"ant-modal-content"],["nz-modal-close","",3,"click",4,"ngIf"],["nz-modal-title","",4,"ngIf"],[1,"ant-modal-body",3,"ngStyle"],["cdkPortalOutlet",""],[3,"innerHTML",4,"ngIf"],["nz-modal-footer","",3,"modalRef","cancelTriggered","okTriggered",4,"ngIf"],["nz-modal-close","",3,"click"],["nz-modal-title",""],[3,"innerHTML"],["nz-modal-footer","",3,"modalRef","cancelTriggered","okTriggered"]],template:function(i,o){i&1&&(se(0,"div",0,1),Tu(2,"nzToCssUnit"),se(3,"div",2),Q(4,oR,1,0,"button",3)(5,sR,1,0,"div",4),se(6,"div",5),Q(7,aR,0,0,"ng-template",6)(8,cR,1,1,"div",7),le(),Q(9,lR,1,1,"div",8),le()()),i&2&&(Gt("width",Eu(2,9,o.config==null?null:o.config.nzWidth)),I("ngClass",o.config.nzClassName)("ngStyle",o.config.nzStyle),k(4),I("ngIf",o.config.nzClosable),k(),I("ngIf",o.config.nzTitle),k(),I("ngStyle",o.config.nzBodyStyle),k(2),I("ngIf",o.isStringContent),k(),I("ngIf",o.config.nzFooter!==null))},dependencies:[pc,_o,nr,Zh,Cb,ts,Ar,_b,Uh,Bh],encapsulation:2,data:{animation:[yb.modalContainer]}});let t=e;return t})(),M3=class{constructor(e,r,n){this.overlayRef=e,this.config=r,this.containerInstance=n,this.componentInstance=null,this.state=0,this.afterClose=new S,this.afterOpen=new S,this.destroy$=new S,n.animationStateChanged.pipe(ge(i=>i.phaseName==="done"&&i.toState==="enter"),ze(1)).subscribe(()=>{this.afterOpen.next(),this.afterOpen.complete(),r.nzAfterOpen instanceof re&&r.nzAfterOpen.emit()}),n.animationStateChanged.pipe(ge(i=>i.phaseName==="done"&&i.toState==="exit"),ze(1)).subscribe(()=>{clearTimeout(this.closeTimeout),this._finishDialogClose()}),n.containerClick.pipe(ze(1),ce(this.destroy$)).subscribe(()=>{!this.config.nzCancelLoading&&!this.config.nzOkLoading&&this.trigger("cancel")}),e.keydownEvents().pipe(ge(i=>this.config.nzKeyboard&&!this.config.nzCancelLoading&&!this.config.nzOkLoading&&i.keyCode===27&&!za(i))).subscribe(i=>{i.preventDefault(),this.trigger("cancel")}),n.cancelTriggered.pipe(ce(this.destroy$)).subscribe(()=>this.trigger("cancel")),n.okTriggered.pipe(ce(this.destroy$)).subscribe(()=>this.trigger("ok")),e.detachments().subscribe(()=>{this.afterClose.next(this.result),this.afterClose.complete(),r.nzAfterClose instanceof re&&r.nzAfterClose.emit(this.result),this.componentInstance=null,this.overlayRef.dispose()})}getContentComponent(){return this.componentInstance}getElement(){return this.containerInstance.getNativeElement()}destroy(e){this.close(e)}triggerOk(){return this.trigger("ok")}triggerCancel(){return this.trigger("cancel")}close(e){this.state===0&&(this.result=e,this.containerInstance.animationStateChanged.pipe(ge(r=>r.phaseName==="start"),ze(1)).subscribe(r=>{this.overlayRef.detachBackdrop(),this.closeTimeout=setTimeout(()=>{this._finishDialogClose()},r.totalTime+100)}),this.containerInstance.startExitAnimation(),this.state=1)}updateConfig(e){Object.assign(this.config,e),this.containerInstance.bindBackdropStyle(),this.containerInstance.cdr.markForCheck()}getState(){return this.state}getConfig(){return this.config}getBackdropElement(){return this.overlayRef.backdropElement}trigger(e){return L3(this,null,function*(){if(this.state===1)return;let r={ok:this.config.nzOnOk,cancel:this.config.nzOnCancel}[e],n={ok:"nzOkLoading",cancel:"nzCancelLoading"}[e];if(!this.config[n]){if(r instanceof re)r.emit(this.getContentComponent());else if(typeof r=="function"){let o=r(this.getContentComponent());if(u2(o)){this.config[n]=!0;let s=!1;try{s=yield o}finally{this.config[n]=!1,this.closeWhitResult(s)}}else this.closeWhitResult(o)}}})}closeWhitResult(e){e!==!1&&this.close(e)}_finishDialogClose(){this.state=2,this.overlayRef.dispose(),this.destroy$.next()}},Qh=(()=>{let e=class e{get openModals(){return this.parentModal?this.parentModal.openModals:this.openModalsAtThisLevel}get _afterAllClosed(){let n=this.parentModal;return n?n._afterAllClosed:this.afterAllClosedAtThisLevel}constructor(n,i,o,s,a){this.overlay=n,this.injector=i,this.nzConfigService=o,this.parentModal=s,this.directionality=a,this.openModalsAtThisLevel=[],this.afterAllClosedAtThisLevel=new S,this.afterAllClose=gs(()=>this.openModals.length?this._afterAllClosed:this._afterAllClosed.pipe(Rt(void 0)))}create(n){return this.open(n.nzContent,n)}closeAll(){this.closeModals(this.openModals)}confirm(n={},i="confirm"){return"nzFooter"in n&&Cn(`The Confirm-Modal doesn't support "nzFooter", this property will be ignored.`),"nzWidth"in n||(n.nzWidth=416),"nzMaskClosable"in n||(n.nzMaskClosable=!1),n.nzModalType="confirm",n.nzClassName=`ant-modal-confirm ant-modal-confirm-${i} ${n.nzClassName||""}`,this.create(n)}info(n={}){return this.confirmFactory(n,"info")}success(n={}){return this.confirmFactory(n,"success")}error(n={}){return this.confirmFactory(n,"error")}warning(n={}){return this.confirmFactory(n,"warning")}open(n,i){let o=dR(i||{},new li),s=this.createOverlay(o),a=this.attachModalContainer(s,o),c=this.attachModalContent(n,a,s,o);return a.modalRef=c,this.openModals.push(c),c.afterClose.subscribe(()=>this.removeOpenModal(c)),c}removeOpenModal(n){let i=this.openModals.indexOf(n);i>-1&&(this.openModals.splice(i,1),this.openModals.length||this._afterAllClosed.next())}closeModals(n){let i=n.length;for(;i--;)n[i].close(),this.openModals.length||this._afterAllClosed.next()}createOverlay(n){let i=this.nzConfigService.getConfigForComponent(C3)||{},o=new qi({hasBackdrop:!0,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global(),disposeOnNavigation:Dl(n.nzCloseOnNavigation,i.nzCloseOnNavigation,!0),direction:Dl(n.nzDirection,i.nzDirection,this.directionality.value)});return Dl(n.nzMask,i.nzMask,!0)&&(o.backdropClass=_3),this.overlay.create(o)}attachModalContainer(n,i){let o=i&&i.nzViewContainerRef&&i.nzViewContainerRef.injector,s=Ue.create({parent:o||this.injector,providers:[{provide:Wi,useValue:n},{provide:li,useValue:i}]}),a=i.nzModalType==="confirm"?bb:Mb,c=new si(a,i.nzViewContainerRef,s);return n.attach(c).instance}attachModalContent(n,i,o,s){let a=new M3(o,s,i);if(n instanceof Me)i.attachTemplatePortal(new ai(n,null,{$implicit:s.nzData,modalRef:a}));else if(Mn(n)&&typeof n!="string"){let c=this.createInjector(a,s),l=i.attachComponentPortal(new si(n,s.nzViewContainerRef,c));a.componentInstance=l.instance}else i.attachStringContent();return a}createInjector(n,i){let o=i&&i.nzViewContainerRef&&i.nzViewContainerRef.injector;return Ue.create({parent:o||this.injector,providers:[{provide:M3,useValue:n},{provide:uR,useValue:i.nzData}]})}confirmFactory(n={},i){let o={info:"info-circle",success:"check-circle",error:"close-circle",warning:"exclamation-circle"};return"nzIconType"in n||(n.nzIconType=o[i]),"nzCancelText"in n||(n.nzCancelText=null),this.confirm(n,i)}ngOnDestroy(){this.closeModals(this.openModalsAtThisLevel),this.afterAllClosedAtThisLevel.complete()}};e.\u0275fac=function(i){return new(i||e)(g(ci),g(Ue),g(Rn),g(e,12),g(Ft,8))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();var Db=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[Qh],imports:[Zh,_b,Cb,Mb,bb]});let t=e;return t})();var xb="nz-animate-disabled",Sb=(()=>{let e=class e{constructor(n,i,o){this.element=n,this.renderer=i,this.animationType=o,this.nzNoAnimation=!1}ngOnChanges(){this.updateClass()}ngAfterViewInit(){this.updateClass()}updateClass(){let n=rt(this.element);n&&(this.nzNoAnimation||this.animationType==="NoopAnimations"?this.renderer.addClass(n,xb):this.renderer.removeClass(n,xb))}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(st),m(gn,8))},e.\u0275dir=ne({type:e,selectors:[["","nzNoAnimation",""]],inputs:{nzNoAnimation:"nzNoAnimation"},exportAs:["nzNoAnimation"],standalone:!0,features:[He]});let t=e;return je([Je()],t.prototype,"nzNoAnimation",void 0),t})();var fR=["drawerTemplate"];function pR(t,e){if(t&1){let r=Pn();se(0,"div",11),Pt("click",function(){pn(r);let i=G(2);return mn(i.maskClick())}),le()}if(t&2){let r=G(2);I("ngStyle",r.nzMaskStyle)}}function mR(t,e){if(t&1&&(tt(0),et(1,"span",19),nt()),t&2){let r=e.$implicit;k(),I("nzType",r)}}function gR(t,e){if(t&1){let r=Pn();se(0,"button",17),Pt("click",function(){pn(r);let i=G(3);return mn(i.closeClick())}),Q(1,mR,2,1,"ng-container",18),le()}if(t&2){let r=G(3);k(),I("nzStringTemplateOutlet",r.nzCloseIcon)}}function vR(t,e){if(t&1&&(tt(0),et(1,"div",21),nt()),t&2){let r=G(4);k(),I("innerHTML",r.nzTitle,Dr)}}function yR(t,e){if(t&1&&(se(0,"div",20),Q(1,vR,2,1,"ng-container",18),le()),t&2){let r=G(3);k(),I("nzStringTemplateOutlet",r.nzTitle)}}function wR(t,e){if(t&1&&(tt(0),et(1,"div",21),nt()),t&2){let r=G(4);k(),I("innerHTML",r.nzExtra,Dr)}}function bR(t,e){if(t&1&&(se(0,"div",22),Q(1,wR,2,1,"ng-container",18),le()),t&2){let r=G(3);k(),I("nzStringTemplateOutlet",r.nzExtra)}}function _R(t,e){if(t&1&&(se(0,"div",12)(1,"div",13),Q(2,gR,2,1,"button",14)(3,yR,2,1,"div",15),le(),Q(4,bR,2,1,"div",16),le()),t&2){let r=G(2);St("ant-drawer-header-close-only",!r.nzTitle),k(2),I("ngIf",r.nzClosable),k(),I("ngIf",r.nzTitle),k(),I("ngIf",r.nzExtra)}}function CR(t,e){}function MR(t,e){t&1&&xu(0)}function DR(t,e){if(t&1&&(tt(0),Q(1,MR,1,0,"ng-container",24),nt()),t&2){let r=G(3);k(),I("ngTemplateOutlet",r.nzContent)("ngTemplateOutletContext",r.templateContext)}}function xR(t,e){if(t&1&&(tt(0),Q(1,DR,2,2,"ng-container",23),nt()),t&2){let r=G(2);k(),I("ngIf",r.isTemplateRef(r.nzContent))}}function SR(t,e){}function TR(t,e){if(t&1&&(tt(0),Q(1,SR,0,0,"ng-template",25),nt()),t&2){let r=G(3);k(),I("ngTemplateOutlet",r.contentFromContentChild)}}function ER(t,e){if(t&1&&Q(0,TR,2,1,"ng-container",23),t&2){let r=G(2);I("ngIf",r.contentFromContentChild&&(r.isOpen||r.inAnimation))}}function zR(t,e){if(t&1&&(tt(0),et(1,"div",21),nt()),t&2){let r=G(3);k(),I("innerHTML",r.nzFooter,Dr)}}function IR(t,e){if(t&1&&(se(0,"div",26),Q(1,zR,2,1,"ng-container",18),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzFooter)}}function kR(t,e){if(t&1&&(se(0,"div",1),Q(1,pR,1,1,"div",2),se(2,"div")(3,"div",3)(4,"div",4),Q(5,_R,5,5,"div",5),se(6,"div",6),Q(7,CR,0,0,"ng-template",7)(8,xR,2,1,"ng-container",8)(9,ER,1,1,"ng-template",null,9,bo),le(),Q(11,IR,2,1,"div",10),le()()()()),t&2){let r=$s(10),n=G();Gt("transform",n.offsetTransform)("transition",n.placementChanging?"none":null)("z-index",n.nzZIndex),St("ant-drawer-rtl",n.dir==="rtl")("ant-drawer-open",n.isOpen)("no-mask",!n.nzMask)("ant-drawer-top",n.nzPlacement==="top")("ant-drawer-bottom",n.nzPlacement==="bottom")("ant-drawer-right",n.nzPlacement==="right")("ant-drawer-left",n.nzPlacement==="left"),I("nzNoAnimation",n.nzNoAnimation),k(),I("ngIf",n.nzMask),k(),y7("ant-drawer-content-wrapper ",n.nzWrapClassName,""),Gt("width",n.width)("height",n.height)("transform",n.transform)("transition",n.placementChanging?"none":null),k(2),Gt("height",n.isLeftOrRight?"100%":null),k(),I("ngIf",n.nzTitle||n.nzClosable),k(),I("ngStyle",n.nzBodyStyle),k(2),I("ngIf",n.nzContent)("ngIfElse",r),k(3),I("ngIf",n.nzFooter)}}var PR=(()=>{let e=class e{constructor(n){this.templateRef=n}};e.\u0275fac=function(i){return new(i||e)(m(Me))},e.\u0275dir=ne({type:e,selectors:[["","nzDrawerContent",""]],exportAs:["nzDrawerContent"],standalone:!0});let t=e;return t})(),Tb=378,Eb=736,OR=new E("NZ_DRAWER_DATA"),D3=class{},AR=300,FR="drawer",zb=(()=>{let e=class e extends D3{set nzVisible(n){this.isOpen=n}get nzVisible(){return this.isOpen}get offsetTransform(){if(!this.isOpen||this.nzOffsetX+this.nzOffsetY===0)return null;switch(this.nzPlacement){case"left":return`translateX(${this.nzOffsetX}px)`;case"right":return`translateX(-${this.nzOffsetX}px)`;case"top":return`translateY(${this.nzOffsetY}px)`;case"bottom":return`translateY(-${this.nzOffsetY}px)`}}get transform(){if(this.isOpen)return null;switch(this.nzPlacement){case"left":return"translateX(-100%)";case"right":return"translateX(100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)"}}get width(){if(this.isLeftOrRight){let n=this.nzSize==="large"?Eb:Tb;return this.nzWidth===void 0?Zc(n):Zc(this.nzWidth)}return null}get height(){if(!this.isLeftOrRight){let n=this.nzSize==="large"?Eb:Tb;return this.nzHeight===void 0?Zc(n):Zc(this.nzHeight)}return null}get isLeftOrRight(){return this.nzPlacement==="left"||this.nzPlacement==="right"}get afterOpen(){return this.nzAfterOpen.asObservable()}get afterClose(){return this.nzAfterClose.asObservable()}isTemplateRef(n){return n instanceof Me}constructor(n,i,o,s,a,c,l,u,d,h,f){super(),this.cdr=n,this.document=i,this.nzConfigService=o,this.renderer=s,this.overlay=a,this.injector=c,this.changeDetectorRef=l,this.focusTrapFactory=u,this.viewContainerRef=d,this.overlayKeyboardDispatcher=h,this.directionality=f,this._nzModuleName=FR,this.nzCloseIcon="close",this.nzClosable=!0,this.nzMaskClosable=!0,this.nzMask=!0,this.nzCloseOnNavigation=!0,this.nzNoAnimation=!1,this.nzKeyboard=!0,this.nzPlacement="right",this.nzSize="default",this.nzMaskStyle={},this.nzBodyStyle={},this.nzZIndex=1e3,this.nzOffsetX=0,this.nzOffsetY=0,this.componentInstance=null,this.nzOnViewInit=new re,this.nzOnClose=new re,this.nzVisibleChange=new re,this.destroy$=new S,this.placementChanging=!1,this.placementChangeTimeoutId=-1,this.isOpen=!1,this.inAnimation=!1,this.templateContext={$implicit:void 0,drawerRef:this},this.nzAfterOpen=new S,this.nzAfterClose=new S,this.nzDirection=void 0,this.dir="ltr"}ngOnInit(){this.directionality.change?.pipe(ce(this.destroy$)).subscribe(n=>{this.dir=n,this.cdr.detectChanges()}),this.dir=this.nzDirection||this.directionality.value,this.attachOverlay(),this.updateOverlayStyle(),this.updateBodyOverflow(),this.templateContext={$implicit:this.nzData||this.nzContentParams,drawerRef:this},this.changeDetectorRef.detectChanges()}ngAfterViewInit(){this.attachBodyContent(),this.nzOnViewInit.observers.length&&setTimeout(()=>{this.nzOnViewInit.emit()})}ngOnChanges(n){let{nzPlacement:i,nzVisible:o}=n;o&&(n.nzVisible.currentValue?this.open():this.close()),i&&!i.isFirstChange()&&this.triggerPlacementChangeCycleOnce()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),clearTimeout(this.placementChangeTimeoutId),this.disposeOverlay()}getAnimationDuration(){return this.nzNoAnimation?0:AR}triggerPlacementChangeCycleOnce(){this.nzNoAnimation||(this.placementChanging=!0,this.changeDetectorRef.markForCheck(),clearTimeout(this.placementChangeTimeoutId),this.placementChangeTimeoutId=setTimeout(()=>{this.placementChanging=!1,this.changeDetectorRef.markForCheck()},this.getAnimationDuration()))}close(n){this.isOpen=!1,this.inAnimation=!0,this.nzVisibleChange.emit(!1),this.updateOverlayStyle(),this.overlayKeyboardDispatcher.remove(this.overlayRef),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.updateBodyOverflow(),this.restoreFocus(),this.inAnimation=!1,this.nzAfterClose.next(n),this.nzAfterClose.complete(),this.componentInstance=null},this.getAnimationDuration())}open(){this.attachOverlay(),this.isOpen=!0,this.inAnimation=!0,this.nzVisibleChange.emit(!0),this.overlayKeyboardDispatcher.add(this.overlayRef),this.updateOverlayStyle(),this.updateBodyOverflow(),this.savePreviouslyFocusedElement(),this.trapFocus(),this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.inAnimation=!1,this.changeDetectorRef.detectChanges(),this.nzAfterOpen.next()},this.getAnimationDuration())}getContentComponent(){return this.componentInstance}closeClick(){this.nzOnClose.emit()}maskClick(){this.nzMaskClosable&&this.nzMask&&this.nzOnClose.emit()}attachBodyContent(){if(this.bodyPortalOutlet.dispose(),this.nzContent instanceof Zp){let n=Ue.create({parent:this.injector,providers:[{provide:D3,useValue:this},{provide:OR,useValue:this.nzData}]}),i=new si(this.nzContent,null,n),o=this.bodyPortalOutlet.attachComponentPortal(i);this.componentInstance=o.instance,Object.assign(o.instance,this.nzData||this.nzContentParams),o.changeDetectorRef.detectChanges()}}attachOverlay(){this.overlayRef||(this.portal=new ai(this.drawerTemplate,this.viewContainerRef),this.overlayRef=this.overlay.create(this.getOverlayConfig())),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.overlayRef.keydownEvents().pipe(ce(this.destroy$)).subscribe(n=>{n.keyCode===27&&this.isOpen&&this.nzKeyboard&&this.nzOnClose.emit()}),this.overlayRef.detachments().pipe(ce(this.destroy$)).subscribe(()=>{this.disposeOverlay()}))}disposeOverlay(){this.overlayRef?.dispose(),this.overlayRef=null}getOverlayConfig(){return new qi({disposeOnNavigation:this.nzCloseOnNavigation,positionStrategy:this.overlay.position().global(),scrollStrategy:this.overlay.scrollStrategies.block()})}updateOverlayStyle(){this.overlayRef&&this.overlayRef.overlayElement&&this.renderer.setStyle(this.overlayRef.overlayElement,"pointer-events",this.isOpen?"auto":"none")}updateBodyOverflow(){this.overlayRef&&(this.isOpen?this.overlayRef.getConfig().scrollStrategy.enable():this.overlayRef.getConfig().scrollStrategy.disable())}savePreviouslyFocusedElement(){this.document&&!this.previouslyFocusedElement&&(this.previouslyFocusedElement=this.document.activeElement,this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.blur=="function"&&this.previouslyFocusedElement.blur())}trapFocus(){!this.focusTrap&&this.overlayRef&&this.overlayRef.overlayElement&&(this.focusTrap=this.focusTrapFactory.create(this.overlayRef.overlayElement),this.focusTrap.focusInitialElement())}restoreFocus(){this.previouslyFocusedElement&&typeof this.previouslyFocusedElement.focus=="function"&&this.previouslyFocusedElement.focus(),this.focusTrap&&this.focusTrap.destroy()}};e.\u0275fac=function(i){return new(i||e)(m(ft),m(V,8),m(Rn),m(st),m(ci),m(Ue),m(ft),m(ka),m(Xe),m(Vh),m(Ft,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-drawer"]],contentQueries:function(i,o,s){if(i&1&&wn(s,PR,7,Me),i&2){let a;ct(a=lt())&&(o.contentFromContentChild=a.first)}},viewQuery:function(i,o){if(i&1&&(On(fR,7),On(Ar,5)),i&2){let s;ct(s=lt())&&(o.drawerTemplate=s.first),ct(s=lt())&&(o.bodyPortalOutlet=s.first)}},inputs:{nzContent:"nzContent",nzCloseIcon:"nzCloseIcon",nzClosable:"nzClosable",nzMaskClosable:"nzMaskClosable",nzMask:"nzMask",nzCloseOnNavigation:"nzCloseOnNavigation",nzNoAnimation:"nzNoAnimation",nzKeyboard:"nzKeyboard",nzTitle:"nzTitle",nzExtra:"nzExtra",nzFooter:"nzFooter",nzPlacement:"nzPlacement",nzSize:"nzSize",nzMaskStyle:"nzMaskStyle",nzBodyStyle:"nzBodyStyle",nzWrapClassName:"nzWrapClassName",nzWidth:"nzWidth",nzHeight:"nzHeight",nzZIndex:"nzZIndex",nzOffsetX:"nzOffsetX",nzOffsetY:"nzOffsetY",nzVisible:"nzVisible"},outputs:{nzOnViewInit:"nzOnViewInit",nzOnClose:"nzOnClose",nzVisibleChange:"nzVisibleChange"},exportAs:["nzDrawer"],standalone:!0,features:[nn,He,_t],decls:2,vars:0,consts:[["drawerTemplate",""],[1,"ant-drawer",3,"nzNoAnimation"],["class","ant-drawer-mask",3,"ngStyle","click",4,"ngIf"],[1,"ant-drawer-content"],[1,"ant-drawer-wrapper-body"],["class","ant-drawer-header",3,"ant-drawer-header-close-only",4,"ngIf"],[1,"ant-drawer-body",3,"ngStyle"],["cdkPortalOutlet",""],[4,"ngIf","ngIfElse"],["contentElseTemp",""],["class","ant-drawer-footer",4,"ngIf"],[1,"ant-drawer-mask",3,"ngStyle","click"],[1,"ant-drawer-header"],[1,"ant-drawer-header-title"],["aria-label","Close","class","ant-drawer-close","style","--scroll-bar: 0px;",3,"click",4,"ngIf"],["class","ant-drawer-title",4,"ngIf"],["class","ant-drawer-extra",4,"ngIf"],["aria-label","Close",1,"ant-drawer-close",2,"--scroll-bar","0px",3,"click"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType"],[1,"ant-drawer-title"],[3,"innerHTML"],[1,"ant-drawer-extra"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngTemplateOutlet"],[1,"ant-drawer-footer"]],template:function(i,o){i&1&&Q(0,kR,12,40,"ng-template",null,0,bo)},dependencies:[Sb,nr,_o,Nr,Fr,No,ii,ts,Ar,gc],encapsulation:2,changeDetection:0});let t=e;return je([Je()],t.prototype,"nzClosable",void 0),je([Ln(),Je()],t.prototype,"nzMaskClosable",void 0),je([Ln(),Je()],t.prototype,"nzMask",void 0),je([Ln(),Je()],t.prototype,"nzCloseOnNavigation",void 0),je([Je()],t.prototype,"nzNoAnimation",void 0),je([Je()],t.prototype,"nzKeyboard",void 0),je([Ln()],t.prototype,"nzDirection",void 0),t})(),Xh=class{constructor(e,r){this.overlay=e,this.options=r,this.unsubscribe$=new S;let o=this.options,{nzOnCancel:n}=o,i=ss(o,["nzOnCancel"]);this.overlayRef=this.overlay.create(),this.drawerRef=this.overlayRef.attach(new si(zb)).instance,this.updateOptions(i),this.drawerRef.savePreviouslyFocusedElement(),this.drawerRef.nzOnViewInit.pipe(ce(this.unsubscribe$)).subscribe(()=>{this.drawerRef.open()}),this.drawerRef.nzOnClose.subscribe(()=>{n?n().then(s=>{s!==!1&&this.drawerRef.close()}):this.drawerRef.close()}),this.drawerRef.afterClose.pipe(ce(this.unsubscribe$)).subscribe(()=>{this.overlayRef.dispose(),this.drawerRef=null,this.unsubscribe$.next(),this.unsubscribe$.complete()})}getInstance(){return this.drawerRef}updateOptions(e){Object.assign(this.drawerRef,e)}},Jh=(()=>{let e=class e{constructor(n){this.overlay=n}create(n){return new Xh(this.overlay,n).getInstance()}};e.\u0275fac=function(i){return new(i||e)(g(ci))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),Ib=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[Jh],imports:[zb]});let t=e;return t})();function lf(t,e,r){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];i?t.setProperty(n,i,r?.has(n)?"important":""):t.removeProperty(n)}return t}function Oa(t,e){let r=e?"":"none";lf(t.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":r,"-ms-user-select":r,"-webkit-user-select":r,"-moz-user-select":r})}function kb(t,e,r){lf(t.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},r)}function E3(t,e){return e&&e!="none"?t+" "+e:t}function Pb(t){let e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function NR(t){let e=getComputedStyle(t),r=ef(e,"transition-property"),n=r.find(a=>a==="transform"||a==="all");if(!n)return 0;let i=r.indexOf(n),o=ef(e,"transition-duration"),s=ef(e,"transition-delay");return Pb(o[i])+Pb(s[i])}function ef(t,e){return t.getPropertyValue(e).split(",").map(n=>n.trim())}function uf(t){let e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function nf(t,e,r){let{top:n,bottom:i,left:o,right:s}=t;return r>=n&&r<=i&&e>=o&&e<=s}function Sl(t,e,r){t.top+=e,t.bottom=t.top+t.height,t.left+=r,t.right=t.left+t.width}function Ob(t,e,r,n){let{top:i,right:o,bottom:s,left:a,width:c,height:l}=t,u=c*e,d=l*e;return n>i-d&&na-u&&r{this.positions.set(r,{scrollPosition:{top:r.scrollTop,left:r.scrollLeft},clientRect:uf(r)})})}handleScroll(e){let r=cn(e),n=this.positions.get(r);if(!n)return null;let i=n.scrollPosition,o,s;if(r===this._document){let l=this.getViewportScrollPosition();o=l.top,s=l.left}else o=r.scrollTop,s=r.scrollLeft;let a=i.top-o,c=i.left-s;return this.positions.forEach((l,u)=>{l.clientRect&&r!==u&&r.contains(u)&&Sl(l.clientRect,a,c)}),i.top=o,i.left=s,{top:a,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Ab(t){let e=t.cloneNode(!0),r=e.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;iOa(r,e)))}constructor(e,r,n,i,o,s){this._config=r,this._document=n,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new S,this._pointerMoveSubscription=ye.EMPTY,this._pointerUpSubscription=ye.EMPTY,this._scrollSubscription=ye.EMPTY,this._resizeSubscription=ye.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new S,this.started=new S,this.released=new S,this.ended=new S,this.entered=new S,this.exited=new S,this.dropped=new S,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&this._initializeDragSequence(c,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let c=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging){let u=Math.abs(c.x-this._pickupPositionOnPage.x),d=Math.abs(c.y-this._pickupPositionOnPage.y);if(u+d>=this._config.dragStartThreshold){let f=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),p=this._dropContainer;if(!f){this._endDragSequence(a);return}(!p||!p.isDragging()&&!p.isReceiving())&&(a.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(a)))}return}a.preventDefault();let l=this._getConstrainedPointerPosition(c);if(this._hasMoved=!0,this._lastKnownPointerPosition=c,this._updatePointerDirectionDelta(l),this._dropContainer)this._updateActiveDropContainer(l,c);else{let u=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,d=this._activeTransform;d.x=l.x-u.x+this._passiveTransform.x,d.y=l.y-u.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:l,event:a,distance:this._getDragDistance(l),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(r.parentDragRef||null),this._parentPositions=new z3(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>rt(n)),this._handles.forEach(n=>Oa(n,this.disabled)),this._toggleNativeDragInteractions();let r=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&r.add(n)}),this._disabledHandles=r,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let r=rt(e);return r!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{r.addEventListener("mousedown",this._pointerDown,x3),r.addEventListener("touchstart",this._pointerDown,Lb),r.addEventListener("dragstart",this._nativeDragStart,x3)}),this._initialTransform=void 0,this._rootElement=r),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?rt(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),Oa(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),Oa(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let r=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(r),dropPoint:r,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){xl(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let r=this._dropContainer;if(r){let n=this._rootElement,i=n.parentNode,o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment(""),a=this._getShadowRoot();i.insertBefore(s,n),this._initialTransform=n.style.transform||"",this._preview=this._createPreviewElement(),kb(n,!1,tf),this._document.body.appendChild(i.replaceChild(o,n)),this._getPreviewInsertionPoint(i,a).appendChild(this._preview),this.started.next({source:this,event:e}),r.start(),this._initialContainer=r,this._initialIndex=r.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(r?r.getScrollableParents():[])}_initializeDragSequence(e,r){this._parentDragRef&&r.stopPropagation();let n=this.isDragging(),i=xl(r),o=!i&&r.button!==0,s=this._rootElement,a=cn(r),c=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+LR>Date.now(),l=i?Kh(r):Gh(r);if(a&&a.draggable&&r.type==="mousedown"&&r.preventDefault(),n||o||c||l)return;if(this._handles.length){let h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=uf(this._boundaryElement));let u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,r);let d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(r);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,r)}_cleanupDragArtifacts(e){kb(this._rootElement,!0,tf),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let r=this._dropContainer,n=r.getItemIndex(this),i=this._getPointerPositionOnPage(e),o=this._getDragDistance(i),s=r._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:r,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:i,event:e}),r.drop(this,n,this._initialIndex,this._initialContainer,s,o,i,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:r},{x:n,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,r);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,r)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,r,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,i),this._dropContainer._sortItem(this,e,r,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,r):this._applyPreviewTransform(e-this._pickupPositionInElement.x,r-this._pickupPositionInElement.y))}_createPreviewElement(){let e=this._previewTemplate,r=this.previewClass,n=e?e.template:null,i;if(n&&e){let o=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),i=Vb(s,this._document),this._previewRef=s,e.matchSize?Yb(i,o):i.style.transform=T3(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=Ab(this._rootElement),Yb(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return lf(i.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},tf),Oa(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("dir",this._direction),r&&(Array.isArray(r)?r.forEach(o=>i.classList.add(o)):i.classList.add(r)),i}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let r=NR(this._preview);return r===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let i=s=>{(!s||cn(s)===this._preview&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",i),n(),clearTimeout(o))},o=setTimeout(i,r*1.5);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,r=e?e.template:null,n;return r?(this._placeholderRef=e.viewContainer.createEmbeddedView(r,e.context),this._placeholderRef.detectChanges(),n=Vb(this._placeholderRef,this._document)):n=Ab(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,r,n){let i=r===this._rootElement?null:r,o=i?i.getBoundingClientRect():e,s=xl(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),c=s.pageX-o.left-a.left,l=s.pageY-o.top-a.top;return{x:o.left-e.left+c,y:o.top-e.top+l}}_getPointerPositionOnPage(e){let r=this._getViewportScrollPosition(),n=xl(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=n.pageX-r.left,o=n.pageY-r.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(s.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(e){let r=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:i}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||r==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||r==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:c,height:l}=this._getPreviewRect(),u=a.top+s,d=a.bottom-(l-s),h=a.left+o,f=a.right-(c-o);n=Hb(n,h,f),i=Hb(i,u,d)}return{x:n,y:i}}_updatePointerDirectionDelta(e){let{x:r,y:n}=e,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(r-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=r>o.x?1:-1,o.x=r),a>this._config.pointerDirectionChangeThreshold&&(i.y=n>o.y?1:-1,o.y=n),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,Oa(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,x3),e.removeEventListener("touchstart",this._pointerDown,Lb),e.removeEventListener("dragstart",this._nativeDragStart,x3)}_applyRootElementTransform(e,r){let n=T3(e,r),i=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=i.transform&&i.transform!="none"?i.transform:""),i.transform=E3(n,this._initialTransform)}_applyPreviewTransform(e,r){let n=this._previewTemplate?.template?void 0:this._initialTransform,i=T3(e,r);this._preview.style.transform=E3(i,n)}_getDragDistance(e){let r=this._pickupPositionOnPage;return r?{x:e.x-r.x,y:e.y-r.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:r}=this._passiveTransform;if(e===0&&r===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||n.width===0&&n.height===0)return;let o=i.left-n.left,s=n.right-i.right,a=i.top-n.top,c=n.bottom-i.bottom;i.width>n.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,i.height>n.height?(a>0&&(r+=a),c>0&&(r-=c)):r=0,(e!==this._passiveTransform.x||r!==this._passiveTransform.y)&&this.setFreeDragPosition({y:r,x:e})}_getDragStartDelay(e){let r=this.dragStartDelay;return typeof r=="number"?r:xl(e)?r.touch:r?r.mouse:0}_updateOnScroll(e){let r=this._parentPositions.handleScroll(e);if(r){let n=cn(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&Sl(this._boundaryRect,r.top,r.left),this._pickupPositionOnPage.x+=r.left,this._pickupPositionOnPage.y+=r.top,this._dropContainer||(this._activeTransform.x-=r.left,this._activeTransform.y-=r.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=cl(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,r){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let i=this._document;return r||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return rt(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(e){return this._handles.find(r=>e.target&&(e.target===r||r.contains(e.target)))}};function T3(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function Hb(t,e,r){return Math.max(e,Math.min(r,t))}function xl(t){return t.type[0]==="t"}function Vb(t,e){let r=t.rootNodes;if(r.length===1&&r[0].nodeType===e.ELEMENT_NODE)return r[0];let n=e.createElement("div");return r.forEach(i=>n.appendChild(i)),n}function Yb(t,e){t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.transform=T3(e.left,e.top)}function HR(t,e,r){let n=jb(e,t.length-1),i=jb(r,t.length-1);if(n===i)return;let o=t[n],s=i0)return null;let a=this.orientation==="horizontal",c=o.findIndex(v=>v.drag===e),l=o[s],u=o[c].clientRect,d=l.clientRect,h=c>s?1:-1,f=this._getItemOffsetPx(u,d,h),p=this._getSiblingOffsetPx(c,o,h),y=o.slice();return HR(o,c,s),o.forEach((v,M)=>{if(y[M]===v)return;let P=v.drag===e,X=P?f:p,$=P?e.getPlaceholderElement():v.drag.getRootElement();v.offset+=X,a?($.style.transform=E3(`translate3d(${Math.round(v.offset)}px, 0, 0)`,v.initialTransform),Sl(v.clientRect,0,X)):($.style.transform=E3(`translate3d(0, ${Math.round(v.offset)}px, 0)`,v.initialTransform),Sl(v.clientRect,X,0))}),this._previousSwap.overlaps=nf(d,r,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=a?i.x:i.y,{previousIndex:c,currentIndex:s}}enter(e,r,n,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(e,r,n):i,s=this._activeDraggables,a=s.indexOf(e),c=e.getPlaceholderElement(),l=s[o];if(l===e&&(l=s[o+1]),!l&&(o==null||o===-1||o-1&&s.splice(a,1),l&&!this._dragDropRegistry.isDragging(l)){let u=l.getRootElement();u.parentElement.insertBefore(c,u),s.splice(o,0,e)}else rt(this._element).appendChild(c),s.push(e);c.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables.forEach(e=>{let r=e.getRootElement();if(r){let n=this._itemPositions.find(i=>i.drag===e)?.initialTransform;r.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===e)}updateOnScroll(e,r){this._itemPositions.forEach(({clientRect:n})=>{Sl(n,e,r)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(r=>{let n=r.getVisibleElement();return{drag:r,offset:0,initialTransform:n.style.transform||"",clientRect:uf(n)}}).sort((r,n)=>e?r.clientRect.left-n.clientRect.left:r.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,r,n){let i=this.orientation==="horizontal",o=i?r.left-e.left:r.top-e.top;return n===-1&&(o+=i?r.width-e.width:r.height-e.height),o}_getSiblingOffsetPx(e,r,n){let i=this.orientation==="horizontal",o=r[e].clientRect,s=r[e+n*-1],a=o[i?"width":"height"]*n;if(s){let c=i?"left":"top",l=i?"right":"bottom";n===-1?a-=s.clientRect[c]-o[l]:a+=o[c]-s.clientRect[l]}return a}_shouldEnterAsFirstChild(e,r){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,i=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let s=n[n.length-1].clientRect;return i?e>=s.right:r>=s.bottom}else{let s=n[0].clientRect;return i?e<=s.left:r<=s.top}}_getItemIndexFromPointerPosition(e,r,n,i){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:c})=>{if(a===e)return!1;if(i){let l=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return o?r>=Math.floor(c.left)&&r=Math.floor(c.top)&&n!0,this.sortPredicate=()=>!0,this.beforeStarted=new S,this.entered=new S,this.exited=new S,this.dropped=new S,this.sorted=new S,this.receivingStarted=new S,this.receivingStopped=new S,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=ye.EMPTY,this._verticalScrollDirection=Bn.NONE,this._horizontalScrollDirection=Kt.NONE,this._stopScrollTimers=new S,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),n0(0,Ha).pipe(ce(this._stopScrollTimers)).subscribe(()=>{let s=this._scrollNode,a=this.autoScrollStep;this._verticalScrollDirection===Bn.UP?s.scrollBy(0,-a):this._verticalScrollDirection===Bn.DOWN&&s.scrollBy(0,a),this._horizontalScrollDirection===Kt.LEFT?s.scrollBy(-a,0):this._horizontalScrollDirection===Kt.RIGHT&&s.scrollBy(a,0)})},this.element=rt(e),this._document=n,this.withScrollableParents([this.element]),r.registerDropContainer(this),this._parentPositions=new z3(n),this._sortStrategy=new of(this.element,r),this._sortStrategy.withSortPredicate((s,a)=>this.sortPredicate(s,a,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,r,n,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(e)),this._sortStrategy.enter(e,r,n,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,r,n,i,o,s,a,c={}){this._reset(),this.dropped.next({item:e,currentIndex:r,previousIndex:n,container:this,previousContainer:i,isPointerOverContainer:o,distance:s,dropPoint:a,event:c})}withItems(e){let r=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(r.filter(i=>i.isDragging()).every(i=>e.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._sortStrategy.direction=e,this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){return this._sortStrategy.orientation=e,this}withScrollableParents(e){let r=rt(this.element);return this._scrollableElements=e.indexOf(r)===-1?[r,...e]:e.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,r,n,i){if(this.sortingDisabled||!this._domRect||!Ob(this._domRect,Bb,r,n))return;let o=this._sortStrategy.sort(e,r,n,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,r){if(this.autoScrollDisabled)return;let n,i=Bn.NONE,o=Kt.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||Ob(s.clientRect,Bb,e,r)&&([i,o]=VR(a,s.clientRect,this._sortStrategy.direction,e,r),(i||o)&&(n=a))}),!i&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),c={width:s,height:a,top:0,right:s,bottom:a,left:0};i=$b(c,r),o=qb(c,e),n=window}n&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=n,(i||o)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=rt(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){let e=rt(this.element);this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(e).clientRect}_reset(){this._isDragging=!1;let e=rt(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(r=>r._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,r){return this._domRect!=null&&nf(this._domRect,e,r)}_getSiblingContainerFromPosition(e,r,n){return this._siblings.find(i=>i._canReceive(e,r,n))}_canReceive(e,r,n){if(!this._domRect||!nf(this._domRect,r,n)||!this.enterPredicate(e,this))return!1;let i=this._getShadowRoot().elementFromPoint(r,n);if(!i)return!1;let o=rt(this.element);return i===o||o.contains(i)}_startReceiving(e,r){let n=this._activeSiblings;!n.has(e)&&r.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:r}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let r=this._parentPositions.handleScroll(e);r&&this._sortStrategy.updateOnScroll(r.top,r.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=cl(rt(this.element));this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(r=>r.isDragging());this._siblings.forEach(r=>r._startReceiving(this,e))}};function $b(t,e){let{top:r,bottom:n,height:i}=t,o=i*Ub;return e>=r-o&&e<=r+o?Bn.UP:e>=n-o&&e<=n+o?Bn.DOWN:Bn.NONE}function qb(t,e){let{left:r,right:n,width:i}=t,o=i*Ub;return e>=r-o&&e<=r+o?Kt.LEFT:e>=n-o&&e<=n+o?Kt.RIGHT:Kt.NONE}function VR(t,e,r,n,i){let o=$b(e,i),s=qb(e,n),a=Bn.NONE,c=Kt.NONE;if(o){let l=t.scrollTop;o===Bn.UP?l>0&&(a=Bn.UP):t.scrollHeight-l>t.clientHeight&&(a=Bn.DOWN)}if(s){let l=t.scrollLeft;r==="rtl"?s===Kt.RIGHT?l<0&&(c=Kt.RIGHT):t.scrollWidth+l>t.clientWidth&&(c=Kt.LEFT):s===Kt.LEFT?l>0&&(c=Kt.LEFT):t.scrollWidth-l>t.clientWidth&&(c=Kt.RIGHT)}return[a,c]}var S3=Fo({passive:!1,capture:!0}),YR=(()=>{let e=class e{constructor(n,i){this._ngZone=n,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new S,this.pointerUp=new S,this.scroll=new S,this._preventDefaultWhileDragging=o=>{this._activeDragInstances.length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=i}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,S3)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,S3)}startDragging(n,i){if(!(this._activeDragInstances.indexOf(n)>-1)&&(this._activeDragInstances.push(n),this._activeDragInstances.length===1)){let o=i.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:S3}),o||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:S3}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,a)=>{this._document.addEventListener(a,s.handler,s.options)})})}}stopDragging(n){let i=this._activeDragInstances.indexOf(n);i>-1&&(this._activeDragInstances.splice(i,1),this._activeDragInstances.length===0&&this._clearGlobalListeners())}isDragging(n){return this._activeDragInstances.indexOf(n)>-1}scrolled(n){let i=[this.scroll];return n&&n!==this._document&&i.push(new Y(o=>this._ngZone.runOutsideAngular(()=>{let a=c=>{this._activeDragInstances.length&&o.next(c)};return n.addEventListener("scroll",a,!0),()=>{n.removeEventListener("scroll",a,!0)}}))),vs(...i)}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((n,i)=>{this._document.removeEventListener(i,n.handler,n.options)}),this._globalListeners.clear()}};e.\u0275fac=function(i){return new(i||e)(g(U),g(V))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),jR={dragStartThreshold:5,pointerDirectionChangeThreshold:5},df=(()=>{let e=class e{constructor(n,i,o,s){this._document=n,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=s}createDrag(n,i=jR){return new rf(n,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(n){return new sf(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};e.\u0275fac=function(i){return new(i||e)(g(V),g(U),g(es),g(YR))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),af=new E("CDK_DRAG_PARENT");var cf=new E("CdkDragHandle"),y6e=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._stateChanges.next(this)}constructor(n,i){this.element=n,this._stateChanges=new S,this._disabled=!1,this._parentDrag=i}ngOnDestroy(){this._stateChanges.complete()}};e.\u0275fac=function(i){return new(i||e)(m(oe),m(af,12))},e.\u0275dir=ne({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[W.HasDecoratorInputTransform,"cdkDragHandleDisabled","disabled",ut]},standalone:!0,features:[Kr([{provide:cf,useExisting:e}]),rn]});let t=e;return t})(),BR=new E("CdkDragPlaceholder");var UR=new E("CdkDragPreview");var $R=new E("CDK_DRAG_CONFIG"),qR="cdk-drag",WR=new E("CdkDropList"),w6e=(()=>{let e=class e{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}constructor(n,i,o,s,a,c,l,u,d,h,f){this.element=n,this.dropContainer=i,this._ngZone=s,this._viewContainerRef=a,this._dir=l,this._changeDetectorRef=d,this._selfHandle=h,this._parentDrag=f,this._destroyed=new S,this.started=new re,this.released=new re,this.ended=new re,this.entered=new re,this.exited=new re,this.dropped=new re,this.moved=new Y(p=>{let y=this._dragRef.moved.pipe(Z(v=>({source:this,pointerPosition:v.pointerPosition,event:v.event,delta:v.delta,distance:v.distance}))).subscribe(p);return()=>{y.unsubscribe()}}),this._dragRef=u.createDrag(n,{dragStartThreshold:c&&c.dragStartThreshold!=null?c.dragStartThreshold:5,pointerDirectionChangeThreshold:c&&c.pointerDirectionChangeThreshold!=null?c.pointerDirectionChangeThreshold:5,zIndex:c?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),c&&this._assignDefaults(c),i&&(this._dragRef._withDropContainer(i._dropListRef),i.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(ze(1),ce(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(n){let i=n.rootElementSelector,o=n.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let n=e._dragInstances.indexOf(this);n>-1&&e._dragInstances.splice(n,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){let n=this.element.nativeElement,i=n;this.rootElementSelector&&(i=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):rt(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let i=this._dir,o=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.dragStartDelay=typeof o=="object"&&o?o:ti(o),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),i&&n.withDirection(i.value)}}),n.beforeStarted.pipe(ze(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){if(i.classList.contains(qR)){n.withParent(e._dragInstances.find(o=>o.element.nativeElement===i)?._dragRef||null);break}i=i.parentElement}})}_handleEvents(n){n.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),n.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),n.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),n.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(n){let{lockAxis:i,dragStartDelay:o,constrainPosition:s,previewClass:a,boundaryElement:c,draggingDisabled:l,rootElementSelector:u,previewContainer:d}=n;this.disabled=l??!1,this.dragStartDelay=o||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),a&&(this.previewClass=a),c&&(this.boundaryElement=c),u&&(this.rootElementSelector=u),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.changes.pipe(Rt(this._handles),Fe(n=>{let i=n.filter(o=>o._parentDrag===this).map(o=>o.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Ze(n=>vs(...n.map(i=>i._stateChanges.pipe(Rt(i))))),ce(this._destroyed)).subscribe(n=>{let i=this._dragRef,o=n.element.nativeElement;n.disabled?i.disableHandle(o):i.enableHandle(o)})}};e._dragInstances=[],e.\u0275fac=function(i){return new(i||e)(m(oe),m(WR,12),m(V),m(U),m(Xe),m($R,8),m(Ft,8),m(df),m(ft),m(cf,10),m(af,12))},e.\u0275dir=ne({type:e,selectors:[["","cdkDrag",""]],contentQueries:function(i,o,s){if(i&1&&(wn(s,UR,5),wn(s,BR,5),wn(s,cf,5)),i&2){let a;ct(a=lt())&&(o._previewTemplate=a.first),ct(a=lt())&&(o._placeholderTemplate=a.first),ct(a=lt())&&(o._handles=a)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,o){i&2&&St("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[W.None,"cdkDragData","data"],lockAxis:[W.None,"cdkDragLockAxis","lockAxis"],rootElementSelector:[W.None,"cdkDragRootElement","rootElementSelector"],boundaryElement:[W.None,"cdkDragBoundary","boundaryElement"],dragStartDelay:[W.None,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[W.None,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[W.HasDecoratorInputTransform,"cdkDragDisabled","disabled",ut],constrainPosition:[W.None,"cdkDragConstrainPosition","constrainPosition"],previewClass:[W.None,"cdkDragPreviewClass","previewClass"],previewContainer:[W.None,"cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[Kr([{provide:af,useExisting:e}]),rn,He]});let t=e;return t})();function GR(t,e){let{formatString:r,defaultValue:n,timestampSecond:i}=b({formatString:"yyyy-MM-dd HH:mm:ss",defaultValue:new Date(NaN),timestampSecond:!1},typeof e=="string"?{formatString:e}:e);if(t==null)return n;if(t instanceof Date)return t;if(typeof t=="number"||typeof t=="string"&&/^[0-9]+$/.test(t)){let s=+t;return new Date(i?s*1e3:s)}let o=l3(t);return isNaN(o)&&(o=Ta(t,r,new Date)),isNaN(o)?n:o}function Wb(t,e,r){if(t=GR(t),isNaN(t))return"";let n={locale:r};return e==="fn"?q2(t,n):Zo(t,e,n)}var hf=class{get now(){return new Date}get date(){return this.removeTime(this.now)}removeTime(e){return new Date(e.toDateString())}format(e,r="yyyy-MM-dd HH:mm:ss"){return Zo(e,r)}genTick(e){return new Array(e).fill(0).map((r,n)=>n)}getDiffDays(e,r){return Vo(e,typeof r=="number"?pa(this.date,r):r||this.date)}disabledBeforeDate(e){return r=>this.getDiffDays(r,e?.offsetDays)<0}disabledAfterDate(e){return r=>this.getDiffDays(r,e?.offsetDays)>0}baseDisabledTime(e,r){let n=this.genTick(24),i=this.genTick(60);return o=>{let s=o;if(s==null)return{};let a=N2(this.now,r||0),c=a.getHours(),l=a.getMinutes(),u=s.getHours(),d=this.getDiffDays(this.removeTime(s))===0;return{nzDisabledHours:()=>d?e==="before"?n.slice(0,c):n.slice(c+1):[],nzDisabledMinutes:()=>d&&u===c?e==="before"?i.slice(0,l):i.slice(l+1):[],nzDisabledSeconds:()=>{if(d&&u===c&&s.getMinutes()===l){let h=a.getSeconds();return e==="before"?i.slice(0,h):i.slice(h+1)}return[]}}}}disabledBeforeTime(e){return this.baseDisabledTime("before",e?.offsetSeconds)}disabledAfterTime(e){return this.baseDisabledTime("after",e?.offsetSeconds)}},E6e=new hf;function ede(){let t=w(V);if(yc(w(Yt)))return()=>{};let r=t.querySelector("body");r.style.overflow="hidden";let n=!1;return()=>{if(n)return;n=!0;let i=t.querySelector(".preloader");if(i==null)return;let o="preloader-hidden";i.addEventListener("transitionend",()=>{i.className=o}),i.className+=` ${o}-add ${o}-add-active`,r.style.overflow=""}}var O3=new E("alainI18nToken",{providedIn:"root",factory:()=>new ZR(w(Jr))}),KR=(()=>{let e=class e{get change(){return this._change$.asObservable().pipe(ge(n=>n!=null))}get defaultLang(){return this._defaultLang}get currentLang(){return this._currentLang}get data(){return this._data}constructor(n){this._change$=new Re(null),this._currentLang="",this._defaultLang="",this._data={},this.cog=n.merge("themeI18n",{interpolation:["{{","}}"]})}flatData(n,i){let o={};for(let s of Object.keys(n)){let a=n[s];if(typeof a=="object"){let c=this.flatData(a,i.concat(s));Object.keys(c).forEach(l=>o[l]=c[l])}else o[(s?i.concat(s):i).join(".")]=`${a}`}return o}fanyi(n,i){let o=this._data[n]||"";if(!o)return n;if(!i)return o;if(typeof i=="object"){let s=this.cog.interpolation,a=i;Object.keys(a).forEach(c=>o=o.replace(new RegExp(`${s[0]}\\s?${c}\\s?${s[1]}`,"g"),`${a[c]}`))}return(Array.isArray(i)?i:[i]).forEach((s,a)=>o=o.replace(new RegExp(`\\{\\s?${a}\\s?\\}`,"g"),`${s}`)),o}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})(),ZR=(()=>{let e=class e extends KR{use(n,i){this._data=this.flatData(i??{},[]),this._currentLang=n,this._change$.next(n)}getLangs(){return[]}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ls(e)))(o||e)}})(),e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),QR=(()=>{let e=class e{constructor(){this.i18nSrv=w(O3,{optional:!0}),this.aclService=w(o2,{optional:!0}),this._change$=new Re([]),this.data=[],this.openStrictly=!1,this.i18n$=this.i18nSrv?.change.subscribe(()=>this.resume())}get change(){return this._change$.pipe(fr())}get menus(){return this.data}visit(n,i){let o=(s,a,c)=>{for(let l of s)i(l,a,c),l.children&&l.children.length>0?o(l.children,l,c+1):l.children=[]};o(n,null,0)}add(n){this.data=n,this.resume()}fixItem(n){if(n._aclResult=!0,n.link||(n.link=""),n.externalLink||(n.externalLink=""),n.badge&&(n.badgeDot!==!0&&(n.badgeDot=!1),n.badgeStatus||(n.badgeStatus="error")),Array.isArray(n.children)||(n.children=[]),typeof n.icon=="string"){let i="class",o=n.icon;~n.icon.indexOf("anticon-")?(i="icon",o=o.split("-").slice(1).join("-")):/^https?:\/\//.test(n.icon)&&(i="img"),n.icon={type:i,value:o}}n.icon!=null&&(n.icon=b({theme:"outline",spin:!1},n.icon)),n.text=n.i18n&&this.i18nSrv?this.i18nSrv.fanyi(n.i18n):n.text,n.group=n.group!==!1,n._hidden=typeof n.hide>"u"?!1:n.hide,n.disabled=typeof n.disabled>"u"?!1:n.disabled,n._aclResult=n.acl&&this.aclService?this.aclService.can(n.acl):!0,n.open=n.open!=null?n.open:!1}resume(n){let i=1,o=[];this.visit(this.data,(s,a,c)=>{s._id=i++,s._parent=a,s._depth=c,this.fixItem(s),a&&s.shortcut===!0&&a.shortcutRoot!==!0&&o.push(s),n&&n(s,a,c)}),this.loadShortcut(o),this._change$.next(this.data)}loadShortcut(n){if(n.length===0||this.data.length===0)return;let i=this.data[0].children,o=i.findIndex(a=>a.shortcutRoot===!0);if(o===-1){o=i.findIndex(c=>c.link.includes("dashboard")),o=(o!==-1?o:-1)+1;let a={text:"\u5FEB\u6377\u83DC\u5355",i18n:"shortcut",icon:"icon-rocket",children:[]};this.data[0].children.splice(o,0,a)}let s=this.data[0].children[o];s.i18n&&this.i18nSrv&&(s.text=this.i18nSrv.fanyi(s.i18n)),s=Object.assign(s,{shortcutRoot:!0,_id:-1,_parent:null,_depth:1}),s.children=n.map(a=>(a._depth=2,a._parent=s,a))}clear(){this.data=[],this._change$.next(this.data)}find(n){let i=b({recursive:!1,ignoreHide:!1},n);if(i.key!=null)return this.getItem(i.key);let o=i.url,s=null;for(;!s&&o&&(this.visit(i.data??this.data,a=>{if(!(i.ignoreHide&&a.hide)){if(i.cb){let c=i.cb(a);!s&&typeof c=="boolean"&&c&&(s=a)}a.link!=null&&a.link===o&&(s=a)}}),!!i.recursive);)/[?;]/g.test(o)?o=o.split(/[?;]/g)[0]:o=o.split("/").slice(0,-1).join("/");return s}getPathByUrl(n,i=!1){let o=[],s=this.find({url:n,recursive:i});if(!s)return o;do o.splice(0,0,s),s=s._parent;while(s);return o}getItem(n){let i=null;return this.visit(this.data,o=>{i==null&&o.key===n&&(i=o)}),i}setItem(n,i,o){let s=typeof n=="string"?this.getItem(n):n;s!=null&&(Object.keys(i).forEach(a=>{s[a]=i[a]}),this.fixItem(s),o?.emit!==!1&&this._change$.next(this.data))}open(n,i){let o=typeof n=="string"?this.find({key:n}):n;if(o!=null){this.visit(this.menus,s=>{s._selected=!1,this.openStrictly||(s.open=!1)});do o._selected=!0,o.open=!0,o=o._parent;while(o);i?.emit!==!1&&this._change$.next(this.data)}}openAll(n){this.toggleOpen(null,{allStatus:n})}toggleOpen(n,i){let o=typeof n=="string"?this.find({key:n}):n;if(o==null)this.visit(this.menus,s=>{s._selected=!1,s.open=i?.allStatus===!0});else{if(!this.openStrictly){this.visit(this.menus,a=>{a!==o&&(a.open=!1)});let s=o._parent;for(;s;)s.open=!0,s=s._parent}o.open=!o.open}i?.emit!==!1&&this._change$.next(this.data)}ngOnDestroy(){this._change$.unsubscribe(),this.i18n$?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Xb=new E("ALAIN_SETTING_KEYS"),Jb={provide:Xb,useValue:{layout:"layout",user:"user",app:"app"}},tde=(()=>{let e=class e{constructor(){this.KEYS=w(Xb),this.platform=w(Ge),this.notify$=new S,this._app=null,this._user=null,this._layout=null}getData(n){return this.platform.isBrowser&&JSON.parse(localStorage.getItem(n)||"null")||null}setData(n,i){this.platform.isBrowser&&localStorage.setItem(n,JSON.stringify(i))}get layout(){return this._layout||(this._layout=b({fixed:!0,collapsed:!1,boxed:!1,lang:null},this.getData(this.KEYS.layout)),this.setData(this.KEYS.layout,this._layout)),this._layout}get app(){return this._app||(this._app=b({year:new Date().getFullYear()},this.getData(this.KEYS.app)),this.setData(this.KEYS.app,this._app)),this._app}get user(){return this._user||(this._user=b({},this.getData(this.KEYS.user)),this.setData(this.KEYS.user,this._user)),this._user}get notify(){return this.notify$.asObservable()}setLayout(n,i){return typeof n=="string"?this.layout[n]=i:this._layout=n,this.setData(this.KEYS.layout,this._layout),this.notify$.next({type:"layout",name:n,value:i}),!0}getLayout(){return this._layout}setApp(n){this._app=n,this.setData(this.KEYS.app,n),this.notify$.next({type:"app",value:n})}getApp(){return this._app}setUser(n){this._user=n,this.setData(this.KEYS.user,n),this.notify$.next({type:"user",value:n})}getUser(){return this._user}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),I3=6,XR=24,nde=(()=>{let e=class e{constructor(n){if(this.cog=n.merge("themeResponsive",{rules:{1:{xs:24},2:{xs:24,sm:12},3:{xs:24,sm:12,md:8},4:{xs:24,sm:12,md:8,lg:6},5:{xs:24,sm:12,md:8,lg:6,xl:4},6:{xs:24,sm:12,md:8,lg:6,xl:4,xxl:2}}}),Object.keys(this.cog.rules).map(i=>+i).some(i=>i<1||i>I3))throw new Error(`[theme] the responseive rule index value range must be 1-${I3}`)}genCls(n,i=1){let o=b({},this.cog.rules[n>I3?I3:Math.max(n,1)]),s="ant-col",a=XR/i,c=u=>u==null||i<=1||n>=i?u:Math.max(u,n*a),l=[`${s}-xs-${c(o.xs)}`];return o.sm&&l.push(`${s}-sm-${c(o.sm)}`),o.md&&l.push(`${s}-md-${c(o.md)}`),o.lg&&l.push(`${s}-lg-${c(o.lg)}`),o.xl&&l.push(`${s}-xl-${c(o.xl)}`),o.xxl&&l.push(`${s}-xxl-${c(o.xxl)}`),l}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var rde=(()=>{let e=class e{constructor(){this.destroy$=w(js),this._prefix="",this._suffix="",this._separator=" - ",this._reverse=!1,this.DELAY_TIME=25,this.doc=w(V),this.injector=w(Ue),this.title=w(Sc),this.menuSrv=w(QR),this.i18nSrv=w(O3,{optional:!0}),this.default="Not Page Name",this.i18nSrv?.change.pipe(ca()).subscribe(()=>this.setTitle())}set separator(n){this._separator=n}set prefix(n){this._prefix=n}set suffix(n){this._suffix=n}set reverse(n){this._reverse=n}getByElement(){return A("").pipe(ys(this.DELAY_TIME),Z(()=>{let n=(this.selector!=null?this.doc.querySelector(this.selector):null)||this.doc.querySelector(".alain-default__content-title h1")||this.doc.querySelector(".page-header__title");if(n){let i="";return n.childNodes.forEach(o=>{!i&&o.nodeType===3&&(i=o.textContent.trim())}),i||n.firstChild.textContent.trim()}return""}))}getByRoute(){let n=this.injector.get(Ir);for(;n.firstChild;)n=n.firstChild;let i=n.snapshot&&n.snapshot.data||{};return i.titleI18n&&this.i18nSrv&&(i.title=this.i18nSrv.fanyi(i.titleI18n)),Tn(i.title)?i.title:A(i.title)}getByMenu(){let n=this.menuSrv.getPathByUrl(this.injector.get(ir).url);if(!n||n.length<=0)return A("");let i=n[n.length-1],o;return i.i18n&&this.i18nSrv&&(o=this.i18nSrv.fanyi(i.i18n)),A(o||i.text)}setTitle(n){this.tit$?.unsubscribe(),this.tit$=A(n).pipe(Ze(i=>i?A(i):this.getByRoute()),Ze(i=>i?A(i):this.getByMenu()),Ze(i=>i?A(i):this.getByElement()),Z(i=>i||this.default),Z(i=>Array.isArray(i)?i:[i]),ca(this.destroy$)).subscribe(i=>{let o=[];this._prefix&&o.push(this._prefix),o.push(...i.filter(s=>!!s)),this._suffix&&o.push(this._suffix),this._reverse&&(o=o.reverse()),this.title.setTitle(o.join(this._separator))})}setTitleByI18n(n,i){this.setTitle(this.i18nSrv?.fanyi(n,i))}ngOnDestroy(){this.tit$?.unsubscribe()}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ide=(()=>{let e=class e{constructor(){this.i18n=w(O3)}transform(n,i){return this.i18n.fanyi(n,i)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"i18n",type:e,pure:!0,standalone:!0});let t=e;return t})();var ff="MODAL-DRAG",JR=(()=>{let e=class e{constructor(){this.srv=w(Qh),this.drag=w(df),this.doc=w(V)}createDragRef(n,i){let o=this.doc.querySelector(i),s=o.firstChild,a=n.handleCls?o.querySelector(n.handleCls):null;return a&&a.classList.add(`${ff}-HANDLE`),this.drag.createDrag(a??s).withHandles([a??s]).withBoundaryElement(o).withRootElement(s)}create(n,i,o){return o=Q6({size:"lg",exact:!0,includeTabs:!1},o),new Y(s=>{let{size:a,includeTabs:c,modalOptions:l,drag:u,useNzData:d}=o,h=[],f="";a&&(typeof a=="number"?f=`${a}px`:["sm","md","lg","xl"].includes(a)?h.push(`modal-${a}`):f=a),c&&h.push("modal-include-tabs"),l&&l.nzWrapClassName&&(h.push(l.nzWrapClassName),delete l.nzWrapClassName);let p,y=`${ff}-${+new Date}`,v;u!=null&&u!==!1&&(p=b({handleCls:".modal-header, .ant-modal-title"},typeof u=="object"?u:{}),h.push(ff,y));let M=this.srv.create(b({nzWrapClassName:h.join(" "),nzContent:n,nzWidth:f||void 0,nzFooter:null,nzData:i},l));d!==!0&&Object.assign(M.componentInstance,i),M.afterOpen.pipe(ze(1),ge(()=>p!=null)).subscribe(()=>{v=this.createDragRef(p,`.${y}`)}),M.afterClose.pipe(ze(1)).subscribe(P=>{o.exact===!0?P!=null&&s.next(P):s.next(P),s.complete(),v?.dispose()})})}createStatic(n,i,o){let s=b({nzMaskClosable:!1},o&&o.modalOptions);return this.create(n,i,ke(b({},o),{modalOptions:s}))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),eL=(()=>{let e=class e{constructor(){this.srv=w(Jh),this.parentDrawer=w(e,{optional:!0,skipSelf:!0}),this.openDrawersAtThisLevel=[]}get openDrawers(){return this.parentDrawer?this.parentDrawer.openDrawers:this.openDrawersAtThisLevel}create(n,i,o,s){return s=Q6({size:"md",footer:!0,footerHeight:50,exact:!0,drawerOptions:{nzPlacement:"right",nzWrapClassName:""}},s),new Y(a=>{let{size:c,footer:l,footerHeight:u,drawerOptions:d}=s,h={nzContent:i,nzContentParams:o,nzTitle:n};typeof c=="number"?h[d.nzPlacement==="top"||d.nzPlacement==="bottom"?"nzHeight":"nzWidth"]=s.size:d.nzWidth||(h.nzWrapClassName=`${d.nzWrapClassName} drawer-${s.size}`.trim(),delete d.nzWrapClassName),l&&(h.nzBodyStyle={"padding-bottom.px":u+24});let f=this.srv.create(b(b({},h),d));this.openDrawers.push(f);let p=f.afterClose.subscribe(y=>{s.exact===!0?y!=null&&a.next(y):a.next(y),a.complete(),p.unsubscribe(),this.close(f)})})}close(n){let i=this.openDrawers.indexOf(n);i!==-1&&this.openDrawers.splice(i,1)}closeAll(){let n=this.openDrawers.length;for(;n--;)this.openDrawers[n].close()}static(n,i,o,s){let a=b({nzMaskClosable:!1},s&&s.drawerOptions);return this.create(n,i,o,ke(b({},s),{drawerOptions:a}))}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),tL=(()=>{let e=class e{constructor(n){this.http=w(Cc),this.lc=0,this.cog=n.merge("themeHttp",{nullValueHandling:"include",dateValueHandling:"timestamp"})}get loading(){return this.lc>0}get loadingCount(){return this.lc}parseParams(n){let i={};if(n instanceof rr)return n;let{nullValueHandling:o,dateValueHandling:s}=this.cog;return Object.keys(n).forEach(a=>{let c=n[a];o==="ignore"&&c==null||(c instanceof Date&&(s==="timestamp"||s==="timestampSecond")&&(c=s==="timestamp"?c.valueOf():Math.trunc(c.valueOf()/1e3)),i[a]=c)}),new rr({fromObject:i})}appliedUrl(n,i){if(!i)return n;n+=~n.indexOf("?")?"":"?";let o=[];return Object.keys(i).forEach(s=>{o.push(`${s}=${i[s]}`)}),n+o.join("&")}setCount(n){Promise.resolve(null).then(()=>this.lc=n<=0?0:n)}push(){this.setCount(++this.lc)}pop(){this.setCount(--this.lc)}cleanLoading(){this.setCount(0)}get(n,i,o={}){return this.request("GET",n,b({params:i},o))}post(n,i,o,s={}){return this.request("POST",n,b({body:i,params:o},s))}delete(n,i,o={}){return this.request("DELETE",n,b({params:i},o))}jsonp(n,i,o="JSONP_CALLBACK"){return A(null).pipe(ys(0),Fe(()=>this.push()),Ze(()=>this.http.jsonp(this.appliedUrl(n,i),o)),un(()=>this.pop()))}patch(n,i,o,s={}){return this.request("PATCH",n,b({body:i,params:o},s))}put(n,i,o,s={}){return this.request("PUT",n,b({body:i,params:o},s))}form(n,i,o,s={}){return this.request("POST",n,ke(b({body:i,params:o},s),{headers:{"content-type":"application/x-www-form-urlencoded"}}))}request(n,i,o={}){return o.params&&(o.params=this.parseParams(o.params)),A(null).pipe(ys(0),Fe(()=>this.push()),Ze(()=>this.http.request(n,i,o)),un(()=>this.pop()))}};e.\u0275fac=function(i){return new(i||e)(g(Jr))},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var nL="__api_params";function k3(t,e=nL){let r=t[e];return typeof r>"u"&&(r=t[e]={}),r}function Tl(t){return function(e){return function(r,n,i){let o=k3(k3(r),n),s=o[t];typeof s>"u"&&(s=o[t]=[]),s.push({key:e,index:i})}}}var ode=Tl("path"),sde=Tl("query"),ade=Tl("body")(),cde=Tl("headers"),lde=Tl("payload")();function Gb(t,e,r){if(!(!t[e]||!Array.isArray(t[e])||t[e].length<=0))return r[t[e][0].index]}function rL(t,e){return Array.isArray(t)||Array.isArray(e)?Object.assign([],t,e):b(b({},t),e)}function ui(t){return function(e="",r){return(n,i,o)=>(o.value=function(...s){r=r||{};let a=this.injector,c=a.get(tL,null);if(c==null)throw new TypeError("Not found '_HttpClient', You can import 'AlainThemeModule' && 'HttpClientModule' in your root module.");let l=k3(this),u=k3(l,i),d=e||"";if(d=[l.baseUrl||"",d.startsWith("/")?d.substring(1):d].join("/"),d.length>1&&d.endsWith("/")&&(d=d.substring(0,d.length-1)),r.acl){let v=a.get(o2,null);if(v&&!v.can(r.acl))return vi(()=>({url:d,status:401,statusText:"From Http Decorator"}));delete r.acl}d=d.replace(/::/g,"^^"),(u.path||[]).filter(v=>typeof s[v.index]<"u").forEach(v=>{d=d.replace(new RegExp(`:${v.key}`,"g"),encodeURIComponent(s[v.index]))}),d=d.replace(/\^\^/g,":");let h=(u.query||[]).reduce((v,M)=>(v[M.key]=s[M.index],v),{}),f=(u.headers||[]).reduce((v,M)=>(v[M.key]=s[M.index],v),{});t==="FORM"&&(f["content-type"]="application/x-www-form-urlencoded");let p=Gb(u,"payload",s),y=["POST","PUT","PATCH","DELETE"].some(v=>v===t);return c.request(t,d,b({body:y?rL(Gb(u,"body",s),p):null,params:y?h:b(b({},h),p),headers:b(b({},l.baseHeaders),f)},r))},o)}}var ude=ui("OPTIONS"),dde=ui("GET"),hde=ui("POST"),fde=ui("DELETE"),pde=ui("PUT"),mde=ui("HEAD"),gde=ui("PATCH"),vde=ui("JSONP"),yde=ui("FORM"),wde=new Qs(()=>!1),bde=new Qs(()=>!1),_de=new Qs(()=>!1),A3=new E("delon-locale"),P3={abbr:"zh-CN",exception:{403:"\u62B1\u6B49\uFF0C\u4F60\u65E0\u6743\u8BBF\u95EE\u8BE5\u9875\u9762",404:"\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728",500:"\u62B1\u6B49\uFF0C\u670D\u52A1\u5668\u51FA\u9519\u4E86",backToHome:"\u8FD4\u56DE\u9996\u9875"},noticeIcon:{emptyText:"\u6682\u65E0\u6570\u636E",clearText:"\u6E05\u7A7A"},reuseTab:{close:"\u5173\u95ED\u6807\u7B7E",closeOther:"\u5173\u95ED\u5176\u5B83\u6807\u7B7E",closeRight:"\u5173\u95ED\u53F3\u4FA7\u6807\u7B7E",refresh:"\u5237\u65B0"},tagSelect:{expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"},miniProgress:{target:"\u76EE\u6807\u503C\uFF1A"},st:{total:"\u5171 {{total}} \u6761",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E"},sf:{submit:"\u63D0\u4EA4",reset:"\u91CD\u7F6E",search:"\u641C\u7D22",edit:"\u4FDD\u5B58",addText:"\u6DFB\u52A0",removeText:"\u79FB\u9664",checkAllText:"\u5168\u9009",error:{"false schema":"\u5E03\u5C14\u6A21\u5F0F\u51FA\u9519",$ref:"\u65E0\u6CD5\u627E\u5230\u5F15\u7528{ref}",additionalItems:"\u4E0D\u5141\u8BB8\u8D85\u8FC7{limit}\u4E2A\u5143\u7D20",additionalProperties:"\u4E0D\u5141\u8BB8\u6709\u989D\u5916\u7684\u5C5E\u6027",anyOf:"\u6570\u636E\u5E94\u4E3A anyOf \u6240\u6307\u5B9A\u7684\u5176\u4E2D\u4E00\u4E2A",dependencies:"\u5E94\u5F53\u62E5\u6709\u5C5E\u6027{property}\u7684\u4F9D\u8D56\u5C5E\u6027{deps}",enum:"\u5E94\u5F53\u662F\u9884\u8BBE\u5B9A\u7684\u679A\u4E3E\u503C\u4E4B\u4E00",format:"\u683C\u5F0F\u4E0D\u6B63\u786E",type:"\u7C7B\u578B\u5E94\u5F53\u662F {type}",required:"\u5FC5\u586B\u9879",maxLength:"\u81F3\u591A {limit} \u4E2A\u5B57\u7B26",minLength:"\u81F3\u5C11 {limit} \u4E2A\u5B57\u7B26\u4EE5\u4E0A",minimum:"\u5FC5\u987B {comparison}{limit}",formatMinimum:"\u5FC5\u987B {comparison}{limit}",maximum:"\u5FC5\u987B {comparison}{limit}",formatMaximum:"\u5FC5\u987B {comparison}{limit}",maxItems:"\u4E0D\u5E94\u591A\u4E8E {limit} \u4E2A\u9879",minItems:"\u4E0D\u5E94\u5C11\u4E8E {limit} \u4E2A\u9879",maxProperties:"\u4E0D\u5E94\u591A\u4E8E {limit} \u4E2A\u5C5E\u6027",minProperties:"\u4E0D\u5E94\u5C11\u4E8E {limit} \u4E2A\u5C5E\u6027",multipleOf:"\u5E94\u5F53\u662F {multipleOf} \u7684\u6574\u6570\u500D",not:'\u4E0D\u5E94\u5F53\u5339\u914D "not" schema',oneOf:'\u53EA\u80FD\u5339\u914D\u4E00\u4E2A "oneOf" \u4E2D\u7684 schema',pattern:"\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E",uniqueItems:"\u4E0D\u5E94\u5F53\u542B\u6709\u91CD\u590D\u9879 (\u7B2C {j} \u9879\u4E0E\u7B2C {i} \u9879\u662F\u91CD\u590D\u7684)",custom:"\u683C\u5F0F\u4E0D\u6B63\u786E",propertyNames:'\u5C5E\u6027\u540D "{propertyName}" \u65E0\u6548',patternRequired:"\u5E94\u5F53\u6709\u5C5E\u6027\u5339\u914D\u6A21\u5F0F {missingPattern}",switch:'\u7531\u4E8E {caseIndex} \u5931\u8D25\uFF0C\u672A\u901A\u8FC7 "switch" \u6821\u9A8C',const:"\u5E94\u5F53\u7B49\u4E8E\u5E38\u91CF",contains:"\u5E94\u5F53\u5305\u542B\u4E00\u4E2A\u6709\u6548\u9879",formatExclusiveMaximum:"formatExclusiveMaximum \u5E94\u5F53\u662F\u5E03\u5C14\u503C",formatExclusiveMinimum:"formatExclusiveMinimum \u5E94\u5F53\u662F\u5E03\u5C14\u503C",if:'\u5E94\u5F53\u5339\u914D\u6A21\u5F0F "{failingKeyword}"'}},onboarding:{skip:"\u8DF3\u8FC7",prev:"\u4E0A\u4E00\u9879",next:"\u4E0B\u4E00\u9879",done:"\u5B8C\u6210"}},gf=(()=>{let e=class e{constructor(n){this._locale=P3,this.change$=new Re(this._locale),this.setLocale(n||P3)}get change(){return this.change$.asObservable()}setLocale(n){this._locale&&this._locale.abbr===n.abbr||(this._locale=n,this.change$.next(n))}get locale(){return this._locale}getData(n){return this._locale[n]||{}}};e.\u0275fac=function(i){return new(i||e)(g(A3))},e.\u0275prov=C({token:e,factory:e.\u0275fac});let t=e;return t})();function iL(t,e){return t||new gf(e)}var e_={provide:gf,useFactory:iL,deps:[[new $r,new Hs,gf],A3]},oL=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[{provide:A3,useValue:P3},e_]});let t=e;return t})();var Cde=(()=>{let e=class e{constructor(){this.nzI18n=w($i),this.defFormat=w(Jr).get("themePipe")?.dateFormat??"yyyy-MM-dd HH:mm"}transform(n,i){return Wb(n,i??this.defFormat,this.nzI18n.getDateLocale())}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"_date",type:e,pure:!0,standalone:!0});let t=e;return t})();var Kb='',Zb='',pf='class="yn__yes"',mf='class="yn__no"';function sL(t,e){let r="",{yes:n,no:i,mode:o}=b({},e);switch(n=n||"\u662F",i=i||"\u5426",o){case"full":r=t?`${Kb}${n}`:`${Zb}${i}`;break;case"text":r=t?`${n}`:`${i}`;break;default:r=t?`${Kb}`:`${Zb}`;break}return r}var Mde=(()=>{let e=class e{constructor(){this.dom=w(Mo)}transform(n,i,o,s,a=!0){let c=sL(n,{yes:i,no:o,mode:s});return a?this.dom.bypassSecurityTrustHtml(c):c}};e.\u0275fac=function(i){return new(i||e)},e.\u0275pipe=en({name:"yn",type:e,pure:!0,standalone:!0});let t=e;return t})();var Qb=[JR,eL];var aL=[Wd,sl,Kd,Gd],Dde=(()=>{let e=class e{constructor(n){n.addIcon(...aL)}static forRoot(){return{ngModule:e,providers:Qb}}static forChild(){return{ngModule:e,providers:Qb}}};e.\u0275fac=function(i){return new(i||e)(g(fa))},e.\u0275mod=te({type:e}),e.\u0275inj=ee({providers:[Jb],imports:[vc,l9,Xw,Pw,oL]});let t=e;return t})();function xde(t){let e=t?.defaultLang,r=[{provide:X6,useValue:t?.config},{provide:A3,useValue:e?.delon??P3},e_,J8([Ib,Db]),Jb];e&&(eg(e.ng,e.abbr),r.push({provide:Ii,useValue:e.abbr},kw(e.zorro),{provide:Sh,useValue:e.date}));let n=t?.i18nClass;n&&r.push({provide:O3,useClass:n,multi:!1});let i=[Wd,sl,Kd,Gd,uy,ly,...t.icons??[]];return r.push({provide:Di,multi:!0,useValue:()=>{w(fa,{optional:!0})?.addIcon(...i)}}),Wt(r)}var Sde=new fo("17.1.0");function cL(t,e){if(t&1&&(se(0,"div",4),et(1,"div",5),le()),t&2){let r=e.$implicit;I("ngClass",r)}}function lL(t,e){if(t&1&&(se(0,"div",2),Q(1,cL,2,1,"div",3),le()),t&2){let r=e.$implicit;k(),I("ngForOf",r)}}function uL(t,e){t&1&&wo(0)}var n_=["*"];function dL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzTitle)}}function hL(t,e){if(t&1&&(se(0,"div",11),Q(1,dL,2,1,"ng-container",12),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzTitle)}}function fL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzExtra)}}function pL(t,e){if(t&1&&(se(0,"div",13),Q(1,fL,2,1,"ng-container",12),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzExtra)}}function mL(t,e){}function gL(t,e){if(t&1&&(tt(0),Q(1,mL,0,0,"ng-template",14),nt()),t&2){let r=G(2);k(),I("ngTemplateOutlet",r.listOfNzCardTabComponent.template)}}function vL(t,e){if(t&1&&(se(0,"div",6)(1,"div",7),Q(2,hL,2,1,"div",8)(3,pL,2,1,"div",9),le(),Q(4,gL,2,1,"ng-container",10),le()),t&2){let r=G();k(2),I("ngIf",r.nzTitle),k(),I("ngIf",r.nzExtra),k(),I("ngIf",r.listOfNzCardTabComponent)}}function yL(t,e){}function wL(t,e){if(t&1&&(se(0,"div",15),Q(1,yL,0,0,"ng-template",14),le()),t&2){let r=G();k(),I("ngTemplateOutlet",r.nzCover)}}function bL(t,e){t&1&&(tt(0),wo(1),nt())}function _L(t,e){t&1&&et(0,"nz-card-loading")}function CL(t,e){}function ML(t,e){if(t&1&&(se(0,"li")(1,"span"),Q(2,CL,0,0,"ng-template",14),le()()),t&2){let r=e.$implicit,n=G(2);Gt("width",100/n.nzActions.length,"%"),k(2),I("ngTemplateOutlet",r)}}function DL(t,e){if(t&1&&(se(0,"ul",16),Q(1,ML,3,3,"li",17),le()),t&2){let r=G();k(),I("ngForOf",r.nzActions)}}function xL(t,e){}function SL(t,e){if(t&1&&(se(0,"div",2),Q(1,xL,0,0,"ng-template",3),le()),t&2){let r=G();k(),I("ngTemplateOutlet",r.nzAvatar)}}function TL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzTitle)}}function EL(t,e){if(t&1&&(se(0,"div",7),Q(1,TL,2,1,"ng-container",8),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzTitle)}}function zL(t,e){if(t&1&&(tt(0),er(1),nt()),t&2){let r=G(3);k(),qs(r.nzDescription)}}function IL(t,e){if(t&1&&(se(0,"div",9),Q(1,zL,2,1,"ng-container",8),le()),t&2){let r=G(2);k(),I("nzStringTemplateOutlet",r.nzDescription)}}function kL(t,e){if(t&1&&(se(0,"div",4),Q(1,EL,2,1,"div",5)(2,IL,2,1,"div",6),le()),t&2){let r=G();k(),I("ngIf",r.nzTitle),k(),I("ngIf",r.nzDescription)}}var PL=(()=>{let e=class e{constructor(){this.nzHoverable=!0}};e.\u0275fac=function(i){return new(i||e)},e.\u0275dir=ne({type:e,selectors:[["","nz-card-grid",""]],hostAttrs:[1,"ant-card-grid"],hostVars:2,hostBindings:function(i,o){i&2&&St("ant-card-hoverable",o.nzHoverable)},inputs:{nzHoverable:"nzHoverable"},exportAs:["nzCardGrid"],standalone:!0});let t=e;return je([Je()],t.prototype,"nzHoverable",void 0),t})(),OL=(()=>{let e=class e{constructor(){this.listOfLoading=[["ant-col-22"],["ant-col-8","ant-col-15"],["ant-col-6","ant-col-18"],["ant-col-13","ant-col-9"],["ant-col-4","ant-col-3","ant-col-16"],["ant-col-8","ant-col-6","ant-col-8"]]}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["nz-card-loading"]],hostAttrs:[1,"ant-card-loading-content"],exportAs:["nzCardLoading"],standalone:!0,features:[_t],decls:2,vars:1,consts:[[1,"ant-card-loading-content"],["class","ant-row","style","margin-left: -4px; margin-right: -4px;",4,"ngFor","ngForOf"],[1,"ant-row",2,"margin-left","-4px","margin-right","-4px"],["style","padding-left: 4px; padding-right: 4px;",3,"ngClass",4,"ngFor","ngForOf"],[2,"padding-left","4px","padding-right","4px",3,"ngClass"],[1,"ant-card-loading-block"]],template:function(i,o){i&1&&(se(0,"div",0),Q(1,lL,2,1,"div",1),le()),i&2&&(k(),I("ngForOf",o.listOfLoading))},dependencies:[mc,pc],encapsulation:2,changeDetection:0});let t=e;return t})(),AL=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["nz-card-tab"]],viewQuery:function(i,o){if(i&1&&On(Me,7),i&2){let s;ct(s=lt())&&(o.template=s.first)}},exportAs:["nzCardTab"],standalone:!0,features:[_t],ngContentSelectors:n_,decls:1,vars:0,template:function(i,o){i&1&&(yo(),Q(0,uL,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let t=e;return t})(),t_="card",FL=(()=>{let e=class e{constructor(n,i,o){this.nzConfigService=n,this.cdr=i,this.directionality=o,this._nzModuleName=t_,this.nzBordered=!0,this.nzBorderless=!1,this.nzLoading=!1,this.nzHoverable=!1,this.nzBodyStyle=null,this.nzActions=[],this.nzType=null,this.nzSize="default",this.dir="ltr",this.destroy$=new S,this.nzConfigService.getConfigChangeEventForComponent(t_).pipe(ce(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.directionality.change?.pipe(ce(this.destroy$)).subscribe(n=>{this.dir=n,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(m(Rn),m(ft),m(Ft,8))},e.\u0275cmp=bt({type:e,selectors:[["nz-card"]],contentQueries:function(i,o,s){if(i&1&&(wn(s,AL,5),wn(s,PL,4)),i&2){let a;ct(a=lt())&&(o.listOfNzCardTabComponent=a.first),ct(a=lt())&&(o.listOfNzCardGridDirective=a)}},hostAttrs:[1,"ant-card"],hostVars:16,hostBindings:function(i,o){i&2&&St("ant-card-loading",o.nzLoading)("ant-card-bordered",o.nzBorderless===!1&&o.nzBordered)("ant-card-hoverable",o.nzHoverable)("ant-card-small",o.nzSize==="small")("ant-card-contain-grid",o.listOfNzCardGridDirective&&o.listOfNzCardGridDirective.length)("ant-card-type-inner",o.nzType==="inner")("ant-card-contain-tabs",!!o.listOfNzCardTabComponent)("ant-card-rtl",o.dir==="rtl")},inputs:{nzBordered:"nzBordered",nzBorderless:"nzBorderless",nzLoading:"nzLoading",nzHoverable:"nzHoverable",nzBodyStyle:"nzBodyStyle",nzCover:"nzCover",nzActions:"nzActions",nzType:"nzType",nzSize:"nzSize",nzTitle:"nzTitle",nzExtra:"nzExtra"},exportAs:["nzCard"],standalone:!0,features:[_t],ngContentSelectors:n_,decls:7,vars:6,consts:[["class","ant-card-head",4,"ngIf"],["class","ant-card-cover",4,"ngIf"],[1,"ant-card-body",3,"ngStyle"],[4,"ngIf","ngIfElse"],["loadingTemplate",""],["class","ant-card-actions",4,"ngIf"],[1,"ant-card-head"],[1,"ant-card-head-wrapper"],["class","ant-card-head-title",4,"ngIf"],["class","ant-card-extra",4,"ngIf"],[4,"ngIf"],[1,"ant-card-head-title"],[4,"nzStringTemplateOutlet"],[1,"ant-card-extra"],[3,"ngTemplateOutlet"],[1,"ant-card-cover"],[1,"ant-card-actions"],[3,"width",4,"ngFor","ngForOf"]],template:function(i,o){if(i&1&&(yo(),Q(0,vL,5,3,"div",0)(1,wL,2,1,"div",1),se(2,"div",2),Q(3,bL,2,0,"ng-container",3)(4,_L,1,0,"ng-template",null,4,bo),le(),Q(6,DL,2,1,"ul",5)),i&2){let s=$s(5);I("ngIf",o.nzTitle||o.nzExtra||o.listOfNzCardTabComponent),k(),I("ngIf",o.nzCover),k(),I("ngStyle",o.nzBodyStyle),k(),I("ngIf",!o.nzLoading)("ngIfElse",s),k(3),I("ngIf",o.nzActions.length)}},dependencies:[nr,Nr,Fr,gc,_o,OL,mc],encapsulation:2,changeDetection:0});let t=e;return je([Ln(),Je()],t.prototype,"nzBordered",void 0),je([Ln(),Je()],t.prototype,"nzBorderless",void 0),je([Je()],t.prototype,"nzLoading",void 0),je([Ln(),Je()],t.prototype,"nzHoverable",void 0),je([Ln()],t.prototype,"nzSize",void 0),t})(),NL=(()=>{let e=class e{constructor(){this.nzTitle=null,this.nzDescription=null,this.nzAvatar=null}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=bt({type:e,selectors:[["nz-card-meta"]],hostAttrs:[1,"ant-card-meta"],inputs:{nzTitle:"nzTitle",nzDescription:"nzDescription",nzAvatar:"nzAvatar"},exportAs:["nzCardMeta"],standalone:!0,features:[_t],decls:2,vars:2,consts:[["class","ant-card-meta-avatar",4,"ngIf"],["class","ant-card-meta-detail",4,"ngIf"],[1,"ant-card-meta-avatar"],[3,"ngTemplateOutlet"],[1,"ant-card-meta-detail"],["class","ant-card-meta-title",4,"ngIf"],["class","ant-card-meta-description",4,"ngIf"],[1,"ant-card-meta-title"],[4,"nzStringTemplateOutlet"],[1,"ant-card-meta-description"]],template:function(i,o){i&1&&Q(0,SL,2,1,"div",0)(1,kL,3,2,"div",1),i&2&&(I("ngIf",o.nzAvatar),k(),I("ngIf",o.nzTitle||o.nzDescription))},dependencies:[nr,gc,Nr,Fr],encapsulation:2,changeDetection:0});let t=e;return t})(),Gde=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=te({type:e}),e.\u0275inj=ee({imports:[FL,NL,Ro]});let t=e;return t})();function ehe(t){return new Promise(e=>{let r=null;try{r=document.createElement("textarea"),r.style.height="0px",r.style.opacity="0",r.style.width="0px",document.body.appendChild(r),r.value=t,r.select(),document.execCommand("copy"),e(t)}finally{r&&r.parentNode&&r.parentNode.removeChild(r)}})}function the(t){let e=t.childNodes;for(let r=0;r{let e=class e{constructor(){this._doc=w(V),this.platform=w(Ge)}_getDoc(){return this._doc||document}_getWin(){return this._getDoc().defaultView||window}getScrollPosition(n){if(!this.platform.isBrowser)return[0,0];let i=this._getWin();return n&&n!==i?[n.scrollLeft,n.scrollTop]:[i.scrollX,i.scrollY]}scrollToPosition(n,i){this.platform.isBrowser&&(n||this._getWin()).scrollTo(i[0],i[1])}scrollToElement(n,i=0){if(!this.platform.isBrowser)return;n||(n=this._getDoc().body),n.scrollIntoView();let o=this._getWin();o&&o.scrollBy&&(o.scrollBy(0,n.getBoundingClientRect().top-i),o.scrollY<20&&o.scrollBy(0,-o.scrollY))}scrollToTop(n=0){this.platform.isBrowser&&this.scrollToElement(this._getDoc().body,n)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function RL(t,e,r){Object.keys(e).forEach(n=>r.removeClass(t,n))}function LL(t,e,r){for(let n in e)e[n]&&r.addClass(t,n)}function rhe(t,e,r,n=!1){n===!0?e.removeAttribute(t,"class"):RL(t,r,e),r=b({},r),LL(t,r,e)}export{b as a,ke as b,HL as c,ss as d,VL as e,l_ as f,YL as g,u_ as h,jL as i,L3 as j,BL as k,ye as l,Y as m,ds as n,S as o,Re as p,fi as q,e0 as r,Ha as s,Dt as t,je as u,Le as v,A as w,vi as x,Tn as y,k_ as z,Z as A,Ji as B,Ke as C,gs as D,V_ as E,Kn as F,Hr as G,n0 as H,vs as I,ge as J,G_ as K,K_ as L,Va as M,En as N,Q_ as O,wi as P,ze as Q,eo as R,ys as S,ws as T,c5 as U,un as V,hr as W,eC as X,tC as Y,fr as Z,Ya as _,Rt as $,Ze as aa,ce as ba,Fe as ca,nC as da,rC as ea,z as fa,R1 as ga,C as ha,ee as ia,E as ja,g as ka,w as la,W as ma,bt as na,te as oa,ne as pa,en as qa,He as ra,pn as sa,mn as ta,kG as ua,PG as va,Ls as wa,Zp as xa,Di as ya,Wt as za,Ue as Aa,Yt as Ba,gn as Ca,OG as Da,AG as Ea,Dr as Fa,RD as Ga,oe as Ha,Jn as Ia,st as Ja,k as Ka,m as La,ft as Ma,js as Na,re as Oa,U as Pa,nn as Qa,rn as Ra,Xe as Sa,Q as Ta,kn as Ua,I as Va,Gt as Wa,St as Xa,RG as Ya,Du as Za,y7 as _a,LG as $a,HG as ab,VG as bb,YG as cb,jG as db,BG as eb,UG as fb,se as gb,le as hb,et as ib,tt as jb,nt as kb,xu as lb,Pn as mb,ZS as nb,l4 as ob,Us as pb,Pt as qb,u4 as rb,G as sb,yo as tb,wo as ub,oT as vb,_7 as wb,Ns as xb,Me as yb,wn as zb,On as Ab,ct as Bb,lt as Cb,$s as Db,er as Eb,qs as Fb,zi as Gb,yT as Hb,Kr as Ib,_t as Jb,qG as Kb,WG as Lb,T7 as Mb,GG as Nb,Tu as Ob,Eu as Pb,KG as Qb,ZG as Rb,bo as Sb,fo as Tb,g4 as Ub,Ii as Vb,P7 as Wb,v4 as Xb,ut as Yb,VT as Zb,Gs as _b,V as $b,vE as ac,pc as bc,mc as cc,nr as dc,tg as ec,fK as fc,pK as gc,_o as hc,gc as ic,mK as jc,gK as kc,vK as lc,yK as mc,vc as nc,Zu as oc,rr as pc,Qs as qc,t6 as rc,_c as sc,O4 as tc,Cc as uc,kK as vc,PK as wc,KK as xc,Mo as yc,ve as zc,ia as Ac,zr as Bc,Fi as Cc,Fc as Dc,x6 as Ec,S6 as Fc,Ir as Gc,Bz as Hc,qc as Ic,ir as Jc,fZ as Kc,pZ as Lc,mZ as Mc,gZ as Nc,ik as Oc,ok as Pc,l9 as Qc,DZ as Rc,fk as Sc,Z6 as Tc,Q6 as Uc,xZ as Vc,Jr as Wc,ca as Xc,o2 as Yc,ZZ as Zc,QZ as _c,Ge as $c,yJ as ad,Fo as bd,Ft as cd,Ro as dd,Ck as ed,Mk as fd,pQ as gd,mQ as hd,O9 as id,zk as jd,Cn as kd,ti as ld,rt as md,TQ as nd,Mn as od,Pk as pd,EQ as qd,zQ as rd,IQ as sd,Ok as td,Ak as ud,Zc as vd,kQ as wd,Je as xd,PQ as yd,OQ as zd,AQ as Ad,NQ as Bd,RQ as Cd,LQ as Dd,HQ as Ed,VQ as Fd,XQ as Gd,Rn as Hd,Ln as Id,x0e as Jd,es as Kd,YF as Ld,S0e as Md,kh as Nd,za as Od,v8e as Pd,ib as Qd,tN as Rd,cb as Sd,U8e as Td,RN as Ud,$8e as Vd,q8e as Wd,y6e as Xd,w6e as Yd,si as Zd,ai as _d,Ar as $d,ts as ae,qi as be,Uw as ce,Wi as de,ci as ee,GF as fe,Q0e as ge,Xw as he,q9 as ie,fd as je,Yi as ke,pd as le,md as me,eX as ne,tX as oe,gX as pe,QX as qe,XX as re,JX as se,eJ as te,tJ as ue,nJ as ve,rJ as we,iJ as xe,oJ as ye,sJ as ze,aJ as Ae,cJ as Be,lJ as Ce,uJ as De,dJ as Ee,ii as Fe,No as Ge,eh as He,nh as Ie,Iy as Je,F2 as Ke,rh as Le,Fr as Me,Nr as Ne,s8e as Oe,nb as Pe,_ as Qe,ga as Re,Sn as Se,vl as Te,Go as Ue,Ko as Ve,dh as We,Zo as Xe,H3e as Ye,V3e as Ze,Y3e as _e,_l as $e,EF as af,$i as bf,t0e as cf,Pw as df,Aw as ef,uR as ff,Qh as gf,Db as hf,Sb as if,PR as jf,zb as kf,Ib as lf,GR as mf,Wb as nf,ede as of,O3 as pf,QR as qf,tde as rf,nde as sf,rde as tf,ide as uf,JR as vf,eL as wf,tL as xf,bde as yf,P3 as zf,gf as Af,oL as Bf,Cde as Cf,sL as Df,Mde as Ef,Dde as Ff,xde as Gf,Sde as Hf,ehe as If,the as Jf,nhe as Kf,rhe as Lf,FL as Mf,Gde as Nf}; diff --git a/dist/himp.platform.angular/browser/index.html b/dist/himp.platform.angular/browser/index.html index 1a6956d..ae07177 100644 --- a/dist/himp.platform.angular/browser/index.html +++ b/dist/himp.platform.angular/browser/index.html @@ -103,7 +103,7 @@ } + @@ -113,6 +113,6 @@ ● - + \ No newline at end of file diff --git a/dist/himp.platform.angular/browser/main-XJNA5CYE.js b/dist/himp.platform.angular/browser/main-3JB53C7N.js similarity index 68% rename from dist/himp.platform.angular/browser/main-XJNA5CYE.js rename to dist/himp.platform.angular/browser/main-3JB53C7N.js index af9aa0a..ee30e6c 100644 --- a/dist/himp.platform.angular/browser/main-XJNA5CYE.js +++ b/dist/himp.platform.angular/browser/main-3JB53C7N.js @@ -1,2 +1,2 @@ -import{a as Uo,b as se}from"./chunk-4YNSMQCN.js";import{a as ne,b as _t,c as Io,d as ko,f as Fo,g as ht,h as Mt,i as qo}from"./chunk-T3OMXG5T.js";import{$ as ct,A as S,Aa as jo,Ba as H,C as y,Fa as L,Ha as W,Ka as G,La as Wo,M as Eo,O as ve,Oa as B,P as ze,Q as Ao,R as Ro,Ra as $,S as Ce,T as Vo,Ta as X,U as Ne,V as M,Wa as q,_ as T,_a as U,aa as _e,ab as Q,bb as Go,ca as O,cb as v,e as x,eb as Y,gb as Z,ib as J,jb as gt,ka as I,mb as Bo,nb as $o,oa as k,ob as Xo,qa as F,sa as E,ta as A,u as P,v as D,va as R,xa as V,ya as Ho,za as Lo}from"./chunk-XXGLJ63T.js";import{a as Do,d as So,e as yo,f as To,g as Oo}from"./chunk-ZRW2SW2G.js";import{Ab as ce,Ae as co,Ba as Dt,Bb as me,Bc as Xt,Be as go,Cb as g,Cc as qt,Ce as ho,Db as st,De as re,Ea as vt,Eb as N,Ed as Kt,Ee as h,Ef as xo,Fa as lt,Fb as It,Fc as pt,Fe as ut,Ff as Po,Ha as St,Hb as c,Hc as ge,Ia as l,Ib as dt,Ja as ae,Jc as Ut,Je as _,Kc as Qt,Lc as Yt,Lf as j,Ma as yt,Mb as kt,Mc as Zt,Nc as Jt,Ob as Ft,Oe as Mo,Qb as Et,Qe as Nt,Ra as le,Rb as At,Re as ft,Se as he,Ta as d,Te as Me,Ue as vo,Va as ot,Xa as mt,_e as zo,ac as Rt,bc as Vt,eb as a,ef as Co,fa as xt,fb as m,fc as Ht,ff as w,gb as s,hb as it,ia as Pt,ib as rt,ic as Lt,ja as u,jf as b,kb as nt,la as f,lc as oe,mf as No,ne as eo,ob as z,oe as to,pe as oo,pf as _o,qa as et,qb as C,qe as io,ra as tt,rb as Tt,re as ro,rf as wo,sb as Ot,sc as jt,se as no,tb as zt,tc as Wt,te as ao,tf as ee,ub as Ct,uc as Gt,ue as lo,vc as Bt,ve as mo,vf as te,we as so,xe as po,xf as bo,yb as ue,ye as uo,zb as fe,zc as $t,ze as fo}from"./chunk-TV7RDLL7.js";var Qo=new At("17.1.0");var Yo=(()=>{let t=class t{constructor(e,o){this.router=u(ge),this.titleSrv=u(wo),this.modalSrv=u(Co),this.donePreloader=No(),o.setAttribute(e.nativeElement,"ng-alain-version",Po.full),o.setAttribute(e.nativeElement,"ng-zorro-version",Qo.full)}ngOnInit(){let e=!1;this.router.events.subscribe(o=>{o instanceof qt&&(e=!0),e&&o instanceof Xt&&this.modalSrv.confirm({nzTitle:"\u63D0\u9192",nzContent:ne.production?"\u5E94\u7528\u53EF\u80FD\u5DF2\u53D1\u5E03\u65B0\u7248\u672C\uFF0C\u8BF7\u70B9\u51FB\u5237\u65B0\u624D\u80FD\u751F\u6548\u3002":`\u65E0\u6CD5\u52A0\u8F7D\u8DEF\u7531\uFF1A${o.url}`,nzCancelDisabled:!1,nzOkText:"\u5237\u65B0",nzCancelText:"\u5FFD\u7565",nzOnOk:()=>location.reload()}),o instanceof $t&&(this.donePreloader(),this.titleSrv.setTitle(),this.modalSrv.closeAll())})}};t.\u0275fac=function(o){return new(o||t)(ae(lt),ae(St))},t.\u0275cmp=f({type:t,selectors:[["app-root"]],standalone:!0,features:[c],decls:1,vars:0,template:function(o,r){o&1&&s(0,"router-outlet")},dependencies:[pt],encapsulation:2});let i=t;return i})();function xi(i){let t=i;return 5}var Zo=["zh",[["\u4E0A\u5348","\u4E0B\u5348"],void 0,void 0],void 0,[["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]],void 0,[["\u516C\u5143\u524D","\u516C\u5143"],void 0,void 0],0,[6,0],["y/M/d","y\u5E74M\u6708d\u65E5",void 0,"y\u5E74M\u6708d\u65E5EEEE"],["HH:mm","HH:mm:ss","z HH:mm:ss","zzzz HH:mm:ss"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"CNY","\xA5","\u4EBA\u6C11\u5E01",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],CNY:["\xA5"],ILR:["ILS"],JPY:["JP\xA5","\xA5"],KRW:["\uFFE6","\u20A9"],PHP:[void 0,"\u20B1"],RUR:[void 0,"\u0440."],TWD:["NT$"],USD:["US$","$"],XXX:[]},"ltr",xi];function wt(i,t,n){Mo(2,arguments);var e=Nt(i,n),o=Nt(t,n);return e.getTime()===o.getTime()}var Pi={lessThanXSeconds:{one:"\u4E0D\u5230 1 \u79D2",other:"\u4E0D\u5230 {{count}} \u79D2"},xSeconds:{one:"1 \u79D2",other:"{{count}} \u79D2"},halfAMinute:"\u534A\u5206\u949F",lessThanXMinutes:{one:"\u4E0D\u5230 1 \u5206\u949F",other:"\u4E0D\u5230 {{count}} \u5206\u949F"},xMinutes:{one:"1 \u5206\u949F",other:"{{count}} \u5206\u949F"},xHours:{one:"1 \u5C0F\u65F6",other:"{{count}} \u5C0F\u65F6"},aboutXHours:{one:"\u5927\u7EA6 1 \u5C0F\u65F6",other:"\u5927\u7EA6 {{count}} \u5C0F\u65F6"},xDays:{one:"1 \u5929",other:"{{count}} \u5929"},aboutXWeeks:{one:"\u5927\u7EA6 1 \u4E2A\u661F\u671F",other:"\u5927\u7EA6 {{count}} \u4E2A\u661F\u671F"},xWeeks:{one:"1 \u4E2A\u661F\u671F",other:"{{count}} \u4E2A\u661F\u671F"},aboutXMonths:{one:"\u5927\u7EA6 1 \u4E2A\u6708",other:"\u5927\u7EA6 {{count}} \u4E2A\u6708"},xMonths:{one:"1 \u4E2A\u6708",other:"{{count}} \u4E2A\u6708"},aboutXYears:{one:"\u5927\u7EA6 1 \u5E74",other:"\u5927\u7EA6 {{count}} \u5E74"},xYears:{one:"1 \u5E74",other:"{{count}} \u5E74"},overXYears:{one:"\u8D85\u8FC7 1 \u5E74",other:"\u8D85\u8FC7 {{count}} \u5E74"},almostXYears:{one:"\u5C06\u8FD1 1 \u5E74",other:"\u5C06\u8FD1 {{count}} \u5E74"}},Di=function(t,n,e){var o,r=Pi[t];return typeof r=="string"?o=r:n===1?o=r.one:o=r.other.replace("{{count}}",String(n)),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?o+"\u5185":o+"\u524D":o},Jo=Di;var Si={full:"y'\u5E74'M'\u6708'd'\u65E5' EEEE",long:"y'\u5E74'M'\u6708'd'\u65E5'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},yi={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},Ti={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Oi={date:ft({formats:Si,defaultWidth:"full"}),time:ft({formats:yi,defaultWidth:"full"}),dateTime:ft({formats:Ti,defaultWidth:"full"})},Ko=Oi;function ei(i,t,n){var e="eeee p";return wt(i,t,n)?e:i.getTime()>t.getTime()?"'\u4E0B\u4E2A'"+e:"'\u4E0A\u4E2A'"+e}var Ii={lastWeek:ei,yesterday:"'\u6628\u5929' p",today:"'\u4ECA\u5929' p",tomorrow:"'\u660E\u5929' p",nextWeek:ei,other:"PP p"},ki=function(t,n,e,o){var r=Ii[t];return typeof r=="function"?r(n,e,o):r},ti=ki;var Fi={narrow:["\u524D","\u516C\u5143"],abbreviated:["\u524D","\u516C\u5143"],wide:["\u516C\u5143\u524D","\u516C\u5143"]},Ei={narrow:["1","2","3","4"],abbreviated:["\u7B2C\u4E00\u5B63","\u7B2C\u4E8C\u5B63","\u7B2C\u4E09\u5B63","\u7B2C\u56DB\u5B63"],wide:["\u7B2C\u4E00\u5B63\u5EA6","\u7B2C\u4E8C\u5B63\u5EA6","\u7B2C\u4E09\u5B63\u5EA6","\u7B2C\u56DB\u5B63\u5EA6"]},Ai={narrow:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"],abbreviated:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],wide:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},Ri={narrow:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],short:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],abbreviated:["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],wide:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"]},Vi={narrow:{am:"\u4E0A",pm:"\u4E0B",midnight:"\u51CC\u6668",noon:"\u5348",morning:"\u65E9",afternoon:"\u4E0B\u5348",evening:"\u665A",night:"\u591C"},abbreviated:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"},wide:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"}},Hi={narrow:{am:"\u4E0A",pm:"\u4E0B",midnight:"\u51CC\u6668",noon:"\u5348",morning:"\u65E9",afternoon:"\u4E0B\u5348",evening:"\u665A",night:"\u591C"},abbreviated:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"},wide:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"}},Li=function(t,n){var e=Number(t);switch(n?.unit){case"date":return e.toString()+"\u65E5";case"hour":return e.toString()+"\u65F6";case"minute":return e.toString()+"\u5206";case"second":return e.toString()+"\u79D2";default:return"\u7B2C "+e.toString()}},ji={ordinalNumber:Li,era:he({values:Fi,defaultWidth:"wide"}),quarter:he({values:Ei,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:he({values:Ai,defaultWidth:"wide"}),day:he({values:Ri,defaultWidth:"wide"}),dayPeriod:he({values:Vi,defaultWidth:"wide",formattingValues:Hi,defaultFormattingWidth:"wide"})},oi=ji;var Wi=/^(第\s*)?\d+(日|时|分|秒)?/i,Gi=/\d+/i,Bi={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},$i={any:[/^(前)/i,/^(公元)/i]},Xi={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},qi={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},Ui={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},Qi={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},Yi={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},Zi={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Ji={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},Ki={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},er={ordinalNumber:vo({matchPattern:Wi,parsePattern:Gi,valueCallback:function(t){return parseInt(t,10)}}),era:Me({matchPatterns:Bi,defaultMatchWidth:"wide",parsePatterns:$i,defaultParseWidth:"any"}),quarter:Me({matchPatterns:Xi,defaultMatchWidth:"wide",parsePatterns:qi,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Me({matchPatterns:Ui,defaultMatchWidth:"wide",parsePatterns:Qi,defaultParseWidth:"any"}),day:Me({matchPatterns:Yi,defaultMatchWidth:"wide",parsePatterns:Zi,defaultParseWidth:"any"}),dayPeriod:Me({matchPatterns:Ji,defaultMatchWidth:"any",parsePatterns:Ki,defaultParseWidth:"any"})},ii=er;var tr={code:"zh-CN",formatDistance:Jo,formatLong:Ko,formatRelative:ti,localize:oi,match:ii,options:{weekStartsOn:1,firstWeekContainsDate:4}},bt=tr;var ni=(()=>{let t=class t{constructor(){this.http=u(te),this.modal=u(ee)}ngOnInit(){this.updateCurrentTime(),setInterval(()=>{this.updateCurrentTime()},1e3)}add(){}updateCurrentTime(){this.currentTime=new Date}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-date"]],standalone:!0,features:[c],decls:3,vars:4,consts:[[1,"data-container"]],template:function(o,r){o&1&&(a(0,"div",0),g(1),kt(2,"date"),m()),o&2&&(l(),N(" ",Ft(2,1,r.currentTime,"yyyy-MM-dd HH:mm:ss")," "))},dependencies:[oe,Lt,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:[".data-container[_ngcontent-%COMP%]{align-items:center;color:#fff}"]});let i=t;return i})();var ai=(()=>{let t=class t{constructor(){this.status=!1}_resize(){this.status=Mt.isFullscreen}_click(){Mt.isEnabled&&Mt.toggle()}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-fullscreen"]],hostVars:2,hostBindings:function(o,r){o&1&&z("resize",function(){return r._resize()},!1,Dt)("click",function(){return r._click()}),o&2&&ot("flex-1",!0)},standalone:!0,features:[c],decls:2,vars:2,consts:[["nz-icon","",3,"nzType"]],template:function(o,r){o&1&&(s(0,"i",0),g(1)),o&2&&(d("nzType",r.status?"fullscreen-exit":"fullscreen"),l(),N(" ",r.status?"\u9000\u51FA\u5168\u5C4F":"\u8FDB\u5165\u5168\u5C4F"," "))},dependencies:[oe,h,re],encapsulation:2,changeDetection:0});let i=t;return i})();var li=(()=>{let t=class t{constructor(e){this.http=e}getMenus(){return this.http.get("/api/main/menu?ClientId=Platform_Datav")}};t.\u0275fac=function(o){return new(o||t)(Pt(jt))},t.\u0275prov=xt({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function rr(i,t){if(i&1&&s(0,"img",7),i&2){let n=C(2).$implicit;Ct("src","assets/",n.icon.includes("svg")?n.icon:n.icon+".svg","",vt),zt("alt",n.text)}}function nr(i,t){if(i&1){let n=nt();it(0),a(1,"a",5),z("click",function(){et(n);let o=C().$implicit,r=C();return tt(r.navigate(o))}),le(2,rr,1,2,"img",6),g(3),m(),rt()}if(i&2){let n=C().$implicit,e=C();l(),ot("active",e.isActive(!0)),l(),d("ngIf",n.icon),l(),It(" ",n.menuCode=="Home"&&e.selectedParentMenu&&e.selectedParentMenu.menuCode!="Home"?"/ "+e.selectedParentMenu.text:""," ",n.menuCode!="Home"?n.text:""," ")}}function ar(i,t){if(i&1){let n=nt();a(0,"li",15),z("click",function(){let r=et(n).$implicit,p=C(4);return tt(p.navigate(r))}),g(1),m()}if(i&2){let n=t.$implicit;l(),N(" ",n.text," ")}}function lr(i,t){if(i&1&&(it(0),a(1,"a",10),g(2),s(3,"span",11),m(),a(4,"nz-dropdown-menu",null,12)(6,"ul",13),le(7,ar,2,1,"li",14),m()(),rt()),i&2){let n=me(5),e=C(2).$implicit;l(),d("nzDropdownMenu",n),l(),N(" ",e.text," "),l(5),d("ngForOf",e.children)}}function mr(i,t){if(i&1&&s(0,"img",7),i&2){let n=C(3).$implicit;Ct("src","assets/",n.icon.includes("svg")?n.icon:n.icon+".svg","",vt),zt("alt",n.text)}}function sr(i,t){if(i&1){let n=nt();a(0,"a",5),z("click",function(){et(n);let o=C(2).$implicit,r=C();return tt(r.navigate(o))}),le(1,mr,1,2,"img",6),g(2),m()}if(i&2){let n=C(2).$implicit,e=C();ot("active",e.isActive(!0)),l(),d("ngIf",n.icon),l(),N(" ",n.menuCode!="Home"?n.text:""," ")}}function dr(i,t){if(i&1&&(it(0),le(1,lr,8,3,"ng-container",8)(2,sr,3,4,"ng-template",null,9,Et),rt()),i&2){let n=me(3),e=C().$implicit;l(),d("ngIf",e.children&&e.children.length>0)("ngIfElse",n)}}function pr(i,t){if(i&1){let n=nt();it(0,2),a(1,"li",3),z("mouseover",function(o){let p=et(n).$implicit,ie=C();return tt(ie.menuOver(p,o))}),le(2,nr,4,5,"ng-container",4)(3,dr,4,2,"ng-container",4),m(),rt()}if(i&2){let n=t.$implicit;l(2),d("ngIf",n.childShowType=="menu"),l(),d("ngIf",n.childShowType=="drop-down")}}var si=(()=>{let t=class t{constructor(e){this.menuService=e,this.http=u(te),this.modal=u(ee),this.router=u(ge),this.menuNetDataList=[],this.visibleMenuList=[],this.imageUrl="assets/dashboard/menu_btn_l.png",this.title="Label",this.context="2024-02-29 10:00"}ngOnInit(){this.menuNetDataList=[{menuCode:"Home",text:"\u6211\u7684\u5DE5\u4F5C\u7AD9",i18n:null,icon:"home.svg",grp:!0,leafFlag:!1,rootFlag:!0,hideInBreadcrumbFlag:!0,link:"/",srtno:0,valiFlag:!1,menuType:0,parentId:null,clientId:"Platform_Datav",acl:null,childShowType:"menu",id:"3a1167f1-a86c-194d-eabf-258993a337ac"}],this.menuService.getMenus().subscribe(e=>{for(let o of e)if(o.children&&o.children.length>0)for(let r of o.children){if(r.childShowType="menu",r.children)for(let p of r.children)p.childShowType="drop-down",console.log(p.text),console.log(p.children);this.menuNetDataList.push(r)}console.log("this.menuNetDataList"),this.updateVisibleMenuList(),console.log(this.menuNetDataList)})}add(){}updateVisibleMenuList(){this.visibleMenuList=this.menuNetDataList.filter(e=>!this.selectedParentMenu||e.menuCode=="Home"||this.selectedParentMenu&&this.selectedParentMenu.menuCode=="Home"),this.menuNetDataList.forEach(e=>{e.childShowType=="menu"&&this.selectedParentMenu&&e.menuCode==this.selectedParentMenu.menuCode&&e.menuCode!=="Home"&&(this.visibleMenuList=this.visibleMenuList.concat(e.children||[]))}),console.log("visibleMenuList"),console.log(this.visibleMenuList)}menuOver(e,o){}isActive(e){}navigate(e){console.log("\u70B9\u51FBmenu"),console.log(e),this.menuNetDataList.forEach(o=>o.selected=!1),e.link&&e.childShowType=="menu"&&e.children&&e.children.length>0?(console.log("\u6765\u65F6\u8DF3\u8F6C2\u7EA7"),console.log(e.link),console.log(e.children),e.selected=!0,this.selectedParentMenu=e,e.link&&this.router.navigate([e.link,e.id],{state:{menu:e.children}})):e.menuCode=="Home"?(e.selected=!0,this.selectedParentMenu=e,e.link&&this.router.navigateByUrl(e.link)):(e.selected=!0,console.log("\u8DEF\u7531"),console.log(e.link),e.link&&this.router.navigate([e.link,e.id],{state:{menu:e.children}})),this.updateVisibleMenuList()}};t.\u0275fac=function(o){return new(o||t)(ae(li))},t.\u0275cmp=f({type:t,selectors:[["data-v-navigation"]],standalone:!0,features:[c],decls:3,vars:1,consts:[[1,"navigation-container"],["id","parent-menu",4,"ngFor","ngForOf"],["id","parent-menu"],[1,"dropdown-submenu",3,"mouseover"],[4,"ngIf"],["href","javascript:void(0);",1,"menu-group",3,"click"],["width","20",3,"src","alt",4,"ngIf"],["width","20",3,"src","alt"],[4,"ngIf","ngIfElse"],["noChildren",""],["nz-dropdown","",1,"menu-group",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["childMenu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",3,"click",4,"ngFor","ngForOf"],["nz-menu-item","",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"ul"),le(2,pr,4,2,"ng-container",1),m()()),o&2&&(l(2),d("ngForOf",r.visibleMenuList))},dependencies:[oe,Rt,Vt,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,ut,k,F,Q,Z,T,v,j,M,ze,ve,Ce,Vo,Ne,A,I,Y,b,w,B,y,h,re,S,O],styles:['.navigation-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;padding-left:2rem;white-space:nowrap}[nz-button][_ngcontent-%COMP%]{margin-right:8px;margin-bottom:12px}.nz-button-group[_ngcontent-%COMP%] [nz-button][_ngcontent-%COMP%]{margin-right:0}ul[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;margin-bottom:10px;padding-top:0;padding-left:0;list-style-type:none}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{flex-wrap:wrap;margin-right:10px;margin-bottom:30px}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{clear:both;min-width:4rem;margin-right:1rem;padding:.5rem 1.5rem;font-weight:600;color:#74fafb;text-align:inherit;white-space:nowrap;background-color:#054254;border:0 solid red;border-color:#74fafb}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:#000;text-decoration:none;background-color:#fff}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:nowrap;margin-right:10px;margin-bottom:10px;color:#fff;background-color:#337ab7}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%]{position:relative}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{position:absolute;top:2rem;margin-top:0;margin-left:0}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%]:hover > .dropdown-menu[_ngcontent-%COMP%]{display:block}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%]{position:relative}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:after{content:"\\f054";position:absolute;right:.5rem}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%] > .dropdown-menu[_ngcontent-%COMP%]{top:0;bottom:unset;left:100%;margin-top:0;margin-left:0}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%]:hover > .dropdown-menu[_ngcontent-%COMP%]{display:block}ul.dev-mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, ul.dev-mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, ul.dev-mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:#fff;background-color:#dc3545}']});let i=t;return i})();var ur=()=>({color:"white"}),di=(()=>{let t=class t{constructor(){this.http=u(te),this.modal=u(ee)}ngOnInit(){this.updateCurrentTime(),setInterval(()=>{this.updateCurrentTime()},1e3)}add(){}updateCurrentTime(){this.currentTime=new Date}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-setting"]],standalone:!0,features:[c],decls:7,vars:3,consts:[["layout-default-header-item-trigger","","nz-dropdown","","nzTrigger","click","nzPlacement","bottomRight",3,"nzDropdownMenu"],["nz-icon","","nzType","setting",3,"ngStyle"],["settingsMenu","nzDropdownMenu"],["nz-menu","",2,"width","8rem"],["nz-menu-item",""]],template:function(o,r){if(o&1&&(a(0,"div",0),s(1,"i",1),m(),a(2,"nz-dropdown-menu",null,2)(4,"div",3)(5,"div",4),s(6,"data-v-fullscreen"),m()()()),o&2){let p=me(3);d("nzDropdownMenu",p),l(),d("ngStyle",dt(2,ur))}},dependencies:[ai,oe,Ht,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,ut,k,F,Q,Z,T,v,j,M,ze,ve,Ce,Ne,A,I,Y,b,w,B,y,h,re,S,O],encapsulation:2});let i=t;return i})();var pi=(()=>{let t=class t{constructor(){this.settings=u(_o),this.router=u(ge),this.tokenService=u(Do)}get user(){return this.settings.user}logout(){this.tokenService.clear(),this.router.navigateByUrl(this.tokenService.login_url)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-user"]],standalone:!0,features:[c],decls:19,vars:3,consts:[["nz-dropdown","","nzPlacement","bottomRight",1,"alain-default__nav-item","d-flex","align-items-center","px-sm",3,"nzDropdownMenu"],["nzSize","small",1,"mr-sm",3,"nzSrc"],["userMenu","nzDropdownMenu"],["nz-menu","",1,"width-sm"],["nz-menu-item","","routerLink","/pro/account/center"],["nz-icon","","nzType","user",1,"mr-sm"],["nz-menu-item","","routerLink","/pro/account/settings"],["nz-icon","","nzType","setting",1,"mr-sm"],["nz-menu-item","","routerLink","/exception/trigger"],["nz-icon","","nzType","close-circle",1,"mr-sm"],["nz-menu-divider",""],["nz-menu-item","",3,"click"],["nz-icon","","nzType","logout",1,"mr-sm"]],template:function(o,r){if(o&1&&(a(0,"div",0),s(1,"nz-avatar",1),g(2),m(),a(3,"nz-dropdown-menu",null,2)(5,"div",3)(6,"div",4),s(7,"i",5),g(8," \u4E2A\u4EBA\u4E2D\u5FC3 "),m(),a(9,"div",6),s(10,"i",7),g(11," \u4E2A\u4EBA\u8BBE\u7F6E "),m(),a(12,"div",8),s(13,"i",9),g(14," \u89E6\u53D1\u9519\u8BEF "),m(),s(15,"li",10),a(16,"div",11),z("click",function(){return r.logout()}),s(17,"i",12),g(18," \u9000\u51FA\u767B\u5F55 "),m()()()),o&2){let p=me(4);d("nzDropdownMenu",p),l(),d("nzSrc",r.user.avatar),l(),N(" ",r.user.name,` -`)}},dependencies:[M,ze,ve,Ao,Ce,Ne,Ro,h,re,v,Go],encapsulation:2});let i=t;return i})();var ui=(()=>{let t=class t{constructor(){this.http=u(te),this.modal=u(ee)}ngOnInit(){}add(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["app-data-v-header"]],standalone:!0,features:[c],decls:5,vars:0,consts:[[1,"header-container"],[1,"data-v-sysinfo","mr-sm"],[1,"mr-sm"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1),s(2,"data-v-setting",2)(3,"data-v-user",2)(4,"data-v-date",2),m()())},dependencies:[di,pi,ni,ht,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:['.header-container[_ngcontent-%COMP%]{width:100vw;min-width:1280px;height:10%;background-image:url("./media/screen_header2-ZZHBGFUS.png");background-position:top;background-size:cover}.data-v-sysinfo[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:right;text-align:right}']});let i=t;return i})();var fi=(()=>{let t=class t{constructor(){this.http=u(te),this.modal=u(ee)}ngOnInit(){}add(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["app-data-v-home"]],standalone:!0,features:[c],decls:6,vars:0,consts:[[1,"home-container"],["src","assets/dashboard/dashboard_menu.jpg",2,"width","100%","height","1.8rem"],[1,"router-outlet-container"]],template:function(o,r){o&1&&(a(0,"div",0),s(1,"app-data-v-header")(2,"data-v-navigation")(3,"img",1),a(4,"div",2),s(5,"router-outlet"),m()())},dependencies:[ui,si,ht,pt,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:[".home-container[_ngcontent-%COMP%]{width:100vw;min-width:1280px;height:100%;min-height:768px;background-color:#040516}.data-v-sysinfo[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:right;text-align:right}.router-outlet-container[_ngcontent-%COMP%]{padding:1rem;background-color:#040516}"]});let i=t;return i})();var cr=["myGrid"],ci=(()=>{let t=class t{constructor(){this.defaultColDef={width:130,editable:!1},this.columnDefs=[],this.rowData=[],this.gridThemeClass="ag-theme-quartz",this.paginationThemeClass="ag-theme-quartz"}ngOnInit(){console.log("-----\u8868\u683C\u521D\u59CB\u5316-----"),this.pageSize=10,this.pageIndex=1,this.pageRowTotal=this.rowData.length}nzPageSizeChange(e){this.pageSize=e}nzPageIndexChange(e){console.log(`nzPageIndexChange${e}`),this.grid.api&&(e==1?this.grid.api.paginationGoToFirstPage():this.grid.api.paginationGoToPage(e))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["app-ag-grid-component"]],viewQuery:function(o,r){if(o&1&&ue(cr,5),o&2){let p;fe(p=ce())&&(r.grid=p.first)}},inputs:{defaultColDef:"defaultColDef",columnDefs:"columnDefs",rowData:"rowData",gridThemeClass:"gridThemeClass",paginationThemeClass:"paginationThemeClass"},standalone:!0,features:[c],decls:7,vars:15,consts:[[3,"pagination","suppressPaginationPanel","suppressScrollOnNewData","paginationPageSize","defaultColDef","rowData","columnDefs"],["myGrid",""],[1,"grid-pagination"],[1,"page-total-style"],["nzShowSizeChanger","",3,"nzPageIndex","nzPageSize","nzTotal","className","nzPageSizeChange","nzPageIndexChange"]],template:function(o,r){o&1&&(s(0,"ag-grid-angular",0,1)(2,"br"),a(3,"div",2)(4,"div",3),g(5),m(),a(6,"nz-pagination",4),z("nzPageSizeChange",function(ie){return r.nzPageSizeChange(ie)})("nzPageIndexChange",function(ie){return r.nzPageIndexChange(ie)}),m()()),o&2&&(mt(r.gridThemeClass),d("pagination",!0)("suppressPaginationPanel",!0)("suppressPaginationPanel",!0)("suppressScrollOnNewData",!0)("paginationPageSize",r.pageSize)("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.columnDefs),l(5),N("\u5171 ",r.pageRowTotal," \u9879\u6570\u636E"),l(),d("nzPageIndex",r.pageIndex)("nzPageSize",r.pageSize)("nzTotal",r.pageRowTotal)("className",r.paginationThemeClass))},dependencies:[gt,_e,ct],styles:[".grid-pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:32px}.grid-pagination[_ngcontent-%COMP%] .ant-select-selection-item, .ant-select-selector[_ngcontent-%COMP%]{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .page-total-style{font-size:medium;font-weight:700;color:#00eff8} .ant-select-item-option{color:#00eff8!important} .ant-select-item-option-active div{font-weight:800!important;color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .anticon{color:#00eff8}.grid-pagination[_ngcontent-%COMP%] .ant-select-selector{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-prev .ant-pagination-item-link{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item a{color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active a{color:#000!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-next button, .ant-pagination-prev[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active:focus-visible, .ant-pagination-item-active[_ngcontent-%COMP%]:hover, .ant-pagination-next[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%], .ant-pagination-prev[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%]{border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active{font-weight:500;background-color:#00eff8;border-color:#00eff8;border-width:2px}"]});let i=t;return i})();var at=(()=>{let t=class t{agInit(e){this.cellValue=this.getValueToDisplay(e)}refresh(e){return this.cellValue=this.getValueToDisplay(e),!0}buttonClicked(){alert(`\u70B9\u51FB\u4E86 ${this.cellValue}`)}getValueToDisplay(e){return e.valueFormatted?e.valueFormatted:e.value}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["ng-component"]],standalone:!0,features:[c],decls:3,vars:1,consts:[[2,"display","flex","justify-content","center","align-items","center","height","100%"],[1,"ag-grid-button-style",3,"click"]],template:function(o,r){o&1&&(a(0,"span",0)(1,"button",1),z("click",function(){return r.buttonClicked()}),g(2),m()()),o&2&&(l(2),st(r.cellValue))},styles:[".ag-grid-button-style[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;width:90px;height:90%;font-weight:800;color:#74fafb;text-align:center;background-color:transparent;border-color:#74fafb;border-radius:4px}.ag-grid-button-style[_ngcontent-%COMP%]:hover{color:#fff;background-color:#74fafb}"]});let i=t;return i})();var gr=["*"],gi=(()=>{let t=class t{constructor(){this.showSetting=!1,this.optionsList=[],this.onCheckedItemsChange=new yt,this.title=""}getCheckedItems(){return this.optionsList.filter(e=>e.checked)}onCheckChange(){let e=this.getCheckedItems();this.onCheckedItemsChange.emit(e)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["lj-data-v-card"]],inputs:{showSetting:"showSetting",optionsList:"optionsList",title:"title"},outputs:{onCheckedItemsChange:"onCheckedItemsChange"},standalone:!0,features:[c],ngContentSelectors:gr,decls:5,vars:1,consts:[[1,"card-content"],[1,"card-content-title"],[1,"card-content-l"]],template:function(o,r){o&1&&(Tt(),a(0,"div",0)(1,"div",1)(2,"div",2),g(3),m()(),Ot(4),m()),o&2&&(l(3),st(r.title))},dependencies:[h,oe,M,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,A,I,Y,b,w,B,y,S,O],styles:['.card-content-title[_ngcontent-%COMP%]{width:fit-content;height:fit-content;padding:5px 20px 0;font-size:16px;color:#29b6f6;text-align:center;background-color:#19426e;border:1px solid #1f6f97;border-radius:10px 10px 0 0;box-shadow:inset 0 0 10px #1f6f97}.card-content[_ngcontent-%COMP%]{overflow:hidden;margin-bottom:.5rem;padding:1rem 1.5rem;background-image:url("./media/dashboard_card_bg-2QFDBQFD.jpg");background-repeat:no-repeat;background-position:center;background-size:100% 100%}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%]{display:flex;margin-bottom:.5rem;font-size:18px;font-weight:600;color:#74fafb}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-l[_ngcontent-%COMP%]{flex:1;align-self:flex-start}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-r[_ngcontent-%COMP%]{align-self:flex-end}']});let i=t;return i})();var hr=["myGrid"],hi=(()=>{let t=class t{constructor(){this.defaultColDef={width:130,editable:!1,cellStyle:{"font-weight":"bold"}},this.columnDefs=[],this.rowData=[],this.gridThemeClass="ag-theme-quartz",this.paginationThemeClass="ag-theme-quartz"}ngOnInit(){console.log("-----\u8868\u683C\u521D\u59CB\u5316-----"),this.pageSize=10,this.pageIndex=1,this.pageRowTotal=this.rowData.length}nzPageSizeChange(e){this.pageSize=e}nzPageIndexChange(e){console.log(`nzPageIndexChange${e}`),this.grid.api&&(e==1?this.grid.api.paginationGoToFirstPage():this.grid.api.paginationGoToPage(e))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["lj-app-ag-grid-component"]],viewQuery:function(o,r){if(o&1&&ue(hr,5),o&2){let p;fe(p=ce())&&(r.grid=p.first)}},inputs:{defaultColDef:"defaultColDef",columnDefs:"columnDefs",rowData:"rowData",gridThemeClass:"gridThemeClass",paginationThemeClass:"paginationThemeClass"},standalone:!0,features:[c],decls:8,vars:15,consts:[["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u5F85\u529E\u4EFB\u52A1"],[3,"pagination","suppressPaginationPanel","suppressScrollOnNewData","paginationPageSize","defaultColDef","rowData","columnDefs"],["myGrid",""],[1,"grid-pagination"],[1,"page-total-style"],["nzShowSizeChanger","",3,"nzPageIndex","nzPageSize","nzTotal","className","nzPageSizeChange","nzPageIndexChange"]],template:function(o,r){o&1&&(a(0,"lj-data-v-card",0),s(1,"ag-grid-angular",1,2)(3,"br"),a(4,"div",3)(5,"div",4),g(6),m(),a(7,"nz-pagination",5),z("nzPageSizeChange",function(ie){return r.nzPageSizeChange(ie)})("nzPageIndexChange",function(ie){return r.nzPageIndexChange(ie)}),m()()()),o&2&&(l(),mt(r.gridThemeClass),d("pagination",!0)("suppressPaginationPanel",!0)("suppressPaginationPanel",!0)("suppressScrollOnNewData",!0)("paginationPageSize",r.pageSize)("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.columnDefs),l(5),N("\u5171 ",r.pageRowTotal," \u9879\u6570\u636E"),l(),d("nzPageIndex",r.pageIndex)("nzPageSize",r.pageSize)("nzTotal",r.pageRowTotal)("className",r.paginationThemeClass))},dependencies:[gt,_e,ct,gi],styles:[".grid-pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:32px}.grid-pagination[_ngcontent-%COMP%] .ant-select-selection-item, .ant-select-selector[_ngcontent-%COMP%]{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .page-total-style{font-size:medium;font-weight:700;color:#00eff8} .ant-select-item-option{color:#00eff8!important} .ant-select-item-option-active div{font-weight:800!important;color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .anticon{color:#00eff8}.grid-pagination[_ngcontent-%COMP%] .ant-select-selector{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-prev .ant-pagination-item-link{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item a{color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active a{color:#000!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-next button, .ant-pagination-prev[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active:focus-visible, .ant-pagination-item-active[_ngcontent-%COMP%]:hover, .ant-pagination-next[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%], .ant-pagination-prev[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%]{border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active{font-weight:500;background-color:#00eff8;border-color:#00eff8;border-width:2px}"]});let i=t;return i})();var Mr=["myGrid"],vr=()=>[12,12],Mi=(()=>{let t=class t{constructor(e){this._mqttService=e,this.http=u(te),this.modal=u(ee),this.elementRef=u(lt),this.defaultColDef={width:170,editable:!1},this.gridThemedClass="ag-theme-quartz ag-theme-datav",this.rowData=[],this.colDefs1=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,sortable:!0,unSortIcon:!0,field:"xh"},{headerName:"\u4EFB\u52A1\u540D\u79F0",unSortIcon:!0,field:"rwmc"},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",unSortIcon:!0,field:"rwms",minWidth:170,flex:1},{headerName:"\u5F00\u59CB\u65F6\u95F4",unSortIcon:!0,field:"kssj",minWidth:170,flex:1},{headerName:"\u8BA1\u5212\u5B8C\u6210\u65F6\u95F4",unSortIcon:!0,field:"jhwcsj",minWidth:170,flex:1},{headerName:"\u8D85\u671F",width:80,field:"sfcq"},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at}],this.colDefs2=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,unSortIcon:!0,field:"xh"},{headerName:"\u4EFB\u52A1\u540D\u79F0",unSortIcon:!0,field:"rwmc"},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",unSortIcon:!0,field:"rwms",minWidth:170,flex:1},{headerName:"\u5F00\u59CB\u65F6\u95F4",unSortIcon:!0,field:"kssj",minWidth:170,flex:1},{headerName:"\u5F53\u524D\u72B6\u6001",field:"dqzt"},{headerName:"\u5F53\u524D\u8282\u70B9",field:"dqjd"},{headerName:"\u5B9E\u9645\u5B8C\u6210\u65F6\u95F4",field:"sjwcsj",minWidth:170,flex:1},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at}],this.colDefs3=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,unSortIcon:!0,field:"xh"},{headerName:"\u62A5\u8B66\u540D\u79F0",unSortIcon:!0,field:"bjmc"},{headerName:"\u62A5\u8B66\u7B49\u7EA7",unSortIcon:!0,field:"bjdg"},{headerName:"\u62A5\u8B66\u63CF\u8FF0",unSortIcon:!0,field:"bjms",minWidth:170,flex:1},{headerName:"\u62A5\u8B66\u65F6\u95F4",unSortIcon:!0,field:"bjsj",minWidth:170,flex:1},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at},{headerName:"\u6545\u969C\u539F\u56E0",field:"gzyy"},{headerName:"\u5904\u7406\u65B9\u6CD5",field:"clff"},{headerName:"\u6CE8\u610F\u4E8B\u9879",field:"clff"}],this.colDefs4=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,unSortIcon:!0,field:"xh"},{headerName:"\u901A\u77E5\u65F6\u95F4",unSortIcon:!0,field:"tzsj",minWidth:170,flex:1},{headerName:"\u91CD\u8981\u7A0B\u5EA6",unSortIcon:!0,field:"zycd"},{headerName:"\u901A\u77E5\u540D\u79F0",unSortIcon:!0,field:"tzmc"},{headerName:"\u901A\u77E5\u5185\u5BB9",unSortIcon:!0,field:"tznr",minWidth:170,flex:1},{headerName:"\u9644\u4EF6",field:"fj"},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at}],this.client=e}ngOnInit(){console.log(`ngOnInit${this.rowData.length}`);for(var e=1;e<30;e++)this.rowData.push({rwmc:`\u4EFB\u52A1${e}`,rwms:`\u4EFB\u52A1\u63CF\u8FF0${e}`,kssj:`2024-1-${e} 13:38:${e*11}`,jhwcsj:`2024-1-${e} 13:38:${e*10}`,sfcq:"\u5426",dqzt:"\u6B63\u5E38",dqjd:`\u8282\u70B9${e}`,sjwcsj:`2024-1-${e} 13:38:${e*27}`,bjmc:"\u62A5\u8B665",bjms:"\u62A5\u8B66\u63CF\u8FF05",bjsj:`2024-1-${e} 13:38:${e*12}`,gzyy:"-",clff:"-",tzsj:`2024-1-${e} 13:38:${e*19}`,zycd:"\u4E00\u822C",tzmc:"\u7CFB\u7EDF\u63D0\u793A",tznr:"\u8D26\u6237\u767B\u5F55",fj:"-",cz:"\u64CD\u4F5C"})}ngAfterViewInit(){let e=this.elementRef.nativeElement.querySelector(".ag-theme-datav"),o=e.querySelector(".ag-body-viewport"),r=e.querySelector(".ag-scroller")}add(){}};t.\u0275fac=function(o){return new(o||t)(ae(se))},t.\u0275cmp=f({type:t,selectors:[["app-data-v-workstation"]],viewQuery:function(o,r){if(o&1&&ue(Mr,5),o&2){let p;fe(p=ce())&&(r.grid=p.first)}},standalone:!0,features:[c],decls:8,vars:15,consts:[["nz-row","",3,"nzGutter"],[2,"width","50%",3,"defaultColDef","rowData","columnDefs","gridThemeClass"],["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u5DF2\u529E\u4EFB\u52A1"],["gridThemeClass","ag-theme-quartz ag-theme-datav",2,"width","100%",3,"defaultColDef","rowData","columnDefs"],["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u62A5\u8B66\u4FE1\u606F"],["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u901A\u77E5"]],template:function(o,r){o&1&&(a(0,"div",0),s(1,"lj-app-ag-grid-component",1),a(2,"data-v-card",2),s(3,"app-ag-grid-component",3),m(),a(4,"data-v-card",4),s(5,"app-ag-grid-component",3),m(),a(6,"data-v-card",5),s(7,"app-ag-grid-component",3),m()()),o&2&&(d("nzGutter",dt(14,vr)),l(),d("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs1)("gridThemeClass",r.gridThemedClass),l(2),d("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs2),l(2),d("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs3),l(2),d("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs4))},dependencies:[ci,hi,_e,Uo,P,D,$,V,q,U,X,G,x,E,R,J,W,L,jo,Lo,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:[".ag-theme-datav .ag-row-selected .ag-ltr .ag-cell{color:red!important} .ag-theme-datav .ag-ltr .ag-row-focus{font-weight:600;color:red} .ag-theme-datav .ag-ltr .ag-row-focus .ag-cell-focus{border:#74FAFB} .ag-theme-datav .ag-ltr .ag-row-focus .ag-grid-button-style{color:red;border-color:red} .ag-theme-datav{--ag-border-color: #74FAFB;--ag-foreground-color: #74FAFB;--ag-background-color: #0A1632;--ag-header-foreground-color: #74FAFB;--ag-header-background-color: #0A1632;--ag-odd-row-background-color: #0A1632;--ag-header-column-resize-handle-color: #7e2e84;--ag-font-size: 12px;--ag-font-family: monospace;height:17rem;font-weight:700;border-width:3px} .ag-theme-datav .ag-header-cell-resize{--ag-header-column-resize-handle-color: #00eff8} .ag-theme-datav .ag-header-row{font-size:14px;font-weight:700} .ag-theme-datav .ag-root-wrapper{border-radius:0} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar{width:12em} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb{margin-left:40px;background-color:#00eff8;border:2px solid #00eff8} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-track{background-color:transparent;border-color:#00eff8} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:hover{margin-left:40px;background-color:#00eff8} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:active{background-color:#00eff8} .ag-body-vertical-scroll-viewport{scrollbar-color:auto} .ag-body-horizontal-scroll-viewport{scrollbar-color:auto} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar{height:14em;color:#000} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track{background-color:transparent;border-color:#00eff8} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:hover{background-color:#00eff8} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:active{background-color:#00eff8} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb{background-color:#00eff8}"]});let i=t;return i})();var vi=[{path:"home",component:qo,canActivate:[Fo,So],canActivateChild:[yo],data:{},children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"sys",loadChildren:()=>import("./chunk-UDOVALTH.js").then(i=>i.routes)}]},{path:"",component:fi,children:[{path:"",component:Mi},{path:"data-v",loadChildren:()=>import("./chunk-CTDZNHTN.js").then(i=>i.routes)}]},{path:"",loadChildren:()=>import("./chunk-7KRKUWJJ.js").then(i=>i.routes)},{path:"exception",loadChildren:()=>import("./chunk-BRRG4SER.js").then(i=>i.routes)},{path:"**",redirectTo:"exception/404"}];var zi=[oo];var Ci=[to,io,ro,ao,no,lo,so,mo,po,co,uo,fo,go,ho];var Ni={hostname:"127.0.0.1",port:1883,path:"/mqtt",protocol:"ws"},zr={abbr:"zh-CN",ng:Zo,zorro:zo,date:bt,delon:bo},Cr={auth:{login_url:"/passport/login"}},Nr={},_i=[Zt(),Jt(),Qt({scrollPositionRestoration:"top"})];ne.useHash&&_i.push(Yt());var wi=[Wt(Gt([...ne.interceptorFns??[],To,Io])),eo(),Ut(vi,..._i),xo({config:Cr,defaultLang:zr,icons:[...Ci,...zi]}),Kt(Nr),Oo(),Eo(...Xo),Ho(...$o),Wo({widgets:[...Bo]}),{provide:se,useFactory:()=>new se(Ni)},ko(),{provide:se,useFactory:()=>new se(Ni)},...ne.providers||[]];ne.api?.refreshTokenEnabled&&ne.api.refreshTokenType==="auth-refresh"&&wi.push(_t());var bi={providers:wi};Bt(Yo,bi).catch(i=>console.error(i)); +import{a as Uo,b as se}from"./chunk-2D265ORJ.js";import{a as ne,b as wt,c as Io,d as ko,f as Fo,g as Mt,h as vt,i as qo}from"./chunk-HCPW2OGS.js";import{$ as gt,A as S,Aa as jo,Ba as H,C as y,Fa as L,Ha as W,Ka as G,La as Wo,M as Eo,O as ve,Oa as B,P as ze,Q as Ao,R as Ro,Ra as $,S as Ce,T as Vo,Ta as X,U as Ne,V as M,Wa as q,_ as T,_a as U,aa as _e,ab as Q,bb as Go,ca as O,cb as v,e as x,eb as Y,gb as Z,ib as J,jb as ht,ka as I,mb as Bo,nb as $o,oa as k,ob as Xo,qa as F,sa as E,ta as A,u as P,v as D,va as R,xa as V,ya as Ho,za as Lo}from"./chunk-OOUNO2UZ.js";import{a as Do,d as So,e as yo,f as To,g as Oo}from"./chunk-4FFPI7ZP.js";import{Ab as ue,Ae as fo,Bb as fe,Bc as Xt,Be as co,Cb as ce,Ce as go,Da as St,Db as me,Dc as qt,De as ho,Eb as g,Ec as Ut,Ee as Mo,Fb as st,Fe as re,Ga as zt,Gb as N,Gd as eo,Ge as h,Gf as xo,Ha as lt,Hb as kt,Hc as pt,He as ut,Hf as Po,Ja as yt,Jb as c,Jc as ge,Ka as l,Kb as dt,La as ae,Lc as Qt,Le as _,Mc as Yt,Nc as Zt,Nf as j,Oa as Tt,Ob as Ft,Oc as Jt,Pc as Kt,Qb as Et,Qe as vo,Sb as At,Se as _t,Ta as le,Tb as Rt,Te as ft,Ue as he,Va as p,Ve as Me,We as zo,Xa as ot,Za as mt,af as Co,cc as Vt,dc as Ht,gb as a,gf as No,ha as Pt,hb as m,hc as Lt,hf as w,ib as s,jb as it,ka as Dt,kb as rt,kc as jt,la as d,lf as b,mb as nt,na as f,nc as oe,of as _o,pe as to,qb as z,qe as oo,re as io,rf as wo,sa as et,sb as C,se as ro,ta as tt,tb as Ot,te as no,tf as ct,ub as It,uc as Wt,ue as ao,vb as Ct,vc as Gt,ve as lo,vf as ee,wb as Nt,wc as Bt,we as mo,xc as $t,xe as so,xf as te,ye as po,ze as uo,zf as bo}from"./chunk-VDRVUQCF.js";var Qo=new Rt("17.1.0");var Yo=(()=>{let t=class t{constructor(e,o){this.router=d(ge),this.titleSrv=d(ct),this.modalSrv=d(No),this.donePreloader=_o(),o.setAttribute(e.nativeElement,"ng-alain-version",Po.full),o.setAttribute(e.nativeElement,"ng-zorro-version",Qo.full)}ngOnInit(){let e=!1;this.router.events.subscribe(o=>{o instanceof Ut&&(e=!0),e&&o instanceof qt&&this.modalSrv.confirm({nzTitle:"\u63D0\u9192",nzContent:ne.production?"\u5E94\u7528\u53EF\u80FD\u5DF2\u53D1\u5E03\u65B0\u7248\u672C\uFF0C\u8BF7\u70B9\u51FB\u5237\u65B0\u624D\u80FD\u751F\u6548\u3002":`\u65E0\u6CD5\u52A0\u8F7D\u8DEF\u7531\uFF1A${o.url}`,nzCancelDisabled:!1,nzOkText:"\u5237\u65B0",nzCancelText:"\u5FFD\u7565",nzOnOk:()=>location.reload()}),o instanceof Xt&&(this.donePreloader(),this.titleSrv.setTitle(),this.modalSrv.closeAll())})}};t.\u0275fac=function(o){return new(o||t)(ae(lt),ae(yt))},t.\u0275cmp=f({type:t,selectors:[["app-root"]],standalone:!0,features:[c],decls:1,vars:0,template:function(o,r){o&1&&s(0,"router-outlet")},dependencies:[pt],encapsulation:2});let i=t;return i})();function xi(i){let t=i;return 5}var Zo=["zh",[["\u4E0A\u5348","\u4E0B\u5348"],void 0,void 0],void 0,[["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]],void 0,[["\u516C\u5143\u524D","\u516C\u5143"],void 0,void 0],0,[6,0],["y/M/d","y\u5E74M\u6708d\u65E5",void 0,"y\u5E74M\u6708d\u65E5EEEE"],["HH:mm","HH:mm:ss","z HH:mm:ss","zzzz HH:mm:ss"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"CNY","\xA5","\u4EBA\u6C11\u5E01",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],CNY:["\xA5"],ILR:["ILS"],JPY:["JP\xA5","\xA5"],KRW:["\uFFE6","\u20A9"],PHP:[void 0,"\u20B1"],RUR:[void 0,"\u0440."],TWD:["NT$"],USD:["US$","$"],XXX:[]},"ltr",xi];function bt(i,t,n){vo(2,arguments);var e=_t(i,n),o=_t(t,n);return e.getTime()===o.getTime()}var Pi={lessThanXSeconds:{one:"\u4E0D\u5230 1 \u79D2",other:"\u4E0D\u5230 {{count}} \u79D2"},xSeconds:{one:"1 \u79D2",other:"{{count}} \u79D2"},halfAMinute:"\u534A\u5206\u949F",lessThanXMinutes:{one:"\u4E0D\u5230 1 \u5206\u949F",other:"\u4E0D\u5230 {{count}} \u5206\u949F"},xMinutes:{one:"1 \u5206\u949F",other:"{{count}} \u5206\u949F"},xHours:{one:"1 \u5C0F\u65F6",other:"{{count}} \u5C0F\u65F6"},aboutXHours:{one:"\u5927\u7EA6 1 \u5C0F\u65F6",other:"\u5927\u7EA6 {{count}} \u5C0F\u65F6"},xDays:{one:"1 \u5929",other:"{{count}} \u5929"},aboutXWeeks:{one:"\u5927\u7EA6 1 \u4E2A\u661F\u671F",other:"\u5927\u7EA6 {{count}} \u4E2A\u661F\u671F"},xWeeks:{one:"1 \u4E2A\u661F\u671F",other:"{{count}} \u4E2A\u661F\u671F"},aboutXMonths:{one:"\u5927\u7EA6 1 \u4E2A\u6708",other:"\u5927\u7EA6 {{count}} \u4E2A\u6708"},xMonths:{one:"1 \u4E2A\u6708",other:"{{count}} \u4E2A\u6708"},aboutXYears:{one:"\u5927\u7EA6 1 \u5E74",other:"\u5927\u7EA6 {{count}} \u5E74"},xYears:{one:"1 \u5E74",other:"{{count}} \u5E74"},overXYears:{one:"\u8D85\u8FC7 1 \u5E74",other:"\u8D85\u8FC7 {{count}} \u5E74"},almostXYears:{one:"\u5C06\u8FD1 1 \u5E74",other:"\u5C06\u8FD1 {{count}} \u5E74"}},Di=function(t,n,e){var o,r=Pi[t];return typeof r=="string"?o=r:n===1?o=r.one:o=r.other.replace("{{count}}",String(n)),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?o+"\u5185":o+"\u524D":o},Jo=Di;var Si={full:"y'\u5E74'M'\u6708'd'\u65E5' EEEE",long:"y'\u5E74'M'\u6708'd'\u65E5'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},yi={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},Ti={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Oi={date:ft({formats:Si,defaultWidth:"full"}),time:ft({formats:yi,defaultWidth:"full"}),dateTime:ft({formats:Ti,defaultWidth:"full"})},Ko=Oi;function ei(i,t,n){var e="eeee p";return bt(i,t,n)?e:i.getTime()>t.getTime()?"'\u4E0B\u4E2A'"+e:"'\u4E0A\u4E2A'"+e}var Ii={lastWeek:ei,yesterday:"'\u6628\u5929' p",today:"'\u4ECA\u5929' p",tomorrow:"'\u660E\u5929' p",nextWeek:ei,other:"PP p"},ki=function(t,n,e,o){var r=Ii[t];return typeof r=="function"?r(n,e,o):r},ti=ki;var Fi={narrow:["\u524D","\u516C\u5143"],abbreviated:["\u524D","\u516C\u5143"],wide:["\u516C\u5143\u524D","\u516C\u5143"]},Ei={narrow:["1","2","3","4"],abbreviated:["\u7B2C\u4E00\u5B63","\u7B2C\u4E8C\u5B63","\u7B2C\u4E09\u5B63","\u7B2C\u56DB\u5B63"],wide:["\u7B2C\u4E00\u5B63\u5EA6","\u7B2C\u4E8C\u5B63\u5EA6","\u7B2C\u4E09\u5B63\u5EA6","\u7B2C\u56DB\u5B63\u5EA6"]},Ai={narrow:["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"],abbreviated:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],wide:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]},Ri={narrow:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],short:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],abbreviated:["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],wide:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"]},Vi={narrow:{am:"\u4E0A",pm:"\u4E0B",midnight:"\u51CC\u6668",noon:"\u5348",morning:"\u65E9",afternoon:"\u4E0B\u5348",evening:"\u665A",night:"\u591C"},abbreviated:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"},wide:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"}},Hi={narrow:{am:"\u4E0A",pm:"\u4E0B",midnight:"\u51CC\u6668",noon:"\u5348",morning:"\u65E9",afternoon:"\u4E0B\u5348",evening:"\u665A",night:"\u591C"},abbreviated:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"},wide:{am:"\u4E0A\u5348",pm:"\u4E0B\u5348",midnight:"\u51CC\u6668",noon:"\u4E2D\u5348",morning:"\u65E9\u6668",afternoon:"\u4E2D\u5348",evening:"\u665A\u4E0A",night:"\u591C\u95F4"}},Li=function(t,n){var e=Number(t);switch(n?.unit){case"date":return e.toString()+"\u65E5";case"hour":return e.toString()+"\u65F6";case"minute":return e.toString()+"\u5206";case"second":return e.toString()+"\u79D2";default:return"\u7B2C "+e.toString()}},ji={ordinalNumber:Li,era:he({values:Fi,defaultWidth:"wide"}),quarter:he({values:Ei,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:he({values:Ai,defaultWidth:"wide"}),day:he({values:Ri,defaultWidth:"wide"}),dayPeriod:he({values:Vi,defaultWidth:"wide",formattingValues:Hi,defaultFormattingWidth:"wide"})},oi=ji;var Wi=/^(第\s*)?\d+(日|时|分|秒)?/i,Gi=/\d+/i,Bi={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},$i={any:[/^(前)/i,/^(公元)/i]},Xi={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},qi={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},Ui={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},Qi={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},Yi={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},Zi={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Ji={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},Ki={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},er={ordinalNumber:zo({matchPattern:Wi,parsePattern:Gi,valueCallback:function(t){return parseInt(t,10)}}),era:Me({matchPatterns:Bi,defaultMatchWidth:"wide",parsePatterns:$i,defaultParseWidth:"any"}),quarter:Me({matchPatterns:Xi,defaultMatchWidth:"wide",parsePatterns:qi,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Me({matchPatterns:Ui,defaultMatchWidth:"wide",parsePatterns:Qi,defaultParseWidth:"any"}),day:Me({matchPatterns:Yi,defaultMatchWidth:"wide",parsePatterns:Zi,defaultParseWidth:"any"}),dayPeriod:Me({matchPatterns:Ji,defaultMatchWidth:"any",parsePatterns:Ki,defaultParseWidth:"any"})},ii=er;var tr={code:"zh-CN",formatDistance:Jo,formatLong:Ko,formatRelative:ti,localize:oi,match:ii,options:{weekStartsOn:1,firstWeekContainsDate:4}},xt=tr;var ni=(()=>{let t=class t{constructor(){this.http=d(te),this.modal=d(ee)}ngOnInit(){this.updateCurrentTime(),setInterval(()=>{this.updateCurrentTime()},1e3)}add(){}updateCurrentTime(){this.currentTime=new Date}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-date"]],standalone:!0,features:[c],decls:3,vars:4,consts:[[1,"data-container"]],template:function(o,r){o&1&&(a(0,"div",0),g(1),Ft(2,"date"),m()),o&2&&(l(),N(" ",Et(2,1,r.currentTime,"yyyy-MM-dd HH:mm:ss")," "))},dependencies:[oe,jt,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:[".data-container[_ngcontent-%COMP%]{align-items:center;color:#fff}"]});let i=t;return i})();var ai=(()=>{let t=class t{constructor(){this.status=!1}_resize(){this.status=vt.isFullscreen}_click(){vt.isEnabled&&vt.toggle()}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-fullscreen"]],hostVars:2,hostBindings:function(o,r){o&1&&z("resize",function(){return r._resize()},!1,St)("click",function(){return r._click()}),o&2&&ot("flex-1",!0)},standalone:!0,features:[c],decls:2,vars:2,consts:[["nz-icon","",3,"nzType"]],template:function(o,r){o&1&&(s(0,"i",0),g(1)),o&2&&(p("nzType",r.status?"fullscreen-exit":"fullscreen"),l(),N(" ",r.status?"\u9000\u51FA\u5168\u5C4F":"\u8FDB\u5165\u5168\u5C4F"," "))},dependencies:[oe,h,re],encapsulation:2,changeDetection:0});let i=t;return i})();var li=(()=>{let t=class t{constructor(e){this.http=e}getMenus(){return this.http.get("/api/main/menu?ClientId=Platform_Datav")}};t.\u0275fac=function(o){return new(o||t)(Dt(Wt))},t.\u0275prov=Pt({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function rr(i,t){if(i&1&&s(0,"img",7),i&2){let n=C(2).$implicit;Nt("src","assets/",n.icon.includes("svg")?n.icon:n.icon+".svg","",zt),Ct("alt",n.text)}}function nr(i,t){if(i&1){let n=nt();it(0),a(1,"a",5),z("click",function(){et(n);let o=C().$implicit,r=C();return tt(r.navigate(o))}),le(2,rr,1,2,"img",6),g(3),m(),rt()}if(i&2){let n=C().$implicit,e=C();l(),ot("active",e.isActive(!0)),l(),p("ngIf",n.icon),l(),kt(" ",n.menuCode=="Home"&&e.selectedParentMenu&&e.selectedParentMenu.menuCode!="Home"?"/ "+e.selectedParentMenu.text:""," ",n.menuCode!="Home"?n.text:""," ")}}function ar(i,t){if(i&1){let n=nt();a(0,"li",15),z("click",function(){let r=et(n).$implicit,u=C(4);return tt(u.navigate(r))}),g(1),m()}if(i&2){let n=t.$implicit;l(),N(" ",n.text," ")}}function lr(i,t){if(i&1&&(it(0),a(1,"a",10),g(2),s(3,"span",11),m(),a(4,"nz-dropdown-menu",null,12)(6,"ul",13),le(7,ar,2,1,"li",14),m()(),rt()),i&2){let n=me(5),e=C(2).$implicit;l(),p("nzDropdownMenu",n),l(),N(" ",e.text," "),l(5),p("ngForOf",e.children)}}function mr(i,t){if(i&1&&s(0,"img",7),i&2){let n=C(3).$implicit;Nt("src","assets/",n.icon.includes("svg")?n.icon:n.icon+".svg","",zt),Ct("alt",n.text)}}function sr(i,t){if(i&1){let n=nt();a(0,"a",5),z("click",function(){et(n);let o=C(2).$implicit,r=C();return tt(r.navigate(o))}),le(1,mr,1,2,"img",6),g(2),m()}if(i&2){let n=C(2).$implicit,e=C();ot("active",e.isActive(!0)),l(),p("ngIf",n.icon),l(),N(" ",n.menuCode!="Home"?n.text:""," ")}}function dr(i,t){if(i&1&&(it(0),le(1,lr,8,3,"ng-container",8)(2,sr,3,4,"ng-template",null,9,At),rt()),i&2){let n=me(3),e=C().$implicit;l(),p("ngIf",e.children&&e.children.length>0)("ngIfElse",n)}}function pr(i,t){if(i&1){let n=nt();it(0,2),a(1,"li",3),z("mouseover",function(o){let u=et(n).$implicit,ie=C();return tt(ie.menuOver(u,o))}),le(2,nr,4,5,"ng-container",4)(3,dr,4,2,"ng-container",4),m(),rt()}if(i&2){let n=t.$implicit;l(2),p("ngIf",n.childShowType=="menu"),l(),p("ngIf",n.childShowType=="drop-down")}}var si=(()=>{let t=class t{constructor(e){this.menuService=e,this.http=d(te),this.modal=d(ee),this.router=d(ge),this.menuNetDataList=[],this.visibleMenuList=[],this.imageUrl="assets/dashboard/menu_btn_l.png",this.title="Label",this.context="2024-02-29 10:00"}ngOnInit(){this.menuNetDataList=[{menuCode:"Home",text:"\u6211\u7684\u5DE5\u4F5C\u7AD9",i18n:null,icon:"home.svg",grp:!0,leafFlag:!1,rootFlag:!0,hideInBreadcrumbFlag:!0,link:"/",srtno:0,valiFlag:!1,menuType:0,parentId:null,clientId:"Platform_Datav",acl:null,childShowType:"menu",id:"3a1167f1-a86c-194d-eabf-258993a337ac"}],this.menuService.getMenus().subscribe(e=>{for(let o of e)if(o.children&&o.children.length>0)for(let r of o.children){if(r.childShowType="menu",r.children)for(let u of r.children)u.childShowType="drop-down",console.log(u.text),console.log(u.children);this.menuNetDataList.push(r)}console.log("this.menuNetDataList"),this.updateVisibleMenuList(),console.log(this.menuNetDataList)})}add(){}updateVisibleMenuList(){this.visibleMenuList=this.menuNetDataList.filter(e=>!this.selectedParentMenu||e.menuCode=="Home"||this.selectedParentMenu&&this.selectedParentMenu.menuCode=="Home"),this.menuNetDataList.forEach(e=>{e.childShowType=="menu"&&this.selectedParentMenu&&e.menuCode==this.selectedParentMenu.menuCode&&e.menuCode!=="Home"&&(this.visibleMenuList=this.visibleMenuList.concat(e.children||[]))}),console.log("visibleMenuList"),console.log(this.visibleMenuList)}menuOver(e,o){}isActive(e){}navigate(e){console.log("\u70B9\u51FBmenu"),console.log(e),this.menuNetDataList.forEach(o=>o.selected=!1),e.link&&e.childShowType=="menu"&&e.children&&e.children.length>0?(console.log("\u6765\u65F6\u8DF3\u8F6C2\u7EA7"),console.log(e.link),console.log(e.children),e.selected=!0,this.selectedParentMenu=e,e.link&&this.router.navigate([e.link,e.id],{state:{menu:e.children}})):e.menuCode=="Home"?(e.selected=!0,this.selectedParentMenu=e,e.link&&this.router.navigateByUrl(e.link)):(e.selected=!0,console.log("\u8DEF\u7531"),console.log(e.link),e.link&&this.router.navigate([e.link,e.id],{state:{menu:e.children}})),this.updateVisibleMenuList()}};t.\u0275fac=function(o){return new(o||t)(ae(li))},t.\u0275cmp=f({type:t,selectors:[["data-v-navigation"]],standalone:!0,features:[c],decls:3,vars:1,consts:[[1,"navigation-container"],["id","parent-menu",4,"ngFor","ngForOf"],["id","parent-menu"],[1,"dropdown-submenu",3,"mouseover"],[4,"ngIf"],["href","javascript:void(0);",1,"menu-group",3,"click"],["width","20",3,"src","alt",4,"ngIf"],["width","20",3,"src","alt"],[4,"ngIf","ngIfElse"],["noChildren",""],["nz-dropdown","",1,"menu-group",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["childMenu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",3,"click",4,"ngFor","ngForOf"],["nz-menu-item","",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"ul"),le(2,pr,4,2,"ng-container",1),m()()),o&2&&(l(2),p("ngForOf",r.visibleMenuList))},dependencies:[oe,Vt,Ht,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,ut,k,F,Q,Z,T,v,j,M,ze,ve,Ce,Vo,Ne,A,I,Y,b,w,B,y,h,re,S,O],styles:['.navigation-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;padding-left:2rem;white-space:nowrap}[nz-button][_ngcontent-%COMP%]{margin-right:8px;margin-bottom:12px}.nz-button-group[_ngcontent-%COMP%] [nz-button][_ngcontent-%COMP%]{margin-right:0}ul[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;margin-bottom:10px;padding-top:0;padding-left:0;list-style-type:none}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{flex-wrap:wrap;margin-right:10px;margin-bottom:30px}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{clear:both;min-width:4rem;margin-right:1rem;padding:.5rem 1.5rem;font-weight:600;color:#74fafb;text-align:inherit;white-space:nowrap;background-color:#054254;border:0 solid red;border-color:#74fafb}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:#000;text-decoration:none;background-color:#fff}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:nowrap;margin-right:10px;margin-bottom:10px;color:#fff;background-color:#337ab7}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%]{position:relative}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{position:absolute;top:2rem;margin-top:0;margin-left:0}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%]:hover > .dropdown-menu[_ngcontent-%COMP%]{display:block}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%]{position:relative}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:block}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:after{content:"\\f054";position:absolute;right:.5rem}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%] > .dropdown-menu[_ngcontent-%COMP%]{top:0;bottom:unset;left:100%;margin-top:0;margin-left:0}ul[_ngcontent-%COMP%] > .dropdown-submenu[_ngcontent-%COMP%] .dropdown-submenu[_ngcontent-%COMP%]:hover > .dropdown-menu[_ngcontent-%COMP%]{display:block}ul.dev-mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, ul.dev-mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, ul.dev-mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:#fff;background-color:#dc3545}']});let i=t;return i})();var ur=()=>({color:"white"}),di=(()=>{let t=class t{constructor(){this.http=d(te),this.modal=d(ee)}ngOnInit(){this.updateCurrentTime(),setInterval(()=>{this.updateCurrentTime()},1e3)}add(){}updateCurrentTime(){this.currentTime=new Date}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-setting"]],standalone:!0,features:[c],decls:7,vars:3,consts:[["layout-default-header-item-trigger","","nz-dropdown","","nzTrigger","click","nzPlacement","bottomRight",3,"nzDropdownMenu"],["nz-icon","","nzType","setting",3,"ngStyle"],["settingsMenu","nzDropdownMenu"],["nz-menu","",2,"width","8rem"],["nz-menu-item",""]],template:function(o,r){if(o&1&&(a(0,"div",0),s(1,"i",1),m(),a(2,"nz-dropdown-menu",null,2)(4,"div",3)(5,"div",4),s(6,"data-v-fullscreen"),m()()()),o&2){let u=me(3);p("nzDropdownMenu",u),l(),p("ngStyle",dt(2,ur))}},dependencies:[ai,oe,Lt,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,ut,k,F,Q,Z,T,v,j,M,ze,ve,Ce,Ne,A,I,Y,b,w,B,y,h,re,S,O],encapsulation:2});let i=t;return i})();var pi=(()=>{let t=class t{constructor(){this.settings=d(wo),this.router=d(ge),this.tokenService=d(Do)}get user(){return this.settings.user}logout(){this.tokenService.clear(),this.router.navigateByUrl(this.tokenService.login_url)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["data-v-user"]],standalone:!0,features:[c],decls:19,vars:3,consts:[["nz-dropdown","","nzPlacement","bottomRight",1,"alain-default__nav-item","d-flex","align-items-center","px-sm",3,"nzDropdownMenu"],["nzSize","small",1,"mr-sm",3,"nzSrc"],["userMenu","nzDropdownMenu"],["nz-menu","",1,"width-sm"],["nz-menu-item","","routerLink","/pro/account/center"],["nz-icon","","nzType","user",1,"mr-sm"],["nz-menu-item","","routerLink","/pro/account/settings"],["nz-icon","","nzType","setting",1,"mr-sm"],["nz-menu-item","","routerLink","/exception/trigger"],["nz-icon","","nzType","close-circle",1,"mr-sm"],["nz-menu-divider",""],["nz-menu-item","",3,"click"],["nz-icon","","nzType","logout",1,"mr-sm"]],template:function(o,r){if(o&1&&(a(0,"div",0),s(1,"nz-avatar",1),g(2),m(),a(3,"nz-dropdown-menu",null,2)(5,"div",3)(6,"div",4),s(7,"i",5),g(8," \u4E2A\u4EBA\u4E2D\u5FC3 "),m(),a(9,"div",6),s(10,"i",7),g(11," \u4E2A\u4EBA\u8BBE\u7F6E "),m(),a(12,"div",8),s(13,"i",9),g(14," \u89E6\u53D1\u9519\u8BEF "),m(),s(15,"li",10),a(16,"div",11),z("click",function(){return r.logout()}),s(17,"i",12),g(18," \u9000\u51FA\u767B\u5F55 "),m()()()),o&2){let u=me(4);p("nzDropdownMenu",u),l(),p("nzSrc",r.user.avatar),l(),N(" ",r.user.name,` +`)}},dependencies:[M,ze,ve,Ao,Ce,Ne,Ro,h,re,v,Go],encapsulation:2});let i=t;return i})();var ui=(()=>{let t=class t{constructor(){this.http=d(te),this.modal=d(ee)}ngOnInit(){}add(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["app-data-v-header"]],standalone:!0,features:[c],decls:5,vars:0,consts:[[1,"header-container"],[1,"data-v-sysinfo","mr-sm"],[1,"mr-sm"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1),s(2,"data-v-setting",2)(3,"data-v-user",2)(4,"data-v-date",2),m()())},dependencies:[di,pi,ni,Mt,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:['.header-container[_ngcontent-%COMP%]{width:100vw;min-width:1280px;height:10%;background-image:url("./media/screen_header2-ZZHBGFUS.png");background-position:top;background-size:cover}.data-v-sysinfo[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:right;text-align:right}']});let i=t;return i})();var fi=(()=>{let t=class t{constructor(){this.http=d(te),this.modal=d(ee)}ngOnInit(){}add(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["app-data-v-home"]],standalone:!0,features:[c],decls:6,vars:0,consts:[[1,"home-container"],["src","assets/dashboard/dashboard_menu.jpg",2,"width","100%","height","1.8rem"],[1,"router-outlet-container"]],template:function(o,r){o&1&&(a(0,"div",0),s(1,"app-data-v-header")(2,"data-v-navigation")(3,"img",1),a(4,"div",2),s(5,"router-outlet"),m()())},dependencies:[ui,si,Mt,pt,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:[".home-container[_ngcontent-%COMP%]{width:100vw;min-width:1280px;height:100%;min-height:768px;background-color:#040516}.data-v-sysinfo[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:right;text-align:right}.router-outlet-container[_ngcontent-%COMP%]{padding:1rem;background-color:#040516}"]});let i=t;return i})();var cr=["myGrid"],ci=(()=>{let t=class t{constructor(){this.defaultColDef={width:130,editable:!1},this.columnDefs=[],this.rowData=[],this.gridThemeClass="ag-theme-quartz",this.paginationThemeClass="ag-theme-quartz"}ngOnInit(){console.log("-----\u8868\u683C\u521D\u59CB\u5316-----"),this.pageSize=10,this.pageIndex=1,this.pageRowTotal=this.rowData.length}nzPageSizeChange(e){this.pageSize=e}nzPageIndexChange(e){console.log(`nzPageIndexChange${e}`),this.grid.api&&(e==1?this.grid.api.paginationGoToFirstPage():this.grid.api.paginationGoToPage(e))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["app-ag-grid-component"]],viewQuery:function(o,r){if(o&1&&ue(cr,5),o&2){let u;fe(u=ce())&&(r.grid=u.first)}},inputs:{defaultColDef:"defaultColDef",columnDefs:"columnDefs",rowData:"rowData",gridThemeClass:"gridThemeClass",paginationThemeClass:"paginationThemeClass"},standalone:!0,features:[c],decls:7,vars:15,consts:[[3,"pagination","suppressPaginationPanel","suppressScrollOnNewData","paginationPageSize","defaultColDef","rowData","columnDefs"],["myGrid",""],[1,"grid-pagination"],[1,"page-total-style"],["nzShowSizeChanger","",3,"nzPageIndex","nzPageSize","nzTotal","className","nzPageSizeChange","nzPageIndexChange"]],template:function(o,r){o&1&&(s(0,"ag-grid-angular",0,1)(2,"br"),a(3,"div",2)(4,"div",3),g(5),m(),a(6,"nz-pagination",4),z("nzPageSizeChange",function(ie){return r.nzPageSizeChange(ie)})("nzPageIndexChange",function(ie){return r.nzPageIndexChange(ie)}),m()()),o&2&&(mt(r.gridThemeClass),p("pagination",!0)("suppressPaginationPanel",!0)("suppressPaginationPanel",!0)("suppressScrollOnNewData",!0)("paginationPageSize",r.pageSize)("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.columnDefs),l(5),N("\u5171 ",r.pageRowTotal," \u9879\u6570\u636E"),l(),p("nzPageIndex",r.pageIndex)("nzPageSize",r.pageSize)("nzTotal",r.pageRowTotal)("className",r.paginationThemeClass))},dependencies:[ht,_e,gt],styles:[".grid-pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:32px}.grid-pagination[_ngcontent-%COMP%] .ant-select-selection-item, .ant-select-selector[_ngcontent-%COMP%]{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .page-total-style{font-size:medium;font-weight:700;color:#00eff8} .ant-select-item-option{color:#00eff8!important} .ant-select-item-option-active div{font-weight:800!important;color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .anticon{color:#00eff8}.grid-pagination[_ngcontent-%COMP%] .ant-select-selector{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-prev .ant-pagination-item-link{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item a{color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active a{color:#000!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-next button, .ant-pagination-prev[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active:focus-visible, .ant-pagination-item-active[_ngcontent-%COMP%]:hover, .ant-pagination-next[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%], .ant-pagination-prev[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%]{border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active{font-weight:500;background-color:#00eff8;border-color:#00eff8;border-width:2px}"]});let i=t;return i})();var at=(()=>{let t=class t{agInit(e){this.cellValue=this.getValueToDisplay(e)}refresh(e){return this.cellValue=this.getValueToDisplay(e),!0}buttonClicked(){alert(`\u70B9\u51FB\u4E86 ${this.cellValue}`)}getValueToDisplay(e){return e.valueFormatted?e.valueFormatted:e.value}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["ng-component"]],standalone:!0,features:[c],decls:3,vars:1,consts:[[2,"display","flex","justify-content","center","align-items","center","height","100%"],[1,"ag-grid-button-style",3,"click"]],template:function(o,r){o&1&&(a(0,"span",0)(1,"button",1),z("click",function(){return r.buttonClicked()}),g(2),m()()),o&2&&(l(2),st(r.cellValue))},styles:[".ag-grid-button-style[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;width:90px;height:90%;font-weight:800;color:#74fafb;text-align:center;background-color:transparent;border-color:#74fafb;border-radius:4px}.ag-grid-button-style[_ngcontent-%COMP%]:hover{color:#fff;background-color:#74fafb}"]});let i=t;return i})();var gr=["*"],gi=(()=>{let t=class t{constructor(){this.showSetting=!1,this.optionsList=[],this.onCheckedItemsChange=new Tt,this.title=""}getCheckedItems(){return this.optionsList.filter(e=>e.checked)}onCheckChange(){let e=this.getCheckedItems();this.onCheckedItemsChange.emit(e)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["lj-data-v-card"]],inputs:{showSetting:"showSetting",optionsList:"optionsList",title:"title"},outputs:{onCheckedItemsChange:"onCheckedItemsChange"},standalone:!0,features:[c],ngContentSelectors:gr,decls:5,vars:1,consts:[[1,"card-content"],[1,"card-content-title"],[1,"card-content-l"]],template:function(o,r){o&1&&(Ot(),a(0,"div",0)(1,"div",1)(2,"div",2),g(3),m()(),It(4),m()),o&2&&(l(3),st(r.title))},dependencies:[h,oe,M,P,D,$,V,q,U,X,G,x,E,R,J,W,L,H,_,k,F,Q,Z,T,v,j,A,I,Y,b,w,B,y,S,O],styles:['.card-content-title[_ngcontent-%COMP%]{width:fit-content;height:fit-content;padding:5px 20px 0;font-size:16px;color:#29b6f6;text-align:center;background-color:#19426e;border:1px solid #1f6f97;border-radius:10px 10px 0 0;box-shadow:inset 0 0 10px #1f6f97}.card-content[_ngcontent-%COMP%]{overflow:hidden;margin-bottom:.5rem;padding:1rem 1.5rem;background-image:url("./media/dashboard_card_bg-2QFDBQFD.jpg");background-repeat:no-repeat;background-position:center;background-size:100% 100%}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%]{display:flex;margin-bottom:.5rem;font-size:18px;font-weight:600;color:#74fafb}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-l[_ngcontent-%COMP%]{flex:1;align-self:flex-start}.card-content[_ngcontent-%COMP%] .card-content-title[_ngcontent-%COMP%] .card-content-r[_ngcontent-%COMP%]{align-self:flex-end}']});let i=t;return i})();var hr=["myGrid"],hi=(()=>{let t=class t{constructor(){this.defaultColDef={width:130,editable:!1,cellStyle:{"font-weight":"bold"}},this.columnDefs=[],this.rowData=[],this.gridThemeClass="ag-theme-quartz",this.paginationThemeClass="ag-theme-quartz"}ngOnInit(){console.log("-----\u8868\u683C\u521D\u59CB\u5316-----"),this.pageSize=10,this.pageIndex=1,this.pageRowTotal=this.rowData.length}nzPageSizeChange(e){this.pageSize=e}nzPageIndexChange(e){console.log(`nzPageIndexChange${e}`),this.grid.api&&(e==1?this.grid.api.paginationGoToFirstPage():this.grid.api.paginationGoToPage(e))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=f({type:t,selectors:[["lj-app-ag-grid-component"]],viewQuery:function(o,r){if(o&1&&ue(hr,5),o&2){let u;fe(u=ce())&&(r.grid=u.first)}},inputs:{defaultColDef:"defaultColDef",columnDefs:"columnDefs",rowData:"rowData",gridThemeClass:"gridThemeClass",paginationThemeClass:"paginationThemeClass"},standalone:!0,features:[c],decls:8,vars:15,consts:[["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u5F85\u529E\u4EFB\u52A1"],[3,"pagination","suppressPaginationPanel","suppressScrollOnNewData","paginationPageSize","defaultColDef","rowData","columnDefs"],["myGrid",""],[1,"grid-pagination"],[1,"page-total-style"],["nzShowSizeChanger","",3,"nzPageIndex","nzPageSize","nzTotal","className","nzPageSizeChange","nzPageIndexChange"]],template:function(o,r){o&1&&(a(0,"lj-data-v-card",0),s(1,"ag-grid-angular",1,2)(3,"br"),a(4,"div",3)(5,"div",4),g(6),m(),a(7,"nz-pagination",5),z("nzPageSizeChange",function(ie){return r.nzPageSizeChange(ie)})("nzPageIndexChange",function(ie){return r.nzPageIndexChange(ie)}),m()()()),o&2&&(l(),mt(r.gridThemeClass),p("pagination",!0)("suppressPaginationPanel",!0)("suppressPaginationPanel",!0)("suppressScrollOnNewData",!0)("paginationPageSize",r.pageSize)("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.columnDefs),l(5),N("\u5171 ",r.pageRowTotal," \u9879\u6570\u636E"),l(),p("nzPageIndex",r.pageIndex)("nzPageSize",r.pageSize)("nzTotal",r.pageRowTotal)("className",r.paginationThemeClass))},dependencies:[ht,_e,gt,gi],styles:[".grid-pagination[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:32px}.grid-pagination[_ngcontent-%COMP%] .ant-select-selection-item, .ant-select-selector[_ngcontent-%COMP%]{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .page-total-style{font-size:medium;font-weight:700;color:#00eff8} .ant-select-item-option{color:#00eff8!important} .ant-select-item-option-active div{font-weight:800!important;color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .anticon{color:#00eff8}.grid-pagination[_ngcontent-%COMP%] .ant-select-selector{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-prev .ant-pagination-item-link{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item{color:#00eff8;border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item a{color:#00eff8!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active a{color:#000!important}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-next button, .ant-pagination-prev[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#00eff8;border-color:transparent}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active:focus-visible, .ant-pagination-item-active[_ngcontent-%COMP%]:hover, .ant-pagination-next[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%], .ant-pagination-prev[_ngcontent-%COMP%]:hover button[_ngcontent-%COMP%]{border-color:#00eff8;border-width:2px}.grid-pagination[_ngcontent-%COMP%] .ant-pagination-item-active{font-weight:500;background-color:#00eff8;border-color:#00eff8;border-width:2px}"]});let i=t;return i})();var Mr=["myGrid"],vr=()=>[12,12],Mi=(()=>{let t=class t{constructor(e){this._mqttService=e,this.http=d(te),this.modal=d(ee),this.elementRef=d(lt),this.titleService=d(ct),this.defaultColDef={width:170,editable:!1},this.gridThemedClass="ag-theme-quartz ag-theme-datav",this.rowData=[],this.colDefs1=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,sortable:!0,unSortIcon:!0,field:"xh"},{headerName:"\u4EFB\u52A1\u540D\u79F0",unSortIcon:!0,field:"rwmc"},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",unSortIcon:!0,field:"rwms",minWidth:170,flex:1},{headerName:"\u5F00\u59CB\u65F6\u95F4",unSortIcon:!0,field:"kssj",minWidth:170,flex:1},{headerName:"\u8BA1\u5212\u5B8C\u6210\u65F6\u95F4",unSortIcon:!0,field:"jhwcsj",minWidth:170,flex:1},{headerName:"\u8D85\u671F",width:80,field:"sfcq"},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at}],this.colDefs2=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,unSortIcon:!0,field:"xh"},{headerName:"\u4EFB\u52A1\u540D\u79F0",unSortIcon:!0,field:"rwmc"},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",unSortIcon:!0,field:"rwms",minWidth:170,flex:1},{headerName:"\u5F00\u59CB\u65F6\u95F4",unSortIcon:!0,field:"kssj",minWidth:170,flex:1},{headerName:"\u5F53\u524D\u72B6\u6001",field:"dqzt"},{headerName:"\u5F53\u524D\u8282\u70B9",field:"dqjd"},{headerName:"\u5B9E\u9645\u5B8C\u6210\u65F6\u95F4",field:"sjwcsj",minWidth:170,flex:1},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at}],this.colDefs3=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,unSortIcon:!0,field:"xh"},{headerName:"\u62A5\u8B66\u540D\u79F0",unSortIcon:!0,field:"bjmc"},{headerName:"\u62A5\u8B66\u7B49\u7EA7",unSortIcon:!0,field:"bjdg"},{headerName:"\u62A5\u8B66\u63CF\u8FF0",unSortIcon:!0,field:"bjms",minWidth:170,flex:1},{headerName:"\u62A5\u8B66\u65F6\u95F4",unSortIcon:!0,field:"bjsj",minWidth:170,flex:1},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at},{headerName:"\u6545\u969C\u539F\u56E0",field:"gzyy"},{headerName:"\u5904\u7406\u65B9\u6CD5",field:"clff"},{headerName:"\u6CE8\u610F\u4E8B\u9879",field:"clff"}],this.colDefs4=[{headerName:"\u5E8F\u53F7",valueGetter:function(o){return parseInt(o.node.id)+1},width:90,unSortIcon:!0,field:"xh"},{headerName:"\u901A\u77E5\u65F6\u95F4",unSortIcon:!0,field:"tzsj",minWidth:170,flex:1},{headerName:"\u91CD\u8981\u7A0B\u5EA6",unSortIcon:!0,field:"zycd"},{headerName:"\u901A\u77E5\u540D\u79F0",unSortIcon:!0,field:"tzmc"},{headerName:"\u901A\u77E5\u5185\u5BB9",unSortIcon:!0,field:"tznr",minWidth:170,flex:1},{headerName:"\u9644\u4EF6",field:"fj"},{headerName:"\u64CD\u4F5C",autoHeight:!0,width:110,field:"cz",cellRenderer:at}],this.client=e}ngOnInit(){this.titleService.setTitle("\u6211\u7684\u5DE5\u4F5C\u7AD9");for(var e=1;e<30;e++)this.rowData.push({rwmc:`\u4EFB\u52A1${e}`,rwms:`\u4EFB\u52A1\u63CF\u8FF0${e}`,kssj:`2024-1-${e} 13:38:${e*11}`,jhwcsj:`2024-1-${e} 13:38:${e*10}`,sfcq:"\u5426",dqzt:"\u6B63\u5E38",dqjd:`\u8282\u70B9${e}`,sjwcsj:`2024-1-${e} 13:38:${e*27}`,bjmc:"\u62A5\u8B665",bjms:"\u62A5\u8B66\u63CF\u8FF05",bjsj:`2024-1-${e} 13:38:${e*12}`,gzyy:"-",clff:"-",tzsj:`2024-1-${e} 13:38:${e*19}`,zycd:"\u4E00\u822C",tzmc:"\u7CFB\u7EDF\u63D0\u793A",tznr:"\u8D26\u6237\u767B\u5F55",fj:"-",cz:"\u64CD\u4F5C"})}ngAfterViewInit(){let e=this.elementRef.nativeElement.querySelector(".ag-theme-datav"),o=e.querySelector(".ag-body-viewport"),r=e.querySelector(".ag-scroller")}add(){}};t.\u0275fac=function(o){return new(o||t)(ae(se))},t.\u0275cmp=f({type:t,selectors:[["app-data-v-workstation"]],viewQuery:function(o,r){if(o&1&&ue(Mr,5),o&2){let u;fe(u=ce())&&(r.grid=u.first)}},standalone:!0,features:[c],decls:8,vars:15,consts:[["nz-row","",3,"nzGutter"],[2,"width","50%",3,"defaultColDef","rowData","columnDefs","gridThemeClass"],["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u5DF2\u529E\u4EFB\u52A1"],["gridThemeClass","ag-theme-quartz ag-theme-datav",2,"width","100%",3,"defaultColDef","rowData","columnDefs"],["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u62A5\u8B66\u4FE1\u606F"],["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12","title","\u901A\u77E5"]],template:function(o,r){o&1&&(a(0,"div",0),s(1,"lj-app-ag-grid-component",1),a(2,"data-v-card",2),s(3,"app-ag-grid-component",3),m(),a(4,"data-v-card",4),s(5,"app-ag-grid-component",3),m(),a(6,"data-v-card",5),s(7,"app-ag-grid-component",3),m()()),o&2&&(p("nzGutter",dt(14,vr)),l(),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs1)("gridThemeClass",r.gridThemedClass),l(2),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs2),l(2),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs3),l(2),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs4))},dependencies:[ci,hi,_e,Uo,P,D,$,V,q,U,X,G,x,E,R,J,W,L,jo,Lo,H,_,k,F,Q,Z,T,v,j,M,A,I,Y,b,w,B,y,h,S,O],styles:[".ag-theme-datav .ag-row-selected .ag-ltr .ag-cell{color:red!important} .ag-theme-datav .ag-ltr .ag-row-focus{font-weight:600;color:red} .ag-theme-datav .ag-ltr .ag-row-focus .ag-cell-focus{border:#74FAFB} .ag-theme-datav .ag-ltr .ag-row-focus .ag-grid-button-style{color:red;border-color:red} .ag-theme-datav{--ag-border-color: #74FAFB;--ag-foreground-color: #74FAFB;--ag-background-color: #0A1632;--ag-header-foreground-color: #74FAFB;--ag-header-background-color: #0A1632;--ag-odd-row-background-color: #0A1632;--ag-header-column-resize-handle-color: #7e2e84;--ag-font-size: 12px;--ag-font-family: monospace;height:17rem;font-weight:700;border-width:3px} .ag-theme-datav .ag-header-cell-resize{--ag-header-column-resize-handle-color: #00eff8} .ag-theme-datav .ag-header-row{font-size:14px;font-weight:700} .ag-theme-datav .ag-root-wrapper{border-radius:0} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar{width:12em} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb{margin-left:40px;background-color:#00eff8;border:2px solid #00eff8} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-track{background-color:transparent;border-color:#00eff8} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:hover{margin-left:40px;background-color:#00eff8} .ag-theme-datav .ag-body-vertical-scroll-viewport::-webkit-scrollbar-thumb:active{background-color:#00eff8} .ag-body-vertical-scroll-viewport{scrollbar-color:auto} .ag-body-horizontal-scroll-viewport{scrollbar-color:auto} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar{height:14em;color:#000} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track{background-color:transparent;border-color:#00eff8} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:hover{background-color:#00eff8} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:active{background-color:#00eff8} .ag-theme-datav .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb{background-color:#00eff8}"]});let i=t;return i})();var vi=[{path:"home",component:qo,canActivate:[Fo,So],canActivateChild:[yo],data:{},children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"sys",loadChildren:()=>import("./chunk-GNH673QO.js").then(i=>i.routes)}]},{path:"",component:fi,children:[{path:"",component:Mi},{path:"data-v",loadChildren:()=>import("./chunk-R3OIOWDW.js").then(i=>i.routes)}]},{path:"",loadChildren:()=>import("./chunk-FD5ZSWKQ.js").then(i=>i.routes)},{path:"exception",loadChildren:()=>import("./chunk-MUTNAUEH.js").then(i=>i.routes)},{path:"**",redirectTo:"exception/404"}];var zi=[io];var Ci=[oo,ro,no,lo,ao,mo,po,so,uo,go,fo,co,ho,Mo];var Ni={hostname:"127.0.0.1",port:1883,path:"/mqtt",protocol:"ws"},zr={abbr:"zh-CN",ng:Zo,zorro:Co,date:xt,delon:bo},Cr={auth:{login_url:"/passport/login"}},Nr={},_i=[Jt(),Kt(),Yt({scrollPositionRestoration:"top"})];ne.useHash&&_i.push(Zt());var wi=[Gt(Bt([...ne.interceptorFns??[],To,Io])),to(),Qt(vi,..._i),xo({config:Cr,defaultLang:zr,icons:[...Ci,...zi]}),eo(Nr),Oo(),Eo(...Xo),Ho(...$o),Wo({widgets:[...Bo]}),{provide:se,useFactory:()=>new se(Ni)},ko(),{provide:se,useFactory:()=>new se(Ni)},...ne.providers||[]];ne.api?.refreshTokenEnabled&&ne.api.refreshTokenType==="auth-refresh"&&wi.push(wt());var bi={providers:wi};$t(Yo,bi).catch(i=>console.error(i)); diff --git a/package.json b/package.json index c474611..1c6198c 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@microsoft/signalr": "^8.0.0", "@microsoft/signalr-protocol-msgpack": "^8.0.0", "@types/signalr": "^2.4.3", + "@types/three": "^0.162.0", "ag-grid-angular": "^31.0.2", "echarts": "^5.5.0", "moment": "^2.30.1", @@ -51,6 +52,8 @@ "ngx-mqtt": "^17.0.0", "rxjs": "~7.8.0", "screenfull": "^6.0.2", + "three": "^0.162.0", + "three-orbitcontrols-ts": "^0.1.2", "tslib": "^2.3.0", "zone.js": "~0.14.3" }, diff --git a/src/app/routes/data-v/routes.ts b/src/app/routes/data-v/routes.ts index 7638e8d..e43c8ab 100644 --- a/src/app/routes/data-v/routes.ts +++ b/src/app/routes/data-v/routes.ts @@ -7,6 +7,7 @@ import { DataVSecond1Component } from './second1/second1.component'; import { DataVThreejsComponent } from './threejs/threejs.component'; import { DataVUserComponent } from './user/user.component'; import { DataVWorkstationComponent } from './workstation/workstation.component'; +import { DataVT1Component } from './t1/t1.component'; export const routes: Routes = [ { @@ -19,5 +20,6 @@ export const routes: Routes = [ component: DataVSecond1Component, data: { menu: null } }, - { path: 'threejs/:id', component: DataVThreejsComponent } + { path: 'threejs/:id', component: DataVThreejsComponent }, + { path: 't1/:id', component: DataVT1Component } ]; diff --git a/src/app/routes/data-v/s1/s1.component.html b/src/app/routes/data-v/s1/s1.component.html index 422ce7e..891f7a0 100644 --- a/src/app/routes/data-v/s1/s1.component.html +++ b/src/app/routes/data-v/s1/s1.component.html @@ -46,46 +46,57 @@
-
-
机器人
-
全硫仪
-
全水分析仪
-
挥发分仪
-
量热仪
-
谈情氮元素
+
+
+ 机器人 +
+
+ 全硫仪 +
+
+ 全水分析仪 +
+
+ 挥发分仪 +
+
+ 量热仪 +
+
+ 碳氢氮元素 +
- +
- @for (item of chartConfig.optionsCheckList; track item) { + @for(item of chartConfig.optionsCheckList; track item) {
- + *ngIf="item.checked" />
- } + }
- @for (item of chartConfig.optionBottomList; track item) { + @for(item of chartConfig.optionBottomList; track item) {
- } + }
+ + diff --git a/src/app/routes/data-v/s1/s1.component.ts b/src/app/routes/data-v/s1/s1.component.ts index 39f37f1..ec92287 100644 --- a/src/app/routes/data-v/s1/s1.component.ts +++ b/src/app/routes/data-v/s1/s1.component.ts @@ -15,6 +15,8 @@ import { Subscription, finalize } from 'rxjs'; import { IMqttMessage, MqttService } from 'ngx-mqtt'; import { ChartComponentComponent } from './chart-component/chart-component.component'; import { NzListModule } from 'ng-zorro-antd/list'; +import { TitleService } from '@delon/theme'; + @Component({ selector: 'app-data-v-s1', standalone: true, diff --git a/src/app/routes/data-v/t1/t1.component.html b/src/app/routes/data-v/t1/t1.component.html new file mode 100644 index 0000000..fc5f581 --- /dev/null +++ b/src/app/routes/data-v/t1/t1.component.html @@ -0,0 +1,6 @@ + + + +
+
+
\ No newline at end of file diff --git a/src/app/routes/data-v/t1/t1.component.ts b/src/app/routes/data-v/t1/t1.component.ts new file mode 100644 index 0000000..601f7c6 --- /dev/null +++ b/src/app/routes/data-v/t1/t1.component.ts @@ -0,0 +1,121 @@ +import { Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFSchema } from '@delon/form'; +import { ModalHelper, _HttpClient } from '@delon/theme'; +import { SHARED_IMPORTS } from '@shared'; +import * as THREE from 'three'; +import { OrbitControls } from 'three-orbitcontrols-ts'; +import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader'; +import { TitleService } from '@delon/theme'; + +const clock = new THREE.Clock(); +let mixer: { update: (arg0: number) => void }; + +@Component({ + selector: 'app-data-v-t1', + standalone: true, + imports: [...SHARED_IMPORTS], + templateUrl: './t1.component.html' +}) +export class DataVT1Component implements OnInit { + private readonly http = inject(_HttpClient); + private readonly modal = inject(ModalHelper); + private readonly titleService = inject(TitleService); + + @ViewChild('Three', { static: true }) container!: ElementRef; + public scene!: THREE.Scene; + public camera!: THREE.PerspectiveCamera; + public renderer!: THREE.WebGLRenderer; + public cube!: THREE.Mesh; + + ngOnInit(): void { + this.titleService.setTitle('重磅3D'); + this.initThreeJs(); + this.animate(); + } + + private initThreeJs(): void { + // 创建相机 + this.camera = new THREE.PerspectiveCamera(40, window.innerWidth / window.innerHeight, 1, 20000); + this.camera.position.set(2200, 300, -3100); + + //创建场景 + this.scene = new THREE.Scene(); + this.scene.background = new THREE.Color(0x040516); + + const hemiLight = new THREE.HemisphereLight(0xffffff, 0x444444, 5); + hemiLight.position.set(0, 200, 0); + this.scene.add(hemiLight); + + const dirLight = new THREE.DirectionalLight(0xffffff, 5); + dirLight.position.set(0, 200, 100); + dirLight.castShadow = true; + dirLight.shadow.camera.top = 180; + dirLight.shadow.camera.bottom = -100; + dirLight.shadow.camera.left = -120; + dirLight.shadow.camera.right = 120; + this.scene.add(dirLight); + + const that = this; + const loader = new FBXLoader(); + loader.load( + 'assets/fbx/bb.fbx', + function (object) { + object.traverse(function (child) { + // if (child.isMesh) { + // child.castShadow = true; + // child.receiveShadow = true; + // } + }); + that.scene.add(object); + }, + xhr => { + // loading progress + }, + err => { + console.error('An error happened', err); + } + ); + + this.renderer = new THREE.WebGLRenderer({ antialias: true }); + this.renderer.setPixelRatio(window.devicePixelRatio); + this.renderer.setSize(window.innerWidth, window.innerHeight); + this.renderer.shadowMap.enabled = true; + this.container.nativeElement.appendChild(this.renderer.domElement); + + const radius = 5; // 圆的半径 + const segments = 32; // 圆的分段数 + const geometry = new THREE.CircleGeometry(radius, segments); + const material = new THREE.MeshBasicMaterial({ color: 0xff0000 }); // 红色材质,你可以根据需要调整颜色 + const circle = new THREE.Mesh(geometry, material); + circle.position.set(850, 100, -2000); // 设置圆的位置 + this.scene.add(circle); + + const controls = new OrbitControls(this.camera, this.renderer.domElement); + controls.target.set(850, 100, -2000); + controls.update(); + + //const axesHelper = new THREE.AxesHelper(1000); + //this.scene.add(axesHelper); + + window.addEventListener('resize', this.onWindowResize); + } + + public render(): void { + this.cube.rotation.x += 0.01; + this.cube.rotation.y += 0.01; + this.renderer.render(this.scene, this.camera); + } + + onWindowResize() { + this.camera.aspect = window.innerWidth / window.innerHeight; + this.camera.updateProjectionMatrix(); + this.renderer.setSize(window.innerWidth, window.innerHeight); + } + animate = () => { + requestAnimationFrame(this.animate); + const delta = clock.getDelta(); + if (mixer) mixer.update(delta); + this.renderer.render(this.scene, this.camera); + }; +} diff --git a/src/app/routes/data-v/workstation/workstation.component.ts b/src/app/routes/data-v/workstation/workstation.component.ts index c225c96..806fb65 100644 --- a/src/app/routes/data-v/workstation/workstation.component.ts +++ b/src/app/routes/data-v/workstation/workstation.component.ts @@ -1,5 +1,5 @@ import { AfterViewInit, Component, ElementRef, OnInit, ViewChild, inject } from '@angular/core'; -import { ModalHelper, _HttpClient } from '@delon/theme'; +import { ModalHelper, TitleService, _HttpClient } from '@delon/theme'; import { SHARED_IMPORTS } from '@shared'; import { AgGridAngular } from 'ag-grid-angular'; import { ColDef, GridApi } from 'ag-grid-community'; @@ -32,6 +32,7 @@ export class DataVWorkstationComponent implements OnInit, AfterViewInit { private readonly http = inject(_HttpClient); private readonly modal = inject(ModalHelper); private readonly elementRef = inject(ElementRef); + private readonly titleService = inject(TitleService); @ViewChild('myGrid') grid!: AgGridAngular; public defaultColDef: ColDef = { @@ -129,7 +130,7 @@ export class DataVWorkstationComponent implements OnInit, AfterViewInit { } ngOnInit(): void { - console.log(`ngOnInit${this.rowData.length}`); + this.titleService.setTitle('我的工作站'); for (var i = 1; i < 30; i++) { this.rowData.push({ diff --git a/src/app/routes/passport/login/login.component.html b/src/app/routes/passport/login/login.component.html index f3afb29..1c1e6c0 100644 --- a/src/app/routes/passport/login/login.component.html +++ b/src/app/routes/passport/login/login.component.html @@ -29,8 +29,6 @@ - - example diff --git a/src/app/routes/passport/login/login.component.less b/src/app/routes/passport/login/login.component.less index 2ce334e..508822a 100644 --- a/src/app/routes/passport/login/login.component.less +++ b/src/app/routes/passport/login/login.component.less @@ -91,15 +91,20 @@ color: #515151; vertical-align: middle; } + } - .color-515151 { - color: #515151; - } + + .color-515151 { + color: #515151; } } [data-theme='dark'] { :host ::ng-deep { + display: block; + width: 538px; + margin: 0 auto; + .icon { color: rgb(255 255 255 / 20%); diff --git a/src/assets/fbx/bb.fbx b/src/assets/fbx/bb.fbx new file mode 100644 index 0000000..7469476 Binary files /dev/null and b/src/assets/fbx/bb.fbx differ diff --git a/tsconfig.json b/tsconfig.json index e640c37..19b308a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -36,7 +36,9 @@ ], "@_mock": [ "_mock/index" - ] + ], + "three": ["./node_modules/three/src/Three"], + "three/*": ["./node_modules/three/*"] } }, "angularCompilerOptions": { diff --git a/yarn.lock b/yarn.lock index d525a40..9128809 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2277,6 +2277,11 @@ "@tufjs/canonical-json" "2.0.0" minimatch "^9.0.3" +"@tweenjs/tween.js@~23.1.1": + version "23.1.1" + resolved "https://registry.npmmirror.com/@tweenjs/tween.js/-/tween.js-23.1.1.tgz#0ae28ed9c635805557f78c2626464018d5f1b5e2" + integrity sha512-ZpboH7pCPPeyBWKf8c7TJswtCEQObFo3bOBYalm99NzZarATALYCo5OhbCa/n4RQyJyHfhkdx+hNrdL5ByFYDw== + "@types/body-parser@*": version "1.19.5" resolved "https://registry.npmmirror.com/@types/body-parser/-/body-parser-1.19.5.tgz" @@ -2509,6 +2514,11 @@ dependencies: "@types/node" "*" +"@types/stats.js@*": + version "0.17.3" + resolved "https://registry.npmmirror.com/@types/stats.js/-/stats.js-0.17.3.tgz#705446e12ce0fad618557dd88236f51148b7a935" + integrity sha512-pXNfAD3KHOdif9EQXZ9deK82HVNaXP5ZIF5RP2QG6OQFNTaY2YIetfrE9t528vEreGQvEPRDDc8muaoYeK0SxQ== + "@types/swagger-schema-official@2.0.22": version "2.0.22" resolved "https://registry.npmmirror.com/@types/swagger-schema-official/-/swagger-schema-official-2.0.22.tgz" @@ -2519,6 +2529,22 @@ resolved "https://registry.npmmirror.com/@types/swagger-schema-official/-/swagger-schema-official-2.0.25.tgz" integrity sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg== +"@types/three@^0.162.0": + version "0.162.0" + resolved "https://registry.npmmirror.com/@types/three/-/three-0.162.0.tgz#79d170c88f14b2eaee6b76af00fc4016a533e586" + integrity sha512-0j5yZcVukVIhrhSIC7+LmBPkkMoMuEJ1AfYBZfgNytdYqYREMuiyXWhYOMeZLBElTEAlJIZn7r2W3vqTIgjWlg== + dependencies: + "@tweenjs/tween.js" "~23.1.1" + "@types/stats.js" "*" + "@types/webxr" "*" + fflate "~0.6.10" + meshoptimizer "~0.18.1" + +"@types/webxr@*": + version "0.5.14" + resolved "https://registry.npmmirror.com/@types/webxr/-/webxr-0.5.14.tgz#9a03121a4912ea113b31e5c9c17f164d4fff8a1f" + integrity sha512-UEMMm/Xn3DtEa+gpzUrOcDj+SJS1tk5YodjwOxcqStNhCfPcwgyC5Srg2ToVKyg2Fhq16Ffpb0UWUQHqoT9AMA== + "@types/ws@^8.5.5", "@types/ws@^8.5.9": version "8.5.10" resolved "https://registry.npmmirror.com/@types/ws/-/ws-8.5.10.tgz" @@ -4948,6 +4974,11 @@ fetch-cookie@^2.0.3: set-cookie-parser "^2.4.8" tough-cookie "^4.0.0" +fflate@~0.6.10: + version "0.6.10" + resolved "https://registry.npmmirror.com/fflate/-/fflate-0.6.10.tgz#5f40f9659205936a2d18abf88b2e7781662b6d43" + integrity sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg== + figures@3.2.0: version "3.2.0" resolved "https://registry.npmmirror.com/figures/-/figures-3.2.0.tgz" @@ -6769,6 +6800,11 @@ merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +meshoptimizer@~0.18.1: + version "0.18.1" + resolved "https://registry.npmmirror.com/meshoptimizer/-/meshoptimizer-0.18.1.tgz#cdb90907f30a7b5b1190facd3b7ee6b7087797d8" + integrity sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw== + methods@~1.1.2: version "1.1.2" resolved "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz" @@ -9494,6 +9530,23 @@ text-table@0.2.0, text-table@^0.2.0: resolved "https://registry.npmmirror.com/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +three-orbitcontrols-ts@^0.1.2: + version "0.1.2" + resolved "https://registry.npmmirror.com/three-orbitcontrols-ts/-/three-orbitcontrols-ts-0.1.2.tgz#2040955904022ae19c2e9c52ffdff43168658abd" + integrity sha512-HG45dhJX4010lt/Ohk2d2K0kBaxCS6NLO3+wG9BDfMM5ddH7zMPuF3fhcn8vI4eqcSITtid0OoHEttHhjkIKEQ== + dependencies: + three "^0.83.0" + +three@^0.162.0: + version "0.162.0" + resolved "https://registry.npmmirror.com/three/-/three-0.162.0.tgz" + integrity sha512-xfCYj4RnlozReCmUd+XQzj6/5OjDNHBy5nT6rVwrOKGENAvpXe2z1jL+DZYaMu4/9pNsjH/4Os/VvS9IrH7IOQ== + +three@^0.83.0: + version "0.83.0" + resolved "https://registry.npmmirror.com/three/-/three-0.83.0.tgz#3b7f94790af3e021dac1f44a2617569ca2032b0b" + integrity sha512-x9TqsmvhHG/Lw16Zi9zbJ0ho+kP8SgIfsz8dJYZbeWaFWoVwdXKolQQAftkUlpuKDys1+6SZIBHoA2QdoZKByQ== + through@^2.3.4: version "2.3.8" resolved "https://registry.npmmirror.com/through/-/through-2.3.8.tgz"