From dc3d7517729f4866487861f1725afe488d9de59f Mon Sep 17 00:00:00 2001 From: ocean2 Date: Mon, 25 Mar 2024 17:36:54 +0800 Subject: [PATCH] #feat v0325 release --- .../browser/assets/dashboard/setting.svg | 1 + .../browser/chunk-2D265ORJ.js | 2 - .../browser/chunk-M4HTTI2X.js | 9 + .../{chunk-HCPW2OGS.js => chunk-MRNYEB3J.js} | 2 +- .../{chunk-GNH673QO.js => chunk-MU3AQSF6.js} | 2 +- .../{chunk-2TNVIQ4O.js => chunk-SIJVS6LY.js} | 2 +- .../{chunk-FD5ZSWKQ.js => chunk-TZPPFKXI.js} | 2 +- .../{chunk-R3OIOWDW.js => chunk-U3NGNWYP.js} | 632 +++++++++--------- .../{chunk-OOUNO2UZ.js => chunk-WD6SV3WH.js} | 4 +- dist/himp.platform.angular/browser/index.html | 4 +- .../browser/main-3JB53C7N.js | 2 - .../browser/main-RNIBGAQI.js | 2 + 12 files changed, 336 insertions(+), 328 deletions(-) create mode 100644 dist/himp.platform.angular/browser/assets/dashboard/setting.svg delete mode 100644 dist/himp.platform.angular/browser/chunk-2D265ORJ.js create mode 100644 dist/himp.platform.angular/browser/chunk-M4HTTI2X.js rename dist/himp.platform.angular/browser/{chunk-HCPW2OGS.js => chunk-MRNYEB3J.js} (99%) rename dist/himp.platform.angular/browser/{chunk-GNH673QO.js => chunk-MU3AQSF6.js} (99%) rename dist/himp.platform.angular/browser/{chunk-2TNVIQ4O.js => chunk-SIJVS6LY.js} (91%) rename dist/himp.platform.angular/browser/{chunk-FD5ZSWKQ.js => chunk-TZPPFKXI.js} (97%) rename dist/himp.platform.angular/browser/{chunk-R3OIOWDW.js => chunk-U3NGNWYP.js} (83%) rename dist/himp.platform.angular/browser/{chunk-OOUNO2UZ.js => chunk-WD6SV3WH.js} (98%) delete mode 100644 dist/himp.platform.angular/browser/main-3JB53C7N.js create mode 100644 dist/himp.platform.angular/browser/main-RNIBGAQI.js diff --git a/dist/himp.platform.angular/browser/assets/dashboard/setting.svg b/dist/himp.platform.angular/browser/assets/dashboard/setting.svg new file mode 100644 index 0000000..4684810 --- /dev/null +++ b/dist/himp.platform.angular/browser/assets/dashboard/setting.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/himp.platform.angular/browser/chunk-2D265ORJ.js b/dist/himp.platform.angular/browser/chunk-2D265ORJ.js deleted file mode 100644 index f6967df..0000000 --- a/dist/himp.platform.angular/browser/chunk-2D265ORJ.js +++ /dev/null @@ -1,2 +0,0 @@ -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-M4HTTI2X.js b/dist/himp.platform.angular/browser/chunk-M4HTTI2X.js new file mode 100644 index 0000000..e5962de --- /dev/null +++ b/dist/himp.platform.angular/browser/chunk-M4HTTI2X.js @@ -0,0 +1,9 @@ +import{$a as pt,A as Ke,C as Ye,Ca as nt,Ga as st,Ia as at,La as lt,O as $t,P as Jt,Pa as ut,S as Xt,Sa as ht,T as Zt,U as er,Ua as ft,V as Qe,Xa as ct,_ as Ge,aa as tr,bb as dt,ca as $e,da as rr,db as gt,e as Ve,fa as ir,fb as mt,ga as nr,ha as sr,hb as yt,ia as or,j as Yt,ja as ar,jb as _t,ka as lr,la as Je,n as Qt,pa as Xe,ra as Ze,ta as et,u as ze,ua as tt,v as qe,wa as rt,ya as it,z as Gt}from"./chunk-WD6SV3WH.js";import{Db as Ne,Eb as Te,Fb as Re,Fe as qt,Ge as De,He as Kt,I as Bt,J as kt,Jb as Le,K as Nt,Ka as ge,Le as je,Nf as ot,Oa as me,Ta as Ee,Va as be,X as Lt,Y as Ut,a as Me,b as Be,c as Oe,cc as Ue,dc as zt,f as cr,gb as _e,h as Tt,ha as Ft,hb as ye,hf as We,ib as Dt,ja as vt,k as Ie,ka as Et,l as Rt,lf as He,m as Pt,mb as jt,n as Ot,na as ke,nc as Fe,o as wt,p as Mt,qb as Wt,sa as St,sb as Ae,ta as xt,tb as Ht,ub as Vt}from"./chunk-VDRVUQCF.js";var It=cr((hr,Ct)=>{"use strict";(function(ae){if(typeof hr=="object"&&typeof Ct<"u")Ct.exports=ae();else if(typeof define=="function"&&define.amd)define([],ae);else{var ue;typeof window<"u"?ue=window:typeof global<"u"?ue=global:typeof self<"u"?ue=self:ue=this,ue.mqtt=ae()}})(function(){var ae,ue,pe;return function(){function y(k,x,p){function c(s,i){if(!x[s]){if(!k[s]){var r=typeof Oe=="function"&&Oe;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 u=k[s][1][o];return c(u||o)},t,t.exports,y,k,x,p)}return x[s].exports}for(var m=typeof Oe=="function"&&Oe,h=0;h0)throw new Error("Invalid string. Length must be a multiple of 4");var v=_.indexOf("=");v===-1&&(v=f);var R=v===f?0:4-v%4;return[v,R]}function e(_){var f=r(_),v=f[0],R=f[1];return(v+R)*3/4-R}function t(_,f,v){return(f+v)*3/4-v}function o(_){var f,v=r(_),R=v[0],A=v[1],W=new m(t(_,R,A)),j=0,C=A>0?R-4:R,P;for(P=0;P>16&255,W[j++]=f>>8&255,W[j++]=f&255;return A===2&&(f=c[_.charCodeAt(P)]<<2|c[_.charCodeAt(P+1)]>>4,W[j++]=f&255),A===1&&(f=c[_.charCodeAt(P)]<<10|c[_.charCodeAt(P+1)]<<4|c[_.charCodeAt(P+2)]>>2,W[j++]=f>>8&255,W[j++]=f&255),W}function u(_){return p[_>>18&63]+p[_>>12&63]+p[_>>6&63]+p[_&63]}function d(_,f,v){for(var R,A=[],W=f;WC?C:j+W));return R===1?(f=_[v-1],A.push(p[f>>2]+p[f<<4&63]+"==")):R===2&&(f=(_[v-2]<<8)+_[v-1],A.push(p[f>>10]+p[f>>4&63]+p[f<<2&63]+"=")),A.join("")}},{}],2:[function(y,k,x){},{}],3:[function(y,k,x){(function(p){(function(){"use strict";var c=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 l=new Uint8Array(1);return l.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},l.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(l){if(l>h)throw new RangeError('The value "'+l+'" is invalid for option "size"');var n=new Uint8Array(l);return n.__proto__=r.prototype,n}function r(l,n,a){if(typeof l=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(l)}return e(l,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(l,n,a){if(typeof l=="string")return d(l,n);if(ArrayBuffer.isView(l))return g(l);if(l==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);if(Q(l,ArrayBuffer)||l&&Q(l.buffer,ArrayBuffer))return _(l,n,a);if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var w=l.valueOf&&l.valueOf();if(w!=null&&w!==l)return r.from(w,n,a);var L=f(l);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof l[Symbol.toPrimitive]=="function")return r.from(l[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 l)}r.from=function(l,n,a){return e(l,n,a)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array;function t(l){if(typeof l!="number")throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('The value "'+l+'" is invalid for option "size"')}function o(l,n,a){return t(l),l<=0?i(l):n!==void 0?typeof a=="string"?i(l).fill(n,a):i(l).fill(n):i(l)}r.alloc=function(l,n,a){return o(l,n,a)};function u(l){return t(l),i(l<0?0:v(l)|0)}r.allocUnsafe=function(l){return u(l)},r.allocUnsafeSlow=function(l){return u(l)};function d(l,n){if((typeof n!="string"||n==="")&&(n="utf8"),!r.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var a=A(l,n)|0,w=i(a),L=w.write(l,n);return L!==a&&(w=w.slice(0,L)),w}function g(l){for(var n=l.length<0?0:v(l.length)|0,a=i(n),w=0;w=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return l|0}function R(l){return+l!=l&&(l=0),r.alloc(+l)}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 w=n.length,L=a.length,K=0,J=Math.min(w,L);K2&&arguments[2]===!0;if(!w&&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(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a*2;case"hex":return a>>>1;case"base64":return N(l).length;default:if(L)return w?-1:te(l).length;n=(""+n).toLowerCase(),L=!0}}r.byteLength=A;function W(l,n,a){var w=!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(l||(l="utf8");;)switch(l){case"hex":return ee(this,n,a);case"utf8":case"utf-8":return E(this,n,a);case"ascii":return z(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(w)throw new TypeError("Unknown encoding: "+l);l=(l+"").toLowerCase(),w=!0}}r.prototype._isBuffer=!0;function j(l,n,a){var w=l[n];l[n]=l[a],l[a]=w}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,w,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),w===void 0&&(w=n?n.length:0),L===void 0&&(L=0),K===void 0&&(K=this.length),a<0||w>n.length||L<0||K>this.length)throw new RangeError("out of range index");if(L>=K&&a>=w)return 0;if(L>=K)return-1;if(a>=w)return 1;if(a>>>=0,w>>>=0,L>>>=0,K>>>=0,this===n)return 0;for(var J=K-L,le=w-a,he=Math.min(J,le),fe=this.slice(L,K),de=n.slice(a,w),ce=0;ce2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),a=+a,b(a)&&(a=L?0:l.length-1),a<0&&(a=l.length+a),a>=l.length){if(L)return-1;a=l.length-1}else if(a<0)if(L)a=0;else return-1;if(typeof n=="string"&&(n=r.from(n,w)),r.isBuffer(n))return n.length===0?-1:P(l,n,a,w,L);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(l,n,a):Uint8Array.prototype.lastIndexOf.call(l,n,a):P(l,[n],a,w,L);throw new TypeError("val must be string, number or Buffer")}function P(l,n,a,w,L){var K=1,J=l.length,le=n.length;if(w!==void 0&&(w=String(w).toLowerCase(),w==="ucs2"||w==="ucs-2"||w==="utf16le"||w==="utf-16le")){if(l.length<2||n.length<2)return-1;K=2,J/=2,le/=2,a/=2}function he(Se,ve){return K===1?Se[ve]:Se.readUInt16BE(ve*K)}var fe;if(L){var de=-1;for(fe=a;feJ&&(a=J-le),fe=a;fe>=0;fe--){for(var ce=!0,we=0;weL&&(w=L)):w=L;var K=n.length;w>K/2&&(w=K/2);for(var J=0;J>>0,isFinite(w)?(w=w>>>0,L===void 0&&(L="utf8")):(L=w,w=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-a;if((w===void 0||w>K)&&(w=K),n.length>0&&(w<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,w);case"utf8":case"utf-8":return V(this,n,a,w);case"ascii":return B(this,n,a,w);case"latin1":case"binary":return ne(this,n,a,w);case"base64":return se(this,n,a,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,n,a,w);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(l,n,a){return n===0&&a===l.length?c.fromByteArray(l):c.fromByteArray(l.slice(n,a))}function E(l,n,a){a=Math.min(l.length,a);for(var w=[],L=n;L239?4:K>223?3:K>191?2:1;if(L+le<=a){var he,fe,de,ce;switch(le){case 1:K<128&&(J=K);break;case 2:he=l[L+1],(he&192)===128&&(ce=(K&31)<<6|he&63,ce>127&&(J=ce));break;case 3:he=l[L+1],fe=l[L+2],(he&192)===128&&(fe&192)===128&&(ce=(K&15)<<12|(he&63)<<6|fe&63,ce>2047&&(ce<55296||ce>57343)&&(J=ce));break;case 4:he=l[L+1],fe=l[L+2],de=l[L+3],(he&192)===128&&(fe&192)===128&&(de&192)===128&&(ce=(K&15)<<18|(he&63)<<12|(fe&63)<<6|de&63,ce>65535&&ce<1114112&&(J=ce))}}J===null?(J=65533,le=1):J>65535&&(J-=65536,w.push(J>>>10&1023|55296),J=56320|J&1023),w.push(J),L+=le}return U(w)}var T=4096;function U(l){var n=l.length;if(n<=T)return String.fromCharCode.apply(String,l);for(var a="",w=0;ww)&&(a=w);for(var L="",K=n;Kw&&(n=w),a<0?(a+=w,a<0&&(a=0)):a>w&&(a=w),aa)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUIntLE=function(n,a,w){n=n>>>0,a=a>>>0,w||D(n,a,this.length);for(var L=this[n],K=1,J=0;++J>>0,a=a>>>0,w||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,w){n=n>>>0,a=a>>>0,w||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,w){n=n>>>0,a=a>>>0,w||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 w=this[n]|this[n+1]<<8;return w&32768?w|4294901760:w},r.prototype.readInt16BE=function(n,a){n=n>>>0,a||D(n,2,this.length);var w=this[n+1]|this[n]<<8;return w&32768?w|4294901760:w},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(l,n,a,w,L,K){if(!r.isBuffer(l))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>L||nl.length)throw new RangeError("Index out of range")}r.prototype.writeUIntLE=function(n,a,w,L){if(n=+n,a=a>>>0,w=w>>>0,!L){var K=Math.pow(2,8*w)-1;X(this,n,a,w,K,0)}var J=1,le=0;for(this[a]=n&255;++le>>0,w=w>>>0,!L){var K=Math.pow(2,8*w)-1;X(this,n,a,w,K,0)}var J=w-1,le=1;for(this[a+J]=n&255;--J>=0&&(le*=256);)this[a+J]=n/le&255;return a+w},r.prototype.writeUInt8=function(n,a,w){return n=+n,a=a>>>0,w||X(this,n,a,1,255,0),this[a]=n&255,a+1},r.prototype.writeUInt16LE=function(n,a,w){return n=+n,a=a>>>0,w||X(this,n,a,2,65535,0),this[a]=n&255,this[a+1]=n>>>8,a+2},r.prototype.writeUInt16BE=function(n,a,w){return n=+n,a=a>>>0,w||X(this,n,a,2,65535,0),this[a]=n>>>8,this[a+1]=n&255,a+2},r.prototype.writeUInt32LE=function(n,a,w){return n=+n,a=a>>>0,w||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,w){return n=+n,a=a>>>0,w||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,w,L){if(n=+n,a=a>>>0,!L){var K=Math.pow(2,8*w-1);X(this,n,a,w,K-1,-K)}var J=0,le=1,he=0;for(this[a]=n&255;++J>0)-he&255;return a+w},r.prototype.writeIntBE=function(n,a,w,L){if(n=+n,a=a>>>0,!L){var K=Math.pow(2,8*w-1);X(this,n,a,w,K-1,-K)}var J=w-1,le=1,he=0;for(this[a+J]=n&255;--J>=0&&(le*=256);)n<0&&he===0&&this[a+J+1]!==0&&(he=1),this[a+J]=(n/le>>0)-he&255;return a+w},r.prototype.writeInt8=function(n,a,w){return n=+n,a=a>>>0,w||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,w){return n=+n,a=a>>>0,w||X(this,n,a,2,32767,-32768),this[a]=n&255,this[a+1]=n>>>8,a+2},r.prototype.writeInt16BE=function(n,a,w){return n=+n,a=a>>>0,w||X(this,n,a,2,32767,-32768),this[a]=n>>>8,this[a+1]=n&255,a+2},r.prototype.writeInt32LE=function(n,a,w){return n=+n,a=a>>>0,w||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,w){return n=+n,a=a>>>0,w||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 $(l,n,a,w,L,K){if(a+w>l.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function oe(l,n,a,w,L){return n=+n,a=a>>>0,L||$(l,n,a,4,34028234663852886e22,-34028234663852886e22),m.write(l,n,a,w,23,4),a+4}r.prototype.writeFloatLE=function(n,a,w){return oe(this,n,a,!0,w)},r.prototype.writeFloatBE=function(n,a,w){return oe(this,n,a,!1,w)};function Z(l,n,a,w,L){return n=+n,a=a>>>0,L||$(l,n,a,8,17976931348623157e292,-17976931348623157e292),m.write(l,n,a,w,52,8),a+8}r.prototype.writeDoubleLE=function(n,a,w){return Z(this,n,a,!0,w)},r.prototype.writeDoubleBE=function(n,a,w){return Z(this,n,a,!1,w)},r.prototype.copy=function(n,a,w,L){if(!r.isBuffer(n))throw new TypeError("argument should be a Buffer");if(w||(w=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+w];else Uint8Array.prototype.set.call(n,this.subarray(w,L),a);return K},r.prototype.fill=function(n,a,w,L){if(typeof n=="string"){if(typeof a=="string"?(L=a,a=0,w=this.length):typeof w=="string"&&(L=w,w=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,w=w===void 0?this.length:w>>>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===w){(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(l){for(var n=[],a=0;a>8,L=a%256,K.push(L),K.push(w);return K}function N(l){return c.toByteArray(M(l))}function q(l,n,a,w){for(var L=0;L=n.length||L>=l.length);++L)n[L+a]=l[L];return L}function Q(l,n){return l instanceof n||l!=null&&l.constructor!=null&&l.constructor.name!=null&&l.constructor.name===n.name}function b(l){return l!==l}}).call(this)}).call(this,y("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:5}],4:[function(y,k,x){"use strict";var p=typeof Reflect=="object"?Reflect:null,c=p&&typeof p.apply=="function"?p.apply:function(P,S,V){return Function.prototype.apply.call(P,S,V)},m;p&&typeof p.ownKeys=="function"?m=p.ownKeys:Object.getOwnPropertySymbols?m=function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:m=function(P){return Object.getOwnPropertyNames(P)};function h(C){console&&console.warn&&console.warn(C)}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(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(C){if(typeof C!="number"||C<0||s(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");r=C}}),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(C){return C._maxListeners===void 0?i.defaultMaxListeners:C._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")c(G,this,S);else for(var E=G.length,T=f(G,E),V=0;V0&&se.length>B&&!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=C,ie.type=P,ie.count=se.length,h(ie)}return C}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 u(){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 d(C,P,S){var V={fired:!1,wrapFn:void 0,target:C,type:P,listener:S},B=u.bind(V);return B.listener=S,V.wrapFn=B,B}i.prototype.once=function(P,S){return e(S),this.on(P,d(this,P,S)),this},i.prototype.prependOnceListener=function(P,S){return e(S),this.prependListener(P,d(this,P,S)),this},i.prototype.removeListener=function(P,S){var V,B,ne,se,ie;if(e(S),B=this._events,B===void 0)return this;if(V=B[P],V===void 0)return this;if(V===S||V.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete B[P],B.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&&(B[P]=V[0]),B.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,B;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(B=0;B=0;B--)this.removeListener(P,S[B]);return this};function g(C,P,S){var V=C._events;if(V===void 0)return[];var B=V[P];return B===void 0?[]:typeof B=="function"?S?[B.listener||B]:[B]:S?R(B):f(B,B.length)}i.prototype.listeners=function(P){return g(this,P,!0)},i.prototype.rawListeners=function(P){return g(this,P,!1)},i.listenerCount=function(C,P){return typeof C.listenerCount=="function"?C.listenerCount(P):_.call(C,P)},i.prototype.listenerCount=_;function _(C){var P=this._events;if(P!==void 0){var S=P[C];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 f(C,P){for(var S=new Array(P),V=0;V>1,u=-7,d=m?s-1:0,g=m?-1:1,_=p[c+d];for(d+=g,i=_&(1<<-u)-1,_>>=-u,u+=e;u>0;i=i*256+p[c+d],d+=g,u-=8);for(r=i&(1<<-u)-1,i>>=-u,u+=h;u>0;r=r*256+p[c+d],d+=g,u-=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(p,c,m,h,s,i){var r,e,t,o=i*8-s-1,u=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=h?0:i-1,f=h?1:-1,v=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(e=isNaN(c)?1:0,r=u):(r=Math.floor(Math.log(c)/Math.LN2),c*(t=Math.pow(2,-r))<1&&(r--,t*=2),r+d>=1?c+=g/t:c+=g*Math.pow(2,1-d),c*t>=2&&(r++,t/=2),r+d>=u?(e=0,r=u):r+d>=1?(e=(c*t-1)*Math.pow(2,s),r=r+d):(e=c*Math.pow(2,d-1)*Math.pow(2,s),r=0));s>=8;p[m+_]=e&255,_+=f,e/=256,s-=8);for(r=r<0;p[m+_]=r&255,_+=f,r/=256,o-=8);p[m+_-f]|=v*128}},{}],6:[function(y,k,x){(function(p,c){(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"),u=y("reinterval"),d=y("rfdc/default"),g=y("./validations"),_=y("xtend"),f=y("debug")("mqttjs:client"),v=p?p.nextTick:function(E){setTimeout(E,0)},R=c.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 C(){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 z=T.topic.toString();if(E.topicAliasSend)if(U){if(z.length!==0&&(f("applyTopicAlias :: register topic: %s - alias: %d",z,U),!E.topicAliasSend.put(z,U)))return f("applyTopicAlias :: error out of range. topic: %s - alias: %d",z,U),new Error("Sending Topic Alias out of range")}else z.length!==0&&(E.options.autoAssignTopicAlias?(U=E.topicAliasSend.getAliasByTopic(z),U?(T.topic="",T.properties=Be(Me({},T.properties),{topicAlias:U}),f("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",z,U)):(U=E.topicAliasSend.getLruAlias(),E.topicAliasSend.put(z,U),T.properties=Be(Me({},T.properties),{topicAlias:U}),f("applyTopicAlias :: auto assign topic: %s - alias: %d",z,U))):E.options.autoUseTopicAlias&&(U=E.topicAliasSend.getAliasByTopic(z),U&&(T.topic="",T.properties=Be(Me({},T.properties),{topicAlias:U}),f("applyTopicAlias :: auto use topic: %s - alias: %d",z,U))));else if(U)return f("applyTopicAlias :: error out of range. topic: %s - alias: %d",z,U),new Error("Sending Topic Alias out of range")}}function S(E,T){let U;T.properties&&(U=T.properties.topicAlias);let z=T.topic.toString();if(z.length===0){if(typeof U>"u")return new Error("Unregistered Topic Alias");if(z=E.topicAliasSend.getTopicByAlias(U),typeof z>"u")return new Error("Unregistered Topic Alias");T.topic=z}U&&delete T.properties.topicAlias}function V(E,T,U){f("sendPacket :: packet: %O",T),f("sendPacket :: emitting `packetsend`"),E.emit("packetsend",T),f("sendPacket :: writing to stream");let z=r.writeToStream(T,E.stream,E.options);f("sendPacket :: writeToStream result %s",z),!z&&U&&U!==ie?(f("sendPacket :: handle events on `drain` once through callback."),E.stream.once("drain",U)):U&&(f("sendPacket :: invoking cb"),U())}function B(E){E&&(f("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&&(f("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,z){f("storeAndSend :: store packet with cmd %s to outgoingStore",T.cmd);let re=T,ee;if(re.cmd==="publish"&&(re=d(T),ee=S(E,re),ee))return U&&U(ee);E.outgoingStore.put(re,function(D){if(D)return U&&U(D);z(),V(E,T,U)})}function ie(E){f("nop ::",E)}function G(E,T){let U,z=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];f("MqttClient :: options.protocol",T.protocol),f("MqttClient :: options.protocolVersion",T.protocolVersion),f("MqttClient :: options.username",T.username),f("MqttClient :: options.keepalive",T.keepalive),f("MqttClient :: options.reconnectPeriod",T.reconnectPeriod),f("MqttClient :: options.rejectUnauthorized",T.rejectUnauthorized),f("MqttClient :: options.topicAliasMaximum",T.topicAliasMaximum),this.options.clientId=typeof T.clientId=="string"?T.clientId:C(),f("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?f("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();f("deliver :: entry %o",H);let D=null;if(!H){z._resubscribe();return}D=H.packet,f("deliver :: call _sendPacket for %o",D);let X=!0;D.messageId&&D.messageId!==0&&(z.messageIdProvider.register(D.messageId)||(X=!1)),X?z._sendPacket(D,function($){H.cb&&H.cb($),ee()}):(f("messageId: %d has already used. The message is skipped and removed.",D.messageId),ee())}f("connect :: sending queued packets"),ee()}),this.on("close",function(){f("close :: connected set to `false`"),this.connected=!1,f("close :: clearing connackTimer"),clearTimeout(this.connackTimer),f("close :: clearing ping timer"),z.pingTimer!==null&&(z.pingTimer.clear(),z.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),f("close :: calling _setupReconnect"),this._setupReconnect()}),m.call(this),f("MqttClient :: setting up stream"),this._setupStream()}o(G,m),G.prototype._setupStream=function(){let E=this,T=new t,U=r.parser(this.options),z=null,re=[];f("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),f("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),U.on("packet",function($){f("parser :: on packet push to packets array."),re.push($)});function ee(){if(re.length)v(H);else{let $=z;z=null,$()}}function H(){f("work :: getting next packet in queue");let $=re.shift();if($)f("work :: packet pulled from queue"),E._handlePacket($,ee);else{f("work :: no packets in queue");let oe=z;z=null,f("work :: done flag is %s",!!oe),oe&&oe()}}T._write=function($,oe,Z){z=Z,f("writable stream :: parsing buffer"),U.parse($),H()};function D($){f("streamErrorHandler :: error",$.message),W.includes($.code)?(f("streamErrorHandler :: emitting error"),E.emit("error",$)):ie($)}f("_setupStream :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",D),this.stream.on("close",function(){f("(%s)stream :: on close",E.options.clientId),ne(E.outgoing),f("stream: emit close to MqttClient"),E.emit("close")}),f("_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(){f("!!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:z}),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,M.push(Y.topic)}}),E.messageIdToTopic[F.messageId]=M}return E.outgoing[F.messageId]={volatile:!0,cb:function(M,Y){if(!M){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:z}),this},G.prototype.end=function(E,T,U){let z=this;f("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),f("end :: cb? %s",!!U),U=U||ie;function re(){f("end :: closeStores: closing incoming and outgoing stores"),z.disconnected=!0,z.incomingStore.close(function(H){z.outgoingStore.close(function(D){if(f("end :: closeStores: emitting end"),z.emit("end"),U){let X=H||D;f("end :: closeStores: invoking callback with args"),U(X)}})}),z._deferredReconnect&&z._deferredReconnect()}function ee(){f("end :: (%s) :: finish :: calling _cleanUp with force %s",z.options.clientId,E),z._cleanUp(E,()=>{f("end :: finish :: calling process.nextTick on closeStores"),v(re.bind(z))},T)}return this.disconnecting?(U(),this):(this._clearReconnect(),this.disconnecting=!0,!E&&Object.keys(this.outgoing).length>0?(f("end :: (%s) :: calling finish in 10ms once outgoing is empty",z.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,ee,10))):(f("end :: (%s) :: immediately calling finish",z.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){f("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(){f("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),f("client already connected. disconnecting first.")):(f("_reconnect: calling _setupStream"),this._setupStream())},G.prototype._setupReconnect=function(){let E=this;!E.disconnecting&&!E.reconnectTimer&&E.options.reconnectPeriod>0?(this.reconnecting||(f("_setupReconnect :: emit `offline` state"),this.emit("offline"),f("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),f("_setupReconnect :: setting reconnectTimer for %d ms",E.options.reconnectPeriod),E.reconnectTimer=setInterval(function(){f("reconnectTimer :: reconnect triggered!"),E._reconnect()},E.options.reconnectPeriod)):f("_setupReconnect :: doing nothing...")},G.prototype._clearReconnect=function(){f("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},G.prototype._cleanUp=function(E,T){let U=arguments[2];if(T&&(f("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),f("_cleanUp :: forced? %s",E),E)this.options.reconnectPeriod===0&&this.options.clean&&B(this.outgoing),f("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let z=_({cmd:"disconnect"},U);f("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(z,R.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(f("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(f("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),T&&!this.connected&&(f("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",T),T())},G.prototype._sendPacket=function(E,T,U){f("_sendPacket :: (%s) :: start",this.options.clientId),U=U||ie,T=T||ie;let z=P(this,E);if(z){T(z);return}if(!this.connected){if(E.cmd==="auth"){this._shiftPingInterval(),V(this,E,T);return}f("_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}f("_sendPacket :: (%s) :: end",this.options.clientId)},G.prototype._storePacket=function(E,T,U){f("_storePacket :: packet: %o",E),f("_storePacket :: cb? %s",!!T),U=U||ie;let z=E;if(z.cmd==="publish"){z=d(E);let re=S(this,z);if(re)return T&&T(re)}(z.qos||0)===0&&this.queueQoSZero||z.cmd!=="publish"?this.queue.push({packet:z,cb:T}):z.qos>0?(T=this.outgoing[z.messageId]?this.outgoing[z.messageId].cb:null,this.outgoingStore.put(z,function(re){if(re)return T&&T(re);U()})):T&&T(new Error("No connection to broker"))},G.prototype._setupPingTimer=function(){f("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);let E=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=u(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(){f("_checkPing :: checking ping..."),this.pingResp?(f("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(f("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},G.prototype._handlePingresp=function(){this.pingResp=!0},G.prototype._handleConnack=function(E){f("_handleConnack");let T=this.options,z=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(z===0)this.reconnecting=!1,this._onConnect(E);else if(z>0){let re=new Error("Connection refused: "+j[z]);re.code=z,this.emit("error",re)}},G.prototype._handleAuth=function(E){let U=this.options.protocolVersion,z=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=z,this.emit("error",ee);return}let re=this;this.handleAuth(E,function(ee,H){if(ee){re.emit("error",ee);return}if(z===24)re.reconnecting=!1,re._sendPacket(H);else{let D=new Error("Connection refused: "+j[z]);ee.code=z,re.emit("error",D)}})},G.prototype.handleAuth=function(E,T){T()},G.prototype._handlePublish=function(E,T){f("_handlePublish: packet %o",E),T=typeof T<"u"?T:ie;let U=E.topic.toString(),z=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,f("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",U,$);else{f("_handlePublish :: unregistered topic alias. alias: %d",$),this.emit("error",new Error("Received unregistered Topic Alias"));return}}else{f("_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,$))f("_handlePublish :: registered topic: %s - alias: %d",U,$);else{f("_handlePublish :: topic alias out of range. alias: %d",$),this.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(f("_handlePublish: qos %d",re),re){case 2:{D.customHandleAcks(U,z,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,z,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,z,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,z,E),this.handleMessage(E,T);break;default:f("_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,z=null,re=this.outgoing[T]?this.outgoing[T].cb:null,ee=this,H;if(!re){f("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(f("_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":{z={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(z);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){f("_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:p}=y("buffer"),c=y("readable-stream").Transform,m=y("duplexify"),h,s,i,r=!1;function e(){let g=new c;return g._write=function(_,f,v){h.sendSocketMessage({data:_.buffer,success:function(){v()},fail:function(){v(new Error)}})},g._flush=function(f){h.closeSocket({success:function(){f()}})},g}function t(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function o(g,_){let f=g.protocol==="alis"?"wss":"ws",v=f+"://"+g.hostname+g.path;return g.port&&g.port!==80&&g.port!==443&&(v=f+"://"+g.hostname+":"+g.port+g.path),typeof g.transformWsUrl=="function"&&(v=g.transformWsUrl(v,g,_)),v}function u(){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 _=p.from(g.data,"base64");s.push(_)}else{let _=new FileReader;_.addEventListener("load",function(){let f=_.result;f instanceof ArrayBuffer?f=p.from(f):f=p.from(f,"utf8"),s.push(f)}),_.readAsArrayBuffer(g.data)}}),h.onSocketClose(function(){i.end(),i.destroy()}),h.onSocketError(function(g){i.destroy(g)}))}function d(g,_){if(_.hostname=_.hostname||_.host,!_.hostname)throw new Error("Could not determine host. Specify host manually.");let f=_.protocolId==="MQIsdp"&&_.protocolVersion===3?"mqttv3.1":"mqtt";t(_);let v=o(_,g);return h=_.my,h.connectSocket({url:v,protocols:f}),s=e(),i=m.obj(),u(),i}k.exports=d},{buffer:3,duplexify:22,"readable-stream":72}],8:[function(y,k,x){"use strict";let p=y("net"),c=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 c("port %d and host %s",i,r),p.createConnection(i,r)}k.exports=m},{debug:20,net:2}],9:[function(y,k,x){"use strict";let p=y("tls"),c=y("net"),m=y("debug")("mqttjs:tls");function h(s,i){i.port=i.port||8883,i.host=i.hostname||i.host||"localhost",c.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=p.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(p){(function(){"use strict";let{Buffer:c}=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 p<"u"&&p.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 u(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 d(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=d(v,W,A),C=m.createWebSocketStream(j,A.wsOptions);return C.url=W,j.on("close",()=>{C.destroy()}),C}function f(v,R){h("browserStreamBuilder");let A,j=u(R).browserBufferSize||1024*512,C=R.browserBufferTimeout||1e3,P=!R.objectMode,S=g(v,R),V=ne(R,U,z);R.objectMode||(V._writev=T),V.on("close",()=>{S.close()});let B=typeof S.addEventListener<"u";S.readyState===S.OPEN?A=V:(A=A=s(void 0,void 0,R),R.objectMode||(A._writev=T),B?S.addEventListener("open",se):S.onopen=se),A.socket=S,B?(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=c.from(ee):ee=c.from(ee,"utf8"),V.push(ee)}function T(re,ee){let H=new Array(re.length);for(let D=0;Dj&&setTimeout(U,C,re,ee,H),P&&typeof re=="string"&&(re=c.from(re,"utf8"));try{S.send(re)}catch(D){return H(D)}H()}function z(re){S.close(),re()}return A}e?k.exports=f: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:p}=y("buffer"),c=y("readable-stream").Transform,m=y("duplexify"),h,s,i;function r(){let d=new c;return d._write=function(g,_,f){h.send({data:g.buffer,success:function(){f()},fail:function(v){f(new Error(v))}})},d._flush=function(_){h.close({success:function(){_()}})},d}function e(d){d.hostname||(d.hostname="localhost"),d.path||(d.path="/"),d.wsOptions||(d.wsOptions={})}function t(d,g){let _=d.protocol==="wxs"?"wss":"ws",f=_+"://"+d.hostname+d.path;return d.port&&d.port!==80&&d.port!==443&&(f=_+"://"+d.hostname+":"+d.port+d.path),typeof d.transformWsUrl=="function"&&(f=d.transformWsUrl(f,d,g)),f}function o(){h.onOpen(function(){i.setReadable(s),i.setWritable(s),i.emit("connect")}),h.onMessage(function(d){let g=d.data;g instanceof ArrayBuffer?g=p.from(g):g=p.from(g,"utf8"),s.push(g)}),h.onClose(function(){i.end(),i.destroy()}),h.onError(function(d){i.destroy(new Error(d.errMsg))})}function u(d,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 f=t(g,d);h=wx.connectSocket({url:f,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=u},{buffer:3,duplexify:22,"readable-stream":72}],12:[function(y,k,x){"use strict";function p(){if(!(this instanceof p))return new p;this.nextId=Math.max(1,Math.floor(Math.random()*65535))}p.prototype.allocate=function(){let c=this.nextId++;return this.nextId===65536&&(this.nextId=1),c},p.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},p.prototype.register=function(c){return!0},p.prototype.deallocate=function(c){},p.prototype.clear=function(){},k.exports=p},{}],13:[function(y,k,x){"use strict";let p=y("xtend"),c=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=p(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 c(m),r=[],e=!1,t=0;return this._inflights.forEach(function(o,u){r.push(o)}),i._read=function(){!e&&tthis.max?!1:(this.aliasToTopic[m]=c,this.length=Object.keys(this.aliasToTopic).length,!0)},p.prototype.getTopicByAlias=function(c){return this.aliasToTopic[c]},p.prototype.clear=function(){this.aliasToTopic={}},k.exports=p},{}],15:[function(y,k,x){"use strict";let p=y("lru-cache"),c=y("number-allocator").NumberAllocator;function m(h){if(!(this instanceof m))return new m(h);h>0&&(this.aliasToTopic=new p({max:h}),this.topicToAlias={},this.numberAllocator=new c(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 p(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||p.alloc(0);let t=!!s,o=this._offset(r),u=e-r,d=u,g=t&&i||0,_=o[1];if(r===0&&e===this.length){if(!t)return this._bufs.length===1?this._bufs[0]:p.concat(this._bufs,this.length);for(let f=0;fv)this._bufs[f].copy(s,g,_),g+=v;else{this._bufs[f].copy(s,g,_,_+d),g+=v;break}d-=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 d=o.indexOf(h,t);if(d!==-1)return this._reverseOffset([e,d]);t=o.length-h.length+1}else{let d=this._reverseOffset([e,t]);if(this._match(d,h))return d;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 c(){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,u=0;e[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(o++,d==="%c"&&(u=o))}),e.splice(u,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 p<"u"&&"env"in p&&(e=p.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 p(c){h.debug=h,h.default=h,h.coerce=o,h.disable=r,h.enable=i,h.enabled=e,h.humanize=y("ms"),h.destroy=u,Object.keys(c).forEach(d=>{h[d]=c[d]}),h.names=[],h.skips=[],h.formatters={};function m(d){let g=0;for(let _=0;_{if(V==="%%")return"%";P++;let ne=h.formatters[B];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=d,R.useColors=h.useColors(),R.color=h.selectColor(d),R.extend=s,R.destroy=h.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(f!==h.namespaces&&(f=h.namespaces,v=h.enabled(d)),v),set:A=>{_=A}}),typeof h.init=="function"&&h.init(R),R}function s(d,g){let _=h(this.namespace+(typeof g>"u"?":":g)+d);return _.log=this.log,_}function i(d){h.save(d),h.namespaces=d,h.names=[],h.skips=[];let g,_=(typeof d=="string"?d:"").split(/[\s,]+/),f=_.length;for(g=0;g"-"+g)].join(",");return h.enable(""),d}function e(d){if(d[d.length-1]==="*")return!0;let g,_;for(g=0,_=h.skips.length;g<_;g++)if(h.skips[g].test(d))return!1;for(g=0,_=h.names.length;g<_;g++)if(h.names[g].test(d))return!0;return!1}function t(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function o(d){return d instanceof Error?d.stack||d.message:d}function u(){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=p},{ms:53}],22:[function(y,k,x){(function(p,c){(function(){var m=y("readable-stream"),h=y("end-of-stream"),s=y("inherits"),i=y("stream-shift"),r=c.from&&c.from!==Uint8Array.from?c.from([0]):new c([0]),e=function(f,v){f._corked?f.once("uncork",v):v()},t=function(f,v){f._autoDestroy&&f.destroy(v)},o=function(f,v){return function(R){R?t(f,R.message==="premature close"?null:R):v&&!f._ended&&f.end()}},u=function(f,v){if(!f||f._writableState&&f._writableState.finished)return v();if(f._writableState)return f.end(v);f.end(),v()},d=function(){},g=function(f){return new m.Readable({objectMode:!0,highWaterMark:16}).wrap(f)},_=function(f,v,R){if(!(this instanceof _))return new _(f,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,f&&this.setWritable(f),v&&this.setReadable(v)};s(_,m.Duplex),_.obj=function(f,v,R){return R||(R={}),R.objectMode=!0,R.highWaterMark=16,new _(f,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(f){if(this._unwrite&&this._unwrite(),this.destroyed){f&&f.destroy&&f.destroy();return}if(f===null||f===!1){this.end();return}var v=this,R=h(f,{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&&p.nextTick(A),this._writable=f,this._writable.on("drain",A),this._unwrite=W,this.uncork()},_.prototype.setReadable=function(f){if(this._unread&&this._unread(),this.destroyed){f&&f.destroy&&f.destroy();return}if(f===null||f===!1){this.push(null),this.resume();return}var v=this,R=h(f,{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=f,this._readable2=f._readableState?f:g(f),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 f;this._drained&&(f=i(this._readable2))!==null;)this.destroyed||(this._drained=this.push(f));this._forwarding=!1}},_.prototype.destroy=function(f,v){if(v||(v=d),this.destroyed)return v(null);this.destroyed=!0;var R=this;p.nextTick(function(){R._destroy(f),v(null)})},_.prototype._destroy=function(f){if(f){var v=this._ondrain;this._ondrain=null,v?v(f):this.emit("error",f)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},_.prototype._write=function(f,v,R){if(!this.destroyed){if(this._corked)return e(this,this._write.bind(this,f,v,R));if(f===r)return this._finish(R);if(!this._writable)return R();this._writable.write(f)===!1?this._ondrain=R:this.destroyed||R()}},_.prototype._finish=function(f){var v=this;this.emit("preend"),e(this,function(){u(v._forwardEnd&&v._writable,function(){v._writableState.prefinished===!1&&(v._writableState.prefinished=!0),v.emit("prefinish"),e(v,f)})})},_.prototype.end=function(f,v,R){return typeof f=="function"?this.end(null,null,f):typeof v=="function"?this.end(f,null,v):(this._ended=!0,f&&this.write(f),!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(p){(function(){var c=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=c(t||m);var o=r._writableState,u=r._readableState,d=e.readable||e.readable!==!1&&r.readable,g=e.writable||e.writable!==!1&&r.writable,_=!1,f=function(){r.writable||v()},v=function(){g=!1,d||t.call(r)},R=function(){d=!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(){p.nextTick(C)},C=function(){if(!_){if(d&&!(u&&u.ended&&!u.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",f),r.on("close",f)),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",f),r.removeListener("close",f),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(c,m){m&&(c.super_=m,c.prototype=Object.create(m.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(c,m){if(m){c.super_=m;var h=function(){};h.prototype=m.prototype,c.prototype=new h,c.prototype.constructor=c}}},{}],25:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.ContainerIterator=x.Container=x.Base=void 0;class p{constructor(s=0){this.iteratorType=s}equals(s){return this.o===s.o}}x.ContainerIterator=p;class c{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}}x.Base=c;class m extends c{}x.Container=m},{}],26:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.HashContainerIterator=x.HashContainer=void 0;var p=y("../../ContainerBase"),c=h(y("../../../utils/checkObject")),m=y("../../../utils/throwError");function h(r){return r&&r.t?r:{default:r}}class s extends p.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 p.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,c.default)(e));let u;if(o){let d=e[this.HASH_TAG];if(d!==void 0)return this.H[d].l=t,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),u={u:e,l:t,L:this._,B:this.h},this.H.push(u)}else{let d=this.g[e];if(d)return d.l=t,this.i;u={u:e,l:t,L:this._,B:this.h},this.g[e]=u}return this.i===0?(this.p=u,this.h.B=u):this._.B=u,this._=u,this.h.L=u,++this.i}I(e,t){if(t===void 0&&(t=(0,c.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,c.default)(e)),t){let u=e[this.HASH_TAG];if(u===void 0)return!1;delete e[this.HASH_TAG],o=this.H[u],delete this.H[u]}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 p=y("./Base"),c=h(y("../../utils/checkObject")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends p.HashContainerIterator{constructor(t,o,u,d){super(t,o,d),this.container=u}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,u){if(u==="0")return t.o.u;if(u==="1")return t.o.l},set(o,u,d){if(u!=="1")throw new TypeError("props must be 1");return t.o.l=d,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends p.HashContainer{constructor(t=[]){super();let o=this;t.forEach(function(u){o.setElement(u[0],u[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,u){return this.M(t,o,u)}getElementByKey(t,o){if(o===void 0&&(o=(0,c.default)(t)),o){let d=t[this.HASH_TAG];return d!==void 0?this.H[d].l:void 0}let u=this.g[t];return u?u.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 u=this.I(t,o);return new s(u,this.h,this)}forEach(t){let o=0,u=this.p;for(;u!==this.h;)t([u.u,u.l],o++,this),u=u.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 p=y("./Base"),c=y("../../utils/throwError");class m extends p.HashContainerIterator{constructor(r,e,t,o){super(r,e,o),this.container=t}get pointer(){return this.o===this.h&&(0,c.throwIteratorAccessError)(),this.o.u}copy(){return new m(this.o,this.h,this.container,this.iteratorType)}}class h extends p.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 p=y("../ContainerBase");class c extends p.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=c;x.default=m},{"../ContainerBase":25}],30:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.default=void 0;var p=y("../ContainerBase");class c extends p.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)-(u>>1),this.D=this.N=this.F-o%this.F>>1;let d=this;e.forEach(function(g){d.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:u}=this.O(e);this.A[o][u]=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 u=[];for(let d=e;dthis.i-1)throw new RangeError;if(e===0)this.popFront();else if(e===this.i-1)this.popBack();else{let t=[];for(let u=e+1;ue;)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 u=this.p;for(;t--;)u=u.B;u.l=o}insert(t,o,u=1){if(t<0||t>this.i)throw new RangeError;if(u<=0)return this.i;if(t===0)for(;u--;)this.pushFront(o);else if(t===this.i)for(;u--;)this.pushBack(o);else{let d=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=p.TreeNodeEnableIndex,this.M=function(t,o,u){let d=this.ne(t,o,u);if(d){let g=d.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let _=this.he(d);if(_){let{parentNode:f,grandParent:v,curNode:R}=_;f.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=p.TreeNode,this.M=function(t,o,u){let d=this.ne(t,o,u);return d&&this.he(d),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 u=t.tt;u.U===t?u.U=r:u.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 u=t.tt;u.U===t?u.U=r:u.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,u=this.h.U,d=this.v(u.u,r);if(d===0){u.l=e;return}else if(d>0)u.U=new this.re(r,e),u.U.tt=u,o=u.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 f=t.o;if(f!==this.h){let v=this.v(f.u,r);if(v===0){f.l=e;return}else if(v>0){let R=f.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):(f.U=o,o.tt=f))}}}if(o===void 0)for(o=this.Y;;){let f=this.v(o.u,r);if(f>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(f<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 u=t.B().u;return this.v(u,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 p=h(y("./Base")),c=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends c.default{constructor(t,o,u,d){super(t,o,d),this.container=u}get pointer(){this.o===this.h&&(0,m.throwIteratorAccessError)();let t=this;return new Proxy([],{get(o,u){if(u==="0")return t.o.u;if(u==="1")return t.o.l},set(o,u,d){if(u!=="1")throw new TypeError("props must be 1");return t.o.l=d,!0}})}copy(){return new s(this.o,this.h,this.container,this.iteratorType)}}class i extends p.default{constructor(t=[],o,u){super(o,u);let d=this;t.forEach(function(g){d.setElement(g[0],g[1])})}*K(t){t!==void 0&&(yield*Ie(this.K(t.U)),yield[t.u,t.l],yield*Ie(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,u){return this.M(t,o,u)}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(u){o.setElement(u[0],u[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 p=h(y("./Base")),c=h(y("./Base/TreeIterator")),m=y("../../utils/throwError");function h(e){return e&&e.t?e:{default:e}}class s extends c.default{constructor(t,o,u,d){super(t,o,d),this.container=u}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 p.default{constructor(t=[],o,u){super(o,u);let d=this;t.forEach(function(g){d.insert(g)})}*K(t){t!==void 0&&(yield*Ie(this.K(t.U)),yield t.u,yield*Ie(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(u){o.insert(u)}),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 c.default}}),Object.defineProperty(x,"Stack",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(x,"Vector",{enumerable:!0,get:function(){return h.default}});var p=u(y("./container/OtherContainer/Stack")),c=u(y("./container/OtherContainer/Queue")),m=u(y("./container/OtherContainer/PriorityQueue")),h=u(y("./container/SequentialContainer/Vector")),s=u(y("./container/SequentialContainer/LinkList")),i=u(y("./container/SequentialContainer/Deque")),r=u(y("./container/TreeContainer/OrderedSet")),e=u(y("./container/TreeContainer/OrderedMap")),t=u(y("./container/HashContainer/HashSet")),o=u(y("./container/HashContainer/HashMap"));function u(d){return d&&d.t?d:{default:d}}},{"./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=p;function p(c){let m=typeof c;return m==="object"&&c!==null||m==="function"}},{}],44:[function(y,k,x){"use strict";Object.defineProperty(x,"t",{value:!0}),x.throwIteratorAccessError=p;function p(){throw new RangeError("Iterator access denied!")}},{}],45:[function(y,k,x){"use strict";let p=y("yallist"),c=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"),u=Symbol("updateAgeOnGet"),d=()=>1;class g{constructor(C){if(typeof C=="number"&&(C={max:C}),C||(C={}),C.max&&(typeof C.max!="number"||C.max<0))throw new TypeError("max must be a non-negative number");let P=this[c]=C.max||1/0,S=C.length||d;if(this[h]=typeof S!="function"?d:S,this[s]=C.stale||!1,C.maxAge&&typeof C.maxAge!="number")throw new TypeError("maxAge must be a number");this[i]=C.maxAge||0,this[r]=C.dispose,this[e]=C.noDisposeOnSet||!1,this[u]=C.updateAgeOnGet||!1,this.reset()}set max(C){if(typeof C!="number"||C<0)throw new TypeError("max must be a non-negative number");this[c]=C||1/0,v(this)}get max(){return this[c]}set allowStale(C){this[s]=!!C}get allowStale(){return this[s]}set maxAge(C){if(typeof C!="number")throw new TypeError("maxAge must be a non-negative number");this[i]=C,v(this)}get maxAge(){return this[i]}set lengthCalculator(C){typeof C!="function"&&(C=d),C!==this[h]&&(this[h]=C,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(C,P){P=P||this;for(let S=this[t].tail;S!==null;){let V=S.prev;W(this,C,S,P),S=V}}forEach(C,P){P=P||this;for(let S=this[t].head;S!==null;){let V=S.next;W(this,C,S,P),S=V}}keys(){return this[t].toArray().map(C=>C.key)}values(){return this[t].toArray().map(C=>C.value)}reset(){this[r]&&this[t]&&this[t].length&&this[t].forEach(C=>this[r](C.key,C.value)),this[o]=new Map,this[t]=new p,this[m]=0}dump(){return this[t].map(C=>f(this,C)?!1:{k:C.key,v:C.value,e:C.now+(C.maxAge||0)}).toArray().filter(C=>C)}dumpLru(){return this[t]}set(C,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,B=this[h](P,C);if(this[o].has(C)){if(B>this[c])return R(this,this[o].get(C)),!1;let ie=this[o].get(C).value;return this[r]&&(this[e]||this[r](C,ie.value)),ie.now=V,ie.maxAge=S,ie.value=P,this[m]+=B-ie.length,ie.length=B,this.get(C),v(this),!0}let ne=new A(C,P,B,V,S);return ne.length>this[c]?(this[r]&&this[r](C,P),!1):(this[m]+=ne.length,this[t].unshift(ne),this[o].set(C,this[t].head),v(this),!0)}has(C){if(!this[o].has(C))return!1;let P=this[o].get(C).value;return!f(this,P)}get(C){return _(this,C,!0)}peek(C){return _(this,C,!1)}pop(){let C=this[t].tail;return C?(R(this,C),C.value):null}del(C){R(this,this[o].get(C))}load(C){this.reset();let P=Date.now();for(let S=C.length-1;S>=0;S--){let V=C[S],B=V.e||0;if(B===0)this.set(V.k,V.v);else{let ne=B-P;ne>0&&this.set(V.k,V.v,ne)}}}prune(){this[o].forEach((C,P)=>_(this,P,!1))}}let _=(j,C,P)=>{let S=j[o].get(C);if(S){let V=S.value;if(f(j,V)){if(R(j,S),!j[s])return}else P&&(j[u]&&(S.value.now=Date.now()),j[t].unshiftNode(S));return V.value}},f=(j,C)=>{if(!C||!C.maxAge&&!j[i])return!1;let P=Date.now()-C.now;return C.maxAge?P>C.maxAge:j[i]&&P>j[i]},v=j=>{if(j[m]>j[c])for(let C=j[t].tail;j[m]>j[c]&&C!==null;){let P=C.prev;R(j,C),C=P}},R=(j,C)=>{if(C){let P=C.value;j[r]&&j[r](P.key,P.value),j[m]-=P.length,j[o].delete(P.key),j[t].removeNode(C)}};class A{constructor(C,P,S,V,B){this.key=C,this.value=P,this.length=S,this.now=V,this.maxAge=B||0}}let W=(j,C,P,S)=>{let V=P.value;f(j,V)&&(R(j,P),j[s]||(V=void 0)),V&&C.call(S,V.value,V.key,j)};k.exports=g},{yallist:84}],46:[function(y,k,x){(function(p){(function(){let c=k.exports;c.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"},c.codes={};for(let h in c.types){let s=c.types[h];c.codes[s]=h}c.CMD_SHIFT=4,c.CMD_MASK=240,c.DUP_MASK=8,c.QOS_MASK=3,c.QOS_SHIFT=1,c.RETAIN_MASK=1,c.VARBYTEINT_MASK=127,c.VARBYTEINT_FIN_MASK=128,c.VARBYTEINT_MAX=268435455,c.SESSIONPRESENT_MASK=1,c.SESSIONPRESENT_HEADER=p.from([c.SESSIONPRESENT_MASK]),c.CONNACK_HEADER=p.from([c.codes.connack<[0,1].map(i=>[0,1].map(r=>{let e=p.alloc(1);return e.writeUInt8(c.codes[h]<p.from([h])),c.EMPTY={pingreq:p.from([c.codes.pingreq<<4,0]),pingresp:p.from([c.codes.pingresp<<4,0]),disconnect:p.from([c.codes.disconnect<<4,0])}}).call(this)}).call(this,y("buffer").Buffer)},{buffer:3}],47:[function(y,k,x){(function(p){(function(){let c=y("./writeToStream"),m=y("events");function h(i,r){let e=new s;return c(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,u;for(u=0;u>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 u=0,d=0,g=p.allocUnsafe(4);do u=t%128|0,t=t/128|0,t>0&&(u=u|128),g.writeUInt8(u,d++);while(t>0&&d<4);return t>0&&(d=0),h?g.subarray(0,d):g.slice(0,d)}function e(t){let o=p.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 p{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}k.exports=p},{}],51:[function(y,k,x){let p=y("bl"),c=y("events"),m=y("./packet"),h=y("./constants"),s=y("debug")("mqtt-packet:parser");class i extends c{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=p(),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,u,d={},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(d.username=this._list.readUInt8(this._pos)&h.USERNAME_MASK,d.password=this._list.readUInt8(this._pos)&h.PASSWORD_MASK,d.will=this._list.readUInt8(this._pos)&h.WILL_FLAG_MASK,d.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 f=this._parseString();if(f===null)return this._emitError(new Error("Packet too short"));if(g.clientId=f,s("_parseConnect: packet.clientId: %s",g.clientId),d.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(d.username){if(u=this._parseString(),u===null)return this._emitError(new Error("Cannot parse username"));g.username=u,s("_parseConnect: packet.username: %s",g.username)}if(d.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,u,d,g,_,f;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(),u=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,d=o>>h.SUBSCRIBE_OPTIONS_RH_SHIFT&h.SUBSCRIBE_OPTIONS_RH_MASK,f={topic:t,qos:u},this.settings.protocolVersion===5?(f.nl=_,f.rap=g,f.rh=d):this.settings.bridgeMode&&(f.rh=0,f.rap=!0,f.nl=!0),s("_parseSubscribe: push subscription `%s` to subscription",f),e.subscriptions.push(f)}}}_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 u=this._list.toString("utf8",this._pos,o);return this._pos+=t,s("_parseString: result: %s",u),u}_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,u=1,d=0,g=!1,_,f=this._pos?this._pos:0;for(;o=o&&this._emitError(new Error("Invalid variable byte integer")),f&&(this._pos+=o),g=g?e?{bytes:o,value:d}:d:!1,s("_parseVarByteNum: result: %o",g),g}_parseByte(){let e;return this._pos=4)&&(b||q))w+=p.byteLength(b)+2;else{if(I<4)return M.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(q*1===0)return M.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 M.emit("error",new Error("Invalid keepalive")),!1;if(w+=2,w+=1,I===5){var L=H(M,a);if(!L)return!1;w+=L.length}if(N){if(typeof N!="object")return M.emit("error",new Error("Invalid will")),!1;if(!N.topic||typeof N.topic!="string")return M.emit("error",new Error("Invalid will topic")),!1;if(w+=p.byteLength(N.topic)+2,w+=2,N.payload)if(N.payload.length>=0)typeof N.payload=="string"?w+=p.byteLength(N.payload):w+=N.payload.length;else return M.emit("error",new Error("Invalid will payload")),!1;var K={};if(I===5){if(K=H(M,N.properties),!K)return!1;w+=K.length}}let J=!1;if(l!=null)if(Z(l))J=!0,w+=p.byteLength(l)+2;else return M.emit("error",new Error("Invalid username")),!1;if(n!=null){if(!J)return M.emit("error",new Error("Username is required to use password")),!1;if(Z(n))w+=oe(n)+2;else return M.emit("error",new Error("Invalid password")),!1}M.write(c.CONNECT_HEADER),G(M,w),ee(M,O),te.bridgeMode&&(I+=128),M.write(I===131?c.VERSION131:I===132?c.VERSION132:I===4?c.VERSION4:I===5?c.VERSION5:c.VERSION3);let le=0;return le|=l!=null?c.USERNAME_MASK:0,le|=n!=null?c.PASSWORD_MASK:0,le|=N&&N.retain?c.WILL_RETAIN_MASK:0,le|=N&&N.qos?N.qos<0&&g(M,b),a?.write(),r("publish: payload: %o",Q),M.write(Q)}function j(F,M,Y){let te=Y?Y.protocolVersion:4,O=F||{},I=O.cmd||"puback",N=O.messageId,q=O.dup&&I==="pubrel"?c.DUP_MASK:0,Q=0,b=O.reasonCode,l=O.properties,n=te===5?3:2;if(I==="pubrel"&&(Q=1),typeof N!="number")return M.emit("error",new Error("Invalid messageId")),!1;let a=null;if(te===5&&typeof l=="object"){if(a=D(M,l,Y,n),!a)return!1;n+=a.length}return M.write(c.ACKS[I][Q][q][0]),G(M,n),g(M,N),te===5&&M.write(p.from([b])),a!==null&&a.write(),!0}function C(F,M,Y){r("subscribe: packet: ");let te=Y?Y.protocolVersion:4,O=F||{},I=O.dup?c.DUP_MASK:0,N=O.messageId,q=O.subscriptions,Q=O.properties,b=0;if(typeof N!="number")return M.emit("error",new Error("Invalid messageId")),!1;b+=2;let l=null;if(te===5){if(l=H(M,Q),!l)return!1;b+=l.length}if(typeof q=="object"&&q.length)for(let a=0;a2)return M.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}b+=p.byteLength(w)+2+1}else return M.emit("error",new Error("Invalid subscriptions")),!1;r("subscribe: writing to stream: %o",c.SUBSCRIBE_HEADER),M.write(c.SUBSCRIBE_HEADER[1][I?1:0][0]),G(M,b),g(M,N),l!==null&&l.write();let n=!0;for(let a of q){let w=a.topic,L=a.qos,K=+a.nl,J=+a.rap,le=a.rh,he;E(M,w),he=c.SUBSCRIBE_OPTIONS_QOS[L],te===5&&(he|=K?c.SUBSCRIBE_OPTIONS_NL:0,he|=J?c.SUBSCRIBE_OPTIONS_RAP:0,he|=le?c.SUBSCRIBE_OPTIONS_RH[le]:0),n=M.write(p.from([he]))}return n}function P(F,M,Y){let te=Y?Y.protocolVersion:4,O=F||{},I=O.messageId,N=O.granted,q=O.properties,Q=0;if(typeof I!="number")return M.emit("error",new Error("Invalid messageId")),!1;if(Q+=2,typeof N=="object"&&N.length)for(let l=0;lc.VARBYTEINT_MAX)return F.emit("error",new Error(`Invalid variable byte integer: ${M}`)),!1;let Y=ie[M];return Y||(Y=u(M),M<16384&&(ie[M]=Y)),r("writeVarByteInt: writing to stream: %o",Y),F.write(Y)}function E(F,M){let Y=p.byteLength(M);return g(F,Y),r("writeString: %s",M),F.write(M,"utf8")}function T(F,M,Y){E(F,M),E(F,Y)}function U(F,M){return r("writeNumberCached: number: %d",M),r("writeNumberCached: %o",e[M]),F.write(e[M])}function z(F,M){let Y=t(M);return r("writeNumberGenerated: %o",Y),F.write(Y)}function re(F,M){let Y=d(M);return r("write4ByteNumber: %o",Y),F.write(Y)}function ee(F,M){typeof M=="string"?E(F,M):M?(g(F,M.length),F.write(M)):g(F,0)}function H(F,M){if(typeof M!="object"||M.length!=null)return{length:1,write(){$(F,{},0)}};let Y=0;function te(I,N){let q=c.propertiesTypes[I],Q=0;switch(q){case"byte":{if(typeof N!="boolean")return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=2;break}case"int8":{if(typeof N!="number"||N<0||N>255)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=2;break}case"binary":{if(N&&N===null)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=1+p.byteLength(N)+2;break}case"int16":{if(typeof N!="number"||N<0||N>65535)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=3;break}case"int32":{if(typeof N!="number"||N<0||N>4294967295)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=5;break}case"var":{if(typeof N!="number"||N<0||N>268435455)return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=1+p.byteLength(u(N));break}case"string":{if(typeof N!="string")return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=3+p.byteLength(N.toString());break}case"pair":{if(typeof N!="object")return F.emit("error",new Error(`Invalid ${I}: ${N}`)),!1;Q+=Object.getOwnPropertyNames(N).reduce((b,l)=>{let n=N[l];return Array.isArray(n)?b+=n.reduce((a,w)=>(a+=3+p.byteLength(l.toString())+2+p.byteLength(w.toString()),a),0):b+=3+p.byteLength(l.toString())+2+p.byteLength(N[l].toString()),b},0);break}default:return F.emit("error",new Error(`Invalid property ${I}: ${N}`)),!1}return Q}if(M)for(let I in M){let N=0,q=0,Q=M[I];if(Array.isArray(Q))for(let b=0;bI;){let q=O.shift();if(q&&M[q])delete M[q],N=H(F,M);else return!1}return N}function X(F,M,Y){switch(c.propertiesTypes[M]){case"byte":{F.write(p.from([c.properties[M]])),F.write(p.from([+Y]));break}case"int8":{F.write(p.from([c.properties[M]])),F.write(p.from([Y]));break}case"binary":{F.write(p.from([c.properties[M]])),ee(F,Y);break}case"int16":{F.write(p.from([c.properties[M]])),g(F,Y);break}case"int32":{F.write(p.from([c.properties[M]])),re(F,Y);break}case"var":{F.write(p.from([c.properties[M]])),G(F,Y);break}case"string":{F.write(p.from([c.properties[M]])),E(F,Y);break}case"pair":{Object.getOwnPropertyNames(Y).forEach(O=>{let I=Y[O];Array.isArray(I)?I.forEach(N=>{F.write(p.from([c.properties[M]])),T(F,O.toString(),N.toString())}):(F.write(p.from([c.properties[M]])),T(F,O.toString(),I.toString()))});break}default:return F.emit("error",new Error(`Invalid property ${M} value: ${Y}`)),!1}}function $(F,M,Y){G(F,Y);for(let te in M)if(Object.prototype.hasOwnProperty.call(M,te)&&M[te]!==null){let O=M[te];if(Array.isArray(O))for(let I=0;I0)return r(u);if(g==="number"&&isFinite(u))return d.long?t(u):e(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function r(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var g=parseFloat(d[1]),_=(d[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*c;case"seconds":case"second":case"secs":case"sec":case"s":return g*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function e(u){var d=Math.abs(u);return d>=h?Math.round(u/h)+"d":d>=m?Math.round(u/m)+"h":d>=c?Math.round(u/c)+"m":d>=p?Math.round(u/p)+"s":u+"ms"}function t(u){var d=Math.abs(u);return d>=h?o(u,d,h,"day"):d>=m?o(u,d,m,"hour"):d>=c?o(u,d,c,"minute"):d>=p?o(u,d,p,"second"):u+" ms"}function o(u,d,g,_){var f=d>=g*1.5;return Math.round(u/g)+" "+_+(f?"s":"")}},{}],54:[function(y,k,x){let p=y("./lib/number-allocator.js");k.exports.NumberAllocator=p},{"./lib/number-allocator.js":55}],55:[function(y,k,x){"use strict";let p=y("js-sdsl").OrderedSet,c=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)),c("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 c("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),c("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),c("use():"+i),!0):t>i?!1:t===i?(this.ss.updateKeyByIterator(e,new h(t+1,o)),c("use():"+i),!0):o===i?(this.ss.updateKeyByIterator(e,new h(t,o-1)),c("use():"+i),!0):(this.ss.updateKeyByIterator(e,new h(i+1,o)),this.ss.insert(new h(t,i-1)),c("use():"+i),!0)}return c("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 u=e.pointer.low;e.pointer.high+1===i?i+1===t?(this.ss.eraseElementByIterator(e),this.ss.updateKeyByIterator(e,new h(u,o))):this.ss.updateKeyByIterator(e,new h(u,i)):i+1===t?(this.ss.eraseElementByIterator(e.next()),this.ss.insert(new h(i,o))):this.ss.insert(r)}c("free():"+i)},s.prototype.clear=function(){c("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 p=y("wrappy");k.exports=p(c),k.exports.strict=p(m),c.proto=c(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return c(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return m(this)},configurable:!0})});function c(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(p){(function(){"use strict";typeof p>"u"||!p.version||p.version.indexOf("v0.")===0||p.version.indexOf("v1.")===0&&p.version.indexOf("v1.8.")!==0?k.exports={nextTick:c}:k.exports=p;function c(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 p.nextTick(m);case 2:return p.nextTick(function(){m.call(null,h)});case 3:return p.nextTick(function(){m.call(null,h,s)});case 4:return p.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 u;typeof t=="string"&&s(t,"not ")?(u="must not be",t=t.replace(/^not /,"")):u="must be";var d;if(i(e," argument"))d="The ".concat(e," ").concat(u," ").concat(h(t,"type"));else{var g=r(e,".")?"property":"argument";d='The "'.concat(e,'" ').concat(g," ").concat(u," ").concat(h(t,"type"))}return d+=". Received type ".concat(typeof o),d},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=c},{}],59:[function(y,k,x){(function(p){(function(){"use strict";var c=Object.keys||function(u){var d=[];for(var g in u)d.push(g);return d};k.exports=e;var m=y("./_stream_readable"),h=y("./_stream_writable");y("inherits")(e,m);for(var s=c(h.prototype),i=0;i0)if(typeof l!="string"&&!L.objectMode&&Object.getPrototypeOf(l)!==r.prototype&&(l=t(l)),a)L.endEmitted?B(b,new C):T(b,L,l,!0);else if(L.ended)B(b,new W);else{if(L.destroyed)return!1;L.reading=!1,L.decoder&&!n?(l=L.decoder.write(l),L.objectMode||l.length!==0?T(b,L,l,!1):$(b,L)):T(b,L,l,!1)}else a||(L.reading=!1,$(b,L))}return!L.ended&&(L.length=z?b=z:(b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++),b}function ee(b,l){return b<=0||l.length===0&&l.ended?0:l.objectMode?1:b!==b?l.flowing&&l.length?l.buffer.head.data.length:l.length:(b>l.highWaterMark&&(l.highWaterMark=re(b)),b<=l.length?b:l.ended?l.length:(l.needReadable=!0,0))}G.prototype.read=function(b){d("read",b),b=parseInt(b,10);var l=this._readableState,n=b;if(b!==0&&(l.emittedReadable=!1),b===0&&l.needReadable&&((l.highWaterMark!==0?l.length>=l.highWaterMark:l.length>0)||l.ended))return d("read: emitReadable",l.length,l.ended),l.length===0&&l.ended?N(this):D(this),null;if(b=ee(b,l),b===0&&l.ended)return l.length===0&&N(this),null;var a=l.needReadable;d("need readable",a),(l.length===0||l.length-b0?w=I(b,l):w=null,w===null?(l.needReadable=l.length<=l.highWaterMark,b=0):(l.length-=b,l.awaitDrain=0),l.length===0&&(l.ended||(l.needReadable=!0),n!==b&&l.ended&&N(this)),w!==null&&this.emit("data",w),w};function H(b,l){if(d("onEofChunk"),!l.ended){if(l.decoder){var n=l.decoder.end();n&&n.length&&(l.buffer.push(n),l.length+=l.objectMode?1:n.length)}l.ended=!0,l.sync?D(b):(l.needReadable=!1,l.emittedReadable||(l.emittedReadable=!0,X(b)))}}function D(b){var l=b._readableState;d("emitReadable",l.needReadable,l.emittedReadable),l.needReadable=!1,l.emittedReadable||(d("emitReadable",l.flowing),l.emittedReadable=!0,p.nextTick(X,b))}function X(b){var l=b._readableState;d("emitReadable_",l.destroyed,l.length,l.ended),!l.destroyed&&(l.length||l.ended)&&(b.emit("readable"),l.emittedReadable=!1),l.needReadable=!l.flowing&&!l.ended&&l.length<=l.highWaterMark,O(b)}function $(b,l){l.readingMore||(l.readingMore=!0,p.nextTick(oe,b,l))}function oe(b,l){for(;!l.reading&&!l.ended&&(l.length1&&Q(a.pipes,b)!==-1)&&!he&&(d("false write response, pause",a.awaitDrain),a.awaitDrain++),n.pause())}function ce(xe){d("onerror",xe),ve(),b.removeListener("error",ce),s(b,"error")===0&&B(b,xe)}se(b,"error",ce);function we(){b.removeListener("finish",Se),ve()}b.once("close",we);function Se(){d("onfinish"),b.removeListener("close",we),ve()}b.once("finish",Se);function ve(){d("unpipe"),n.unpipe(b)}return b.emit("pipe",n),a.flowing||(d("pipe resume"),n.resume()),b};function Z(b){return function(){var n=b._readableState;d("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,n.awaitDrain===0&&s(b,"data")&&(n.flowing=!0,O(b))}}G.prototype.unpipe=function(b){var l=this._readableState,n={hasUnpiped:!1};if(l.pipesCount===0)return this;if(l.pipesCount===1)return b&&b!==l.pipes?this:(b||(b=l.pipes),l.pipes=null,l.pipesCount=0,l.flowing=!1,b&&b.emit("unpipe",this,n),this);if(!b){var a=l.pipes,w=l.pipesCount;l.pipes=null,l.pipesCount=0,l.flowing=!1;for(var L=0;L0,a.flowing!==!1&&this.resume()):b==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,d("on readable",a.length,a.reading),a.length?D(this):a.reading||p.nextTick(M,this)),n},G.prototype.addListener=G.prototype.on,G.prototype.removeListener=function(b,l){var n=i.prototype.removeListener.call(this,b,l);return b==="readable"&&p.nextTick(F,this),n},G.prototype.removeAllListeners=function(b){var l=i.prototype.removeAllListeners.apply(this,arguments);return(b==="readable"||b===void 0)&&p.nextTick(F,this),l};function F(b){var l=b._readableState;l.readableListening=b.listenerCount("readable")>0,l.resumeScheduled&&!l.paused?l.flowing=!0:b.listenerCount("data")>0&&b.resume()}function M(b){d("readable nexttick read 0"),b.read(0)}G.prototype.resume=function(){var b=this._readableState;return b.flowing||(d("resume"),b.flowing=!b.readableListening,Y(this,b)),b.paused=!1,this};function Y(b,l){l.resumeScheduled||(l.resumeScheduled=!0,p.nextTick(te,b,l))}function te(b,l){d("resume",l.reading),l.reading||b.read(0),l.resumeScheduled=!1,b.emit("resume"),O(b),l.flowing&&!l.reading&&b.read(0)}G.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function O(b){var l=b._readableState;for(d("flow",l.flowing);l.flowing&&b.read()!==null;);}G.prototype.wrap=function(b){var l=this,n=this._readableState,a=!1;b.on("end",function(){if(d("wrapped end"),n.decoder&&!n.ended){var K=n.decoder.end();K&&K.length&&l.push(K)}l.push(null)}),b.on("data",function(K){if(d("wrapped data"),n.decoder&&(K=n.decoder.write(K)),!(n.objectMode&&K==null)&&!(!n.objectMode&&(!K||!K.length))){var J=l.push(K);J||(a=!0,b.pause())}});for(var w in b)this[w]===void 0&&typeof b[w]=="function"&&(this[w]=function(J){return function(){return b[J].apply(b,arguments)}}(w));for(var L=0;L=l.length?(l.decoder?n=l.buffer.join(""):l.buffer.length===1?n=l.buffer.first():n=l.buffer.concat(l.length),l.buffer.clear()):n=l.buffer.consume(b,l.decoder),n}function N(b){var l=b._readableState;d("endReadable",l.endEmitted),l.endEmitted||(l.ended=!0,p.nextTick(q,l,b))}function q(b,l){if(d("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&b.length===0&&(b.endEmitted=!0,l.readable=!1,l.emit("end"),b.autoDestroy)){var n=l._writableState;(!n||n.autoDestroy&&n.finished)&&l.destroy()}}typeof Symbol=="function"&&(G.from=function(b,l){return V===void 0&&(V=y("./internal/streams/from")),V(G,b,l)});function Q(b,l){for(var n=0,a=b.length;n-1))throw new S(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(ie.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function T(O,I,N){return!O.objectMode&&O.decodeStrings!==!1&&typeof I=="string"&&(I=e.from(I,N)),I}Object.defineProperty(ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function U(O,I,N,q,Q,b){if(!N){var l=T(I,q,Q);q!==l&&(N=!0,Q="buffer",q=l)}var n=I.objectMode?1:q.length;I.length+=n;var a=I.length0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(f){var v={data:f,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var v=this.head,R=""+v.data;v=v.next;)R+=f+v.data;return R}},{key:"concat",value:function(f){if(this.length===0)return e.alloc(0);for(var v=e.allocUnsafe(f>>>0),R=this.head,A=0;R;)d(R.data,v,A),A+=R.data.length,R=R.next;return v}},{key:"consume",value:function(f,v){var R;return fW.length?W.length:f;if(j===W.length?A+=W:A+=W.slice(0,f),f-=j,f===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(f){var v=e.allocUnsafe(f),R=this.head,A=1;for(R.data.copy(v),f-=R.data.length;R=R.next;){var W=R.data,j=f>W.length?W.length:f;if(W.copy(v,v.length-f,0,j),f-=j,f===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:u,value:function(f,v){return o(this,c({},v,{depth:0,customInspect:!1}))}}]),g}()},{buffer:3,util:2}],66:[function(y,k,x){(function(p){(function(){"use strict";function c(e,t){var o=this,u=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return u||d?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,p.nextTick(i,this,e)):p.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?p.nextTick(h,o):(o._writableState.errorEmitted=!0,p.nextTick(m,o,g)):p.nextTick(m,o,g):t?(p.nextTick(h,o),t(g)):p.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,u=e._writableState;o&&o.autoDestroy||u&&u.autoDestroy?e.destroy(t):e.emit("error",t)}k.exports={destroy:c,undestroy:s,errorOrDestroy:r}}).call(this)}).call(this,y("_process"))},{_process:85}],67:[function(y,k,x){"use strict";var p=y("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function c(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,C,P,function(S){R||(R=S),S&&A.forEach(t),!C&&(A.forEach(t),v(R))})});return _.reduce(o)}k.exports=d},{"../../../errors":58,"./end-of-stream":67}],70:[function(y,k,x){"use strict";var p=y("../../../errors").codes.ERR_INVALID_OPT_VALUE;function c(h,s,i){return h.highWaterMark!=null?h.highWaterMark:s?h[i]:null}function m(h,s,i,r){var e=c(s,r,i);if(e!=null){if(!(isFinite(e)&&Math.floor(e)===e)||e<0){var t=r?i:"highWaterMark";throw new p(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 p(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 c(){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 C=W.length-1;if(C=0?(P>0&&(A.lastNeed=P-1),P):--C=0?(P>0&&(A.lastNeed=P-2),P):--C=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 C=A.length-(j-this.lastNeed);return A.copy(this.lastChar,0,C),A.toString("utf8",W,C)}function u(A){var W=A&&A.length?this.write(A):"";return this.lastNeed?W+"\uFFFD":W}function d(A,W){if((A.length-W)%2===0){var j=A.toString("utf16le",W);if(j){var C=j.charCodeAt(j.length-1);if(C>=55296&&C<=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 f(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(p){(function(){k.exports=c;function c(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(!p.localStorage)return!1}catch{return!1}var s=p.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=p;function p(c,m){if(c&&m)return p(c)(m);if(typeof c!="function")throw new TypeError("need wrapper function");return Object.keys(c).forEach(function(s){h[s]=c[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},p.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},p.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},p.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},p.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 p;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},p.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,C=Math.floor,P=String.fromCharCode,S;function V(H){throw new RangeError(W[H])}function B(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=B(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 B(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?C(H/d):H>>1,H+=C(H/D);H>j*o>>1;$+=e)H=C(H/j);return C($+(j+1)*H/(H+u))}function U(H){var D=[],X=H.length,$,oe=0,Z=_,F=g,M,Y,te,O,I,N,q,Q,b;for(M=H.lastIndexOf(f),M<0&&(M=0),Y=0;Y=128&&V("not-basic"),D.push(H.charCodeAt(Y));for(te=M>0?M+1:0;te=X&&V("invalid-input"),q=G(H.charCodeAt(te++)),(q>=e||q>C((r-oe)/I))&&V("overflow"),oe+=q*I,Q=N<=F?t:N>=F+o?o:N-F,!(qC(r/b)&&V("overflow"),I*=b;$=D.length+1,F=T(oe-O,$,O==0),C(oe/$)>r-Z&&V("overflow"),Z+=C(oe/$),oe%=$,D.splice(oe++,0,Z)}return ie(D)}function z(H){var D,X,$,oe,Z,F,M,Y,te,O,I,N=[],q,Q,b,l;for(H=se(H),q=H.length,D=_,X=0,Z=g,F=0;F=D&&IC((r-X)/Q)&&V("overflow"),X+=(M-D)*Q,D=M,F=0;Fr&&V("overflow"),I==D){for(Y=X,te=e;O=te<=Z?t:te>=Z+o?o:te-Z,!(Y0&&o>t&&(o=t);for(var u=0;u=0?(_=d.substr(0,g),f=d.substr(g+1)):(_=d,f=""),v=decodeURIComponent(_),R=decodeURIComponent(f),p(r,v)?c(r[v])?r[v].push(R):r[v]=[r[v],R]:r[v]=R}return r};var c=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"}},{}],88:[function(y,k,x){"use strict";var p=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(p(t))+r;return c(s[t])?m(s[t],function(u){return o+encodeURIComponent(p(u))}).join(i):o+encodeURIComponent(p(s[t]))}).join(i):e?encodeURIComponent(p(e))+r+encodeURIComponent(p(s)):""};var c=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),u=["/","?","#"],d=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={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,B){if(S&&c.isObject(S)&&S instanceof m)return S;var ne=new m;return ne.parse(S,V,B),ne}m.prototype.parse=function(S,V,B){if(!c.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+=M[te];if(!Y.match(g)){var I=Z.slice(0,H),N=Z.slice(H+1),q=M.match(_);q&&(I.push(q[1]),N.unshift(q[2])),N.length&&(E="/"+N.join(".")+E),this.hostname=I.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),oe||(this.hostname=p.toASCII(this.hostname));var Q=this.port?":"+this.port:"",b=this.hostname||"";this.host=b+Q,this.href+=this.host,oe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),E[0]!=="/"&&(E="/"+E))}if(!f[z])for(var H=0,F=t.length;H0?B.host.split("@"):!1;Y&&(B.auth=Y.shift(),B.host=B.hostname=Y.shift())}return B.search=S.search,B.query=S.query,(!c.isNull(B.pathname)||!c.isNull(B.search))&&(B.path=(B.pathname?B.pathname:"")+(B.search?B.search:"")),B.href=B.format(),B}if(!Z.length)return B.pathname=null,B.search?B.path="/"+B.search:B.path=null,B.href=B.format(),B;for(var te=Z.slice(-1)[0],O=(B.host||S.host||Z.length>1)&&(te==="."||te==="..")||te==="",I=0,N=Z.length;N>=0;N--)te=Z[N],te==="."?Z.splice(N,1):te===".."?(Z.splice(N,1),I++):I&&(Z.splice(N,1),I--);if(!$&&!oe)for(;I--;I)Z.unshift("..");$&&Z[0]!==""&&(!Z[0]||Z[0].charAt(0)!=="/")&&Z.unshift(""),O&&Z.join("/").substr(-1)!=="/"&&Z.push("");var q=Z[0]===""||Z[0]&&Z[0].charAt(0)==="/";if(M){B.hostname=B.host=q?"":Z.length?Z.shift():"";var Y=B.host&&B.host.indexOf("@")>0?B.host.split("@"):!1;Y&&(B.auth=Y.shift(),B.host=B.hostname=Y.shift())}return $=$||B.host&&Z.length,$&&!q&&Z.unshift(""),Z.length?B.pathname=Z.join("/"):(B.pathname=null,B.path=null),(!c.isNull(B.pathname)||!c.isNull(B.search))&&(B.path=(B.pathname?B.pathname:"")+(B.search?B.search:"")),B.auth=S.auth||B.auth,B.slashes=B.slashes||S.slashes,B.href=B.format(),B},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(p){return typeof p=="string"},isObject:function(p){return typeof p=="object"&&p!==null},isNull:function(p){return p===null},isNullOrUndefined:function(p){return p==null}}},{}]},{},[17])(17)})});function Yr(ae,ue){if(ae&1&&(_e(0,"th",5),Te(1),ye()),ae&2){let pe=ue.$implicit;ge(),Re(pe.title)}}function Qr(ae,ue){if(ae&1&&(_e(0,"td",7),Te(1),ye()),ae&2){let pe=ue.$implicit,y=Ae().$implicit;ge(),Re(y[pe.key])}}function Gr(ae,ue){if(ae&1&&(_e(0,"tr"),Ee(1,Qr,2,1,"td",6),ye()),ae&2){let pe=Ae();ge(),be("ngForOf",pe.columns)}}var si=(()=>{let ue=class ue{constructor(){this.columns=[],this.data=[]}ngOnInit(){console.log(this.data)}};ue.\u0275fac=function(k){return new(k||ue)},ue.\u0275cmp=ke({type:ue,selectors:[["app-data-v-lj-table"]],inputs:{columns:"columns",data:"data"},standalone:!0,features:[Le],decls:7,vars:4,consts:[["nzBordered","","nzSize","small",3,"nzData","nzPageSize"],["dynamicTable",""],["style",` + background: rgb(8 22 48); + /* color: #bfceff !important; */ + color: #75f9fd; + text-align: center; + border: 0.5px solid #ffffff !important; + `,"nzShowSort","true",4,"ngFor","ngForOf"],[2,"background","rgb(8 22 48)"],[4,"ngFor","ngForOf"],["nzShowSort","true",2,"background","rgb(8 22 48)","/* color","#bfceff !important",`*/ + color`,"#75f9fd","text-align","center","border","0.5px solid #ffffff !important"],["style","text-align: center; color: #75f9fd; border: 0.5px solid #ffffff !important; transition: background 0.3s",4,"ngFor","ngForOf"],[2,"text-align","center","color","#75f9fd","border","0.5px solid #ffffff !important","transition","background 0.3s"]],template:function(k,x){if(k&1&&(_e(0,"nz-table",0,1)(2,"thead")(3,"tr"),Ee(4,Yr,2,1,"th",2),ye()(),_e(5,"tbody",3),Ee(6,Gr,2,1,"tr",4),ye()()),k&2){let p=Ne(1);be("nzData",x.data)("nzPageSize",5),ge(4),be("ngForOf",x.columns),ge(2),be("ngForOf",p.data)}},dependencies:[ze,qe,ht,it,ct,pt,ft,lt,Ve,et,rt,_t,at,st,nt,je,Xe,Ze,dt,yt,Ge,gt,ot,Qe,tt,Je,sr,ir,rr,nr,lr,or,ar,mt,He,We,ut,Ye,De,Ke,$e,Fe,Ue,tr],styles:[".ant-table-bordered[_ngcontent-%COMP%] .ant-table-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%], .ant-table-bordered[_ngcontent-%COMP%] .ant-table-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{border-color:#fff!important}.tableColor[_ngcontent-%COMP%] .ant-table-tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{border-right:3px solid #2b3e71!important;border-bottom:1px solid #334474!important;transition:background .3s}.tableColor[_ngcontent-%COMP%] .ant-table-thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{color:#bfceff!important;background-color:transparent!important;border-right:3px solid #2b3e71!important;border-bottom:1px solid #334474!important}"]});let ae=ue;return ae})();function $r(ae,ue){if(ae&1){let pe=jt();_e(0,"li",9)(1,"label",10),Wt("ngModelChange",function(k){let p=St(pe).$implicit;return xt(p.checked=k)})("ngModelChange",function(){St(pe);let k=Ae(2);return xt(k.onCheckChange())}),Te(2),ye()()}if(ae&2){let pe=ue.$implicit;ge(),be("ngModel",pe.checked),ge(),Re(pe.label)}}function Jr(ae,ue){if(ae&1&&(_e(0,"div",4),Dt(1,"a",5),_e(2,"nz-dropdown-menu",null,6)(4,"ul",7),Ee(5,$r,3,2,"li",8),ye()()()),ae&2){let pe=Ne(3),y=Ae();ge(),be("nzDropdownMenu",pe),ge(4),be("ngForOf",y.optionsList)}}var Xr=["*"],_i=(()=>{let ue=class ue{constructor(){this.showSetting=!1,this.optionsList=[],this.onCheckedItemsChange=new me,this.title=""}getCheckedItems(){return this.optionsList.filter(y=>y.checked)}onCheckChange(){let y=this.getCheckedItems();this.onCheckedItemsChange.emit(y)}};ue.\u0275fac=function(k){return new(k||ue)},ue.\u0275cmp=ke({type:ue,selectors:[["data-v-card"]],inputs:{showSetting:"showSetting",optionsList:"optionsList",title:"title"},outputs:{onCheckedItemsChange:"onCheckedItemsChange"},standalone:!0,features:[Le],ngContentSelectors:Xr,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&&(Ht(),_e(0,"div",0)(1,"div",1)(2,"div",2),Te(3),ye(),Ee(4,Jr,6,2,"div",3),ye(),Vt(5),ye()),k&2&&(ge(3),Re(x.title),ge(),be("ngIf",x.showSetting))},dependencies:[De,qt,Fe,Ue,zt,Qe,Jt,$t,Xt,Zt,er,ze,Yt,Qt,qe,ht,it,ct,pt,ft,lt,Ve,et,rt,_t,at,st,nt,je,Kt,Xe,Ze,dt,yt,Ge,gt,ot,tt,Je,mt,He,We,ut,Ye,Ke,Gt,$e],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 ae=ue;return ae})();var Ti=Tt(It(),1),fr=Tt(It(),1);var Pe=function(ae){return ae[ae.CLOSED=0]="CLOSED",ae[ae.CONNECTING=1]="CONNECTING",ae[ae.CONNECTED=2]="CONNECTED",ae}(Pe||{});var Zr=new vt("NgxMqttServiceConfig"),ei=new vt("NgxMqttClientService");function bt(ae,...ue){if(!ue.length)return ae;let pe=ue.shift();if(At(ae)&&At(pe))for(let y in pe)At(pe[y])?(ae[y]||Object.assign(ae,{[y]:{}}),bt(ae[y],pe[y])):Object.assign(ae,{[y]:pe[y]});return bt(ae,...ue)}function At(ae){return ae&&typeof ae=="object"&&!Array.isArray(ae)}var Oi=(()=>{let ue=class ue{constructor(y,k){this.options=y,this.observables={},this.state=new Mt(Pe.CLOSED),this.messages=new wt,this._clientId=this._generateClientId(),this._connectTimeout=1e4,this._reconnectPeriod=1e4,this._onConnect=new me,this._onReconnect=new me,this._onClose=new me,this._onOffline=new me,this._onError=new me,this._onEnd=new me,this._onMessage=new me,this._onSuback=new me,this._onPacketsend=new me,this._onPacketreceive=new me,this._handleOnConnect=x=>{this.options.connectOnCreate===!0&&Object.keys(this.observables).forEach(p=>{this.client.subscribe(p)}),this.state.next(Pe.CONNECTED),this._onConnect.emit(x)},this._handleOnReconnect=()=>{this.options.connectOnCreate===!0&&Object.keys(this.observables).forEach(x=>{this.client.subscribe(x)}),this.state.next(Pe.CONNECTING),this._onReconnect.emit()},this._handleOnClose=()=>{this.state.next(Pe.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,p,c)=>{this._onMessage.emit(c),c.cmd==="publish"&&this.messages.next(c)},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(),p=(k||"").split("/").reverse(),c=()=>{let m=x.pop(),h=p.pop();switch(m){case"#":return!0;case"+":return h?c():!1;default:return m===h&&(m===void 0?!0:c())}};return c()}connect(y,k){let x=bt(this.options||{},y),p=x.protocol||"ws",c=x.hostname||"localhost";x.url?this._url=x.url:(this._url=`${p}://${c}`,this._url+=x.port?`:${x.port}`:"",this._url+=x.path?`${x.path}`:""),this.state.next(Pe.CONNECTING);let m=bt({clientId:this._clientId,reconnectPeriod:this._reconnectPeriod,connectTimeout:this._connectTimeout},x);this.client&&this.client.end(!0),k?this.client=k:this.client=(0,fr.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,()=>Ut(1),k)}observe(y,k={qos:1}){return this._generalObserve(y,()=>Lt(),k)}_generalObserve(y,k,x){if(!this.client)throw new Error("mqtt client not connected");if(!this.observables[y]){let p=new wt;this.observables[y]=Nt(()=>{let c=new Rt;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),p.error(`subscription for '${s.topic}' rejected!`)),this._onSuback.emit({filter:y,granted:s.qos!==128})})}),c.add(()=>{delete this.observables[y],this.client.unsubscribe(y)}),c},c=>Bt(p,this.messages)).pipe(kt(c=>ue.filterMatchesTopic(y,c.topic)),k(),Ot())}return this.observables[y]}publish(y,k,x={}){if(!this.client)throw new Error("mqtt client not connected");return Pt.create(p=>{this.client.publish(y,k,x,c=>{c?p.error(c):(p.next(),p.complete())})})}unsafePublish(y,k,x={}){if(!this.client)throw new Error("mqtt client not connected");this.client.publish(y,k,x,p=>{if(p)throw p})}_generateClientId(){return"client-"+Math.random().toString(36).substr(2,19)}};ue.\u0275fac=function(k){return new(k||ue)(Et(Zr),Et(ei))},ue.\u0275prov=Ft({token:ue,factory:ue.\u0275fac,providedIn:"root"});let ae=ue;return ae})();export{si as a,_i as b,Oi as c}; diff --git a/dist/himp.platform.angular/browser/chunk-HCPW2OGS.js b/dist/himp.platform.angular/browser/chunk-MRNYEB3J.js similarity index 99% rename from dist/himp.platform.angular/browser/chunk-HCPW2OGS.js rename to dist/himp.platform.angular/browser/chunk-MRNYEB3J.js index c46c212..1368b03 100644 --- a/dist/himp.platform.angular/browser/chunk-HCPW2OGS.js +++ b/dist/himp.platform.angular/browser/chunk-MRNYEB3J.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-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=` +import{B as Me,C as je,Ha as It,Ia as Yi,N as Ue,Na as Ji,O as ke,Oa as Xi,P as Fe,Pa as en,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 tn,bb as nn,c as Vi,cb as _t,d as Ee,db as Oe,f as Ie,g as Ri,h as ut,j as ge,ma as ft,mb as on,n as _e,na as ht,oa as qi,pa as gt,qa as Qi,ra as Gi,u as dt,va as Zi,w as Bi,wa as Ki,x as Hi,y as Pi}from"./chunk-WD6SV3WH.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-GNH673QO.js b/dist/himp.platform.angular/browser/chunk-MU3AQSF6.js similarity index 99% rename from dist/himp.platform.angular/browser/chunk-GNH673QO.js rename to dist/himp.platform.angular/browser/chunk-MU3AQSF6.js index 6b05368..d72d711 100644 --- a/dist/himp.platform.angular/browser/chunk-GNH673QO.js +++ b/dist/himp.platform.angular/browser/chunk-MU3AQSF6.js @@ -1,4 +1,4 @@ -import{a as zn}from"./chunk-2TNVIQ4O.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-OOUNO2UZ.js";import{Ab as q,Bb as j,Cb as Q,Db as P,Eb as C,Fb as Z,Fe as Ds,Gb as zr,Ge as ee,He,Ie as Be,Jb as X,Ka as y,Kb as We,Ke as Ue,Lb as rt,Le as te,Mf as Ie,Nf as ze,Sb as B,Ta as O,Va as M,Zc as Cr,a as gi,b as Pi,c as Cs,cc as yi,dc as Ri,f as ed,ff as Nr,gb as p,gf as Mi,h as td,ha as vs,hb as f,hf as ie,ib as b,j as Qe,jb as Ii,jf as Ze,ka as Sr,kb as Yi,kf as Ke,la as v,lf as re,mb as L,na as J,qb as T,rf as vr,sa as k,sb as w,ta as E,vf as Pe,xf as K,z as Ns}from"./chunk-VDRVUQCF.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-2TNVIQ4O.js b/dist/himp.platform.angular/browser/chunk-SIJVS6LY.js similarity index 91% rename from dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js rename to dist/himp.platform.angular/browser/chunk-SIJVS6LY.js index 8b456db..771af1e 100644 --- a/dist/himp.platform.angular/browser/chunk-2TNVIQ4O.js +++ b/dist/himp.platform.angular/browser/chunk-SIJVS6LY.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-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}; +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-WD6SV3WH.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-FD5ZSWKQ.js b/dist/himp.platform.angular/browser/chunk-TZPPFKXI.js similarity index 97% rename from dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js rename to dist/himp.platform.angular/browser/chunk-TZPPFKXI.js index 5efab61..5e64b2e 100644 --- a/dist/himp.platform.angular/browser/chunk-FD5ZSWKQ.js +++ b/dist/himp.platform.angular/browser/chunk-TZPPFKXI.js @@ -1 +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}; +import{a as fe,e as he,j as Te}from"./chunk-MRNYEB3J.js";import{b as Ie}from"./chunk-SIJVS6LY.js";import{A as Ce,Aa as L,Ba as G,C as _e,Ca as oe,Da as $,Ea as q,Fa as j,Ga as W,Pa as ye,Qa as Ne,Ta as xe,Ua as Ee,Y as Se,Z as Fe,_ as be,ab as re,bb as ne,cb as Me,d as ge,db as ke,eb as we,fb as De,gb as Be,h as D,hb as Ae,i as d,j as B,k as A,l as ze,m as ve,ma as O,mb as Pe,o as P,oa as U,p as T,pa as V,q as I,t as ie,v as R}from"./chunk-WD6SV3WH.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-R3OIOWDW.js b/dist/himp.platform.angular/browser/chunk-U3NGNWYP.js similarity index 83% rename from dist/himp.platform.angular/browser/chunk-R3OIOWDW.js rename to dist/himp.platform.angular/browser/chunk-U3NGNWYP.js index 3840424..9dfe2af 100644 --- a/dist/himp.platform.angular/browser/chunk-R3OIOWDW.js +++ b/dist/himp.platform.angular/browser/chunk-U3NGNWYP.js @@ -1,34 +1,34 @@ -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(` +import{a as rL,b as RV,c as LV}from"./chunk-M4HTTI2X.js";import{$a as Qc,A as Nc,Aa as KM,Ba as JM,C as Uc,Ca as Tl,Ga as Xc,Ia as qc,La as Zc,Pa as jc,Sa as Kc,Ua as Jc,V as Oc,W as bV,X as wV,Xa as $c,_ as Fc,b as ZM,ba as TV,bb as ef,ca as wl,cb as EV,db as El,e as Pc,fb as tf,gb as AV,hb as rf,jb as nf,kb as CV,la as zc,pa as Bc,ra as kc,ta as Vc,u as Dc,ua as Gc,v as Ic,wa as Hc,y as jM,ya as Wc}from"./chunk-WD6SV3WH.js";import{$ as oV,Ab as vm,Bb as co,Cb as fo,D as rV,Db as gu,Eb as Pi,Fb as Ec,Gc as yV,Ge as Ac,Ha as cV,I as iV,Ib as vV,Jb as ui,Jc as _V,Ka as Ot,Kc as xV,La as uo,Lb as gV,Le as Cc,Ma as jR,Mb as tL,Me as YM,Ne as qM,Nf as Yc,Pa as fV,Q as nV,Sb as gm,Ta as br,U as aV,Va as Rt,Wa as hV,Xa as KR,Ya as pV,a as E0,ba as ZR,cc as R0,cd as SV,db as JR,dc as bl,e as Ise,eb as $R,f as Nse,fb as QR,g as YR,gb as tr,h as Use,hb as lr,hf as Rc,i as Ose,ia as sV,ib as li,ic as L0,j as WM,jb as Sl,kb as Ml,la as xl,lb as dV,lf as Lc,m as Qk,na as si,nc as XM,o as qR,oa as lV,p as eV,pa as uV,qb as mV,ra as C0,sb as Lr,tb as Ho,tf as MV,u as A0,ub as Li,vf as ym,w as tV,xd as P0,xf as _m,yb as eL,zb as Tc}from"./chunk-VDRVUQCF.js";var $ne={};YR($ne,{AddEquation:()=>Gz,AddOperation:()=>sne,AdditiveBlending:()=>zz,AlphaFormat:()=>yne,AlwaysDepth:()=>ene,AmbientLight:()=>aC,AnimationClip:()=>No,AnimationMixer:()=>fB,AnimationObjectGroup:()=>Tz,AnimationUtils:()=>Jn,ArcCurve:()=>gC,ArrowHelper:()=>$d,Audio:()=>by,AudioAnalyser:()=>cB,AudioContext:()=>lB,AudioListener:()=>bz,AudioLoader:()=>uB,AxisHelper:()=>vC,BackSide:()=>yh,BasicDepthPacking:()=>Dne,BasicShadowMap:()=>$Ee,BinaryTextureLoader:()=>tB,BlendingMode:()=>Vie,Bone:()=>jA,BooleanKeyframeTrack:()=>cC,BoundingBoxHelper:()=>ELe,Box2:()=>PS,Box3:()=>lu,BoxBufferGeometry:()=>Ud,BoxGeometry:()=>oM,BoxHelper:()=>Iy,BufferAttribute:()=>gt,BufferGeometry:()=>Bt,BufferGeometryLoader:()=>iB,ByteType:()=>hne,Cache:()=>Sz,Camera:()=>Qn,CameraHelper:()=>mM,CanvasRenderer:()=>ILe,CanvasTexture:()=>$A,CatmullRomCurve3:()=>hB,CineonToneMapping:()=>cne,CircleBufferGeometry:()=>yy,CircleGeometry:()=>aM,ClampToEdgeWrapping:()=>Uo,Clock:()=>Lz,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:()=>rB,CubeUVReflectionMapping:()=>SC,CubeUVRefractionMapping:()=>MC,CubicBezierCurve:()=>jd,CubicBezierCurve3:()=>tLe,CubicInterpolant:()=>oC,CullFaceBack:()=>wS,CullFaceFront:()=>Iz,CullFaceFrontBack:()=>KEe,CullFaceNone:()=>zie,Curve:()=>ea,CurvePath:()=>cM,CurveUtils:()=>_M,CustomBlending:()=>Vz,CylinderBufferGeometry:()=>sc,CylinderGeometry:()=>Vd,Cylindrical:()=>Dz,DataTexture:()=>Nd,DataTextureLoader:()=>$Re,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:()=>vLe,EdgesGeometry:()=>gy,EdgesHelper:()=>ALe,EllipseCurve:()=>lc,EqualDepth:()=>rne,EquirectangularReflectionMapping:()=>Yz,EquirectangularRefractionMapping:()=>WA,Euler:()=>bh,EventDispatcher:()=>Ms,ExtrudeGeometry:()=>ws,Face3:()=>Fo,Face4:()=>aLe,FaceColors:()=>Fz,FaceNormalsHelper:()=>dM,FileLoader:()=>Ts,FlatShading:()=>Uz,Float32Attribute:()=>wLe,Float32BufferAttribute:()=>gr,Float64Attribute:()=>TLe,Float64BufferAttribute:()=>zS,FloatType:()=>jg,Fog:()=>ry,FogExp2:()=>ty,Font:()=>sB,FontLoader:()=>qne,FrontFaceDirectionCCW:()=>JEe,FrontFaceDirectionCW:()=>Bie,FrontSide:()=>Zg,Frustum:()=>DS,GammaEncoding:()=>Jz,Geometry:()=>or,GeometryIdCount:()=>$z,GeometryUtils:()=>LLe,GreaterDepth:()=>nne,GreaterEqualDepth:()=>ine,GridHelper:()=>pM,Group:()=>VS,HalfFloatType:()=>YA,HemisphereLight:()=>QA,HemisphereLightHelper:()=>Py,IcosahedronBufferGeometry:()=>ly,IcosahedronGeometry:()=>YS,ImageLoader:()=>yM,ImageUtils:()=>PLe,ImmediateRenderObject:()=>fM,InstancedBufferAttribute:()=>Ey,InstancedBufferGeometry:()=>Jd,InstancedInterleavedBuffer:()=>Ty,Int16Attribute:()=>xLe,Int16BufferAttribute:()=>OS,Int32Attribute:()=>MLe,Int32BufferAttribute:()=>FS,Int8Attribute:()=>gLe,Int8BufferAttribute:()=>IS,IntType:()=>dne,InterleavedBuffer:()=>wy,InterleavedBufferAttribute:()=>Az,Interpolant:()=>ro,InterpolateDiscrete:()=>CS,InterpolateLinear:()=>bS,InterpolateSmooth:()=>VA,JSONLoader:()=>nB,KeyframeTrack:()=>qd,LOD:()=>kS,LatheBufferGeometry:()=>dy,LatheGeometry:()=>rM,Layers:()=>qA,LensFlare:()=>xz,LessDepth:()=>tne,LessEqualDepth:()=>GA,Light:()=>Oi,LightShadow:()=>em,Line:()=>oc,Line3:()=>Rd,LineBasicMaterial:()=>Ui,LineCurve:()=>cu,LineCurve3:()=>iLe,LineDashedMaterial:()=>Yd,LinePieces:()=>sLe,LineSegments:()=>di,LineStrip:()=>oLe,LinearEncoding:()=>LS,LinearFilter:()=>to,LinearInterpolant:()=>lM,LinearMipMapLinearFilter:()=>gM,LinearMipMapNearestFilter:()=>Zz,LinearToneMapping:()=>Xz,Loader:()=>Ld,LoadingManager:()=>eB,LogLuvEncoding:()=>eAe,LoopOnce:()=>Mne,LoopPingPong:()=>wne,LoopRepeat:()=>bne,LuminanceAlphaFormat:()=>xne,LuminanceFormat:()=>_ne,MOUSE:()=>jEe,Material:()=>mr,MaterialLoader:()=>EC,Math:()=>cr,Matrix3:()=>bs,Matrix4:()=>qt,MaxEquation:()=>lz,Mesh:()=>mn,MeshBasicMaterial:()=>io,MeshDepthMaterial:()=>Sh,MeshFaceMaterial:()=>lLe,MeshLambertMaterial:()=>Xd,MeshNormalMaterial:()=>Wd,MeshPhongMaterial:()=>ml,MeshPhysicalMaterial:()=>Gd,MeshStandardMaterial:()=>uu,MeshToonMaterial:()=>Hd,MinEquation:()=>sz,MirroredRepeatWrapping:()=>Dd,MixOperation:()=>one,MorphBlendMesh:()=>Pn,MultiMaterial:()=>sM,MultiplyBlending:()=>kz,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:()=>Wz,OneMinusSrcColorFactor:()=>qie,OrthographicCamera:()=>ey,PCFShadowMap:()=>Nz,PCFSoftShadowMap:()=>kie,ParametricBufferGeometry:()=>oy,ParametricGeometry:()=>HS,Particle:()=>cLe,ParticleBasicMaterial:()=>pLe,ParticleSystem:()=>fLe,ParticleSystemMaterial:()=>dLe,Path:()=>xM,PerspectiveCamera:()=>Kn,Plane:()=>Io,PlaneBufferGeometry:()=>Od,PlaneGeometry:()=>tM,PointCloud:()=>uLe,PointCloudMaterial:()=>hLe,PointLight:()=>rC,PointLightHelper:()=>Ry,Points:()=>iy,PointsMaterial:()=>dl,PolarGridHelper:()=>mC,PolyhedronBufferGeometry:()=>no,PolyhedronGeometry:()=>ZS,PositionalAudio:()=>wz,Projector:()=>DLe,PropertyBinding:()=>Ri,PropertyMixer:()=>pC,QuadraticBezierCurve:()=>Kd,QuadraticBezierCurve3:()=>rLe,Quaternion:()=>on,QuaternionKeyframeTrack:()=>uM,QuaternionLinearInterpolant:()=>lC,REVISION:()=>Fie,RGBADepthPacking:()=>Ine,RGBAFormat:()=>su,RGBA_PVRTC_2BPPV1_Format:()=>yz,RGBA_PVRTC_4BPPV1_Format:()=>gz,RGBA_S3TC_DXT1_Format:()=>hz,RGBA_S3TC_DXT3_Format:()=>pz,RGBA_S3TC_DXT5_Format:()=>dz,RGBDEncoding:()=>Pne,RGBEEncoding:()=>Cne,RGBEFormat:()=>QEe,RGBFormat:()=>Kg,RGBM16Encoding:()=>Lne,RGBM7Encoding:()=>Rne,RGB_ETC1_Format:()=>Sne,RGB_PVRTC_2BPPV1_Format:()=>vz,RGB_PVRTC_4BPPV1_Format:()=>mz,RGB_S3TC_DXT1_Format:()=>fz,RawShaderMaterial:()=>xy,Ray:()=>Mh,Raycaster:()=>Cz,RectAreaLight:()=>Mz,RectAreaLightHelper:()=>Ly,ReinhardToneMapping:()=>lne,RepeatWrapping:()=>ic,ReverseSubtractEquation:()=>Hie,RingBufferGeometry:()=>py,RingGeometry:()=>eM,Scene:()=>Fd,SceneUtils:()=>nLe,ShaderChunk:()=>Xr,ShaderLib:()=>Qg,ShaderMaterial:()=>_a,ShadowMaterial:()=>_y,Shape:()=>Pd,ShapeBufferGeometry:()=>my,ShapeGeometry:()=>vy,ShapePath:()=>oB,ShapeUtils:()=>Ln,ShortType:()=>pne,Skeleton:()=>ZA,SkeletonHelper:()=>Cy,SkinnedMesh:()=>KA,SmoothShading:()=>Oz,Sphere:()=>$n,SphereBufferGeometry:()=>kd,SphereGeometry:()=>QS,Spherical:()=>Pz,SphericalReflectionMapping:()=>qz,Spline:()=>QRe,SplineCurve:()=>Zd,SplineCurve3:()=>eLe,SpotLight:()=>tC,SpotLightHelper:()=>Ay,SpotLightShadow:()=>eC,Sprite:()=>BS,SpriteMaterial:()=>zd,SrcAlphaFactor:()=>Hz,SrcAlphaSaturateFactor:()=>$ie,SrcColorFactor:()=>Yie,StereoCamera:()=>Zne,StringKeyframeTrack:()=>uC,SubtractEquation:()=>Gie,SubtractiveBlending:()=>Bz,TetrahedronBufferGeometry:()=>sy,TetrahedronGeometry:()=>WS,TextGeometry:()=>$S,Texture:()=>ni,TextureFilter:()=>cz,TextureLoader:()=>TC,TextureMapping:()=>fne,TextureWrapping:()=>uz,TorusBufferGeometry:()=>hy,TorusGeometry:()=>JS,TorusKnotBufferGeometry:()=>fy,TorusKnotGeometry:()=>KS,Triangle:()=>Ss,TriangleFanDrawMode:()=>Ene,TriangleStripDrawMode:()=>Tne,TrianglesDrawMode:()=>Kz,TubeBufferGeometry:()=>cy,TubeGeometry:()=>jS,UVMapping:()=>_C,Uint16Attribute:()=>SLe,Uint16BufferAttribute:()=>nc,Uint32Attribute:()=>bLe,Uint32BufferAttribute:()=>ac,Uint8Attribute:()=>yLe,Uint8BufferAttribute:()=>NS,Uint8ClampedAttribute:()=>_Le,Uint8ClampedBufferAttribute:()=>US,Uncharted2ToneMapping:()=>une,Uniform:()=>dC,UniformsLib:()=>hr,UniformsUtils:()=>eo,UnsignedByteType:()=>XA,UnsignedInt248Type:()=>AS,UnsignedIntType:()=>jz,UnsignedShort4444Type:()=>mne,UnsignedShort5551Type:()=>vne,UnsignedShort565Type:()=>gne,UnsignedShortType:()=>ES,Vector2:()=>St,Vector3:()=>oe,Vector4:()=>Qr,VectorKeyframeTrack:()=>Sy,Vertex:()=>mLe,VertexColors:()=>Qd,VertexNormalsHelper:()=>hM,VideoTexture:()=>JA,WebGLRenderTarget:()=>Oy,WebGLRenderTargetCube:()=>$g,WebGLRenderer:()=>Qz,WireframeGeometry:()=>ay,WireframeHelper:()=>CLe,WrapAroundEnding:()=>RS,XHRLoader:()=>RLe,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:tAe++}),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 rAe(r,e){r.uniform1f(this.addr,e)}function iAe(r,e){r.uniform1i(this.addr,e)}function nAe(r,e){e.x===void 0?r.uniform2fv(this.addr,e):r.uniform2f(this.addr,e.x,e.y)}function aAe(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 oAe(r,e){e.x===void 0?r.uniform4fv(this.addr,e):r.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function sAe(r,e){r.uniformMatrix2fv(this.addr,!1,e.elements||e)}function lAe(r,e){r.uniformMatrix3fv(this.addr,!1,e.elements||e)}function uAe(r,e){r.uniformMatrix4fv(this.addr,!1,e.elements||e)}function cAe(r,e,t){var i=t.allocTextureUnit();r.uniform1i(this.addr,i),t.setTexture2D(e||Nne,i)}function fAe(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 hAe(r){switch(r){case 5126:return rAe;case 35664:return nAe;case 35665:return aAe;case 35666:return oAe;case 35674:return sAe;case 35675:return lAe;case 35676:return uAe;case 35678:return cAe;case 35680:return fAe;case 5124:case 35670:return iAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function pAe(r,e){r.uniform1fv(this.addr,e)}function dAe(r,e){r.uniform1iv(this.addr,e)}function mAe(r,e){r.uniform2fv(this.addr,Fy(e,this.size,2))}function vAe(r,e){r.uniform3fv(this.addr,Fy(e,this.size,3))}function gAe(r,e){r.uniform4fv(this.addr,Fy(e,this.size,4))}function yAe(r,e){r.uniformMatrix2fv(this.addr,!1,Fy(e,this.size,4))}function _Ae(r,e){r.uniformMatrix3fv(this.addr,!1,Fy(e,this.size,9))}function xAe(r,e){r.uniformMatrix4fv(this.addr,!1,Fy(e,this.size,16))}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.setTexture2D(e[a]||Nne,n[a])}function MAe(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 bAe(r){switch(r){case 5126:return pAe;case 35664:return mAe;case 35665:return vAe;case 35666:return gAe;case 35674:return yAe;case 35675:return _Ae;case 35676:return xAe;case 35678:return SAe;case 35680:return MAe;case 5124:case 35670:return dAe;case 35667:case 35671:return zne;case 35668:case 35672:return Bne;case 35669:case 35673:return kne}}function wAe(r,e,t){this.id=r,this.addr=t,this.setValue=hAe(e.type)}function TAe(r,e,t){this.id=r,this.addr=t,this.size=e.size,this.setValue=bAe(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 EAe(r,e,t){var i=r.name,n=i.length;for(az.lastIndex=0;;){var a=az.exec(i),o=az.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 wAe(s,r,e):new TAe(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);EAe(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 ERe(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() { +`)),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:CRe++}),this.uuid=cr.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=Uy,this.side=Zg,this.shading=Oz,this.vertexColors=yC,this.opacity=1,this.transparent=!1,this.blendSrc=Hz,this.blendDst=Wz,this.blendEquation=Gz,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;v0&&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=Nz,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,` +`)}function Iie(r,e,t){var i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),r.getShaderParameter(i,r.COMPILE_STATUS)===!1&&console.error("THREE.WebGLShader: Shader couldn't compile."),r.getShaderInfoLog(i)!==""&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===r.VERTEX_SHADER?"vertex":"fragment",r.getShaderInfoLog(i),NRe(t)),i}function Wne(r){switch(r){case LS:return["Linear","( value )"];case Ane:return["sRGB","( value )"];case Cne:return["RGBE","( value )"];case Rne:return["RGBM","( value, 7.0 )"];case Lne:return["RGBM","( value, 16.0 )"];case Pne:return["RGBD","( value, 256.0 )"];case Jz:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+r)}}function oz(r,e){var t=Wne(e);return"vec4 "+r+"( vec4 value ) { return "+t[0]+"ToLinear"+t[1]+"; }"}function ORe(r,e){var t=Wne(e);return"vec4 "+r+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function FRe(r,e){var t;switch(e){case Xz:t="Linear";break;case lne:t="Reinhard";break;case une:t="Uncharted2";break;case cne:t="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function zRe(r,e,t){r=r||{};var i=[r.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(r.fragDepth||e.logarithmicDepthBuffer)&&t.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",r.drawBuffers&&t.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(r.shaderTextureLOD||e.envMap)&&t.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""];return i.filter(MS).join(` +`)}function BRe(r){var e=[];for(var t in r){var i=r[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` +`)}function kRe(r,e,t){for(var i={},n=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES),a=0;a/g;function t(i,n){var a=Xr[n];if(a===void 0)throw new Error("Can not resolve #include <"+n+">");return _z(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=zRe(a,i,r.extensions),g=BRe(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:"",` +`),_=[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?FRe("toneMapping",i.toneMapping):"",i.outputEncoding||i.mapEncoding||i.envMapEncoding||i.emissiveMapEncoding?Xr.encodings_pars_fragment:"",i.mapEncoding?oz("mapTexelToLinear",i.mapEncoding):"",i.envMapEncoding?oz("envMapTexelToLinear",i.envMapEncoding):"",i.emissiveMapEncoding?oz("emissiveMapTexelToLinear",i.emissiveMapEncoding):"",i.outputEncoding?ORe("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;a0,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 XRe(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!==jz&&(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 jRe(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 KRe(){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===Zz)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===jz)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===Gz)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===Hz)return q.SRC_ALPHA;if(P===Wz)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===fz||P===hz||P===pz||P===dz)&&(W=We.get("WEBGL_compressed_texture_s3tc"),W!==null)){if(P===fz)return W.COMPRESSED_RGB_S3TC_DXT1_EXT;if(P===hz)return W.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(P===pz)return W.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(P===dz)return W.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((P===mz||P===vz||P===gz||P===yz)&&(W=We.get("WEBGL_compressed_texture_pvrtc"),W!==null)){if(P===mz)return W.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(P===vz)return W.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(P===gz)return W.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(P===yz)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===sz||P===lz)&&(W=We.get("EXT_blend_minmax"),W!==null)){if(P===sz)return W.MIN_EXT;if(P===lz)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 xz(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}};tAe=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 ); @@ -283,7 +283,7 @@ float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) { float BlinnExponentToGGXRoughness( const in float blinnExponent ) { return sqrt( 2.0 / ( blinnExponent + 2.0 ) ); } -`,NAe=`#ifdef USE_BUMPMAP +`,UAe=`#ifdef USE_BUMPMAP uniform sampler2D bumpMap; uniform float bumpScale; vec2 dHdxy_fwd() { @@ -305,7 +305,7 @@ float BlinnExponentToGGXRoughness( const in float blinnExponent ) { return normalize( abs( fDet ) * surf_norm - vGrad ); } #endif -`,UAe=`#if NUM_CLIPPING_PLANES > 0 +`,OAe=`#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; @@ -321,28 +321,28 @@ float BlinnExponentToGGXRoughness( const in float blinnExponent ) { #endif #endif -`,OAe=`#if NUM_CLIPPING_PLANES > 0 +`,FAe=`#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 ) +`,zAe=`#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) varying vec3 vViewPosition; #endif -`,zAe=`#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) +`,BAe=`#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) vViewPosition = - mvPosition.xyz; #endif -`,BAe=`#ifdef USE_COLOR +`,kAe=`#ifdef USE_COLOR diffuseColor.rgb *= vColor; -#endif`,kAe=`#ifdef USE_COLOR +#endif`,VAe=`#ifdef USE_COLOR varying vec3 vColor; #endif -`,VAe=`#ifdef USE_COLOR +`,GAe=`#ifdef USE_COLOR varying vec3 vColor; -#endif`,GAe=`#ifdef USE_COLOR +#endif`,HAe=`#ifdef USE_COLOR vColor.xyz = color.xyz; -#endif`,HAe=`#define PI 3.14159265359 +#endif`,WAe=`#define PI 3.14159265359 #define PI2 6.28318530718 #define PI_HALF 1.5707963267949 #define RECIPROCAL_PI 0.31830988618 @@ -399,7 +399,7 @@ mat3 transpose( const in mat3 v ) { tmp[2] = vec3(v[0].z, v[1].z, v[2].z); return tmp; } -`,WAe=`#ifdef ENVMAP_TYPE_CUBE_UV +`,XAe=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_textureSize (1024.0) int getFaceFromDirection(vec3 direction) { vec3 absDirection = abs(direction); @@ -503,28 +503,28 @@ vec4 textureCubeUV(vec3 reflectedDirection, float roughness ) { return vec4(result.rgb, 1.0); } #endif -`,XAe=`#ifdef FLIP_SIDED +`,YAe=`#ifdef FLIP_SIDED objectNormal = -objectNormal; #endif vec3 transformedNormal = normalMatrix * objectNormal; -`,YAe=`#ifdef USE_DISPLACEMENTMAP +`,qAe=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; #endif -`,qAe=`#ifdef USE_DISPLACEMENTMAP +`,ZAe=`#ifdef USE_DISPLACEMENTMAP transformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias ); #endif -`,ZAe=`#ifdef USE_EMISSIVEMAP +`,jAe=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vUv ); emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; totalEmissiveRadiance *= emissiveColor.rgb; #endif -`,jAe=`#ifdef USE_EMISSIVEMAP +`,KAe=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; #endif -`,KAe=` gl_FragColor = linearToOutputTexel( gl_FragColor ); -`,JAe=` +`,JAe=` gl_FragColor = linearToOutputTexel( gl_FragColor ); +`,$Ae=` vec4 LinearToLinear( in vec4 value ) { return value; } @@ -587,7 +587,7 @@ vec4 LogLuvToLinear( in vec4 value ) { vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM; return vec4( max(vRGB, 0.0), 1.0 ); } -`,$Ae=`#ifdef USE_ENVMAP +`,QAe=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) vec3 cameraToVertex = normalize( vWorldPosition - cameraPosition ); vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -621,7 +621,7 @@ vec4 LogLuvToLinear( in vec4 value ) { outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif #endif -`,QAe=`#if defined( USE_ENVMAP ) || defined( PHYSICAL ) +`,eCe=`#if defined( USE_ENVMAP ) || defined( PHYSICAL ) uniform float reflectivity; uniform float envMapIntensity; #endif @@ -641,7 +641,7 @@ vec4 LogLuvToLinear( in vec4 value ) { varying vec3 vReflect; #endif #endif -`,eCe=`#ifdef USE_ENVMAP +`,tCe=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) varying vec3 vWorldPosition; #else @@ -649,7 +649,7 @@ vec4 LogLuvToLinear( in vec4 value ) { uniform float refractionRatio; #endif #endif -`,tCe=`#ifdef USE_ENVMAP +`,rCe=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) vWorldPosition = worldPosition.xyz; #else @@ -662,7 +662,7 @@ vec4 LogLuvToLinear( in vec4 value ) { #endif #endif #endif -`,rCe=`#ifdef USE_FOG +`,iCe=`#ifdef USE_FOG #ifdef USE_LOGDEPTHBUF_EXT float depth = gl_FragDepthEXT / gl_FragCoord.w; #else @@ -675,7 +675,7 @@ vec4 LogLuvToLinear( in vec4 value ) { #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); #endif -`,iCe=`#ifdef USE_FOG +`,nCe=`#ifdef USE_FOG uniform vec3 fogColor; #ifdef FOG_EXP2 uniform float fogDensity; @@ -683,7 +683,7 @@ vec4 LogLuvToLinear( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,nCe=`#ifdef TOON +#endif`,aCe=`#ifdef TOON uniform sampler2D gradientMap; vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { float dotNL = dot( normal, lightDirection ); @@ -695,13 +695,13 @@ vec4 LogLuvToLinear( in vec4 value ) { #endif } #endif -`,aCe=`#ifdef USE_LIGHTMAP +`,oCe=`#ifdef USE_LIGHTMAP reflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; #endif -`,oCe=`#ifdef USE_LIGHTMAP +`,sCe=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,sCe=`vec3 diffuse = vec3( 1.0 ); +#endif`,lCe=`vec3 diffuse = vec3( 1.0 ); GeometricContext geometry; geometry.position = mvPosition.xyz; geometry.normal = normalize( transformedNormal ); @@ -762,7 +762,7 @@ vec3 directLightColor_Diffuse; #endif } #endif -`,lCe=`uniform vec3 ambientLightColor; +`,uCe=`uniform vec3 ambientLightColor; vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { vec3 irradiance = ambientLightColor; #ifndef PHYSICALLY_CORRECT_LIGHTS @@ -930,12 +930,12 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { return envMapColor.rgb * envMapIntensity; } #endif -`,uCe=`BlinnPhongMaterial material; +`,cCe=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength; -`,cCe=`varying vec3 vViewPosition; +`,fCe=`varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; #endif @@ -983,7 +983,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric #define RE_Direct_RectArea RE_Direct_RectArea_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong #define Material_LightProbeLOD( material ) (0) -`,fCe=`PhysicalMaterial material; +`,hCe=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 ); #ifdef STANDARD @@ -992,7 +992,7 @@ material.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 ); 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 { +`,pCe=`struct PhysicalMaterial { vec3 diffuseColor; float specularRoughness; vec3 specularColor; @@ -1066,7 +1066,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCo 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=` +`,dCe=` GeometricContext geometry; geometry.position = - vViewPosition; geometry.normal = normal; @@ -1141,20 +1141,20 @@ IncidentLight directLight; RE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight ); #endif -`,dCe=`#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT) +`,mCe=`#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT) gl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5; -#endif`,mCe=`#ifdef USE_LOGDEPTHBUF +#endif`,vCe=`#ifdef USE_LOGDEPTHBUF uniform float logDepthBufFC; #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; #endif #endif -`,vCe=`#ifdef USE_LOGDEPTHBUF +`,gCe=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; #endif uniform float logDepthBufFC; -#endif`,gCe=`#ifdef USE_LOGDEPTHBUF +#endif`,yCe=`#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; @@ -1162,42 +1162,42 @@ IncidentLight directLight; gl_Position.z = (gl_Position.z - 1.0) * gl_Position.w; #endif #endif -`,yCe=`#ifdef USE_MAP +`,_Ce=`#ifdef USE_MAP vec4 texelColor = texture2D( map, vUv ); texelColor = mapTexelToLinear( texelColor ); diffuseColor *= texelColor; #endif -`,_Ce=`#ifdef USE_MAP +`,xCe=`#ifdef USE_MAP uniform sampler2D map; #endif -`,xCe=`#ifdef USE_MAP +`,SCe=`#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 +`,MCe=`#ifdef USE_MAP uniform vec4 offsetRepeat; uniform sampler2D map; #endif -`,MCe=`float metalnessFactor = metalness; +`,bCe=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vUv ); metalnessFactor *= texelMetalness.r; #endif -`,bCe=`#ifdef USE_METALNESSMAP +`,wCe=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,wCe=`#ifdef USE_MORPHNORMALS +#endif`,TCe=`#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 +`,ECe=`#ifdef USE_MORPHTARGETS #ifndef USE_MORPHNORMALS uniform float morphTargetInfluences[ 8 ]; #else uniform float morphTargetInfluences[ 4 ]; #endif -#endif`,ECe=`#ifdef USE_MORPHTARGETS +#endif`,ACe=`#ifdef USE_MORPHTARGETS transformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ]; transformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ]; transformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ]; @@ -1209,12 +1209,12 @@ IncidentLight directLight; transformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ]; #endif #endif -`,ACe=`#ifdef DOUBLE_SIDED +`,CCe=`#ifdef DOUBLE_SIDED float flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 ); #else float flipNormal = 1.0; #endif -`,CCe=`#ifdef FLAT_SHADED +`,RCe=`#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 ) ); @@ -1226,7 +1226,7 @@ IncidentLight directLight; #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() ); #endif -`,RCe=`#ifdef USE_NORMALMAP +`,LCe=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) { @@ -1243,7 +1243,7 @@ IncidentLight directLight; return normalize( tsn * mapN ); } #endif -`,LCe=`vec3 packNormalToRGB( const in vec3 normal ) { +`,PCe=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1272,23 +1272,23 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const 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 +`,DCe=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; #endif -`,DCe=`#ifdef USE_SKINNING +`,ICe=`#ifdef USE_SKINNING vec4 mvPosition = modelViewMatrix * skinned; #else vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 ); #endif gl_Position = projectionMatrix * mvPosition; -`,ICe=`float roughnessFactor = roughness; +`,NCe=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vUv ); roughnessFactor *= texelRoughness.r; #endif -`,NCe=`#ifdef USE_ROUGHNESSMAP +`,UCe=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,UCe=`#ifdef USE_SHADOWMAP +#endif`,OCe=`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHTS > 0 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ]; @@ -1412,7 +1412,7 @@ gl_Position = projectionMatrix * mvPosition; #endif } #endif -`,OCe=`#ifdef USE_SHADOWMAP +`,FCe=`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHTS > 0 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ]; @@ -1428,7 +1428,7 @@ gl_Position = projectionMatrix * mvPosition; #if NUM_RECT_AREA_LIGHTS > 0 #endif #endif -`,FCe=`#ifdef USE_SHADOWMAP +`,zCe=`#ifdef USE_SHADOWMAP #if NUM_DIR_LIGHTS > 0 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition; @@ -1447,7 +1447,7 @@ gl_Position = projectionMatrix * mvPosition; #if NUM_RECT_AREA_LIGHTS > 0 #endif #endif -`,zCe=`float getShadowMask() { +`,BCe=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHTS > 0 @@ -1476,12 +1476,12 @@ gl_Position = projectionMatrix * mvPosition; #endif return shadow; } -`,BCe=`#ifdef USE_SKINNING +`,kCe=`#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 +#endif`,VCe=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; #ifdef BONE_TEXTURE @@ -1510,7 +1510,7 @@ gl_Position = projectionMatrix * mvPosition; } #endif #endif -`,VCe=`#ifdef USE_SKINNING +`,GCe=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -1519,7 +1519,7 @@ gl_Position = projectionMatrix * mvPosition; skinned += boneMatW * skinVertex * skinWeight.w; skinned = bindMatrixInverse * skinned; #endif -`,GCe=`#ifdef USE_SKINNING +`,HCe=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -1528,18 +1528,18 @@ gl_Position = projectionMatrix * mvPosition; skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; #endif -`,HCe=`float specularStrength; +`,WCe=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,WCe=`#ifdef USE_SPECULARMAP +#endif`,XCe=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,XCe=`#if defined( TONE_MAPPING ) +#endif`,YCe=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); #endif -`,YCe=`#define saturate(a) clamp( a, 0.0, 1.0 ) +`,qCe=`#define saturate(a) clamp( a, 0.0, 1.0 ) uniform float toneMappingExposure; uniform float toneMappingWhitePoint; vec3 LinearToneMapping( vec3 color ) { @@ -1559,29 +1559,29 @@ vec3 OptimizedCineonToneMapping( vec3 color ) { 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 ) +`,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; -#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 ) +#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 ) 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 ) +`,KCe=`#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 ) + attribute vec2 uv2; + varying vec2 vUv2; +#endif`,QCe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) vUv2 = uv2; -#endif`,QCe=`#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP ) +#endif`,eRe=`#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; +`,tRe=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldPosition; @@ -1590,14 +1590,14 @@ void main() { gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) ); gl_FragColor.a *= opacity; } -`,tRe=`varying vec3 vWorldPosition; +`,rRe=`varying vec3 vWorldPosition; #include void main() { vWorldPosition = transformDirection( position, modelMatrix ); #include #include } -`,rRe=`#if DEPTH_PACKING == 3200 +`,iRe=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -1623,7 +1623,7 @@ void main() { gl_FragColor = packDepthToRGBA( gl_FragCoord.z ); #endif } -`,iRe=`#include +`,nRe=`#include #include #include #include @@ -1641,7 +1641,7 @@ void main() { #include #include } -`,nRe=`uniform vec3 lightPos; +`,aRe=`uniform vec3 lightPos; varying vec4 vWorldPosition; #include #include @@ -1650,7 +1650,7 @@ void main () { #include gl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 ); } -`,aRe=`varying vec4 vWorldPosition; +`,oRe=`varying vec4 vWorldPosition; #include #include #include @@ -1665,7 +1665,7 @@ void main() { #include vWorldPosition = worldPosition; } -`,oRe=`uniform sampler2D tEquirect; +`,sRe=`uniform sampler2D tEquirect; uniform float tFlip; varying vec3 vWorldPosition; #include @@ -1676,14 +1676,14 @@ void main() { sampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5; gl_FragColor = texture2D( tEquirect, sampleUV ); } -`,sRe=`varying vec3 vWorldPosition; +`,lRe=`varying vec3 vWorldPosition; #include void main() { vWorldPosition = transformDirection( position, modelMatrix ); #include #include } -`,lRe=`uniform vec3 diffuse; +`,uRe=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -1709,7 +1709,7 @@ void main() { #include #include } -`,uRe=`uniform float scale; +`,cRe=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -1724,7 +1724,7 @@ void main() { #include #include } -`,cRe=`uniform vec3 diffuse; +`,fRe=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -1768,7 +1768,7 @@ void main() { #include #include } -`,fRe=`#include +`,hRe=`#include #include #include #include @@ -1797,7 +1797,7 @@ void main() { #include #include } -`,hRe=`uniform vec3 diffuse; +`,pRe=`uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; varying vec3 vLightFront; @@ -1854,7 +1854,7 @@ void main() { #include #include } -`,pRe=`#define LAMBERT +`,dRe=`#define LAMBERT varying vec3 vLightFront; #ifdef DOUBLE_SIDED varying vec3 vLightBack; @@ -1891,7 +1891,7 @@ void main() { #include #include } -`,dRe=`#define PHONG +`,mRe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -1944,7 +1944,7 @@ void main() { #include #include } -`,mRe=`#define PHONG +`,vRe=`#define PHONG varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -1984,7 +1984,7 @@ void main() { #include #include } -`,vRe=`#define PHYSICAL +`,gRe=`#define PHYSICAL uniform vec3 diffuse; uniform vec3 emissive; uniform float roughness; @@ -2047,7 +2047,7 @@ void main() { #include #include } -`,gRe=`#define PHYSICAL +`,yRe=`#define PHYSICAL varying vec3 vViewPosition; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2086,7 +2086,7 @@ void main() { #include #include } -`,yRe=`#define NORMAL +`,_Re=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) varying vec3 vViewPosition; @@ -2107,7 +2107,7 @@ void main() { #include #include } -`,_Re=`#define NORMAL +`,xRe=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) varying vec3 vViewPosition; #endif @@ -2139,7 +2139,7 @@ void main() { vViewPosition = - mvPosition.xyz; #endif } -`,xRe=`uniform vec3 diffuse; +`,SRe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -2164,7 +2164,7 @@ void main() { #include #include } -`,SRe=`uniform float size; +`,MRe=`uniform float size; uniform float scale; #include #include @@ -2185,7 +2185,7 @@ void main() { #include #include } -`,MRe=`uniform float opacity; +`,bRe=`uniform float opacity; #include #include #include @@ -2195,52 +2195,52 @@ void main() { void main() { gl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) ); } -`,bRe=`#include +`,wRe=`#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;t>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=TRe[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)}};CRe=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!==Oz&&(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 nB,i=new iB,n=0,a=r.length;n0){var a=new eB(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()};aB=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(aB),{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(fB.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 Ez(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(fB.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;hB=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))}),tLe=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))}),rLe=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))}),iLe=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;nLe={createMultiMaterialObject:function(r,e){for(var t=new VS,i=0,n=e.length;i{"use strict";var NLe=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(),Ose($ne)),xi={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},eae={type:"change"},pB={type:"start"},dB={type:"end"},tae=1e-6,ULe=function(r){NLe(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(pB))}},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(dB),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(pB),a.dispatchEvent(dB))},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(pB)}},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(dB),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=ULe});var iL=function(r,e){return iL=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])},iL(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");iL(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Fse=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),zse=function(){function r(){this.browser=new Fse,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 zse;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):Bse(navigator.userAgent,Jh);function Bse(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,nL="sans-serif",ho=$M+"px "+nL,kse=20,Vse=100,Gse="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Hse(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 ale(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?cL(s,o):cL(o,s))}function hL(r){return r.nodeName.toUpperCase()==="CANVAS"}var ole=/([&<>"'])/g,sle={"&":"&","<":"<",">":">",'"':""","'":"'"};function yn(r){return r==null?"":(r+"").replace(ole,function(e,t){return sle[t]})}var lle=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,pL=[],ule=Ft.browser.firefox&&+Ft.browser.version.split(".")[0]<39;function sb(r,e,t,i){return t=t||{},i?XV(r,e,t):ule&&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):XV(r,e,t),t}function XV(r,e,t){if(Ft.domSupported&&r.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(hL(r)){var a=r.getBoundingClientRect();t.zrX=i-a.left,t.zrY=n-a.top;return}else if(ob(pL,r,i,n)){t.zrX=pL[0],t.zrY=pL[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=cle(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&lle.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function cle(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 YV(r,e,t,i){r.removeEventListener(e,t,i)}var Ea=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function dL(r){return r.which===2||r.which===3}var ZV=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=qV(i)/qV(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=fle(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 jV(r){var e=wi();return O0(e,r),e}var hle=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=hle;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,ple=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=ple;var JV="silent";function dle(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:mle}}function mle(){Ea(this.event)}var vle=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}(),gle=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],vL=new lt(0,0,0,0),$V=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 vle,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new GV(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(N(gle,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=QV(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=dle(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(KV(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)&&(vL.copy(h.getBoundingRect()),h.transform&&vL.applyTransform(h.transform),vL.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 yle(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?JV:!0}return!1}function KV(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=yle(o,t,i))&&(!e.topTarget&&(e.topTarget=o),s!==JV)){e.target=o;break}}}function QV(r,e,t){var i=r.painter;return e<0||e>i.getWidth()||t<0||t>i.getHeight()}var eG=$V;var iG=32,k0=7;function _le(r){for(var e=0;r>=iG;)e|=r&1,r>>=1;return r+e}function tG(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 xle(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 gL(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 yL(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 Sle(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-gL(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),rG(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 nG=!1;function _L(){nG||(nG=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function aG(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Mle=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=aG}return r.prototype.traverse=function(e,t){for(var i=0;i0&&(c.__clipPaths=[]),isNaN(c.z)&&(_L(),c.z=0),isNaN(c.z2)&&(_L(),c.z2=0),isNaN(c.zlevel)&&(_L(),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}(),oG=Mle;var sG;sG=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=sG;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,uG=1e-4,lG=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 xL(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+lG*Math.sin(S)))/(3*o),C=(-s+w*(T-lG*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(cG(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 wle=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}(),dG=wle;var mG=function(){function r(e){this.value=e}return r}();var Tle=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new mG(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 Ele=function(){function r(e){this._list=new Tle,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 mG(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=Ele;var vG={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 Ale(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 SL(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 ML(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 bL(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var yG=new _u(20),xb=null;function Pm(r,e){xb&&bL(xb,e),xb=yG.put(r,xb||e.slice())}function cn(r,e){if(r){e=e||[];var t=yG.get(r);if(t)return bL(e,t);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in vG)return bL(e,vG[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,SL(u[0]),SL(u[1]),SL(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]),wL(u,e),Pm(r,e),e;case"hsl":if(u.length!==3){jo(e,0,0,0,1);return}return wL(u,e),Pm(r,e),e;default:return}}jo(e,0,0,0,1)}}function wL(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(ML(o,a,t+1/3)*255),Ns(ML(o,a,t)*255),Ns(ML(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Cle(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 _G(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=Cle(n),e!=null&&(n[0]=Ale(e)),t!=null&&(n[1]=lp(t)),i!=null&&(n[2]=lp(i)),Ko(wL(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 gG=new _u(100);function X0(r){if(Ce(r)){var e=gG.get(r);return e||(e=Sb(r,-.1),gG.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 xG=1e-4;function Rl(r){return r-xG}function bb(r){return wb(r*1e3)/1e3}function Tb(r){return wb(r*1e4)/1e4}function SG(r){return"matrix("+bb(r[0])+","+bb(r[1])+","+bb(r[2])+","+bb(r[3])+","+Tb(r[4])+","+Tb(r[5])+")"}var MG={left:"start",right:"end",center:"middle",middle:"middle"};function bG(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function wG(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function TG(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 EL(r){return r&&!!r.image}function Rle(r){return r&&!!r.svgElement}function Y0(r){return EL(r)||Rle(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 EG=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 CL=Array.prototype.slice;function xu(r,e,t){return(e-r)*t+r}function AL(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=CG,l=t;if(ci(t)){var u=Ile(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=RL:Ab(t)&&(s=LL),l=f}a===0?this.valType=s:(s!==this.valType||s===CG)&&(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=RG(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?AL(_,p[n],d[n],v):Lle(_,p[n],d[n],v);else if(RG(a)){var y=p[n],x=d[n],M=a===RL;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(AL([],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)AL(_,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===LG&&AG(e[i],e[i],n,1)},r}(),Ule=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=Ule;function hp(){return new Date().getTime()}var Ole=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),PG=Ole;var Fle=300,PL=Ft.domSupported,DL=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}}(),DG={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},IG=!1;function UL(r){var e=r.pointerType;return e==="pen"||e==="touch"}function zle(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 IL(r){r&&(r.zrByTouch=!0)}function Ble(r,e){return Ta(r.dom,new kle(r,e),!0)}function UG(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 kle=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;UG(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){IG=!0,r=Ta(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){IG||(r=Ta(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ta(this.dom,r),IL(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),IL(r),this.handler.processGesture(r,"change"),Us.mousemove.call(this,r)},touchend:function(r){r=Ta(this.dom,r),IL(r),this.handler.processGesture(r,"end"),Us.mouseup.call(this,r),+new Date-+this.__lastTouchMomentkG||r<-kG}var mp=[],Im=[],FL=wi(),zL=Math.abs,Wle=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&&(BG(i),this.invTransform=null);return}i=i||wi(),t?this.getLocalTransform(i):BG(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)&&(FL[4]=i,FL[5]=n,Aa(Im,t,FL),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&&zL(e[0]-1)>1e-10&&zL(e[3]-1)>1e-10?Math.sqrt(zL(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){BL(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 BL(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 kL="__zr_normal__",VL=go.concat(["ignore"]),Xle=gn(go,function(r,e){return r[e]=!0,r},{ignore:!1}),Om={},Yle=new lt(0,0,0,0),WL=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=Yle;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(kL,!1,e)},r.prototype.useState=function(e,t,i,n){var a=e===kL,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)?tue(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),KG),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 qL(r)}function qL(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 JG(r,e,t){if(!r[e])return 0;var i=ZL(r,t);return i[e]||0}function ZL(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 $G(r,e){var t=Math.max(Sn(r),Sn(e)),i=r+e;return t>KG?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>-jG&&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 xue=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Sue=Na(xue),vH=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return Sue(this,e,t)},r}();var QL=new _u(50);function yH(r){if(typeof r=="string"){var e=QL.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=QL.get(r),o={hostEl:t,cb:i,cbPayload:n};return a?(e=a.image,!Wm(e)&&a.pending.push(o)):(e=zn.loadImage(r,gH,gH),e.__zrImageSrc=r,QL.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function gH(){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 SH(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?wue(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 wue(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=xH(c,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m=0;ms&&tP(t,r.substring(s,u),e,o),tP(t,l[2],e,o,l[1]),s=eP.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=yH(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=wH(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 Cue=gn(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function Rue(r){return Aue(r)?!!Cue[r]:!0}function wH(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 nP="__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[nP]=!0;var TH=["z","z2","invisible"],Lue=["invisible"],Pue=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]=oP(n)*t+r,Xb[1]=aP(n)*i+e,Yb[0]=oP(a)*t+r,Yb[1]=aP(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]=oP(p)*t+r,qb[1]=aP(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=[],lP=Math.min,uP=Math.max,Tp=Math.cos,Ep=Math.sin,Mu=Math.abs,hP=Math.PI,xf=hP*2,cP=typeof Float32Array<"u",s_=[];function fP(r){var e=Math.round(r/hP*1e8)/1e8;return e%2*hP}function l_(r,e){var t=fP(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-fP(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)&&cP&&(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=fG(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=pG(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=uP(b,E)*lP(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+lP(_e,H),h),_e-=H,_e>0&&e.lineTo(f+H,h+lP(_e,We)),_e-=We,_e>0&&e.lineTo(f+uP(H-_e,0),h+We),_e-=H,_e>0&&e.lineTo(f,h+uP(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=Iue;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,Oue=1e-4;function Fue(r,e){return Math.abs(r-e)e&&u>i&&u>a&&u>s||u1&&zue(),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(IH(l,u,a[d++],a[d++],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++],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+=kue(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(OH(v,_,x,M,M+S,w,e,T,n))return!0}else s+=Vue(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&&!Fue(u,f)&&(s+=$o(l,u,c,f,i,n)||0),s!==0}function zH(r,e,t){return FH(r,0,!1,e,t)}function BH(r,e,t,i){return FH(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),Hue={style:Ye({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xp.style)},pP=go.concat(["invisible","culling","z","z2","zlevel","parent"]),Wue=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?zG: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)),BH(s,l/u,t,i)))return!0}if(this.hasFill())return zH(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(Xue,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);kH.prototype.type="tspan";var bu=kH;var Yue=Ye({x:0,y:0},Pl),que={style:Ye({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xp.style)};function Zue(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var VH=function(r){Xt(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return lf(Yue,t)},e.prototype._getSize=function(t){var i=this.style,n=i[t];if(n!=null)return n;var a=Zue(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 que},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);VH.prototype.type="image";var Ur=VH;function GH(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 Jue=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}();var $ue={},HH=function(r){Xt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Jue},e.prototype.buildPath=function(t,i){var n,a,o,s;if(this.subPixelOptimize){var l=Kb($ue,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?GH(t,i):t.rect(n,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ut);HH.prototype.type="rect";var Tt=HH;var WH={fill:"#000"},XH=2,Que={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)},QH=function(r){Xt(e,r);function e(t){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=WH,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&&dP(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=JH(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=KH("fill"in u?u.fill:"fill"in i?i.fill:(_=!0,v.fill)),M=jH("stroke"in u?u.stroke:"stroke"in i?i.stroke:!p&&!l&&(!v.autoStroke||_)?(y=XH,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),qH(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 vP(t)&&(i=[t.fontStyle,t.fontWeight,mP(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),i&&Yi(i)||t.textFont||t.font},e}(gi),ece={left:!0,right:1,center:1},tce={top:1,bottom:1,middle:1},YH=["fontStyle","fontWeight","fontSize","fontFamily"];function mP(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 qH(r,e){for(var t=0;t=0,a=!1;if(r instanceof ut){var o=o4(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 lce(r,e,t){if(t&&t.z2==null){t=fe({},t);var i=r.z2SelectLift;t.z2=r.z2+(i??ice)}return t}function uce(r,e,t){var i=dt(r.currentStates,e)>=0,n=r.style.opacity,a=i?null:oce(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 gP(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return sce(this,r,e,t);if(r==="blur")return uce(this,r,t);if(r==="select")return lce(this,r,t)}return t}function Fs(r){r.stateProxy=gP;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=gP),t&&(t.stateProxy=gP)}function i4(r,e){!c4(r,e)&&!r.__highByOuter&&Tu(r,s4)}function n4(r,e){!c4(r,e)&&!r.__highByOuter&&Tu(r,l4)}function Bn(r,e){r.__highByOuter|=1<<(e||0),Tu(r,s4)}function kn(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&Tu(r,l4)}function Qb(r){Tu(r,SP)}function d_(r){Tu(r,u4)}function MP(r){Tu(r,nce)}function bP(r){Tu(r,ace)}function c4(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function wP(r){var e=r.getModel(),t=[],i=[];e.eachComponent(function(n,a){var o=_P(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){u4(u)}),s&&t.push(a)),o.isBlured=!1}),N(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function yP(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 cce(r){Eu(r,!1)}function nr(r,e,t,i){i?cce(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 a4=["emphasis","blur","select"],fce={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:()=>G4,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:()=>UP,clipRectByRect:()=>Wce,createIcon:()=>Pu,extendPath:()=>Vce,extendShape:()=>Bce,getShapeClass:()=>x_,getTransform:()=>ks,groupTransition:()=>Lu,initProps:()=>ar,isElementRemoved:()=>Au,lineLineIntersect:()=>K4,linePolygonIntersect:()=>rv,makeImage:()=>NP,makePath:()=>tv,mergePath:()=>Gn,registerShape:()=>Bs,removeElement:()=>es,removeElementWithFadeOut:()=>Cu,resizePath:()=>j4,setTooltipConfig:()=>Vs,subPixelOptimize:()=>S_,subPixelOptimizeLine:()=>Ru,subPixelOptimizeRect:()=>Gce,transformDirection:()=>Up,traverseElements:()=>sa,updateProps:()=>Dt});var Km=Ki.CMD,hce=[[],[],[]],_4=Math.sqrt,pce=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*=AP(d),s*=AP(d));var g=(n===a?-1:1)*AP((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=S4([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=S4(M,S);if(CP(M,S)<=-1&&(w=m_),CP(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 dce=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,mce=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function vce(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(dce);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 Mce(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 D4(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=L4(u-l),d=p>RP&&p%RP;if(d>zs&&(p=d),!(i>zs))r.moveTo(c,f);else if(p>RP-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=Mce(G),g=t[0],m=t[1],v=t[2],_=t[3]);var Y=L4(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 wce=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 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){D4(t,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ut);I4.prototype.type="sector";var yi=I4;var Tce=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}();var N4=function(r){Xt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Tce},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);N4.prototype.type="ring";var Pp=N4;function LP(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=LP(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){PP("update",r,e,t,i,n,a)}function ar(r,e,t,i,n,a){PP("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 Y4(r){return!r.isGroup}function Hce(r){return r.shape!=null}function Lu(r,e,t){if(!r||!e)return;function i(o){var s={};return o.traverse(function(l){Y4(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Hce(o)&&(s.shape=fe({},o.shape)),s}var a=i(r);e.traverse(function(o){if(Y4(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 UP(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 Wce(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=DP(p,d,c,f)/h;return!(m<0||m>1)}function DP(r,e,t,i){return r*i-t*e}function Xce(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 q4(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 s5={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 l5={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",GP="EN",nv=GP,yw={},HP={},xw=Ft.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||nv).toUpperCase();return r.indexOf(_w)>-1?_w:nv}():nv;function u5(r,e){r=r.toUpperCase(),HP[r]=new Zt(e),yw[r]=e}function c5(r){if(Ce(r)){var e=yw[r.toUpperCase()]||{};return r===_w||r===GP?Qe(e):_t(Qe(e),Qe(yw[nv]),!1)}else return _t(Qe(r),Qe(yw[nv]),!1)}function b_(r){return HP[r]}function f5(){return HP[nv]}u5(GP,s5);u5(_w,l5);var Mw=1e3,bw=Mw*60,ov=bw*60,_o=ov*24,XP=_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}",YP={year:"{yyyy}",month:"{yyyy}-{MM}",day:Sw,hour:Sw+" "+w_.hour,minute:Sw+" "+w_.minute,second:Sw+" "+w_.second,millisecond:w_.none},WP=["year","month","day","hour","minute","second","millisecond"],qP=["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 h5(r){return r===zp(r)}function p5(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)||f5(),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 d5(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 m5(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 ZP(r,e,t){var i=At(r)?Mn(r):r;switch(e=e||m5(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 v5(r){return r?"setUTCFullYear":"setFullYear"}function jP(r){return r?"setUTCMonth":"setMonth"}function KP(r){return r?"setUTCDate":"setDate"}function JP(r){return r?"setUTCHours":"setHours"}function $P(r){return r?"setUTCMinutes":"setMinutes"}function QP(r){return r?"setUTCSeconds":"setSeconds"}function eD(r){return r?"setUTCMilliseconds":"setMilliseconds"}function rD(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)?rD(u):I0(r)?n(r):typeof r=="boolean"?r+"":"-"}var g5=["a","b","c","d","e","f","g"],tD=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,iD=["left","right","top","bottom","width","height"],Vp=[["width","left","right"],["height","top","bottom"]];function nD(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=nD,_Ve=ot(nD,"vertical"),xVe=ot(nD,"horizontal");function x5(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 S5(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);a5(sv);o5(sv,tfe);function tfe(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 M5="";typeof navigator<"u"&&(M5=navigator.platform||"");var lv="rgba(0, 0, 0, 0.2)",b5={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:M5.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",oD="unknown",Ba="column",Nu="row";var Ji={Must:1,Might:2,Not:3},w5=vt();function T5(r){w5(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=w5(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 P5(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:ife(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 nfe(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Iw,D_,D5,I5="\0_ec_inner",afe=1;var F5=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=O5(i);this._optionManager.setOption(t,n,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,i){return this._resetOption(t,O5(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"?D5(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;T5(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=R5(this,f,Jt(t[f])),p=a.get(f),d=p?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=Gb(p,h,d);lH(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[I5],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 vfe(r,e){return r.join(",")===e.join(",")}var z5=hfe;var Xs=N,N_=qe,B5=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function uD(r){var e=r&&r.itemStyle;if(e)for(var t=0,i=B5.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=$G(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||oD,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};Z5=(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 _D(r){var e,t;return qe(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Cf(r){return new Lfe(r)}var Lfe=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}},Dfe=function(){function r(e,t){if(!At(t)){var i="";ur(i)}this._opFn=Q5[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 Ife=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 eW(r,e){return r==="eq"||r==="ne"?new Ife(r==="eq",e):tt(Q5,r)?new Dfe(r,e):null}var Nfe=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 Ufe(r,e){var t=new Nfe,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?Vfe:Gfe}function pv(){return[1/0,-1/0]}function Hfe(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function aW(r,e,t,i,n){var a=oW[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])}SD={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_=Wfe;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&&sW(a)}var o,s=[],l=[];return N(e,function(u){u.prepareSource();var c=u.getSource(n||0),f="";n!=null&&!c&&sW(f),s.push(c),l.push(u._getVersionSign())}),i?o=iW(i,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[q5(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;c1||t>0&&!r.noHeader;return N(r.blocks,function(n){var a=fW(n);a>=e&&(e=a+ +(i&&(!a||wD(n)&&!n.noHeader)))}),e}return 0}function qfe(r,e,t,i){var n=e.noHeader,a=jfe(fW(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=cW(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):TD(o.join(""),n?t:a.html);if(n)return f;var h=Ew(e.header,"ordinal",r.useUTC),p=uW(i,r.renderMode).nameStyle;return r.renderMode==="richText"?hW(r,h,p)+a.richText+f:TD('
'+yn(h)+"
"+f,t)}function Zfe(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=uW(i,n),_=v.nameStyle,y=v.valueStyle;return n==="richText"?(s?"":f)+(a?"":hW(r,h,_))+(o?"":$fe(r,d,g,m,y)):TD((s?"":f)+(a?"":Kfe(h,!s,_))+(o?"":Jfe(d,g,m,y)),t)}}function ED(r,e,t,i,n,a){if(r){var o=cW(r),s={useUTC:n,renderMode:t,orderMode:i,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function jfe(r){return{html:Xfe[r],richText:Yfe[r]}}function TD(r,e){var t='
',i="margin: "+e+"px 0 0";return'
'+r+t+"
"}function Kfe(r,e,t){var i=e?"margin-left:2px":"";return''+yn(r)+""}function Jfe(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 hW(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function $fe(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=_5({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=Qfe(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 Qfe(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:the,reset:rhe}),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);dW(o,this),this.dataTask.context.data=o,Rf(this).dataBeforeProcessed=o,pW(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);dW(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Rf(this).dataBeforeProcessed=o,pW(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 pW(r){var e=r.name;Gm(r)||(r.name=ehe(r)||e)}function ehe(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 the(r){return r.model.getRawData().count()}function rhe(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),ihe}function ihe(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function dW(r,e){N(ep(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ot(nhe,e))})}function nhe(r,e){var t=AD(r);return t&&t.setOutputEnd((e||this).count()),e}function AD(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 CD=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(CD);yf(CD);var Qt=CD;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 gW=vt(),ahe=Mo(),RD=function(){function r(){this.group=new Ze,this.uid=ts("viewChart"),this.renderTask=Cf({plan:ohe,reset:she}),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&&vW(a,n,"emphasis")},r.prototype.downplay=function(e,t,i,n){var a=e.getData(n&&n.dataType);a&&vW(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){gW(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function mW(r,e,t){r&&Tf(r)&&(e==="emphasis"?Bn:kn)(r,t)}function vW(r,e,t){var i=Jo(r,e),n=e&&e.highlightKey!=null?g4(e.highlightKey):null;i!=null?N(Jt(i),function(a){mW(r.getItemGraphicEl(a),t,n)}):r.eachItemGraphicEl(function(a){mW(a,t,n)})}Hm(RD,["dispose"]);yf(RD);function ohe(r){return ahe(r.model)}function she(r){var e=r.model,t=r.ecModel,i=r.api,n=r.payload,a=e.pipelineContext.progressiveRender,o=r.view,s=n&&gW(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,i,n),lhe[l]}var lhe={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=RD;var Jw="\0__throttleOriginMethod",yW="\0__throttleRate",_W="\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[_W],s=n[yW];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[_W]=i,n[yW]=t}return n}}function zu(r,e){var t=r[e];t&&t[Jw]&&(t.clear&&t.clear(),r[e]=t[Jw])}var xW=vt(),SW={itemStyle:Na(kP,!0),lineStyle:Na(BP,!0)},uhe={lineStyle:"stroke",itemStyle:"fill"};function MW(r,e){var t=r.visualStyleMapper||SW[e];return t||(console.warn("Unknown style type '"+e+"'."),SW.itemStyle)}function bW(r,e){var t=r.visualDrawType||uhe[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var wW={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=MW(r,i),o=a(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=bW(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,TW={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=MW(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}}}},EW={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)),xW(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var i=t.getRawData(),n={},a=t.getData(),o=xW(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=bW(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 LD(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 che=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:mhe,reset:vhe,count:yhe}));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:fhe});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:hhe,onDirty:dhe})));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:_he(e)}),e.uid=ts("stageHandler"),t&&(e.visualType=t),e},r}();function fhe(r){r.overallReset(r.ecModel,r.api,r.payload)}function hhe(r){return r.overallProgress&&phe}function phe(){this.agent.dirty(),this.getDownstream().dirty()}function dhe(){this.agent&&this.agent.dirty()}function mhe(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function vhe(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 AW(i)}):ghe}var ghe=AW(0);function AW(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 DD=["symbol","symbolSize","symbolRotate","symbolOffset"],FW=DD.concat(["symbolKeepAspect"]),zW={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"?Dhe(r,e,t):Phe(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&&Ihe(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 Nhe=new Ki(!0);function n1(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function WW(r){return typeof r=="string"&&r!=="none"}function a1(r){var e=r.fill;return e!=null&&e!=="none"}function XW(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 YW(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 Uhe(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||Nhe,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&&YW(r,t),o&&XW(r,t)):(o&&XW(r,t),a&&YW(r,t))),T&&r.setLineDash([])}function Ohe(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 Fhe(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 qW=["shadowBlur","shadowOffsetX","shadowOffsetY"],ZW=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function e6(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 z5(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},WD);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(g6[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=YL(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 BD(this,"convertToPixel",t,i)},e.prototype.convertFromPixel=function(t,i){return BD(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(ape,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)}),kW(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&&JL(this.getDom(),ZD,"");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(),!!XD[t]){var n=XD[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;VD.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(),zD(f,!0),zD(f,!1),h.plan()},zD=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&&y4(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)}})}m6=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){MP(d),ss(f)},p.prototype.leaveSelect=function(d){bP(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)},C6=function(f){function h(p,d){for(var g=0;g=0)){y6.push(t);var a=PD.wrapStageHandler(t,n);a.__prio=e,a.__raw=t,r.push(a)}}function QD(r,e){XD[r]=e}function O6(r,e,t){var i=u6("registerMap");i&&i(r,e,t)}var F6=rW;If(YD,wW);If(h1,TW);If(h1,EW);If(YD,zW);If(h1,BW);If(S6,UD);KD(Ow);JD(Zhe,hD);QD("default",LD);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);P6("light",PW);P6("dark",UW);var z6=[],lpe={registerPreprocessor:KD,registerProcessor:JD,registerPostInit:D6,registerPostUpdate:I6,registerUpdateLifecycle:p1,registerAction:ua,registerCoordinateSystem:N6,registerLayout:U6,registerVisual:If,registerTransform:F6,registerLoading:QD,registerMap:O6,registerImpl:l6,PRIORITY:M6,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){YG(r,e)}};function It(r){if(pe(r)){N(r,function(e){It(e)});return}dt(z6,r)>=0||(z6.push(r),He(r)&&(r={install:r}),r.install(lpe))}function $_(r){return r==null?0:r.length||1}function B6(r){return r}var upe=function(){function r(e,t,i,n,a,o){this._old=e,this._new=t,this._oldKeyGetter=i||B6,this._newKeyGetter=n||B6,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,mpe=typeof Int32Array>"u"?Array:Int32Array,vpe="e\0\0",V6=-1,gpe=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ype=["_approximateExtent"],G6,v1,ex,tx,a2,g1,o2,_pe=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)),a2(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(){G6=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 mpe(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),n[t]=l}}}(),r}(),ti=_pe;function js(r,e){cv(r)||(r=fv(r)),e=e||{};var t=e.coordDimensions||[],i=e.dimensionsDefine||r.dimensionsDefine||[],n=ke(),a=[],o=Spe(r,t,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&n2(o),l=i===r.dimensionsDefine,u=l?i2(r):r2(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=ke(c),h=new MD(o),p=0;p0&&(i.name=n+(a-1)),a++,e.set(n,a)}}function Spe(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 Mpe(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 bpe=function(){function r(e){this.coordSysDims=[],this.axisMap=ke(),this.categoryAxisMap=ke(),this.coordSysName=e}return r}();function H6(r){var e=r.get("coordinateSystem"),t=new bpe(e),i=wpe[e];if(i)return i(r,t,t.axisMap,t.categoryAxisMap),t}var wpe={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 W6(r,e,t){t=t||{};var i=t.byIndex,n=t.stackedCoordDimension,a,o,s;Tpe(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 Tpe(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 Epe(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 Ape(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 Cpe(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=H6(e),s=Epe(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=Ape(f.dimensions,t.createInvertedIndices,o),p=a?null:i.getSharedDataStore(f),d=W6(e,{schema:f,store:p}),g=new ti(f,e);g.setCalculationInfo(d);var m=h!=null&&Rpe(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 Rpe(r){if(r.sourceFormat===fn){var e=Lpe(r.data||[]);return!pe(Os(e))}}function Lpe(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(X6);var Ga=X6;var Ppe=0,Dpe=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Ppe}return r.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&de(i,Ipe);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 Ipe(r){return qe(r)&&r.value!=null?r.value:r+""}var rx=Dpe;function ix(r){return r.type==="interval"||r.type==="log"}function q6(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=s2(o),l=n.niceTickExtent=[Ar(Math.ceil(r[0]/o)*o,s),Ar(Math.floor(r[1]/o)*o,s)];return Npe(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 s2(r){return Sn(r)+2}function Y6(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function Npe(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),Y6(r,0,e),Y6(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 Z6=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(Z6);var nx=Z6;var qp=Ar,j6=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=s2(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 h2(r){var e=Ope(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")||(t8(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:c2(a),stackId:u2(i)})}),$6(t)}function $6(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 Q6(r,e,t){if(r&&e){var i=r[c2(e)];return i!=null&&t!=null?i[u2(t)]:i}}function S1(r,e){var t=f2(r,e),i=h2(t);N(t,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=u2(n),u=i[c2(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(e8(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=Fpe(n,a),d=t8(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(zpe(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",XP/2],["year",XP]];function Bpe(r,e,t,i){var n=Mn(e),a=Mn(t),o=function(d){return ZP(n,d,i)===ZP(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 kpe(r,e){return r/=_o,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Vpe(r){var e=30*_o;return r/=e,r>6?6:r>3?3:r>2?2:1}function Gpe(r){return r/=ov,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function r8(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 Hpe(r){return Bm(r,!0)}function Wpe(r,e,t){var i=new Date(r);switch(zp(e)){case"year":case"month":i[jP(t)](0);case"day":i[KP(t)](1);case"hour":i[JP(t)](0);case"minute":i[$P(t)](0);case"second":i[QP(t)](0),i[eD(t)](0)}return i.getTime()}function Xpe(r,e,t,i){var n=1e4,a=qP,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(Zpe(i[0]/a)*a),Ar(qpe(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),a8=p2.prototype;a8.getMinorTicks=ax.getMinorTicks;a8.getLabel=ax.getLabel;function E1(r,e){return Ype(r,Sn(e))}Ga.registerClass(p2);var o8=p2;var jpe=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[Jpe[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var i=Kpe[e];this[i]=t},r.prototype.freeze=function(){this.frozen=!0},r}();var Kpe={min:"_determinedMin",max:"_determinedMax"},Jpe={min:"_dataMin",max:"_dataMax"};function C1(r,e,t){var i=r.rawExtentInfo;return i||(i=new jpe(r,e,t),r.rawExtentInfo=i,i)}function A1(r,e){return e==null?null:sf(e)?NaN:r.parse(e)}function d2(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=f2("bar",o),l=!1;if(N(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=h2(s),c=$pe(n,a,e,u);n=c.min,a=c.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function $pe(r,e,t,i){var n=t.axis.getExtent(),a=n[1]-n[0],o=Q6(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=d2(r,t),n=i.extent,a=t.get("splitNumber");r instanceof o8&&(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 s8(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 l8(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 ede=1e-8;function c8(r,e){return Math.abs(r-e)n&&(i=o,n=l)}if(i)return rde(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"?h8(s.exterior,n,a,t):N(s.points,function(l){h8(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 _2(r,e){return r=ide(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 v2(o[0],o.slice(1)));break;case"MultiPolygon":N(n.coordinates,function(l){l[0]&&a.push(new v2(l[0],l.slice(1)))});break;case"LineString":a.push(new g2([n.coordinates]));break;case"MultiLineString":a.push(new g2(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:()=>JG,getPixelPrecision:()=>Fm,getPrecision:()=>Sn,getPrecisionSafe:()=>qL,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 v8(r){return r.type==="category"?nde(r):ode(r)}function g8(r,e){return r.type==="category"?ade(r,e):{ticks:de(r.scale.getTicks(),function(t){return t.value})}}function nde(r){var e=r.getLabelModel(),t=y8(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function y8(r,e){var t=_8(r,"labels"),i=R1(e),n=x8(t,i);if(n)return n;var a,o;return He(i)?a=w8(r,i):(o=i==="auto"?sde(r):i,a=b8(r,o)),S8(t,i,{labels:a,labelCategoryInterval:o})}function ade(r,e){var t=_8(r,"ticks"),i=R1(e),n=x8(t,i);if(n)return n;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),He(i))a=w8(r,i,!0);else if(i==="auto"){var s=y8(r,r.getLabelModel());o=s.labelCategoryInterval,a=de(s.labels,function(l){return l.tickValue})}else o=i,a=b8(r,o,!0);return S8(t,i,{ticks:a,tickCategoryInterval:o})}function ode(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 _8(r,e){return sx(r)[e]||(sx(r)[e]=[])}function x8(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 lde(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 b8(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 w8(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 T8=[0,1],ude=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(),E8(i,n.count())),rr(e,T8,i,t)},r.prototype.coordToData=function(e,t){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),E8(i,n.count()));var a=rr(e,i,T8,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=g8(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 cde(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 v8(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 M8(this)},r}();function E8(r,e){var t=r[1]-r[0],i=e,n=t/i/2;r[0]+=n,r[1]-=n}function cde(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 C8(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 x2(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 vde(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 L8(r,e,t,i){return R8(r,"x","width",e,t,i)}function O1(r,e,t,i){return R8(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=_de(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}(),D8=xde;var w2=vt();function T2(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,i){var n=w2(t).labelManager;n||(n=w2(t).labelManager=new D8),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,i){var n=w2(t).labelManager;i.updatedSeries.forEach(function(a){n.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var E2=Math.sin,A2=Math.cos,I8=Math.PI,jp=Math.PI*2,Sde=180/I8,Mde=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>=I8==!!c;var g=e+i*A2(o),m=t+n*E2(o);this._start&&this._add("M",g,m);var v=Math.round(a*Sde);if(h){var _=1/this._p,y=(c?1:-1)*(jp-_);this._add("A",i,n,v,1,+c,e+i*A2(o+y),t+n*E2(o+y)),_>.01&&this._add("A",i,n,v,0,+c,g,m)}else{var x=e+i*A2(s),M=t+n*E2(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 Cde(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 Ade(o,s)+(o!=="style"?yn(l):l||"")+(a?""+t+de(a,function(u){return i(u)}).join(t)+t:"")+Cde(o)}return i(r)}function F8(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 D2(r,e,t,i){return Ci("svg","root",{width:r,height:e,xmlns:N8,"xmlns:xlink":L2,version:"1.1",baseProfile:"full",viewBox:i?"0 0 "+r+" "+e:!1},t)}var Rde=0;function G1(){return Rde++}var z8={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 Lde(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 Pde(r,e){var t=e.originX,i=e.originY;(t||i)&&(r[Kp]=t+"px "+i+"px")}var Dde={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function k8(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function Ide(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=k8(n,t);return a.replace(o,s)}}function B8(r){return Ce(r)?z8[r]?"cubic-bezier("+z8[r]+")":Lm(r)?r:"":""}function hx(r,e,t,i){var n=r.animators,a=n.length,o=[];if(r instanceof Qm){var s=Ide(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=k8(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 G8(r,e,t){if(!r.ignore)if(r.isSilent()){var i={"pointer-events":"none"};V8(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),V8(i,e,t,!0)}}function V8(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 Y8(r){return r&&Ce(r.src)}function q8(r){return r&&He(r.toDataURL)}function I2(r,e,t,i){R2(function(n,a){var o=n==="fill"||n==="stroke";o&&Cb(a)?F2(e,r,n,i):o&&Y0(a)?z2(t,r,n,i):o&&a==="none"?r[n]="transparent":r[n]=a},e,t,!1),kde(t,r,i)}function N2(r,e){var t=qG(e);t&&(t.each(function(i,n){i!=null&&(r[(P2+n).toLowerCase()]=i+"")}),e.isSilent()&&(r[P2+"silent"]="true"))}function H8(r){return Rl(r[0]-1)&&Rl(r[1])&&Rl(r[2])&&Rl(r[3]-1)}function Nde(r){return Rl(r[4])&&Rl(r[5])}function U2(r,e,t){if(e&&!(Nde(e)&&H8(e))){var i=t?10:1e4;r.transform=H8(e)?"translate("+px(e[4]*i)/i+" "+px(e[5]*i)/i+")":SG(e)}}function W8(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 j8(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,[Z8(r,t)])}e["clip-path"]=q0(a)}function B2(r){return document.createTextNode(r)}function Bf(r,e,t){r.insertBefore(e,t)}function k2(r,e){r.removeChild(e)}function V2(r,e){r.appendChild(e)}function G2(r){return r.parentNode}function H2(r){return r.nextSibling}function H1(r,e){r.textContent=e}var K8=58,Gde=120,Hde=Ci("","");function W2(r){return r===void 0}function Xl(r){return r!==void 0}function Wde(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(Hde,r),pe(t))for(e=0;ea?(d=t[l+1]==null?null:t[l+1].elm,J8(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),W2(e.text)?Xl(i)&&Xl(n)?i!==n&&Xde(t,i,n):Xl(n)?(Xl(r.text)&&H1(t,""),J8(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 X2(r,e){if(dx(r,e))bv(r,e);else{var t=r.elm,i=G2(t);mx(e),i!==null&&(Bf(i,e.elm,H2(t)),W1(i,[r],0,0))}return e}var Yde=0,qde=function(){function r(e,t,i){if(this.type="svg",this.refreshHover=$8("refreshHover"),this.configLayer=$8("configLayer"),this.storage=t,this._opts=i=fe({},i),this.root=e,this._id="zr"+Yde++,this._oldVNode=D2(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",X2(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return O2(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=Zde(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=F8(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=Ci("style","stl",{},[],c);o.push(f)}}return D2(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),iX=eme;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 tme=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=rme,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 rme(r,e){this.parent.drift(r,e)}var ku=tme;function Z2(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 nX(r){return r!=null&&!qe(r)&&(r={isIgnore:r}),r||{}}function aX(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 ime=function(){function r(e){this.group=new Ze,this._SymbolCtor=e||ku}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=nX(t);var i=this.group,n=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=aX(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(Z2(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(!Z2(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=aX(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,i){this._progressiveEls=[],i=nX(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 ame(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 j2(r,e,t,i,n,a,o,s){for(var l=ame(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 oX=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),sX=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 oX},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 ome=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(oX),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 ome},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 ume(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=lme(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 cme(r,e,t){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(n&&fme(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 fme(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 hme(r,e){return isNaN(r)||isNaN(e)}function pme(r){for(var e=r.length/2;e>0&&hme(r[e*2-2],r[e*2-1]);e--);return e-1}function hX(r,e){return[r[e*2],r[e*2+1]]}function dme(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 pX(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=fX(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=fX(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 sX({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(pX(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=pme(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},mme(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=dme(f,x,w),C=T.range,b=C[1]-C[0],E=void 0;if(b>=1){if(b>1&&!p){var I=hX(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=hX(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=j2(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)),cX(p,g)>3e3||c&&cX(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]}},yme=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=gme[a]:He(a)&&(d=a),d&&e.setData(n.downSample(n.mapDimension(u.dim),1/p,d,yme))}}}}}function eI(r){r.registerChartView(dX),r.registerSeriesModel(iX),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 mX=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(mX);var wv=mX;var _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.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),vX=_me;var xme=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}(),Sme=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 xme},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),_X={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=tI(e.x,r.x),s=rI(e.x+e.width,n),l=tI(e.y,r.y),u=rI(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=rI(e.r,r.r),a=tI(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}},xX={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=CX(n);if(c.calculateTextPosition=gX(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 wme(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 SX(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 MX(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 Ame(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function CX(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 wX(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,yX(r,m==="outside"?p:m,CX(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),Ame(n)&&(r.style.fill="none",r.style.stroke="none",N(r.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function Cme(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 Rme=function(){function r(){}return r}(),TX=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 Rme},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 Lme(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 RX(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 Pme(r,e,t){var i=r.type==="polar"?yi:Tt;return new i({shape:RX(e,t,r),silent:!0,z2:0})}var LX=bme;function iI(r){r.registerChartView(LX),r.registerSeriesModel(vX),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 PX=Math.PI*2,tT=Math.PI/180;function DX(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function nI(r,e){var t=DX(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 aI(r,e,t){e.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),o=DX(i,t),s=nI(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-PX:-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 oI(r){return r.position==="center"}function sI(r){var e=r.getData(),t=[],i,n,a=!1,o=(r.get("minShowLabelAngle")||0)*Dme,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")&&Ime(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),UX=Ume;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 Ome=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=Ome;var Fme=vt(),zme=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=Fme(i),a=n.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=n.seats=ZL(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),OX=zme;function lI(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 uI(r){r.registerChartView(UX),r.registerSeriesModel(OX),r1("pie",r.registerAction),r.registerLayout(ot(aI,"pie")),r.registerProcessor(tl("pie")),r.registerProcessor(lI("pie"))}var Bme=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),FX=Bme;var zX=4,kme=function(){function r(){}return r}(),Vme=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 kme},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}(),BX=Gme;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.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 BX: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),kX=Hme;var Wme=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),VX=Wme;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 GX={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)"]}}},Xme=_t({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},GX),cI=_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}}},GX),Yme=_t({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},cI),qme=Ye({logBase:10},cI),iT={category:Xme,value:cI,time:Yme,log:qme};var HX={value:1,category:1,time:1,log:1};function rl(r,e,t,i){N(HX,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=WX(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",WX)}function WX(r){return r.type||(r.data?"category":"value")}var Zme=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}(),XX=Zme;var nT=["x","y"];function YX(r){return r.type==="interval"||r.type==="time"}var jme=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(!(!YX(t)||!YX(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}(XX),qX=jme;var Kme=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),ZX=Kme;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 fI(r){return r.get("coordinateSystem")==="cartesian2d"}function hI(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 pI=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=d2(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=pI(r.base);u=[pI(u[0])/h,pI(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 Jme=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){KX(i,"y",o,a)}),N(i.y,function(o){KX(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=l8(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]),$me(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}(),QX={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=tve(t,i,e,r),a=ive(t,i,e,r);if(eve(e,a,n),rve(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,t9(a)?r.labelOffset+o*l:0],h,p=e.get("nameRotate");p!=null&&(p=p*Hf/180);var d;t9(a)?h=Qp.innerTextLayout(r.rotation,p??r.rotation,o):(h=Qme(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 Qme(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 eve(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)):e9(a,o)&&(i?(us(o),us(c)):(us(a),us(u))),n===!1?(us(s),us(f)):e9(l,s)&&(n?(us(l),us(h)):(us(s),us(f)))}}function us(r){r&&(r.ignore=!0)}function e9(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 t9(r){return r==="middle"||r==="center"}function r9(r,e,t,i,n){for(var a=[],o=[],s=[],l=0;l=0||r===e}function n9(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=vI(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),d9=mve;var vve=["axisLine","axisTickLabel","axisName"],gve=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(vve,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;EI(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);EI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!wI(this._zr,"globalPan")){var i=t.pinchScale>1?1.1:1/1.1;EI(this,"zoom",null,t,{scale:i,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Di);function EI(r,e,t,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&(Ea(i.event),b9(r,e,t,i,n))}function b9(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=xve;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 Sve={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&&!Sve.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 CI,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"},w9=bt(pT),dT={"alignment-baseline":"textBaseline","stop-color":"stopColor"},T9=bt(dT),Mve=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;Tve(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=LI(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=CI[s];if(c&&tt(CI,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=E9[s];if(p&&tt(E9,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),bve(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(){CI={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=R9(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=R9(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}(),E9={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 A9(r,a),C9(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 A9(r,n),C9(r,n),n}};function A9(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function C9(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={};D9(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 R9(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])*RI,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*RI);Aa(n,[1,0,u,1,0,0],n);break;case"skewY":var c=Math.tan(parseFloat(l[0])*RI);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 P9=/([^\s:;]+)\s*:\s*([^:;]+)/g;function D9(r,e,t){var i=r.getAttribute("style");if(i){P9.lastIndex=0;for(var n;(n=P9.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 Rve(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&&(W9(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 k9(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 V9(r,e,t,i,n){r.data||Vs({el:e,componentModel:n,itemName:t,itemTooltipOption:i.get("tooltip")})}function G9(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&&v4(e,n,t),o}function H9(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),Y9=Hve;function Wve(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 qve(r,e){N(e.get("geoCoord"),function(t,i){r.addGeoCoord(i,t)})}var Zve=function(){function r(){this.dimensions=zI}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 BI(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=J9,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 BI(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=J9,u.resize(o[0],t),N(o,function(c){c.coordinateSystem=u,qve(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 r7(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){Qve(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=ege(r,n,r.parentNode.hierNode.defaultAncestor||i[0],e)}function i7(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function HI(r){return arguments.length?r:ige}function rd(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function n7(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Qve(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 ege(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=VI(s),a=GI(a),s&&a;){n=VI(n),o=GI(o),n.hierNode.ancestor=r;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+i(s,a);h>0&&(rge(tge(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&&!VI(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=f-l),a&&!GI(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=r)}return t}function VI(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function GI(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function tge(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function rge(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 ige(r,e){return r.parentNode===e.parentNode?1:2}var nge=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),age=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 nge},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),sge(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 sge(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:WI(c,f,h,n,n)})),Dt(g,{shape:WI(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 YI(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Pv(r,e){var t=YI(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 yge=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),h7=yge;function p7(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 ZI(r,e){r.eachSeriesByType("tree",function(t){_ge(t,e)})}function _ge(r,e){var t=n7(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=HI(function(y,x){return(y.parentNode===x.parentNode?1:2)/y.depth})):(n=t.width,a=t.height,o=HI());var s=r.getData().tree.root,l=s.children[0];if(l){t7(s),p7(l,r7,o),s.hierNode.modifier=-l.hierNode.prelim,Dv(l,i7);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 jI(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 d7(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 KI(r){r.registerChartView(c7),r.registerSeriesModel(h7),r.registerLayout(ZI),r.registerVisual(jI),d7(r)}var m7=["treemapZoomToNode","treemapRender","treemapMove"];function v7(r){for(var e=0;e1;)a=a.parentNode;var o=P_(r.ecModel,a.name||a.dataIndex+"",i);n.setVisual("decal",o)})}var xge=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};g7(n);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new Zt({itemStyle:o},this,i);a=t.levels=Sge(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 g7(r){var e=0;N(r.children,function(i){g7(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 Sge(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 y7=xge;var Mge=8,_7=8,JI=5,bge=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+Mge*2,t.emptyItemWidth);t.totalWidth+=s+_7,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=x5(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:wge(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),Tge(x,e,v),l+=_+_7}},r.prototype.remove=function(){this.group.removeAll()},r}();function wge(r,e,t,i,n,a){var o=[[n?r:r-JI,e],[r+t,e],[r+t,e+i],[n?r:r-JI,e+i]];return!a&&o.splice(2,0,[r+t+JI,e+i/2]),!n&&o.push([r,e+i/2]),o}function Tge(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 x7=bge;var Ege=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;nb7||Math.abs(t.dy)>b7)){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 x7(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 Dge(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",$I);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",M7,u,Rge);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",M7,u,Lge);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=E7(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=E7(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?T7:w7),H=Yr(h.get("name"),null),We=q.getShallow("show");Nr(ve,Tr(h,Ee?T7:w7),{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=Ige(se,Ee)),ae(H,q)),e[ve][v]=q}function K(ve,ue){var se=ve[v]={};ue instanceof $I?(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 Ige(r,e){return r*Cge+e}var A7=Pge;var Ex=N,Nge=qe,bT=-1,rN=function(){function r(e){var t=e.mappingMethod,i=e.type,n=this.option=Qe(e);this.type=i,this.mappingMethod=t,this._normalizeData=Fge[t];var a=r.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(QI(n),Uge(n)):t==="category"?n.categories?Oge(n):QI(n,!0):(kr(t!=="linear"||n.dataExtent),QI(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(Nge(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 QI(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]),R7(r,i)}function ST(r){return{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);i("color",r(t("color"),n))},_normalizedToVisual:eN([0,1])}}function C7(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 eN(r){return{linear:function(e){return rr(e,r,this.option.visual,!0)},category:Tx,piecewise:function(e,t){var i=tN.call(this,t);return i==null&&(i=rr(e,r,this.option.visual,!0)),i},fixed:nd}}function tN(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var i=rN.findPieceIndex(r,t),n=t[i];if(n&&n.visual)return n.visual[this.type]}}function R7(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 Fge={linear:function(r){return rr(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=rN.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=Gge(n,l,g,m,d,i);I7(g,v,t,i)}})}}}function Bge(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 L7(r){var e=iN(r,"color");if(e){var t=iN(r,"colorAlpha"),i=iN(r,"colorSaturation");return i&&(e=up(e,null,null,i)),t&&(e=cp(e,t)),e}}function kge(r,e){return e!=null?up(e,null,null,r):null}function iN(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function Vge(r,e,t,i,n,a){if(!(!a||!a.length)){var o=nN(e,"color")||n.color!=null&&n.color!=="none"&&(nN(e,"colorAlpha")||nN(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 P7(h).drColorMappingBy=c,h}}}function nN(r,e){var t=r.get(e);return pe(t)&&t.length?{name:e,range:t}:null}function Gge(r,e,t,i,n,a){var o=fe({},e);if(n){var s=n.type,l=s==="color"&&P7(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,N7=Br,aN=N,O7=["itemStyle","borderWidth"],Hge=["itemStyle","gapWidth"],Wge=["upperLabel","show"],Xge=["upperLabel","height"],F7={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(N7(s.width,l[0]),n),c=Fe(N7(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=YI(g);if(f!=="treemapMove"){var v=f==="treemapZoomToNode"?Jge(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),z7(g,y,!1,0),x=g.getLayout(),aN(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($ge(s,d,p),!0),r.setLayoutInfo(s),B7(M,new lt(-s.x,-s.y,n,a),m,g,0)}};function z7(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(O7),u=s.get(Hge)/2,c=k7(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=Yge(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 Kge(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 U7(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=aye;var oye=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=Q7(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=Q7(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function i(s){!s.isGroup&&!sye(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function Q7(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 eY(r){return isNaN(r[0])||isNaN(r[1])}function MN(r){return r&&!eY(r[0])&&!eY(r[1])}var Fv=oye;var bN=[],wN=[],TN=[],zv=vi,EN=yu,tY=Math.abs;function rY(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){bN[0]=zv(i[0],n[0],a[0],c),bN[1]=zv(i[1],n[1],a[1],c);var f=tY(EN(bN,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=rY(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=rY(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 iY(r){return r.type==="view"}var lye=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(iY(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){dN(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)}),!iY(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),nY=lye;function Bv(r){return"_EC_"+r}var uye=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 aY(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,oY("hostGraph","data"));wr(aY,oY("hostGraph","edgeData"));var sY=uye;function Px(r,e,t,i,n){for(var a=new sY(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 cye=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){H7(this);var s=Px(a,n,this,!0,l);return N(s.edges,function(u){W7(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),lY=cye;var fye={type:"graphRoam",event:"graphRoam",update:"none"};function AN(r){r.registerChartView(nY),r.registerSeriesModel(lY),r.registerProcessor(sN),r.registerVisual(lN),r.registerVisual(uN),r.registerLayout(hN),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,mN),r.registerLayout(vN),r.registerCoordinateSystem("graphView",{dimensions:Vu.dimensions,create:gN}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ir),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ir),r.registerAction(fye,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 hye=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),pye=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 hye},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),uY=pye;function dye(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 mye=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=dye(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 uY({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),cY=mye;var vye=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),fY=vye;function CN(r){r.registerChartView(cY),r.registerSeriesModel(fY)}var gye=["itemStyle","opacity"],yye=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(gye);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),_ye=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 yye(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),hY=_ye;var xye=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),pY=xye;function Sye(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Mye(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();oUye)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||!IN(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 IN(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var xY=Oye;var zye=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),SY=zye;var Bye=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),MY=Bye;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=NN(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=NN(e,i),n!=null&&(f.sign!==l.sign||f.spana&&(e[1-i]=e[i]+f.sign*a),e}function NN(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 UN=N,TY=Math.min,EY=Math.max,bY=Math.floor,kye=Math.ceil,wY=Ar,Vye=Math.PI,Gye=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;UN(n,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new MY(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();UN(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")||bY(u/2);p=[c*g-d/2],p[1]=p[0]+d}var m=(s-d)/(u-f);m<3&&(m=0);var v=[bY(wY(p[0]/c,1))+1,kye(wY(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])}),UN(i,function(o,s){var l=(n.axisExpandable?Wye:Hye)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Vye/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=[EY(0,d-p/2)],n[1]=TY(o[1],n[0]+p),n[0]=n[1]-p}return{axisExpandWindow:n,behavior:u}},r}();function RT(r,e){return TY(EY(r,e[0]),e[1])}function Hye(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function Wye(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;ajye}function VY(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function GY(r,e,t,i){var n=new Ze;return n.add(new Tt({name:"main",style:XN(t),silent:!0,draggable:!0,cursor:"move",drift:ot(DY,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(DY,r,e,n,a),ondragend:ot(ud,e,{isEnd:!0})}))}),n}function HY(r,e,t,i){var n=i.brushStyle.lineWidth||0,a=Vv(n,Kye),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 zN(r,e){var t=e.__brushOption,i=t.transformable,n=e.childAt(0);n.useStyle(XN(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?BN(r,a[0]):i0e(r,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?$ye[s]+"-resize":null})})}function Hu(r,e,t,i,n,a,o){var s=e.childOfName(t);s&&s.setShape(a0e(YN(r,e,[[i,n],[i+a,n+o]])))}function XN(r){return Ye({strokeNoScale:!0},r.brushStyle)}function WY(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 r0e(r){return ks(r.group)}function BN(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],r0e(r));return i[n]}function i0e(r,e){var t=[BN(r,e[0]),BN(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function DY(r,e,t,i,n,a){var o=t.__brushOption,s=r.toRectRange(o.range),l=XY(e,n,a);N(i,function(u){var c=Jye[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(WY(s[0][0],s[1][0],s[0][1],s[1][1])),GN(e,t),ud(e,{isEnd:!1})}function n0e(r,e,t,i){var n=e.__brushOption.range,a=XY(r,t,i);N(n,function(o){o[0]+=a[0],o[1]+=a[1]}),GN(r,e),ud(r,{isEnd:!1})}function XY(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 YN(r,e,t){var i=kY(r,e);return i&&i!==ld?i.clipPath(t,r._transform):Qe(t)}function a0e(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 o0e(r,e,t){if(!(!r._brushType||l0e(r,e.offsetX,e.offsetY))){var i=r._zr,n=r._covers,a=WN(r,e,t);if(!r._dragging)for(var o=0;oi.getWidth()||t<0||t>i.getHeight()}var LT={lineX:UY(0),lineY:UY(1),rect:{createCover:function(r,e){function t(i){return i}return GY({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=VY(r);return WY(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,i){HY(r,e,t,i)},updateCommon:zN,contain:VN},polygon:{createCover:function(r,e){var t=new Ze;return t.add(new $r({name:"main",style:XN(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(n0e,r,e),ondragend:ot(ud,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,i){e.childAt(0).setShape({points:YN(r,e,t)})},updateCommon:zN,contain:VN}};function UY(r){return{createCover:function(e,t){return GY({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=VY(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=kY(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(),HY(e,t,l,n)},updateCommon:zN,contain:VN}}var Gv=e0e;function PT(r){return r=qN(r),function(e){return UP(e,r)}}function DT(r,e){return r=qN(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=qN(r);return function(n,a){return i.contain(a[0],a[1])&&!Wf(n,e,t)}}function qN(r){return lt.create(r)}var u0e=["axisLine","axisTickLabel","axisName"],c0e=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(!f0e(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=p0e(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(u0e,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(h0e(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 f0e(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function h0e(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 p0e(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var ZY=c0e;var d0e={type:"axisAreaSelect",event:"axisAreaSelected"};function jY(r){r.registerAction(d0e,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 m0e={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(xY),r.registerComponentModel(SY),r.registerCoordinateSystem("parallel",CY),r.registerPreprocessor(DN),r.registerComponentModel(ON),r.registerComponentView(ZY),rl(r,"parallel",ON,m0e),jY(r)}function ZN(r){It(Ix),r.registerChartView(gY),r.registerSeriesModel(yY),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,_Y)}var v0e=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}(),g0e=function(r){Z(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new v0e},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),y0e=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 g0e,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()),KY(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 KY(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(_0e(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Yt);function KY(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 _0e(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 JY=y0e;var 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.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),$Y=x0e;function KN(r,e){r.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=S0e(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;b0e(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");M0e(u,c,i,n,o,s,h,p,d)})}function S0e(r,e){return xr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function M0e(r,e,t,i,n,a,o,s,l){w0e(r,e,t,n,a,s,l),C0e(r,e,a,n,i,o,s),F0e(r,s)}function b0e(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 w0e(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"&&T0e(r,o,a,w);var T=a==="vertical"?(n-t)/w:(i-t)/w;A0e(r,T,a)}function QY(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function T0e(r,e,t,i){if(e==="right"){for(var n=[],a=r,o=0;a.length;){for(var s=0;s0;a--)l*=.99,P0e(s,l,o),jN(s,n,t,i,o),O0e(s,l,o),jN(s,n,t,i,o)}function R0e(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 L0e(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 P0e(r,e,t){N(r.slice().reverse(),function(i){N(i,function(n){if(n.outEdges.length){var a=qf(n.outEdges,D0e,t)/qf(n.outEdges,NT);if(isNaN(a)){var o=n.outEdges.length;a=o?qf(n.outEdges,I0e,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 D0e(r,e){return Zf(r.node2,e)*r.getValue()}function I0e(r,e){return Zf(r.node2,e)}function N0e(r,e){return Zf(r.node1,e)*r.getValue()}function U0e(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 $N(r){r.registerChartView(JY),r.registerSeriesModel($Y),r.registerLayout(KN),r.registerVisual(JN),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 eq=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(eq,UT,!0);var tq=eq;var z0e=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=rq(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),iq(h,f,a,u)):f=rq(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),B0e=function(){function r(){}return r}(),k0e=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 B0e},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 aq={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Ei){var i="";ur(i)}var n=eU(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function tU(r){r.registerSeriesModel(tq),r.registerChartView(nq),r.registerLayout(QN),r.registerTransform(aq)}var X0e=["color","borderColor"],Y0e=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&&oq(u,f))return;var h=rU(f,c,!0);ar(h,{shape:{points:f.ends}},t,c),iU(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&&oq(u,p)){a.remove(h);return}h?(Dt(h,{shape:{points:p.ends}},t,c),Ii(h)):h=rU(p,c),iU(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(),sq(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=rU(s,o);iU(l,n,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,i){sq(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),q0e=function(){function r(){}return r}(),Z0e=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 q0e},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 rU(r,e,t){var i=r.ends;return new Z0e({shape:{points:t?j0e(i,r):i},z2:100})}function oq(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(X0e);e.useStyle(a),e.style.fill=null,e.style.stroke=n}var lq=Y0e;var uq=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(uq,UT,!0);var cq=uq;function oU(r){!r||!pe(r.series)||N(r.series,function(e){qe(e)&&e.type==="k"&&(e.type="candlestick")})}var J0e=["itemStyle","borderColor"],$0e=["itemStyle","borderColor0"],Q0e=["itemStyle","borderColorDoji"],e_e=["itemStyle","color"],t_e=["itemStyle","color0"],r_e={seriesType:"candlestick",plan:Mo(),performRawSeries:!0,reset:function(r,e){function t(a,o){return o.get(a>0?e_e:t_e)}function i(a,o){return o.get(a===0?Q0e:a>0?J0e:$0e)}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)}}}}}},fq=r_e;var i_e={seriesType:"candlestick",plan:Mo(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),i=n_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:hq(_,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[_++]=hq(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 hq(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 n_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 pq=i_e;function sU(r){r.registerChartView(lq),r.registerSeriesModel(cq),r.registerPreprocessor(oU),r.registerVisual(fq),r.registerLayout(pq)}function dq(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 a_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),yq=c_e;var f_e=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),h_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 f_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}(),_q=p_e;var d_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 _q:new Fv(o?a?yq: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),xq=m_e;var v_e=typeof Uint32Array>"u"?Array:Uint32Array,g_e=typeof Float64Array>"u"?Array:Float64Array;function Sq(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 y_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||[],Sq(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(Sq(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),Mq=y_e;function BT(r){return r instanceof Array||(r=[r,r]),r}var __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}}},bq=__e;function uU(r){r.registerChartView(xq),r.registerSeriesModel(Mq),r.registerLayout(zT),r.registerVisual(bq)}var x_e=256,S_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}(),wq=S_e;function M_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 Tq(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}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.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()):Tq(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&&(Tq(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 wq;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"?b_e(x,n.option.range):M_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),Eq=w_e;var T_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),Aq=T_e;function cU(r){r.registerChartView(Eq),r.registerSeriesModel(Aq)}var E_e=["itemStyle","borderWidth"],Cq=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],fU=new oa,A_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:Cq[+c],categoryDim:Cq[1-+c]};o.diff(s).add(function(d){if(o.hasValue(d)){var g=Lq(o,d),m=Rq(o,d,g,h),v=Pq(o,h,m);o.setItemGraphicEl(d,v),a.add(v),Iq(v,h,m)}}).update(function(d,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(d)){a.remove(m);return}var v=Lq(o,d),_=Rq(o,d,v,h),y=kq(o,_);m&&y!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(d,null),m=null),m?N_e(m,h,_):m=Pq(o,h,_,!0),o.setItemGraphicEl(d,m),m.__pictorialSymbolMeta=_,a.add(m),Iq(m,h,_)}).remove(function(d){var g=s.getItemGraphicEl(d);g&&Dq(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){Dq(a,rt(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Yt);function Rq(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};C_e(t,a,n,i,h),R_e(r,e,n,a,o,h.boundingLength,h.pxSign,c,i,h),L_e(t,h.symbolScale,u,i,h);var p=h.symbolSize,d=bo(t.get("symbolOffset"),p);return P_e(t,p,n,a,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function C_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=[hU(s,o[0])-l,hU(s,o[1])-l];f[1]0?1:-1}function hU(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function R_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 L_e(r,e,t,i,n){var a=r.get(E_e)||0;a&&(fU.attr({scaleX:e[0],scaleY:e[1],rotation:t}),fU.updateTransform(),a/=fU.getLineScale(),a*=e[i.valueDim.index]),n.valueLineWidth=a||0}function P_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:Nq((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?Nq((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 Uq(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 Oq(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(pU(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 Fq(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=Uq(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 zq(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 Bq(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 Lq(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=D_e,t.isAnimationEnabled=I_e,t}function D_e(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function I_e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Pq(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?Oq(n,e,t):Fq(n,e,t),zq(n,t,i),Bq(n,e,t,i),n.__pictorialShapeStr=kq(r,t),n.__pictorialSymbolMeta=t,n}function N_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?Oq(r,e,t,!0):Fq(r,e,t,!0),zq(r,t,!0),Bq(r,e,t,!0)}function Dq(r,e,t,i){var n=i.__pictorialBarRect;n&&n.removeTextContent();var a=[];pU(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 kq(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function pU(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 Iq(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");pU(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 Nq(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var Vq=A_e;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.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),Gq=U_e;function dU(r){r.registerChartView(Vq),r.registerSeriesModel(Gq),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ot(S1,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,M1("pictorialBar"))}var O_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 gU(r){r.registerChartView(Hq),r.registerSeriesModel(Wq),r.registerLayout(vU),r.registerProcessor(tl("themeRiver"))}var k_e=2,V_e=4,G_e=function(r){Z(e,r);function e(t,i,n,a){var o=r.call(this)||this;o.z2=k_e,o.textConfig={inside:!0},rt(o).seriesIndex=i.seriesIndex;var s=new Lt({z2:V_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 yU(_,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),Zq=W_e;var X_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};jq(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 jq(r){var e=0;N(r.children,function(i){jq(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 Kq=X_e;var Jq=Math.PI/180;function _U(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")*Jq,d=i.get("minAngle")*Jq,g=i.getData().tree.root,m=i.getViewRoot(),v=m.depth,_=i.get("sort");_!=null&&$q(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 SU(r){r.registerChartView(Zq),r.registerSeriesModel(Kq),r.registerLayout(ot(_U,"sunburst")),r.registerProcessor(ot(tl,"sunburst")),r.registerVisual(xU),qq(r)}var MU={color:"fill",borderColor:"stroke"},Qq={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Jl=vt(),q_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),eZ=q_e;function Z_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 bU(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(Z_e,r)}}}function j_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 wU(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(j_e,r)}}}function K_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 TU(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(K_e,r)}}}function J_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 EU(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(J_e,r)}}}function AU(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 tZ(o,r),N(o.rich,function(l){tZ(l,l)}),{textConfig:n,textContent:a}}function tZ(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 CU(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";rZ(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){rZ(s,s)}),i}function rZ(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 oZ={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},iZ=bt(oZ),xst=gn(go,function(r,e){return r[e]=1,r},{}),Sst=go.join(", "),Ux=["","style","shape","extra"],Wv=vt();function RU(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(rxe,{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(nxe(r,e,f),aZ("shape",e,f),aZ("extra",e,f),!a&&s&&(ixe(r,e,c),nZ("shape",r,e,c),nZ("extra",r,e,c),axe(r,e,u,c)),f.style=u,$_e(r,f,o),exe(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=RU("enter",r,e,t,n);p.duration>0&&r.animateFrom(h,p)}else Q_e(r,e,n||0,t,c);LU(r,e),u?r.dirty():r.markRedraw()}function LU(r,e){for(var t=Wv(r).leaveToProps,i=0;i0&&r.animateFrom(n,a)}}function exe(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={},txe={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 rxe(){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(txe)}}function nZ(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=CU(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=CU(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(MU,A)){var U=e.getItemVisual(D,"style");return U?U[MU[A]]:null}if(tt(Qq,A))return e.getItemVisual(D,A)}function E(A){if(a.type==="cartesian2d"){var D=a.getBaseAxis();return J6(Ye({axis:D},A))}}function I(){return t.getCurrentSeriesIndices()}function R(A){return iv(A,t)}}function mxe(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 IU(r,e,t,i,n,a,o){if(!i){a.remove(e);return}var s=kU(r,e,t,i,n,a);return s&&o.setItemGraphicEl(t,s),s&&nr(s,i.focus,i.blurScope,i.emphasisDisabled),s}function kU(r,e,t,i,n,a){var o=-1,s=e;e&&dZ(e,i,n)&&(o=dt(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=zU(i),s&&fxe(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,gxe(u,t,i,n,l,hs),vxe(u,t,i,n,l),BU(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 dZ(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"&&Mxe(a)&&mZ(a)!==i.customPathData||n==="image"&&tt(o,"image")&&o.image!==i.customImagePath}function vxe(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&&dZ(o,a,i)&&(o=null),o||(o=zU(a),r.setClipPath(o)),BU(null,o,e,a,null,i,n)}}function gxe(r,e,t,i,n,a){if(!r.isGroup){uZ(t,null,a),uZ(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=zU(o),r.setTextContent(c)),BU(null,c,e,o,null,i,n);for(var f=o&&o.style,h=0;h=c;p--){var d=e.childAt(p);_xe(e,d,n)}}}function _xe(r,e,t){e&&Yv(e,Jl(r).option,t)}function xxe(r){new An(r.oldChildren,r.newChildren,cZ,cZ,r).add(fZ).update(fZ).remove(Sxe).execute()}function cZ(r,e){var t=r&&r.name;return t??uxe+e}function fZ(r,e){var t=this.context,i=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;kU(t.api,n,t.dataIndex,i,t.seriesModel,t.group)}function Sxe(r){var e=this.context,t=e.oldChildren[r];t&&Yv(t,Jl(t).option,e.seriesModel)}function mZ(r){return r&&(r.pathData||r.d)}function Mxe(r){return r&&(tt(r,"pathData")||tt(r,"d"))}function GU(r){r.registerChartView(hZ),r.registerSeriesModel(eZ)}var cd=vt(),vZ=Qe,HU=Be,bxe=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(gZ,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}_Z(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](vZ(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,i,n){if(t.label){var a=cd(e).labelEl=new Lt(vZ(t.label));e.add(a),yZ(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}),yZ(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:HU(this._onHandleDragMove,this,0,0),drift:HU(this._onHandleDragMove,this),ondragend:HU(this._onHandleDragEnd,this)}),i.add(n)),_Z(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){gZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,WU(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(WU(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(WU(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 gZ(r,e,t,i){xZ(cd(t).lastProp,i)||(cd(t).lastProp=i,e?Dt(t,i,r):(t.stopAnimation(),t.attr(i)))}function xZ(r,e){if(qe(r)&&qe(e)){var t=!0;return N(e,function(i,n){t=t&&xZ(r[n],i)}),!!t}else return r===e}function yZ(r,e){r[e.get(["label","show"])?"show":"hide"]()}function WU(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function _Z(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=bxe;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 XU(r,e,t,i,n){var a=t.get("value"),o=YU(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),wxe(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 wxe(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 YU(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"]),XU(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 qU(r,e,t,i,n,a){return{cx:r,cy:e,r0:t,r:i,startAngle:n,endAngle:a,clockwise:!0}}var Txe=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=SZ(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var h=jv(a),p=Exe[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=SZ(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 SZ(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Exe={line:function(r,e,t){var i=Kv([e,t[0]],[e,t[1]],MZ(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],MZ(r))}}};function MZ(r){return r.dim==="x"?0:1}var bZ=Txe;var Axe=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),wZ=Axe;var Xu=vt(),Cxe=N;function ZT(r,e,t){if(!Ft.node){var i=e.getZr();Xu(i).records||(Xu(i).records={}),Rxe(i,e);var n=Xu(i).records[r]||(Xu(i).records[r]={});n.handler=t}}function Rxe(r,e){if(Xu(r).initialized)return;Xu(r).initialized=!0,t("click",ot(TZ,"click")),t("mousemove",ot(TZ,"mousemove")),t("globalout",Pxe);function t(i,n){r.on(i,function(a){var o=Dxe(e);Cxe(Xu(r).records,function(s){s&&n(s,a,o.dispatchAction)}),Lxe(o.pendings,e)})}}function Lxe(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 Pxe(r,e,t){r.handler("leave",null,t)}function TZ(r,e,t,i){e.handler(r,t,i)}function Dxe(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 Ixe=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),AZ=Ixe;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 CZ=vt();function ZU(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(Uxe,p),showTooltip:ot(Oxe,d)};N(s.coordSysMap,function(v,_){var y=l||v.containPoint(n);N(s.coordSysAxesInfo[_],function(x,M){var S=x.axis,w=kxe(u,x);if(!f&&y&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=S.pointToData(n)),T!=null&&RZ(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,LZ(x),LZ(v)))),m[v.key]=w}})}),N(m,function(v,_){RZ(c[_],v,g,!0,h)}),Fxe(p,c,h),zxe(d,n,r,o),Bxe(c,o,t),h}}function RZ(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=Nxe(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 Nxe(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 Uxe(r,e,t,i){r[e.key]={value:t,payloadBatch:i}}function Oxe(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 Fxe(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 zxe(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 Bxe(r,e,t){var i=t.getZr(),n="axisPointerLastHighlights",a=CZ(i)[n]||{},o=CZ(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 kxe(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 LZ(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",bZ),r.registerComponentModel(wZ),r.registerComponentView(AZ),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=i9(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ZU)}function jU(r){It(uT),It(il)}var Vxe=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=Hxe[h](s,l,f,c);d.style=p,t.graphicKey=d.type,t.pointer=d}var g=a.get(["label","margin"]),m=Gxe(i,n,a,l,g);XU(t,n,a,o,m)},e}(Zv);function Gxe(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 Hxe={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:qU(e.cx,e.cy,i[0],i[1],(-t-n/2)*a,(-t+n/2)*a)}:{type:"Sector",shape:qU(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},PZ=Vxe;var Wxe=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),DZ=Wxe;var KU=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(KU,Gl);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="angleAxis",e}(KU);var NZ=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}(KU);var JU=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);JU.prototype.dataToRadius=pn.prototype.dataToCoord;JU.prototype.radiusToData=pn.prototype.coordToData;var UZ=JU;var Xxe=vt(),$U=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=Xxe(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);$U.prototype.dataToAngle=pn.prototype.dataToCoord;$U.prototype.angleToData=pn.prototype.coordToData;var OZ=$U;var QU=["radius","angle"],Yxe=function(){function r(e){this.dimensions=QU,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new UZ,this._angleAxis=new OZ,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=FZ(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=FZ(t);return n===this?this.pointToData(i):null},r}();function FZ(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var zZ=Yxe;function qxe(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 Zxe(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 jxe(r){return r.mainType==="angleAxis"}function BZ(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"),jxe(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 Kxe={dimensions:QU,create:function(r,e){var t=[];return r.eachComponent("polar",function(i,n){var a=new zZ(n+"");a.update=Zxe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");BZ(o,l),BZ(s,u),qxe(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}},kZ=Kxe;var Jxe=["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 VZ(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 $xe=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});VZ(u),VZ(s),N(Jxe,function(c){t.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&Qxe[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(Wa),Qxe={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 oSe(r){var e={};N(r,function(i,n){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=XZ(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=WZ(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=JZ(t);return n===this?this.dataToPoint(i):null},r.prototype.convertFromPixel=function(e,t,i){var n=JZ(t);return n===this?this.pointToData(i):null},r}();function JZ(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var $Z=mSe;function vSe(r,e){var t=[];return r.eachComponent("singleAxis",function(i,n){var a=new $Z(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 gSe={create:vSe,dimensions:tO},QZ=gSe;var ej=["x","y"],ySe=["width","height"],_Se=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=rO(l,1-QT(s)),c=l.dataToPoint(i)[0],f=a.get("type");if(f&&f!=="none"){var h=jv(a),p=xSe[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=rO(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=rO(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),xSe={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 rO(r,e){var t=r.getRect();return[t[ej[e]],t[ej[e]]+t[ySe[e]]]}var tj=_Se;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.type="single",e}(Qt);function iO(r){It(il),Wa.registerAxisPointerClass("SingleAxisPointer",tj),r.registerComponentView(SSe),r.registerComponentView(ZZ),r.registerComponentModel($T),rl(r,"single",$T,$T.defaultOption),r.registerCoordinateSystem("single",QZ)}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.init=function(t,i,n){var a=rs(t);r.prototype.init.apply(this,arguments),rj(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),rj(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 rj(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 S5(e,a)&&(i[a]="auto"),i[a]!=null&&i[a]!=="auto"});za(r,e,{type:"box",ignoreSize:n})}var ij=MSe;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.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?y5(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/nO)-Math.floor(t[0].time/nO)+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 aj(r){var e=r.calendarModel,t=r.seriesModel,i=e?e.coordinateSystem:t?t.coordinateSystem:null;return i}var oj=wSe;function aO(r){r.registerComponentModel(ij),r.registerComponentView(nj),r.registerCoordinateSystem("calendar",oj)}function TSe(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 sj(r,e){var t;return N(e,function(i){r[i]!=null&&r[i]!=="auto"&&(t=!0)}),t}function ESe(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}),aD(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 lj=["transition","enterFrom","leaveTo"],ASe=lj.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?lj:ASe,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 oO(r){var e=tt(cj,r)?cj[r]:x_(r),t=new e({});return ps(t).type=r,t}function fj(r,e,t,i){var n=oO(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 hj(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 RSe(r){return r=fe({},r),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(iD),function(e){delete r[e]}),r}function LSe(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 sO(r){r.registerComponentModel(uj),r.registerComponentView(pj),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 lO=["x","y","radius","angle","single"],PSe=["cartesian2d","polar","singleAxis"];function dj(r){var e=r.get("coordinateSystem");return dt(PSe,e)>=0}function ds(r){return r+"Axis"}function mj(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 uO=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}(),DSe=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=vj(t);this.settledOption=a,this.mergeDefaultAndTheme(t,n),this._doInit(a)},e.prototype.mergeOption=function(t){var i=vj(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(lO,function(n){var a=this.getReferringComponents(ds(n),cH);if(a.specified){i=!0;var o=new uO;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 uO;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(lO,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 uO;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 FSe(r,e,t){var i=[1/0,-1/0];$v(t,function(o){u8(i,o.getData(),e)});var n=r.getAxisModel(),a=C1(n.axis.scale,n,i).calculate();return[a.min,a.max]}var xj=OSe;var zSe={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 xj(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]})}})}},Sj=zSe;function cO(r){r.registerAction("dataZoom",function(e,t){var i=mj(t,e);N(i,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Mj=!1;function fd(r){Mj||(Mj=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Sj),cO(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function bj(r){r.registerComponentModel(gj),r.registerComponentView(yj),fd(r)}var $i=function(){function r(){}return r}();var wj={};function Qf(r,e){wj[r]=e}function iE(r){return wj[r]}var kSe=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),Tj=kSe;function Ej(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 GSe=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(HSe(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})}Ej(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 HSe(r){return r.indexOf("my")===0}var Aj=GSe;var WSe=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),Cj=WSe;var Rj="__ec_magicType_stack__";var XSe=[["line","bar"],["stack"]],YSe=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(Lj[n]){var s={series:[]},l=function(f){var h=f.subType,p=f.id,d=Lj[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(XSe,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),Lj={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")===Rj;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),_t({id:e,stack:n?"":Rj},i.get(["option","stack"])||{},!0)}};ua({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Pj=YSe;var oE=new Array(60).join("-"),Qv=" ";function qSe(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 ZSe(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)return!0}var fO=new RegExp("["+Qv+"]+","g");function $Se(r){for(var e=r.split(/\n+/g),t=aE(e.shift()).split(fO),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"?` +*`,"g")),i={series:[]};return N(t,function(n,a){if(JSe(n)){var o=$Se(n),s=e[a],l=s.axisDim+"Axis";s&&(i[l]=i[l]||[],i[l][s.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{var o=QSe(n);i.series.push(o)}}),i}var tMe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var n=i.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=a.get("optionToContent"),h=a.get("contentToOption"),p=KSe(t);if(He(f)){var d=f(i.getOption());Ce(d)?u.innerHTML=d:af(d)&&u.appendChild(d)}else{c.readOnly=a.get("readOnly");var g=c.style;g.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",g.color=a.get("textColor"),g.borderColor=a.get("textareaBorderColor"),g.backgroundColor=a.get("textareaColor"),c.value=p.value,u.appendChild(c)}var m=p.meta,v=document.createElement("div");v.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",y=document.createElement("div"),x=document.createElement("div");_+=";background-color:"+a.get("buttonColor"),_+=";color:"+a.get("buttonTextColor");var M=this;function S(){n.removeChild(o),M._dom=null}U0(y,"click",S),U0(x,"click",function(){if(h==null&&f!=null||h!=null&&f==null){S();return}var w;try{He(h)?w=h(u,i.getOption()):w=eMe(c.value,m)}catch(T){throw S(),new Error("Data view format error "+T)}w&&i.dispatchAction({type:"changeDataView",newOption:w}),S()}),y.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=y.style.cssText=_,!a.get("readOnly")&&v.appendChild(x),v.appendChild(y),o.appendChild(s),o.appendChild(u),o.appendChild(v),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},e.prototype.remove=function(t,i){this._dom&&i.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,i){this.remove(t,i)},e.getDefaultOption=function(t){var i={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return i},e}($i);function rMe(r,e){return de(r,function(t,i){var n=e&&e[i];if(qe(n)&&!pe(n)){var a=qe(t)&&!pe(t);a||(t={value:t});var o=n.name!=null&&t.name==null;return t=Ye(t,n),o&&delete t.name,t}else return t})}ua({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];N(r.newOption.series,function(i){var n=e.getSeriesByName(i.name)[0];if(!n)t.push(fe({type:"scatter"},i));else{var a=n.get("data");t.push({name:i.name,data:rMe(i.data,a)})}}),e.mergeOption(Ye({series:t},r.newOption))});var Dj=tMe;var Ij=N,Nj=vt();function Uj(r,e){var t=hO(r);Ij(e,function(i,n){for(var a=t.length-1;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 Oj(r){var e=hO(r),t=e[e.length-1];e.length>1&&e.pop();var i={};return Ij(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 Fj(r){Nj(r).snapshots=null}function zj(r){return hO(r).length}function hO(r){var e=Nj(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var iMe=function(r){Z(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,i){Fj(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 kj=iMe;var nMe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],aMe=function(){function r(e,t,i){var n=this;this._targetInfoList=[];var a=Vj(t,e);N(oMe,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=pO[i.brushType](0,a,n);i.__rangeOffset={offset:Xj[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=pO[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=pO[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?Xj[i.brushType](a.values,o.offset,sMe(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=Vj(t,e),a=0;ar[1]&&r.reverse(),r}function Vj(r,e){return vf(r,e,{includeMainTypes:nMe})}var oMe={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:Hj.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:Hj.geo})})}},Gj=[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}],Hj={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(ks(r)),e}},pO={lineX:ot(Wj,0),lineY:ot(Wj,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=[dO([n[0],a[0]]),dO([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 Wj(r,e,t,i){var n=t.getAxis(["x","y"][r]),a=dO(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 Xj={lineX:ot(Yj,0),lineY:ot(Yj,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 Yj(r,e,t,i){return[e[0]-i[r]*t[0],e[1]-i[r]*t[1]]}function sMe(r,e){var t=qj(r),i=qj(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 qj(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var kx=aMe;var mO=N,lMe=sH("toolbox-dataZoom_");var uMe=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()),hMe(t,i,this,a,n),fMe(t,i)},e.prototype.onclick=function(t,i,n){cMe[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(vO(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)}}),Uj(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=[];mO(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),cMe={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Oj(this.ecModel))}};function vO(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 fMe(r,e){r.setIconStatus("back",zj(e)>1?"emphasis":"normal")}function hMe(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(vO(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)}C5("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=vO(i),o=vf(r,a);mO(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),mO(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:lMe+u+f};h[c]=f,n.push(h)}return n});var Zj=uMe;function gO(r){r.registerComponentModel(Tj),r.registerComponentView(Aj),Qf("saveAsImage",Cj),Qf("magicType",Pj),Qf("dataView",Dj),Qf("dataZoom",Zj),Qf("restore",kj),It(bj)}var pMe=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),jj=pMe;function sE(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function Kj(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 yMe(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?","+xO+i:",left"+i+",top"+i),dMe+":"+n}function Qj(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;"+xO+":"+o+";":[["top",0],["left",0],[yO,o]]}function _Me(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 xMe(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(yMe(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(_Me(c)),f!=null&&i.push("padding:"+Gs(f).join("px ")+"px"),i.join(";")+";"}function eK(r,e,t,i,n){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&WV(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 SMe=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()));eK(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=$j(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=mMe+xMe(e,!this._firstShow,this._longHide)+Qj(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=gMe(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=aK(a,n);this._ticket="";var s=a.dataByCoordSys,l=CMe(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=bMe;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(aK(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=YU(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=_D(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=ED(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;G",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=_D(u.formatTooltip(c,!1,f)),x=g.get("order"),M=g.get("valueFormatter"),S=y.frag,w=S?ED(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=AMe(i,d,f,t.get("borderWidth"));n=v[0],a=v[1]}else{var v=TMe(n,a,o,u,c,h?null:20,p?null:20);n=v[0],a=v[1]}if(h&&(n-=oK(h)?f[0]/2:h==="right"?f[0]:0),p&&(a-=oK(p)?f[1]/2:p==="bottom"?f[1]:0),sE(t)){var v=EMe(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 aK(r,e){return r.dispatchAction||Be(e.dispatchAction,e)}function TMe(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 EMe(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 AMe(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 oK(r){return r==="center"||r==="middle"}function CMe(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 sK=wMe;function SO(r){It(il),r.registerComponentModel(jj),r.registerComponentView(sK),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ir),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ir)}var RMe=["rect","polygon","keep","clear"];function MO(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),LMe(s),e&&!s.length&&s.push.apply(s,RMe)}}function LMe(r){var e={};N(r,function(t){e[t]=1}),r.length=0,N(e,function(t,i){r.push(i)})}var lK=N;function uK(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Gx(r,e,t){var i={};return lK(e,function(a){var o=i[a]=n();lK(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)&&uK(e[n])&&(i=!0)}),i&&N(t,function(n){e.hasOwnProperty(n)&&uK(e[n])?r[n]=Qe(e[n]):delete r[n]})}function cK(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){ID(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 fK(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){ID(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&&gK(e)}};function gK(r){return new lt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var UMe=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){TO(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),yK=UMe;var OMe="#ddd",FMe=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:OMe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=de(t,function(i){return _K(this.option,i)},this))},e.prototype.setBrushOption=function(t){this.brushOption=_K(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 _K(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 xK=FMe;var zMe=["rect","polygon","lineX","lineY","keep","clear"],BMe=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:zMe.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),SK=BMe;function AO(r){r.registerComponentView(yK),r.registerComponentModel(xK),r.registerPreprocessor(MO),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,EO),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",SK)}var kMe=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),VMe=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 CO(r){r.registerComponentModel(kMe),r.registerComponentView(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.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),RO=GMe;var MK=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(RO.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}(RO);wr(MK,hv.prototype);var bK=MK;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="timeline",e}(Qt),wK=HMe;var WMe=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),TK=WMe;var LO=Math.PI,EK=vt(),XMe=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=qMe(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:LO/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*LO/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,-LO/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=YMe(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 TK("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=AK(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),EK(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=ZMe(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),CK(f,u._progressLine,s,n,a,!0)},onUpdate:function(f){CK(f,u._progressLine,s,n,a)}};this._currentPointer=AK(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 IO={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(!JMe(e)&&!pe(e.coord)&&pe(n)){var a=UO(e,t,i,r);if(e=Qe(e),e.type&&IO[e.type]&&a.baseAxis&&a.valueAxis){var o=dt(n,a.baseAxis.dim),s=dt(n,a.valueAxis.dim),l=IO[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++)IO[u[c]]&&(u[c]=dE(t,t.mapDimension(n[c]),u[c]));return e}}function UO(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($Me(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 $Me(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function rh(r,e){return r&&r.containData&&e.coord&&!NO(e)?r.containData(e.coord):!0}function NK(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!NO(e)&&!NO(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 FO=vt(),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.init=function(){this.markerGroupMap=ke()},e.prototype.render=function(t,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){FO(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){!FO(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){FO(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=QMe;function UK(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 ebe=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&&(UK(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=tbe(o,t,i);i.setData(f),UK(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 tbe(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 OK=ebe;function zO(r){r.registerComponentModel(IK),r.registerComponentView(OK),r.registerPreprocessor(function(e){pd(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var rbe=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),FK=rbe;var mE=vt(),ibe=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=UO(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 zK(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 nbe(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,i=e[1].coord;if(t&&i&&(zK(1,t,i,r)||zK(0,t,i,r)))return!0}return rh(r,e[0])&&rh(r,e[1])}function BO(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 abe=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){BO(l,c,!0,a,n),BO(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=obe(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);BO(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 obe(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(ibe,e,r,t));r&&(s=Wt(s,ot(nbe,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 BK=abe;function kO(r){r.registerComponentModel(FK),r.registerComponentView(BK),r.registerPreprocessor(function(e){pd(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var sbe=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),kK=sbe;var gE=vt(),lbe=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 VK(r,e,t,i){var n=1-r;return yE(e[n])&&yE(t[n])}function ube(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&&(VK(1,t,i,r)||VK(0,t,i,r))?!0:NK(r,n,a):rh(r,n)||rh(r,a)}function GK(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 HK=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],cbe=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(HK,function(f){return GK(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=fbe(o,t,i);i.setData(f),f.each(function(h){var p=de(HK,function(T){return GK(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=pbe;var tg=ot,GO=N,_E=Ze,dbe=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)}),GO(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(XK,g,null,a,h)).on("mouseover",tg(HO,v.name,null,a,h)).on("mouseout",tg(WO,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(XK,null,g,a,h)).on("mouseover",tg(HO,null,g,a,h)).on("mouseout",tg(WO,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();GO(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=mbe(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(vbe({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 mbe(r,e,t,i,n,a,o){function s(m,v){m.lineWidth==="auto"&&(m.lineWidth=v.lineWidth>0?2:0),GO(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 vbe(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 XK(r,e,t,i){WO(r,e,t,i),t.dispatchAction({type:"legendToggleSelect",name:r??e}),HO(r,e,t,i)}function YK(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=YO[o],l=qO[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),JK=ybe;function ZO(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 $K(r){It(SE),r.registerComponentModel(jK),r.registerComponentView(JK),ZO(r)}function jO(r){It(SE),It($K)}var _be=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),QK=_be;var KO=vt();function eJ(r,e,t){KO(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function tJ(r,e){for(var t=KO(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 iJ(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var i=KO(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,xbe(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){rJ(n,a);return}var c=bbe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),as(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Tbe=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(),eJ(n,t,{pan:Be(JO.pan,this),zoom:Be(JO.zoom,this),scrollMove:Be(JO.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){tJ(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Jv),JO={zoom:function(r,e,t,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=$O[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:nJ(function(r,e,t,i,n,a){var o=$O[i]([a.oldX,a.oldY],[a.newX,a.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:nJ(function(r,e,t,i,n,a){var o=$O[i]([0,0],[a.scrollDelta,a.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function nJ(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 $O={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}},aJ=Tbe;function Yx(r){fd(r),r.registerComponentModel(QK),r.registerComponentView(aJ),iJ(r)}var Ebe=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),oJ=Ebe;var qx=Tt,sJ=7,Abe=1,QO=30,Cbe=7,Zx="horizontal",lJ="vertical",Rbe=5,Lbe=["line","bar","candlestick","scatter"],Pbe={easing:"cubicOut",duration:100,delay:0},Dbe=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?Cbe: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-QO-sJ-a,width:o.width,height:QO}:{right:sJ,top:o.y,width:QO,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===lJ&&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===lJ&&!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(Lbe,u.get("type"))<0)){var c=a.getComponent(ds(o),s).axis,f=Ibe(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:Abe,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:uJ(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:uJ(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?Pbe: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 Ibe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function uJ(r){return r==="vertical"?"ns-resize":"ew-resize"}var cJ=Dbe;function jx(r){r.registerComponentModel(oJ),r.registerComponentView(cJ),fd(r)}function e3(r){It(Yx),It(jx)}var Nbe={get:function(r,e,t){var i=Qe((Ube[r]||{})[e]);return t&&pe(i)?i[i.length-1]:i}},Ube={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=Nbe;var fJ=pi.mapVisual,Obe=pi.eachVisual,Fbe=pe,hJ=N,zbe=Ti,Bbe=rr,kbe=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=zbe([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){Fbe(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]={},hJ(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";hJ(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=fJ(y.symbol,function(S){return S==="none"?m:S});var x=y.symbolSize;if(x!=null){var M=-1/0;Obe(x,function(S){S>M&&(M=S)}),y.symbolSize=fJ(x,function(S){return Bbe(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=kbe;var pJ=[20,140],Vbe=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]=pJ[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=pJ[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=dJ(this,"outOfRange",this.getExtent()),n=dJ(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();Hbe([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||xJ(n))&&(p=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var d=uH(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 Zbe(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(bJ,wJ),N(TJ,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(r3))}function Jx(r){r.registerComponentModel(mJ),r.registerComponentView(MJ),Kx(r)}var jbe=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=[],Kbe[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),Kbe={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 CJ(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var RJ=jbe;var Jbe=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),LJ=Jbe;function $x(r){r.registerComponentModel(RJ),r.registerComponentView(LJ),Kx(r)}function i3(r){It(Jx),It($x)}var $be={label:{enabled:!0},decal:{show:!1}},PJ=vt(),Qbe={};function n3(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var i=Qe($be);_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)),PJ(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,Qbe,r.getSeriesCount()),y=p.getVisual("decal");p.setVisual("decal",x(y,_))}else{var d=h.getRawData(),g={},m=PJ(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"},ewe=function(){function r(e){var t=this._condVal=Ce(e)?new RegExp(e):zV(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}(),twe=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),rwe=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 c3(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),c3(C[0],b[0],C[1],b[1],C[2],b[2],C[3],b[3],l,u),c3(C[4],b[4],C[5],b[5],C[6],b[6],C[7],b[7],l,u)}function zJ(r,e){var t=TE(r),i=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),f=GJ([l,u],c?0:1,e),h=(c?s:u)/f.length,p=0;pn,o=GJ([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 pwe(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 dwe(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),dwe(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 mwe(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:bwe(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 jJ(r){return HJ(r.path,r.count)}function f3(){return{fromIndividuals:[],toIndividuals:[],count:0}}function KJ(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 wwe={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;$J(r)&&(u=r,c=e),$J(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:wwe[t],individualDelay:s&&function(B,F,k,G){return s(B+y,x)}},l),I=_?KJ(S,w,E):JJ(w,S,E),R=I.fromIndividuals,A=I.toIndividuals,D=R.length,U=0;Ue.length,p=u?QJ(c,u):QJ(h?e:r,[h?r:e]),d=0,g=0;gs$))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 n$(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function a$(r){return pe(r)?r.sort().join(","):r}function nh(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Pwe(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=n$(o),f=a$(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)&&tH("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=n$(o),c=a$(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 o$(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=o$(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&&l$(n,a,i)}function d3(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=jD(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(Iwe,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 Nwe(r,e){if(r&1&&li(0,"nz-avatar",3),r&2){let t=Lr();Rt("nzSrc",t.nzSrc)}}function Uwe(r,e){r&1&&Li(0,0,["*ngIf","!nzSrc"])}function Owe(r,e){if(r&1&&li(0,"nz-list-item-meta-avatar",3),r&2){let t=Lr();Rt("nzSrc",t.avatarStr)}}function Fwe(r,e){if(r&1&&(tr(0,"nz-list-item-meta-avatar"),dV(1,4),lr()),r&2){let t=Lr();Ot(),Rt("ngTemplateOutlet",t.avatarTpl)}}function zwe(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(3);Ot(),Ec(t.nzTitle)}}function Bwe(r,e){if(r&1&&(tr(0,"nz-list-item-meta-title"),br(1,zwe,2,1,"ng-container",6),lr()),r&2){let t=Lr(2);Ot(),Rt("nzStringTemplateOutlet",t.nzTitle)}}function kwe(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(3);Ot(),Ec(t.nzDescription)}}function Vwe(r,e){if(r&1&&(tr(0,"nz-list-item-meta-description"),br(1,kwe,2,1,"ng-container",6),lr()),r&2){let t=Lr(2);Ot(),Rt("nzStringTemplateOutlet",t.nzDescription)}}function Gwe(r,e){if(r&1&&(tr(0,"div",5),br(1,Bwe,2,1,"nz-list-item-meta-title",1)(2,Vwe,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 Hwe=[[["nz-list-item-meta-avatar"]],[["nz-list-item-meta-title"]],[["nz-list-item-meta-description"]]],Wwe=["nz-list-item-meta-avatar","nz-list-item-meta-title","nz-list-item-meta-description"];function Xwe(r,e){r&1&&Li(0)}var Ywe=["nz-list-item-actions",""];function qwe(r,e){}function Zwe(r,e){r&1&&li(0,"em",3)}function jwe(r,e){if(r&1&&(tr(0,"li"),br(1,qwe,0,0,"ng-template",1)(2,Zwe,1,0,"em",2),lr()),r&2){let t=e.$implicit,i=e.last;Ot(),Rt("ngTemplateOutlet",t),Ot(),Rt("ngIf",!i)}}function Kwe(r,e){}var m$=(r,e)=>({$implicit:r,index:e});function Jwe(r,e){if(r&1&&(Sl(0),br(1,Kwe,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,m$,t,i))}}function $we(r,e){if(r&1&&(tr(0,"div",7),br(1,Jwe,2,5,"ng-container",8),Li(2,4),lr()),r&2){let t=Lr();Ot(),Rt("ngForOf",t.nzDataSource)}}function Qwe(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(2);Ot(),Ec(t.nzHeader)}}function e1e(r,e){if(r&1&&(tr(0,"nz-list-header"),br(1,Qwe,2,1,"ng-container",10),lr()),r&2){let t=Lr();Ot(),Rt("nzStringTemplateOutlet",t.nzHeader)}}function t1e(r,e){r&1&&li(0,"div"),r&2&&hV("min-height",53,"px")}function r1e(r,e){}function i1e(r,e){if(r&1&&(tr(0,"div",13),br(1,r1e,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,m$,t,i))}}function n1e(r,e){if(r&1&&(tr(0,"div",11),br(1,i1e,2,12,"div",12),lr()),r&2){let t=Lr();Rt("nzGutter",t.nzGrid.gutter||null),Ot(),Rt("ngForOf",t.nzDataSource)}}function a1e(r,e){if(r&1&&li(0,"nz-list-empty",14),r&2){let t=Lr();Rt("nzNoResult",t.nzNoResult)}}function o1e(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(2);Ot(),Ec(t.nzFooter)}}function s1e(r,e){if(r&1&&(tr(0,"nz-list-footer"),br(1,o1e,2,1,"ng-container",10),lr()),r&2){let t=Lr();Ot(),Rt("nzStringTemplateOutlet",t.nzFooter)}}function l1e(r,e){}function u1e(r,e){}function c1e(r,e){if(r&1&&(tr(0,"nz-list-pagination"),br(1,u1e,0,0,"ng-template",6),lr()),r&2){let t=Lr();Ot(),Rt("ngTemplateOutlet",t.nzPagination)}}var f1e=[[["nz-list-header"]],[["nz-list-footer"],["","nz-list-footer",""]],[["nz-list-load-more"],["","nz-list-load-more",""]],[["nz-list-pagination"],["","nz-list-pagination",""]],"*"],h1e=["nz-list-header","nz-list-footer, [nz-list-footer]","nz-list-load-more, [nz-list-load-more]","nz-list-pagination, [nz-list-pagination]","*"];function p1e(r,e){if(r&1&&li(0,"ul",6),r&2){let t=Lr(2);Rt("nzActions",t.nzActions)}}function d1e(r,e){if(r&1&&(br(0,p1e,1,1,"ul",5),Li(1)),r&2){let t=Lr();Rt("ngIf",t.nzActions&&t.nzActions.length>0)}}function m1e(r,e){if(r&1&&(Sl(0),Pi(1),Ml()),r&2){let t=Lr(3);Ot(),Ec(t.nzContent)}}function v1e(r,e){if(r&1&&(Sl(0),br(1,m1e,2,1,"ng-container",8),Ml()),r&2){let t=Lr(2);Ot(),Rt("nzStringTemplateOutlet",t.nzContent)}}function g1e(r,e){if(r&1&&(Li(0,1),Li(1,2),br(2,v1e,2,1,"ng-container",7)),r&2){let t=Lr();Ot(2),Rt("ngIf",t.nzContent)}}function y1e(r,e){r&1&&Li(0,3)}function _1e(r,e){}function x1e(r,e){}function S1e(r,e){}function M1e(r,e){}function b1e(r,e){if(r&1&&br(0,_1e,0,0,"ng-template",9)(1,x1e,0,0,"ng-template",9)(2,S1e,0,0,"ng-template",9)(3,M1e,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 w1e(r,e){}function T1e(r,e){}function E1e(r,e){}function A1e(r,e){if(r&1&&(tr(0,"nz-list-item-extra"),br(1,E1e,0,0,"ng-template",9),lr()),r&2){let t=Lr(2);Ot(),Rt("ngTemplateOutlet",t.nzExtra)}}function C1e(r,e){}function R1e(r,e){if(r&1&&(Sl(0),tr(1,"div",10),br(2,w1e,0,0,"ng-template",9)(3,T1e,0,0,"ng-template",9),lr(),br(4,A1e,2,1,"nz-list-item-extra",7)(5,C1e,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 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",""]]],P1e=["nz-list-item-actions, [nz-list-item-actions]","nz-list-item-meta, [nz-list-item-meta]","*","nz-list-item-extra, [nz-list-item-extra]"],c$=(()=>{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})(),f$=(()=>{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})(),v$=(()=>{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,Nwe,1,1,"nz-avatar",1)(2,Uwe,1,0,"ng-content",2),lr()),n&2&&(Ot(),Rt("ngIf",a.nzSrc),Ot(),Rt("ngIf",!a.nzSrc))},dependencies:[El,EV,bl],encapsulation:2,changeDetection:0});let r=e;return r})(),D1e=(()=>{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(cV))},e.\u0275cmp=si({type:e,selectors:[["nz-list-item-meta"],["","nz-list-item-meta",""]],contentQueries:function(n,a,o){if(n&1&&(Tc(o,f$,5),Tc(o,c$,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:Wwe,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(Hwe),br(0,Owe,1,1,"nz-list-item-meta-avatar",0)(1,Fwe,2,1,"nz-list-item-meta-avatar",1),Li(2),br(3,Gwe,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:[v$,bl,L0,c$,qM,YM,f$],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-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})(),I1e=(()=>{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,Xwe,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let r=e;return r})(),N1e=(()=>{let e=class e{constructor(i,n,a){this.ngZone=i,this.nzActions=[],this.actions=[],this.inputActionChanges$=new qR,this.contentChildrenChanges$=rV(()=>this.nzListItemActions?tV(null):this.ngZone.onStable.pipe(nV(1),this.enterZone(),aV(()=>this.nzListItemActions.changes.pipe(oV(this.nzListItemActions))))),iV(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 Qk(n=>i.subscribe({next:a=>this.ngZone.run(()=>n.next(a))}))}};e.\u0275fac=function(n){return new(n||e)(uo(fV),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,I1e,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:[vV([ZM]),C0,ui],attrs:Ywe,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,jwe,3,2,"li",0),n&2&&Rt("ngForOf",a.actions)},dependencies:[R0,L0,bl],encapsulation:2,changeDetection:0});let r=e;return r})(),g$=(()=>{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:[wV,bV],encapsulation:2,changeDetection:0});let r=e;return r})(),U1e=(()=>{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})(),p$=(()=>{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})(),d$=(()=>{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})(),O1e=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=uV({type:e,selectors:[["nz-list-load-more"]],exportAs:["nzListLoadMoreDirective"],standalone:!0});let r=e;return r})();var y$=(()=>{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 eV(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(SV,8))},e.\u0275cmp=si({type:e,selectors:[["nz-list"],["","nz-list",""]],contentQueries:function(n,a,o){if(n&1&&(Tc(o,p$,5),Tc(o,d$,5),Tc(o,O1e,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:h1e,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(f1e),br(0,$we,3,1,"ng-template",null,0,gm)(2,e1e,2,1,"nz-list-header",1),Li(3),tr(4,"nz-spin",2),Sl(5),br(6,t1e,1,2,"div",3)(7,n1e,2,2,"div",4)(8,a1e,1,1,"nz-list-empty",5),Ml(),lr(),br(9,s1e,2,1,"nz-list-footer",1),Li(10,1),br(11,l1e,0,0,"ng-template",6),Li(12,2),br(13,c1e,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,U1e,bl,qM,YM,wl,TV,Tl,JM,KM,g$,p$,d$],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})(),F1e=(()=>{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(y$),uo(jR))},e.\u0275cmp=si({type:e,selectors:[["nz-list-item"],["","nz-list-item",""]],contentQueries:function(n,a,o){if(n&1&&Tc(o,h$,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:P1e,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(L1e),br(0,d1e,2,1,"ng-template",null,0,gm)(2,g1e,3,1,"ng-template",null,1,gm)(4,y1e,1,0,"ng-template",null,2,gm)(6,b1e,4,4,"ng-template",null,3,gm)(8,R1e,6,4,"ng-container",4)),n&2){let o=gu(7);Ot(8),Rt("ngIf",a.isVerticalAndExtra)("ngIfElse",o)}},dependencies:[N1e,bl,qM,YM,L0,h$],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=lV({type:e}),e.\u0275inj=sV({imports:[y$,g$,F1e,D1e,v$]});let r=e;return r})();var B1e=r=>({margin:r,width:"100%",height:"16rem"});function k1e(r,e){if(r&1&&li(0,"app-chart-component",28),r&2){let t=Lr(2).$implicit,i=Lr();pV(gV(3,B1e,"20px "+20/i.chartConfig.rowNumber+"px")),Rt("options",t.options)}}function V1e(r,e){if(r&1&&(tr(0,"div",26),br(1,k1e,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 G1e(r,e){if(r&1&&br(0,V1e,2,2,"div",25),r&2){let t=e.$implicit;Rt("ngIf",t.checked)}}function H1e(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 x$=(()=>{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(LV))},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),mV("onCheckedItemsChange",function(s){return a.handleCheckedItems(s)}),tr(50,"div",23),$R(51,G1e,1,1,"div",31,JR),lr(),tr(53,"div",24),$R(54,H1e,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,AV,CV,RV,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,u$],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 W1e(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 X1e(r,e){if(r&1&&(tr(0,"div")(1,"ul"),br(2,W1e,3,2,"li",1),lr()()),r&2){let t=Lr();Ot(2),Rt("ngForOf",t.children)}}var S$=(()=>{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(yV),uo(_V))},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,X1e,3,1,"div",0),n&2&&Rt("ngIf",a.children&&a.children.length)},dependencies:[XM,R0,bl,jM,rf,NE,Dc,Ic,xV,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 rS="162";var M$=0,X3=1,b$=2;var UE=1,w$=2,nl=3,Ao=0,_i=1,Co=2,ms=0,Yu=1,Y3=2,q3=3,Z3=4,T$=5,qu=100,E$=101,A$=102,j3=103,K3=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 J3=300,al=301,tu=302,aS=303,oS=304,oh=306,sS=1e3,ma=1001,lS=1002,ki=1003,$3=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,Q3=35840,eF=35841,tF=35842,rF=35843,ZE=36196,iF=37492,nF=37496,aF=37808,oF=37809,sF=37810,lF=37811,uF=37812,cF=37813,fF=37814,hF=37815,pF=37816,dF=37817,mF=37818,vF=37819,gF=37820,yF=37821,jE=36492,_F=36494,xF=36495,cQ=36283,SF=36284,MF=36285,bF=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 wF=519,mQ=512,vQ=513,gQ=514,KE=515,yQ=516,_Q=517,xQ=518,SQ=519,TF=35044;var EF="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 AF(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(CF.makeScale(e,t)),this}rotate(e){return this.premultiply(CF.makeRotation(-e)),this}translate(e,t){return this.premultiply(CF.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)}},CF=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()}},Y1e=new Set([Za,dd]),Er={enabled:!0,_workingColorSpace:Za,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!Y1e.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:Z1e++}),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!==J3)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=J3,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 LF.copy(this).projectOnVector(e),this.sub(LF)}reflect(e){return this.sub(LF.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}},LF=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!PF(t,Sg,Mg,bg,aA)||(t=[1,0,0,0,1,0,0,0,1],!PF(t,Sg,Mg,bg,aA))?!1:(oA.crossVectors(lh,uh),t=[oA.x,oA.y,oA.z],PF(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 PF(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 j1e=new Ku,pS=new be,DF=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):j1e.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):(DF.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(pS.copy(e.center).add(DF)),this.expandByPoint(pS.copy(e.center).sub(DF))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};var Ju=new be,IF=new be,sA=new be,fh=new be,NF=new be,lA=new be,UF=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){IF.copy(e).add(t).multiplyScalar(.5),sA.copy(t).sub(e).normalize(),fh.copy(this.origin).sub(IF);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(IF).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){NF.subVectors(t,e),lA.subVectors(i,e),UF.crossVectors(NF,lA);let o=this.direction.dot(UF),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(NF.cross(fh));if(u<0||l+u>o)return null;let c=-s*fh.dot(UF);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(K1e,e,J1e)}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,K1e=new be(0,0,0),J1e=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:$1e++}),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),zF.subVectors(e,t);let o=fl.dot(fl),s=fl.dot(Qu),l=fl.dot(zF),u=Qu.dot(Qu),c=Qu.dot(zF),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),BF.subVectors(e,i);let l=Ag.dot(BF),u=Cg.dot(BF);if(l<=0&&u<=0)return t.copy(i);kF.subVectors(e,n);let c=Ag.dot(kF),f=Cg.dot(kF);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);VF.subVectors(e,a);let p=Ag.dot(VF),d=Cg.dot(VF);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 GF(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=GF(o,a,e+1/3),this.g=GF(o,a,e),this.b=GF(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!==wF&&(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=TF,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=aTe(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;G1?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;g1?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||sTe.getNormalMatrix(e),n=this.coplanarPoint(XF).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 } -`;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:` +`;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,TTe=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(TTe.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,YF=new kg,Ore=new ir,qF=null,ZF=0,jF=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){qF=this._renderer.getRenderTarget(),ZF=this._renderer.getActiveCubeFace(),jF=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,YF)}_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,YF)}};function ETe(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 ATe(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:KF(),fragmentShader:` precision mediump float; precision mediump int; @@ -8528,7 +8528,7 @@ void main() { } } - `,blending:ms,depthTest:!1,depthWrite:!1})}function Bre(){return new ya({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:jF(),fragmentShader:` + `,blending:ms,depthTest:!1,depthWrite:!1})}function Bre(){return new ya({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:KF(),fragmentShader:` precision mediump float; precision mediump int; @@ -8547,7 +8547,7 @@ void main() { 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:` + `,blending:ms,depthTest:!1,depthWrite:!1})}function kre(){return new ya({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:KF(),fragmentShader:` precision mediump float; precision mediump int; @@ -8563,7 +8563,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:ms,depthTest:!1,depthWrite:!1})}function jF(){return` + `,blending:ms,depthTest:!1,depthWrite:!1})}function KF(){return` precision mediump float; precision mediump int; @@ -8618,16 +8618,16 @@ void main() { 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;t0||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()+` +`)}function xEe(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);a/gm;function rz(r){return r.replace(AEe,REe)}var CEe=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function REe(r,e){let t=pr[e];if(t===void 0){let i=CEe.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 rz(t)}var LEe=/#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(LEe,PEe)}function PEe(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:"",` +`),_=[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?MEe("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",pr.colorspace_pars_fragment,SEe("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 +`)),o=rz(o),o=oie(o,t),o=sie(o,t),s=rz(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(` +`+v,_=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===EF?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===EF?"":"#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)+` +`+_);let x=y+v+o,M=y+_+s,S=tz(n,n.VERTEX_SHADER,x),w=tz(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=` +`+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=EEe(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,gEe)),E},this.destroy=function(){i.releaseStatesOfProgram(this),n.deleteProgram(m),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=yEe++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=S,this.fragmentShader=w,this}var FEe=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 iz(e),t.set(e,i)),i}},iz=class{constructor(e){this.id=FEe++,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||zEe),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 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={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 kEe(){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 VEe=0;function GEe(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 BEe,i=kEe(),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(GEe);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=VEe++)}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 ); @@ -8718,12 +8718,12 @@ void main() { 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=` +`;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 AF(L.width)&&AF(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===$3||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,[$3]: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===Q3||a===eF||a===tF||a===rF)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(a===Q3)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===eF)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===tF)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===rF)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===iF||a===nF)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(a===iF)return l===Hr?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(a===nF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(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||a===yF)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(a===aF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(a===oF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(a===sF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(a===lF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(a===uF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(a===cF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(a===fF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(a===hF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(a===pF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(a===dF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(a===mF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(a===vF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(a===gF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(a===yF)return l===Hr?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(a===jE||a===_F||a===xF)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===_F)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(a===xF)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(a===cQ||a===SF||a===MF||a===bF)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(a===jE)return s.COMPRESSED_RED_RGTC1_EXT;if(a===SF)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(a===MF)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(a===bF)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 WEe={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(WEe)))}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 XEe=` void main() { gl_Position = vec4( position, 1.0 ); -}`,XEe=` +}`,YEe=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -8742,11 +8742,11 @@ void main() { } -}`,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;G=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(qEe.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 nz=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(),nz.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nz),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(nz)}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=Use(rae());var Nk="162";var OLe=0,iae=1,FLe=2;var Xoe=1,zLe=2,vc=3,Uh=0,lo=1,yc=2,Dh=0,a0=1,nae=2,aae=3,oae=4,BLe=5,um=100,kLe=101,VLe=102,sae=103,lae=104,GLe=200,HLe=201,WLe=202,XLe=203,JB=204,$B=205,YLe=206,qLe=207,ZLe=208,jLe=209,KLe=210,JLe=211,$Le=212,QLe=213,ePe=214,tPe=0,rPe=1,iPe=2,eR=3,nPe=4,aPe=5,oPe=6,sPe=7,NR=0,lPe=1,uPe=2,Ih=0,cPe=1,fPe=2,hPe=3,pPe=4,dPe=5,mPe=6,vPe=7,uae="attached",gPe="detached",cae=300,l0=301,u0=302,LM=303,QB=304,UR=306,c0=1e3,oo=1001,ek=1002,Dn=1003,fae=1004;var SM=1005;var ao=1006,mB=1007;var fm=1008;var Nh=1009,yPe=1010,_Pe=1011,Uk=1012,Yoe=1013,Ph=1014,hu=1015,PM=1016,qoe=1017,Zoe=1018,hm=1020,xPe=1021,As=1023,SPe=1024,MPe=1025,pm=1026,f0=1027,bPe=1028,joe=1029,wPe=1030,Koe=1031,Joe=1033,vB=33776,gB=33777,yB=33778,_B=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,xB=36492,Dae=36494,Iae=36495,TPe=36283,Nae=36284,Uae=36285,Oae=36286;var tR=2300,rR=2301,SB=2302,Fae=2400,zae=2401,Bae=2402,EPe=2500;var APe=3200,CPe=3201,Ok=0,RPe=1,Lh="",Ma="srgb",Hh="srgb-linear",Fk="display-p3",OR="display-p3-linear",iR="linear",ai="srgb",nR="rec709",aR="p3";var zy=7680;var kae=519,LPe=512,PPe=513,DPe=514,Qoe=515,IPe=516,NPe=517,UPe=518,OPe=519,Vae=35044;var Gae="300 es",tk=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 zk(r,e){return(r%e+e)%e}function FPe(r,e,t,i,n){return i+(r-e)*(n-i)/(t-e)}function zPe(r,e,t){return r!==e?(t-r)/(e-r):0}function CM(r,e,t){return(1-t)*r+t*e}function BPe(r,e,t,i){return CM(r,e,1-Math.exp(-t*i))}function kPe(r,e=1){return e-Math.abs(zk(r,e*2)-e)}function VPe(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function GPe(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function HPe(r,e){return r+Math.floor(Math.random()*(e-r+1))}function WPe(r,e){return r+Math.random()*(e-r)}function XPe(r){return r*(.5-Math.random())}function YPe(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 qPe(r){return r*AM}function ZPe(r){return r*h0}function rk(r){return(r&r-1)===0&&r!==0}function jPe(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 KPe(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:zk,mapLinear:FPe,inverseLerp:zPe,lerp:CM,damp:BPe,pingpong:kPe,smoothstep:VPe,smootherstep:GPe,randInt:HPe,randFloat:WPe,randFloatSpread:XPe,seededRandom:YPe,degToRad:qPe,radToDeg:ZPe,isPowerOfTwo:rk,ceilPowerOfTwo:jPe,floorPowerOfTwo:sR,setQuaternionFromProperEuler:KPe,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(MB.makeScale(e,t)),this}rotate(e){return this.premultiply(MB.makeRotation(-e)),this}translate(e,t){return this.premultiply(MB.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)}},MB=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 JPe(){let r=DM("canvas");return r.style.display="block",r}var Wae={};function $Pe(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)},[Fk]:{transfer:ai,primaries:aR,toReference:r=>r.convertSRGBToLinear().applyMatrix3(Yae),fromReference:r=>r.applyMatrix3(Xae).convertLinearToSRGB()}},QPe=new Set([Hh,OR]),Jr={enabled:!0,_workingColorSpace:Hh,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!QPe.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 bB(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:tDe++}),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 ek: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 ek: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}},ik=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 TB.copy(this).projectOnVector(e),this.sub(TB)}reflect(e){return this.sub(TB.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}},TB=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!EB(t,ky,Vy,Gy,LC)||(t=[1,0,0,0,1,0,0,0,1],!EB(t,ky,Vy,Gy,LC))?!1:(PC.crossVectors(wh,Th),t=[PC.x,PC.y,PC.z],EB(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 EB(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 rDe=new Fh,bM=new ye,AB=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):rDe.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):(AB.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(bM.copy(e.center).add(AB)),this.expandByPoint(bM.copy(e.center).sub(AB))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}},fc=new ye,CB=new ye,DC=new ye,Eh=new ye,RB=new ye,IC=new ye,LB=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){CB.copy(e).add(t).multiplyScalar(.5),DC.copy(t).sub(e).normalize(),Eh.copy(this.origin).sub(CB);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(CB).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){RB.subVectors(t,e),IC.subVectors(i,e),LB.crossVectors(RB,IC);let o=this.direction.dot(LB),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(RB.cross(Eh));if(u<0||l+u>o)return null;let c=-s*Eh.dot(LB);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(iDe,e,nDe)}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,iDe=new ye(0,0,0),nDe=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:aDe++}),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),IB.subVectors(e,t);let o=yl.dot(yl),s=yl.dot(pc),l=yl.dot(IB),u=pc.dot(pc),c=pc.dot(IB),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),NB.subVectors(e,i);let l=Xy.dot(NB),u=Yy.dot(NB);if(l<=0&&u<=0)return t.copy(i);UB.subVectors(e,n);let c=Xy.dot(UB),f=Yy.dot(UB);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);OB.subVectors(e,a);let p=Xy.dot(OB),d=Yy.dot(OB);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 FB(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=zk(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=FB(o,a,e+1/3),this.g=FB(o,a,e),this.b=FB(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=bB(e.r),this.g=bB(e.g),this.b=bB(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!==JB&&(i.blendSrc=this.blendSrc),this.blendDst!==$B&&(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 $Pe("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=hDe(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:` +}`,pu=class extends Mc{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=mDe,this.fragmentShader=vDe,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=d0(e.uniforms),this.uniformsGroups=pDe(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let n in this.uniforms){let o=this.uniforms[n].value;o&&o.isTexture?t.uniforms[n]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[n]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[n]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[n]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[n]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[n]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[n]={type:"m4",value:o.toArray()}:t.uniforms[n]={value:o}}Object.keys(this.defines).length>0&&(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,ak=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}},ok=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; @@ -8781,9 +8781,9 @@ void main() { 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;g1?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||yDe.getNormalMatrix(e),n=this.coplanarPoint(kB).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 _De(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 +#endif`,UDe=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -9013,26 +9013,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve 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; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,FDe=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,zDe=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,zDe=`#if defined( USE_COLOR_ALPHA ) +#endif`,BDe=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,BDe=`#if defined( USE_COLOR_ALPHA ) +#endif`,kDe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,kDe=`#if defined( USE_COLOR_ALPHA ) +#endif`,VDe=`#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 ) +#endif`,GDe=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -9042,7 +9042,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,GDe=`#define PI 3.141592653589793 +#endif`,HDe=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -9120,7 +9120,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 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 +} // validated`,WDe=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -9213,7 +9213,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,WDe=`vec3 transformedNormal = objectNormal; +#endif`,XDe=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -9242,18 +9242,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,XDe=`#ifdef USE_DISPLACEMENTMAP +#endif`,YDe=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,YDe=`#ifdef USE_DISPLACEMENTMAP +#endif`,qDe=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,qDe=`#ifdef USE_EMISSIVEMAP +#endif`,ZDe=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,ZDe=`#ifdef USE_EMISSIVEMAP +#endif`,jDe=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,jDe="gl_FragColor = linearToOutputTexel( gl_FragColor );",KDe=` +#endif`,KDe="gl_FragColor = linearToOutputTexel( gl_FragColor );",JDe=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -9281,7 +9281,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,JDe=`#ifdef USE_ENVMAP +}`,$De=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -9310,7 +9310,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,$De=`#ifdef USE_ENVMAP +#endif`,QDe=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -9320,7 +9320,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,QDe=`#ifdef USE_ENVMAP +#endif`,e2e=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -9331,7 +9331,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,e2e=`#ifdef USE_ENVMAP +#endif`,t2e=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -9342,7 +9342,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,t2e=`#ifdef USE_ENVMAP +#endif`,r2e=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -9359,18 +9359,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,r2e=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; #endif`,i2e=`#ifdef USE_FOG - varying float vFogDepth; + vFogDepth = - mvPosition.z; #endif`,n2e=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,a2e=`#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 +#endif`,o2e=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -9379,7 +9379,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,o2e=`#ifdef USE_GRADIENTMAP +#endif`,s2e=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -9391,16 +9391,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 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 +}`,l2e=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,l2e=`#ifdef USE_LIGHTMAP +#endif`,u2e=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,u2e=`LambertMaterial material; +#endif`,c2e=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,c2e=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,f2e=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -9414,7 +9414,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,f2e=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,h2e=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -9537,7 +9537,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,h2e=`#ifdef USE_ENVMAP +#endif`,p2e=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -9570,8 +9570,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,p2e=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,d2e=`varying vec3 vViewPosition; +#endif`,d2e=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,m2e=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -9583,11 +9583,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,m2e=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,v2e=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,v2e=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,g2e=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -9604,7 +9604,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,g2e=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,y2e=`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 ); @@ -9687,7 +9687,7 @@ material.roughness = min( material.roughness, 1.0 ); 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 { +#endif`,_2e=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -9987,7 +9987,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #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=` +}`,x2e=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -10102,7 +10102,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,x2e=`#if defined( RE_IndirectDiffuse ) +#endif`,S2e=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -10121,25 +10121,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,S2e=`#if defined( RE_IndirectDiffuse ) +#endif`,M2e=`#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 ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,w2e=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,w2e=`#ifdef USE_LOGDEPTHBUF +#endif`,T2e=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,T2e=`#ifdef USE_LOGDEPTHBUF +#endif`,E2e=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -10149,16 +10149,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,E2e=`#ifdef USE_MAP +#endif`,A2e=`#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 +#endif`,C2e=`#ifdef USE_MAP uniform sampler2D map; -#endif`,C2e=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,R2e=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -10170,7 +10170,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,R2e=`#if defined( USE_POINTS_UV ) +#endif`,L2e=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -10182,19 +10182,19 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,L2e=`float metalnessFactor = metalness; +#endif`,P2e=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,P2e=`#ifdef USE_METALNESSMAP +#endif`,D2e=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,D2e=`#ifdef USE_INSTANCING_MORPH +#endif`,I2e=`#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 ) +#endif`,N2e=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -10203,7 +10203,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,N2e=`#ifdef USE_MORPHNORMALS +#endif`,U2e=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -10215,7 +10215,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,U2e=`#ifdef USE_MORPHTARGETS +#endif`,O2e=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; #endif @@ -10239,7 +10239,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,O2e=`#ifdef USE_MORPHTARGETS +#endif`,F2e=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -10257,7 +10257,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,F2e=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,z2e=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -10298,7 +10298,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,z2e=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,B2e=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -10313,25 +10313,25 @@ vec3 nonPerturbedNormal = normal;`,z2e=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,B2e=`#ifndef FLAT_SHADED +#endif`,k2e=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,k2e=`#ifndef FLAT_SHADED +#endif`,V2e=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,V2e=`#ifndef FLAT_SHADED +#endif`,G2e=`#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 +#endif`,H2e=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -10353,13 +10353,13 @@ vec3 nonPerturbedNormal = normal;`,z2e=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,H2e=`#ifdef USE_CLEARCOAT +#endif`,W2e=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,W2e=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,X2e=`#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 +#endif`,Y2e=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -10368,18 +10368,18 @@ vec3 nonPerturbedNormal = normal;`,z2e=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,Y2e=`#ifdef USE_IRIDESCENCEMAP +#endif`,q2e=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,q2e=`#ifdef OPAQUE +#endif`,Z2e=`#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 ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,j2e=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -10420,9 +10420,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } 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 +}`,K2e=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,K2e=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,J2e=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -10430,22 +10430,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,$2e=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,$2e=`#ifdef DITHERING +#endif`,Q2e=`#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; +#endif`,eIe=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,eIe=`#ifdef USE_ROUGHNESSMAP +#endif`,tIe=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,tIe=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,rIe=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -10622,7 +10622,7 @@ gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,rIe=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,iIe=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -10660,7 +10660,7 @@ gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING }; 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 ) +#endif`,nIe=`#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 @@ -10692,7 +10692,7 @@ gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,nIe=`float getShadowMask() { +#endif`,aIe=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -10724,12 +10724,12 @@ gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING #endif #endif return shadow; -}`,aIe=`#ifdef USE_SKINNING +}`,oIe=`#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 +#endif`,sIe=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -10744,7 +10744,7 @@ gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,sIe=`#ifdef USE_SKINNING +#endif`,lIe=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -10752,7 +10752,7 @@ gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,lIe=`#ifdef USE_SKINNING +#endif`,uIe=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -10763,17 +10763,17 @@ gl_Position = projectionMatrix * mvPosition;`,J2e=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,uIe=`float specularStrength; +#endif`,cIe=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,cIe=`#ifdef USE_SPECULARMAP +#endif`,fIe=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,fIe=`#if defined( TONE_MAPPING ) +#endif`,hIe=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,hIe=`#ifndef saturate +#endif`,pIe=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -10870,7 +10870,7 @@ vec3 NeutralToneMapping( vec3 color ) { 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 +vec3 CustomToneMapping( vec3 color ) { return color; }`,dIe=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -10891,7 +10891,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pIe=`#ifdef USE_TRANSMIS 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 +#endif`,mIe=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -10997,7 +10997,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pIe=`#ifdef USE_TRANSMIS 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 ) +#endif`,vIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -11067,7 +11067,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pIe=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,vIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,gIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -11161,7 +11161,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pIe=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,gIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,yIe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -11232,7 +11232,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pIe=`#ifdef USE_TRANSMIS #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 +#endif`,_Ie=`#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; @@ -11241,12 +11241,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,pIe=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`,_Ie=`varying vec2 vUv; +#endif`,xIe=`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; +}`,SIe=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -11258,14 +11258,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,SIe=`varying vec3 vWorldDirection; +}`,MIe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,MIe=`#ifdef ENVMAP_TYPE_CUBE +}`,bIe=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -11288,14 +11288,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,bIe=`varying vec3 vWorldDirection; +}`,wIe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,wIe=`uniform samplerCube tCube; +}`,TIe=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -11305,7 +11305,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,TIe=`#include +}`,EIe=`#include #include #include #include @@ -11332,7 +11332,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,EIe=`#if DEPTH_PACKING == 3200 +}`,AIe=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -11362,7 +11362,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,AIe=`#define DISTANCE +}`,CIe=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -11389,7 +11389,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,CIe=`#define DISTANCE +}`,RIe=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -11413,13 +11413,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,RIe=`varying vec3 vWorldDirection; +}`,LIe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,LIe=`uniform sampler2D tEquirect; +}`,PIe=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -11428,7 +11428,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,PIe=`uniform float scale; +}`,DIe=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -11450,7 +11450,7 @@ void main() { #include #include #include -}`,DIe=`uniform vec3 diffuse; +}`,IIe=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -11478,7 +11478,7 @@ void main() { #include #include #include -}`,IIe=`#include +}`,NIe=`#include #include #include #include @@ -11510,7 +11510,7 @@ void main() { #include #include #include -}`,NIe=`uniform vec3 diffuse; +}`,UIe=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -11558,7 +11558,7 @@ void main() { #include #include #include -}`,UIe=`#define LAMBERT +}`,OIe=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -11597,7 +11597,7 @@ void main() { #include #include #include -}`,OIe=`#define LAMBERT +}`,FIe=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -11654,7 +11654,7 @@ void main() { #include #include #include -}`,FIe=`#define MATCAP +}`,zIe=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -11688,7 +11688,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,zIe=`#define MATCAP +}`,BIe=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -11734,7 +11734,7 @@ void main() { #include #include #include -}`,BIe=`#define NORMAL +}`,kIe=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -11767,7 +11767,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,kIe=`#define NORMAL +}`,VIe=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -11789,7 +11789,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,VIe=`#define PHONG +}`,GIe=`#define PHONG varying vec3 vViewPosition; #include #include @@ -11828,7 +11828,7 @@ void main() { #include #include #include -}`,GIe=`#define PHONG +}`,HIe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -11887,7 +11887,7 @@ void main() { #include #include #include -}`,HIe=`#define STANDARD +}`,WIe=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -11930,7 +11930,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,WIe=`#define STANDARD +}`,XIe=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -12052,7 +12052,7 @@ void main() { #include #include #include -}`,XIe=`#define TOON +}`,YIe=`#define TOON varying vec3 vViewPosition; #include #include @@ -12089,7 +12089,7 @@ void main() { #include #include #include -}`,YIe=`#define TOON +}`,qIe=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -12142,7 +12142,7 @@ void main() { #include #include #include -}`,qIe=`uniform float size; +}`,ZIe=`uniform float size; uniform float scale; #include #include @@ -12173,7 +12173,7 @@ void main() { #include #include #include -}`,ZIe=`uniform vec3 diffuse; +}`,jIe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -12198,7 +12198,7 @@ void main() { #include #include #include -}`,jIe=`#include +}`,KIe=`#include #include #include #include @@ -12221,7 +12221,7 @@ void main() { #include #include #include -}`,KIe=`uniform vec3 color; +}`,JIe=`uniform vec3 color; uniform float opacity; #include #include @@ -12237,7 +12237,7 @@ void main() { #include #include #include -}`,JIe=`uniform float rotation; +}`,$Ie=`uniform float rotation; uniform vec2 center; #include #include @@ -12263,7 +12263,7 @@ void main() { #include #include #include -}`,$Ie=`uniform vec3 diffuse; +}`,QIe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -12288,7 +12288,7 @@ void main() { #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:` +}`,vr={alphahash_fragment:xDe,alphahash_pars_fragment:SDe,alphamap_fragment:MDe,alphamap_pars_fragment:bDe,alphatest_fragment:wDe,alphatest_pars_fragment:TDe,aomap_fragment:EDe,aomap_pars_fragment:ADe,batching_pars_vertex:CDe,batching_vertex:RDe,begin_vertex:LDe,beginnormal_vertex:PDe,bsdfs:DDe,iridescence_fragment:IDe,bumpmap_pars_fragment:NDe,clipping_planes_fragment:UDe,clipping_planes_pars_fragment:ODe,clipping_planes_pars_vertex:FDe,clipping_planes_vertex:zDe,color_fragment:BDe,color_pars_fragment:kDe,color_pars_vertex:VDe,color_vertex:GDe,common:HDe,cube_uv_reflection_fragment:WDe,defaultnormal_vertex:XDe,displacementmap_pars_vertex:YDe,displacementmap_vertex:qDe,emissivemap_fragment:ZDe,emissivemap_pars_fragment:jDe,colorspace_fragment:KDe,colorspace_pars_fragment:JDe,envmap_fragment:$De,envmap_common_pars_fragment:QDe,envmap_pars_fragment:e2e,envmap_pars_vertex:t2e,envmap_physical_pars_fragment:p2e,envmap_vertex:r2e,fog_vertex:i2e,fog_pars_vertex:n2e,fog_fragment:a2e,fog_pars_fragment:o2e,gradientmap_pars_fragment:s2e,lightmap_fragment:l2e,lightmap_pars_fragment:u2e,lights_lambert_fragment:c2e,lights_lambert_pars_fragment:f2e,lights_pars_begin:h2e,lights_toon_fragment:d2e,lights_toon_pars_fragment:m2e,lights_phong_fragment:v2e,lights_phong_pars_fragment:g2e,lights_physical_fragment:y2e,lights_physical_pars_fragment:_2e,lights_fragment_begin:x2e,lights_fragment_maps:S2e,lights_fragment_end:M2e,logdepthbuf_fragment:b2e,logdepthbuf_pars_fragment:w2e,logdepthbuf_pars_vertex:T2e,logdepthbuf_vertex:E2e,map_fragment:A2e,map_pars_fragment:C2e,map_particle_fragment:R2e,map_particle_pars_fragment:L2e,metalnessmap_fragment:P2e,metalnessmap_pars_fragment:D2e,morphinstance_vertex:I2e,morphcolor_vertex:N2e,morphnormal_vertex:U2e,morphtarget_pars_vertex:O2e,morphtarget_vertex:F2e,normal_fragment_begin:z2e,normal_fragment_maps:B2e,normal_pars_fragment:k2e,normal_pars_vertex:V2e,normal_vertex:G2e,normalmap_pars_fragment:H2e,clearcoat_normal_fragment_begin:W2e,clearcoat_normal_fragment_maps:X2e,clearcoat_pars_fragment:Y2e,iridescence_pars_fragment:q2e,opaque_fragment:Z2e,packing:j2e,premultiplied_alpha_fragment:K2e,project_vertex:J2e,dithering_fragment:$2e,dithering_pars_fragment:Q2e,roughnessmap_fragment:eIe,roughnessmap_pars_fragment:tIe,shadowmap_pars_fragment:rIe,shadowmap_pars_vertex:iIe,shadowmap_vertex:nIe,shadowmask_pars_fragment:aIe,skinbase_vertex:oIe,skinning_pars_vertex:sIe,skinning_vertex:lIe,skinnormal_vertex:uIe,specularmap_fragment:cIe,specularmap_pars_fragment:fIe,tonemapping_fragment:hIe,tonemapping_pars_fragment:pIe,transmission_fragment:dIe,transmission_pars_fragment:mIe,uv_pars_fragment:vIe,uv_pars_vertex:gIe,uv_vertex:yIe,worldpos_vertex:_Ie,background_vert:xIe,background_frag:SIe,backgroundCube_vert:MIe,backgroundCube_frag:bIe,cube_vert:wIe,cube_frag:TIe,depth_vert:EIe,depth_frag:AIe,distanceRGBA_vert:CIe,distanceRGBA_frag:RIe,equirect_vert:LIe,equirect_frag:PIe,linedashed_vert:DIe,linedashed_frag:IIe,meshbasic_vert:NIe,meshbasic_frag:UIe,meshlambert_vert:OIe,meshlambert_frag:FIe,meshmatcap_vert:zIe,meshmatcap_frag:BIe,meshnormal_vert:kIe,meshnormal_frag:VIe,meshphong_vert:GIe,meshphong_frag:HIe,meshphysical_vert:WIe,meshphysical_frag:XIe,meshtoon_vert:YIe,meshtoon_frag:qIe,points_vert:ZIe,points_frag:jIe,shadow_vert:KIe,shadow_frag:JIe,sprite_vert:$Ie,sprite_frag:QIe},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,eNe=new Ht;function tNe(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(eNe.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 rNe(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 aNe(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 ok(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,VB=new m0,uoe=new er,GB=null,HB=0,WB=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){GB=this._renderer.getRenderTarget(),HB=this._renderer.getActiveCubeFace(),WB=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,VB)}_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,VB)}};function sNe(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 lNe(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:Bk(),fragmentShader:` precision mediump float; precision mediump int; @@ -12348,7 +12348,7 @@ void main() { } } - `,blending:Dh,depthTest:!1,depthWrite:!1})}function hoe(){return new pu({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:zk(),fragmentShader:` + `,blending:Dh,depthTest:!1,depthWrite:!1})}function hoe(){return new pu({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Bk(),fragmentShader:` precision mediump float; precision mediump int; @@ -12367,7 +12367,7 @@ void main() { 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:` + `,blending:Dh,depthTest:!1,depthWrite:!1})}function poe(){return new pu({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Bk(),fragmentShader:` precision mediump float; precision mediump int; @@ -12383,7 +12383,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Dh,depthTest:!1,depthWrite:!1})}function zk(){return` + `,blending:Dh,depthTest:!1,depthWrite:!1})}function Bk(){return` precision mediump float; precision mediump int; @@ -12438,16 +12438,16 @@ void main() { 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;t0||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()+` +`)}function lUe(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 Fk: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);a/gm;function ck(r){return r.replace(mUe,gUe)}var vUe=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function gUe(r,e){let t=vr[e];if(t===void 0){let i=vUe.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 ck(t)}var yUe=/#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(yUe,_Ue)}function _Ue(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:"",` +`),_=[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?cUe("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",vr.colorspace_pars_fragment,uUe("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 +`)),o=ck(o),o=Moe(o,t),o=boe(o,t),s=ck(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(` @@ -12488,9 +12488,9 @@ 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() { +`+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=dUe(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,aUe)),E},this.destroy=function(){i.releaseStatesOfProgram(this),n.deleteProgram(m),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=oUe++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=S,this.fragmentShader=w,this}var EUe=0,fk=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 hk(e),t.set(e,i)),i}},hk=class{constructor(e){this.id=EUe++,this.code=e,this.usedTimes=0}};function AUe(r,e,t,i,n,a,o){let s=new fR,l=new fk,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===RPe,normalMapTangentSpace:Ue&&b.normalMapType===Ok,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=dDe.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||RUe),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 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={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 DUe(){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 IUe=0;function NUe(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function UUe(r,e){let t=new PUe,i=DUe(),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(NUe);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=IUe++)}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 pk=class extends Mc{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=APe,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}},dk=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}},FUe=`void main() { gl_Position = vec4( position, 1.0 ); -}`,FUe=`uniform sampler2D shadow_pass; +}`,zUe=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -12516,12 +12516,12 @@ void main() { 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=` +}`;function BUe(r,e,t){let i=new UM,n=new yr,a=new yr,o=new Pr,s=new pk({depthPacking:CPe}),l=new dk,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:FUe,fragmentShader:zUe}),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 rk(L.width)&&rk(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,[ek]:r.MIRRORED_REPEAT},J={[Dn]:r.NEAREST,[fae]:r.NEAREST_MIPMAP_NEAREST,[SM]:r.NEAREST_MIPMAP_LINEAR,[ao]:r.LINEAR,[mB]:r.LINEAR_MIPMAP_NEAREST,[fm]:r.LINEAR_MIPMAP_LINEAR},Q={[LPe]:r.NEVER,[OPe]:r.ALWAYS,[PPe]:r.LESS,[Qoe]:r.LEQUAL,[DPe]:r.EQUAL,[UPe]:r.GEQUAL,[IPe]:r.GREATER,[NPe]:r.NOTEQUAL};function V(z,L,ne){if(L.type===hu&&e.has("OES_texture_float_linear")===!1&&(L.magFilter===ao||L.magFilter===mB||L.magFilter===SM||L.magFilter===fm||L.minFilter===ao||L.minFilter===mB||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!==Uk&&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===tk||ne!==Hh&&ne!==Lh&&(Jr.getTransfer(ne)===ai?s===!1?e.has("EXT_sRGB")===!0&&le===As?(z.format=tk,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 GUe(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===yPe)return r.BYTE;if(a===_Pe)return r.SHORT;if(a===Uk)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===xPe)return r.ALPHA;if(a===As)return r.RGBA;if(a===SPe)return r.LUMINANCE;if(a===MPe)return r.LUMINANCE_ALPHA;if(a===pm)return r.DEPTH_COMPONENT;if(a===f0)return r.DEPTH_STENCIL;if(a===tk)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(a===bPe)return r.RED;if(a===joe)return r.RED_INTEGER;if(a===wPe)return r.RG;if(a===Koe)return r.RG_INTEGER;if(a===Joe)return r.RGBA_INTEGER;if(a===vB||a===gB||a===yB||a===_B)if(l===ai)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(a===vB)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(a===gB)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(a===yB)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(a===_B)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(a===vB)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===gB)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===yB)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===_B)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===xB||a===Dae||a===Iae)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(a===xB)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===TPe||a===Nae||a===Uae||a===Oae)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(a===xB)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 mk=class extends Nn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}},xc=class extends ia{constructor(){super(),this.isGroup=!0,this.type="Group"}},HUe={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(HUe)))}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]}},WUe=` void main() { gl_Position = vec4( position, 1.0 ); -}`,WUe=` +}`,XUe=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -12540,4 +12540,4 @@ void main() { } -}`,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}; +}`,vk=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:WUe,fragmentShader:XUe,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}},gk=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 vk,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 mk;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(YUe.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 ZUe(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 yk=class{constructor(e={}){let{canvas:t=JPe(),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===Fk?"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}},_k=class extends yk{};_k.prototype.isWebGL1Renderer=!0;var Roe=new ye,Loe=new Pr,Poe=new Pr,jUe=new ye,Doe=new Ht,jC=new ye,YB=new zh,Ioe=new Ht,qB=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 JUe={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=rOe(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===pOe(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&&sOe(r,i,n,a);let s=r,l,u;for(;r.prev!==r.next;){if(l=r.prev,u=r.next,a?QUe(r,i,n,a):$Ue(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=eOe(dm(r),e,t),FM(r,e,t,i,n,a,2)):o===2&&tOe(r,e,t,i,n,a):FM(dm(r),e,t,i,n,a,1);break}}}function $Ue(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 QUe(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=Sk(p,d,e,t,i),_=Sk(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 eOe(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 tOe(r,e,t,i,n,a){let o=r;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&cOe(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 rOe(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&&oOe(n,t)))&&(n=t,c=f)),t=t.next;while(t!==s);return n}function oOe(r,e){return Si(r.prev,r,e.prev)<0&&Si(e.next,r,r.next)<0}function sOe(r,e,t,i){let n=r;do n.z===0&&(n.z=Sk(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,lOe(n)}function lOe(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 Sk(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 uOe(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 cOe(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!fOe(r,e)&&(zM(r,e)&&zM(e,r)&&hOe(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 fOe(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 hOe(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 Mk(r.i,r.x,r.y),i=new Mk(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 Mk(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 Mk(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 pOe(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&&dOe(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()===SB,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 Ek=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 Ek(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=EPe){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(gOe(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:yOe,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={},Ck=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 Rk=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 Rk(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 jB=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(),jB.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(jB),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(jB)}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}},Lk=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 Lk}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,KB=new ye,Pk=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),KB.copy(i.position),KB.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(KB),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 Pk}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}},Dk=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 Dk}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(_Oe,"")}static parseTrackName(t){let i=TOe.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);EOe.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,Xk[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 POe=GM(HM,9,1);var DOe=GM(xse,5,1),Gk=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},Hk=function(r,e){var t=e/8|0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>(e&7)},IOe=function(r){return(r/8|0)+(r&7&&1)},NOe=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 Wk?Wk:Ps)(t-e);return i.set(r.subarray(e,t)),i},UOe=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=POe,f=DOe,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=Gk(D),p=Gk(U),c=GM(D,h,1),f=GM(U,p,1)}else throw"invalid block type";else{var m=IOe(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=LOe[V];if(V>3){var J=mse[V];U+=Hk(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 UOe((FOe(r),r.subarray(2,-4)),e)}var zOe=typeof TextDecoder<"u"&&new TextDecoder,BOe=0;try{zOe.decode(OOe,{stream:!0}),BOe=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 HOe(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)}}},jk=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]}},Jk=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],JOe(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=qk(a))}parseNodePropertyContinued(e){let t=this.getCurrentNode();t.a+=e,e.slice(-1)!==","&&(t.a=qk(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=qk(u);break}this.getPrevNode()[a]={type:o,type2:s,flag:l,value:u},this.setCurrentProp(this.getPrevNode(),a)}},$k=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 qOe(r){let e="Kaydara FBX Binary \0";return r.byteLength>=e.length&&e===Cse(r,0,e.length)}function ZOe(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(MV),this.animate=()=>{requestAnimationFrame(this.animate);let i=e3e.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(QOe,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 Dse=(()=>{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 NDt=[{path:"s1/:id",component:x$,data:{menu:null}},{path:"second1/:id",component:S$,data:{menu:null}},{path:"threejs/:id",component:Dse},{path:"t1/:id",component:Pse},{path:"lj-table",component:rL},{path:"lj-table",component:rL}];export{NDt as routes}; diff --git a/dist/himp.platform.angular/browser/chunk-OOUNO2UZ.js b/dist/himp.platform.angular/browser/chunk-WD6SV3WH.js similarity index 98% rename from dist/himp.platform.angular/browser/chunk-OOUNO2UZ.js rename to dist/himp.platform.angular/browser/chunk-WD6SV3WH.js index a1eee41..b17c571 100644 --- a/dist/himp.platform.angular/browser/chunk-OOUNO2UZ.js +++ b/dist/himp.platform.angular/browser/chunk-WD6SV3WH.js @@ -5,7 +5,7 @@ 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 || ${s} === "boolean" || ${i} === null`).assign(a,(0,Ct._)`[${i}]`)}}}function qB({gen:o,parentData:n,parentDataProperty:e},t){o.if((0,Ct._)`${n} !== undefined`,()=>o.assign((0,Ct._)`${n}[${e}]`,t))}function Kv(o,n,e,t=Nu.Correct){let i=t===Nu.Correct?Ct.operators.EQ:Ct.operators.NEQ,r;switch(o){case"null":return(0,Ct._)`${n} ${i} null`;case"array":r=(0,Ct._)`Array.isArray(${n})`;break;case"object":r=(0,Ct._)`${n} && typeof ${n} == "object" && !Array.isArray(${n})`;break;case"integer":r=s((0,Ct._)`!(${n} % 1) && !isNaN(${n})`);break;case"number":r=s();break;default:return(0,Ct._)`typeof ${n} ${i} ${o}`}return t===Nu.Correct?r:(0,Ct.not)(r);function s(a=Ct.nil){return(0,Ct.and)((0,Ct._)`typeof ${n} == "number"`,a,e?(0,Ct._)`isFinite(${n})`:Ct.nil)}}ui.checkDataType=Kv;function qv(o,n,e,t){if(o.length===1)return Kv(o[0],n,e,t);let i,r=(0,pE.toHash)(o);if(r.array&&r.object){let s=(0,Ct._)`typeof ${n} != "object"`;i=r.null?s:(0,Ct._)`!${n} || ${s}`,delete r.null,delete r.array,delete r.object}else i=Ct.nil;r.number&&delete r.integer;for(let s in r)i=(0,Ct.and)(i,Kv(s,n,e,t));return i}ui.checkDataTypes=qv;var YB={message:({schema:o})=>`must be ${o}`,params:({schema:o,schemaValue:n})=>typeof o=="string"?(0,Ct._)`{type: ${o}}`:(0,Ct._)`{type: ${n}}`};function Yv(o){let n=QB(o);(0,$B.reportError)(n,YB)}ui.reportTypeError=Yv;function QB(o){let{gen:n,data:e,schema:t}=o,i=(0,pE.schemaRefOrVal)(o,t,"type");return{gen:n,keyword:"type",data:e,schema:t.type,schemaCode:i,schemaValue:i,parentSchema:t,params:{},it:o}}});var mE=ke(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});Rh.assignDefaults=void 0;var pc=wt(),XB=jt();function ZB(o,n){let{properties:e,items:t}=o.schema;if(n==="object"&&e)for(let i in e)gE(o,i,e[i].default);else n==="array"&&Array.isArray(t)&&t.forEach((i,r)=>gE(o,r,i.default))}Rh.assignDefaults=ZB;function gE(o,n,e){let{gen:t,compositeRule:i,data:r,opts:s}=o;if(e===void 0)return;let a=(0,pc._)`${r}${(0,pc.getProperty)(n)}`;if(i){(0,XB.checkStrictMode)(o,`default is ignored for: ${a}`);return}let l=(0,pc._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,pc._)`${l} || ${a} === null || ${a} === ""`),t.if(l,(0,pc._)`${a} = ${(0,pc.stringify)(e)}`)}});var Gr=ke(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.validateUnion=sn.validateArray=sn.usePattern=sn.callValidateCode=sn.schemaProperties=sn.allSchemaProperties=sn.noPropertyInData=sn.propertyInData=sn.isOwnProperty=sn.hasPropFunc=sn.reportMissingProp=sn.checkMissingProp=sn.checkReportMissingProp=void 0;var wn=wt(),Qv=jt(),Us=gs(),JB=jt();function e$(o,n){let{gen:e,data:t,it:i}=o;e.if(Zv(e,t,n,i.opts.ownProperties),()=>{o.setParams({missingProperty:(0,wn._)`${n}`},!0),o.error()})}sn.checkReportMissingProp=e$;function t$({gen:o,data:n,it:{opts:e}},t,i){return(0,wn.or)(...t.map(r=>(0,wn.and)(Zv(o,n,r,e.ownProperties),(0,wn._)`${i} = ${r}`)))}sn.checkMissingProp=t$;function n$(o,n){o.setParams({missingProperty:n},!0),o.error()}sn.reportMissingProp=n$;function vE(o){return o.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,wn._)`Object.prototype.hasOwnProperty`})}sn.hasPropFunc=vE;function Xv(o,n,e){return(0,wn._)`${vE(o)}.call(${n}, ${e})`}sn.isOwnProperty=Xv;function i$(o,n,e,t){let i=(0,wn._)`${n}${(0,wn.getProperty)(e)} !== undefined`;return t?(0,wn._)`${i} && ${Xv(o,n,e)}`:i}sn.propertyInData=i$;function Zv(o,n,e,t){let i=(0,wn._)`${n}${(0,wn.getProperty)(e)} === undefined`;return t?(0,wn.or)(i,(0,wn.not)(Xv(o,n,e))):i}sn.noPropertyInData=Zv;function yE(o){return o?Object.keys(o).filter(n=>n!=="__proto__"):[]}sn.allSchemaProperties=yE;function r$(o,n){return yE(n).filter(e=>!(0,Qv.alwaysValidSchema)(o,n[e]))}sn.schemaProperties=r$;function o$({schemaCode:o,data:n,it:{gen:e,topSchemaRef:t,schemaPath:i,errorPath:r},it:s},a,l,c){let u=c?(0,wn._)`${o}, ${n}, ${t}${i}`:n,d=[[Us.default.instancePath,(0,wn.strConcat)(Us.default.instancePath,r)],[Us.default.parentData,s.parentData],[Us.default.parentDataProperty,s.parentDataProperty],[Us.default.rootData,Us.default.rootData]];s.opts.dynamicRef&&d.push([Us.default.dynamicAnchors,Us.default.dynamicAnchors]);let p=(0,wn._)`${u}, ${e.object(...d)}`;return l!==wn.nil?(0,wn._)`${a}.call(${l}, ${p})`:(0,wn._)`${a}(${p})`}sn.callValidateCode=o$;var s$=(0,wn._)`new RegExp`;function a$({gen:o,it:{opts:n}},e){let t=n.unicodeRegExp?"u":"",{regExp:i}=n.code,r=i(e,t);return o.scopeValue("pattern",{key:r.toString(),ref:r,code:(0,wn._)`${i.code==="new RegExp"?s$:(0,JB.useFunc)(o,i)}(${e}, ${t})`})}sn.usePattern=a$;function l$(o){let{gen:n,data:e,keyword:t,it:i}=o,r=n.name("valid");if(i.allErrors){let a=n.let("valid",!0);return s(()=>n.assign(a,!1)),a}return n.var(r,!0),s(()=>n.break()),r;function s(a){let l=n.const("len",(0,wn._)`${e}.length`);n.forRange("i",0,l,c=>{o.subschema({keyword:t,dataProp:c,dataPropType:Qv.Type.Num},r),n.if((0,wn.not)(r),a)})}}sn.validateArray=l$;function c$(o){let{gen:n,schema:e,keyword:t,it:i}=o;if(!Array.isArray(e))throw new Error("ajv implementation error");if(e.some(l=>(0,Qv.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=n.let("valid",!1),a=n.name("_valid");n.block(()=>e.forEach((l,c)=>{let u=o.subschema({keyword:t,schemaProp:c,compositeRule:!0},a);n.assign(s,(0,wn._)`${s} || ${a}`),o.mergeValidEvaluated(u,a)||n.if((0,wn.not)(s))})),o.result(s,()=>o.reset(),()=>o.error(!0))}sn.validateUnion=c$});var SE=ke(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.validateKeywordUsage=Ao.validSchemaType=Ao.funcKeywordCode=Ao.macroKeywordCode=void 0;var Fi=wt(),Ga=gs(),u$=Gr(),d$=Au();function p$(o,n){let{gen:e,keyword:t,schema:i,parentSchema:r,it:s}=o,a=n.macro.call(s.self,i,r,s),l=_E(e,t,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let c=e.name("valid");o.subschema({schema:a,schemaPath:Fi.nil,errSchemaPath:`${s.errSchemaPath}/${t}`,topSchemaRef:l,compositeRule:!0},c),o.pass(c,()=>o.error(!0))}Ao.macroKeywordCode=p$;function h$(o,n){var e;let{gen:t,keyword:i,schema:r,parentSchema:s,$data:a,it:l}=o;g$(l,n);let c=!a&&n.compile?n.compile.call(l.self,r,s,l):n.validate,u=_E(t,i,c),d=t.let("valid");o.block$data(d,p),o.ok((e=n.valid)!==null&&e!==void 0?e:d);function p(){if(n.errors===!1)y(),n.modifying&&CE(o),x(()=>o.error());else{let E=n.async?g():v();n.modifying&&CE(o),x(()=>f$(o,E))}}function g(){let E=t.let("ruleErrs",null);return t.try(()=>y((0,Fi._)`await `),z=>t.assign(d,!1).if((0,Fi._)`${z} instanceof ${l.ValidationError}`,()=>t.assign(E,(0,Fi._)`${z}.errors`),()=>t.throw(z))),E}function v(){let E=(0,Fi._)`${u}.errors`;return t.assign(E,null),y(Fi.nil),E}function y(E=n.async?(0,Fi._)`await `:Fi.nil){let z=l.opts.passContext?Ga.default.this:Ga.default.self,M=!("compile"in n&&!a||n.schema===!1);t.assign(d,(0,Fi._)`${E}${(0,u$.callValidateCode)(o,u,z,M)}`,n.modifying)}function x(E){var z;t.if((0,Fi.not)((z=n.valid)!==null&&z!==void 0?z:d),E)}}Ao.funcKeywordCode=h$;function CE(o){let{gen:n,data:e,it:t}=o;n.if(t.parentData,()=>n.assign(e,(0,Fi._)`${t.parentData}[${t.parentDataProperty}]`))}function f$(o,n){let{gen:e}=o;e.if((0,Fi._)`Array.isArray(${n})`,()=>{e.assign(Ga.default.vErrors,(0,Fi._)`${Ga.default.vErrors} === null ? ${n} : ${Ga.default.vErrors}.concat(${n})`).assign(Ga.default.errors,(0,Fi._)`${Ga.default.vErrors}.length`),(0,d$.extendErrors)(o)},()=>o.error())}function g$({schemaEnv:o},n){if(n.async&&!o.$async)throw new Error("async keyword in sync schema")}function _E(o,n,e){if(e===void 0)throw new Error(`keyword "${n}" failed to compile`);return o.scopeValue("keyword",typeof e=="function"?{ref:e}:{ref:e,code:(0,Fi.stringify)(e)})}function m$(o,n,e=!1){return!n.length||n.some(t=>t==="array"?Array.isArray(o):t==="object"?o&&typeof o=="object"&&!Array.isArray(o):typeof o==t||e&&typeof o>"u")}Ao.validSchemaType=m$;function v$({schema:o,opts:n,self:e,errSchemaPath:t},i,r){if(Array.isArray(i.keyword)?!i.keyword.includes(r):i.keyword!==r)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(o,a)))throw new Error(`parent schema must have dependencies of ${r}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(o[r])){let l=`keyword "${r}" value is invalid at path "${t}": `+e.errorsText(i.validateSchema.errors);if(n.validateSchema==="log")e.logger.error(l);else throw new Error(l)}}Ao.validateKeywordUsage=v$});var bE=ke(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.extendSubschemaMode=Ks.extendSubschemaData=Ks.getSubschema=void 0;var No=wt(),wE=jt();function y$(o,{keyword:n,schemaProp:e,schema:t,schemaPath:i,errSchemaPath:r,topSchemaRef:s}){if(n!==void 0&&t!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(n!==void 0){let a=o.schema[n];return e===void 0?{schema:a,schemaPath:(0,No._)`${o.schemaPath}${(0,No.getProperty)(n)}`,errSchemaPath:`${o.errSchemaPath}/${n}`}:{schema:a[e],schemaPath:(0,No._)`${o.schemaPath}${(0,No.getProperty)(n)}${(0,No.getProperty)(e)}`,errSchemaPath:`${o.errSchemaPath}/${n}/${(0,wE.escapeFragment)(e)}`}}if(t!==void 0){if(i===void 0||r===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:t,schemaPath:i,topSchemaRef:s,errSchemaPath:r}}throw new Error('either "keyword" or "schema" must be passed')}Ks.getSubschema=y$;function C$(o,n,{dataProp:e,dataPropType:t,data:i,dataTypes:r,propertyName:s}){if(i!==void 0&&e!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=n;if(e!==void 0){let{errorPath:c,dataPathArr:u,opts:d}=n,p=a.let("data",(0,No._)`${n.data}${(0,No.getProperty)(e)}`,!0);l(p),o.errorPath=(0,No.str)`${c}${(0,wE.getErrorPath)(e,t,d.jsPropertySyntax)}`,o.parentDataProperty=(0,No._)`${e}`,o.dataPathArr=[...u,o.parentDataProperty]}if(i!==void 0){let c=i instanceof No.Name?i:a.let("data",i,!0);l(c),s!==void 0&&(o.propertyName=s)}r&&(o.dataTypes=r);function l(c){o.data=c,o.dataLevel=n.dataLevel+1,o.dataTypes=[],n.definedProperties=new Set,o.parentData=n.data,o.dataNames=[...n.dataNames,c]}}Ks.extendSubschemaData=C$;function _$(o,{jtdDiscriminator:n,jtdMetadata:e,compositeRule:t,createErrors:i,allErrors:r}){t!==void 0&&(o.compositeRule=t),i!==void 0&&(o.createErrors=i),r!==void 0&&(o.allErrors=r),o.jtdDiscriminator=n,o.jtdMetadata=e}Ks.extendSubschemaMode=_$});var Jv=ke((lve,TE)=>{"use strict";TE.exports=function o(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;var t,i,r;if(Array.isArray(n)){if(t=n.length,t!=e.length)return!1;for(i=t;i--!==0;)if(!o(n[i],e[i]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if(r=Object.keys(n),t=r.length,t!==Object.keys(e).length)return!1;for(i=t;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,r[i]))return!1;for(i=t;i--!==0;){var s=r[i];if(!o(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}});var xE=ke((cve,EE)=>{"use strict";var qs=EE.exports=function(o,n,e){typeof n=="function"&&(e=n,n={}),e=n.cb||e;var t=typeof e=="function"?e:e.pre||function(){},i=e.post||function(){};Ih(n,t,i,o,"",o)};qs.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};qs.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};qs.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};qs.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ih(o,n,e,t,i,r,s,a,l,c){if(t&&typeof t=="object"&&!Array.isArray(t)){n(t,i,r,s,a,l,c);for(var u in t){var d=t[u];if(Array.isArray(d)){if(u in qs.arrayKeywords)for(var p=0;p{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.getSchemaRefs=Ui.resolveUrl=Ui.normalizeId=Ui._getFullPath=Ui.getFullPath=Ui.inlineRef=void 0;var w$=jt(),b$=Jv(),T$=xE(),E$=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function x$(o,n=!0){return typeof o=="boolean"?!0:n===!0?!ey(o):n?zE(o)<=n:!1}Ui.inlineRef=x$;var z$=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ey(o){for(let n in o){if(z$.has(n))return!0;let e=o[n];if(Array.isArray(e)&&e.some(ey)||typeof e=="object"&&ey(e))return!0}return!1}function zE(o){let n=0;for(let e in o){if(e==="$ref")return 1/0;if(n++,!E$.has(e)&&(typeof o[e]=="object"&&(0,w$.eachItem)(o[e],t=>n+=zE(t)),n===1/0))return 1/0}return n}function OE(o,n="",e){e!==!1&&(n=hc(n));let t=o.parse(n);return DE(o,t)}Ui.getFullPath=OE;function DE(o,n){return o.serialize(n).split("#")[0]+"#"}Ui._getFullPath=DE;var O$=/#\/?$/;function hc(o){return o?o.replace(O$,""):""}Ui.normalizeId=hc;function D$(o,n,e){return e=hc(e),o.resolve(n,e)}Ui.resolveUrl=D$;var R$=/^[a-z_][-a-z0-9._]*$/i;function I$(o,n){if(typeof o=="boolean")return{};let{schemaId:e,uriResolver:t}=this.opts,i=hc(o[e]||n),r={"":i},s=OE(t,i,!1),a={},l=new Set;return T$(o,{allKeys:!0},(d,p,g,v)=>{if(v===void 0)return;let y=s+p,x=r[v];typeof d[e]=="string"&&(x=E.call(this,d[e])),z.call(this,d.$anchor),z.call(this,d.$dynamicAnchor),r[p]=x;function E(M){let G=this.opts.uriResolver.resolve;if(M=hc(x?G(x,M):M),l.has(M))throw u(M);l.add(M);let U=this.refs[M];return typeof U=="string"&&(U=this.refs[U]),typeof U=="object"?c(d,U.schema,M):M!==hc(y)&&(M[0]==="#"?(c(d,a[M],M),a[M]=d):this.refs[M]=y),M}function z(M){if(typeof M=="string"){if(!R$.test(M))throw new Error(`invalid anchor "${M}"`);E.call(this,`#${M}`)}}}),a;function c(d,p,g){if(p!==void 0&&!b$(d,p))throw u(g)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Ui.getSchemaRefs=I$});var Hu=ke(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});Ys.getData=Ys.KeywordCxt=Ys.validateFunctionCode=void 0;var FE=cE(),RE=Lu(),ny=Uv(),Ph=Lu(),P$=mE(),Gu=SE(),ty=bE(),Ze=wt(),ut=gs(),M$=ku(),ms=jt(),Vu=Au();function F$(o){if(LE(o)&&(kE(o),NE(o))){L$(o);return}AE(o,()=>(0,FE.topBoolOrEmptySchema)(o))}Ys.validateFunctionCode=F$;function AE({gen:o,validateName:n,schema:e,schemaEnv:t,opts:i},r){i.code.es5?o.func(n,(0,Ze._)`${ut.default.data}, ${ut.default.valCxt}`,t.$async,()=>{o.code((0,Ze._)`"use strict"; ${IE(e,i)}`),N$(o,i),o.code(r)}):o.func(n,(0,Ze._)`${ut.default.data}, ${A$(i)}`,t.$async,()=>o.code(IE(e,i)).code(r))}function A$(o){return(0,Ze._)`{${ut.default.instancePath}="", ${ut.default.parentData}, ${ut.default.parentDataProperty}, ${ut.default.rootData}=${ut.default.data}${o.dynamicRef?(0,Ze._)`, ${ut.default.dynamicAnchors}={}`:Ze.nil}}={}`}function N$(o,n){o.if(ut.default.valCxt,()=>{o.var(ut.default.instancePath,(0,Ze._)`${ut.default.valCxt}.${ut.default.instancePath}`),o.var(ut.default.parentData,(0,Ze._)`${ut.default.valCxt}.${ut.default.parentData}`),o.var(ut.default.parentDataProperty,(0,Ze._)`${ut.default.valCxt}.${ut.default.parentDataProperty}`),o.var(ut.default.rootData,(0,Ze._)`${ut.default.valCxt}.${ut.default.rootData}`),n.dynamicRef&&o.var(ut.default.dynamicAnchors,(0,Ze._)`${ut.default.valCxt}.${ut.default.dynamicAnchors}`)},()=>{o.var(ut.default.instancePath,(0,Ze._)`""`),o.var(ut.default.parentData,(0,Ze._)`undefined`),o.var(ut.default.parentDataProperty,(0,Ze._)`undefined`),o.var(ut.default.rootData,ut.default.data),n.dynamicRef&&o.var(ut.default.dynamicAnchors,(0,Ze._)`{}`)})}function L$(o){let{schema:n,opts:e,gen:t}=o;AE(o,()=>{e.$comment&&n.$comment&&GE(o),B$(o),t.let(ut.default.vErrors,null),t.let(ut.default.errors,0),e.unevaluated&&k$(o),VE(o),W$(o)})}function k$(o){let{gen:n,validateName:e}=o;o.evaluated=n.const("evaluated",(0,Ze._)`${e}.evaluated`),n.if((0,Ze._)`${o.evaluated}.dynamicProps`,()=>n.assign((0,Ze._)`${o.evaluated}.props`,(0,Ze._)`undefined`)),n.if((0,Ze._)`${o.evaluated}.dynamicItems`,()=>n.assign((0,Ze._)`${o.evaluated}.items`,(0,Ze._)`undefined`))}function IE(o,n){let e=typeof o=="object"&&o[n.schemaId];return e&&(n.code.source||n.code.process)?(0,Ze._)`/*# sourceURL=${e} */`:Ze.nil}function V$(o,n){if(LE(o)&&(kE(o),NE(o))){G$(o,n);return}(0,FE.boolOrEmptySchema)(o,n)}function NE({schema:o,self:n}){if(typeof o=="boolean")return!o;for(let e in o)if(n.RULES.all[e])return!0;return!1}function LE(o){return typeof o.schema!="boolean"}function G$(o,n){let{schema:e,gen:t,opts:i}=o;i.$comment&&e.$comment&&GE(o),$$(o),j$(o);let r=t.const("_errs",ut.default.errors);VE(o,r),t.var(n,(0,Ze._)`${r} === ${ut.default.errors}`)}function kE(o){(0,ms.checkUnknownRules)(o),H$(o)}function VE(o,n){if(o.opts.jtd)return PE(o,[],!1,n);let e=(0,RE.getSchemaTypes)(o.schema),t=(0,RE.coerceAndCheckDataType)(o,e);PE(o,e,!t,n)}function H$(o){let{schema:n,errSchemaPath:e,opts:t,self:i}=o;n.$ref&&t.ignoreKeywordsWithRef&&(0,ms.schemaHasRulesButRef)(n,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${e}"`)}function B$(o){let{schema:n,opts:e}=o;n.default!==void 0&&e.useDefaults&&e.strictSchema&&(0,ms.checkStrictMode)(o,"default is ignored in the schema root")}function $$(o){let n=o.schema[o.opts.schemaId];n&&(o.baseId=(0,M$.resolveUrl)(o.opts.uriResolver,o.baseId,n))}function j$(o){if(o.schema.$async&&!o.schemaEnv.$async)throw new Error("async schema in sync schema")}function GE({gen:o,schemaEnv:n,schema:e,errSchemaPath:t,opts:i}){let r=e.$comment;if(i.$comment===!0)o.code((0,Ze._)`${ut.default.self}.logger.log(${r})`);else if(typeof i.$comment=="function"){let s=(0,Ze.str)`${t}/$comment`,a=o.scopeValue("root",{ref:n.root});o.code((0,Ze._)`${ut.default.self}.opts.$comment(${r}, ${s}, ${a}.schema)`)}}function W$(o){let{gen:n,schemaEnv:e,validateName:t,ValidationError:i,opts:r}=o;e.$async?n.if((0,Ze._)`${ut.default.errors} === 0`,()=>n.return(ut.default.data),()=>n.throw((0,Ze._)`new ${i}(${ut.default.vErrors})`)):(n.assign((0,Ze._)`${t}.errors`,ut.default.vErrors),r.unevaluated&&U$(o),n.return((0,Ze._)`${ut.default.errors} === 0`))}function U$({gen:o,evaluated:n,props:e,items:t}){e instanceof Ze.Name&&o.assign((0,Ze._)`${n}.props`,e),t instanceof Ze.Name&&o.assign((0,Ze._)`${n}.items`,t)}function PE(o,n,e,t){let{gen:i,schema:r,data:s,allErrors:a,opts:l,self:c}=o,{RULES:u}=c;if(r.$ref&&(l.ignoreKeywordsWithRef||!(0,ms.schemaHasRulesButRef)(r,u))){i.block(()=>BE(o,"$ref",u.all.$ref.definition));return}l.jtd||K$(o,n),i.block(()=>{for(let p of u.rules)d(p);d(u.post)});function d(p){(0,ny.shouldUseGroup)(r,p)&&(p.type?(i.if((0,Ph.checkDataType)(p.type,s,l.strictNumbers)),ME(o,p),n.length===1&&n[0]===p.type&&e&&(i.else(),(0,Ph.reportTypeError)(o)),i.endIf()):ME(o,p),a||i.if((0,Ze._)`${ut.default.errors} === ${t||0}`))}}function ME(o,n){let{gen:e,schema:t,opts:{useDefaults:i}}=o;i&&(0,P$.assignDefaults)(o,n.type),e.block(()=>{for(let r of n.rules)(0,ny.shouldUseRule)(t,r)&&BE(o,r.keyword,r.definition,n.type)})}function K$(o,n){o.schemaEnv.meta||!o.opts.strictTypes||(q$(o,n),o.opts.allowUnionTypes||Y$(o,n),Q$(o,o.dataTypes))}function q$(o,n){if(n.length){if(!o.dataTypes.length){o.dataTypes=n;return}n.forEach(e=>{HE(o.dataTypes,e)||iy(o,`type "${e}" not allowed by context "${o.dataTypes.join(",")}"`)}),Z$(o,n)}}function Y$(o,n){n.length>1&&!(n.length===2&&n.includes("null"))&&iy(o,"use allowUnionTypes to allow union type keyword")}function Q$(o,n){let e=o.self.RULES.all;for(let t in e){let i=e[t];if(typeof i=="object"&&(0,ny.shouldUseRule)(o.schema,i)){let{type:r}=i.definition;r.length&&!r.some(s=>X$(n,s))&&iy(o,`missing type "${r.join(",")}" for keyword "${t}"`)}}}function X$(o,n){return o.includes(n)||n==="number"&&o.includes("integer")}function HE(o,n){return o.includes(n)||n==="integer"&&o.includes("number")}function Z$(o,n){let e=[];for(let t of o.dataTypes)HE(n,t)?e.push(t):n.includes("integer")&&t==="number"&&e.push("integer");o.dataTypes=e}function iy(o,n){let e=o.schemaEnv.baseId+o.errSchemaPath;n+=` at "${e}" (strictTypes)`,(0,ms.checkStrictMode)(o,n,o.opts.strictTypes)}var Mh=class{constructor(n,e,t){if((0,Gu.validateKeywordUsage)(n,e,t),this.gen=n.gen,this.allErrors=n.allErrors,this.keyword=t,this.data=n.data,this.schema=n.schema[t],this.$data=e.$data&&n.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ms.schemaRefOrVal)(n,this.schema,t,this.$data),this.schemaType=e.schemaType,this.parentSchema=n.schema,this.params={},this.it=n,this.def=e,this.$data)this.schemaCode=n.gen.const("vSchema",$E(this.$data,n));else if(this.schemaCode=this.schemaValue,!(0,Gu.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${t} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:e.errors!==!1)&&(this.errsCount=n.gen.const("_errs",ut.default.errors))}result(n,e,t){this.failResult((0,Ze.not)(n),e,t)}failResult(n,e,t){this.gen.if(n),t?t():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(n,e){this.failResult((0,Ze.not)(n),void 0,e)}fail(n){if(n===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(n),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(n){if(!this.$data)return this.fail(n);let{schemaCode:e}=this;this.fail((0,Ze._)`${e} !== undefined && (${(0,Ze.or)(this.invalid$data(),n)})`)}error(n,e,t){if(e){this.setParams(e),this._error(n,t),this.setParams({});return}this._error(n,t)}_error(n,e){(n?Vu.reportExtraError:Vu.reportError)(this,this.def.error,e)}$dataError(){(0,Vu.reportError)(this,this.def.$dataError||Vu.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Vu.resetErrorsCount)(this.gen,this.errsCount)}ok(n){this.allErrors||this.gen.if(n)}setParams(n,e){e?Object.assign(this.params,n):this.params=n}block$data(n,e,t=Ze.nil){this.gen.block(()=>{this.check$data(n,t),e()})}check$data(n=Ze.nil,e=Ze.nil){if(!this.$data)return;let{gen:t,schemaCode:i,schemaType:r,def:s}=this;t.if((0,Ze.or)((0,Ze._)`${i} === undefined`,e)),n!==Ze.nil&&t.assign(n,!0),(r.length||s.validateSchema)&&(t.elseIf(this.invalid$data()),this.$dataError(),n!==Ze.nil&&t.assign(n,!1)),t.else()}invalid$data(){let{gen:n,schemaCode:e,schemaType:t,def:i,it:r}=this;return(0,Ze.or)(s(),a());function s(){if(t.length){if(!(e instanceof Ze.Name))throw new Error("ajv implementation error");let l=Array.isArray(t)?t:[t];return(0,Ze._)`${(0,Ph.checkDataTypes)(l,e,r.opts.strictNumbers,Ph.DataType.Wrong)}`}return Ze.nil}function a(){if(i.validateSchema){let l=n.scopeValue("validate$data",{ref:i.validateSchema});return(0,Ze._)`!${l}(${e})`}return Ze.nil}}subschema(n,e){let t=(0,ty.getSubschema)(this.it,n);(0,ty.extendSubschemaData)(t,this.it,n),(0,ty.extendSubschemaMode)(t,n);let i=ot(V(V({},this.it),t),{items:void 0,props:void 0});return V$(i,e),i}mergeEvaluated(n,e){let{it:t,gen:i}=this;t.opts.unevaluated&&(t.props!==!0&&n.props!==void 0&&(t.props=ms.mergeEvaluated.props(i,n.props,t.props,e)),t.items!==!0&&n.items!==void 0&&(t.items=ms.mergeEvaluated.items(i,n.items,t.items,e)))}mergeValidEvaluated(n,e){let{it:t,gen:i}=this;if(t.opts.unevaluated&&(t.props!==!0||t.items!==!0))return i.if(e,()=>this.mergeEvaluated(n,Ze.Name)),!0}};Ys.KeywordCxt=Mh;function BE(o,n,e,t){let i=new Mh(o,e,n);"code"in e?e.code(i,t):i.$data&&e.validate?(0,Gu.funcKeywordCode)(i,e):"macro"in e?(0,Gu.macroKeywordCode)(i,e):(e.compile||e.validate)&&(0,Gu.funcKeywordCode)(i,e)}var J$=/^\/(?:[^~]|~0|~1)*$/,ej=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function $E(o,{dataLevel:n,dataNames:e,dataPathArr:t}){let i,r;if(o==="")return ut.default.rootData;if(o[0]==="/"){if(!J$.test(o))throw new Error(`Invalid JSON-pointer: ${o}`);i=o,r=ut.default.rootData}else{let c=ej.exec(o);if(!c)throw new Error(`Invalid JSON-pointer: ${o}`);let u=+c[1];if(i=c[2],i==="#"){if(u>=n)throw new Error(l("property/index",u));return t[n-u]}if(u>n)throw new Error(l("data",u));if(r=e[n-u],!i)return r}let s=r,a=i.split("/");for(let c of a)c&&(r=(0,Ze._)`${r}${(0,Ze.getProperty)((0,ms.unescapeJsonPointer)(c))}`,s=(0,Ze._)`${s} && ${r}`);return s;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${n}`}}Ys.getData=$E});var Fh=ke(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});var ry=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}};oy.default=ry});var Ah=ke(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});var sy=ku(),ay=class extends Error{constructor(n,e,t,i){super(i||`can't resolve reference ${t} from id ${e}`),this.missingRef=(0,sy.resolveUrl)(n,e,t),this.missingSchema=(0,sy.normalizeId)((0,sy.getFullPath)(n,this.missingRef))}};ly.default=ay});var Lh=ke(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.resolveSchema=Hr.getCompilingSchema=Hr.resolveRef=Hr.compileSchema=Hr.SchemaEnv=void 0;var po=wt(),tj=Fh(),Ha=gs(),ho=ku(),jE=jt(),nj=Hu(),fc=class{constructor(n){var e;this.refs={},this.dynamicAnchors={};let t;typeof n.schema=="object"&&(t=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=(e=n.baseId)!==null&&e!==void 0?e:(0,ho.normalizeId)(t?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=t?.$async,this.refs={}}};Hr.SchemaEnv=fc;function uy(o){let n=WE.call(this,o);if(n)return n;let e=(0,ho.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:t,lines:i}=this.opts.code,{ownProperties:r}=this.opts,s=new po.CodeGen(this.scope,{es5:t,lines:i,ownProperties:r}),a;o.$async&&(a=s.scopeValue("Error",{ref:tj.default,code:(0,po._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");o.validateName=l;let c={gen:s,allErrors:this.opts.allErrors,data:Ha.default.data,parentData:Ha.default.parentData,parentDataProperty:Ha.default.parentDataProperty,dataNames:[Ha.default.data],dataPathArr:[po.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,po.stringify)(o.schema)}:{ref:o.schema}),validateName:l,ValidationError:a,schema:o.schema,schemaEnv:o,rootId:e,baseId:o.baseId||e,schemaPath:po.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,po._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(o),(0,nj.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);let d=s.toString();u=`${s.scopeRefs(Ha.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,o));let g=new Function(`${Ha.default.self}`,`${Ha.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:g}),g.errors=null,g.schema=o.schema,g.schemaEnv=o,o.$async&&(g.$async=!0),this.opts.code.source===!0&&(g.source={validateName:l,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:v,items:y}=c;g.evaluated={props:v instanceof po.Name?void 0:v,items:y instanceof po.Name?void 0:y,dynamicProps:v instanceof po.Name,dynamicItems:y instanceof po.Name},g.source&&(g.source.evaluated=(0,po.stringify)(g.evaluated))}return o.validate=g,o}catch(d){throw delete o.validate,delete o.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(o)}}Hr.compileSchema=uy;function ij(o,n,e){var t;e=(0,ho.resolveUrl)(this.opts.uriResolver,n,e);let i=o.refs[e];if(i)return i;let r=sj.call(this,o,e);if(r===void 0){let s=(t=o.localRefs)===null||t===void 0?void 0:t[e],{schemaId:a}=this.opts;s&&(r=new fc({schema:s,schemaId:a,root:o,baseId:n}))}if(r!==void 0)return o.refs[e]=rj.call(this,r)}Hr.resolveRef=ij;function rj(o){return(0,ho.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:uy.call(this,o)}function WE(o){for(let n of this._compilations)if(oj(n,o))return n}Hr.getCompilingSchema=WE;function oj(o,n){return o.schema===n.schema&&o.root===n.root&&o.baseId===n.baseId}function sj(o,n){let e;for(;typeof(e=this.refs[n])=="string";)n=e;return e||this.schemas[n]||Nh.call(this,o,n)}function Nh(o,n){let e=this.opts.uriResolver.parse(n),t=(0,ho._getFullPath)(this.opts.uriResolver,e),i=(0,ho.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&t===i)return cy.call(this,e,o);let r=(0,ho.normalizeId)(t),s=this.refs[r]||this.schemas[r];if(typeof s=="string"){let a=Nh.call(this,o,s);return typeof a?.schema!="object"?void 0:cy.call(this,e,a)}if(typeof s?.schema=="object"){if(s.validate||uy.call(this,s),r===(0,ho.normalizeId)(n)){let{schema:a}=s,{schemaId:l}=this.opts,c=a[l];return c&&(i=(0,ho.resolveUrl)(this.opts.uriResolver,i,c)),new fc({schema:a,schemaId:l,root:o,baseId:i})}return cy.call(this,e,s)}}Hr.resolveSchema=Nh;var aj=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function cy(o,{baseId:n,schema:e,root:t}){var i;if(((i=o.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of o.fragment.slice(1).split("/")){if(typeof e=="boolean")return;let l=e[(0,jE.unescapeFragment)(a)];if(l===void 0)return;e=l;let c=typeof e=="object"&&e[this.opts.schemaId];!aj.has(a)&&c&&(n=(0,ho.resolveUrl)(this.opts.uriResolver,n,c))}let r;if(typeof e!="boolean"&&e.$ref&&!(0,jE.schemaHasRulesButRef)(e,this.RULES)){let a=(0,ho.resolveUrl)(this.opts.uriResolver,n,e.$ref);r=Nh.call(this,t,a)}let{schemaId:s}=this.opts;if(r=r||new fc({schema:e,schemaId:s,root:t,baseId:n}),r.schema!==r.root.schema)return r}});var UE=ke((mve,lj)=>{lj.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var qE=ke((kh,KE)=>{"use strict";(function(o,n){typeof kh=="object"&&typeof KE<"u"?n(kh):typeof define=="function"&&define.amd?define(["exports"],n):n(o.URI=o.URI||{})})(kh,function(o){"use strict";function n(){for(var L=arguments.length,D=Array(L),$=0;$1){D[0]=D[0].slice(0,-1);for(var X=D.length-1,Z=1;Z= 0x80 (not a basic code point)","invalid-input":"Invalid input"},be=g-v,Ee=Math.floor,Te=String.fromCharCode;function rt(L){throw new RangeError(he[L])}function en(L,D){for(var $=[],X=L.length;X--;)$[X]=D(L[X]);return $}function dn(L,D){var $=L.split("@"),X="";$.length>1&&(X=$[0]+"@",L=$[1]),L=L.replace(ve,".");var Z=L.split("."),Le=en(Z,D).join(".");return X+Le}function Yt(L){for(var D=[],$=0,X=L.length;$=55296&&Z<=56319&&$>1,D+=Ee(D/$);D>be*y>>1;Z+=g)D=Ee(D/be);return Ee(Z+(be+1)*D/(D+x))},Rr=function(D){var $=[],X=D.length,Z=0,Le=M,vt=z,Ht=D.lastIndexOf(G);Ht<0&&(Ht=0);for(var Qt=0;Qt=128&&rt("not-basic"),$.push(D.charCodeAt(Qt));for(var Hn=Ht>0?Ht+1:0;Hn=X&&rt("invalid-input");var bn=Lt(D.charCodeAt(Hn++));(bn>=g||bn>Ee((p-Z)/Dn))&&rt("overflow"),Z+=bn*Dn;var Wt=Bn<=vt?v:Bn>=vt+y?y:Bn-vt;if(bnEe(p/Rn)&&rt("overflow"),Dn*=Rn}var rn=$.length+1;vt=ki(Z-kt,rn,kt==0),Ee(Z/rn)>p-Le&&rt("overflow"),Le+=Ee(Z/rn),Z%=rn,$.splice(Z++,0,Le)}return String.fromCodePoint.apply(String,$)},hl=function(D){var $=[];D=Yt(D);var X=D.length,Z=M,Le=0,vt=z,Ht=!0,Qt=!1,Hn=void 0;try{for(var kt=D[Symbol.iterator](),Dn;!(Ht=(Dn=kt.next()).done);Ht=!0){var Bn=Dn.value;Bn<128&&$.push(Te(Bn))}}catch(_a){Qt=!0,Hn=_a}finally{try{!Ht&&kt.return&&kt.return()}finally{if(Qt)throw Hn}}var bn=$.length,Wt=bn;for(bn&&$.push(G);Wt=Z&&arEe((p-Le)/Mr)&&rt("overflow"),Le+=(Rn-Z)*Mr,Z=Rn;var Eo=!0,Ca=!1,ts=void 0;try{for(var Xc=D[Symbol.iterator](),np;!(Eo=(np=Xc.next()).done);Eo=!0){var ip=np.value;if(ipp&&rt("overflow"),ip==Z){for(var yl=Le,Cl=g;;Cl+=g){var ns=Cl<=vt?v:Cl>=vt+y?y:Cl-vt;if(yl>6|192).toString(16).toUpperCase()+"%"+(D&63|128).toString(16).toUpperCase():$="%"+(D>>12|224).toString(16).toUpperCase()+"%"+(D>>6&63|128).toString(16).toUpperCase()+"%"+(D&63|128).toString(16).toUpperCase(),$}function gl(L){for(var D="",$=0,X=L.length;$=194&&Z<224){if(X-$>=6){var Le=parseInt(L.substr($+4,2),16);D+=String.fromCharCode((Z&31)<<6|Le&63)}else D+=L.substr($,6);$+=6}else if(Z>=224){if(X-$>=9){var vt=parseInt(L.substr($+4,2),16),Ht=parseInt(L.substr($+7,2),16);D+=String.fromCharCode((Z&15)<<12|(vt&63)<<6|Ht&63)}else D+=L.substr($,9);$+=9}else D+=L.substr($,3),$+=3}return D}function Gg(L,D){function $(X){var Z=gl(X);return Z.match(D.UNRESERVED)?Z:X}return L.scheme&&(L.scheme=String(L.scheme).replace(D.PCT_ENCODED,$).toLowerCase().replace(D.NOT_SCHEME,"")),L.userinfo!==void 0&&(L.userinfo=String(L.userinfo).replace(D.PCT_ENCODED,$).replace(D.NOT_USERINFO,wo).replace(D.PCT_ENCODED,i)),L.host!==void 0&&(L.host=String(L.host).replace(D.PCT_ENCODED,$).toLowerCase().replace(D.NOT_HOST,wo).replace(D.PCT_ENCODED,i)),L.path!==void 0&&(L.path=String(L.path).replace(D.PCT_ENCODED,$).replace(L.scheme?D.NOT_PATH:D.NOT_PATH_NOSCHEME,wo).replace(D.PCT_ENCODED,i)),L.query!==void 0&&(L.query=String(L.query).replace(D.PCT_ENCODED,$).replace(D.NOT_QUERY,wo).replace(D.PCT_ENCODED,i)),L.fragment!==void 0&&(L.fragment=String(L.fragment).replace(D.PCT_ENCODED,$).replace(D.NOT_FRAGMENT,wo).replace(D.PCT_ENCODED,i)),L}function Hg(L){return L.replace(/^0*(.*)/,"$1")||"0"}function Bg(L,D){var $=L.match(D.IPV4ADDRESS)||[],X=u($,2),Z=X[1];return Z?Z.split(".").map(Hg).join("."):L}function U0(L,D){var $=L.match(D.IPV6ADDRESS)||[],X=u($,3),Z=X[1],Le=X[2];if(Z){for(var vt=Z.toLowerCase().split("::").reverse(),Ht=u(vt,2),Qt=Ht[0],Hn=Ht[1],kt=Hn?Hn.split(":").map(Hg):[],Dn=Qt.split(":").map(Hg),Bn=D.IPV4ADDRESS.test(Dn[Dn.length-1]),bn=Bn?7:8,Wt=Dn.length-bn,Rn=Array(bn),rn=0;rn1){var an=Rn.slice(0,sr.index),ar=Rn.slice(sr.index+sr.length);Pr=an.join(":")+"::"+ar.join(":")}else Pr=Rn.join(":");return Le&&(Pr+="%"+Le),Pr}else return L}var hI=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,fI="".match(/(){0}/)[1]===void 0;function Jo(L){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$={},X=D.iri!==!1?c:l;D.reference==="suffix"&&(L=(D.scheme?D.scheme+":":"")+"//"+L);var Z=L.match(hI);if(Z){fI?($.scheme=Z[1],$.userinfo=Z[3],$.host=Z[4],$.port=parseInt(Z[5],10),$.path=Z[6]||"",$.query=Z[7],$.fragment=Z[8],isNaN($.port)&&($.port=Z[5])):($.scheme=Z[1]||void 0,$.userinfo=L.indexOf("@")!==-1?Z[3]:void 0,$.host=L.indexOf("//")!==-1?Z[4]:void 0,$.port=parseInt(Z[5],10),$.path=Z[6]||"",$.query=L.indexOf("?")!==-1?Z[7]:void 0,$.fragment=L.indexOf("#")!==-1?Z[8]:void 0,isNaN($.port)&&($.port=L.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Z[4]:void 0)),$.host&&($.host=U0(Bg($.host,X),X)),$.scheme===void 0&&$.userinfo===void 0&&$.host===void 0&&$.port===void 0&&!$.path&&$.query===void 0?$.reference="same-document":$.scheme===void 0?$.reference="relative":$.fragment===void 0?$.reference="absolute":$.reference="uri",D.reference&&D.reference!=="suffix"&&D.reference!==$.reference&&($.error=$.error||"URI is not a "+D.reference+" reference.");var Le=Ir[(D.scheme||$.scheme||"").toLowerCase()];if(!D.unicodeSupport&&(!Le||!Le.unicodeSupport)){if($.host&&(D.domainHost||Le&&Le.domainHost))try{$.host=fl.toASCII($.host.replace(X.PCT_ENCODED,gl).toLowerCase())}catch(vt){$.error=$.error||"Host's domain name can not be converted to ASCII via punycode: "+vt}Gg($,l)}else Gg($,X);Le&&Le.parse&&Le.parse($,D)}else $.error=$.error||"URI can not be parsed.";return $}function gI(L,D){var $=D.iri!==!1?c:l,X=[];return L.userinfo!==void 0&&(X.push(L.userinfo),X.push("@")),L.host!==void 0&&X.push(U0(Bg(String(L.host),$),$).replace($.IPV6ADDRESS,function(Z,Le,vt){return"["+Le+(vt?"%25"+vt:"")+"]"})),(typeof L.port=="number"||typeof L.port=="string")&&(X.push(":"),X.push(String(L.port))),X.length?X.join(""):void 0}var K0=/^\.\.?\//,q0=/^\/\.(\/|$)/,Y0=/^\/\.\.(\/|$)/,mI=/^\/?(?:.|\n)*?(?=\/|$)/;function ml(L){for(var D=[];L.length;)if(L.match(K0))L=L.replace(K0,"");else if(L.match(q0))L=L.replace(q0,"/");else if(L.match(Y0))L=L.replace(Y0,"/"),D.pop();else if(L==="."||L==="..")L="";else{var $=L.match(mI);if($){var X=$[0];L=L.slice(X.length),D.push(X)}else throw new Error("Unexpected dot segment condition")}return D.join("")}function bo(L){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=D.iri?c:l,X=[],Z=Ir[(D.scheme||L.scheme||"").toLowerCase()];if(Z&&Z.serialize&&Z.serialize(L,D),L.host&&!$.IPV6ADDRESS.test(L.host)){if(D.domainHost||Z&&Z.domainHost)try{L.host=D.iri?fl.toUnicode(L.host):fl.toASCII(L.host.replace($.PCT_ENCODED,gl).toLowerCase())}catch(Ht){L.error=L.error||"Host's domain name can not be converted to "+(D.iri?"Unicode":"ASCII")+" via punycode: "+Ht}}Gg(L,$),D.reference!=="suffix"&&L.scheme&&(X.push(L.scheme),X.push(":"));var Le=gI(L,D);if(Le!==void 0&&(D.reference!=="suffix"&&X.push("//"),X.push(Le),L.path&&L.path.charAt(0)!=="/"&&X.push("/")),L.path!==void 0){var vt=L.path;!D.absolutePath&&(!Z||!Z.absolutePath)&&(vt=ml(vt)),Le===void 0&&(vt=vt.replace(/^\/\//,"/%2F")),X.push(vt)}return L.query!==void 0&&(X.push("?"),X.push(L.query)),L.fragment!==void 0&&(X.push("#"),X.push(L.fragment)),X.join("")}function Q0(L,D){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},X=arguments[3],Z={};return X||(L=Jo(bo(L,$),$),D=Jo(bo(D,$),$)),$=$||{},!$.tolerant&&D.scheme?(Z.scheme=D.scheme,Z.userinfo=D.userinfo,Z.host=D.host,Z.port=D.port,Z.path=ml(D.path||""),Z.query=D.query):(D.userinfo!==void 0||D.host!==void 0||D.port!==void 0?(Z.userinfo=D.userinfo,Z.host=D.host,Z.port=D.port,Z.path=ml(D.path||""),Z.query=D.query):(D.path?(D.path.charAt(0)==="/"?Z.path=ml(D.path):((L.userinfo!==void 0||L.host!==void 0||L.port!==void 0)&&!L.path?Z.path="/"+D.path:L.path?Z.path=L.path.slice(0,L.path.lastIndexOf("/")+1)+D.path:Z.path=D.path,Z.path=ml(Z.path)),Z.query=D.query):(Z.path=L.path,D.query!==void 0?Z.query=D.query:Z.query=L.query),Z.userinfo=L.userinfo,Z.host=L.host,Z.port=L.port),Z.scheme=L.scheme),Z.fragment=D.fragment,Z}function vI(L,D,$){var X=s({scheme:"null"},$);return bo(Q0(Jo(L,X),Jo(D,X),X,!0),X)}function yI(L,D){return typeof L=="string"?L=bo(Jo(L,D),D):t(L)==="object"&&(L=Jo(bo(L,D),D)),L}function CI(L,D,$){return typeof L=="string"?L=bo(Jo(L,$),$):t(L)==="object"&&(L=bo(L,$)),typeof D=="string"?D=bo(Jo(D,$),$):t(D)==="object"&&(D=bo(D,$)),L===D}function _I(L,D){return L&&L.toString().replace(!D||!D.iri?l.ESCAPE:c.ESCAPE,wo)}function es(L,D){return L&&L.toString().replace(!D||!D.iri?l.PCT_ENCODED:c.PCT_ENCODED,gl)}var Yc={scheme:"http",domainHost:!0,parse:function(D,$){return D.host||(D.error=D.error||"HTTP URIs must have a host."),D},serialize:function(D,$){var X=String(D.scheme).toLowerCase()==="https";return(D.port===(X?443:80)||D.port==="")&&(D.port=void 0),D.path||(D.path="/"),D}},X0={scheme:"https",domainHost:Yc.domainHost,parse:Yc.parse,serialize:Yc.serialize};function Z0(L){return typeof L.secure=="boolean"?L.secure:String(L.scheme).toLowerCase()==="wss"}var Qc={scheme:"ws",domainHost:!0,parse:function(D,$){var X=D;return X.secure=Z0(X),X.resourceName=(X.path||"/")+(X.query?"?"+X.query:""),X.path=void 0,X.query=void 0,X},serialize:function(D,$){if((D.port===(Z0(D)?443:80)||D.port==="")&&(D.port=void 0),typeof D.secure=="boolean"&&(D.scheme=D.secure?"wss":"ws",D.secure=void 0),D.resourceName){var X=D.resourceName.split("?"),Z=u(X,2),Le=Z[0],vt=Z[1];D.path=Le&&Le!=="/"?Le:void 0,D.query=vt,D.resourceName=void 0}return D.fragment=void 0,D}},J0={scheme:"wss",domainHost:Qc.domainHost,parse:Qc.parse,serialize:Qc.serialize},SI={},wI=!0,eS="[A-Za-z0-9\\-\\.\\_\\~"+(wI?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",To="[0-9A-Fa-f]",bI=e(e("%[EFef]"+To+"%"+To+To+"%"+To+To)+"|"+e("%[89A-Fa-f]"+To+"%"+To+To)+"|"+e("%"+To+To)),TI="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",EI="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",xI=n(EI,'[\\"\\\\]'),zI="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",OI=new RegExp(eS,"g"),vl=new RegExp(bI,"g"),DI=new RegExp(n("[^]",TI,"[\\.]",'[\\"]',xI),"g"),tS=new RegExp(n("[^]",eS,zI),"g"),RI=tS;function $g(L){var D=gl(L);return D.match(OI)?D:L}var nS={scheme:"mailto",parse:function(D,$){var X=D,Z=X.to=X.path?X.path.split(","):[];if(X.path=void 0,X.query){for(var Le=!1,vt={},Ht=X.query.split("&"),Qt=0,Hn=Ht.length;Qt{"use strict";Object.defineProperty(dy,"__esModule",{value:!0});var YE=qE();YE.code='require("ajv/dist/runtime/uri").default';dy.default=YE});var rx=ke(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.CodeGen=di.Name=di.nil=di.stringify=di.str=di._=di.KeywordCxt=void 0;var cj=Hu();Object.defineProperty(di,"KeywordCxt",{enumerable:!0,get:function(){return cj.KeywordCxt}});var gc=wt();Object.defineProperty(di,"_",{enumerable:!0,get:function(){return gc._}});Object.defineProperty(di,"str",{enumerable:!0,get:function(){return gc.str}});Object.defineProperty(di,"stringify",{enumerable:!0,get:function(){return gc.stringify}});Object.defineProperty(di,"nil",{enumerable:!0,get:function(){return gc.nil}});Object.defineProperty(di,"Name",{enumerable:!0,get:function(){return gc.Name}});Object.defineProperty(di,"CodeGen",{enumerable:!0,get:function(){return gc.CodeGen}});var uj=Fh(),tx=Ah(),dj=Wv(),Bu=Lh(),pj=wt(),$u=ku(),Vh=Lu(),hy=jt(),XE=UE(),hj=QE(),nx=(o,n)=>new RegExp(o,n);nx.code="new RegExp";var fj=["removeAdditional","useDefaults","coerceTypes"],gj=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),mj={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},vj={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ZE=200;function yj(o){var n,e,t,i,r,s,a,l,c,u,d,p,g,v,y,x,E,z,M,G,U,se,ve,he,be;let Ee=o.strict,Te=(n=o.code)===null||n===void 0?void 0:n.optimize,rt=Te===!0||Te===void 0?1:Te||0,en=(t=(e=o.code)===null||e===void 0?void 0:e.regExp)!==null&&t!==void 0?t:nx,dn=(i=o.uriResolver)!==null&&i!==void 0?i:hj.default;return{strictSchema:(s=(r=o.strictSchema)!==null&&r!==void 0?r:Ee)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=o.strictNumbers)!==null&&a!==void 0?a:Ee)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=o.strictTypes)!==null&&c!==void 0?c:Ee)!==null&&u!==void 0?u:"log",strictTuples:(p=(d=o.strictTuples)!==null&&d!==void 0?d:Ee)!==null&&p!==void 0?p:"log",strictRequired:(v=(g=o.strictRequired)!==null&&g!==void 0?g:Ee)!==null&&v!==void 0?v:!1,code:o.code?ot(V({},o.code),{optimize:rt,regExp:en}):{optimize:rt,regExp:en},loopRequired:(y=o.loopRequired)!==null&&y!==void 0?y:ZE,loopEnum:(x=o.loopEnum)!==null&&x!==void 0?x:ZE,meta:(E=o.meta)!==null&&E!==void 0?E:!0,messages:(z=o.messages)!==null&&z!==void 0?z:!0,inlineRefs:(M=o.inlineRefs)!==null&&M!==void 0?M:!0,schemaId:(G=o.schemaId)!==null&&G!==void 0?G:"$id",addUsedSchema:(U=o.addUsedSchema)!==null&&U!==void 0?U:!0,validateSchema:(se=o.validateSchema)!==null&&se!==void 0?se:!0,validateFormats:(ve=o.validateFormats)!==null&&ve!==void 0?ve:!0,unicodeRegExp:(he=o.unicodeRegExp)!==null&&he!==void 0?he:!0,int32range:(be=o.int32range)!==null&&be!==void 0?be:!0,uriResolver:dn}}var ju=class{constructor(n={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,n=this.opts=V(V({},n),yj(n));let{es5:e,lines:t}=this.opts.code;this.scope=new pj.ValueScope({scope:{},prefixes:gj,es5:e,lines:t}),this.logger=Tj(n.logger);let i=n.validateFormats;n.validateFormats=!1,this.RULES=(0,dj.getRules)(),JE.call(this,mj,n,"NOT SUPPORTED"),JE.call(this,vj,n,"DEPRECATED","warn"),this._metaOpts=wj.call(this),n.formats&&_j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),n.keywords&&Sj.call(this,n.keywords),typeof n.meta=="object"&&this.addMetaSchema(n.meta),Cj.call(this),n.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:n,meta:e,schemaId:t}=this.opts,i=XE;t==="id"&&(i=V({},XE),i.id=i.$id,delete i.$id),e&&n&&this.addMetaSchema(i,i[t],!1)}defaultMeta(){let{meta:n,schemaId:e}=this.opts;return this.opts.defaultMeta=typeof n=="object"?n[e]||n:void 0}validate(n,e){let t;if(typeof n=="string"){if(t=this.getSchema(n),!t)throw new Error(`no schema with key or ref "${n}"`)}else t=this.compile(n);let i=t(e);return"$async"in t||(this.errors=t.errors),i}compile(n,e){let t=this._addSchema(n,e);return t.validate||this._compileSchemaEnv(t)}compileAsync(n,e){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:t}=this.opts;return i.call(this,n,e);function i(u,d){return xo(this,null,function*(){yield r.call(this,u.$schema);let p=this._addSchema(u,d);return p.validate||s.call(this,p)})}function r(u){return xo(this,null,function*(){u&&!this.getSchema(u)&&(yield i.call(this,{$ref:u},!0))})}function s(u){return xo(this,null,function*(){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof tx.default))throw d;return a.call(this,d),yield l.call(this,d.missingSchema),s.call(this,u)}})}function a({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}function l(u){return xo(this,null,function*(){let d=yield c.call(this,u);this.refs[u]||(yield r.call(this,d.$schema)),this.refs[u]||this.addSchema(d,u,e)})}function c(u){return xo(this,null,function*(){let d=this._loading[u];if(d)return d;try{return yield this._loading[u]=t(u)}finally{delete this._loading[u]}})}}addSchema(n,e,t,i=this.opts.validateSchema){if(Array.isArray(n)){for(let s of n)this.addSchema(s,void 0,t,i);return this}let r;if(typeof n=="object"){let{schemaId:s}=this.opts;if(r=n[s],r!==void 0&&typeof r!="string")throw new Error(`schema ${s} must be string`)}return e=(0,$u.normalizeId)(e||r),this._checkUnique(e),this.schemas[e]=this._addSchema(n,t,e,i,!0),this}addMetaSchema(n,e,t=this.opts.validateSchema){return this.addSchema(n,e,!0,t),this}validateSchema(n,e){if(typeof n=="boolean")return!0;let t;if(t=n.$schema,t!==void 0&&typeof t!="string")throw new Error("$schema must be a string");if(t=t||this.opts.defaultMeta||this.defaultMeta(),!t)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(t,n);if(!i&&e){let r="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(r);else throw new Error(r)}return i}getSchema(n){let e;for(;typeof(e=ex.call(this,n))=="string";)n=e;if(e===void 0){let{schemaId:t}=this.opts,i=new Bu.SchemaEnv({schema:{},schemaId:t});if(e=Bu.resolveSchema.call(this,i,n),!e)return;this.refs[n]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(n){if(n instanceof RegExp)return this._removeAllSchemas(this.schemas,n),this._removeAllSchemas(this.refs,n),this;switch(typeof n){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let e=ex.call(this,n);return typeof e=="object"&&this._cache.delete(e.schema),delete this.schemas[n],delete this.refs[n],this}case"object":{let e=n;this._cache.delete(e);let t=n[this.opts.schemaId];return t&&(t=(0,$u.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(n){for(let e of n)this.addKeyword(e);return this}addKeyword(n,e){let t;if(typeof n=="string")t=n,typeof e=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=t);else if(typeof n=="object"&&e===void 0){if(e=n,t=e.keyword,Array.isArray(t)&&!t.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(xj.call(this,t,e),!e)return(0,hy.eachItem)(t,r=>py.call(this,r)),this;Oj.call(this,e);let i=ot(V({},e),{type:(0,Vh.getJSONTypes)(e.type),schemaType:(0,Vh.getJSONTypes)(e.schemaType)});return(0,hy.eachItem)(t,i.type.length===0?r=>py.call(this,r,i):r=>i.type.forEach(s=>py.call(this,r,i,s))),this}getKeyword(n){let e=this.RULES.all[n];return typeof e=="object"?e.definition:!!e}removeKeyword(n){let{RULES:e}=this;delete e.keywords[n],delete e.all[n];for(let t of e.rules){let i=t.rules.findIndex(r=>r.keyword===n);i>=0&&t.rules.splice(i,1)}return this}addFormat(n,e){return typeof e=="string"&&(e=new RegExp(e)),this.formats[n]=e,this}errorsText(n=this.errors,{separator:e=", ",dataVar:t="data"}={}){return!n||n.length===0?"No errors":n.map(i=>`${t}${i.instancePath} ${i.message}`).reduce((i,r)=>i+e+r)}$dataMetaSchema(n,e){let t=this.RULES.all;n=JSON.parse(JSON.stringify(n));for(let i of e){let r=i.split("/").slice(1),s=n;for(let a of r)s=s[a];for(let a in t){let l=t[a];if(typeof l!="object")continue;let{$data:c}=l.definition,u=s[a];c&&u&&(s[a]=ix(u))}}return n}_removeAllSchemas(n,e){for(let t in n){let i=n[t];(!e||e.test(t))&&(typeof i=="string"?delete n[t]:i&&!i.meta&&(this._cache.delete(i.schema),delete n[t]))}}_addSchema(n,e,t,i=this.opts.validateSchema,r=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof n=="object")s=n[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof n!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(n);if(l!==void 0)return l;t=(0,$u.normalizeId)(s||t);let c=$u.getSchemaRefs.call(this,n,t);return l=new Bu.SchemaEnv({schema:n,schemaId:a,meta:e,baseId:t,localRefs:c}),this._cache.set(l.schema,l),r&&!t.startsWith("#")&&(t&&this._checkUnique(t),this.refs[t]=l),i&&this.validateSchema(n,!0),l}_checkUnique(n){if(this.schemas[n]||this.refs[n])throw new Error(`schema with key or id "${n}" already exists`)}_compileSchemaEnv(n){if(n.meta?this._compileMetaSchema(n):Bu.compileSchema.call(this,n),!n.validate)throw new Error("ajv implementation error");return n.validate}_compileMetaSchema(n){let e=this.opts;this.opts=this._metaOpts;try{Bu.compileSchema.call(this,n)}finally{this.opts=e}}};di.default=ju;ju.ValidationError=uj.default;ju.MissingRefError=tx.default;function JE(o,n,e,t="error"){for(let i in o){let r=i;r in n&&this.logger[t](`${e}: option ${i}. ${o[r]}`)}}function ex(o){return o=(0,$u.normalizeId)(o),this.schemas[o]||this.refs[o]}function Cj(){let o=this.opts.schemas;if(o)if(Array.isArray(o))this.addSchema(o);else for(let n in o)this.addSchema(o[n],n)}function _j(){for(let o in this.opts.formats){let n=this.opts.formats[o];n&&this.addFormat(o,n)}}function Sj(o){if(Array.isArray(o)){this.addVocabulary(o);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let n in o){let e=o[n];e.keyword||(e.keyword=n),this.addKeyword(e)}}function wj(){let o=V({},this.opts);for(let n of fj)delete o[n];return o}var bj={log(){},warn(){},error(){}};function Tj(o){if(o===!1)return bj;if(o===void 0)return console;if(o.log&&o.warn&&o.error)return o;throw new Error("logger must implement log, warn and error methods")}var Ej=/^[a-z_$][a-z0-9_$:-]*$/i;function xj(o,n){let{RULES:e}=this;if((0,hy.eachItem)(o,t=>{if(e.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!Ej.test(t))throw new Error(`Keyword ${t} has invalid name`)}),!!n&&n.$data&&!("code"in n||"validate"in n))throw new Error('$data keyword must have "code" or "validate" function')}function py(o,n,e){var t;let i=n?.post;if(e&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:r}=this,s=i?r.post:r.rules.find(({type:l})=>l===e);if(s||(s={type:e,rules:[]},r.rules.push(s)),r.keywords[o]=!0,!n)return;let a={keyword:o,definition:ot(V({},n),{type:(0,Vh.getJSONTypes)(n.type),schemaType:(0,Vh.getJSONTypes)(n.schemaType)})};n.before?zj.call(this,s,a,n.before):s.rules.push(a),r.all[o]=a,(t=n.implements)===null||t===void 0||t.forEach(l=>this.addKeyword(l))}function zj(o,n,e){let t=o.rules.findIndex(i=>i.keyword===e);t>=0?o.rules.splice(t,0,n):(o.rules.push(n),this.logger.warn(`rule ${e} is not defined`))}function Oj(o){let{metaSchema:n}=o;n!==void 0&&(o.$data&&this.opts.$data&&(n=ix(n)),o.validateSchema=this.compile(n,!0))}var Dj={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ix(o){return{anyOf:[o,Dj]}}});var ox=ke(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});var Rj={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};fy.default=Rj});var cx=ke(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.callRef=Ba.getValidate=void 0;var Ij=Ah(),sx=Gr(),Ki=wt(),mc=gs(),ax=Lh(),Gh=jt(),Pj={keyword:"$ref",schemaType:"string",code(o){let{gen:n,schema:e,it:t}=o,{baseId:i,schemaEnv:r,validateName:s,opts:a,self:l}=t,{root:c}=r;if((e==="#"||e==="#/")&&i===c.baseId)return d();let u=ax.resolveRef.call(l,c,i,e);if(u===void 0)throw new Ij.default(t.opts.uriResolver,i,e);if(u instanceof ax.SchemaEnv)return p(u);return g(u);function d(){if(r===c)return Hh(o,s,r,r.$async);let v=n.scopeValue("root",{ref:c});return Hh(o,(0,Ki._)`${v}.validate`,c,c.$async)}function p(v){let y=lx(o,v);Hh(o,y,v,v.$async)}function g(v){let y=n.scopeValue("schema",a.code.source===!0?{ref:v,code:(0,Ki.stringify)(v)}:{ref:v}),x=n.name("valid"),E=o.subschema({schema:v,dataTypes:[],schemaPath:Ki.nil,topSchemaRef:y,errSchemaPath:e},x);o.mergeEvaluated(E),o.ok(x)}}};function lx(o,n){let{gen:e}=o;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,Ki._)`${e.scopeValue("wrapper",{ref:n})}.validate`}Ba.getValidate=lx;function Hh(o,n,e,t){let{gen:i,it:r}=o,{allErrors:s,schemaEnv:a,opts:l}=r,c=l.passContext?mc.default.this:Ki.nil;t?u():d();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");let v=i.let("valid");i.try(()=>{i.code((0,Ki._)`await ${(0,sx.callValidateCode)(o,n,c)}`),g(n),s||i.assign(v,!0)},y=>{i.if((0,Ki._)`!(${y} instanceof ${r.ValidationError})`,()=>i.throw(y)),p(y),s||i.assign(v,!1)}),o.ok(v)}function d(){o.result((0,sx.callValidateCode)(o,n,c),()=>g(n),()=>p(n))}function p(v){let y=(0,Ki._)`${v}.errors`;i.assign(mc.default.vErrors,(0,Ki._)`${mc.default.vErrors} === null ? ${y} : ${mc.default.vErrors}.concat(${y})`),i.assign(mc.default.errors,(0,Ki._)`${mc.default.vErrors}.length`)}function g(v){var y;if(!r.opts.unevaluated)return;let x=(y=e?.validate)===null||y===void 0?void 0:y.evaluated;if(r.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(r.props=Gh.mergeEvaluated.props(i,x.props,r.props));else{let E=i.var("props",(0,Ki._)`${v}.evaluated.props`);r.props=Gh.mergeEvaluated.props(i,E,r.props,Ki.Name)}if(r.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(r.items=Gh.mergeEvaluated.items(i,x.items,r.items));else{let E=i.var("items",(0,Ki._)`${v}.evaluated.items`);r.items=Gh.mergeEvaluated.items(i,E,r.items,Ki.Name)}}}Ba.callRef=Hh;Ba.default=Pj});var ux=ke(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});var Mj=ox(),Fj=cx(),Aj=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Mj.default,Fj.default];gy.default=Aj});var dx=ke(my=>{"use strict";Object.defineProperty(my,"__esModule",{value:!0});var Bh=wt(),Qs=Bh.operators,$h={maximum:{okStr:"<=",ok:Qs.LTE,fail:Qs.GT},minimum:{okStr:">=",ok:Qs.GTE,fail:Qs.LT},exclusiveMaximum:{okStr:"<",ok:Qs.LT,fail:Qs.GTE},exclusiveMinimum:{okStr:">",ok:Qs.GT,fail:Qs.LTE}},Nj={message:({keyword:o,schemaCode:n})=>(0,Bh.str)`must be ${$h[o].okStr} ${n}`,params:({keyword:o,schemaCode:n})=>(0,Bh._)`{comparison: ${$h[o].okStr}, limit: ${n}}`},Lj={keyword:Object.keys($h),type:"number",schemaType:"number",$data:!0,error:Nj,code(o){let{keyword:n,data:e,schemaCode:t}=o;o.fail$data((0,Bh._)`${e} ${$h[n].fail} ${t} || isNaN(${e})`)}};my.default=Lj});var px=ke(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});var Wu=wt(),kj={message:({schemaCode:o})=>(0,Wu.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0,Wu._)`{multipleOf: ${o}}`},Vj={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:kj,code(o){let{gen:n,data:e,schemaCode:t,it:i}=o,r=i.opts.multipleOfPrecision,s=n.let("res"),a=r?(0,Wu._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${r}`:(0,Wu._)`${s} !== parseInt(${s})`;o.fail$data((0,Wu._)`(${t} === 0 || (${s} = ${e}/${t}, ${a}))`)}};vy.default=Vj});var fx=ke(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});function hx(o){let n=o.length,e=0,t=0,i;for(;t=55296&&i<=56319&&t{"use strict";Object.defineProperty(Cy,"__esModule",{value:!0});var $a=wt(),Gj=jt(),Hj=fx(),Bj={message({keyword:o,schemaCode:n}){let e=o==="maxLength"?"more":"fewer";return(0,$a.str)`must NOT have ${e} than ${n} characters`},params:({schemaCode:o})=>(0,$a._)`{limit: ${o}}`},$j={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Bj,code(o){let{keyword:n,data:e,schemaCode:t,it:i}=o,r=n==="maxLength"?$a.operators.GT:$a.operators.LT,s=i.opts.unicode===!1?(0,$a._)`${e}.length`:(0,$a._)`${(0,Gj.useFunc)(o.gen,Hj.default)}(${e})`;o.fail$data((0,$a._)`${s} ${r} ${t}`)}};Cy.default=$j});var mx=ke(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});var jj=Gr(),jh=wt(),Wj={message:({schemaCode:o})=>(0,jh.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,jh._)`{pattern: ${o}}`},Uj={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Wj,code(o){let{data:n,$data:e,schema:t,schemaCode:i,it:r}=o,s=r.opts.unicodeRegExp?"u":"",a=e?(0,jh._)`(new RegExp(${i}, ${s}))`:(0,jj.usePattern)(o,t);o.fail$data((0,jh._)`!${a}.test(${n})`)}};_y.default=Uj});var vx=ke(Sy=>{"use strict";Object.defineProperty(Sy,"__esModule",{value:!0});var Uu=wt(),Kj={message({keyword:o,schemaCode:n}){let e=o==="maxProperties"?"more":"fewer";return(0,Uu.str)`must NOT have ${e} than ${n} properties`},params:({schemaCode:o})=>(0,Uu._)`{limit: ${o}}`},qj={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Kj,code(o){let{keyword:n,data:e,schemaCode:t}=o,i=n==="maxProperties"?Uu.operators.GT:Uu.operators.LT;o.fail$data((0,Uu._)`Object.keys(${e}).length ${i} ${t}`)}};Sy.default=qj});var yx=ke(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0});var Ku=Gr(),qu=wt(),Yj=jt(),Qj={message:({params:{missingProperty:o}})=>(0,qu.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,qu._)`{missingProperty: ${o}}`},Xj={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Qj,code(o){let{gen:n,schema:e,schemaCode:t,data:i,$data:r,it:s}=o,{opts:a}=s;if(!r&&e.length===0)return;let l=e.length>=a.loopRequired;if(s.allErrors?c():u(),a.strictRequired){let g=o.parentSchema.properties,{definedProperties:v}=o.it;for(let y of e)if(g?.[y]===void 0&&!v.has(y)){let x=s.schemaEnv.baseId+s.errSchemaPath,E=`required property "${y}" is not defined at "${x}" (strictRequired)`;(0,Yj.checkStrictMode)(s,E,s.opts.strictRequired)}}function c(){if(l||r)o.block$data(qu.nil,d);else for(let g of e)(0,Ku.checkReportMissingProp)(o,g)}function u(){let g=n.let("missing");if(l||r){let v=n.let("valid",!0);o.block$data(v,()=>p(g,v)),o.ok(v)}else n.if((0,Ku.checkMissingProp)(o,e,g)),(0,Ku.reportMissingProp)(o,g),n.else()}function d(){n.forOf("prop",t,g=>{o.setParams({missingProperty:g}),n.if((0,Ku.noPropertyInData)(n,i,g,a.ownProperties),()=>o.error())})}function p(g,v){o.setParams({missingProperty:g}),n.forOf(g,t,()=>{n.assign(v,(0,Ku.propertyInData)(n,i,g,a.ownProperties)),n.if((0,qu.not)(v),()=>{o.error(),n.break()})},qu.nil)}}};wy.default=Xj});var Cx=ke(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var Yu=wt(),Zj={message({keyword:o,schemaCode:n}){let e=o==="maxItems"?"more":"fewer";return(0,Yu.str)`must NOT have ${e} than ${n} items`},params:({schemaCode:o})=>(0,Yu._)`{limit: ${o}}`},Jj={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Zj,code(o){let{keyword:n,data:e,schemaCode:t}=o,i=n==="maxItems"?Yu.operators.GT:Yu.operators.LT;o.fail$data((0,Yu._)`${e}.length ${i} ${t}`)}};by.default=Jj});var Wh=ke(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});var _x=Jv();_x.code='require("ajv/dist/runtime/equal").default';Ty.default=_x});var Sx=ke(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});var Ey=Lu(),pi=wt(),eW=jt(),tW=Wh(),nW={message:({params:{i:o,j:n}})=>(0,pi.str)`must NOT have duplicate items (items ## ${n} and ${o} are identical)`,params:({params:{i:o,j:n}})=>(0,pi._)`{i: ${o}, j: ${n}}`},iW={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:nW,code(o){let{gen:n,data:e,$data:t,schema:i,parentSchema:r,schemaCode:s,it:a}=o;if(!t&&!i)return;let l=n.let("valid"),c=r.items?(0,Ey.getSchemaTypes)(r.items):[];o.block$data(l,u,(0,pi._)`${s} === false`),o.ok(l);function u(){let v=n.let("i",(0,pi._)`${e}.length`),y=n.let("j");o.setParams({i:v,j:y}),n.assign(l,!0),n.if((0,pi._)`${v} > 1`,()=>(d()?p:g)(v,y))}function d(){return c.length>0&&!c.some(v=>v==="object"||v==="array")}function p(v,y){let x=n.name("item"),E=(0,Ey.checkDataTypes)(c,x,a.opts.strictNumbers,Ey.DataType.Wrong),z=n.const("indices",(0,pi._)`{}`);n.for((0,pi._)`;${v}--;`,()=>{n.let(x,(0,pi._)`${e}[${v}]`),n.if(E,(0,pi._)`continue`),c.length>1&&n.if((0,pi._)`typeof ${x} == "string"`,(0,pi._)`${x} += "_"`),n.if((0,pi._)`typeof ${z}[${x}] == "number"`,()=>{n.assign(y,(0,pi._)`${z}[${x}]`),o.error(),n.assign(l,!1).break()}).code((0,pi._)`${z}[${x}] = ${v}`)})}function g(v,y){let x=(0,eW.useFunc)(n,tW.default),E=n.name("outer");n.label(E).for((0,pi._)`;${v}--;`,()=>n.for((0,pi._)`${y} = ${v}; ${y}--;`,()=>n.if((0,pi._)`${x}(${e}[${v}], ${e}[${y}])`,()=>{o.error(),n.assign(l,!1).break(E)})))}}};xy.default=iW});var wx=ke(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});var zy=wt(),rW=jt(),oW=Wh(),sW={message:"must be equal to constant",params:({schemaCode:o})=>(0,zy._)`{allowedValue: ${o}}`},aW={keyword:"const",$data:!0,error:sW,code(o){let{gen:n,data:e,$data:t,schemaCode:i,schema:r}=o;t||r&&typeof r=="object"?o.fail$data((0,zy._)`!${(0,rW.useFunc)(n,oW.default)}(${e}, ${i})`):o.fail((0,zy._)`${r} !== ${e}`)}};Oy.default=aW});var bx=ke(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});var Qu=wt(),lW=jt(),cW=Wh(),uW={message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,Qu._)`{allowedValues: ${o}}`},dW={keyword:"enum",schemaType:"array",$data:!0,error:uW,code(o){let{gen:n,data:e,$data:t,schema:i,schemaCode:r,it:s}=o;if(!t&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,l,c=()=>l??(l=(0,lW.useFunc)(n,cW.default)),u;if(a||t)u=n.let("valid"),o.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let g=n.const("vSchema",r);u=(0,Qu.or)(...i.map((v,y)=>p(g,y)))}o.pass(u);function d(){n.assign(u,!1),n.forOf("v",r,g=>n.if((0,Qu._)`${c()}(${e}, ${g})`,()=>n.assign(u,!0).break()))}function p(g,v){let y=i[v];return typeof y=="object"&&y!==null?(0,Qu._)`${c()}(${e}, ${g}[${v}])`:(0,Qu._)`${e} === ${y}`}}};Dy.default=dW});var Tx=ke(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});var pW=dx(),hW=px(),fW=gx(),gW=mx(),mW=vx(),vW=yx(),yW=Cx(),CW=Sx(),_W=wx(),SW=bx(),wW=[pW.default,hW.default,fW.default,gW.default,mW.default,vW.default,yW.default,CW.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},_W.default,SW.default];Ry.default=wW});var Py=ke(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});Xu.validateAdditionalItems=void 0;var ja=wt(),Iy=jt(),bW={message:({params:{len:o}})=>(0,ja.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,ja._)`{limit: ${o}}`},TW={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:bW,code(o){let{parentSchema:n,it:e}=o,{items:t}=n;if(!Array.isArray(t)){(0,Iy.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas');return}Ex(o,t)}};function Ex(o,n){let{gen:e,schema:t,data:i,keyword:r,it:s}=o;s.items=!0;let a=e.const("len",(0,ja._)`${i}.length`);if(t===!1)o.setParams({len:n.length}),o.pass((0,ja._)`${a} <= ${n.length}`);else if(typeof t=="object"&&!(0,Iy.alwaysValidSchema)(s,t)){let c=e.var("valid",(0,ja._)`${a} <= ${n.length}`);e.if((0,ja.not)(c),()=>l(c)),o.ok(c)}function l(c){e.forRange("i",n.length,a,u=>{o.subschema({keyword:r,dataProp:u,dataPropType:Iy.Type.Num},c),s.allErrors||e.if((0,ja.not)(c),()=>e.break())})}}Xu.validateAdditionalItems=Ex;Xu.default=TW});var My=ke(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.validateTuple=void 0;var xx=wt(),Uh=jt(),EW=Gr(),xW={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){let{schema:n,it:e}=o;if(Array.isArray(n))return zx(o,"additionalItems",n);e.items=!0,!(0,Uh.alwaysValidSchema)(e,n)&&o.ok((0,EW.validateArray)(o))}};function zx(o,n,e=o.schema){let{gen:t,parentSchema:i,data:r,keyword:s,it:a}=o;u(i),a.opts.unevaluated&&e.length&&a.items!==!0&&(a.items=Uh.mergeEvaluated.items(t,e.length,a.items));let l=t.name("valid"),c=t.const("len",(0,xx._)`${r}.length`);e.forEach((d,p)=>{(0,Uh.alwaysValidSchema)(a,d)||(t.if((0,xx._)`${c} > ${p}`,()=>o.subschema({keyword:s,schemaProp:p,dataProp:p},l)),o.ok(l))});function u(d){let{opts:p,errSchemaPath:g}=a,v=e.length,y=v===d.minItems&&(v===d.maxItems||d[n]===!1);if(p.strictTuples&&!y){let x=`"${s}" is ${v}-tuple, but minItems or maxItems/${n} are not specified or different at path "${g}"`;(0,Uh.checkStrictMode)(a,x,p.strictTuples)}}}Zu.validateTuple=zx;Zu.default=xW});var Ox=ke(Fy=>{"use strict";Object.defineProperty(Fy,"__esModule",{value:!0});var zW=My(),OW={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,zW.validateTuple)(o,"items")};Fy.default=OW});var Rx=ke(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var Dx=wt(),DW=jt(),RW=Gr(),IW=Py(),PW={message:({params:{len:o}})=>(0,Dx.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,Dx._)`{limit: ${o}}`},MW={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:PW,code(o){let{schema:n,parentSchema:e,it:t}=o,{prefixItems:i}=e;t.items=!0,!(0,DW.alwaysValidSchema)(t,n)&&(i?(0,IW.validateAdditionalItems)(o,i):o.ok((0,RW.validateArray)(o)))}};Ay.default=MW});var Ix=ke(Ny=>{"use strict";Object.defineProperty(Ny,"__esModule",{value:!0});var Br=wt(),Kh=jt(),FW={message:({params:{min:o,max:n}})=>n===void 0?(0,Br.str)`must contain at least ${o} valid item(s)`:(0,Br.str)`must contain at least ${o} and no more than ${n} valid item(s)`,params:({params:{min:o,max:n}})=>n===void 0?(0,Br._)`{minContains: ${o}}`:(0,Br._)`{minContains: ${o}, maxContains: ${n}}`},AW={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:FW,code(o){let{gen:n,schema:e,parentSchema:t,data:i,it:r}=o,s,a,{minContains:l,maxContains:c}=t;r.opts.next?(s=l===void 0?1:l,a=c):s=1;let u=n.const("len",(0,Br._)`${i}.length`);if(o.setParams({min:s,max:a}),a===void 0&&s===0){(0,Kh.checkStrictMode)(r,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Kh.checkStrictMode)(r,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,Kh.alwaysValidSchema)(r,e)){let y=(0,Br._)`${u} >= ${s}`;a!==void 0&&(y=(0,Br._)`${y} && ${u} <= ${a}`),o.pass(y);return}r.items=!0;let d=n.name("valid");a===void 0&&s===1?g(d,()=>n.if(d,()=>n.break())):s===0?(n.let(d,!0),a!==void 0&&n.if((0,Br._)`${i}.length > 0`,p)):(n.let(d,!1),p()),o.result(d,()=>o.reset());function p(){let y=n.name("_valid"),x=n.let("count",0);g(y,()=>n.if(y,()=>v(x)))}function g(y,x){n.forRange("i",0,u,E=>{o.subschema({keyword:"contains",dataProp:E,dataPropType:Kh.Type.Num,compositeRule:!0},y),x()})}function v(y){n.code((0,Br._)`${y}++`),a===void 0?n.if((0,Br._)`${y} >= ${s}`,()=>n.assign(d,!0).break()):(n.if((0,Br._)`${y} > ${a}`,()=>n.assign(d,!1).break()),s===1?n.assign(d,!0):n.if((0,Br._)`${y} >= ${s}`,()=>n.assign(d,!0)))}}};Ny.default=AW});var Fx=ke(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.validateSchemaDeps=Lo.validatePropertyDeps=Lo.error=void 0;var Ly=wt(),NW=jt(),Ju=Gr();Lo.error={message:({params:{property:o,depsCount:n,deps:e}})=>{let t=n===1?"property":"properties";return(0,Ly.str)`must have ${t} ${e} when property ${o} is present`},params:({params:{property:o,depsCount:n,deps:e,missingProperty:t}})=>(0,Ly._)`{property: ${o}, missingProperty: ${t}, depsCount: ${n}, - deps: ${e}}`};var LW={keyword:"dependencies",type:"object",schemaType:"object",error:Lo.error,code(o){let[n,e]=kW(o);Px(o,n),Mx(o,e)}};function kW({schema:o}){let n={},e={};for(let t in o){if(t==="__proto__")continue;let i=Array.isArray(o[t])?n:e;i[t]=o[t]}return[n,e]}function Px(o,n=o.schema){let{gen:e,data:t,it:i}=o;if(Object.keys(n).length===0)return;let r=e.let("missing");for(let s in n){let a=n[s];if(a.length===0)continue;let l=(0,Ju.propertyInData)(e,t,s,i.opts.ownProperties);o.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?e.if(l,()=>{for(let c of a)(0,Ju.checkReportMissingProp)(o,c)}):(e.if((0,Ly._)`${l} && (${(0,Ju.checkMissingProp)(o,a,r)})`),(0,Ju.reportMissingProp)(o,r),e.else())}}Lo.validatePropertyDeps=Px;function Mx(o,n=o.schema){let{gen:e,data:t,keyword:i,it:r}=o,s=e.name("valid");for(let a in n)(0,NW.alwaysValidSchema)(r,n[a])||(e.if((0,Ju.propertyInData)(e,t,a,r.opts.ownProperties),()=>{let l=o.subschema({keyword:i,schemaProp:a},s);o.mergeValidEvaluated(l,s)},()=>e.var(s,!0)),o.ok(s))}Lo.validateSchemaDeps=Mx;Lo.default=LW});var Nx=ke(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});var Ax=wt(),VW=jt(),GW={message:"property name must be valid",params:({params:o})=>(0,Ax._)`{propertyName: ${o.propertyName}}`},HW={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:GW,code(o){let{gen:n,schema:e,data:t,it:i}=o;if((0,VW.alwaysValidSchema)(i,e))return;let r=n.name("valid");n.forIn("key",t,s=>{o.setParams({propertyName:s}),o.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},r),n.if((0,Ax.not)(r),()=>{o.error(!0),i.allErrors||n.break()})}),o.ok(r)}};ky.default=HW});var Gy=ke(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});var qh=Gr(),fo=wt(),BW=gs(),Yh=jt(),$W={message:"must NOT have additional properties",params:({params:o})=>(0,fo._)`{additionalProperty: ${o.additionalProperty}}`},jW={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:$W,code(o){let{gen:n,schema:e,parentSchema:t,data:i,errsCount:r,it:s}=o;if(!r)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,Yh.alwaysValidSchema)(s,e))return;let c=(0,qh.allSchemaProperties)(t.properties),u=(0,qh.allSchemaProperties)(t.patternProperties);d(),o.ok((0,fo._)`${r} === ${BW.default.errors}`);function d(){n.forIn("key",i,x=>{!c.length&&!u.length?v(x):n.if(p(x),()=>v(x))})}function p(x){let E;if(c.length>8){let z=(0,Yh.schemaRefOrVal)(s,t.properties,"properties");E=(0,qh.isOwnProperty)(n,z,x)}else c.length?E=(0,fo.or)(...c.map(z=>(0,fo._)`${x} === ${z}`)):E=fo.nil;return u.length&&(E=(0,fo.or)(E,...u.map(z=>(0,fo._)`${(0,qh.usePattern)(o,z)}.test(${x})`))),(0,fo.not)(E)}function g(x){n.code((0,fo._)`delete ${i}[${x}]`)}function v(x){if(l.removeAdditional==="all"||l.removeAdditional&&e===!1){g(x);return}if(e===!1){o.setParams({additionalProperty:x}),o.error(),a||n.break();return}if(typeof e=="object"&&!(0,Yh.alwaysValidSchema)(s,e)){let E=n.name("valid");l.removeAdditional==="failing"?(y(x,E,!1),n.if((0,fo.not)(E),()=>{o.reset(),g(x)})):(y(x,E),a||n.if((0,fo.not)(E),()=>n.break()))}}function y(x,E,z){let M={keyword:"additionalProperties",dataProp:x,dataPropType:Yh.Type.Str};z===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(M,E)}}};Vy.default=jW});var Vx=ke(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});var WW=Hu(),Lx=Gr(),Hy=jt(),kx=Gy(),UW={keyword:"properties",type:"object",schemaType:"object",code(o){let{gen:n,schema:e,parentSchema:t,data:i,it:r}=o;r.opts.removeAdditional==="all"&&t.additionalProperties===void 0&&kx.default.code(new WW.KeywordCxt(r,kx.default,"additionalProperties"));let s=(0,Lx.allSchemaProperties)(e);for(let d of s)r.definedProperties.add(d);r.opts.unevaluated&&s.length&&r.props!==!0&&(r.props=Hy.mergeEvaluated.props(n,(0,Hy.toHash)(s),r.props));let a=s.filter(d=>!(0,Hy.alwaysValidSchema)(r,e[d]));if(a.length===0)return;let l=n.name("valid");for(let d of a)c(d)?u(d):(n.if((0,Lx.propertyInData)(n,i,d,r.opts.ownProperties)),u(d),r.allErrors||n.else().var(l,!0),n.endIf()),o.it.definedProperties.add(d),o.ok(l);function c(d){return r.opts.useDefaults&&!r.compositeRule&&e[d].default!==void 0}function u(d){o.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};By.default=UW});var $x=ke($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});var Gx=Gr(),Qh=wt(),Hx=jt(),Bx=jt(),KW={keyword:"patternProperties",type:"object",schemaType:"object",code(o){let{gen:n,schema:e,data:t,parentSchema:i,it:r}=o,{opts:s}=r,a=(0,Gx.allSchemaProperties)(e),l=a.filter(y=>(0,Hx.alwaysValidSchema)(r,e[y]));if(a.length===0||l.length===a.length&&(!r.opts.unevaluated||r.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&i.properties,u=n.name("valid");r.props!==!0&&!(r.props instanceof Qh.Name)&&(r.props=(0,Bx.evaluatedPropsToName)(n,r.props));let{props:d}=r;p();function p(){for(let y of a)c&&g(y),r.allErrors?v(y):(n.var(u,!0),v(y),n.if(u))}function g(y){for(let x in c)new RegExp(y).test(x)&&(0,Hx.checkStrictMode)(r,`property ${x} matches pattern ${y} (use allowMatchingProperties)`)}function v(y){n.forIn("key",t,x=>{n.if((0,Qh._)`${(0,Gx.usePattern)(o,y)}.test(${x})`,()=>{let E=l.includes(y);E||o.subschema({keyword:"patternProperties",schemaProp:y,dataProp:x,dataPropType:Bx.Type.Str},u),r.opts.unevaluated&&d!==!0?n.assign((0,Qh._)`${d}[${x}]`,!0):!E&&!r.allErrors&&n.if((0,Qh.not)(u),()=>n.break())})})}}};$y.default=KW});var jx=ke(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});var qW=jt(),YW={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){let{gen:n,schema:e,it:t}=o;if((0,qW.alwaysValidSchema)(t,e)){o.fail();return}let i=n.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),o.failResult(i,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};jy.default=YW});var Wx=ke(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});var QW=Gr(),XW={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:QW.validateUnion,error:{message:"must match a schema in anyOf"}};Wy.default=XW});var Ux=ke(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});var Xh=wt(),ZW=jt(),JW={message:"must match exactly one schema in oneOf",params:({params:o})=>(0,Xh._)`{passingSchemas: ${o.passing}}`},eU={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:JW,code(o){let{gen:n,schema:e,parentSchema:t,it:i}=o;if(!Array.isArray(e))throw new Error("ajv implementation error");if(i.opts.discriminator&&t.discriminator)return;let r=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");o.setParams({passing:a}),n.block(c),o.result(s,()=>o.reset(),()=>o.error(!0));function c(){r.forEach((u,d)=>{let p;(0,ZW.alwaysValidSchema)(i,u)?n.var(l,!0):p=o.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&n.if((0,Xh._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Xh._)`[${a}, ${d}]`).else(),n.if(l,()=>{n.assign(s,!0),n.assign(a,d),p&&o.mergeEvaluated(p,Xh.Name)})})}}};Uy.default=eU});var Kx=ke(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});var tU=jt(),nU={keyword:"allOf",schemaType:"array",code(o){let{gen:n,schema:e,it:t}=o;if(!Array.isArray(e))throw new Error("ajv implementation error");let i=n.name("valid");e.forEach((r,s)=>{if((0,tU.alwaysValidSchema)(t,r))return;let a=o.subschema({keyword:"allOf",schemaProp:s},i);o.ok(i),o.mergeEvaluated(a)})}};Ky.default=nU});var Qx=ke(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});var Zh=wt(),Yx=jt(),iU={message:({params:o})=>(0,Zh.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,Zh._)`{failingKeyword: ${o.ifClause}}`},rU={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:iU,code(o){let{gen:n,parentSchema:e,it:t}=o;e.then===void 0&&e.else===void 0&&(0,Yx.checkStrictMode)(t,'"if" without "then" and "else" is ignored');let i=qx(t,"then"),r=qx(t,"else");if(!i&&!r)return;let s=n.let("valid",!0),a=n.name("_valid");if(l(),o.reset(),i&&r){let u=n.let("ifClause");o.setParams({ifClause:u}),n.if(a,c("then",u),c("else",u))}else i?n.if(a,c("then")):n.if((0,Zh.not)(a),c("else"));o.pass(s,()=>o.error(!0));function l(){let u=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);o.mergeEvaluated(u)}function c(u,d){return()=>{let p=o.subschema({keyword:u},a);n.assign(s,a),o.mergeValidEvaluated(p,s),d?n.assign(d,(0,Zh._)`${u}`):o.setParams({ifClause:u})}}}};function qx(o,n){let e=o.schema[n];return e!==void 0&&!(0,Yx.alwaysValidSchema)(o,e)}qy.default=rU});var Xx=ke(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});var oU=jt(),sU={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:n,it:e}){n.if===void 0&&(0,oU.checkStrictMode)(e,`"${o}" without "if" is ignored`)}};Yy.default=sU});var Zx=ke(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});var aU=Py(),lU=Ox(),cU=My(),uU=Rx(),dU=Ix(),pU=Fx(),hU=Nx(),fU=Gy(),gU=Vx(),mU=$x(),vU=jx(),yU=Wx(),CU=Ux(),_U=Kx(),SU=Qx(),wU=Xx();function bU(o=!1){let n=[vU.default,yU.default,CU.default,_U.default,SU.default,wU.default,hU.default,fU.default,pU.default,gU.default,mU.default];return o?n.push(lU.default,uU.default):n.push(aU.default,cU.default),n.push(dU.default),n}Qy.default=bU});var Jx=ke(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});var Vn=wt(),TU={message:({schemaCode:o})=>(0,Vn.str)`must match format "${o}"`,params:({schemaCode:o})=>(0,Vn._)`{format: ${o}}`},EU={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:TU,code(o,n){let{gen:e,data:t,$data:i,schema:r,schemaCode:s,it:a}=o,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=a;if(!l.validateFormats)return;i?p():g();function p(){let v=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),y=e.const("fDef",(0,Vn._)`${v}[${s}]`),x=e.let("fType"),E=e.let("format");e.if((0,Vn._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>e.assign(x,(0,Vn._)`${y}.type || "string"`).assign(E,(0,Vn._)`${y}.validate`),()=>e.assign(x,(0,Vn._)`"string"`).assign(E,y)),o.fail$data((0,Vn.or)(z(),M()));function z(){return l.strictSchema===!1?Vn.nil:(0,Vn._)`${s} && !${E}`}function M(){let G=u.$async?(0,Vn._)`(${y}.async ? await ${E}(${t}) : ${E}(${t}))`:(0,Vn._)`${E}(${t})`,U=(0,Vn._)`(typeof ${E} == "function" ? ${G} : ${E}.test(${t}))`;return(0,Vn._)`${E} && ${E} !== true && ${x} === ${n} && !${U}`}}function g(){let v=d.formats[r];if(!v){z();return}if(v===!0)return;let[y,x,E]=M(v);y===n&&o.pass(G());function z(){if(l.strictSchema===!1){d.logger.warn(U());return}throw new Error(U());function U(){return`unknown format "${r}" ignored in schema at path "${c}"`}}function M(U){let se=U instanceof RegExp?(0,Vn.regexpCode)(U):l.code.formats?(0,Vn._)`${l.code.formats}${(0,Vn.getProperty)(r)}`:void 0,ve=e.scopeValue("formats",{key:r,ref:U,code:se});return typeof U=="object"&&!(U instanceof RegExp)?[U.type||"string",U.validate,(0,Vn._)`${ve}.validate`]:["string",U,ve]}function G(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Vn._)`await ${E}(${t})`}return typeof x=="function"?(0,Vn._)`${E}(${t})`:(0,Vn._)`${E}.test(${t})`}}}};Xy.default=EU});var ez=ke(Zy=>{"use strict";Object.defineProperty(Zy,"__esModule",{value:!0});var xU=Jx(),zU=[xU.default];Zy.default=zU});var tz=ke(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.contentVocabulary=vc.metadataVocabulary=void 0;vc.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];vc.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var iz=ke(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});var OU=ux(),DU=Tx(),RU=Zx(),IU=ez(),nz=tz(),PU=[OU.default,DU.default,(0,RU.default)(),IU.default,nz.metadataVocabulary,nz.contentVocabulary];Jy.default=PU});var rz=ke(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.DiscrError=void 0;var MU;(function(o){o.Tag="tag",o.Mapping="mapping"})(MU=ed.DiscrError||(ed.DiscrError={}))});var sz=ke(tC=>{"use strict";Object.defineProperty(tC,"__esModule",{value:!0});var yc=wt(),eC=rz(),oz=Lh(),FU=jt(),AU={message:({params:{discrError:o,tagName:n}})=>o===eC.DiscrError.Tag?`tag "${n}" must be string`:`value of tag "${n}" must be in oneOf`,params:({params:{discrError:o,tag:n,tagName:e}})=>(0,yc._)`{error: ${o}, tag: ${e}, tagValue: ${n}}`},NU={keyword:"discriminator",type:"object",schemaType:"object",error:AU,code(o){let{gen:n,data:e,schema:t,parentSchema:i,it:r}=o,{oneOf:s}=i;if(!r.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=t.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(t.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=n.let("valid",!1),c=n.const("tag",(0,yc._)`${e}${(0,yc.getProperty)(a)}`);n.if((0,yc._)`typeof ${c} == "string"`,()=>u(),()=>o.error(!1,{discrError:eC.DiscrError.Tag,tag:c,tagName:a})),o.ok(l);function u(){let g=p();n.if(!1);for(let v in g)n.elseIf((0,yc._)`${c} === ${v}`),n.assign(l,d(g[v]));n.else(),o.error(!1,{discrError:eC.DiscrError.Mapping,tag:c,tagName:a}),n.endIf()}function d(g){let v=n.name("valid"),y=o.subschema({keyword:"oneOf",schemaProp:g},v);return o.mergeEvaluated(y,yc.Name),v}function p(){var g;let v={},y=E(i),x=!0;for(let G=0;G{LU.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var nC=ke((Pn,cz)=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.MissingRefError=Pn.ValidationError=Pn.CodeGen=Pn.Name=Pn.nil=Pn.stringify=Pn.str=Pn._=Pn.KeywordCxt=void 0;var kU=rx(),VU=iz(),GU=sz(),lz=az(),HU=["/properties"],Jh="http://json-schema.org/draft-07/schema",ef=class extends kU.default{_addVocabularies(){super._addVocabularies(),VU.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(GU.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(lz,HU):lz;this.addMetaSchema(n,Jh,!1),this.refs["http://json-schema.org/schema"]=Jh}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Jh)?Jh:void 0)}};cz.exports=Pn=ef;Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=ef;var BU=Hu();Object.defineProperty(Pn,"KeywordCxt",{enumerable:!0,get:function(){return BU.KeywordCxt}});var Cc=wt();Object.defineProperty(Pn,"_",{enumerable:!0,get:function(){return Cc._}});Object.defineProperty(Pn,"str",{enumerable:!0,get:function(){return Cc.str}});Object.defineProperty(Pn,"stringify",{enumerable:!0,get:function(){return Cc.stringify}});Object.defineProperty(Pn,"nil",{enumerable:!0,get:function(){return Cc.nil}});Object.defineProperty(Pn,"Name",{enumerable:!0,get:function(){return Cc.Name}});Object.defineProperty(Pn,"CodeGen",{enumerable:!0,get:function(){return Cc.CodeGen}});var $U=Fh();Object.defineProperty(Pn,"ValidationError",{enumerable:!0,get:function(){return $U.default}});var jU=Ah();Object.defineProperty(Pn,"MissingRefError",{enumerable:!0,get:function(){return jU.default}})});var gz=ke(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.formatNames=ko.fastFormats=ko.fullFormats=void 0;function _c(o,n){return{validate:o,compare:n}}ko.fullFormats={date:_c(pz,oC),time:_c(hz,sC),"date-time":_c(qU,fz),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:XU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:r4,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:ZU,int32:{type:"number",validate:t4},int64:{type:"number",validate:n4},float:{type:"number",validate:dz},double:{type:"number",validate:dz},password:!0,binary:!0};ko.fastFormats=ot(V({},ko.fullFormats),{date:_c(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,oC),time:_c(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,sC),"date-time":_c(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,fz),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});ko.formatNames=Object.keys(ko.fullFormats);function WU(o){return o%4===0&&(o%100!==0||o%400===0)}var UU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,KU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function pz(o){let n=UU.exec(o);if(!n)return!1;let e=+n[1],t=+n[2],i=+n[3];return t>=1&&t<=12&&i>=1&&i<=(t===2&&WU(e)?29:KU[t])}function oC(o,n){if(o&&n)return o>n?1:on?1:o=JU}function n4(o){return Number.isInteger(o)}function dz(){return!0}var i4=/[^\\]\\Z/;function r4(o){if(i4.test(o))return!1;try{return new RegExp(o),!0}catch{return!1}}});var mz=ke(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.formatLimitDefinition=void 0;var o4=nC(),go=wt(),Xs=go.operators,tf={formatMaximum:{okStr:"<=",ok:Xs.LTE,fail:Xs.GT},formatMinimum:{okStr:">=",ok:Xs.GTE,fail:Xs.LT},formatExclusiveMaximum:{okStr:"<",ok:Xs.LT,fail:Xs.GTE},formatExclusiveMinimum:{okStr:">",ok:Xs.GT,fail:Xs.LTE}},s4={message:({keyword:o,schemaCode:n})=>go.str`should be ${tf[o].okStr} ${n}`,params:({keyword:o,schemaCode:n})=>go._`{comparison: ${tf[o].okStr}, limit: ${n}}`};Sc.formatLimitDefinition={keyword:Object.keys(tf),type:"string",schemaType:"string",$data:!0,error:s4,code(o){let{gen:n,data:e,schemaCode:t,keyword:i,it:r}=o,{opts:s,self:a}=r;if(!s.validateFormats)return;let l=new o4.KeywordCxt(r,a.RULES.all.format.definition,"format");l.$data?c():u();function c(){let p=n.scopeValue("formats",{ref:a.formats,code:s.code.formats}),g=n.const("fmt",go._`${p}[${l.schemaCode}]`);o.fail$data(go.or(go._`typeof ${g} != "object"`,go._`${g} instanceof RegExp`,go._`typeof ${g}.compare != "function"`,d(g)))}function u(){let p=l.schema,g=a.formats[p];if(!g||g===!0)return;if(typeof g!="object"||g instanceof RegExp||typeof g.compare!="function")throw new Error(`"${i}": format "${p}" does not define "compare" function`);let v=n.scopeValue("formats",{key:p,ref:g,code:s.code.formats?go._`${s.code.formats}${go.getProperty(p)}`:void 0});o.fail$data(d(v))}function d(p){return go._`${p}.compare(${e}, ${t}) ${tf[i].fail} 0`}},dependencies:["format"]};var a4=o=>(o.addKeyword(Sc.formatLimitDefinition),o);Sc.default=a4});var _z=ke((td,Cz)=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var wc=gz(),l4=mz(),aC=wt(),vz=new aC.Name("fullFormats"),c4=new aC.Name("fastFormats"),lC=(o,n={keywords:!0})=>{if(Array.isArray(n))return yz(o,n,wc.fullFormats,vz),o;let[e,t]=n.mode==="fast"?[wc.fastFormats,c4]:[wc.fullFormats,vz],i=n.formats||wc.formatNames;return yz(o,i,e,t),n.keywords&&l4.default(o),o};lC.get=(o,n="full")=>{let t=(n==="fast"?wc.fastFormats:wc.fullFormats)[o];if(!t)throw new Error(`Unknown format "${o}"`);return t};function yz(o,n,e,t){var i,r;(i=(r=o.opts.code).formats)!==null&&i!==void 0||(r.formats=aC._`require("ajv-formats/dist/formats").${t}`);for(let s of n)o.addFormat(s,e[s])}Cz.exports=td=lC;Object.defineProperty(td,"__esModule",{value:!0});td.default=lC});var fr=(()=>{let n=class n{};n.SLOW="0.3s",n.BASE="0.2s",n.FAST="0.1s";let o=n;return o})(),Ci=(()=>{let n=class n{};n.EASE_BASE_OUT="cubic-bezier(0.7, 0.3, 0.1, 1)",n.EASE_BASE_IN="cubic-bezier(0.9, 0, 0.3, 0.7)",n.EASE_OUT="cubic-bezier(0.215, 0.61, 0.355, 1)",n.EASE_IN="cubic-bezier(0.55, 0.055, 0.675, 0.19)",n.EASE_IN_OUT="cubic-bezier(0.645, 0.045, 0.355, 1)",n.EASE_OUT_BACK="cubic-bezier(0.12, 0.4, 0.29, 1.46)",n.EASE_IN_BACK="cubic-bezier(0.71, -0.46, 0.88, 0.6)",n.EASE_IN_OUT_BACK="cubic-bezier(0.71, -0.46, 0.29, 1.46)",n.EASE_OUT_CIRC="cubic-bezier(0.08, 0.82, 0.17, 1)",n.EASE_IN_CIRC="cubic-bezier(0.6, 0.04, 0.98, 0.34)",n.EASE_IN_OUT_CIRC="cubic-bezier(0.78, 0.14, 0.15, 0.86)",n.EASE_OUT_QUINT="cubic-bezier(0.23, 1, 0.32, 1)",n.EASE_IN_QUINT="cubic-bezier(0.755, 0.05, 0.855, 0.06)",n.EASE_IN_OUT_QUINT="cubic-bezier(0.86, 0, 0.07, 1)";let o=n;return o})(),_w=Ar("collapseMotion",[pr("expanded",pt({height:"*"})),pr("collapsed",pt({height:0,overflow:"hidden"})),pr("hidden",pt({height:0,overflow:"hidden",borderTopWidth:"0"})),Sn("expanded => collapsed",mn(`150ms ${Ci.EASE_IN_OUT}`)),Sn("expanded => hidden",mn(`150ms ${Ci.EASE_IN_OUT}`)),Sn("collapsed => expanded",mn(`150ms ${Ci.EASE_IN_OUT}`)),Sn("hidden => expanded",mn(`150ms ${Ci.EASE_IN_OUT}`))]),Sw=Ar("treeCollapseMotion",[Sn("* => *",[rm("nz-tree-node:leave,nz-tree-builtin-node:leave",[pt({overflow:"hidden"}),om(0,[mn(`150ms ${Ci.EASE_IN_OUT}`,pt({height:0,opacity:0,"padding-bottom":0}))])],{optional:!0}),rm("nz-tree-node:enter,nz-tree-builtin-node:enter",[pt({overflow:"hidden",height:0,opacity:0,"padding-bottom":0}),om(0,[mn(`150ms ${Ci.EASE_IN_OUT}`,pt({overflow:"hidden",height:"*",opacity:"*","padding-bottom":"*"}))])],{optional:!0})])]),ww=Ar("fadeMotion",[Sn(":enter",[pt({opacity:0}),mn(`${fr.BASE}`,pt({opacity:1}))]),Sn(":leave",[pt({opacity:1}),mn(`${fr.BASE}`,pt({opacity:0}))])]),jl=Ar("helpMotion",[Sn(":enter",[pt({opacity:0,transform:"translateY(-5px)"}),mn(`${fr.SLOW} ${Ci.EASE_IN_OUT}`,pt({opacity:1,transform:"translateY(0)"}))]),Sn(":leave",[pt({opacity:1,transform:"translateY(0)"}),mn(`${fr.SLOW} ${Ci.EASE_IN_OUT}`,pt({opacity:0,transform:"translateY(-5px)"}))])]),bw=Ar("moveUpMotion",[Sn("* => enter",[pt({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}),mn(`${fr.BASE}`,pt({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}))]),Sn("* => leave",[pt({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}),mn(`${fr.BASE}`,pt({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}))])]),Tw=Ar("notificationMotion",[pr("enterRight",pt({opacity:1,transform:"translateX(0)"})),Sn("* => enterRight",[pt({opacity:0,transform:"translateX(5%)"}),mn("100ms linear")]),pr("enterLeft",pt({opacity:1,transform:"translateX(0)"})),Sn("* => enterLeft",[pt({opacity:0,transform:"translateX(-5%)"}),mn("100ms linear")]),pr("enterTop",pt({opacity:1,transform:"translateY(0)"})),Sn("* => enterTop",[pt({opacity:0,transform:"translateY(-5%)"}),mn("100ms linear")]),pr("enterBottom",pt({opacity:1,transform:"translateY(0)"})),Sn("* => enterBottom",[pt({opacity:0,transform:"translateY(5%)"}),mn("100ms linear")]),pr("leave",pt({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"})),Sn("* => leave",[pt({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),mn("100ms linear")])]),GI=`${fr.BASE} ${Ci.EASE_OUT_QUINT}`,HI=`${fr.BASE} ${Ci.EASE_IN_QUINT}`,Mo=Ar("slideMotion",[pr("void",pt({opacity:0,transform:"scaleY(0.8)"})),pr("enter",pt({opacity:1,transform:"scaleY(1)"})),Sn("void => *",[mn(GI)]),Sn("* => void",[mn(HI)])]),Ew=Ar("slideAlertMotion",[Sn(":leave",[pt({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),mn(`${fr.SLOW} ${Ci.EASE_IN_OUT_CIRC}`,pt({opacity:0,transform:"scaleY(0)",transformOrigin:"0% 0%"}))])]),Is=Ar("zoomBigMotion",[Sn("void => active",[pt({opacity:0,transform:"scale(0.8)"}),mn(`${fr.BASE} ${Ci.EASE_OUT_CIRC}`,pt({opacity:1,transform:"scale(1)"}))]),Sn("active => void",[pt({opacity:1,transform:"scale(1)"}),mn(`${fr.BASE} ${Ci.EASE_IN_OUT_CIRC}`,pt({opacity:0,transform:"scale(0.8)"}))])]),dm=Ar("zoomBadgeMotion",[Sn(":enter",[pt({opacity:0,transform:"scale(0) translate(50%, -50%)"}),mn(`${fr.SLOW} ${Ci.EASE_OUT_BACK}`,pt({opacity:1,transform:"scale(1) translate(50%, -50%)"}))]),Sn(":leave",[pt({opacity:1,transform:"scale(1) translate(50%, -50%)"}),mn(`${fr.SLOW} ${Ci.EASE_IN_BACK}`,pt({opacity:0,transform:"scale(0) translate(50%, -50%)"}))])]),Xre=Ar("thumbMotion",[pr("from",pt({transform:"translateX({{ transform }}px)",width:"{{ width }}px"}),{params:{transform:0,width:0}}),pr("to",pt({transform:"translateX({{ transform }}px)",width:"{{ width }}px"}),{params:{transform:100,width:0}}),Sn("from => to",mn(`300ms ${Ci.EASE_IN_OUT}`))]);var pm=()=>{},uu=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.rendererFactory2=i,this.resizeSource$=new J,this.listeners=0,this.disposeHandle=pm,this.handler=()=>{this.ngZone.run(()=>{this.resizeSource$.next()})},this.renderer=this.rendererFactory2.createRenderer(null,null)}ngOnDestroy(){this.handler=pm}subscribe(){return this.registerListener(),this.resizeSource$.pipe(zs(16),El(()=>this.unregisterListener()))}unsubscribe(){this.unregisterListener()}registerListener(){this.listeners===0&&this.ngZone.runOutsideAngular(()=>{this.disposeHandle=this.renderer.listen("window","resize",this.handler)}),this.listeners+=1}unregisterListener(){this.listeners-=1,this.listeners===0&&(this.disposeHandle(),this.disposeHandle=pm)}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(ES))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),$I=new Map,Dp=(()=>{let n=class n{constructor(){this._singletonRegistry=new Map}get singletonRegistry(){return KS.isTestMode?$I:this._singletonRegistry}registerSingletonWithKey(t,i){let r=this.singletonRegistry.has(t),s=r?this.singletonRegistry.get(t):this.withNewTarget(i);r||this.singletonRegistry.set(t,s)}unregisterSingletonWithKey(t){this.singletonRegistry.has(t)&&this.singletonRegistry.delete(t)}getSingletonWithKey(t){return this.singletonRegistry.has(t)?this.singletonRegistry.get(t).target:null}withNewTarget(t){return{target:t}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();function jI(o,n,e,t){let i=e-n,r=o/(t/2);return r<1?i/2*r*r*r+n:i/2*((r-=2)*r*r+2)+n}var xw=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.doc=i}setScrollTop(t,i=0){t===window?(this.doc.body.scrollTop=i,this.doc.documentElement.scrollTop=i):t.scrollTop=i}getOffset(t){let i={top:0,left:0};if(!t||!t.getClientRects().length)return i;let r=t.getBoundingClientRect();if(r.width||r.height){let s=t.ownerDocument.documentElement;i.top=r.top-s.clientTop,i.left=r.left-s.clientLeft}else i.top=r.top,i.left=r.left;return i}getScroll(t,i=!0){if(typeof window>"u")return 0;let r=i?"scrollTop":"scrollLeft",s=0;return this.isWindow(t)?s=t[i?"pageYOffset":"pageXOffset"]:t instanceof Document?s=t.documentElement[r]:t&&(s=t[r]),t&&!this.isWindow(t)&&typeof s!="number"&&(s=(t.ownerDocument||t).documentElement[r]),s}isWindow(t){return t!=null&&t===t.window}scrollTo(t,i=0,r={}){let s=t||window,a=this.getScroll(s),l=Date.now(),{easing:c,callback:u,duration:d=450}=r,p=()=>{let v=Date.now()-l,y=(c||jI)(v>d?d:v,a,i,d);this.isWindow(s)?s.scrollTo(window.pageXOffset,y):s instanceof HTMLDocument||s.constructor.name==="HTMLDocument"?s.documentElement.scrollTop=y:s.scrollTop=y,vto(p))}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(gi))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),Rp=function(o){return o.xxl="xxl",o.xl="xl",o.lg="lg",o.md="md",o.sm="sm",o.xs="xs",o}(Rp||{}),xa={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"};var Ip=(()=>{let n=class n{constructor(t,i){this.resizeService=t,this.mediaMatcher=i,this.destroy$=new J,this.resizeService.subscribe().pipe(F(this.destroy$)).subscribe(()=>{})}ngOnDestroy(){this.destroy$.next()}subscribe(t,i){if(i){let r=()=>this.matchMedia(t,!0);return this.resizeService.subscribe().pipe(We(r),Ot(r()),Bt((s,a)=>s[0]===a[0]),We(s=>s[1]))}else{let r=()=>this.matchMedia(t);return this.resizeService.subscribe().pipe(We(r),Ot(r()),Bt())}}matchMedia(t,i){let r=Rp.md,s={};return Object.keys(t).map(a=>{let l=a,c=this.mediaMatcher.matchMedia(xa[l]).matches;s[a]=c,c&&(r=l)}),i?[r,s]:r}};n.\u0275fac=function(i){return new(i||n)(nt(uu),nt(yp))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),Pt=(()=>{let n=class n extends J{ngOnDestroy(){this.next(),this.complete()}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();function WI(o,n){o&1&&R(0,"span",10)}function UI(o,n){o&1&&R(0,"span",11)}function KI(o,n){o&1&&R(0,"span",12)}function qI(o,n){o&1&&R(0,"span",13)}function YI(o,n){o&1&&R(0,"span",14)}function QI(o,n){if(o&1&&(H(0),R(1,"span",15),B()),o&2){let e=m();f(),h("innerHTML",e.instance.content,Dt)}}function XI(o,n){if(o&1){let e=Q();C(0,"nz-message",2),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)}}var ZI=0,du=class{constructor(n,e,t){this.nzSingletonService=n,this.overlay=e,this.injector=t}remove(n){this.container&&(n?this.container.remove(n):this.container.removeAll())}getInstanceId(){return`${this.componentPrefix}-${ZI++}`}withContainer(n){let e=this.nzSingletonService.getSingletonWithKey(this.componentPrefix);if(e)return e;let t=this.overlay.create({hasBackdrop:!1,scrollStrategy:this.overlay.scrollStrategies.noop(),positionStrategy:this.overlay.position().global()}),i=new kl(n,null,this.injector),r=t.attach(i),s=t.hostElement;return s.style.zIndex="1010",e||(this.container=e=r.instance,this.nzSingletonService.registerSingletonWithKey(this.componentPrefix,e),this.container.afterAllInstancesRemoved.subscribe(()=>{this.container=void 0,this.nzSingletonService.unregisterSingletonWithKey(this.componentPrefix),t.dispose()})),e}},hm=(()=>{let n=class n{constructor(t,i){this.cdr=t,this.nzConfigService=i,this.instances=[],this._afterAllInstancesRemoved=new J,this.afterAllInstancesRemoved=this._afterAllInstancesRemoved.asObservable(),this.destroy$=new J,this.updateConfig()}ngOnInit(){this.subscribeConfigChange()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}create(t){let i=this.onCreate(t);return this.instances.length>=this.config.nzMaxStack&&(this.instances=this.instances.slice(1)),this.instances=[...this.instances,i],this.readyInstances(),i}remove(t,i=!1){this.instances.map((r,s)=>({index:s,instance:r})).filter(({instance:r})=>r.messageId===t).forEach(({index:r,instance:s})=>{this.instances.splice(r,1),this.instances=[...this.instances],this.onRemove(s,i),this.readyInstances()}),this.instances.length||this.onAllInstancesRemoved()}removeAll(){this.instances.forEach(t=>this.onRemove(t,!1)),this.instances=[],this.readyInstances(),this.onAllInstancesRemoved()}onCreate(t){return t.options=this.mergeOptions(t.options),t.onClose=new J,t}onRemove(t,i){t.onClose.next(i),t.onClose.complete()}onAllInstancesRemoved(){this._afterAllInstancesRemoved.next(),this._afterAllInstancesRemoved.complete()}readyInstances(){this.cdr.detectChanges()}mergeOptions(t){let{nzDuration:i,nzAnimate:r,nzPauseOnHover:s}=this.config;return V({nzDuration:i,nzAnimate:r,nzPauseOnHover:s},t)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(st))},n.\u0275dir=Se({type:n});let o=n;return o})(),fm=(()=>{let n=class n{constructor(t){this.cdr=t,this.destroyed=new O,this.animationStateChanged=new J,this.userAction=!1,this.eraseTimer=null}ngOnInit(){this.options=this.instance.options,this.options.nzAnimate&&(this.instance.state="enter",this.animationStateChanged.pipe(Qe(t=>t.phaseName==="done"&&t.toState==="leave"),Zr(1)).subscribe(()=>{clearTimeout(this.closeTimer),this.destroyed.next({id:this.instance.messageId,userAction:this.userAction})})),this.autoClose=this.options.nzDuration>0,this.autoClose&&(this.initErase(),this.startEraseTimeout())}ngOnDestroy(){this.autoClose&&this.clearEraseTimeout(),this.animationStateChanged.complete()}onEnter(){this.autoClose&&this.options.nzPauseOnHover&&(this.clearEraseTimeout(),this.updateTTL())}onLeave(){this.autoClose&&this.options.nzPauseOnHover&&this.startEraseTimeout()}destroy(t=!1){this.userAction=t,this.options.nzAnimate?(this.instance.state="leave",this.cdr.detectChanges(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.destroyed.next({id:this.instance.messageId,userAction:t})},200)):this.destroyed.next({id:this.instance.messageId,userAction:t})}initErase(){this.eraseTTL=this.options.nzDuration,this.eraseTimingStart=Date.now()}updateTTL(){this.autoClose&&(this.eraseTTL-=Date.now()-this.eraseTimingStart)}startEraseTimeout(){this.eraseTTL>0?(this.clearEraseTimeout(),this.eraseTimer=setTimeout(()=>this.destroy(),this.eraseTTL),this.eraseTimingStart=Date.now()):this.destroy()}clearEraseTimeout(){this.eraseTimer!==null&&(clearTimeout(this.eraseTimer),this.eraseTimer=null)}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275dir=Se({type:n});let o=n;return o})(),zw=(()=>{let n=class n extends fm{constructor(t){super(t),this.destroyed=new O}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-message"]],inputs:{instance:"instance"},outputs:{destroyed:"destroyed"},exportAs:["nzMessage"],standalone:!0,features:[Xe,K],decls:10,vars:9,consts:[[1,"ant-message-notice",3,"mouseenter","mouseleave"],[1,"ant-message-notice-content"],[1,"ant-message-custom-content",3,"ngClass"],[3,"ngSwitch"],["nz-icon","","nzType","check-circle",4,"ngSwitchCase"],["nz-icon","","nzType","info-circle",4,"ngSwitchCase"],["nz-icon","","nzType","exclamation-circle",4,"ngSwitchCase"],["nz-icon","","nzType","close-circle",4,"ngSwitchCase"],["nz-icon","","nzType","loading",4,"ngSwitchCase"],[4,"nzStringTemplateOutlet"],["nz-icon","","nzType","check-circle"],["nz-icon","","nzType","info-circle"],["nz-icon","","nzType","exclamation-circle"],["nz-icon","","nzType","close-circle"],["nz-icon","","nzType","loading"],[3,"innerHTML"]],template:function(i,r){i&1&&(C(0,"div",0),A("@moveUpMotion.done",function(a){return r.animationStateChanged.next(a)})("mouseenter",function(){return r.onEnter()})("mouseleave",function(){return r.onLeave()}),C(1,"div",1)(2,"div",2),H(3,3),_(4,WI,1,0,"span",4)(5,UI,1,0,"span",5)(6,KI,1,0,"span",6)(7,qI,1,0,"span",7)(8,YI,1,0,"span",8),B(),_(9,QI,2,1,"ng-container",9),S()()()),i&2&&(h("@moveUpMotion",r.instance.state),f(2),h("ngClass","ant-message-"+r.instance.type),f(),h("ngSwitch",r.instance.type),f(),h("ngSwitchCase","success"),f(),h("ngSwitchCase","info"),f(),h("ngSwitchCase","warning"),f(),h("ngSwitchCase","error"),f(),h("ngSwitchCase","loading"),f(),h("nzStringTemplateOutlet",r.instance.content))},dependencies:[St,jn,Wn,Ge,Fe,Ye,Ue],encapsulation:2,data:{animation:[bw]},changeDetection:0});let o=n;return o})(),Pp="message",JI={nzAnimate:!0,nzDuration:3e3,nzMaxStack:7,nzPauseOnHover:!0,nzTop:24,nzDirection:"ltr"},Ow=(()=>{let n=class n extends hm{constructor(t,i){super(t,i),this.dir="ltr";let r=this.nzConfigService.getConfigForComponent(Pp);this.dir=r?.nzDirection||"ltr"}subscribeConfigChange(){this.nzConfigService.getConfigChangeEventForComponent(Pp).pipe(F(this.destroy$)).subscribe(()=>{this.updateConfig();let t=this.nzConfigService.getConfigForComponent(Pp);if(t){let{nzDirection:i}=t;this.dir=i||this.dir}})}updateConfig(){this.config=V(V(V({},JI),this.config),this.nzConfigService.getConfigForComponent(Pp)),this.top=Ea(this.config.nzTop),this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(st))},n.\u0275cmp=j({type:n,selectors:[["nz-message-container"]],exportAs:["nzMessageContainer"],standalone:!0,features:[Xe,K],decls:2,vars:5,consts:[[1,"ant-message"],[3,"instance","destroyed",4,"ngFor","ngForOf"],[3,"instance","destroyed"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,XI,1,1,"nz-message",1),S()),i&2&&(Re("top",r.top),k("ant-message-rtl",r.dir==="rtl"),f(),h("ngForOf",r.instances))},dependencies:[zw,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),Soe=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Ow,zw]});let o=n;return o})(),woe=(()=>{let n=class n extends du{constructor(t,i,r){super(t,i,r),this.componentPrefix="message-"}success(t,i){return this.createInstance({type:"success",content:t},i)}error(t,i){return this.createInstance({type:"error",content:t},i)}info(t,i){return this.createInstance({type:"info",content:t},i)}warning(t,i){return this.createInstance({type:"warning",content:t},i)}loading(t,i){return this.createInstance({type:"loading",content:t},i)}create(t,i,r){return this.createInstance({type:t,content:i},r)}createInstance(t,i){return this.container=this.withContainer(Ow),this.container.create(ot(V({},t),{createdAt:new Date,messageId:this.getInstanceId(),options:i}))}};n.\u0275fac=function(i){return new(i||n)(nt(Dp),nt(ss),nt($n))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();function eP(o,n){o&1&&R(0,"span",17)}function tP(o,n){o&1&&R(0,"span",18)}function nP(o,n){o&1&&R(0,"span",19)}function iP(o,n){o&1&&R(0,"span",20)}function rP(o,n){if(o&1&&(H(0),R(1,"div",21),B()),o&2){let e=m(2);f(),h("innerHTML",e.instance.title,Dt)}}function oP(o,n){if(o&1&&(H(0),R(1,"div",21),B()),o&2){let e=m(2);f(),h("innerHTML",e.instance.content,Dt)}}function sP(o,n){}var aP=o=>({$implicit:o});function lP(o,n){if(o&1&&(C(0,"span",22),_(1,sP,0,0,"ng-template",23),S()),o&2){let e=n.ngIf,t=m(2);f(),h("ngTemplateOutlet",e)("ngTemplateOutletContext",yt(2,aP,t))}}function cP(o,n){if(o&1&&(C(0,"div",7)(1,"div",7)(2,"div"),H(3,8),_(4,eP,1,0,"span",9)(5,tP,1,0,"span",10)(6,nP,1,0,"span",11)(7,iP,1,0,"span",12),B(),C(8,"div",13),_(9,rP,2,1,"ng-container",14),S(),C(10,"div",15),_(11,oP,2,1,"ng-container",14),S(),_(12,lP,2,4,"span",16),S()()()),o&2){let e=m();f(2),k("ant-notification-notice-with-icon",e.instance.type!=="blank"),f(),h("ngSwitch",e.instance.type),f(),h("ngSwitchCase","success"),f(),h("ngSwitchCase","info"),f(),h("ngSwitchCase","warning"),f(),h("ngSwitchCase","error"),f(2),h("nzStringTemplateOutlet",e.instance.title),f(2),h("nzStringTemplateOutlet",e.instance.content),f(),h("ngIf",e.instance.options==null?null:e.instance.options.nzButton)}}function uP(o,n){}function dP(o,n){if(o&1&&(H(0),R(1,"span",24),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function pP(o,n){if(o&1&&(H(0),_(1,dP,2,1,"ng-container",14),B()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.instance.options==null?null:e.instance.options.nzCloseIcon)}}function hP(o,n){o&1&&R(0,"span",25)}var fP=(o,n)=>({$implicit:o,data:n});function gP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","topLeft")}}function mP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","topRight")}}function vP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","bottomLeft")}}function yP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","bottomRight")}}function CP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","top")}}function _P(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","bottom")}}var Dw=(()=>{let n=class n extends fm{constructor(t){super(t),this.destroyed=new O}ngOnDestroy(){super.ngOnDestroy(),this.instance.onClick.complete()}onClick(t){this.instance.onClick.next(t)}close(){this.destroy(!0)}get state(){if(this.instance.state==="enter")switch(this.placement){case"topLeft":case"bottomLeft":return"enterLeft";case"topRight":case"bottomRight":return"enterRight";case"top":return"enterTop";case"bottom":return"enterBottom";default:return"enterRight"}else return this.instance.state}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-notification"]],inputs:{instance:"instance",index:"index",placement:"placement"},outputs:{destroyed:"destroyed"},exportAs:["nzNotification"],standalone:!0,features:[Xe,K],decls:8,vars:12,consts:[[1,"ant-notification-notice","ant-notification-notice-closable",3,"ngStyle","ngClass","click","mouseenter","mouseleave"],["class","ant-notification-notice-content",4,"ngIf"],[3,"ngIf","ngTemplateOutlet","ngTemplateOutletContext"],["tabindex","0",1,"ant-notification-notice-close",3,"click"],[1,"ant-notification-notice-close-x"],[4,"ngIf","ngIfElse"],["iconTpl",""],[1,"ant-notification-notice-content"],[3,"ngSwitch"],["nz-icon","","nzType","check-circle","class","ant-notification-notice-icon ant-notification-notice-icon-success",4,"ngSwitchCase"],["nz-icon","","nzType","info-circle","class","ant-notification-notice-icon ant-notification-notice-icon-info",4,"ngSwitchCase"],["nz-icon","","nzType","exclamation-circle","class","ant-notification-notice-icon ant-notification-notice-icon-warning",4,"ngSwitchCase"],["nz-icon","","nzType","close-circle","class","ant-notification-notice-icon ant-notification-notice-icon-error",4,"ngSwitchCase"],[1,"ant-notification-notice-message"],[4,"nzStringTemplateOutlet"],[1,"ant-notification-notice-description"],["class","ant-notification-notice-btn",4,"ngIf"],["nz-icon","","nzType","check-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-success"],["nz-icon","","nzType","info-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-info"],["nz-icon","","nzType","exclamation-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-warning"],["nz-icon","","nzType","close-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-error"],[3,"innerHTML"],[1,"ant-notification-notice-btn"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-icon","",3,"nzType"],["nz-icon","","nzType","close",1,"ant-notification-close-icon"]],template:function(i,r){if(i&1&&(C(0,"div",0),A("@notificationMotion.done",function(a){return r.animationStateChanged.next(a)})("click",function(a){return r.onClick(a)})("mouseenter",function(){return r.onEnter()})("mouseleave",function(){return r.onLeave()}),_(1,cP,13,10,"div",1)(2,uP,0,0,"ng-template",2),C(3,"a",3),A("click",function(){return r.close()}),C(4,"span",4),_(5,pP,2,1,"ng-container",5)(6,hP,1,0,"ng-template",null,6,_e),S()()()),i&2){let s=te(7);h("ngStyle",(r.instance.options==null?null:r.instance.options.nzStyle)||null)("ngClass",(r.instance.options==null?null:r.instance.options.nzClass)||"")("@notificationMotion",r.state),f(),h("ngIf",!r.instance.template),f(),h("ngIf",r.instance.template)("ngTemplateOutlet",r.instance.template)("ngTemplateOutletContext",ri(9,fP,r,r.instance.options==null?null:r.instance.options.nzData)),f(3),h("ngIf",r.instance.options==null?null:r.instance.options.nzCloseIcon)("ngIfElse",s)}},dependencies:[Zt,St,we,jn,Wn,Ge,Fe,Ye,Ue,Be],encapsulation:2,data:{animation:[Tw]}});let o=n;return o})(),Mp="notification",SP={nzTop:"24px",nzBottom:"24px",nzPlacement:"topRight",nzDuration:4500,nzMaxStack:7,nzPauseOnHover:!0,nzAnimate:!0,nzDirection:"ltr"},Rw=(()=>{let n=class n extends hm{constructor(t,i){super(t,i),this.dir="ltr",this.instances=[],this.topLeftInstances=[],this.topRightInstances=[],this.bottomLeftInstances=[],this.bottomRightInstances=[],this.topInstances=[],this.bottomInstances=[];let r=this.nzConfigService.getConfigForComponent(Mp);this.dir=r?.nzDirection||"ltr"}create(t){let i=this.onCreate(t),r=i.options.nzKey,s=this.instances.find(a=>a.options.nzKey===t.options.nzKey);return r&&s?this.replaceNotification(s,i):(this.instances.length>=this.config.nzMaxStack&&(this.instances=this.instances.slice(1)),this.instances=[...this.instances,i]),this.readyInstances(),i}onCreate(t){return t.options=this.mergeOptions(t.options),t.onClose=new J,t.onClick=new J,t}subscribeConfigChange(){this.nzConfigService.getConfigChangeEventForComponent(Mp).pipe(F(this.destroy$)).subscribe(()=>{this.updateConfig();let t=this.nzConfigService.getConfigForComponent(Mp);if(t){let{nzDirection:i}=t;this.dir=i||this.dir}})}updateConfig(){this.config=V(V(V({},SP),this.config),this.nzConfigService.getConfigForComponent(Mp)),this.top=Ea(this.config.nzTop),this.bottom=Ea(this.config.nzBottom),this.cdr.markForCheck()}replaceNotification(t,i){t.title=i.title,t.content=i.content,t.template=i.template,t.type=i.type,t.options=i.options}readyInstances(){let t={topLeft:[],topRight:[],bottomLeft:[],bottomRight:[],top:[],bottom:[]};this.instances.forEach(i=>{switch(i.options.nzPlacement){case"topLeft":t.topLeft.push(i);break;case"topRight":t.topRight.push(i);break;case"bottomLeft":t.bottomLeft.push(i);break;case"bottomRight":t.bottomRight.push(i);break;case"top":t.top.push(i);break;case"bottom":t.bottom.push(i);break;default:t.topRight.push(i)}}),this.topLeftInstances=t.topLeft,this.topRightInstances=t.topRight,this.bottomLeftInstances=t.bottomLeft,this.bottomRightInstances=t.bottomRight,this.topInstances=t.top,this.bottomInstances=t.bottom,this.cdr.detectChanges()}mergeOptions(t){let{nzDuration:i,nzAnimate:r,nzPauseOnHover:s,nzPlacement:a}=this.config;return V({nzDuration:i,nzAnimate:r,nzPauseOnHover:s,nzPlacement:a},t)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(st))},n.\u0275cmp=j({type:n,selectors:[["nz-notification-container"]],exportAs:["nzNotificationContainer"],standalone:!0,features:[Xe,K],decls:12,vars:46,consts:[[1,"ant-notification","ant-notification-topLeft"],[3,"instance","placement","destroyed",4,"ngFor","ngForOf"],[1,"ant-notification","ant-notification-topRight"],[1,"ant-notification","ant-notification-bottomLeft"],[1,"ant-notification","ant-notification-bottomRight"],[1,"ant-notification","ant-notification-top"],[1,"ant-notification","ant-notification-bottom"],[3,"instance","placement","destroyed"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,gP,1,2,"nz-notification",1),S(),C(2,"div",2),_(3,mP,1,2,"nz-notification",1),S(),C(4,"div",3),_(5,vP,1,2,"nz-notification",1),S(),C(6,"div",4),_(7,yP,1,2,"nz-notification",1),S(),C(8,"div",5),_(9,CP,1,2,"nz-notification",1),S(),C(10,"div",6),_(11,_P,1,2,"nz-notification",1),S()),i&2&&(Re("top",r.top)("left","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.topLeftInstances),f(),Re("top",r.top)("right","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.topRightInstances),f(),Re("bottom",r.bottom)("left","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.bottomLeftInstances),f(),Re("bottom",r.bottom)("right","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.bottomRightInstances),f(),Re("top",r.top)("left","50%")("transform","translateX(-50%)"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.topInstances),f(),Re("bottom",r.bottom)("left","50%")("transform","translateX(-50%)"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.bottomInstances))},dependencies:[Dw,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),Fp=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Dw,Rw]});let o=n;return o})(),wP=0,Hoe=(()=>{let n=class n extends du{constructor(t,i,r){super(t,i,r),this.componentPrefix="notification-"}success(t,i,r){return this.create("success",t,i,r)}error(t,i,r){return this.create("error",t,i,r)}info(t,i,r){return this.create("info",t,i,r)}warning(t,i,r){return this.create("warning",t,i,r)}blank(t,i,r){return this.create("blank",t,i,r)}create(t,i,r,s){return this.createInstance({type:t,title:i,content:r},s)}template(t,i){return this.createInstance({template:t},i)}generateMessageId(){return`${this.componentPrefix}-${wP++}`}createInstance(t,i){return this.container=this.withContainer(Rw),this.container.create(ot(V({},t),{createdAt:new Date,messageId:i?.nzKey||this.generateMessageId(),options:i}))}};n.\u0275fac=function(i){return new(i||n)(nt(Dp),nt(ss),nt($n))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var kw=(()=>{let n=class n{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275dir=Se({type:n});let o=n;return o})(),Vw=(()=>{let n=class n extends kw{};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),zn=new hn("NgValueAccessor"),TP={provide:zn,useExisting:pn(()=>ym),multi:!0},ym=(()=>{let n=class n extends Vw{writeValue(t){this.setProperty("checked",t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&A("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},features:[Ve([TP]),Xe]});let o=n;return o})(),EP={provide:zn,useExisting:pn(()=>Ii),multi:!0};function xP(){let o=qg()?qg().getUserAgent():"";return/android (\d+)/.test(o.toLowerCase())}var Cm=new hn("CompositionEventMode"),Ii=(()=>{let n=class n extends kw{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!xP())}writeValue(t){let i=t??"";this.setProperty("value",i)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de),w(Cm,8))},n.\u0275dir=Se({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&A("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},features:[Ve([EP]),Xe]});let o=n;return o})();function Ps(o){return o==null||(typeof o=="string"||Array.isArray(o))&&o.length===0}function Gw(o){return o!=null&&typeof o.length=="number"}var za=new hn("NgValidators"),vu=new hn("NgAsyncValidators"),zP=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Np=class{static min(n){return OP(n)}static max(n){return DP(n)}static required(n){return Hw(n)}static requiredTrue(n){return RP(n)}static email(n){return IP(n)}static minLength(n){return PP(n)}static maxLength(n){return Bw(n)}static pattern(n){return MP(n)}static nullValidator(n){return Lp(n)}static compose(n){return qw(n)}static composeAsync(n){return Yw(n)}};function OP(o){return n=>{if(Ps(n.value)||Ps(o))return null;let e=parseFloat(n.value);return!isNaN(e)&&e{if(Ps(n.value)||Ps(o))return null;let e=parseFloat(n.value);return!isNaN(e)&&e>o?{max:{max:o,actual:n.value}}:null}}function Hw(o){return Ps(o.value)?{required:!0}:null}function RP(o){return o.value===!0?null:{required:!0}}function IP(o){return Ps(o.value)||zP.test(o.value)?null:{email:!0}}function PP(o){return n=>Ps(n.value)||!Gw(n.value)?null:n.value.lengthGw(n.value)&&n.value.length>o?{maxlength:{requiredLength:o,actualLength:n.value.length}}:null}function MP(o){if(!o)return Lp;let n,e;return typeof o=="string"?(e="",o.charAt(0)!=="^"&&(e+="^"),e+=o,o.charAt(o.length-1)!=="$"&&(e+="$"),n=new RegExp(e)):(e=o.toString(),n=o),t=>{if(Ps(t.value))return null;let i=t.value;return n.test(i)?null:{pattern:{requiredPattern:e,actualValue:i}}}}function Lp(o){return null}function $w(o){return o!=null}function jw(o){return zS(o)?dS(o):o}function Ww(o){let n={};return o.forEach(e=>{n=e!=null?V(V({},n),e):n}),Object.keys(n).length===0?null:n}function Uw(o,n){return n.map(e=>e(o))}function FP(o){return!o.validate}function Kw(o){return o.map(n=>FP(n)?n:e=>n.validate(e))}function qw(o){if(!o)return null;let n=o.filter($w);return n.length==0?null:function(e){return Ww(Uw(e,n))}}function _m(o){return o!=null?qw(Kw(o)):null}function Yw(o){if(!o)return null;let n=o.filter($w);return n.length==0?null:function(e){let t=Uw(e,n).map(jw);return gS(t).pipe(We(Ww))}}function Sm(o){return o!=null?Yw(Kw(o)):null}function Iw(o,n){return o===null?[n]:Array.isArray(o)?[...o,n]:[o,n]}function Qw(o){return o._rawValidators}function Xw(o){return o._rawAsyncValidators}function gm(o){return o?Array.isArray(o)?o:[o]:[]}function kp(o,n){return Array.isArray(o)?o.includes(n):o===n}function Pw(o,n){let e=gm(n);return gm(o).forEach(i=>{kp(e,i)||e.push(i)}),e}function Mw(o,n){return gm(n).filter(e=>!kp(o,e))}var Vp=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=_m(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Sm(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,e){return this.control?this.control.hasError(n,e):!1}getError(n,e){return this.control?this.control.getError(n,e):null}},as=class extends Vp{get formDirective(){return null}get path(){return null}},Ri=class extends Vp{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Gp=class{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},AP={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},ose=ot(V({},AP),{"[class.ng-submitted]":"isSubmitted"}),Kt=(()=>{let n=class n extends Gp{constructor(t){super(t)}};n.\u0275fac=function(i){return new(i||n)(w(Ri,2))},n.\u0275dir=Se({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&k("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[Xe]});let o=n;return o})(),Zw=(()=>{let n=class n extends Gp{constructor(t){super(t)}};n.\u0275fac=function(i){return new(i||n)(w(as,10))},n.\u0275dir=Se({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&k("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[Xe]});let o=n;return o})();var pu="VALID",Ap="INVALID",Wl="PENDING",hu="DISABLED";function wm(o){return(jp(o)?o.validators:o)||null}function NP(o){return Array.isArray(o)?_m(o):o||null}function bm(o,n){return(jp(n)?n.asyncValidators:o)||null}function LP(o){return Array.isArray(o)?Sm(o):o||null}function jp(o){return o!=null&&!Array.isArray(o)&&typeof o=="object"}function Jw(o,n,e){let t=o.controls;if(!(n?Object.keys(t):t).length)throw new cp(1e3,"");if(!t[e])throw new cp(1001,"")}function eb(o,n,e){o._forEachChild((t,i)=>{if(e[i]===void 0)throw new cp(1002,"")})}var Ms=class{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===pu}get invalid(){return this.status===Ap}get pending(){return this.status==Wl}get disabled(){return this.status===hu}get enabled(){return this.status!==hu}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Pw(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Pw(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Mw(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Mw(n,this._rawAsyncValidators))}hasValidator(n){return kp(this._rawValidators,n)}hasAsyncValidator(n){return kp(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Wl,n.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=hu,this.errors=null,this._forEachChild(t=>{t.disable(ot(V({},n),{onlySelf:!0}))}),this._updateValue(),n.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ot(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=pu,this._forEachChild(t=>{t.enable(ot(V({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(ot(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pu||this.status===Wl)&&this._runAsyncValidator(n.emitEvent)),n.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?hu:pu}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Wl,this._hasOwnPendingAsyncValidator=!0;let e=jw(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(e.emitEvent!==!1)}get(n){let e=n;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,i)=>t&&t._find(i),this)}getError(n,e){let t=e?this.get(e):this;return t&&t.errors?t.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new O,this.statusChanges=new O}_calculateStatus(){return this._allControlsDisabled()?hu:this.errors?Ap:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Wl)?Wl:this._anyControlsHaveStatus(Ap)?Ap:pu}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){jp(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){let e=this._parent&&this._parent.dirty;return!n&&!!e&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=NP(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=LP(this._rawAsyncValidators)}},Ul=class extends Ms{constructor(n,e,t){super(wm(e),bm(t,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,t={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){eb(this,!0,n),Object.keys(n).forEach(t=>{Jw(this,!0,t),this.controls[t].setValue(n[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(Object.keys(n).forEach(t=>{let i=this.controls[t];i&&i.patchValue(n[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((t,i)=>{t.reset(n?n[i]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,t)=>(n[t]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&n(t,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&n(t))return!0;return!1}_reduceValue(){let n={};return this._reduceChildren(n,(e,t,i)=>((t.enabled||this.disabled)&&(e[i]=t.value),e))}_reduceChildren(n,e){let t=n;return this._forEachChild((i,r)=>{t=e(t,i,r)}),t}_allControlsDisabled(){for(let n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}};var mm=class extends Ul{};var Kl=new hn("CallSetDisabledState",{providedIn:"root",factory:()=>Wp}),Wp="always";function tb(o,n){return[...n.path,o]}function mu(o,n,e=Wp){Tm(o,n),n.valueAccessor.writeValue(o.value),(o.disabled||e==="always")&&n.valueAccessor.setDisabledState?.(o.disabled),VP(o,n),HP(o,n),GP(o,n),kP(o,n)}function Hp(o,n,e=!0){let t=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(t),n.valueAccessor.registerOnTouched(t)),$p(o,n),o&&(n._invokeOnDestroyCallbacks(),o._registerOnCollectionChange(()=>{}))}function Bp(o,n){o.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function kP(o,n){if(n.valueAccessor.setDisabledState){let e=t=>{n.valueAccessor.setDisabledState(t)};o.registerOnDisabledChange(e),n._registerOnDestroy(()=>{o._unregisterOnDisabledChange(e)})}}function Tm(o,n){let e=Qw(o);n.validator!==null?o.setValidators(Iw(e,n.validator)):typeof e=="function"&&o.setValidators([e]);let t=Xw(o);n.asyncValidator!==null?o.setAsyncValidators(Iw(t,n.asyncValidator)):typeof t=="function"&&o.setAsyncValidators([t]);let i=()=>o.updateValueAndValidity();Bp(n._rawValidators,i),Bp(n._rawAsyncValidators,i)}function $p(o,n){let e=!1;if(o!==null){if(n.validator!==null){let i=Qw(o);if(Array.isArray(i)&&i.length>0){let r=i.filter(s=>s!==n.validator);r.length!==i.length&&(e=!0,o.setValidators(r))}}if(n.asyncValidator!==null){let i=Xw(o);if(Array.isArray(i)&&i.length>0){let r=i.filter(s=>s!==n.asyncValidator);r.length!==i.length&&(e=!0,o.setAsyncValidators(r))}}}let t=()=>{};return Bp(n._rawValidators,t),Bp(n._rawAsyncValidators,t),e}function VP(o,n){n.valueAccessor.registerOnChange(e=>{o._pendingValue=e,o._pendingChange=!0,o._pendingDirty=!0,o.updateOn==="change"&&nb(o,n)})}function GP(o,n){n.valueAccessor.registerOnTouched(()=>{o._pendingTouched=!0,o.updateOn==="blur"&&o._pendingChange&&nb(o,n),o.updateOn!=="submit"&&o.markAsTouched()})}function nb(o,n){o._pendingDirty&&o.markAsDirty(),o.setValue(o._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(o._pendingValue),o._pendingChange=!1}function HP(o,n){let e=(t,i)=>{n.valueAccessor.writeValue(t),i&&n.viewToModelUpdate(t)};o.registerOnChange(e),n._registerOnDestroy(()=>{o._unregisterOnChange(e)})}function ib(o,n){o==null,Tm(o,n)}function BP(o,n){return $p(o,n)}function Em(o,n){if(!o.hasOwnProperty("model"))return!1;let e=o.model;return e.isFirstChange()?!0:!Object.is(n,e.currentValue)}function $P(o){return Object.getPrototypeOf(o.constructor)===Vw}function rb(o,n){o._syncPendingControls(),n.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function xm(o,n){if(!n)return null;Array.isArray(n);let e,t,i;return n.forEach(r=>{r.constructor===Ii?e=r:$P(r)?t=r:i=r}),i||t||e||null}function jP(o,n){let e=o.indexOf(n);e>-1&&o.splice(e,1)}var WP={provide:as,useExisting:pn(()=>zm)},fu=Promise.resolve(),zm=(()=>{let n=class n extends as{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new O,this.form=new Ul({},_m(t),Sm(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){fu.then(()=>{let i=this._findContainer(t.path);t.control=i.registerControl(t.name,t.control),mu(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){fu.then(()=>{let i=this._findContainer(t.path);i&&i.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){fu.then(()=>{let i=this._findContainer(t.path),r=new Ul({});ib(r,t),i.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){fu.then(()=>{let i=this._findContainer(t.path);i&&i.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,i){fu.then(()=>{this.form.get(t.path).setValue(i)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,rb(this.form,this._directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}};n.\u0275fac=function(i){return new(i||n)(w(za,10),w(vu,10),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&A("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[le.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ve([WP]),Xe]});let o=n;return o})();function Fw(o,n){let e=o.indexOf(n);e>-1&&o.splice(e,1)}function Aw(o){return typeof o=="object"&&o!==null&&Object.keys(o).length===2&&"value"in o&&"disabled"in o}var gu=class extends Ms{constructor(n=null,e,t){super(wm(e),bm(t,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),jp(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Aw(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){Fw(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){Fw(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(n){Aw(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};var UP=o=>o instanceof gu;var KP={provide:Ri,useExisting:pn(()=>Rt)},Nw=Promise.resolve(),Rt=(()=>{let n=class n extends Ri{constructor(t,i,r,s,a,l){super(),this._changeDetectorRef=a,this.callSetDisabledState=l,this.control=new gu,this._registered=!1,this.name="",this.update=new O,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=xm(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Em(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){mu(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){Nw.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&it(i);Nw.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?tb(t,this._parent):[t]}};n.\u0275fac=function(i){return new(i||n)(w(as,9),w(za,10),w(vu,10),w(zn,10),w(fe,8),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[le.None,"disabled","isDisabled"],model:[le.None,"ngModel","model"],options:[le.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ve([KP]),Xe,oe]});let o=n;return o})(),ob=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let o=n;return o})();var qP=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var Om=new hn("NgModelWithFormControlWarning"),YP={provide:Ri,useExisting:pn(()=>Dm)},Dm=(()=>{let n=class n extends Ri{set isDisabled(t){}constructor(t,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this.update=new O,this._ngModelWarningSent=!1,this._setValidators(t),this._setAsyncValidators(i),this.valueAccessor=xm(this,r)}ngOnChanges(t){if(this._isControlChanged(t)){let i=t.form.previousValue;i&&Hp(i,this,!1),mu(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Em(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Hp(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}};n._ngModelWarningSentOnce=!1,n.\u0275fac=function(i){return new(i||n)(w(za,10),w(vu,10),w(zn,10),w(Om,8),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["","formControl",""]],inputs:{form:[le.None,"formControl","form"],isDisabled:[le.None,"disabled","isDisabled"],model:[le.None,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Ve([YP]),Xe,oe]});let o=n;return o})(),QP={provide:as,useExisting:pn(()=>XP)},XP=(()=>{let n=class n extends as{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new O,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&($p(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let i=this.form.get(t.path);return mu(i,t,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){Hp(t.control||null,t,!1),jP(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,rb(this.form,this.directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{let i=t.control,r=this.form.get(t.path);i!==r&&(Hp(i||null,t),UP(r)&&(mu(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let i=this.form.get(t.path);ib(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let i=this.form.get(t.path);i&&BP(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Tm(this.form,this),this._oldForm&&$p(this._oldForm,this)}_checkFormPresent(){this.form}};n.\u0275fac=function(i){return new(i||n)(w(za,10),w(vu,10),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&A("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[le.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ve([QP]),Xe,oe]});let o=n;return o})();var ZP={provide:Ri,useExisting:pn(()=>yu)},yu=(()=>{let n=class n extends Ri{set isDisabled(t){}constructor(t,i,r,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new O,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=xm(this,s)}ngOnChanges(t){this._added||this._setUpControl(),Em(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return tb(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}};n._ngModelWarningSentOnce=!1,n.\u0275fac=function(i){return new(i||n)(w(as,13),w(za,10),w(vu,10),w(zn,10),w(Om,8))},n.\u0275dir=Se({type:n,selectors:[["","formControlName",""]],inputs:{name:[le.None,"formControlName","name"],isDisabled:[le.None,"disabled","isDisabled"],model:[le.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ve([ZP]),Xe,oe]});let o=n;return o})();function JP(o){return typeof o=="number"?o:parseInt(o,10)}var sb=(()=>{let n=class n{constructor(){this._validator=Lp}ngOnChanges(t){if(this.inputName in t){let i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Lp,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,features:[oe]});let o=n;return o})();var eM={provide:za,useExisting:pn(()=>Rm),multi:!0};var Rm=(()=>{let n=class n extends sb{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=it,this.createValidator=t=>Hw}enabled(t){return t}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&ze("required",r._enabled?"":null)},inputs:{required:"required"},features:[Ve([eM]),Xe]});let o=n;return o})();var tM={provide:za,useExisting:pn(()=>nM),multi:!0},nM=(()=>{let n=class n extends sb{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=t=>JP(t),this.createValidator=t=>Bw(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&ze("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Ve([tM]),Xe]});let o=n;return o})();var ab=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[qP]});let o=n;return o})(),vm=class extends Ms{constructor(n,e,t){super(wm(e),bm(t,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,t={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(n,e={}){let t=this._adjustIndex(n);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,t={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),e&&(this.controls.splice(i,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){eb(this,!1,n),n.forEach((t,i)=>{Jw(this,!1,i),this.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(n.forEach((t,i)=>{this.at(i)&&this.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((t,i)=>{t.reset(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,t)=>{n(e,t)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(let n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}};function Lw(o){return!!o&&(o.asyncValidators!==void 0||o.validators!==void 0||o.updateOn!==void 0)}var ase=(()=>{let n=class n{constructor(){this.useNonNullable=!1}get nonNullable(){let t=new n;return t.useNonNullable=!0,t}group(t,i=null){let r=this._reduceControls(t),s={};return Lw(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new Ul(r,s)}record(t,i=null){let r=this._reduceControls(t);return new mm(r,i)}control(t,i,r){let s={};return this.useNonNullable?(Lw(i)?s=i:(s.validators=i,s.asyncValidators=r),new gu(t,ot(V({},s),{nonNullable:!0}))):new gu(t,i,r)}array(t,i,r){let s=t.map(a=>this._createControl(a));return new vm(s,i,r)}_reduceControls(t){let i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){if(t instanceof gu)return t;if(t instanceof Ms)return t;if(Array.isArray(t)){let i=t[0],r=t.length>1?t[1]:null,s=t.length>2?t[2]:null;return this.control(i,r,s)}else return this.control(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var nn=(()=>{let n=class n{static withConfig(t){return{ngModule:n,providers:[{provide:Kl,useValue:t.callSetDisabledState??Wp}]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ab]});let o=n;return o})(),Cu=(()=>{let n=class n{static withConfig(t){return{ngModule:n,providers:[{provide:Om,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Kl,useValue:t.callSetDisabledState??Wp}]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ab]});let o=n;return o})();function iM(o,n){if(o&1&&(C(0,"p",6),Y(1),S()),o&2){let e=n.$implicit,t=m(2).index,i=m(2);k("current",e===i.countArray[t]),f(),Ne(" ",e," ")}}function rM(o,n){if(o&1&&(H(0),_(1,iM,2,3,"p",5),B()),o&2){let e=m(3);f(),h("ngForOf",e.countSingleArray)}}function oM(o,n){if(o&1&&(C(0,"span",3),_(1,rM,2,1,"ng-container",4),S()),o&2){let e=n.index,t=m(2);Re("transform","translateY("+-t.countArray[e]*100+"%)"),h("nzNoAnimation",t.noAnimation),f(),h("ngIf",!t.nzDot&&t.countArray[e]!==void 0)}}function sM(o,n){if(o&1&&(H(0),_(1,oM,2,4,"span",2),B()),o&2){let e=m();f(),h("ngForOf",e.maxNumberArray)}}function aM(o,n){if(o&1&&Y(0),o&2){let e=m();Ne("",e.nzOverflowCount,"+")}}function lM(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzText)}}function cM(o,n){if(o&1&&(H(0),R(1,"span",2),C(2,"span",3),_(3,lM,2,1,"ng-container",1),S(),B()),o&2){let e=m();f(),Ae("ant-badge-status-dot ant-badge-status-",e.nzStatus||e.presetColor,""),Re("background",!e.presetColor&&e.nzColor),h("ngStyle",e.nzStyle),f(2),h("nzStringTemplateOutlet",e.nzText)}}function uM(o,n){if(o&1&&R(0,"nz-badge-sup",5),o&2){let e=m(2);h("nzOffset",e.nzOffset)("nzSize",e.nzSize)("nzTitle",e.nzTitle)("nzStyle",e.nzStyle)("nzDot",e.nzDot)("nzOverflowCount",e.nzOverflowCount)("disableAnimation",!!(e.nzStandalone||e.nzStatus||e.nzColor||e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzCount",e.nzCount)("noAnimation",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))}}function dM(o,n){if(o&1&&(H(0),_(1,uM,1,9,"nz-badge-sup",4),B()),o&2){let e=m();f(),h("ngIf",e.showSup)}}var lb=["*"];function pM(o,n){if(o&1&&(H(0),C(1,"span",3),Y(2),S(),B()),o&2){let e=m();f(2),ye(e.nzText)}}var hM=(()=>{let n=class n{constructor(){this.nzStyle=null,this.nzDot=!1,this.nzOverflowCount=99,this.disableAnimation=!1,this.noAnimation=!1,this.nzSize="default",this.maxNumberArray=[],this.countArray=[],this.count=0,this.countSingleArray=[0,1,2,3,4,5,6,7,8,9]}generateMaxNumberArray(){this.maxNumberArray=this.nzOverflowCount.toString().split("")}ngOnInit(){this.generateMaxNumberArray()}ngOnChanges(t){let{nzOverflowCount:i,nzCount:r}=t;r&&typeof r.currentValue=="number"&&(this.count=Math.max(0,r.currentValue),this.countArray=this.count.toString().split("").map(s=>+s)),i&&this.generateMaxNumberArray()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-badge-sup"]],hostAttrs:[1,"ant-scroll-number"],hostVars:17,hostBindings:function(i,r){i&2&&(ze("title",r.nzTitle===null?"":r.nzTitle||r.nzCount),Ta("@.disabled",r.disableAnimation)("@zoomBadgeMotion",void 0),Ol(r.nzStyle),Re("right",r.nzOffset&&r.nzOffset[0]?-r.nzOffset[0]:null,"px")("margin-top",r.nzOffset&&r.nzOffset[1]?r.nzOffset[1]:null,"px"),k("ant-badge-count",!r.nzDot)("ant-badge-count-sm",r.nzSize==="small")("ant-badge-dot",r.nzDot)("ant-badge-multiple-words",r.countArray.length>=2))},inputs:{nzOffset:"nzOffset",nzTitle:"nzTitle",nzStyle:"nzStyle",nzDot:"nzDot",nzOverflowCount:"nzOverflowCount",disableAnimation:"disableAnimation",nzCount:"nzCount",noAnimation:"noAnimation",nzSize:"nzSize"},exportAs:["nzBadgeSup"],standalone:!0,features:[oe,K],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["overflowTemplate",""],["class","ant-scroll-number-only",3,"nzNoAnimation","transform",4,"ngFor","ngForOf"],[1,"ant-scroll-number-only",3,"nzNoAnimation"],[4,"ngIf"],["class","ant-scroll-number-only-unit",3,"current",4,"ngFor","ngForOf"],[1,"ant-scroll-number-only-unit"]],template:function(i,r){if(i&1&&_(0,sM,2,1,"ng-container",0)(1,aM,1,1,"ng-template",null,1,_e),i&2){let s=te(2);h("ngIf",r.count<=r.nzOverflowCount)("ngIfElse",s)}},dependencies:[lt,we,ft],encapsulation:2,data:{animation:[dm]},changeDetection:0});let o=n;return o})(),cb=["pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"],fM="badge",_u=(()=>{let n=class n{constructor(t,i,r,s,a,l){this.nzConfigService=t,this.renderer=i,this.cdr=r,this.elementRef=s,this.directionality=a,this.noAnimation=l,this._nzModuleName=fM,this.showSup=!1,this.presetColor=null,this.dir="ltr",this.destroy$=new J,this.nzShowZero=!1,this.nzShowDot=!0,this.nzStandalone=!1,this.nzDot=!1,this.nzOverflowCount=99,this.nzColor=void 0,this.nzStyle=null,this.nzText=null,this.nzSize="default"}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.prepareBadgeForRtl(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.prepareBadgeForRtl()}ngOnChanges(t){let{nzColor:i,nzShowDot:r,nzDot:s,nzCount:a,nzShowZero:l}=t;i&&(this.presetColor=this.nzColor&&cb.indexOf(this.nzColor)!==-1?this.nzColor:null),(r||s||a||l)&&(this.showSup=this.nzShowDot&&this.nzDot||typeof this.nzCount=="number"&&this.nzCount>0||typeof this.nzCount=="number"&&this.nzCount<=0&&this.nzShowZero)}prepareBadgeForRtl(){this.isRtlLayout?this.renderer.addClass(this.elementRef.nativeElement,"ant-badge-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-badge-rtl")}get isRtlLayout(){return this.dir==="rtl"}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(He),w(fe),w(de),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-badge"]],hostAttrs:[1,"ant-badge"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-badge-status",r.nzStatus)("ant-badge-not-a-wrapper",!!(r.nzStandalone||r.nzStatus||r.nzColor))},inputs:{nzShowZero:"nzShowZero",nzShowDot:"nzShowDot",nzStandalone:"nzStandalone",nzDot:"nzDot",nzOverflowCount:"nzOverflowCount",nzColor:"nzColor",nzStyle:"nzStyle",nzText:"nzText",nzTitle:"nzTitle",nzStatus:"nzStatus",nzCount:"nzCount",nzOffset:"nzOffset",nzSize:"nzSize"},exportAs:["nzBadge"],standalone:!0,features:[oe,K],ngContentSelectors:lb,decls:3,vars:2,consts:[[4,"ngIf"],[4,"nzStringTemplateOutlet"],[3,"ngStyle"],[1,"ant-badge-status-text"],[3,"nzOffset","nzSize","nzTitle","nzStyle","nzDot","nzOverflowCount","disableAnimation","nzCount","noAnimation",4,"ngIf"],[3,"nzOffset","nzSize","nzTitle","nzStyle","nzDot","nzOverflowCount","disableAnimation","nzCount","noAnimation"]],template:function(i,r){i&1&&(Pe(),_(0,cM,4,7,"ng-container",0),Ie(1),_(2,dM,2,1,"ng-container",1)),i&2&&(h("ngIf",r.nzStatus||r.nzColor),f(2),h("nzStringTemplateOutlet",r.nzCount))},dependencies:[we,Zt,hM,Ye,Ue],encapsulation:2,data:{animation:[dm]},changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowZero",void 0),N([W()],o.prototype,"nzShowDot",void 0),N([W()],o.prototype,"nzStandalone",void 0),N([W()],o.prototype,"nzDot",void 0),N([De()],o.prototype,"nzOverflowCount",void 0),N([De()],o.prototype,"nzColor",void 0),o})(),gM=(()=>{let n=class n{constructor(){this.nzPlacement="end",this.nzText=null,this.presetColor=null}ngOnChanges(t){let{nzColor:i}=t;i&&(this.presetColor=this.nzColor&&cb.indexOf(this.nzColor)!==-1?this.nzColor:null)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-ribbon"]],hostAttrs:[1,"ant-ribbon-wrapper"],inputs:{nzColor:"nzColor",nzPlacement:"nzPlacement",nzText:"nzText"},exportAs:["nzRibbon"],standalone:!0,features:[oe,K],ngContentSelectors:lb,decls:4,vars:11,consts:[[1,"ant-ribbon"],[4,"nzStringTemplateOutlet"],[1,"ant-ribbon-corner"],[1,"ant-ribbon-text"]],template:function(i,r){i&1&&(Pe(),Ie(0),C(1,"div",0),_(2,pM,3,1,"ng-container",1),R(3,"div",2),S()),i&2&&(f(),cr(r.presetColor&&"ant-ribbon-color-"+r.presetColor),Re("background-color",!r.presetColor&&r.nzColor),k("ant-ribbon-placement-end",r.nzPlacement==="end")("ant-ribbon-placement-start",r.nzPlacement==="start"),f(),h("nzStringTemplateOutlet",r.nzText),f(),Re("color",!r.presetColor&&r.nzColor))},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Up=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[_u,gM]});let o=n;return o})();function vM(o,n){if(o&1&&R(0,"span",1),o&2){let e=m();h("nzType",e.iconType)}}var cn=(()=>{let n=class n{constructor(){this.formStatusChanges=new tn(1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),_i=(()=>{let n=class n{constructor(){this.noFormStatus=new ct(!1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),yM={error:"close-circle-fill",validating:"loading",success:"check-circle-fill",warning:"exclamation-circle-fill"},mr=(()=>{let n=class n{constructor(t){this.cdr=t,this.status="",this.iconType=null}ngOnChanges(t){this.updateIcon()}updateIcon(){this.iconType=this.status?yM[this.status]:null,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-form-item-feedback-icon"]],hostAttrs:[1,"ant-form-item-feedback-icon"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-form-item-feedback-icon-error",r.status==="error")("ant-form-item-feedback-icon-warning",r.status==="warning")("ant-form-item-feedback-icon-success",r.status==="success")("ant-form-item-feedback-icon-validating",r.status==="validating")},inputs:{status:"status"},exportAs:["nzFormFeedbackIcon"],features:[oe],decls:1,vars:1,consts:[["nz-icon","",3,"nzType",4,"ngIf"],["nz-icon","",3,"nzType"]],template:function(i,r){i&1&&_(0,vM,1,1,"span",0),i&2&&h("ngIf",r.iconType)},dependencies:[we,Fe],encapsulation:2,changeDetection:0});let o=n;return o})(),ro=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,Ge]});let o=n;return o})();var db=["*"],CM=["inputElement"],_M=["nz-checkbox",""];function SM(o,n){if(o&1){let e=Q();C(0,"label",1),A("nzCheckedChange",function(i){let s=I(e).$implicit,a=m();return P(a.onCheckedChange(s,i))}),C(1,"span"),Y(2),S()()}if(o&2){let e=n.$implicit,t=m();h("nzDisabled",e.disabled||t.nzDisabled)("nzChecked",e.checked),f(2),ye(e.label)}}var Im=(()=>{let n=class n{constructor(){this.nzOnChange=new O,this.checkboxList=[]}addCheckbox(t){this.checkboxList.push(t)}removeCheckbox(t){this.checkboxList.splice(this.checkboxList.indexOf(t),1)}onChange(){let t=this.checkboxList.filter(i=>i.nzChecked).map(i=>i.nzValue);this.nzOnChange.emit(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-checkbox-wrapper"]],hostAttrs:[1,"ant-checkbox-group"],outputs:{nzOnChange:"nzOnChange"},exportAs:["nzCheckboxWrapper"],standalone:!0,features:[K],ngContentSelectors:db,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Bi=(()=>{let n=class n{innerCheckedChange(t){this.nzDisabled||(this.nzChecked=t,this.onChange(this.nzChecked),this.nzCheckedChange.emit(this.nzChecked),this.nzCheckboxWrapperComponent&&this.nzCheckboxWrapperComponent.onChange())}writeValue(t){this.nzChecked=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r,s,a,l,c){this.ngZone=t,this.elementRef=i,this.nzCheckboxWrapperComponent=r,this.cdr=s,this.focusMonitor=a,this.directionality=l,this.nzFormStatusService=c,this.dir="ltr",this.destroy$=new J,this.isNzDisableFirstChange=!0,this.onChange=()=>{},this.onTouched=()=>{},this.nzCheckedChange=new O,this.nzValue=null,this.nzAutoFocus=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzChecked=!1,this.nzId=null}ngOnInit(){this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched())}),this.nzCheckboxWrapperComponent&&this.nzCheckboxWrapperComponent.addCheckbox(this),this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.preventDefault(),this.focus(),!this.nzDisabled&&this.ngZone.run(()=>{this.innerCheckedChange(!this.nzChecked),this.cdr.markForCheck()})}),Ke(this.inputElement.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>t.stopPropagation())})}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.nzCheckboxWrapperComponent&&this.nzCheckboxWrapperComponent.removeCheckbox(this),this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(Im,8),w(fe),w(Oi),w(Me,8),w(cn,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-checkbox",""]],viewQuery:function(i,r){if(i&1&&xe(CM,7),i&2){let s;ce(s=ue())&&(r.inputElement=s.first)}},hostAttrs:[1,"ant-checkbox-wrapper"],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-checkbox-wrapper-in-form-item",!!r.nzFormStatusService)("ant-checkbox-wrapper-checked",r.nzChecked)("ant-checkbox-rtl",r.dir==="rtl")},inputs:{nzValue:"nzValue",nzAutoFocus:"nzAutoFocus",nzDisabled:"nzDisabled",nzIndeterminate:"nzIndeterminate",nzChecked:"nzChecked",nzId:"nzId"},outputs:{nzCheckedChange:"nzCheckedChange"},exportAs:["nzCheckbox"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],attrs:_M,ngContentSelectors:db,decls:6,vars:11,consts:[[1,"ant-checkbox"],["type","checkbox",1,"ant-checkbox-input",3,"checked","ngModel","disabled","ngModelChange"],["inputElement",""],[1,"ant-checkbox-inner"]],template:function(i,r){i&1&&(Pe(),C(0,"span",0)(1,"input",1,2),A("ngModelChange",function(a){return r.innerCheckedChange(a)}),S(),R(3,"span",3),S(),C(4,"span"),Ie(5),S()),i&2&&(k("ant-checkbox-checked",r.nzChecked&&!r.nzIndeterminate)("ant-checkbox-disabled",r.nzDisabled)("ant-checkbox-indeterminate",r.nzIndeterminate),f(),h("checked",r.nzChecked)("ngModel",r.nzChecked)("disabled",r.nzDisabled),ze("autofocus",r.nzAutoFocus?"autofocus":null)("id",r.nzId))},dependencies:[nn,ym,Kt,Rt],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzIndeterminate",void 0),N([W()],o.prototype,"nzChecked",void 0),o})(),Pm=(()=>{let n=class n{trackByOption(t,i){return i.value}onCheckedChange(t,i){t.checked=i,this.onChange(this.options)}constructor(t,i,r,s){this.elementRef=t,this.focusMonitor=i,this.cdr=r,this.directionality=s,this.onChange=()=>{},this.onTouched=()=>{},this.options=[],this.nzDisabled=!1,this.dir="ltr",this.destroy$=new J,this.isNzDisableFirstChange=!0}ngOnInit(){this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched())}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}writeValue(t){this.options=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Oi),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-checkbox-group"]],hostAttrs:[1,"ant-checkbox-group"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-checkbox-group-rtl",r.dir==="rtl")},inputs:{nzDisabled:"nzDisabled"},exportAs:["nzCheckboxGroup"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],decls:1,vars:2,consts:[["nz-checkbox","","class","ant-checkbox-group-item",3,"nzDisabled","nzChecked","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["nz-checkbox","",1,"ant-checkbox-group-item",3,"nzDisabled","nzChecked","nzCheckedChange"]],template:function(i,r){i&1&&_(0,SM,3,3,"label",0),i&2&&h("ngForOf",r.options)("ngForTrackBy",r.trackByOption)},dependencies:[lt,Bi],encapsulation:2});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),o})(),$i=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Bi,Pm]});let o=n;return o})();var bt={top:new ln({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),topCenter:new ln({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),topLeft:new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),topRight:new ln({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"}),right:new ln({originX:"end",originY:"center"},{overlayX:"start",overlayY:"center"}),rightTop:new ln({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"}),rightBottom:new ln({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"}),bottom:new ln({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"}),bottomCenter:new ln({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"}),bottomLeft:new ln({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),bottomRight:new ln({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"}),left:new ln({originX:"start",originY:"center"},{overlayX:"end",overlayY:"center"}),leftTop:new ln({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"}),leftBottom:new ln({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"})},Mm=[bt.top,bt.right,bt.bottom,bt.left],Wse=[bt.bottomLeft,bt.bottomRight,bt.topLeft,bt.topRight,bt.topCenter,bt.bottomCenter],Use=[new ln({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"bottom"}),new ln({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"})],Kse=[bt.bottomLeft,new ln({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"top"})];function Da(o){for(let n in bt)if(o.connectionPair.originX===bt[n].originX&&o.connectionPair.originY===bt[n].originY&&o.connectionPair.overlayX===bt[n].overlayX&&o.connectionPair.overlayY===bt[n].overlayY)return n}var ql={bottomLeft:new ln({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"},void 0,2),topLeft:new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"},void 0,-2),bottomRight:new ln({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"},void 0,2),topRight:new ln({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"},void 0,-2)},Fm=[ql.bottomLeft,ql.topLeft,ql.bottomRight,ql.topRight],Nr=(()=>{let n=class n{constructor(t,i){this.cdkConnectedOverlay=t,this.nzDestroyService=i,this.nzArrowPointAtCenter=!1,this.cdkConnectedOverlay.backdropClass="nz-overlay-transparent-backdrop",this.cdkConnectedOverlay.positionChange.pipe(F(this.nzDestroyService)).subscribe(r=>{this.nzArrowPointAtCenter&&this.updateArrowPosition(r)})}updateArrowPosition(t){let i=this.getOriginRect(),r=Da(t),s=0,a=0;r==="topLeft"||r==="bottomLeft"?s=i.width/2-14:r==="topRight"||r==="bottomRight"?s=-(i.width/2-14):r==="leftTop"||r==="rightTop"?a=i.height/2-10:(r==="leftBottom"||r==="rightBottom")&&(a=-(i.height/2-10)),(this.cdkConnectedOverlay.offsetX!==s||this.cdkConnectedOverlay.offsetY!==a)&&(this.cdkConnectedOverlay.offsetY=a,this.cdkConnectedOverlay.offsetX=s,this.cdkConnectedOverlay.overlayRef.updatePosition())}getFlexibleConnectedPositionStrategyOrigin(){return this.cdkConnectedOverlay.origin instanceof dr?this.cdkConnectedOverlay.origin.elementRef:this.cdkConnectedOverlay.origin}getOriginRect(){let t=this.getFlexibleConnectedPositionStrategyOrigin();if(t instanceof de)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let i=t.width||0,r=t.height||0;return{top:t.y,bottom:t.y+r,left:t.x,right:t.x+i,height:r,width:i}}};n.\u0275fac=function(i){return new(i||n)(w(oi),w(Pt))},n.\u0275dir=Se({type:n,selectors:[["","cdkConnectedOverlay","","nzConnectedOverlay",""]],inputs:{nzArrowPointAtCenter:"nzArrowPointAtCenter"},exportAs:["nzConnectedOverlay"],features:[Ve([Pt])]});let o=n;return N([W()],o.prototype,"nzArrowPointAtCenter",void 0),o})(),vr=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var wM=["overlay"];function bM(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzTitle)}}function TM(o,n){if(o&1&&(C(0,"div",2)(1,"div",3)(2,"div",4),R(3,"span",5),S(),C(4,"div",6),_(5,bM,2,1,"ng-container",7),S()()()),o&2){let e=m();k("ant-tooltip-rtl",e.dir==="rtl"),h("ngClass",e._classMap)("ngStyle",e.nzOverlayStyle)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),f(3),h("ngStyle",e._contentStyleMap),f(),h("ngStyle",e._contentStyleMap),f(),h("nzStringTemplateOutlet",e.nzTitle)("nzStringTemplateOutletContext",e.nzTitleContext)}}var Su=(()=>{let n=class n{get _title(){return this.title||this.directiveTitle||null}get _content(){return this.content||this.directiveContent||null}get _trigger(){return typeof this.trigger<"u"?this.trigger:"hover"}get _placement(){let t=this.placement;return Array.isArray(t)&&t.length>0?t:typeof t=="string"&&t?[t]:["top"]}get _visible(){return(typeof this.visible<"u"?this.visible:this.internalVisible)||!1}get _mouseEnterDelay(){return this.mouseEnterDelay||.15}get _mouseLeaveDelay(){return this.mouseLeaveDelay||.1}get _overlayClassName(){return this.overlayClassName||null}get _overlayStyle(){return this.overlayStyle||null}getProxyPropertyMap(){return{noAnimation:["noAnimation",()=>!!this.noAnimation]}}constructor(t,i,r,s,a){this.elementRef=t,this.hostView=i,this.renderer=r,this.noAnimation=s,this.nzConfigService=a,this.visibleChange=new O,this.internalVisible=!1,this.destroy$=new J,this.triggerDisposables=[]}ngOnChanges(t){let{trigger:i}=t;i&&!i.isFirstChange()&&this.registerTriggers(),this.component&&this.updatePropertiesByChanges(t)}ngAfterViewInit(){this.createComponent(),this.registerTriggers()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.clearTogglingTimer(),this.removeTriggerListeners()}show(){this.component?.show()}hide(){this.component?.hide()}updatePosition(){this.component&&this.component.updatePosition()}createComponent(){let t=this.componentRef;this.component=t.instance,this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),t.location.nativeElement),this.component.setOverlayOrigin(this.origin||this.elementRef),this.initProperties();let i=this.component.nzVisibleChange.pipe(Bt());i.pipe(F(this.destroy$)).subscribe(r=>{this.internalVisible=r,this.visibleChange.emit(r)}),i.pipe(Qe(r=>r),Os(0,ap),Qe(()=>!!this.component?.overlay?.overlayRef),F(this.destroy$)).subscribe(()=>{this.component?.updatePosition()})}registerTriggers(){let t=this.elementRef.nativeElement,i=this.trigger;if(this.removeTriggerListeners(),i==="hover"){let r;this.triggerDisposables.push(this.renderer.listen(t,"mouseenter",()=>{this.delayEnterLeave(!0,!0,this._mouseEnterDelay)})),this.triggerDisposables.push(this.renderer.listen(t,"mouseleave",()=>{this.delayEnterLeave(!0,!1,this._mouseLeaveDelay),this.component?.overlay.overlayRef&&!r&&(r=this.component.overlay.overlayRef.overlayElement,this.triggerDisposables.push(this.renderer.listen(r,"mouseenter",()=>{this.delayEnterLeave(!1,!0,this._mouseEnterDelay)})),this.triggerDisposables.push(this.renderer.listen(r,"mouseleave",()=>{this.delayEnterLeave(!1,!1,this._mouseLeaveDelay)})))}))}else i==="focus"?(this.triggerDisposables.push(this.renderer.listen(t,"focusin",()=>this.show())),this.triggerDisposables.push(this.renderer.listen(t,"focusout",()=>this.hide()))):i==="click"&&this.triggerDisposables.push(this.renderer.listen(t,"click",r=>{r.preventDefault(),this.show()}))}updatePropertiesByChanges(t){this.updatePropertiesByKeys(Object.keys(t))}updatePropertiesByKeys(t){let i=V({title:["nzTitle",()=>this._title],directiveTitle:["nzTitle",()=>this._title],content:["nzContent",()=>this._content],directiveContent:["nzContent",()=>this._content],trigger:["nzTrigger",()=>this._trigger],placement:["nzPlacement",()=>this._placement],visible:["nzVisible",()=>this._visible],mouseEnterDelay:["nzMouseEnterDelay",()=>this._mouseEnterDelay],mouseLeaveDelay:["nzMouseLeaveDelay",()=>this._mouseLeaveDelay],overlayClassName:["nzOverlayClassName",()=>this._overlayClassName],overlayStyle:["nzOverlayStyle",()=>this._overlayStyle],arrowPointAtCenter:["nzArrowPointAtCenter",()=>this.arrowPointAtCenter],cdkConnectedOverlayPush:["cdkConnectedOverlayPush",()=>this.cdkConnectedOverlayPush]},this.getProxyPropertyMap());(t||Object.keys(i).filter(r=>!r.startsWith("directive"))).forEach(r=>{if(i[r]){let[s,a]=i[r];this.updateComponentValue(s,a())}}),this.component?.updateByDirective()}initProperties(){this.updatePropertiesByKeys()}updateComponentValue(t,i){typeof i<"u"&&(this.component[t]=i)}delayEnterLeave(t,i,r=-1){this.delayTimer?this.clearTogglingTimer():r>0?this.delayTimer=setTimeout(()=>{this.delayTimer=void 0,i?this.show():this.hide()},r*1e3):i&&t?this.show():this.hide()}removeTriggerListeners(){this.triggerDisposables.forEach(t=>t()),this.triggerDisposables.length=0}clearTogglingTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=void 0)}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft),w(st))},n.\u0275dir=Se({type:n,features:[oe]});let o=n;return o})(),EM=(()=>{let n=class n{set nzVisible(t){let i=os(t);this._visible!==i&&(this._visible=i,this.nzVisibleChange.next(i))}get nzVisible(){return this._visible}set nzTrigger(t){this._trigger=t}get nzTrigger(){return this._trigger}set nzPlacement(t){let i=t.map(r=>bt[r]);this._positions=[...i,...Mm]}constructor(t,i,r){this.cdr=t,this.directionality=i,this.noAnimation=r,this.nzTitle=null,this.nzContent=null,this.nzArrowPointAtCenter=!1,this.nzOverlayStyle={},this.nzBackdrop=!1,this.cdkConnectedOverlayPush=!0,this.nzVisibleChange=new J,this._visible=!1,this._trigger="hover",this.preferredPlacement="top",this.dir="ltr",this._classMap={},this._prefix="ant-tooltip",this._positions=[...Mm],this.destroy$=new J}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.nzVisibleChange.complete(),this.destroy$.next(),this.destroy$.complete()}show(){this.nzVisible||(this.isEmpty()||(this.nzVisible=!0,this.nzVisibleChange.next(!0),this.cdr.detectChanges()),this.origin&&this.overlay&&this.overlay.overlayRef&&this.overlay.overlayRef.getDirection()==="rtl"&&this.overlay.overlayRef.setDirection("ltr"))}hide(){this.nzVisible&&(this.nzVisible=!1,this.nzVisibleChange.next(!1),this.cdr.detectChanges())}updateByDirective(){this.updateStyles(),this.cdr.detectChanges(),Promise.resolve().then(()=>{this.updatePosition(),this.updateVisibilityByTitle()})}updatePosition(){this.origin&&this.overlay&&this.overlay.overlayRef&&this.overlay.overlayRef.updatePosition()}onPositionChange(t){this.preferredPlacement=Da(t),this.updateStyles(),this.cdr.detectChanges()}setOverlayOrigin(t){this.origin=t,this.cdr.markForCheck()}onClickOutside(t){!this.origin.nativeElement.contains(t.target)&&this.nzTrigger!==null&&this.hide()}updateVisibilityByTitle(){this.isEmpty()&&this.hide()}updateStyles(){this._classMap={[this.nzOverlayClassName]:!0,[`${this._prefix}-placement-${this.preferredPlacement}`]:!0}}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8),w(ft))},n.\u0275dir=Se({type:n,viewQuery:function(i,r){if(i&1&&xe(wM,5),i&2){let s;ce(s=ue())&&(r.overlay=s.first)}}});let o=n;return o})();function qp(o){return o instanceof En?!1:o===""||!ht(o)}var Si=(()=>{let n=class n extends Su{constructor(t,i,r,s){super(t,i,r,s),this.titleContext=null,this.trigger="hover",this.placement="top",this.cdkConnectedOverlayPush=!0,this.visibleChange=new O,this.componentRef=this.hostView.createComponent(Ql)}getProxyPropertyMap(){return ot(V({},super.getProxyPropertyMap()),{nzTooltipColor:["nzColor",()=>this.nzTooltipColor],titleContext:["nzTitleContext",()=>this.titleContext]})}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft,9))},n.\u0275dir=Se({type:n,selectors:[["","nz-tooltip",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-tooltip-open",r.visible)},inputs:{title:[le.None,"nzTooltipTitle","title"],titleContext:[le.None,"nzTooltipTitleContext","titleContext"],directiveTitle:[le.None,"nz-tooltip","directiveTitle"],trigger:[le.None,"nzTooltipTrigger","trigger"],placement:[le.None,"nzTooltipPlacement","placement"],origin:[le.None,"nzTooltipOrigin","origin"],visible:[le.None,"nzTooltipVisible","visible"],mouseEnterDelay:[le.None,"nzTooltipMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[le.None,"nzTooltipMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[le.None,"nzTooltipOverlayClassName","overlayClassName"],overlayStyle:[le.None,"nzTooltipOverlayStyle","overlayStyle"],arrowPointAtCenter:[le.None,"nzTooltipArrowPointAtCenter","arrowPointAtCenter"],cdkConnectedOverlayPush:"cdkConnectedOverlayPush",nzTooltipColor:"nzTooltipColor"},outputs:{visibleChange:"nzTooltipVisibleChange"},exportAs:["nzTooltip"],standalone:!0,features:[Xe]});let o=n;return N([W()],o.prototype,"arrowPointAtCenter",void 0),N([W()],o.prototype,"cdkConnectedOverlayPush",void 0),o})(),Ql=(()=>{let n=class n extends EM{constructor(t,i,r){super(t,i,r),this.nzTitle=null,this.nzTitleContext=null,this._contentStyleMap={}}isEmpty(){return qp(this.nzTitle)}updateStyles(){let t=this.nzColor&&fp(this.nzColor);this._classMap={[this.nzOverlayClassName]:!0,[`${this._prefix}-placement-${this.preferredPlacement}`]:!0,[`${this._prefix}-${this.nzColor}`]:t},this._contentStyleMap={backgroundColor:this.nzColor&&!t?this.nzColor:null,"--color":this.nzColor}}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-tooltip"]],exportAs:["nzTooltipComponent"],standalone:!0,features:[Xe,K],decls:2,vars:5,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],[1,"ant-tooltip",3,"ngClass","ngStyle","nzNoAnimation"],[1,"ant-tooltip-content"],[1,"ant-tooltip-arrow"],[1,"ant-tooltip-arrow-content",3,"ngStyle"],[1,"ant-tooltip-inner",3,"ngStyle"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"]],template:function(i,r){i&1&&(_(0,TM,6,11,"ng-template",0,1,_e),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.hide()})("positionChange",function(a){return r.onPositionChange(a)})),i&2&&h("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayOpen",r._visible)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayPush",r.cdkConnectedOverlayPush)("nzArrowPointAtCenter",r.nzArrowPointAtCenter)},dependencies:[Fr,oi,St,Zt,ft,Ye,Ue,vr,Nr],encapsulation:2,data:{animation:[Is]},changeDetection:0});let o=n;return o})(),ji=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Ql]});let o=n;return o})();var pb=new hn("WINDOW",{factory:()=>{let{defaultView:o}=ae(gi);if(!o)throw new Error("Window is not available");return o}}),_ae=new hn("PAGE_VISIBILITY`",{factory:()=>{let o=ae(gi);return Ke(o,"visibilitychange").pipe(Ot(0),We(()=>!o.hidden),Bt(),vS())}});var zM=["imgRef"],OM=["imagePreviewWrapper"];function DM(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),R(1,"span",11),S()}if(o&2){let e=n.$implicit,t=m();k("ant-image-preview-operations-operation-disabled",t.zoomOutDisabled&&e.type==="zoomOut"),f(),h("nzType",e.icon)}}function RM(o,n){if(o&1&&R(0,"img",13,14),o&2){let e=m().$implicit,t=m();Re("width",e.width)("height",e.height)("transform",t.previewImageTransform),ze("src",t.sanitizerResourceUrl(e.src),Do)("srcset",e.srcset)("alt",e.alt)}}function IM(o,n){if(o&1&&(H(0),_(1,RM,2,9,"img",12),B()),o&2){let e=n.index,t=m();f(),h("ngIf",t.index===e)}}function PM(o,n){if(o&1){let e=Q();H(0),C(1,"div",15),A("click",function(i){I(e);let r=m();return P(r.onSwitchLeft(i))}),R(2,"span",16),S(),C(3,"div",17),A("click",function(i){I(e);let r=m();return P(r.onSwitchRight(i))}),R(4,"span",18),S(),B()}if(o&2){let e=m();f(),k("ant-image-preview-switch-left-disabled",e.index<=0),f(2),k("ant-image-preview-switch-right-disabled",e.index>=e.images.length-1)}}var Yp={enter:"ant-fade-enter",enterActive:"ant-fade-enter-active",leave:"ant-fade-leave",leaveActive:"ant-fade-leave-active"},MM="ant-image-preview-mask",fb="image";function FM(o){let n={};return o.width<=o.clientWidth&&o.height<=o.clientHeight&&(n={x:0,y:0}),(o.width>o.clientWidth||o.height>o.clientHeight)&&(n={x:hb(o.left,o.width,o.clientWidth),y:hb(o.top,o.height,o.clientHeight)}),n}function AM(o){let n=o.getBoundingClientRect(),e=document.documentElement;return{left:n.left+(window.pageXOffset||e.scrollLeft)-(e.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||e.scrollTop)-(e.clientTop||document.body.clientTop||0)}}function NM(){let o=document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:n}}function hb(o,n,e){let t=o+n,i=(n-e)/2,r=null;return n>e?(o>0&&(r=i),o<0&&te)&&(r=o<0?i:-i),r}var wu=class{constructor(){this.nzKeyboard=!0,this.nzNoAnimation=!1,this.nzMaskClosable=!0,this.nzCloseOnNavigation=!0}},Qp={x:0,y:0},LM=.5,kM=1,VM=0,gb=(()=>{let n=class n{get animationDisabled(){return this.config.nzNoAnimation??!1}get maskClosable(){let t=this.nzConfigService.getConfigForComponent(fb)||{};return this.config.nzMaskClosable??t.nzMaskClosable??!0}constructor(t,i,r,s,a,l,c,u){this.ngZone=t,this.host=i,this.cdr=r,this.nzConfigService=s,this.config=a,this.overlayRef=l,this.destroy$=c,this.sanitizer=u,this._defaultNzZoom=kM,this._defaultNzScaleStep=LM,this._defaultNzRotate=VM,this.images=[],this.index=0,this.isDragging=!1,this.visible=!0,this.animationState="enter",this.animationStateChanged=new O,this.scaleStepMap=new Map,this.previewImageTransform="",this.previewImageWrapperTransform="",this.operations=[{icon:"close",onClick:()=>{this.onClose()},type:"close"},{icon:"zoom-in",onClick:()=>{this.onZoomIn()},type:"zoomIn"},{icon:"zoom-out",onClick:()=>{this.onZoomOut()},type:"zoomOut"},{icon:"rotate-right",onClick:()=>{this.onRotateRight()},type:"rotateRight"},{icon:"rotate-left",onClick:()=>{this.onRotateLeft()},type:"rotateLeft"}],this.zoomOutDisabled=!1,this.position=V({},Qp),this.containerClick=new O,this.closeClick=new O,this.zoom=this.config.nzZoom??this._defaultNzZoom,this.scaleStep=this.config.nzScaleStep??this._defaultNzScaleStep,this.rotate=this.config.nzRotate??this._defaultNzRotate,this.updateZoomOutDisabled(),this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform()}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.host.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.target===t.currentTarget&&this.maskClosable&&this.containerClick.observers.length&&this.ngZone.run(()=>this.containerClick.emit())}),Ke(this.imagePreviewWrapper.nativeElement,"mousedown").pipe(F(this.destroy$)).subscribe(()=>{this.isDragging=!0})})}setImages(t,i){i&&(this.scaleStepMap=i),this.images=t,this.cdr.markForCheck()}switchTo(t){this.index=t,this.cdr.markForCheck()}next(){this.index0&&(this.reset(),this.index--,this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform(),this.updateZoomOutDisabled(),this.cdr.markForCheck())}markForCheck(){this.cdr.markForCheck()}onClose(){this.closeClick.emit()}onZoomIn(){let t=this.scaleStepMap.get(this.images[this.index].src??this.images[this.index].srcset)??this.scaleStep;this.zoom+=t,this.updatePreviewImageTransform(),this.updateZoomOutDisabled(),this.position=V({},Qp)}onZoomOut(){if(this.zoom>1){let t=this.scaleStepMap.get(this.images[this.index].src??this.images[this.index].srcset)??this.scaleStep;this.zoom-=t,this.updatePreviewImageTransform(),this.updateZoomOutDisabled(),this.position=V({},Qp)}}onRotateRight(){this.rotate+=90,this.updatePreviewImageTransform()}onRotateLeft(){this.rotate-=90,this.updatePreviewImageTransform()}onSwitchLeft(t){t.preventDefault(),t.stopPropagation(),this.prev()}onSwitchRight(t){t.preventDefault(),t.stopPropagation(),this.next()}onAnimationStart(t){t.toState==="enter"?this.setEnterAnimationClass():t.toState==="leave"&&this.setLeaveAnimationClass(),this.animationStateChanged.emit(t)}onAnimationDone(t){t.toState==="enter"?this.setEnterAnimationClass():t.toState==="leave"&&this.setLeaveAnimationClass(),this.animationStateChanged.emit(t)}startLeaveAnimation(){this.animationState="leave",this.cdr.markForCheck()}onDragReleased(){this.isDragging=!1;let t=this.imageRef.nativeElement.offsetWidth*this.zoom,i=this.imageRef.nativeElement.offsetHeight*this.zoom,{left:r,top:s}=AM(this.imageRef.nativeElement),{width:a,height:l}=NM(),c=this.rotate%180!==0,d=FM({width:c?i:t,height:c?t:i,left:r,top:s,clientWidth:a,clientHeight:l});(ht(d.x)||ht(d.y))&&(this.position=V(V({},this.position),d))}sanitizerResourceUrl(t){return this.sanitizer.bypassSecurityTrustResourceUrl(t)}updatePreviewImageTransform(){this.previewImageTransform=`scale3d(${this.zoom}, ${this.zoom}, 1) rotate(${this.rotate}deg)`}updatePreviewImageWrapperTransform(){this.previewImageWrapperTransform=`translate3d(${this.position.x}px, ${this.position.y}px, 0)`}updateZoomOutDisabled(){this.zoomOutDisabled=this.zoom<=1}setEnterAnimationClass(){if(this.animationDisabled)return;let t=this.overlayRef.backdropElement;t&&(t.classList.add(Yp.enter),t.classList.add(Yp.enterActive))}setLeaveAnimationClass(){if(this.animationDisabled)return;let t=this.overlayRef.backdropElement;t&&(t.classList.add(Yp.leave),t.classList.add(Yp.leaveActive))}reset(){this.zoom=this.config.nzZoom??this._defaultNzZoom,this.scaleStep=this.config.nzScaleStep??this._defaultNzScaleStep,this.rotate=this.config.nzRotate??this._defaultNzRotate,this.position=V({},Qp)}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(fe),w(st),w(wu),w(_p),w(Pt),w(Ro))},n.\u0275cmp=j({type:n,selectors:[["nz-image-preview"]],viewQuery:function(i,r){if(i&1&&(xe(zM,5),xe(OM,7)),i&2){let s;ce(s=ue())&&(r.imageRef=s.first),ce(s=ue())&&(r.imagePreviewWrapper=s.first)}},hostAttrs:["tabindex","-1","role","document",1,"ant-image-preview-wrap"],hostVars:6,hostBindings:function(i,r){i&1&&OS("@fadeMotion.start",function(a){return r.onAnimationStart(a)})("@fadeMotion.done",function(a){return r.onAnimationDone(a)}),i&2&&(Ta("@.disabled",r.config.nzNoAnimation)("@fadeMotion",r.animationState),Re("z-index",r.config.nzZIndex),k("ant-image-preview-moving",r.isDragging))},exportAs:["nzImagePreview"],standalone:!0,features:[Ve([Pt]),K],decls:11,vars:6,consts:[[1,"ant-image-preview"],["tabindex","0","aria-hidden","true",2,"width","0","height","0","overflow","hidden","outline","none"],[1,"ant-image-preview-content"],[1,"ant-image-preview-body"],[1,"ant-image-preview-operations"],["class","ant-image-preview-operations-operation",3,"ant-image-preview-operations-operation-disabled","click",4,"ngFor","ngForOf"],["cdkDrag","",1,"ant-image-preview-img-wrapper",3,"cdkDragFreeDragPosition","cdkDragReleased"],["imagePreviewWrapper",""],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"ant-image-preview-operations-operation",3,"click"],["nz-icon","","nzTheme","outline",1,"ant-image-preview-operations-icon",3,"nzType"],["cdkDragHandle","","class","ant-image-preview-img",3,"width","height","transform",4,"ngIf"],["cdkDragHandle","",1,"ant-image-preview-img"],["imgRef",""],[1,"ant-image-preview-switch-left",3,"click"],["nz-icon","","nzType","left","nzTheme","outline"],[1,"ant-image-preview-switch-right",3,"click"],["nz-icon","","nzType","right","nzTheme","outline"]],template:function(i,r){i&1&&(C(0,"div",0),R(1,"div",1),C(2,"div",2)(3,"div",3)(4,"ul",4),_(5,DM,2,3,"li",5),S(),C(6,"div",6,7),A("cdkDragReleased",function(){return r.onDragReleased()}),_(8,IM,2,1,"ng-container",8),S(),_(9,PM,5,4,"ng-container",9),S()(),R(10,"div",1),S()),i&2&&(f(5),h("ngForOf",r.operations),f(),Re("transform",r.previewImageWrapperTransform),h("cdkDragFreeDragPosition",r.position),f(2),h("ngForOf",r.images),f(),h("ngIf",r.images.length>1))},dependencies:[lt,Ge,Fe,iw,rw,we],encapsulation:2,data:{animation:[ww]},changeDetection:0});let o=n;return o})(),Nm=class{constructor(n,e,t){this.previewInstance=n,this.config=e,this.overlayRef=t,this.destroy$=new J,t.keydownEvents().pipe(Qe(i=>this.config.nzKeyboard&&(i.keyCode===27||i.keyCode===37||i.keyCode===39)&&!Nl(i))).subscribe(i=>{i.preventDefault(),i.keyCode===27&&this.close(),i.keyCode===37&&this.prev(),i.keyCode===39&&this.next()}),t.detachments().subscribe(()=>{this.overlayRef.dispose()}),n.containerClick.pipe(Zr(1),F(this.destroy$)).subscribe(()=>{this.close()}),n.closeClick.pipe(Zr(1),F(this.destroy$)).subscribe(()=>{this.close()}),n.animationStateChanged.pipe(Qe(i=>i.phaseName==="done"&&i.toState==="leave"),Zr(1)).subscribe(()=>{this.dispose()})}switchTo(n){this.previewInstance.switchTo(n)}next(){this.previewInstance.next()}prev(){this.previewInstance.prev()}close(){this.previewInstance.startLeaveAnimation()}dispose(){this.destroy$.next(),this.overlayRef.dispose()}},Lm=(()=>{let n=class n{constructor(t,i,r,s){this.overlay=t,this.injector=i,this.nzConfigService=r,this.directionality=s}preview(t,i,r){return this.display(t,i,r)}display(t,i,r){let s=V(V({},new wu),i??{}),a=this.createOverlay(s),l=this.attachPreviewComponent(a,s);l.setImages(t,r);let c=new Nm(l,s,a);return l.previewRef=c,c}attachPreviewComponent(t,i){let r=$n.create({parent:this.injector,providers:[{provide:_p,useValue:t},{provide:wu,useValue:i}]}),s=new kl(gb,null,r);return t.attach(s).instance}createOverlay(t){let i=this.nzConfigService.getConfigForComponent(fb)||{},r=new aw({hasBackdrop:!0,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global(),disposeOnNavigation:t.nzCloseOnNavigation??i.nzCloseOnNavigation??!0,backdropClass:MM,direction:t.nzDirection||i.nzDirection||this.directionality.value});return this.overlay.create(r)}};n.\u0275fac=function(i){return new(i||n)(nt(ss),nt($n),nt(st),nt(Me,8))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var mb=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({providers:[Lm],imports:[gb]});let o=n;return o})();var vb=["*"],GM=["inputElement"],HM=["nz-radio",""],Vm=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","nz-radio-button",""]],standalone:!0});let o=n;return o})(),km=(()=>{let n=class n{constructor(){this.selected$=new tn(1),this.touched$=new J,this.disabled$=new tn(1),this.name$=new tn(1)}touch(){this.touched$.next()}select(t){this.selected$.next(t)}setDisabled(t){this.disabled$.next(t)}setName(t){this.name$.next(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),yb=(()=>{let n=class n{constructor(t,i,r){this.cdr=t,this.nzRadioService=i,this.directionality=r,this.value=null,this.destroy$=new J,this.isNzDisableFirstChange=!0,this.onChange=()=>{},this.onTouched=()=>{},this.nzDisabled=!1,this.nzButtonStyle="outline",this.nzSize="default",this.nzName=null,this.dir="ltr"}ngOnInit(){this.nzRadioService.selected$.pipe(F(this.destroy$)).subscribe(t=>{this.value!==t&&(this.value=t,this.onChange(this.value))}),this.nzRadioService.touched$.pipe(F(this.destroy$)).subscribe(()=>{Promise.resolve().then(()=>this.onTouched())}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzDisabled:i,nzName:r}=t;i&&this.nzRadioService.setDisabled(this.nzDisabled),r&&this.nzRadioService.setName(this.nzName)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}writeValue(t){this.value=t,this.nzRadioService.select(t),this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.nzRadioService.setDisabled(this.nzDisabled),this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(km),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-radio-group"]],hostAttrs:[1,"ant-radio-group"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-radio-group-large",r.nzSize==="large")("ant-radio-group-small",r.nzSize==="small")("ant-radio-group-solid",r.nzButtonStyle==="solid")("ant-radio-group-rtl",r.dir==="rtl")},inputs:{nzDisabled:"nzDisabled",nzButtonStyle:"nzButtonStyle",nzSize:"nzSize",nzName:"nzName"},exportAs:["nzRadioGroup"],standalone:!0,features:[Ve([km,{provide:zn,useExisting:pn(()=>n),multi:!0}]),oe,K],ngContentSelectors:vb,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),o})(),ls=(()=>{let n=class n{focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r,s,a,l,c,u){this.ngZone=t,this.elementRef=i,this.cdr=r,this.focusMonitor=s,this.directionality=a,this.nzRadioService=l,this.nzRadioButtonDirective=c,this.nzFormStatusService=u,this.isNgModel=!1,this.destroy$=new J,this.isNzDisableFirstChange=!0,this.isChecked=!1,this.name=null,this.isRadioButton=!!this.nzRadioButtonDirective,this.onChange=()=>{},this.onTouched=()=>{},this.nzValue=null,this.nzDisabled=!1,this.nzAutoFocus=!1,this.dir="ltr"}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}writeValue(t){this.isChecked=t,this.cdr.markForCheck()}registerOnChange(t){this.isNgModel=!0,this.onChange=t}registerOnTouched(t){this.onTouched=t}ngOnInit(){this.nzRadioService&&(this.nzRadioService.name$.pipe(F(this.destroy$)).subscribe(t=>{this.name=t,this.cdr.markForCheck()}),this.nzRadioService.disabled$.pipe(F(this.destroy$)).subscribe(t=>{this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}),this.nzRadioService.selected$.pipe(F(this.destroy$)).subscribe(t=>{let i=this.isChecked;this.isChecked=this.nzValue===t,this.isNgModel&&i!==this.isChecked&&this.isChecked===!1&&this.onChange(!1),this.cdr.markForCheck()})),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t||(Promise.resolve().then(()=>this.onTouched()),this.nzRadioService&&this.nzRadioService.touch())}),this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.setupClickListener()}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.focusMonitor.stopMonitoring(this.elementRef)}setupClickListener(){this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.stopPropagation(),t.preventDefault(),!(this.nzDisabled||this.isChecked)&&this.ngZone.run(()=>{this.focus(),this.nzRadioService?.select(this.nzValue),this.isNgModel&&(this.isChecked=!0,this.onChange(!0)),this.cdr.markForCheck()})})})}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(fe),w(Oi),w(Me,8),w(km,8),w(Vm,8),w(cn,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-radio",""],["","nz-radio-button",""]],viewQuery:function(i,r){if(i&1&&xe(GM,7),i&2){let s;ce(s=ue())&&(r.inputElement=s.first)}},hostVars:18,hostBindings:function(i,r){i&2&&k("ant-radio-wrapper-in-form-item",!!r.nzFormStatusService)("ant-radio-wrapper",!r.isRadioButton)("ant-radio-button-wrapper",r.isRadioButton)("ant-radio-wrapper-checked",r.isChecked&&!r.isRadioButton)("ant-radio-button-wrapper-checked",r.isChecked&&r.isRadioButton)("ant-radio-wrapper-disabled",r.nzDisabled&&!r.isRadioButton)("ant-radio-button-wrapper-disabled",r.nzDisabled&&r.isRadioButton)("ant-radio-wrapper-rtl",!r.isRadioButton&&r.dir==="rtl")("ant-radio-button-wrapper-rtl",r.isRadioButton&&r.dir==="rtl")},inputs:{nzValue:"nzValue",nzDisabled:"nzDisabled",nzAutoFocus:"nzAutoFocus"},exportAs:["nzRadio"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],attrs:HM,ngContentSelectors:vb,decls:6,vars:24,consts:[["type","radio",3,"disabled","checked"],["inputElement",""]],template:function(i,r){i&1&&(Pe(),C(0,"span"),R(1,"input",0,1)(3,"span"),S(),C(4,"span"),Ie(5),S()),i&2&&(k("ant-radio",!r.isRadioButton)("ant-radio-checked",r.isChecked&&!r.isRadioButton)("ant-radio-disabled",r.nzDisabled&&!r.isRadioButton)("ant-radio-button",r.isRadioButton)("ant-radio-button-checked",r.isChecked&&r.isRadioButton)("ant-radio-button-disabled",r.nzDisabled&&r.isRadioButton),f(),k("ant-radio-input",!r.isRadioButton)("ant-radio-button-input",r.isRadioButton),h("disabled",r.nzDisabled)("checked",r.isChecked),ze("autofocus",r.nzAutoFocus?"autofocus":null)("name",r.name),f(2),k("ant-radio-inner",!r.isRadioButton)("ant-radio-button-inner",r.isRadioButton))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),o})(),Jl=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();function BM(o,n){if(o&1){let e=Q();C(0,"span",1),A("click",function(i){I(e);let r=m();return P(r.closeTag(i))}),S()}}var $M=["*"],bu=(()=>{let n=class n{constructor(t,i,r,s){this.cdr=t,this.renderer=i,this.elementRef=r,this.directionality=s,this.isPresetColor=!1,this.nzMode="default",this.nzChecked=!1,this.nzOnClose=new O,this.nzCheckedChange=new O,this.dir="ltr",this.destroy$=new J}updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked))}closeTag(t){this.nzOnClose.emit(t),t.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}clearPresetColor(){let t=this.elementRef.nativeElement,i=new RegExp(`(ant-tag-(?:${[...WS,...jS].join("|")}))`,"g"),r=t.classList.toString(),s=[],a=i.exec(r);for(;a!==null;)s.push(a[1]),a=i.exec(r);t.classList.remove(...s)}setPresetColor(){let t=this.elementRef.nativeElement;this.clearPresetColor(),this.nzColor?this.isPresetColor=fp(this.nzColor)||US(this.nzColor):this.isPresetColor=!1,this.isPresetColor&&t.classList.add(`ant-tag-${this.nzColor}`)}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzColor:i}=t;i&&this.setPresetColor()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(He),w(de),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:10,hostBindings:function(i,r){i&1&&A("click",function(){return r.updateCheckedStatus()}),i&2&&(Re("background-color",r.isPresetColor?"":r.nzColor),k("ant-tag-has-color",r.nzColor&&!r.isPresetColor)("ant-tag-checkable",r.nzMode==="checkable")("ant-tag-checkable-checked",r.nzChecked)("ant-tag-rtl",r.dir==="rtl"))},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:"nzChecked"},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],standalone:!0,features:[oe,K],ngContentSelectors:$M,decls:2,vars:1,consts:[["nz-icon","","nzType","close","class","ant-tag-close-icon","tabindex","-1",3,"click",4,"ngIf"],["nz-icon","","nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(i,r){i&1&&(Pe(),Ie(0),_(1,BM,1,0,"span",0)),i&2&&(f(),h("ngIf",r.nzMode==="closeable"))},dependencies:[Ge,Fe,we],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzChecked",void 0),o})(),Xp=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[bu]});let o=n;return o})();function _b(o,n){if(!o)return"";let e=V({},typeof n=="string"?{mask:n}:n),t=V({0:{pattern:/\d/,default:"0"},9:{pattern:/\d/},"#":{pattern:/[a-zA-Z0-9]/},U:{pattern:/[a-zA-Z]/,transform:r=>r.toLocaleUpperCase()},L:{pattern:/[a-zA-Z]/,transform:r=>r.toLocaleLowerCase()},"*":{pattern:/.*/,transform:r=>"*"}},e.tokens),i=o.split("");return e.mask.split("").reduce((r,s)=>{let a=t[s];if(!a)return r.push(s),r;let l=i.shift()??"";return a.pattern.test(l)?(typeof a.transform=="function"?r.push(a.transform(l)):r.push(l),r):(a.default&&r.push(a.default),r)},[]).join("")}var Ia={num:"(([-+]?\\d+\\.\\d+)|([-+]?\\d+)|([-+]?\\.\\d+))(?:[eE]([-+]?\\d+))?",idCard:"(^\\d{15}$)|(^\\d{17}(?:[0-9]|X)$)",mobile:"^(0|\\+?86|17951)?1[0-9]{10}$",url:"(((^https?:(?://)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+(?::\\d+)?|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:/[\\+~%\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)",ip:"(?:^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$)|(?:^(?:(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)",color:"(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\\b|(?:rgb|hsl)a?\\([^\\)]*\\)",chinese:"[\u4E00-\u9FA5]+"};function Pa(o,n){return new RegExp(`^${o}$`,n)}var oo={num:Pa(Ia.num),idCard:Pa(Ia.idCard,"i"),mobile:Pa(Ia.mobile),url:Pa(Ia.url),ip:Pa(Ia.ip),color:Pa(Ia.color),chinese:Pa(Ia.chinese)};function Sb(o){return oo.num.test(o.toString())}function WM(o){return Sb(o)&&parseInt(o.toString(),10).toString()===o.toString()}function xle(o){return Sb(o)&&!WM(o)}function zle(o){return oo.idCard.test(o)}function Ole(o){return oo.mobile.test(o)}function Dle(o){return oo.url.test(o)}function Rle(o){return oo.ip.test(o)}function Ile(o){return oo.color.test(o)}function Ple(o){return oo.chinese.test(o)}var UM=[{unit:"Q",value:Math.pow(10,15)},{unit:"T",value:Math.pow(10,12)},{unit:"B",value:Math.pow(10,9)},{unit:"M",value:Math.pow(10,6)},{unit:"K",value:1e3}],Zp=(()=>{let n=class n{constructor(t){this.locale=ae(RS),this.defCurrencyCode=ae(IS,{optional:!0})??"USD",this.currencyPipe=new FS(this.locale,this.defCurrencyCode),this.c=t.merge("utilCurrency",{startingUnit:"yuan",megaUnit:{Q:"\u4EAC",T:"\u5146",B:"\u4EBF",M:"\u4E07",K:"\u5343"},precision:2,ingoreZeroPrecision:!0})}format(t,i){i=V({startingUnit:this.c.startingUnit,precision:this.c.precision,ingoreZeroPrecision:this.c.ingoreZeroPrecision,ngCurrency:this.c.ngCurrency},i);let r=Number(t);if(t==null||isNaN(r))return"";if(i.startingUnit==="cent"&&(r=r/100),i.ngCurrency!=null){let a=i.ngCurrency;return this.currencyPipe.transform(r,a.currencyCode,a.display,a.digitsInfo,a.locale||this.locale)}let s=MS(r,this.locale,`.${i.ingoreZeroPrecision?1:i.precision}-${i.precision}`);return i.ingoreZeroPrecision?s.replace(/(?:\.[0]+)$/g,""):s}mega(t,i){i=V({precision:this.c.precision,unitI18n:this.c.megaUnit,startingUnit:this.c.startingUnit},i);let r=Number(t),s={raw:t,value:"",unit:"",unitI18n:""};if(isNaN(r)||r===0)return s.value=t.toString(),s;i.startingUnit==="cent"&&(r=r/100);let a=Math.abs(+r),l=Math.pow(10,i.precision),c=r<0;for(let u of UM){let d=a/u.value;if(d=Math.round(d*l)/l,d>=1){a=d,s.unit=u.unit;break}}return s.value=(c?"-":"")+a,s.unitI18n=i.unitI18n[s.unit],s}cny(t,i){if(i=V({inWords:!0,minusSymbol:"\u8D1F",startingUnit:this.c.startingUnit},i),t=Number(t),isNaN(t))return"";i.startingUnit==="cent"&&(t=t/100),t=t.toString();let r,s;[r,s]=t.split(".");let a="";r.startsWith("-")&&(a=i.minusSymbol,r=r.substring(1)),/^-?\d+$/.test(t)&&(s=null),r=(+r).toString();let l=i.inWords,c={num:l?["","\u58F9","\u8D30","\u53C1","\u8086","\u4F0D","\u9646","\u67D2","\u634C","\u7396","\u70B9"]:["","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u70B9"],radice:l?["","\u62FE","\u4F70","\u4EDF","\u4E07","\u62FE","\u4F70","\u4EDF","\u4EBF","\u62FE","\u4F70","\u4EDF","\u4E07\u4EBF","\u62FE","\u4F70","\u4EDF","\u5146","\u62FE","\u4F70","\u4EDF"]:["","\u5341","\u767E","\u5343","\u4E07","\u5341","\u767E","\u5343","\u4EBF","\u5341","\u767E","\u5343","\u4E07\u4EBF","\u5341","\u767E","\u5343","\u5146","\u5341","\u767E","\u5343"],dec:["\u89D2","\u5206","\u5398","\u6BEB"]};l&&(t=(+t).toFixed(5).toString());let u="",d=r.length;if(r==="0"||d===0)u="\u96F6";else{let y="";for(let x=0;x1&&E!==0&&r[x-1]==="0"?"\u96F6":"",U=E===0&&z%4!==0||r.substring(x-3,x-3+4)==="0000",se=y,ve=c.num[E];y=U?"":c.radice[z],x===0&&ve==="\u4E00"&&y==="\u5341"&&(ve=""),E>1&&ve==="\u4E8C"&&["","\u5341","\u767E"].indexOf(y)===-1&&se!=="\u5341"&&(ve="\u4E24"),u+=G+ve+y}}let p="",g=s?s.toString().length:0;if(s===null)p=l?"\u6574":"";else if(s==="0")p="\u96F6";else for(let y=0;yc.dec.length-1);y++){let x=s[y],E=x==="0"?"\u96F6":"",z=c.num[+x],M=l?c.dec[y]:"";p+=E+z+M}return a+(l?u+(p==="\u96F6"?"\u5143\u6574":`\u5143${p}`):u+(p===""?"":`\u70B9${p}`))}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var wb=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();function qM(o,n){if(o&1){let e=Q();C(0,"label",3),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.change(i))}),Y(1),S()}if(o&2){let e=m(2);h("nzDisabled",e.disabled)("ngModel",e.value),f(),Ne(" ",e.safeOpt.checkbox==null?null:e.safeOpt.checkbox.label," ")}}function YM(o,n){if(o&1){let e=Q();C(0,"label",4),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.change(i))}),Y(1),S()}if(o&2){let e=m(2);h("nzDisabled",e.disabled)("ngModel",e.value),f(),Ne(" ",e.safeOpt.radio==null?null:e.safeOpt.radio.label," ")}}function QM(o,n){if(o&1){let e=Q();C(0,"a",5),A("click",function(i){I(e);let r=m(2);return P(r._link(i))}),S()}if(o&2){let e=m(2);h("innerHTML",e._text,Dt),ze("target",e.safeOpt.link==null?null:e.safeOpt.link.target)("title",e.value)}}function XM(o,n){if(o&1&&(C(0,"nz-tag",6),R(1,"span",7),S()),o&2){let e=m(2);h("nzColor",e.res==null||e.res.result==null?null:e.res.result.color),f(),h("innerHTML",e._text,Dt)}}function ZM(o,n){if(o&1&&R(0,"nz-badge",8),o&2){let e=m(2);Vt("nzText",e._text),h("nzStatus",e.res==null||e.res.result==null?null:e.res.result.color)}}function JM(o,n){}function eF(o,n){if(o&1&&_(0,JM,0,0,"ng-template",9),o&2){let e=m(2);h("data",e.hostData)}}function tF(o,n){if(o&1){let e=Q();C(0,"img",10),A("click",function(){let r=I(e).$implicit,s=m(3);return P(s._showImg(r))}),S()}if(o&2){let e=n.$implicit,t=m(3);k("point",t.safeOpt.img==null?null:t.safeOpt.img.big),ze("src",e,Do)("height",t.safeOpt.img==null?null:t.safeOpt.img.size)("width",t.safeOpt.img==null?null:t.safeOpt.img.size)}}function nF(o,n){if(o&1&&Cn(0,tF,1,5,"img",11,yn),o&2){let e=m(2);_n(e._text)}}function iF(o,n){if(o&1&&R(0,"span",12),o&2){let e=m(3);h("innerText",e._text),ze("title",e.value)}}function rF(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(3);h("innerHTML",e._text,Dt),ze("title",e.value)}}function oF(o,n){if(o&1&&(C(0,"span",14),Y(1),S()),o&2){let e=m(3);f(),ye(e._unit)}}function sF(o,n){if(o&1&&_(0,iF,1,2,"span",12)(1,rF,1,2)(2,oF,2,1,"span",13),o&2){let e=m(2);ie(0,e.isText?0:1),f(2),ie(2,e._unit?2:-1)}}function aF(o,n){if(o&1&&_(0,qM,2,3)(1,YM,2,3)(2,QM,1,3)(3,XM,2,2)(4,ZM,1,2)(5,eF,1,1)(6,nF,2,0)(7,sF,3,2),o&2){let e=m(),t;ie(0,(t=e.safeOpt.type)==="checkbox"?0:t==="radio"?1:t==="link"?2:t==="tag"?3:t==="badge"?4:t==="widget"?5:t==="img"?6:7)}}function lF(o,n){if(o&1&&Y(0),o&2){let e=m(2);Ne(" ",e.safeOpt.default==null?null:e.safeOpt.default.text," ")}}function cF(o,n){}function uF(o,n){if(o&1&&(C(0,"span",15),_(1,cF,0,0,"ng-template",16),S()),o&2){let e=m(3),t=te(1);h("nz-tooltip",e.safeOpt.tooltip),f(),h("ngTemplateOutlet",t)}}function dF(o,n){}function pF(o,n){if(o&1&&_(0,dF,0,0,"ng-template",16),o&2){m(3);let e=te(1);h("ngTemplateOutlet",e)}}function hF(o,n){if(o&1&&_(0,uF,2,2,"span",15)(1,pF,1,1),o&2){let e=m(2);ie(0,e.safeOpt.tooltip?0:1)}}function fF(o,n){if(o&1&&_(0,lF,1,1)(1,hF,2,1),o&2){let e=m();ie(0,e.showDefault?0:1)}}function gF(o,n){o&1&&R(0,"span",2)}function mF(o,n){}function vF(o,n){if(o&1&&_(0,mF,0,0,"ng-template",16),o&2){m();let e=te(3);h("ngTemplateOutlet",e)}}var Gm=(()=>{let n=class n{constructor(t){this.nzI18n=ae(Di),this.currency=ae(Zp),this.dom=ae(Ro),this.widgets={date:{type:"fn",ref:(i,r)=>({text:uw(i,r.date.format,this.nzI18n.getDateLocale())})},mega:{type:"fn",ref:(i,r)=>{let s=this.currency.mega(i,r.mega);return{text:s.value,unit:s.unitI18n}}},currency:{type:"fn",ref:(i,r)=>({text:this.currency.format(i,r.currency)})},cny:{type:"fn",ref:(i,r)=>({text:this.currency.cny(i,r.cny)})},boolean:{type:"fn",ref:(i,r)=>({text:this.dom.bypassSecurityTrustHtml(vw(i,r.boolean))})},img:{type:"fn",ref:i=>({text:Array.isArray(i)?i:[i]})}},this.globalOptions=t.merge("cell",{date:{format:"yyyy-MM-dd HH:mm:ss"},img:{size:32},default:{text:"-"}})}registerWidget(t,i){this.widgets[t]={type:"widget",ref:i}}getWidget(t){return this.widgets[t]}genType(t,i){if(i.type!=null)return i.type;let r=typeof t;return r==="number"&&/^[0-9]{13}$/g.test(t)||t instanceof Date||i.date!=null?"date":i.widget!=null?"widget":i.mega!=null?"mega":i.currency!=null?"currency":i.cny!=null?"cny":i.img!=null?"img":i.link!=null?"link":i.html!=null?"html":i.badge!=null?"badge":i.tag!=null?"tag":i.checkbox!=null?"checkbox":i.radio!=null?"radio":i.enum!=null?"enum":r==="number"?"number":r==="boolean"||i.boolean!=null?"boolean":"string"}fixOptions(t){return GS({},this.globalOptions,t)}get(t,i){let r=this.genType(t,V({},i)),s=this.fixOptions(i);s.type=r;let a=typeof t=="object"&&typeof t?.getTypeName=="function"&&t?.getTypeName()!=null,l={result:typeof t=="object"&&!a?t:{text:t==null?"":a?t:`${t}`},options:s},c=this.widgets[r];return c?.type==="fn"&&(l.result=c.ref(t,s)),(typeof t=="function"?t(t,s):Mn(l.result)).pipe(We(u=>{l.result=u;let d;switch(r){case"badge":d=(s.badge?.data??{})[t],l.result=V({color:"default"},d);break;case"tag":d=(s.tag?.data??{})[t],l.result=d;break;case"enum":l.result={text:(s.enum??{})[t]};break;case"html":l.safeHtml=s.html?.safe;break;case"string":a&&(l.safeHtml="safeHtml");break}return(r==="badge"||r==="tag")&&d?.tooltip!=null&&(l.options.tooltip=d.tooltip),s.mask!=null&&(l.result.text=_b(l.result.text,s.mask)),l}))}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),yF=(()=>{let n=class n{constructor(){this.srv=ae(Gm),this.viewContainerRef=ae(Tn)}ngOnInit(){let t=this.data.options.widget,i=this.srv.getWidget(t.key)?.ref;if(i==null)return;this.viewContainerRef.clear();let r=this.viewContainerRef.createComponent(i);r.instance.data=this.data}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","cell-widget-host",""]],inputs:{data:"data"},standalone:!0});let o=n;return o})(),Hm=(()=>{let n=class n{constructor(){this.srv=ae(Gm),this.router=ae(mi),this.cdr=ae(fe),this.renderer=ae(He),this.imgSrv=ae(Lm),this.win=ae(pb),this.el=ae(de).nativeElement,this.showDefault=!1,this.valueChange=new O,this.loading=!1,this.disabled=!1}get safeOpt(){return this.res?.options??{}}get isText(){return this.res?.safeHtml==="text"}get hostData(){return{value:this.value,options:this.srv.fixOptions(this.options)}}updateValue(){this.destroy$?.unsubscribe(),this.destroy$=this.srv.get(this.value,this.options).subscribe(t=>{this.res=t,this.showDefault=this.value==this.safeOpt.default.condition,this._text=t.result?.text??"",this._unit=t.result?.unit??this.safeOpt?.unit,this.cdr.detectChanges(),this.setClass()})}setClass(){let{el:t,renderer:i}=this,{renderType:r,size:s,type:a}=this.safeOpt;Cw(t,i,{cell:!0,[`cell__${r}`]:r!=null,[`cell__${s}`]:s!=null,"cell__has-unit":this._unit,"cell__has-default":this.showDefault,cell__disabled:this.disabled}),t.setAttribute("data-type",`${a}`)}ngOnChanges(t){Object.keys(t).every(i=>["loading","disabled"].includes(i))?this.setClass():this.updateValue()}change(t){this.value=t,this.valueChange.emit(t)}_link(t){if(t.preventDefault(),t.stopPropagation(),this.disabled)return;let i=this.safeOpt.link,r=i?.url;r!=null&&(/https?:\/\//g.test(r)?this.win.open(r,i?.target):this.router.navigateByUrl(r))}_showImg(t){let i=this.safeOpt.img;if(i==null||i.big==null)return;let r=-1,s=this._text.map((a,l)=>(r===-1&&a===t&&(r=l),typeof i.big=="function"?i.big(a):a));this.imgSrv.preview(s.map(a=>({src:a})),i.previewOptions).switchTo(r)}ngOnDestroy(){this.destroy$?.unsubscribe()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["cell"],["","cell",""]],inputs:{value:"value",options:"options",loading:[le.HasDecoratorInputTransform,"loading","loading",it],disabled:[le.HasDecoratorInputTransform,"disabled","disabled",it]},outputs:{valueChange:"valueChange"},exportAs:["cell"],standalone:!0,features:[fi,oe,K],decls:6,vars:1,consts:[["text",""],["textWrap",""],["nz-icon","","nzType","loading"],["nz-checkbox","",3,"nzDisabled","ngModel","ngModelChange"],["nz-radio","",3,"nzDisabled","ngModel","ngModelChange"],[3,"innerHTML","click"],[3,"nzColor"],[3,"innerHTML"],[3,"nzStatus","nzText"],["cell-widget-host","",3,"data"],[1,"img",3,"click"],["class","img",3,"point"],[3,"innerText"],["class","unit"],[1,"unit"],[3,"nz-tooltip"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,aF,8,1,"ng-template",null,0,_e)(2,fF,2,1,"ng-template",null,1,_e)(4,gF,1,0,"span",2)(5,vF,1,1),i&2&&(f(4),ie(4,r.loading?4:5))},dependencies:[nn,Kt,Rt,Be,Bi,ls,Fe,bu,_u,Si,mb,yF],encapsulation:2,changeDetection:0});let o=n;return o})(),CF=[Hm],bb=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,nn,$i,Jl,Up,Xp,ji,Ge,wb,CF]});let o=n;return o})();function dce(...o){return ba([{provide:wa,multi:!0,useValue:()=>{let n=ae(Gm);o.forEach(e=>n.registerWidget(e.KEY,e.type))}}])}var wF=["nz-menu-item",""],Eb=["*"],bF=["nz-submenu-inline-child",""];function TF(o,n){}var EF=["nz-submenu-none-inline-child",""];function xF(o,n){}var zF=["nz-submenu-title",""];function OF(o,n){if(o&1&&R(0,"span",4),o&2){let e=m();h("nzType",e.nzIcon)}}function DF(o,n){if(o&1&&(H(0),C(1,"span",5),Y(2),S(),B()),o&2){let e=m();f(2),ye(e.nzTitle)}}function RF(o,n){o&1&&R(0,"span",9)}function IF(o,n){o&1&&R(0,"span",10)}function PF(o,n){if(o&1&&(C(0,"span",6),_(1,RF,1,0,"span",7)(2,IF,1,0,"span",8),S()),o&2){let e=m();h("ngSwitch",e.dir),f(),h("ngSwitchCase","rtl")}}function MF(o,n){o&1&&R(0,"span",11)}var FF=["nz-submenu",""];function AF(o,n){o&1&&Ie(0,0,["*ngIf","!nzTitle"])}function NF(o,n){if(o&1&&R(0,"div",6),o&2){let e=m(),t=te(7);h("mode",e.mode)("nzOpen",e.nzOpen)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("menuClass",e.nzMenuClassName)("templateOutlet",t)}}function LF(o,n){if(o&1){let e=Q();C(0,"div",8),A("subMenuMouseState",function(i){I(e);let r=m(2);return P(r.setMouseEnterState(i))}),S()}if(o&2){let e=m(2),t=te(7);h("theme",e.theme)("mode",e.mode)("nzOpen",e.nzOpen)("position",e.position)("nzDisabled",e.nzDisabled)("isMenuInsideDropDown",e.isMenuInsideDropDown)("templateOutlet",t)("menuClass",e.nzMenuClassName)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)}}function kF(o,n){if(o&1){let e=Q();_(0,LF,1,10,"ng-template",7),A("positionChange",function(i){I(e);let r=m();return P(r.onPositionChange(i))})}if(o&2){let e=m(),t=te(1);h("cdkConnectedOverlayPositions",e.overlayPositions)("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayWidth",e.triggerWidth)("cdkConnectedOverlayOpen",e.nzOpen)("cdkConnectedOverlayTransformOriginOn",".ant-menu-submenu")}}function VF(o,n){o&1&&Ie(0,1)}var GF=[[["","title",""]],"*"],HF=["[title]","*"],BF=["titleElement"],$F=["nz-menu-group",""];function jF(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.nzTitle)}}function WF(o,n){o&1&&Ie(0,1,["*ngIf","!nzTitle"])}var UF=["*",[["","title",""]]],KF=["*","[title]"],ao=new hn("NzIsInDropDownMenuToken"),xb=new hn("NzMenuServiceLocalToken"),so=(()=>{let n=class n{constructor(){this.descendantMenuItemClick$=new J,this.childMenuItemClick$=new J,this.theme$=new ct("light"),this.mode$=new ct("vertical"),this.inlineIndent$=new ct(24),this.isChildSubMenuOpen$=new ct(!1)}onDescendantMenuItemClick(t){this.descendantMenuItemClick$.next(t)}onChildMenuItemClick(t){this.childMenuItemClick$.next(t)}setMode(t){this.mode$.next(t)}setTheme(t){this.theme$.next(t)}setInlineIndent(t){this.inlineIndent$.next(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),Bm=(()=>{let n=class n{onChildMenuItemClick(t){this.childMenuItemClick$.next(t)}setOpenStateWithoutDebounce(t){this.isCurrentSubMenuOpen$.next(t)}setMouseEnterTitleOrOverlayState(t){this.isMouseEnterTitleOrOverlay$.next(t)}constructor(t,i,r){this.nzHostSubmenuService=t,this.nzMenuService=i,this.isMenuInsideDropDown=r,this.mode$=this.nzMenuService.mode$.pipe(We(c=>c==="inline"?"inline":c==="vertical"||this.nzHostSubmenuService?"vertical":"horizontal")),this.level=1,this.isCurrentSubMenuOpen$=new ct(!1),this.isChildSubMenuOpen$=new ct(!1),this.isMouseEnterTitleOrOverlay$=new J,this.childMenuItemClick$=new J,this.destroy$=new J,this.nzHostSubmenuService&&(this.level=this.nzHostSubmenuService.level+1);let s=this.childMenuItemClick$.pipe(zo(()=>this.mode$),Qe(c=>c!=="inline"||this.isMenuInsideDropDown),Tl(!1)),a=_t(this.isMouseEnterTitleOrOverlay$,s);Fn([this.isChildSubMenuOpen$,a]).pipe(We(([c,u])=>c||u),zs(150),Bt(),F(this.destroy$)).pipe(Bt()).subscribe(c=>{this.setOpenStateWithoutDebounce(c),this.nzHostSubmenuService?this.nzHostSubmenuService.isChildSubMenuOpen$.next(c):this.nzMenuService.isChildSubMenuOpen$.next(c)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(nt(n,12),nt(so),nt(ao))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),co=(()=>{let n=class n{clickMenuItem(t){this.nzDisabled?(t.preventDefault(),t.stopPropagation()):(this.nzMenuService.onDescendantMenuItemClick(this),this.nzSubmenuService?this.nzSubmenuService.onChildMenuItemClick(this):this.nzMenuService.onChildMenuItemClick(this))}setSelectedState(t){this.nzSelected=t,this.selected$.next(t)}updateRouterActive(){!this.listOfRouterLink||!this.router||!this.router.navigated||!this.nzMatchRouter||Promise.resolve().then(()=>{let t=this.hasActiveLinks();this.nzSelected!==t&&(this.nzSelected=t,this.setSelectedState(this.nzSelected),this.cdr.markForCheck())})}hasActiveLinks(){let t=this.isLinkActive(this.router);return this.routerLink&&t(this.routerLink)||this.listOfRouterLink.some(t)}isLinkActive(t){return i=>t.isActive(i.urlTree||"",{paths:this.nzMatchRouterExact?"exact":"subset",queryParams:this.nzMatchRouterExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"})}constructor(t,i,r,s,a,l,c){this.nzMenuService=t,this.cdr=i,this.nzSubmenuService=r,this.isMenuInsideDropDown=s,this.directionality=a,this.routerLink=l,this.router=c,this.destroy$=new J,this.level=this.nzSubmenuService?this.nzSubmenuService.level+1:1,this.selected$=new J,this.inlinePaddingLeft=null,this.dir="ltr",this.nzDisabled=!1,this.nzSelected=!1,this.nzDanger=!1,this.nzMatchRouterExact=!1,this.nzMatchRouter=!1,c&&this.router.events.pipe(F(this.destroy$),Qe(u=>u instanceof Io)).subscribe(()=>{this.updateRouterActive()})}ngOnInit(){Fn([this.nzMenuService.mode$,this.nzMenuService.inlineIndent$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{this.inlinePaddingLeft=t==="inline"?this.level*i:null}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngAfterContentInit(){this.listOfRouterLink.changes.pipe(F(this.destroy$)).subscribe(()=>this.updateRouterActive()),this.updateRouterActive()}ngOnChanges(t){t.nzSelected&&this.setSelectedState(this.nzSelected)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(so),w(fe),w(Bm,8),w(ao),w(Me,8),w(Po,8),w(mi,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-menu-item",""]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Po,5),i&2){let a;ce(a=ue())&&(r.listOfRouterLink=a)}},hostVars:20,hostBindings:function(i,r){i&1&&A("click",function(a){return r.clickMenuItem(a)}),i&2&&(Re("padding-left",r.dir==="rtl"?null:r.nzPaddingLeft||r.inlinePaddingLeft,"px")("padding-right",r.dir==="rtl"?r.nzPaddingLeft||r.inlinePaddingLeft:null,"px"),k("ant-dropdown-menu-item",r.isMenuInsideDropDown)("ant-dropdown-menu-item-selected",r.isMenuInsideDropDown&&r.nzSelected)("ant-dropdown-menu-item-danger",r.isMenuInsideDropDown&&r.nzDanger)("ant-dropdown-menu-item-disabled",r.isMenuInsideDropDown&&r.nzDisabled)("ant-menu-item",!r.isMenuInsideDropDown)("ant-menu-item-selected",!r.isMenuInsideDropDown&&r.nzSelected)("ant-menu-item-danger",!r.isMenuInsideDropDown&&r.nzDanger)("ant-menu-item-disabled",!r.isMenuInsideDropDown&&r.nzDisabled))},inputs:{nzPaddingLeft:"nzPaddingLeft",nzDisabled:"nzDisabled",nzSelected:"nzSelected",nzDanger:"nzDanger",nzMatchRouterExact:"nzMatchRouterExact",nzMatchRouter:"nzMatchRouter"},exportAs:["nzMenuItem"],standalone:!0,features:[oe,K],attrs:wF,ngContentSelectors:Eb,decls:2,vars:0,consts:[[1,"ant-menu-title-content"]],template:function(i,r){i&1&&(Pe(),C(0,"span",0),Ie(1),S())},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzSelected",void 0),N([W()],o.prototype,"nzDanger",void 0),N([W()],o.prototype,"nzMatchRouterExact",void 0),N([W()],o.prototype,"nzMatchRouter",void 0),o})(),qF=(()=>{let n=class n{constructor(t,i,r){this.elementRef=t,this.renderer=i,this.directionality=r,this.templateOutlet=null,this.menuClass="",this.mode="vertical",this.nzOpen=!1,this.listOfCacheClassName=[],this.expandState="collapsed",this.dir="ltr",this.destroy$=new J}calcMotionState(){this.nzOpen?this.expandState="expanded":this.expandState="collapsed"}ngOnInit(){this.calcMotionState(),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnChanges(t){let{mode:i,nzOpen:r,menuClass:s}=t;(i||r)&&this.calcMotionState(),s&&(this.listOfCacheClassName.length&&this.listOfCacheClassName.filter(a=>!!a).forEach(a=>{this.renderer.removeClass(this.elementRef.nativeElement,a)}),this.menuClass&&(this.listOfCacheClassName=this.menuClass.split(" "),this.listOfCacheClassName.filter(a=>!!a).forEach(a=>{this.renderer.addClass(this.elementRef.nativeElement,a)})))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu-inline-child",""]],hostAttrs:[1,"ant-menu","ant-menu-inline","ant-menu-sub"],hostVars:3,hostBindings:function(i,r){i&2&&(Ta("@collapseMotion",r.expandState),k("ant-menu-rtl",r.dir==="rtl"))},inputs:{templateOutlet:"templateOutlet",menuClass:"menuClass",mode:"mode",nzOpen:"nzOpen"},exportAs:["nzSubmenuInlineChild"],standalone:!0,features:[oe,K],attrs:bF,decls:1,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,TF,0,0,"ng-template",0),i&2&&h("ngTemplateOutlet",r.templateOutlet)},dependencies:[Be],encapsulation:2,data:{animation:[_w]},changeDetection:0});let o=n;return o})(),YF=(()=>{let n=class n{constructor(t){this.directionality=t,this.menuClass="",this.theme="light",this.templateOutlet=null,this.isMenuInsideDropDown=!1,this.mode="vertical",this.position="right",this.nzDisabled=!1,this.nzOpen=!1,this.subMenuMouseState=new O,this.expandState="collapsed",this.dir="ltr",this.destroy$=new J}setMouseState(t){this.nzDisabled||this.subMenuMouseState.next(t)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}calcMotionState(){this.nzOpen?this.mode==="horizontal"?this.expandState="bottom":this.mode==="vertical"&&(this.expandState="active"):this.expandState="collapsed"}ngOnInit(){this.calcMotionState(),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnChanges(t){let{mode:i,nzOpen:r}=t;(i||r)&&this.calcMotionState()}};n.\u0275fac=function(i){return new(i||n)(w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu-none-inline-child",""]],hostAttrs:[1,"ant-menu-submenu","ant-menu-submenu-popup"],hostVars:14,hostBindings:function(i,r){i&1&&A("mouseenter",function(){return r.setMouseState(!0)})("mouseleave",function(){return r.setMouseState(!1)}),i&2&&(Ta("@slideMotion",r.expandState)("@zoomBigMotion",r.expandState),k("ant-menu-light",r.theme==="light")("ant-menu-dark",r.theme==="dark")("ant-menu-submenu-placement-bottom",r.mode==="horizontal")("ant-menu-submenu-placement-right",r.mode==="vertical"&&r.position==="right")("ant-menu-submenu-placement-left",r.mode==="vertical"&&r.position==="left")("ant-menu-submenu-rtl",r.dir==="rtl"))},inputs:{menuClass:"menuClass",theme:"theme",templateOutlet:"templateOutlet",isMenuInsideDropDown:"isMenuInsideDropDown",mode:"mode",position:"position",nzDisabled:"nzDisabled",nzOpen:"nzOpen"},outputs:{subMenuMouseState:"subMenuMouseState"},exportAs:["nzSubmenuNoneInlineChild"],standalone:!0,features:[oe,K],attrs:EF,decls:2,vars:16,consts:[[3,"ngClass"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,xF,0,0,"ng-template",1),S()),i&2&&(k("ant-dropdown-menu",r.isMenuInsideDropDown)("ant-menu",!r.isMenuInsideDropDown)("ant-dropdown-menu-vertical",r.isMenuInsideDropDown)("ant-menu-vertical",!r.isMenuInsideDropDown)("ant-dropdown-menu-sub",r.isMenuInsideDropDown)("ant-menu-sub",!r.isMenuInsideDropDown)("ant-menu-rtl",r.dir==="rtl"),h("ngClass",r.menuClass),f(),h("ngTemplateOutlet",r.templateOutlet))},dependencies:[St,Be],encapsulation:2,data:{animation:[Is,Mo]},changeDetection:0});let o=n;return o})(),zb=(()=>{let n=class n{constructor(t,i){this.cdr=t,this.directionality=i,this.nzIcon=null,this.nzTitle=null,this.isMenuInsideDropDown=!1,this.nzDisabled=!1,this.paddingLeft=null,this.mode="vertical",this.toggleSubMenu=new O,this.subMenuMouseState=new O,this.dir="ltr",this.destroy$=new J}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setMouseState(t){this.nzDisabled||this.subMenuMouseState.next(t)}clickTitle(){this.mode==="inline"&&!this.nzDisabled&&this.toggleSubMenu.emit()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu-title",""]],hostVars:8,hostBindings:function(i,r){i&1&&A("click",function(){return r.clickTitle()})("mouseenter",function(){return r.setMouseState(!0)})("mouseleave",function(){return r.setMouseState(!1)}),i&2&&(Re("padding-left",r.dir==="rtl"?null:r.paddingLeft,"px")("padding-right",r.dir==="rtl"?r.paddingLeft:null,"px"),k("ant-dropdown-menu-submenu-title",r.isMenuInsideDropDown)("ant-menu-submenu-title",!r.isMenuInsideDropDown))},inputs:{nzIcon:"nzIcon",nzTitle:"nzTitle",isMenuInsideDropDown:"isMenuInsideDropDown",nzDisabled:"nzDisabled",paddingLeft:"paddingLeft",mode:"mode"},outputs:{toggleSubMenu:"toggleSubMenu",subMenuMouseState:"subMenuMouseState"},exportAs:["nzSubmenuTitle"],standalone:!0,features:[K],attrs:zF,ngContentSelectors:Eb,decls:6,vars:4,consts:[["nz-icon","",3,"nzType",4,"ngIf"],[4,"nzStringTemplateOutlet"],["class","ant-dropdown-menu-submenu-expand-icon",3,"ngSwitch",4,"ngIf","ngIfElse"],["notDropdownTpl",""],["nz-icon","",3,"nzType"],[1,"ant-menu-title-content"],[1,"ant-dropdown-menu-submenu-expand-icon",3,"ngSwitch"],["nz-icon","","nzType","left","class","ant-dropdown-menu-submenu-arrow-icon",4,"ngSwitchCase"],["nz-icon","","nzType","right","class","ant-dropdown-menu-submenu-arrow-icon",4,"ngSwitchDefault"],["nz-icon","","nzType","left",1,"ant-dropdown-menu-submenu-arrow-icon"],["nz-icon","","nzType","right",1,"ant-dropdown-menu-submenu-arrow-icon"],[1,"ant-menu-submenu-arrow"]],template:function(i,r){if(i&1&&(Pe(),_(0,OF,1,1,"span",0)(1,DF,3,1,"ng-container",1),Ie(2),_(3,PF,3,2,"span",2)(4,MF,1,0,"ng-template",null,3,_e)),i&2){let s=te(5);h("ngIf",r.nzIcon),f(),h("nzStringTemplateOutlet",r.nzTitle),f(2),h("ngIf",r.isMenuInsideDropDown)("ngIfElse",s)}},dependencies:[Ge,Fe,we,Ye,Ue,jn,Wn,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),Tb=[bt.rightTop,bt.right,bt.rightBottom,bt.leftTop,bt.left,bt.leftBottom],QF=[bt.bottomLeft,bt.bottomRight,bt.topRight,bt.topLeft],Jp=(()=>{let n=class n{setOpenStateWithoutDebounce(t){this.nzSubmenuService.setOpenStateWithoutDebounce(t)}toggleSubMenu(){this.setOpenStateWithoutDebounce(!this.nzOpen)}setMouseEnterState(t){this.isActive=t,this.mode!=="inline"&&this.nzSubmenuService.setMouseEnterTitleOrOverlayState(t)}setTriggerWidth(){this.mode==="horizontal"&&this.platform.isBrowser&&this.cdkOverlayOrigin&&this.nzPlacement==="bottomLeft"&&(this.triggerWidth=this.cdkOverlayOrigin.nativeElement.getBoundingClientRect().width)}onPositionChange(t){let i=Da(t);i==="rightTop"||i==="rightBottom"||i==="right"?this.position="right":(i==="leftTop"||i==="leftBottom"||i==="left")&&(this.position="left")}constructor(t,i,r,s,a,l,c){this.nzMenuService=t,this.cdr=i,this.nzSubmenuService=r,this.platform=s,this.isMenuInsideDropDown=a,this.directionality=l,this.noAnimation=c,this.nzMenuClassName="",this.nzPaddingLeft=null,this.nzTitle=null,this.nzIcon=null,this.nzOpen=!1,this.nzDisabled=!1,this.nzPlacement="bottomLeft",this.nzOpenChange=new O,this.cdkOverlayOrigin=null,this.listOfNzSubMenuComponent=null,this.listOfNzMenuItemDirective=null,this.level=this.nzSubmenuService.level,this.destroy$=new J,this.position="right",this.triggerWidth=null,this.theme="light",this.mode="vertical",this.inlinePaddingLeft=null,this.overlayPositions=Tb,this.isSelected=!1,this.isActive=!1,this.dir="ltr"}ngOnInit(){this.nzMenuService.theme$.pipe(F(this.destroy$)).subscribe(t=>{this.theme=t,this.cdr.markForCheck()}),this.nzSubmenuService.mode$.pipe(F(this.destroy$)).subscribe(t=>{this.mode=t,t==="horizontal"?this.overlayPositions=[bt[this.nzPlacement],...QF]:t==="vertical"&&(this.overlayPositions=Tb),this.cdr.markForCheck()}),Fn([this.nzSubmenuService.mode$,this.nzMenuService.inlineIndent$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{this.inlinePaddingLeft=t==="inline"?this.level*i:null,this.cdr.markForCheck()}),this.nzSubmenuService.isCurrentSubMenuOpen$.pipe(F(this.destroy$)).subscribe(t=>{this.isActive=t,t!==this.nzOpen&&(this.setTriggerWidth(),this.nzOpen=t,this.nzOpenChange.emit(this.nzOpen),this.cdr.markForCheck())}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.markForCheck()})}ngAfterContentInit(){this.setTriggerWidth();let t=this.listOfNzMenuItemDirective,i=t.changes,r=_t(i,...t.map(s=>s.selected$));i.pipe(Ot(t),on(()=>r),Ot(!0),We(()=>t.some(s=>s.nzSelected)),F(this.destroy$)).subscribe(s=>{this.isSelected=s,this.cdr.markForCheck()})}ngOnChanges(t){let{nzOpen:i}=t;i&&(this.nzSubmenuService.setOpenStateWithoutDebounce(this.nzOpen),this.setTriggerWidth())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(so),w(fe),w(Bm),w(gn),w(ao),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu",""]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,n,5),Ft(s,co,5)),i&2){let a;ce(a=ue())&&(r.listOfNzSubMenuComponent=a),ce(a=ue())&&(r.listOfNzMenuItemDirective=a)}},viewQuery:function(i,r){if(i&1&&xe(dr,7,de),i&2){let s;ce(s=ue())&&(r.cdkOverlayOrigin=s.first)}},hostVars:34,hostBindings:function(i,r){i&2&&k("ant-dropdown-menu-submenu",r.isMenuInsideDropDown)("ant-dropdown-menu-submenu-disabled",r.isMenuInsideDropDown&&r.nzDisabled)("ant-dropdown-menu-submenu-open",r.isMenuInsideDropDown&&r.nzOpen)("ant-dropdown-menu-submenu-selected",r.isMenuInsideDropDown&&r.isSelected)("ant-dropdown-menu-submenu-vertical",r.isMenuInsideDropDown&&r.mode==="vertical")("ant-dropdown-menu-submenu-horizontal",r.isMenuInsideDropDown&&r.mode==="horizontal")("ant-dropdown-menu-submenu-inline",r.isMenuInsideDropDown&&r.mode==="inline")("ant-dropdown-menu-submenu-active",r.isMenuInsideDropDown&&r.isActive)("ant-menu-submenu",!r.isMenuInsideDropDown)("ant-menu-submenu-disabled",!r.isMenuInsideDropDown&&r.nzDisabled)("ant-menu-submenu-open",!r.isMenuInsideDropDown&&r.nzOpen)("ant-menu-submenu-selected",!r.isMenuInsideDropDown&&r.isSelected)("ant-menu-submenu-vertical",!r.isMenuInsideDropDown&&r.mode==="vertical")("ant-menu-submenu-horizontal",!r.isMenuInsideDropDown&&r.mode==="horizontal")("ant-menu-submenu-inline",!r.isMenuInsideDropDown&&r.mode==="inline")("ant-menu-submenu-active",!r.isMenuInsideDropDown&&r.isActive)("ant-menu-submenu-rtl",r.dir==="rtl")},inputs:{nzMenuClassName:"nzMenuClassName",nzPaddingLeft:"nzPaddingLeft",nzTitle:"nzTitle",nzIcon:"nzIcon",nzOpen:"nzOpen",nzDisabled:"nzDisabled",nzPlacement:"nzPlacement"},outputs:{nzOpenChange:"nzOpenChange"},exportAs:["nzSubmenu"],standalone:!0,features:[Ve([Bm]),oe,K],attrs:FF,ngContentSelectors:HF,decls:8,vars:9,consts:[["nz-submenu-title","","cdkOverlayOrigin","",3,"nzIcon","nzTitle","mode","nzDisabled","isMenuInsideDropDown","paddingLeft","subMenuMouseState","toggleSubMenu"],["origin","cdkOverlayOrigin"],[4,"ngIf"],["nz-submenu-inline-child","",3,"mode","nzOpen","nzNoAnimation","menuClass","templateOutlet",4,"ngIf","ngIfElse"],["nonInlineTemplate",""],["subMenuTemplate",""],["nz-submenu-inline-child","",3,"mode","nzOpen","nzNoAnimation","menuClass","templateOutlet"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayPositions","cdkConnectedOverlayOrigin","cdkConnectedOverlayWidth","cdkConnectedOverlayOpen","cdkConnectedOverlayTransformOriginOn","positionChange"],["nz-submenu-none-inline-child","",3,"theme","mode","nzOpen","position","nzDisabled","isMenuInsideDropDown","templateOutlet","menuClass","nzNoAnimation","subMenuMouseState"]],template:function(i,r){if(i&1&&(Pe(GF),C(0,"div",0,1),A("subMenuMouseState",function(a){return r.setMouseEnterState(a)})("toggleSubMenu",function(){return r.toggleSubMenu()}),_(2,AF,1,0,"ng-content",2),S(),_(3,NF,1,6,"div",3)(4,kF,1,5,"ng-template",null,4,_e)(6,VF,1,0,"ng-template",null,5,_e)),i&2){let s=te(5);h("nzIcon",r.nzIcon)("nzTitle",r.nzTitle)("mode",r.mode)("nzDisabled",r.nzDisabled)("isMenuInsideDropDown",r.isMenuInsideDropDown)("paddingLeft",r.nzPaddingLeft||r.inlinePaddingLeft),f(2),h("ngIf",!r.nzTitle),f(),h("ngIf",r.mode==="inline")("ngIfElse",s)}},dependencies:[zb,qF,we,ft,YF,Fr,oi,dr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzOpen",void 0),N([W()],o.prototype,"nzDisabled",void 0),o})();function XF(){let o=ae(so,{skipSelf:!0,optional:!0}),n=ae(xb);return o??n}function ZF(){return ae(ao,{skipSelf:!0,optional:!0})??!1}var cs=(()=>{let n=class n{setInlineCollapsed(t){this.nzInlineCollapsed=t,this.inlineCollapsed$.next(t)}updateInlineCollapse(){this.listOfNzMenuItemDirective&&(this.nzInlineCollapsed?(this.listOfOpenedNzSubMenuComponent=this.listOfNzSubMenuComponent.filter(t=>t.nzOpen),this.listOfNzSubMenuComponent.forEach(t=>t.setOpenStateWithoutDebounce(!1))):(this.listOfOpenedNzSubMenuComponent.forEach(t=>t.setOpenStateWithoutDebounce(!0)),this.listOfOpenedNzSubMenuComponent=[]))}constructor(t,i,r,s){this.nzMenuService=t,this.isMenuInsideDropDown=i,this.cdr=r,this.directionality=s,this.nzInlineIndent=24,this.nzTheme="light",this.nzMode="vertical",this.nzInlineCollapsed=!1,this.nzSelectable=!this.isMenuInsideDropDown,this.nzClick=new O,this.actualMode="vertical",this.dir="ltr",this.inlineCollapsed$=new ct(this.nzInlineCollapsed),this.mode$=new ct(this.nzMode),this.destroy$=new J,this.listOfOpenedNzSubMenuComponent=[]}ngOnInit(){Fn([this.inlineCollapsed$,this.mode$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{this.actualMode=t?"vertical":i,this.nzMenuService.setMode(this.actualMode),this.cdr.markForCheck()}),this.nzMenuService.descendantMenuItemClick$.pipe(F(this.destroy$)).subscribe(t=>{this.nzClick.emit(t),this.nzSelectable&&!t.nzMatchRouter&&this.listOfNzMenuItemDirective.forEach(i=>i.setSelectedState(i===t))}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.nzMenuService.setMode(this.actualMode),this.cdr.markForCheck()})}ngAfterContentInit(){this.inlineCollapsed$.pipe(F(this.destroy$)).subscribe(()=>{this.updateInlineCollapse(),this.cdr.markForCheck()})}ngOnChanges(t){let{nzInlineCollapsed:i,nzInlineIndent:r,nzTheme:s,nzMode:a}=t;i&&this.inlineCollapsed$.next(this.nzInlineCollapsed),r&&this.nzMenuService.setInlineIndent(this.nzInlineIndent),s&&this.nzMenuService.setTheme(this.nzTheme),a&&(this.mode$.next(this.nzMode),!t.nzMode.isFirstChange()&&this.listOfNzSubMenuComponent&&this.listOfNzSubMenuComponent.forEach(l=>l.setOpenStateWithoutDebounce(!1)))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(so),w(ao),w(fe),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-menu",""]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,co,5),Ft(s,Jp,5)),i&2){let a;ce(a=ue())&&(r.listOfNzMenuItemDirective=a),ce(a=ue())&&(r.listOfNzSubMenuComponent=a)}},hostVars:34,hostBindings:function(i,r){i&2&&k("ant-dropdown-menu",r.isMenuInsideDropDown)("ant-dropdown-menu-root",r.isMenuInsideDropDown)("ant-dropdown-menu-light",r.isMenuInsideDropDown&&r.nzTheme==="light")("ant-dropdown-menu-dark",r.isMenuInsideDropDown&&r.nzTheme==="dark")("ant-dropdown-menu-vertical",r.isMenuInsideDropDown&&r.actualMode==="vertical")("ant-dropdown-menu-horizontal",r.isMenuInsideDropDown&&r.actualMode==="horizontal")("ant-dropdown-menu-inline",r.isMenuInsideDropDown&&r.actualMode==="inline")("ant-dropdown-menu-inline-collapsed",r.isMenuInsideDropDown&&r.nzInlineCollapsed)("ant-menu",!r.isMenuInsideDropDown)("ant-menu-root",!r.isMenuInsideDropDown)("ant-menu-light",!r.isMenuInsideDropDown&&r.nzTheme==="light")("ant-menu-dark",!r.isMenuInsideDropDown&&r.nzTheme==="dark")("ant-menu-vertical",!r.isMenuInsideDropDown&&r.actualMode==="vertical")("ant-menu-horizontal",!r.isMenuInsideDropDown&&r.actualMode==="horizontal")("ant-menu-inline",!r.isMenuInsideDropDown&&r.actualMode==="inline")("ant-menu-inline-collapsed",!r.isMenuInsideDropDown&&r.nzInlineCollapsed)("ant-menu-rtl",r.dir==="rtl")},inputs:{nzInlineIndent:"nzInlineIndent",nzTheme:"nzTheme",nzMode:"nzMode",nzInlineCollapsed:"nzInlineCollapsed",nzSelectable:"nzSelectable"},outputs:{nzClick:"nzClick"},exportAs:["nzMenu"],standalone:!0,features:[Ve([{provide:xb,useClass:so},{provide:so,useFactory:XF},{provide:ao,useFactory:ZF}]),oe]});let o=n;return N([W()],o.prototype,"nzInlineCollapsed",void 0),N([W()],o.prototype,"nzSelectable",void 0),o})();function JF(){return ae(ao,{optional:!0,skipSelf:!0})??!1}var e1=(()=>{let n=class n{constructor(t,i,r){this.elementRef=t,this.renderer=i,this.isMenuInsideDropDown=r;let s=this.isMenuInsideDropDown?"ant-dropdown-menu-item-group":"ant-menu-item-group";this.renderer.addClass(t.nativeElement,s)}ngAfterViewInit(){let t=this.titleElement.nativeElement.nextElementSibling;if(t){let i=this.isMenuInsideDropDown?"ant-dropdown-menu-item-group-list":"ant-menu-item-group-list";this.renderer.addClass(t,i)}}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(ao))},n.\u0275cmp=j({type:n,selectors:[["","nz-menu-group",""]],viewQuery:function(i,r){if(i&1&&xe(BF,5),i&2){let s;ce(s=ue())&&(r.titleElement=s.first)}},inputs:{nzTitle:"nzTitle"},exportAs:["nzMenuGroup"],standalone:!0,features:[Ve([{provide:ao,useFactory:JF}]),K],attrs:$F,ngContentSelectors:KF,decls:5,vars:6,consts:[["titleElement",""],[4,"nzStringTemplateOutlet"],[4,"ngIf"]],template:function(i,r){i&1&&(Pe(UF),C(0,"div",null,0),_(2,jF,2,1,"ng-container",1)(3,WF,1,0,"ng-content",2),S(),Ie(4)),i&2&&(k("ant-menu-item-group-title",!r.isMenuInsideDropDown)("ant-dropdown-menu-item-group-title",r.isMenuInsideDropDown),f(2),h("nzStringTemplateOutlet",r.nzTitle),f(),h("ngIf",!r.nzTitle))},dependencies:[Ye,Ue,we],encapsulation:2,changeDetection:0});let o=n;return o})(),Ob=(()=>{let n=class n{constructor(t){this.elementRef=t}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275dir=Se({type:n,selectors:[["","nz-menu-divider",""]],hostAttrs:[1,"ant-dropdown-menu-item-divider"],exportAs:["nzMenuDivider"],standalone:!0});let o=n;return o})(),ec=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Jp,e1,zb]});let o=n;return o})();function t1(o,n){if(o&1){let e=Q();C(0,"div",0),A("@slideMotion.done",function(i){I(e);let r=m();return P(r.onAnimationEvent(i))})("mouseenter",function(){I(e);let i=m();return P(i.setMouseState(!0))})("mouseleave",function(){I(e);let i=m();return P(i.setMouseState(!1))}),Ie(1),S()}if(o&2){let e=m();k("ant-dropdown-rtl",e.dir==="rtl"),h("ngClass",e.nzOverlayClassName)("ngStyle",e.nzOverlayStyle)("@slideMotion",void 0)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)}}var n1=["*"],i1="dropDown",r1=[bt.bottomLeft,bt.bottomRight,bt.topRight,bt.topLeft],yr=(()=>{let n=class n{setDropdownMenuValue(t,i){this.nzDropdownMenu&&this.nzDropdownMenu.setValue(t,i)}constructor(t,i,r,s,a,l){this.nzConfigService=t,this.elementRef=i,this.overlay=r,this.renderer=s,this.viewContainerRef=a,this.platform=l,this._nzModuleName=i1,this.overlayRef=null,this.destroy$=new J,this.positionStrategy=this.overlay.position().flexibleConnectedTo(this.elementRef.nativeElement).withLockedPosition().withTransformOriginOn(".ant-dropdown"),this.inputVisible$=new ct(!1),this.nzTrigger$=new ct("hover"),this.overlayClose$=new J,this.nzDropdownMenu=null,this.nzTrigger="hover",this.nzMatchWidthElement=null,this.nzBackdrop=!1,this.nzClickHide=!0,this.nzDisabled=!1,this.nzVisible=!1,this.nzOverlayClassName="",this.nzOverlayStyle={},this.nzPlacement="bottomLeft",this.nzVisibleChange=new O}ngAfterViewInit(){if(this.nzDropdownMenu){let t=this.elementRef.nativeElement,i=_t(Ke(t,"mouseenter").pipe(Tl(!0)),Ke(t,"mouseleave").pipe(Tl(!1))),r=this.nzDropdownMenu.mouseState$,s=_t(r,i),a=Ke(t,"click").pipe(We(()=>!this.nzVisible)),l=this.nzTrigger$.pipe(on(p=>p==="hover"?s:p==="click"?a:xs)),c=this.nzDropdownMenu.descendantMenuItemClick$.pipe(Qe(()=>this.nzClickHide),Tl(!1)),u=_t(l,c,this.overlayClose$).pipe(Qe(()=>!this.nzDisabled)),d=_t(this.inputVisible$,u);Fn([d,this.nzDropdownMenu.isChildSubMenuOpen$]).pipe(We(([p,g])=>p||g),zs(150),Bt(),Qe(()=>this.platform.isBrowser),F(this.destroy$)).subscribe(p=>{let v=(this.nzMatchWidthElement?this.nzMatchWidthElement.nativeElement:t).getBoundingClientRect().width;if(this.nzVisible!==p&&this.nzVisibleChange.emit(p),this.nzVisible=p,p){if(!this.overlayRef)this.overlayRef=this.overlay.create({positionStrategy:this.positionStrategy,minWidth:v,disposeOnNavigation:!0,hasBackdrop:this.nzBackdrop&&this.nzTrigger==="click",scrollStrategy:this.overlay.scrollStrategies.reposition()}),_t(this.overlayRef.backdropClick(),this.overlayRef.detachments(),this.overlayRef.outsidePointerEvents().pipe(Qe(y=>!this.elementRef.nativeElement.contains(y.target))),this.overlayRef.keydownEvents().pipe(Qe(y=>y.keyCode===27&&!Nl(y)))).pipe(F(this.destroy$)).subscribe(()=>{this.overlayClose$.next(!1)});else{let y=this.overlayRef.getConfig();y.minWidth=v}this.positionStrategy.withPositions([bt[this.nzPlacement],...r1]),(!this.portal||this.portal.templateRef!==this.nzDropdownMenu.templateRef)&&(this.portal=new au(this.nzDropdownMenu.templateRef,this.viewContainerRef)),this.overlayRef.attach(this.portal)}else this.overlayRef&&this.overlayRef.detach()}),this.nzDropdownMenu.animationStateChange$.pipe(F(this.destroy$)).subscribe(p=>{p.toState==="void"&&(this.overlayRef&&this.overlayRef.dispose(),this.overlayRef=null)})}}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete(),this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}ngOnChanges(t){let{nzVisible:i,nzDisabled:r,nzOverlayClassName:s,nzOverlayStyle:a,nzTrigger:l}=t;if(l&&this.nzTrigger$.next(this.nzTrigger),i&&this.inputVisible$.next(this.nzVisible),r){let c=this.elementRef.nativeElement;this.nzDisabled?(this.renderer.setAttribute(c,"disabled",""),this.inputVisible$.next(!1)):this.renderer.removeAttribute(c,"disabled")}s&&this.setDropdownMenuValue("nzOverlayClassName",this.nzOverlayClassName),a&&this.setDropdownMenuValue("nzOverlayStyle",this.nzOverlayStyle)}};n.\u0275fac=function(i){return new(i||n)(w(st),w(de),w(ss),w(He),w(Tn),w(gn))},n.\u0275dir=Se({type:n,selectors:[["","nz-dropdown",""]],hostAttrs:[1,"ant-dropdown-trigger"],inputs:{nzDropdownMenu:"nzDropdownMenu",nzTrigger:"nzTrigger",nzMatchWidthElement:"nzMatchWidthElement",nzBackdrop:"nzBackdrop",nzClickHide:"nzClickHide",nzDisabled:"nzDisabled",nzVisible:"nzVisible",nzOverlayClassName:"nzOverlayClassName",nzOverlayStyle:"nzOverlayStyle",nzPlacement:"nzPlacement"},outputs:{nzVisibleChange:"nzVisibleChange"},exportAs:["nzDropdown"],standalone:!0,features:[oe]});let o=n;return N([De(),W()],o.prototype,"nzBackdrop",void 0),N([W()],o.prototype,"nzClickHide",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzVisible",void 0),o})(),Db=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})(),Rb=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["a","nz-dropdown",""]],hostAttrs:[1,"ant-dropdown-link"],standalone:!0});let o=n;return o})();var us=(()=>{let n=class n{onAnimationEvent(t){this.animationStateChange$.emit(t)}setMouseState(t){this.mouseState$.next(t)}setValue(t,i){this[t]=i,this.cdr.markForCheck()}constructor(t,i,r,s,a,l,c){this.cdr=t,this.elementRef=i,this.renderer=r,this.viewContainerRef=s,this.nzMenuService=a,this.directionality=l,this.noAnimation=c,this.mouseState$=new ct(!1),this.isChildSubMenuOpen$=this.nzMenuService.isChildSubMenuOpen$,this.descendantMenuItemClick$=this.nzMenuService.descendantMenuItemClick$,this.animationStateChange$=new O,this.nzOverlayClassName="",this.nzOverlayStyle={},this.dir="ltr",this.destroy$=new J}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterContentInit(){this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(de),w(He),w(Tn),w(so),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-dropdown-menu"]],viewQuery:function(i,r){if(i&1&&xe(En,7),i&2){let s;ce(s=ue())&&(r.templateRef=s.first)}},exportAs:["nzDropdownMenu"],standalone:!0,features:[Ve([so,{provide:ao,useValue:!0}]),K],ngContentSelectors:n1,decls:1,vars:0,consts:[[1,"ant-dropdown",3,"ngClass","ngStyle","nzNoAnimation","mouseenter","mouseleave"]],template:function(i,r){i&1&&(Pe(),_(0,t1,2,7,"ng-template"))},dependencies:[St,Zt,ft],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return o})(),Lr=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Db,ec]});let o=n;return o})(),o1=[new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"top"}),new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),new ln({originX:"start",originY:"top"},{overlayX:"end",overlayY:"bottom"}),new ln({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"})],Ib=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.overlay=i,this.overlayRef=null,this.closeSubscription=lr.EMPTY}create(t,i){this.close(!0);let{x:r,y:s}=t;t instanceof MouseEvent&&t.preventDefault();let a=this.overlay.position().flexibleConnectedTo({x:r,y:s}).withPositions(o1).withTransformOriginOn(".ant-dropdown");return this.overlayRef=this.overlay.create({positionStrategy:a,disposeOnNavigation:!0,scrollStrategy:this.overlay.scrollStrategies.close()}),this.closeSubscription=new lr,this.closeSubscription.add(i.descendantMenuItemClick$.subscribe(()=>this.close())),this.closeSubscription.add(this.ngZone.runOutsideAngular(()=>_t(Ke(document,"click").pipe(Qe(l=>!!this.overlayRef&&!this.overlayRef.overlayElement.contains(l.target)),Qe(l=>l.button!==2)),Ke(document,"keydown").pipe(Qe(l=>l.key==="Escape"))).pipe(xl()).subscribe(()=>this.ngZone.run(()=>this.close())))),this.overlayRef.attach(new au(i.templateRef,i.viewContainerRef))}close(t=!1){this.overlayRef&&(this.overlayRef.detach(),t&&this.overlayRef.dispose(),this.overlayRef=null,this.closeSubscription.unsubscribe())}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(ss))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:Db});let o=n;return o})();function s1(o,n){if(o&1&&(H(0),R(1,"img",5),B()),o&2){let e=m(2);f(),h("src",e.nzNotFoundImage,Do)("alt",e.isContentString?e.nzNotFoundContent:"empty")}}function a1(o,n){if(o&1&&(H(0),_(1,s1,2,2,"ng-container",4),B()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzNotFoundImage)}}function l1(o,n){o&1&&R(0,"nz-empty-default")}function c1(o,n){o&1&&R(0,"nz-empty-simple")}function u1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.isContentString?e.nzNotFoundContent:e.locale.description," ")}}function d1(o,n){if(o&1&&(C(0,"p",6),_(1,u1,2,1,"ng-container",4),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzNotFoundContent)}}function p1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.nzNotFoundFooter," ")}}function h1(o,n){if(o&1&&(C(0,"div",7),_(1,p1,2,1,"ng-container",4),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzNotFoundFooter)}}function f1(o,n){o&1&&R(0,"nz-empty",6),o&2&&h("nzNotFoundImage","simple")}function g1(o,n){o&1&&R(0,"nz-empty",7),o&2&&h("nzNotFoundImage","simple")}function m1(o,n){o&1&&R(0,"nz-empty")}function v1(o,n){if(o&1&&(H(0,2),_(1,f1,1,1,"nz-empty",3)(2,g1,1,1,"nz-empty",4)(3,m1,1,0,"nz-empty",5),B()),o&2){let e=m();h("ngSwitch",e.size),f(),h("ngSwitchCase","normal"),f(),h("ngSwitchCase","small")}}function y1(o,n){}function C1(o,n){if(o&1&&_(0,y1,0,0,"ng-template",8),o&2){let e=m(2);h("cdkPortalOutlet",e.contentPortal)}}function _1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.content," ")}}function S1(o,n){if(o&1&&(H(0),_(1,C1,1,1,null,1)(2,_1,2,1,"ng-container",1),B()),o&2){let e=m();f(),h("ngIf",e.contentType!=="string"),f(),h("ngIf",e.contentType==="string")}}var w1=new hn("nz-empty-component-name"),b1=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-empty-default"]],exportAs:["nzEmptyDefault"],standalone:!0,features:[K],decls:12,vars:0,consts:[["width","184","height","152","viewBox","0 0 184 152","xmlns","http://www.w3.org/2000/svg",1,"ant-empty-img-default"],["fill","none","fill-rule","evenodd"],["transform","translate(24 31.67)"],["cx","67.797","cy","106.89","rx","67.797","ry","12.668",1,"ant-empty-img-default-ellipse"],["d","M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",1,"ant-empty-img-default-path-1"],["d","M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z","transform","translate(13.56)",1,"ant-empty-img-default-path-2"],["d","M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",1,"ant-empty-img-default-path-3"],["d","M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",1,"ant-empty-img-default-path-4"],["d","M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",1,"ant-empty-img-default-path-5"],["transform","translate(149.65 15.383)",1,"ant-empty-img-default-g"],["cx","20.654","cy","3.167","rx","2.849","ry","2.815"],["d","M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"]],template:function(i,r){i&1&&(Oo(),C(0,"svg",0)(1,"g",1)(2,"g",2),R(3,"ellipse",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7),S(),R(8,"path",8),C(9,"g",9),R(10,"ellipse",10)(11,"path",11),S()()())},encapsulation:2,changeDetection:0});let o=n;return o})(),T1=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-empty-simple"]],exportAs:["nzEmptySimple"],standalone:!0,features:[K],decls:6,vars:0,consts:[["width","64","height","41","viewBox","0 0 64 41","xmlns","http://www.w3.org/2000/svg",1,"ant-empty-img-simple"],["transform","translate(0 1)","fill","none","fill-rule","evenodd"],["cx","32","cy","33","rx","32","ry","7",1,"ant-empty-img-simple-ellipse"],["fill-rule","nonzero",1,"ant-empty-img-simple-g"],["d","M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"],["d","M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",1,"ant-empty-img-simple-path"]],template:function(i,r){i&1&&(Oo(),C(0,"svg",0)(1,"g",1),R(2,"ellipse",2),C(3,"g",3),R(4,"path",4)(5,"path",5),S()()())},encapsulation:2,changeDetection:0});let o=n;return o})(),E1=["default","simple"],Pb=(()=>{let n=class n{constructor(t,i){this.i18n=t,this.cdr=i,this.nzNotFoundImage="default",this.isContentString=!1,this.isImageBuildIn=!0,this.destroy$=new J}ngOnChanges(t){let{nzNotFoundContent:i,nzNotFoundImage:r}=t;if(i){let s=i.currentValue;this.isContentString=typeof s=="string"}if(r){let s=r.currentValue||"default";this.isImageBuildIn=E1.findIndex(a=>a===s)>-1}}ngOnInit(){this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Empty"),this.cdr.markForCheck()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Di),w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-empty"]],hostAttrs:[1,"ant-empty"],inputs:{nzNotFoundImage:"nzNotFoundImage",nzNotFoundContent:"nzNotFoundContent",nzNotFoundFooter:"nzNotFoundFooter"},exportAs:["nzEmpty"],standalone:!0,features:[oe,K],decls:6,vars:5,consts:[[1,"ant-empty-image"],[4,"ngIf"],["class","ant-empty-description",4,"ngIf"],["class","ant-empty-footer",4,"ngIf"],[4,"nzStringTemplateOutlet"],[3,"src","alt"],[1,"ant-empty-description"],[1,"ant-empty-footer"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,a1,2,1,"ng-container",1)(2,l1,1,0,"nz-empty-default",1)(3,c1,1,0,"nz-empty-simple",1),S(),_(4,d1,2,1,"p",2)(5,h1,2,1,"div",3)),i&2&&(f(),h("ngIf",!r.isImageBuildIn),f(),h("ngIf",r.isImageBuildIn&&r.nzNotFoundImage!=="simple"),f(),h("ngIf",r.isImageBuildIn&&r.nzNotFoundImage==="simple"),f(),h("ngIf",r.nzNotFoundContent!==null),f(),h("ngIf",r.nzNotFoundFooter))},dependencies:[we,Ye,Ue,b1,T1],encapsulation:2,changeDetection:0});let o=n;return o})();function x1(o){switch(o){case"table":case"list":return"normal";case"select":case"tree-select":case"cascader":case"transfer":return"small";default:return""}}var Tu=(()=>{let n=class n{constructor(t,i,r,s){this.configService=t,this.viewContainerRef=i,this.cdr=r,this.injector=s,this.contentType="string",this.size="",this.destroy$=new J}ngOnChanges(t){t.nzComponentName&&(this.size=x1(t.nzComponentName.currentValue)),t.specificContent&&!t.specificContent.isFirstChange()&&(this.content=t.specificContent.currentValue,this.renderEmpty())}ngOnInit(){this.subscribeDefaultEmptyContentChange()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}renderEmpty(){let t=this.content;if(typeof t=="string")this.contentType="string";else if(t instanceof En){let i={$implicit:this.nzComponentName};this.contentType="template",this.contentPortal=new au(t,this.viewContainerRef,i)}else if(t instanceof wS){let i=$n.create({parent:this.injector,providers:[{provide:w1,useValue:this.nzComponentName}]});this.contentType="component",this.contentPortal=new kl(t,this.viewContainerRef,i)}else this.contentType="string",this.contentPortal=void 0;this.cdr.detectChanges()}subscribeDefaultEmptyContentChange(){this.configService.getConfigChangeEventForComponent("empty").pipe(Ot(!0),F(this.destroy$)).subscribe(()=>{this.content=this.specificContent||this.getUserDefaultEmptyContent(),this.renderEmpty()})}getUserDefaultEmptyContent(){return(this.configService.getConfigForComponent("empty")||{}).nzDefaultEmptyContent}};n.\u0275fac=function(i){return new(i||n)(w(st),w(Tn),w(fe),w($n))},n.\u0275cmp=j({type:n,selectors:[["nz-embed-empty"]],inputs:{nzComponentName:"nzComponentName",specificContent:"specificContent"},exportAs:["nzEmbedEmpty"],standalone:!0,features:[oe,K],decls:2,vars:2,consts:[[3,"ngSwitch",4,"ngIf"],[4,"ngIf"],[3,"ngSwitch"],["class","ant-empty-normal",3,"nzNotFoundImage",4,"ngSwitchCase"],["class","ant-empty-small",3,"nzNotFoundImage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"ant-empty-normal",3,"nzNotFoundImage"],[1,"ant-empty-small",3,"nzNotFoundImage"],[3,"cdkPortalOutlet"]],template:function(i,r){i&1&&_(0,v1,4,3,"ng-container",0)(1,S1,3,2,"ng-container",1),i&2&&(h("ngIf",!r.content&&r.specificContent!==null),f(),h("ngIf",r.content))},dependencies:[Pb,we,jn,Wn,Gi,sw,ow],encapsulation:2,changeDetection:0});let o=n;return o})(),nh=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Pb,Tu]});let o=n;return o})();var Fb=["*"];function O1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.nzLabel)}}function D1(o,n){}function R1(o,n){if(o&1&&_(0,D1,0,0,"ng-template",4),o&2){let e=m();h("ngTemplateOutlet",e.template)}}function I1(o,n){if(o&1&&Y(0),o&2){let e=m();ye(e.label)}}function P1(o,n){o&1&&R(0,"span",7)}function M1(o,n){if(o&1&&(C(0,"div",5),_(1,P1,1,0,"span",6),S()),o&2){let e=m();f(),h("ngIf",!e.icon)("ngIfElse",e.icon)}}function F1(o,n){if(o&1&&(C(0,"div",4),R(1,"nz-embed-empty",5),S()),o&2){let e=m();f(),h("specificContent",e.notFoundContent)}}function A1(o,n){if(o&1&&R(0,"nz-option-item-group",9),o&2){let e=m().$implicit;h("nzLabel",e.groupLabel)}}function N1(o,n){if(o&1){let e=Q();C(0,"nz-option-item",10),A("itemHover",function(i){I(e);let r=m(2);return P(r.onItemHover(i))})("itemClick",function(i){I(e);let r=m(2);return P(r.onItemClick(i))}),S()}if(o&2){let e=m().$implicit,t=m();h("icon",t.menuItemSelectedIcon)("customContent",e.nzCustomContent)("template",e.template)("grouped",!!e.groupLabel)("disabled",e.nzDisabled)("showState",t.mode==="tags"||t.mode==="multiple")("title",e.nzTitle)("label",e.nzLabel)("compareWith",t.compareWith)("activatedValue",t.activatedValue)("listOfSelectedValue",t.listOfSelectedValue)("value",e.nzValue)}}function L1(o,n){if(o&1&&(H(0,6),_(1,A1,1,1,"nz-option-item-group",7)(2,N1,1,12,"nz-option-item",8),B()),o&2){let e=n.$implicit;h("ngSwitch",e.type),f(),h("ngSwitchCase","group"),f(),h("ngSwitchCase","item")}}function k1(o,n){}function V1(o,n){o&1&&Ie(0)}function G1(o,n){o&1&&R(0,"span",3)}function H1(o,n){o&1&&R(0,"span",8)}function B1(o,n){o&1&&R(0,"span",9)}function $1(o,n){if(o&1&&(H(0),_(1,H1,1,0,"span",6)(2,B1,1,0,"span",7),B()),o&2){let e=m(2);f(),h("ngIf",!e.search),f(),h("ngIf",e.search)}}function j1(o,n){if(o&1&&R(0,"span",11),o&2){let e=m().$implicit;h("nzType",e)}}function W1(o,n){if(o&1&&(H(0),_(1,j1,1,1,"span",10),B()),o&2){let e=n.$implicit;f(),h("ngIf",e)}}function U1(o,n){if(o&1&&_(0,W1,2,1,"ng-container",2),o&2){let e=m(2);h("nzStringTemplateOutlet",e.suffixIcon)}}function K1(o,n){if(o&1&&_(0,$1,3,2,"ng-container",4)(1,U1,1,1,"ng-template",null,5,_e),o&2){let e=te(2),t=m();h("ngIf",t.showArrow&&!t.suffixIcon)("ngIfElse",e)}}function q1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.feedbackIcon)}}function Y1(o,n){o&1&&R(0,"span",1)}function Q1(o,n){if(o&1&&(C(0,"div",4),Y(1),S()),o&2){let e=m(2);f(),ye(e.label)}}function X1(o,n){if(o&1&&Y(0),o&2){let e=m(2);ye(e.label)}}function Z1(o,n){if(o&1&&(H(0),_(1,Q1,2,1,"div",2)(2,X1,1,1,"ng-template",null,3,_e),B()),o&2){let e=te(3),t=m();f(),h("ngIf",t.deletable)("ngIfElse",e)}}function J1(o,n){o&1&&R(0,"span",7)}function eA(o,n){if(o&1){let e=Q();C(0,"span",5),A("click",function(i){I(e);let r=m();return P(r.onDelete(i))}),_(1,J1,1,0,"span",6),S()}if(o&2){let e=m();f(),h("ngIf",!e.removeIcon)("ngIfElse",e.removeIcon)}}var tA=o=>({$implicit:o});function nA(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),Ne(" ",e.placeholder," ")}}var iA=["inputElement"],rA=["mirrorElement"];function oA(o,n){o&1&&R(0,"span",3,4)}function sA(o,n){if(o&1&&R(0,"nz-select-item",6),o&2){let e=m(2);h("deletable",!1)("disabled",!1)("removeIcon",e.removeIcon)("label",e.listOfTopItem[0].nzLabel)("contentTemplateOutlet",e.customTemplate)("contentTemplateOutletContext",e.listOfTopItem[0])}}function aA(o,n){if(o&1){let e=Q();H(0),C(1,"nz-select-search",4),A("isComposingChange",function(i){I(e);let r=m();return P(r.isComposingChange(i))})("valueChange",function(i){I(e);let r=m();return P(r.onInputValueChange(i))}),S(),_(2,sA,1,6,"nz-select-item",5),B()}if(o&2){let e=m();f(),h("nzId",e.nzId)("disabled",e.disabled)("value",e.inputValue)("showInput",e.showSearch)("mirrorSync",!1)("autofocus",e.autofocus)("focusTrigger",e.open),f(),h("ngIf",e.isShowSingleLabel)}}function lA(o,n){if(o&1){let e=Q();C(0,"nz-select-item",9),A("delete",function(){let r=I(e).$implicit,s=m(2);return P(s.onDeleteItem(r.contentTemplateOutletContext))}),S()}if(o&2){let e=n.$implicit,t=m(2);h("removeIcon",t.removeIcon)("label",e.nzLabel)("disabled",e.nzDisabled||t.disabled)("contentTemplateOutlet",e.contentTemplateOutlet)("deletable",!0)("contentTemplateOutletContext",e.contentTemplateOutletContext)}}function cA(o,n){if(o&1){let e=Q();H(0),_(1,lA,1,6,"nz-select-item",7),C(2,"nz-select-search",8),A("isComposingChange",function(i){I(e);let r=m();return P(r.isComposingChange(i))})("valueChange",function(i){I(e);let r=m();return P(r.onInputValueChange(i))}),S(),B()}if(o&2){let e=m();f(),h("ngForOf",e.listOfSlicedItem)("ngForTrackBy",e.trackValue),f(),h("nzId",e.nzId)("disabled",e.disabled)("value",e.inputValue)("autofocus",e.autofocus)("showInput",!0)("mirrorSync",!0)("focusTrigger",e.open)}}function uA(o,n){if(o&1&&R(0,"nz-select-placeholder",10),o&2){let e=m();h("placeholder",e.placeHolder)}}function dA(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",8),o&2){let e=m(3);h("status",e.status)}}function pA(o,n){if(o&1&&_(0,dA,1,1,"nz-form-item-feedback-icon",7),o&2){let e=m(2);h("ngIf",e.hasFeedback&&!!e.status)}}function hA(o,n){if(o&1&&(C(0,"nz-select-arrow",5),_(1,pA,1,1,"ng-template",null,6,_e),S()),o&2){let e=te(2),t=m();h("showArrow",t.nzShowArrow)("loading",t.nzLoading)("search",t.nzOpen&&t.nzShowSearch)("suffixIcon",t.nzSuffixIcon)("feedbackIcon",e)}}function fA(o,n){if(o&1){let e=Q();C(0,"nz-select-clear",9),A("clear",function(){I(e);let i=m();return P(i.onClearSelection())}),S()}if(o&2){let e=m();h("clearIcon",e.nzClearIcon)}}function gA(o,n){if(o&1){let e=Q();C(0,"nz-option-container",10),A("keydown",function(i){I(e);let r=m();return P(r.onKeyDown(i))})("itemClick",function(i){I(e);let r=m();return P(r.onItemClick(i))})("scrollToBottom",function(){I(e);let i=m();return P(i.nzScrollToBottom.emit())}),S()}if(o&2){let e=m();k("ant-select-dropdown-placement-bottomLeft",e.dropDownPosition==="bottomLeft")("ant-select-dropdown-placement-topLeft",e.dropDownPosition==="topLeft")("ant-select-dropdown-placement-bottomRight",e.dropDownPosition==="bottomRight")("ant-select-dropdown-placement-topRight",e.dropDownPosition==="topRight"),h("ngStyle",e.nzDropdownStyle)("itemSize",e.nzOptionHeightPx)("maxItemLength",e.nzOptionOverflowSize)("matchWidth",e.nzDropdownMatchSelectWidth)("@slideMotion","enter")("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("listOfContainerItem",e.listOfContainerItem)("menuItemSelectedIcon",e.nzMenuItemSelectedIcon)("notFoundContent",e.nzNotFoundContent)("activatedValue",e.activatedValue)("listOfSelectedValue",e.listOfValue)("dropdownRender",e.nzDropdownRender)("compareWith",e.compareWith)("mode",e.nzMode)}}var Eu=(()=>{let n=class n{constructor(){this.nzLabel=null,this.changes=new J}ngOnChanges(){this.changes.next()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-option-group"]],inputs:{nzLabel:"nzLabel"},exportAs:["nzOptionGroup"],standalone:!0,features:[oe,K],ngContentSelectors:Fb,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Ab=(()=>{let n=class n{constructor(){this.nzLabel=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-option-item-group"]],hostAttrs:[1,"ant-select-item","ant-select-item-group"],inputs:{nzLabel:"nzLabel"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,O1,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.nzLabel)},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Nb=(()=>{let n=class n{constructor(t,i,r){this.elementRef=t,this.ngZone=i,this.destroy$=r,this.selected=!1,this.activated=!1,this.grouped=!1,this.customContent=!1,this.template=null,this.disabled=!1,this.showState=!1,this.label=null,this.value=null,this.activatedValue=null,this.listOfSelectedValue=[],this.icon=null,this.itemClick=new O,this.itemHover=new O}ngOnChanges(t){let{value:i,activatedValue:r,listOfSelectedValue:s}=t;(i||s)&&(this.selected=this.listOfSelectedValue.some(a=>this.compareWith(a,this.value))),(i||r)&&(this.activated=this.compareWith(this.activatedValue,this.value))}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(()=>{this.disabled||this.ngZone.run(()=>this.itemClick.emit(this.value))}),Ke(this.elementRef.nativeElement,"mouseenter").pipe(F(this.destroy$)).subscribe(()=>{this.disabled||this.ngZone.run(()=>this.itemHover.emit(this.value))})})}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-option-item"]],hostAttrs:[1,"ant-select-item","ant-select-item-option"],hostVars:9,hostBindings:function(i,r){i&2&&(ze("title",r.title),k("ant-select-item-option-grouped",r.grouped)("ant-select-item-option-selected",r.selected&&!r.disabled)("ant-select-item-option-disabled",r.disabled)("ant-select-item-option-active",r.activated&&!r.disabled))},inputs:{grouped:"grouped",customContent:"customContent",template:"template",disabled:"disabled",showState:"showState",title:"title",label:"label",value:"value",activatedValue:"activatedValue",listOfSelectedValue:"listOfSelectedValue",icon:"icon",compareWith:"compareWith"},outputs:{itemClick:"itemClick",itemHover:"itemHover"},standalone:!0,features:[Ve([Pt]),oe,K],decls:5,vars:3,consts:[[1,"ant-select-item-option-content"],[3,"ngIf","ngIfElse"],["noCustomContent",""],["class","ant-select-item-option-state","style","user-select: none","unselectable","on",4,"ngIf"],[3,"ngTemplateOutlet"],["unselectable","on",1,"ant-select-item-option-state",2,"user-select","none"],["nz-icon","","nzType","check","class","ant-select-selected-icon",4,"ngIf","ngIfElse"],["nz-icon","","nzType","check",1,"ant-select-selected-icon"]],template:function(i,r){if(i&1&&(C(0,"div",0),_(1,R1,1,1,"ng-template",1)(2,I1,1,1,"ng-template",null,2,_e),S(),_(4,M1,2,2,"div",3)),i&2){let s=te(3);f(),h("ngIf",r.customContent)("ngIfElse",s),f(3),h("ngIf",r.showState&&r.selected)}},dependencies:[we,Be,Ge,Fe],encapsulation:2,changeDetection:0});let o=n;return o})(),Lb=(()=>{let n=class n{constructor(){this.notFoundContent=void 0,this.menuItemSelectedIcon=null,this.dropdownRender=null,this.activatedValue=null,this.listOfSelectedValue=[],this.mode="default",this.matchWidth=!0,this.itemSize=32,this.maxItemLength=8,this.listOfContainerItem=[],this.itemClick=new O,this.scrollToBottom=new O,this.scrolledIndex=0,this.ngZone=ae($e),this.platformId=ae(bS)}onItemClick(t){this.itemClick.emit(t)}onItemHover(t){this.activatedValue=t}trackValue(t,i){return i.key}onScrolledIndexChange(t){this.scrolledIndex=t,t===this.listOfContainerItem.length-this.maxItemLength&&this.scrollToBottom.emit()}scrollToActivatedValue(){let t=this.listOfContainerItem.findIndex(i=>this.compareWith(i.key,this.activatedValue));(t=this.scrolledIndex+this.maxItemLength)&&this.cdkVirtualScrollViewport.scrollToIndex(t||0)}ngOnChanges(t){let{listOfContainerItem:i,activatedValue:r}=t;(i||r)&&this.scrollToActivatedValue()}ngAfterViewInit(){AS(this.platformId)&&this.ngZone.runOutsideAngular(()=>setTimeout(()=>this.scrollToActivatedValue()))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-option-container"]],viewQuery:function(i,r){if(i&1&&xe(ur,7),i&2){let s;ce(s=ue())&&(r.cdkVirtualScrollViewport=s.first)}},hostAttrs:[1,"ant-select-dropdown"],inputs:{notFoundContent:"notFoundContent",menuItemSelectedIcon:"menuItemSelectedIcon",dropdownRender:"dropdownRender",activatedValue:"activatedValue",listOfSelectedValue:"listOfSelectedValue",compareWith:"compareWith",mode:"mode",matchWidth:"matchWidth",itemSize:"itemSize",maxItemLength:"maxItemLength",listOfContainerItem:"listOfContainerItem"},outputs:{itemClick:"itemClick",scrollToBottom:"scrollToBottom"},exportAs:["nzOptionContainer"],standalone:!0,features:[oe,K],decls:5,vars:14,consts:[["class","ant-select-item-empty",4,"ngIf"],[3,"itemSize","maxBufferPx","minBufferPx","scrolledIndexChange"],["cdkVirtualFor","",3,"cdkVirtualForOf","cdkVirtualForTrackBy","cdkVirtualForTemplateCacheSize"],[3,"ngTemplateOutlet"],[1,"ant-select-item-empty"],["nzComponentName","select",3,"specificContent"],[3,"ngSwitch"],[3,"nzLabel",4,"ngSwitchCase"],[3,"icon","customContent","template","grouped","disabled","showState","title","label","compareWith","activatedValue","listOfSelectedValue","value","itemHover","itemClick",4,"ngSwitchCase"],[3,"nzLabel"],[3,"icon","customContent","template","grouped","disabled","showState","title","label","compareWith","activatedValue","listOfSelectedValue","value","itemHover","itemClick"]],template:function(i,r){i&1&&(C(0,"div"),_(1,F1,2,1,"div",0),C(2,"cdk-virtual-scroll-viewport",1),A("scrolledIndexChange",function(a){return r.onScrolledIndexChange(a)}),_(3,L1,3,3,"ng-template",2),S(),_(4,k1,0,0,"ng-template",3),S()),i&2&&(f(),h("ngIf",r.listOfContainerItem.length===0),f(),Re("height",r.listOfContainerItem.length*r.itemSize,"px")("max-height",r.itemSize*r.maxItemLength,"px"),k("full-width",!r.matchWidth),h("itemSize",r.itemSize)("maxBufferPx",r.itemSize*r.maxItemLength)("minBufferPx",r.itemSize*r.maxItemLength),f(),h("cdkVirtualForOf",r.listOfContainerItem)("cdkVirtualForTrackBy",r.trackValue)("cdkVirtualForTemplateCacheSize",0),f(),h("ngTemplateOutlet",r.dropdownRender))},dependencies:[nh,Tu,we,jn,Ab,Wn,Nb,Be,Fr,Fl,Al,ur,vr],encapsulation:2,changeDetection:0});let o=n;return o})(),zu=(()=>{let n=class n{constructor(t,i){this.nzOptionGroupComponent=t,this.destroy$=i,this.changes=new J,this.groupLabel=null,this.nzLabel=null,this.nzValue=null,this.nzDisabled=!1,this.nzHide=!1,this.nzCustomContent=!1}ngOnInit(){this.nzOptionGroupComponent&&this.nzOptionGroupComponent.changes.pipe(Ot(!0),F(this.destroy$)).subscribe(()=>{this.groupLabel=this.nzOptionGroupComponent.nzLabel})}ngOnChanges(){this.changes.next()}};n.\u0275fac=function(i){return new(i||n)(w(Eu,8),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-option"]],viewQuery:function(i,r){if(i&1&&xe(En,7),i&2){let s;ce(s=ue())&&(r.template=s.first)}},inputs:{nzTitle:"nzTitle",nzLabel:"nzLabel",nzValue:"nzValue",nzKey:"nzKey",nzDisabled:"nzDisabled",nzHide:"nzHide",nzCustomContent:"nzCustomContent"},exportAs:["nzOption"],standalone:!0,features:[Ve([Pt]),oe,K],ngContentSelectors:Fb,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),_(0,V1,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzHide",void 0),N([W()],o.prototype,"nzCustomContent",void 0),o})(),kb=(()=>{let n=class n{constructor(){this.loading=!1,this.search=!1,this.showArrow=!1,this.suffixIcon=null,this.feedbackIcon=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-arrow"]],hostAttrs:[1,"ant-select-arrow"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-select-arrow-loading",r.loading)},inputs:{loading:"loading",search:"search",showArrow:"showArrow",suffixIcon:"suffixIcon",feedbackIcon:"feedbackIcon"},standalone:!0,features:[K],decls:4,vars:3,consts:[["nz-icon","","nzType","loading",4,"ngIf","ngIfElse"],["defaultArrow",""],[4,"nzStringTemplateOutlet"],["nz-icon","","nzType","loading"],[4,"ngIf","ngIfElse"],["suffixTemplate",""],["nz-icon","","nzType","down",4,"ngIf"],["nz-icon","","nzType","search",4,"ngIf"],["nz-icon","","nzType","down"],["nz-icon","","nzType","search"],["nz-icon","",3,"nzType",4,"ngIf"],["nz-icon","",3,"nzType"]],template:function(i,r){if(i&1&&_(0,G1,1,0,"span",0)(1,K1,3,2,"ng-template",null,1,_e)(3,q1,2,1,"ng-container",2),i&2){let s=te(2);h("ngIf",r.loading)("ngIfElse",s),f(3),h("nzStringTemplateOutlet",r.feedbackIcon)}},dependencies:[Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Vb=(()=>{let n=class n{constructor(){this.clearIcon=null,this.clear=new O}onClick(t){t.preventDefault(),t.stopPropagation(),this.clear.emit(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-clear"]],hostAttrs:[1,"ant-select-clear"],hostBindings:function(i,r){i&1&&A("click",function(a){return r.onClick(a)})},inputs:{clearIcon:"clearIcon"},outputs:{clear:"clear"},standalone:!0,features:[K],decls:1,vars:2,consts:[["nz-icon","","nzType","close-circle","nzTheme","fill","class","ant-select-close-icon",4,"ngIf","ngIfElse"],["nz-icon","","nzType","close-circle","nzTheme","fill",1,"ant-select-close-icon"]],template:function(i,r){i&1&&_(0,Y1,1,0,"span",0),i&2&&h("ngIf",!r.clearIcon)("ngIfElse",r.clearIcon)},dependencies:[Ge,Fe,we],encapsulation:2,changeDetection:0});let o=n;return o})(),Gb=(()=>{let n=class n{constructor(){this.disabled=!1,this.label=null,this.deletable=!1,this.removeIcon=null,this.contentTemplateOutletContext=null,this.contentTemplateOutlet=null,this.delete=new O}onDelete(t){t.preventDefault(),t.stopPropagation(),this.disabled||this.delete.next(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-item"]],hostAttrs:[1,"ant-select-selection-item"],hostVars:3,hostBindings:function(i,r){i&2&&(ze("title",r.label),k("ant-select-selection-item-disabled",r.disabled))},inputs:{disabled:"disabled",label:"label",deletable:"deletable",removeIcon:"removeIcon",contentTemplateOutletContext:"contentTemplateOutletContext",contentTemplateOutlet:"contentTemplateOutlet"},outputs:{delete:"delete"},standalone:!0,features:[K],decls:2,vars:5,consts:[[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["class","ant-select-selection-item-remove",3,"click",4,"ngIf"],["class","ant-select-selection-item-content",4,"ngIf","ngIfElse"],["labelTemplate",""],[1,"ant-select-selection-item-content"],[1,"ant-select-selection-item-remove",3,"click"],["nz-icon","","nzType","close",4,"ngIf","ngIfElse"],["nz-icon","","nzType","close"]],template:function(i,r){i&1&&_(0,Z1,4,2,"ng-container",0)(1,eA,2,2,"span",1),i&2&&(h("nzStringTemplateOutlet",r.contentTemplateOutlet)("nzStringTemplateOutletContext",yt(3,tA,r.contentTemplateOutletContext)),f(),h("ngIf",r.deletable&&!r.disabled))},dependencies:[Ye,Ue,we,Ge,Fe],encapsulation:2,changeDetection:0});let o=n;return o})(),Hb=(()=>{let n=class n{constructor(){this.placeholder=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-placeholder"]],hostAttrs:[1,"ant-select-selection-placeholder"],inputs:{placeholder:"placeholder"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,nA,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.placeholder)},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),$m=(()=>{let n=class n{setCompositionState(t){this.isComposingChange.next(t)}onValueChange(t){this.value=t,this.valueChange.next(t),this.mirrorSync&&this.syncMirrorWidth()}clearInputValue(){let t=this.inputElement.nativeElement;t.value="",this.onValueChange("")}syncMirrorWidth(){let t=this.mirrorElement.nativeElement,i=this.elementRef.nativeElement,r=this.inputElement.nativeElement;this.renderer.removeStyle(i,"width"),this.renderer.setProperty(t,"textContent",`${r.value}\xA0`),this.renderer.setStyle(i,"width",`${t.scrollWidth}px`)}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r){this.elementRef=t,this.renderer=i,this.focusMonitor=r,this.nzId=null,this.disabled=!1,this.mirrorSync=!1,this.showInput=!0,this.focusTrigger=!1,this.value="",this.autofocus=!1,this.valueChange=new O,this.isComposingChange=new O}ngOnChanges(t){let i=this.inputElement.nativeElement,{focusTrigger:r,showInput:s}=t;s&&(this.showInput?this.renderer.removeAttribute(i,"readonly"):this.renderer.setAttribute(i,"readonly","readonly")),r&&r.currentValue===!0&&r.previousValue===!1&&i.focus()}ngAfterViewInit(){this.mirrorSync&&this.syncMirrorWidth(),this.autofocus&&this.focus()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(Oi))},n.\u0275cmp=j({type:n,selectors:[["nz-select-search"]],viewQuery:function(i,r){if(i&1&&(xe(iA,7),xe(rA,5)),i&2){let s;ce(s=ue())&&(r.inputElement=s.first),ce(s=ue())&&(r.mirrorElement=s.first)}},hostAttrs:[1,"ant-select-selection-search"],inputs:{nzId:"nzId",disabled:"disabled",mirrorSync:"mirrorSync",showInput:"showInput",focusTrigger:"focusTrigger",value:"value",autofocus:"autofocus"},outputs:{valueChange:"valueChange",isComposingChange:"isComposingChange"},standalone:!0,features:[Ve([{provide:Cm,useValue:!1}]),oe,K],decls:3,vars:7,consts:[["autocomplete","off",1,"ant-select-selection-search-input",3,"ngModel","disabled","ngModelChange","compositionstart","compositionend"],["inputElement",""],["class","ant-select-selection-search-mirror",4,"ngIf"],[1,"ant-select-selection-search-mirror"],["mirrorElement",""]],template:function(i,r){i&1&&(C(0,"input",0,1),A("ngModelChange",function(a){return r.onValueChange(a)})("compositionstart",function(){return r.setCompositionState(!0)})("compositionend",function(){return r.setCompositionState(!1)}),S(),_(2,oA,2,0,"span",2)),i&2&&(Re("opacity",r.showInput?null:0),h("ngModel",r.value)("disabled",r.disabled),ze("id",r.nzId)("autofocus",r.autofocus?"autofocus":null),f(2),h("ngIf",r.mirrorSync))},dependencies:[nn,Ii,Kt,Rt,we],encapsulation:2,changeDetection:0});let o=n;return o})(),ih=(()=>{let n=class n{updateTemplateVariable(){let t=this.listOfTopItem.length===0;this.isShowPlaceholder=t&&!this.isComposing&&!this.inputValue,this.isShowSingleLabel=!t&&!this.isComposing&&!this.inputValue}isComposingChange(t){this.isComposing=t,this.updateTemplateVariable()}onInputValueChange(t){t!==this.inputValue&&(this.inputValue=t,this.updateTemplateVariable(),this.inputValueChange.emit(t),this.tokenSeparate(t,this.tokenSeparators))}tokenSeparate(t,i){let r=(a,l)=>{for(let c=0;c0)return!0;return!1},s=(a,l)=>{let c=new RegExp(`[${l.join()}]`),u=a.split(c).filter(d=>d);return[...new Set(u)]};if(t&&t.length&&i.length&&this.mode!=="default"&&r(t,i)){let a=s(t,i);this.tokenize.next(a)}}clearInputValue(){this.nzSelectSearchComponent&&this.nzSelectSearchComponent.clearInputValue()}focus(){this.nzSelectSearchComponent&&this.nzSelectSearchComponent.focus()}blur(){this.nzSelectSearchComponent&&this.nzSelectSearchComponent.blur()}trackValue(t,i){return i.nzValue}onDeleteItem(t){!this.disabled&&!t.nzDisabled&&this.deleteItem.next(t)}constructor(t,i,r){this.elementRef=t,this.ngZone=i,this.noAnimation=r,this.nzId=null,this.showSearch=!1,this.placeHolder=null,this.open=!1,this.maxTagCount=1/0,this.autofocus=!1,this.disabled=!1,this.mode="default",this.customTemplate=null,this.maxTagPlaceholder=null,this.removeIcon=null,this.listOfTopItem=[],this.tokenSeparators=[],this.tokenize=new O,this.inputValueChange=new O,this.deleteItem=new O,this.listOfSlicedItem=[],this.isShowPlaceholder=!0,this.isShowSingleLabel=!1,this.isComposing=!1,this.inputValue=null,this.destroy$=new J}ngOnChanges(t){let{listOfTopItem:i,maxTagCount:r,customTemplate:s,maxTagPlaceholder:a}=t;if(i&&this.updateTemplateVariable(),i||r||s||a){let l=this.listOfTopItem.slice(0,this.maxTagCount).map(c=>({nzLabel:c.nzLabel,nzValue:c.nzValue,nzDisabled:c.nzDisabled,contentTemplateOutlet:this.customTemplate,contentTemplateOutletContext:c}));if(this.listOfTopItem.length>this.maxTagCount){let c=`+ ${this.listOfTopItem.length-this.maxTagCount} ...`,u=this.listOfTopItem.map(p=>p.nzValue),d={nzLabel:c,nzValue:"$$__nz_exceeded_item",nzDisabled:!0,contentTemplateOutlet:this.maxTagPlaceholder,contentTemplateOutletContext:u.slice(this.maxTagCount)};l.push(d)}this.listOfSlicedItem=l}}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.target!==this.nzSelectSearchComponent.inputElement.nativeElement&&this.nzSelectSearchComponent.focus()}),Ke(this.elementRef.nativeElement,"keydown").pipe(F(this.destroy$)).subscribe(t=>{if(t.target instanceof HTMLInputElement){let i=t.target.value;t.keyCode===8&&this.mode!=="default"&&!i&&this.listOfTopItem.length>0&&(t.preventDefault(),this.ngZone.run(()=>this.onDeleteItem(this.listOfTopItem[this.listOfTopItem.length-1])))}})})}ngOnDestroy(){this.destroy$.next()}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-select-top-control"]],viewQuery:function(i,r){if(i&1&&xe($m,5),i&2){let s;ce(s=ue())&&(r.nzSelectSearchComponent=s.first)}},hostAttrs:[1,"ant-select-selector"],inputs:{nzId:"nzId",showSearch:"showSearch",placeHolder:"placeHolder",open:"open",maxTagCount:"maxTagCount",autofocus:"autofocus",disabled:"disabled",mode:"mode",customTemplate:"customTemplate",maxTagPlaceholder:"maxTagPlaceholder",removeIcon:"removeIcon",listOfTopItem:"listOfTopItem",tokenSeparators:"tokenSeparators"},outputs:{tokenize:"tokenize",inputValueChange:"inputValueChange",deleteItem:"deleteItem"},exportAs:["nzSelectTopControl"],standalone:!0,features:[oe,K],decls:4,vars:3,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"placeholder",4,"ngIf"],[3,"nzId","disabled","value","showInput","mirrorSync","autofocus","focusTrigger","isComposingChange","valueChange"],[3,"deletable","disabled","removeIcon","label","contentTemplateOutlet","contentTemplateOutletContext",4,"ngIf"],[3,"deletable","disabled","removeIcon","label","contentTemplateOutlet","contentTemplateOutletContext"],[3,"removeIcon","label","disabled","contentTemplateOutlet","deletable","contentTemplateOutletContext","delete",4,"ngFor","ngForOf","ngForTrackBy"],[3,"nzId","disabled","value","autofocus","showInput","mirrorSync","focusTrigger","isComposingChange","valueChange"],[3,"removeIcon","label","disabled","contentTemplateOutlet","deletable","contentTemplateOutletContext","delete"],[3,"placeholder"]],template:function(i,r){i&1&&(H(0,0),_(1,aA,3,8,"ng-container",1)(2,cA,3,9,"ng-container",2),B(),_(3,uA,1,1,"nz-select-placeholder",3)),i&2&&(h("ngSwitch",r.mode),f(),h("ngSwitchCase","default"),f(2),h("ngIf",r.isShowPlaceholder))},dependencies:[jn,$m,Wn,Gb,we,Gi,lt,Hb],encapsulation:2,changeDetection:0});let o=n;return o})(),mA=(o,n)=>n&&n.nzLabel?n.nzLabel.toString().toLowerCase().indexOf(o.toLowerCase())>-1:!1,vA="select",Ou=(()=>{let n=class n{set nzShowArrow(t){this._nzShowArrow=t}get nzShowArrow(){return this._nzShowArrow===void 0?this.nzMode==="default":this._nzShowArrow}generateTagItem(t){return{nzValue:t,nzLabel:t,type:"item"}}onItemClick(t){if(this.activatedValue=t,this.nzMode==="default")(this.listOfValue.length===0||!this.compareWith(this.listOfValue[0],t))&&this.updateListOfValue([t]),this.setOpenState(!1);else{let i=this.listOfValue.findIndex(r=>this.compareWith(r,t));if(i!==-1){let r=this.listOfValue.filter((s,a)=>a!==i);this.updateListOfValue(r)}else if(this.listOfValue.length!this.compareWith(r,t.nzValue));this.updateListOfValue(i),this.clearInput()}updateListOfContainerItem(){let t=this.listOfTagAndTemplateItem.filter(s=>!s.nzHide).filter(s=>!this.nzServerSearch&&this.searchValue?this.nzFilterOption(this.searchValue,s):!0);if(this.nzMode==="tags"&&this.searchValue){let s=this.listOfTagAndTemplateItem.find(a=>a.nzLabel===this.searchValue);if(s)this.activatedValue=s.nzValue;else{let a=this.generateTagItem(this.searchValue);t=[a,...t],this.activatedValue=a.nzValue}}let i=t.find(s=>s.nzLabel===this.searchValue)||t.find(s=>this.compareWith(s.nzValue,this.activatedValue))||t.find(s=>this.compareWith(s.nzValue,this.listOfValue[0]))||t[0];this.activatedValue=i&&i.nzValue||null;let r=[];this.isReactiveDriven?r=[...new Set(this.nzOptions.filter(s=>s.groupLabel).map(s=>s.groupLabel))]:this.listOfNzOptionGroupComponent&&(r=this.listOfNzOptionGroupComponent.map(s=>s.nzLabel)),r.forEach(s=>{let a=t.findIndex(l=>s===l.groupLabel);if(a>-1){let l={groupLabel:s,type:"group",key:s};t.splice(a,0,l)}}),this.listOfContainerItem=[...t],this.updateCdkConnectedOverlayPositions()}clearInput(){this.nzSelectTopControlComponent.clearInputValue()}updateListOfValue(t){let r=((s,a)=>a==="default"?s.length>0?s[0]:null:s)(t,this.nzMode);this.value!==r&&(this.listOfValue=t,this.listOfValue$.next(t),this.value=r,this.onChange(this.value))}onTokenSeparate(t){let i=this.listOfTagAndTemplateItem.filter(r=>t.findIndex(s=>s===r.nzLabel)!==-1).map(r=>r.nzValue).filter(r=>this.listOfValue.findIndex(s=>this.compareWith(s,r))===-1);if(this.nzMode==="multiple")this.updateListOfValue([...this.listOfValue,...i]);else if(this.nzMode==="tags"){let r=t.filter(s=>this.listOfTagAndTemplateItem.findIndex(a=>a.nzLabel===s)===-1);this.updateListOfValue([...this.listOfValue,...i,...r])}this.clearInput()}onKeyDown(t){if(this.nzDisabled)return;let i=this.listOfContainerItem.filter(s=>s.type==="item").filter(s=>!s.nzDisabled),r=i.findIndex(s=>this.compareWith(s.nzValue,this.activatedValue));switch(t.keyCode){case 38:if(t.preventDefault(),this.nzOpen&&i.length>0){let s=r>0?r-1:i.length-1;this.activatedValue=i[s].nzValue}break;case 40:if(t.preventDefault(),this.nzOpen&&i.length>0){let s=r{this.triggerWidth=this.originElement.nativeElement.getBoundingClientRect().width,t!==this.triggerWidth&&this.cdr.detectChanges()})}}updateCdkConnectedOverlayPositions(){to(()=>{this.cdkConnectedOverlay?.overlayRef?.updatePosition()})}constructor(t,i,r,s,a,l,c,u,d,p,g,v){this.ngZone=t,this.destroy$=i,this.nzConfigService=r,this.cdr=s,this.host=a,this.renderer=l,this.platform=c,this.focusMonitor=u,this.directionality=d,this.noAnimation=p,this.nzFormStatusService=g,this.nzFormNoStatusService=v,this._nzModuleName=vA,this.nzId=null,this.nzSize="default",this.nzStatus="",this.nzOptionHeightPx=32,this.nzOptionOverflowSize=8,this.nzDropdownClassName=null,this.nzDropdownMatchSelectWidth=!0,this.nzDropdownStyle=null,this.nzNotFoundContent=void 0,this.nzPlaceHolder=null,this.nzPlacement=null,this.nzMaxTagCount=1/0,this.nzDropdownRender=null,this.nzCustomTemplate=null,this.nzSuffixIcon=null,this.nzClearIcon=null,this.nzRemoveIcon=null,this.nzMenuItemSelectedIcon=null,this.nzTokenSeparators=[],this.nzMaxTagPlaceholder=null,this.nzMaxMultipleCount=1/0,this.nzMode="default",this.nzFilterOption=mA,this.compareWith=(y,x)=>y===x,this.nzAllowClear=!1,this.nzBorderless=!1,this.nzShowSearch=!1,this.nzLoading=!1,this.nzAutoFocus=!1,this.nzAutoClearSearchValue=!0,this.nzServerSearch=!1,this.nzDisabled=!1,this.nzOpen=!1,this.nzSelectOnTab=!1,this.nzBackdrop=!1,this.nzOptions=[],this.nzOnSearch=new O,this.nzScrollToBottom=new O,this.nzOpenChange=new O,this.nzBlur=new O,this.nzFocus=new O,this.listOfValue$=new ct([]),this.listOfTemplateItem$=new ct([]),this.listOfTagAndTemplateItem=[],this.searchValue="",this.isReactiveDriven=!1,this.requestId=-1,this.isNzDisableFirstChange=!0,this.onChange=()=>{},this.onTouched=()=>{},this.dropDownPosition="bottomLeft",this.triggerWidth=null,this.listOfContainerItem=[],this.listOfTopItem=[],this.activatedValue=null,this.listOfValue=[],this.focused=!1,this.dir="ltr",this.positions=[],this.prefixCls="ant-select",this.statusCls={},this.status="",this.hasFeedback=!1}writeValue(t){if(this.value!==t){this.value=t;let r=((s,a)=>s==null?[]:a==="default"?[s]:s)(t,this.nzMode);this.listOfValue=r,this.listOfValue$.next(r),this.cdr.markForCheck()}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.nzDisabled&&this.setOpenState(!1),this.cdr.markForCheck()}ngOnChanges(t){let{nzOpen:i,nzDisabled:r,nzOptions:s,nzStatus:a,nzPlacement:l}=t;if(i&&this.onOpenChange(),r&&this.nzDisabled&&this.setOpenState(!1),s){this.isReactiveDriven=!0;let u=(this.nzOptions||[]).map(d=>({template:d.label instanceof En?d.label:null,nzTitle:this.getTitle(d.title,d.label),nzLabel:typeof d.label=="string"||typeof d.label=="number"?d.label:null,nzValue:d.value,nzDisabled:d.disabled||!1,nzHide:d.hide||!1,nzCustomContent:d.label instanceof En,groupLabel:d.groupLabel||null,type:"item",key:d.key===void 0?d.value:d.key}));this.listOfTemplateItem$.next(u)}if(a&&this.setStatusStyles(this.nzStatus,this.hasFeedback),l){let{currentValue:c}=l;this.dropDownPosition=c;let u=["bottomLeft","topLeft","bottomRight","topRight"];c&&u.includes(c)?this.positions=[bt[c]]:this.positions=u.map(d=>bt[d])}}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),zl(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:Mn(!1)),We(([{status:t,hasFeedback:i},r])=>({status:r?"":t,hasFeedback:i})),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.host,!0).pipe(F(this.destroy$)).subscribe(t=>{t?(this.focused=!0,this.cdr.markForCheck(),this.nzFocus.emit()):(this.focused=!1,this.cdr.markForCheck(),this.nzBlur.emit(),Promise.resolve().then(()=>{this.onTouched()}))}),Fn([this.listOfValue$,this.listOfTemplateItem$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{let r=t.filter(()=>this.nzMode==="tags").filter(s=>i.findIndex(a=>this.compareWith(a.nzValue,s))===-1).map(s=>this.listOfTopItem.find(a=>this.compareWith(a.nzValue,s))||this.generateTagItem(s));this.listOfTagAndTemplateItem=[...i,...r],this.listOfTopItem=this.listOfValue.map(s=>[...this.listOfTagAndTemplateItem,...this.listOfTopItem].find(a=>this.compareWith(s,a.nzValue))).filter(s=>!!s),this.updateListOfContainerItem()}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.nzConfigService.getConfigChangeEventForComponent("select").pipe(F(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>Ke(this.host.nativeElement,"click").pipe(F(this.destroy$)).subscribe(()=>{this.nzOpen&&this.nzShowSearch||this.nzDisabled||this.ngZone.run(()=>this.setOpenState(!this.nzOpen))})),this.cdkConnectedOverlay.overlayKeydown.pipe(F(this.destroy$)).subscribe(t=>{t.keyCode===27&&this.setOpenState(!1)})}ngAfterContentInit(){this.isReactiveDriven||_t(this.listOfNzOptionGroupComponent.changes,this.listOfNzOptionComponent.changes).pipe(Ot(!0),on(()=>_t(this.listOfNzOptionComponent.changes,this.listOfNzOptionGroupComponent.changes,...this.listOfNzOptionComponent.map(t=>t.changes),...this.listOfNzOptionGroupComponent.map(t=>t.changes)).pipe(Ot(!0))),F(this.destroy$)).subscribe(()=>{let t=this.listOfNzOptionComponent.toArray().map(i=>{let{template:r,nzLabel:s,nzValue:a,nzKey:l,nzDisabled:c,nzHide:u,nzCustomContent:d,groupLabel:p}=i;return{template:r,nzLabel:s,nzValue:a,nzDisabled:c,nzHide:u,nzCustomContent:d,groupLabel:p,nzTitle:this.getTitle(i.nzTitle,i.nzLabel),type:"item",key:l===void 0?a:l}});this.listOfTemplateItem$.next(t),this.cdr.markForCheck()})}ngOnDestroy(){sm(this.requestId),this.focusMonitor.stopMonitoring(this.host)}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.host.nativeElement,r):this.renderer.removeClass(this.host.nativeElement,r)})}getTitle(t,i){let r;return t===void 0?(typeof i=="string"||typeof i=="number")&&(r=i.toString()):(typeof t=="string"||typeof t=="number")&&(r=t.toString()),r}};n.\u0275fac=function(i){return new(i||n)(w($e),w(Pt),w(st),w(fe),w(de),w(He),w(gn),w(Oi),w(Me,8),w(ft,9),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-select"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,zu,5),Ft(s,Eu,5)),i&2){let a;ce(a=ue())&&(r.listOfNzOptionComponent=a),ce(a=ue())&&(r.listOfNzOptionGroupComponent=a)}},viewQuery:function(i,r){if(i&1&&(xe(dr,7,de),xe(oi,7),xe(ih,7),xe(Eu,7,de),xe(ih,7,de)),i&2){let s;ce(s=ue())&&(r.originElement=s.first),ce(s=ue())&&(r.cdkConnectedOverlay=s.first),ce(s=ue())&&(r.nzSelectTopControlComponent=s.first),ce(s=ue())&&(r.nzOptionGroupComponentElement=s.first),ce(s=ue())&&(r.nzSelectTopControlComponentElement=s.first)}},hostAttrs:[1,"ant-select"],hostVars:26,hostBindings:function(i,r){i&2&&k("ant-select-in-form-item",!!r.nzFormStatusService)("ant-select-lg",r.nzSize==="large")("ant-select-sm",r.nzSize==="small")("ant-select-show-arrow",r.nzShowArrow)("ant-select-disabled",r.nzDisabled)("ant-select-show-search",(r.nzShowSearch||r.nzMode!=="default")&&!r.nzDisabled)("ant-select-allow-clear",r.nzAllowClear)("ant-select-borderless",r.nzBorderless)("ant-select-open",r.nzOpen)("ant-select-focused",r.nzOpen||r.focused)("ant-select-single",r.nzMode==="default")("ant-select-multiple",r.nzMode!=="default")("ant-select-rtl",r.dir==="rtl")},inputs:{nzId:"nzId",nzSize:"nzSize",nzStatus:"nzStatus",nzOptionHeightPx:"nzOptionHeightPx",nzOptionOverflowSize:"nzOptionOverflowSize",nzDropdownClassName:"nzDropdownClassName",nzDropdownMatchSelectWidth:"nzDropdownMatchSelectWidth",nzDropdownStyle:"nzDropdownStyle",nzNotFoundContent:"nzNotFoundContent",nzPlaceHolder:"nzPlaceHolder",nzPlacement:"nzPlacement",nzMaxTagCount:"nzMaxTagCount",nzDropdownRender:"nzDropdownRender",nzCustomTemplate:"nzCustomTemplate",nzSuffixIcon:"nzSuffixIcon",nzClearIcon:"nzClearIcon",nzRemoveIcon:"nzRemoveIcon",nzMenuItemSelectedIcon:"nzMenuItemSelectedIcon",nzTokenSeparators:"nzTokenSeparators",nzMaxTagPlaceholder:"nzMaxTagPlaceholder",nzMaxMultipleCount:"nzMaxMultipleCount",nzMode:"nzMode",nzFilterOption:"nzFilterOption",compareWith:"compareWith",nzAllowClear:"nzAllowClear",nzBorderless:"nzBorderless",nzShowSearch:"nzShowSearch",nzLoading:"nzLoading",nzAutoFocus:"nzAutoFocus",nzAutoClearSearchValue:"nzAutoClearSearchValue",nzServerSearch:"nzServerSearch",nzDisabled:"nzDisabled",nzOpen:"nzOpen",nzSelectOnTab:"nzSelectOnTab",nzBackdrop:"nzBackdrop",nzOptions:"nzOptions",nzShowArrow:"nzShowArrow"},outputs:{nzOnSearch:"nzOnSearch",nzScrollToBottom:"nzScrollToBottom",nzOpenChange:"nzOpenChange",nzBlur:"nzBlur",nzFocus:"nzFocus"},exportAs:["nzSelect"],standalone:!0,features:[Ve([Pt,{provide:zn,useExisting:pn(()=>n),multi:!0}]),oe,K],decls:5,vars:25,consts:[["cdkOverlayOrigin","",3,"nzId","open","disabled","mode","nzNoAnimation","maxTagPlaceholder","removeIcon","placeHolder","maxTagCount","customTemplate","tokenSeparators","showSearch","autofocus","listOfTopItem","inputValueChange","tokenize","deleteItem","keydown"],["origin","cdkOverlayOrigin"],[3,"showArrow","loading","search","suffixIcon","feedbackIcon",4,"ngIf"],[3,"clearIcon","clear",4,"ngIf"],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayMinWidth","cdkConnectedOverlayWidth","cdkConnectedOverlayOrigin","cdkConnectedOverlayTransformOriginOn","cdkConnectedOverlayPanelClass","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","overlayOutsideClick","detach","positionChange"],[3,"showArrow","loading","search","suffixIcon","feedbackIcon"],["feedbackIconTpl",""],[3,"status",4,"ngIf"],[3,"status"],[3,"clearIcon","clear"],[3,"ngStyle","itemSize","maxItemLength","matchWidth","nzNoAnimation","listOfContainerItem","menuItemSelectedIcon","notFoundContent","activatedValue","listOfSelectedValue","dropdownRender","compareWith","mode","keydown","itemClick","scrollToBottom"]],template:function(i,r){if(i&1&&(C(0,"nz-select-top-control",0,1),A("inputValueChange",function(a){return r.onInputValueChange(a)})("tokenize",function(a){return r.onTokenSeparate(a)})("deleteItem",function(a){return r.onItemDelete(a)})("keydown",function(a){return r.onKeyDown(a)}),S(),_(2,hA,3,5,"nz-select-arrow",2)(3,fA,1,1,"nz-select-clear",3)(4,gA,1,23,"ng-template",4),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.setOpenState(!1)})("positionChange",function(a){return r.onPositionChange(a)})),i&2){let s=te(1);h("nzId",r.nzId)("open",r.nzOpen)("disabled",r.nzDisabled)("mode",r.nzMode)("@.disabled",!!(r.noAnimation!=null&&r.noAnimation.nzNoAnimation))("nzNoAnimation",r.noAnimation==null?null:r.noAnimation.nzNoAnimation)("maxTagPlaceholder",r.nzMaxTagPlaceholder)("removeIcon",r.nzRemoveIcon)("placeHolder",r.nzPlaceHolder)("maxTagCount",r.nzMaxTagCount)("customTemplate",r.nzCustomTemplate)("tokenSeparators",r.nzTokenSeparators)("showSearch",r.nzShowSearch)("autofocus",r.nzAutoFocus)("listOfTopItem",r.listOfTopItem),f(2),h("ngIf",r.nzShowArrow||r.hasFeedback&&!!r.status),f(),h("ngIf",r.nzAllowClear&&!r.nzDisabled&&r.listOfValue.length),f(),h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayMinWidth",r.nzDropdownMatchSelectWidth?null:r.triggerWidth)("cdkConnectedOverlayWidth",r.nzDropdownMatchSelectWidth?r.triggerWidth:null)("cdkConnectedOverlayOrigin",s)("cdkConnectedOverlayTransformOriginOn",".ant-select-dropdown")("cdkConnectedOverlayPanelClass",r.nzDropdownClassName)("cdkConnectedOverlayOpen",r.nzOpen)("cdkConnectedOverlayPositions",r.positions)}},dependencies:[ih,dr,ft,kb,we,ro,mr,Vb,oi,vr,Nr,Lb,Zt],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return N([De()],o.prototype,"nzSuffixIcon",void 0),N([W()],o.prototype,"nzAllowClear",void 0),N([De(),W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzShowSearch",void 0),N([W()],o.prototype,"nzLoading",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzAutoClearSearchValue",void 0),N([W()],o.prototype,"nzServerSearch",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzOpen",void 0),N([W()],o.prototype,"nzSelectOnTab",void 0),N([De(),W()],o.prototype,"nzBackdrop",void 0),o})(),Ls=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Ou,Lb,Nb,ih,$m,Gb,Vb,kb,Hb,Ab]});let o=n;return o})();function yA(o,n){o&1&&(C(0,"span",3),R(1,"i",4)(2,"i",4)(3,"i",4)(4,"i",4),S())}function CA(o,n){}function _A(o,n){if(o&1&&(C(0,"div",8),Y(1),S()),o&2){let e=m(2);f(),ye(e.nzTip)}}function SA(o,n){if(o&1&&(C(0,"div")(1,"div",5),_(2,CA,0,0,"ng-template",6)(3,_A,2,1,"div",7),S()()),o&2){let e=m(),t=te(1);f(),k("ant-spin-rtl",e.dir==="rtl")("ant-spin-spinning",e.isLoading)("ant-spin-lg",e.nzSize==="large")("ant-spin-sm",e.nzSize==="small")("ant-spin-show-text",e.nzTip),f(),h("ngTemplateOutlet",e.nzIndicator||t),f(),h("ngIf",e.nzTip)}}function wA(o,n){if(o&1&&(C(0,"div",9),Ie(1),S()),o&2){let e=m();k("ant-spin-blur",e.isLoading)}}var bA=["*"],Bb="spin",$b=(()=>{let n=class n{constructor(t,i,r){this.nzConfigService=t,this.cdr=i,this.directionality=r,this._nzModuleName=Bb,this.nzIndicator=null,this.nzSize="default",this.nzTip=null,this.nzDelay=0,this.nzSimple=!1,this.nzSpinning=!0,this.destroy$=new J,this.spinning$=new ct(this.nzSpinning),this.delay$=new tn(1),this.isLoading=!1,this.dir="ltr"}ngOnInit(){this.delay$.pipe(Ot(this.nzDelay),Bt(),on(i=>i===0?this.spinning$:this.spinning$.pipe(mS(r=>nu(r?i:0)))),F(this.destroy$)).subscribe(i=>{this.isLoading=i,this.cdr.markForCheck()}),this.nzConfigService.getConfigChangeEventForComponent(Bb).pipe(F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.directionality.change?.pipe(F(this.destroy$)).subscribe(i=>{this.dir=i,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzSpinning:i,nzDelay:r}=t;i&&this.spinning$.next(this.nzSpinning),r&&this.delay$.next(this.nzDelay)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-spin"]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-spin-nested-loading",!r.nzSimple)},inputs:{nzIndicator:"nzIndicator",nzSize:"nzSize",nzTip:"nzTip",nzDelay:"nzDelay",nzSimple:"nzSimple",nzSpinning:"nzSpinning"},exportAs:["nzSpin"],standalone:!0,features:[oe,K],ngContentSelectors:bA,decls:4,vars:2,consts:[["defaultTemplate",""],[4,"ngIf"],["class","ant-spin-container",3,"ant-spin-blur",4,"ngIf"],[1,"ant-spin-dot","ant-spin-dot-spin"],[1,"ant-spin-dot-item"],[1,"ant-spin"],[3,"ngTemplateOutlet"],["class","ant-spin-text",4,"ngIf"],[1,"ant-spin-text"],[1,"ant-spin-container"]],template:function(i,r){i&1&&(Pe(),_(0,yA,5,0,"ng-template",null,0,_e)(2,SA,4,12,"div",1)(3,wA,2,2,"div",2)),i&2&&(f(2),h("ngIf",r.isLoading),f(),h("ngIf",!r.nzSimple))},dependencies:[we,Be],encapsulation:2});let o=n;return N([De()],o.prototype,"nzIndicator",void 0),N([ci()],o.prototype,"nzDelay",void 0),N([W()],o.prototype,"nzSimple",void 0),N([W()],o.prototype,"nzSpinning",void 0),o})(),ah=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var EA=["nz-pagination-item",""];function xA(o,n){if(o&1&&(C(0,"a"),Y(1),S()),o&2){let e=m().page;f(),ye(e)}}function zA(o,n){o&1&&R(0,"span",9)}function OA(o,n){o&1&&R(0,"span",10)}function DA(o,n){if(o&1&&(C(0,"button",6),H(1,2),_(2,zA,1,0,"span",7)(3,OA,1,0,"span",8),B(),S()),o&2){let e=m(2);h("disabled",e.disabled),f(),h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function RA(o,n){o&1&&R(0,"span",10)}function IA(o,n){o&1&&R(0,"span",9)}function PA(o,n){if(o&1&&(C(0,"button",6),H(1,2),_(2,RA,1,0,"span",11)(3,IA,1,0,"span",12),B(),S()),o&2){let e=m(2);h("disabled",e.disabled),f(),h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function MA(o,n){o&1&&R(0,"span",20)}function FA(o,n){o&1&&R(0,"span",21)}function AA(o,n){if(o&1&&(H(0,2),_(1,MA,1,0,"span",18)(2,FA,1,0,"span",19),B()),o&2){let e=m(4);h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function NA(o,n){o&1&&R(0,"span",21)}function LA(o,n){o&1&&R(0,"span",20)}function kA(o,n){if(o&1&&(H(0,2),_(1,NA,1,0,"span",22)(2,LA,1,0,"span",23),B()),o&2){let e=m(4);h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function VA(o,n){if(o&1&&(C(0,"div",15),H(1,2),_(2,AA,3,2,"ng-container",16)(3,kA,3,2,"ng-container",16),B(),C(4,"span",17),Y(5,"\u2022\u2022\u2022"),S()()),o&2){let e=m(2).$implicit;f(),h("ngSwitch",e),f(),h("ngSwitchCase","prev_5"),f(),h("ngSwitchCase","next_5")}}function GA(o,n){if(o&1&&(H(0),C(1,"a",13),_(2,VA,6,3,"div",14),S(),B()),o&2){let e=m().$implicit;f(),h("ngSwitch",e)}}function HA(o,n){if(o&1&&(H(0,2),_(1,xA,2,1,"a",3)(2,DA,4,3,"button",4)(3,PA,4,3,"button",4)(4,GA,3,1,"ng-container",5),B()),o&2){let e=n.$implicit;h("ngSwitch",e),f(),h("ngSwitchCase","page"),f(),h("ngSwitchCase","prev"),f(),h("ngSwitchCase","next")}}function BA(o,n){}var $A=(o,n)=>({$implicit:o,page:n}),jA=["nz-pagination-options",""];function WA(o,n){if(o&1&&R(0,"nz-option",4),o&2){let e=n.$implicit;h("nzLabel",e.label)("nzValue",e.value)}}function UA(o,n){if(o&1){let e=Q();C(0,"nz-select",2),A("ngModelChange",function(i){I(e);let r=m();return P(r.onPageSizeChange(i))}),_(1,WA,1,2,"nz-option",3),S()}if(o&2){let e=m();h("nzDisabled",e.disabled)("nzSize",e.nzSize)("ngModel",e.pageSize),f(),h("ngForOf",e.listOfPageSizeOption)("ngForTrackBy",e.trackByOption)}}function KA(o,n){if(o&1){let e=Q();C(0,"div",5),Y(1),C(2,"input",6),A("keydown.enter",function(i){I(e);let r=m();return P(r.jumpToPageViaInput(i))}),S(),Y(3),S()}if(o&2){let e=m();f(),Ne(" ",e.locale.jump_to," "),f(),h("disabled",e.disabled),f(),Ne(" ",e.locale.page," ")}}var jb=["containerTemplate"];function qA(o,n){}var YA=(o,n)=>({$implicit:o,range:n});function QA(o,n){if(o&1&&(C(0,"li",4),_(1,qA,0,0,"ng-template",5),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.showTotal)("ngTemplateOutletContext",ri(2,YA,e.total,e.ranges))}}function XA(o,n){if(o&1){let e=Q();C(0,"li",6),A("gotoIndex",function(i){I(e);let r=m(2);return P(r.jumpPage(i))})("diffIndex",function(i){I(e);let r=m(2);return P(r.jumpDiff(i))}),S()}if(o&2){let e=n.$implicit,t=m(2);h("locale",t.locale)("type",e.type)("index",e.index)("disabled",!!e.disabled)("itemRender",t.itemRender)("active",t.pageIndex===e.index)("direction",t.dir)}}function ZA(o,n){if(o&1){let e=Q();C(0,"li",7),A("pageIndexChange",function(i){I(e);let r=m(2);return P(r.onPageIndexChange(i))})("pageSizeChange",function(i){I(e);let r=m(2);return P(r.onPageSizeChange(i))}),S()}if(o&2){let e=m(2);h("total",e.total)("locale",e.locale)("disabled",e.disabled)("nzSize",e.nzSize)("showSizeChanger",e.showSizeChanger)("showQuickJumper",e.showQuickJumper)("pageIndex",e.pageIndex)("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)}}function JA(o,n){if(o&1&&(C(0,"ul"),_(1,QA,2,5,"li",1)(2,XA,1,7,"li",2)(3,ZA,1,9,"li",3),S()),o&2){let e=m();f(),h("ngIf",e.showTotal),f(),h("ngForOf",e.listOfPageItem)("ngForTrackBy",e.trackByPageItem),f(),h("ngIf",e.showQuickJumper||e.showSizeChanger)}}function eN(o,n){if(o&1){let e=Q();C(0,"ul")(1,"li",1),A("click",function(){I(e);let i=m();return P(i.prePage())}),S(),C(2,"li",2)(3,"input",3),A("keydown.enter",function(i){I(e);let r=m();return P(r.jumpToPageViaInput(i))}),S(),C(4,"span",4),Y(5,"/"),S(),Y(6),S(),C(7,"li",5),A("click",function(){I(e);let i=m();return P(i.nextPage())}),S()()}if(o&2){let e=m();f(),h("disabled",e.isFirstIndex)("direction",e.dir)("itemRender",e.itemRender),ze("title",e.locale.prev_page),f(),ze("title",e.pageIndex+"/"+e.lastIndex),f(),h("disabled",e.disabled)("value",e.pageIndex),f(3),Ne(" ",e.lastIndex," "),f(),h("disabled",e.isLastIndex)("direction",e.dir)("itemRender",e.itemRender),ze("title",e.locale==null?null:e.locale.next_page)}}function tN(o,n){}function nN(o,n){if(o&1&&(H(0),_(1,tN,0,0,"ng-template",6),B()),o&2){m(2);let e=te(2);f(),h("ngTemplateOutlet",e.template)}}function iN(o,n){if(o&1&&(H(0),_(1,nN,2,1,"ng-container",5),B()),o&2){let e=m(),t=te(4);f(),h("ngIf",e.nzSimple)("ngIfElse",t.template)}}var Wm=(()=>{let n=class n{constructor(){this.active=!1,this.index=null,this.disabled=!1,this.direction="ltr",this.type=null,this.itemRender=null,this.diffIndex=new O,this.gotoIndex=new O,this.title=null}clickItem(){this.disabled||(this.type==="page"?this.gotoIndex.emit(this.index):this.diffIndex.emit({next:1,prev:-1,prev_5:-5,next_5:5}[this.type]))}ngOnChanges(t){let{locale:i,index:r,type:s}=t;(i||r||s)&&(this.title={page:`${this.index}`,next:this.locale?.next_page,prev:this.locale?.prev_page,prev_5:this.locale?.prev_5,next_5:this.locale?.next_5}[this.type])}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["li","nz-pagination-item",""]],hostVars:19,hostBindings:function(i,r){i&1&&A("click",function(){return r.clickItem()}),i&2&&(ze("title",r.title),k("ant-pagination-prev",r.type==="prev")("ant-pagination-next",r.type==="next")("ant-pagination-item",r.type==="page")("ant-pagination-jump-prev",r.type==="prev_5")("ant-pagination-jump-prev-custom-icon",r.type==="prev_5")("ant-pagination-jump-next",r.type==="next_5")("ant-pagination-jump-next-custom-icon",r.type==="next_5")("ant-pagination-disabled",r.disabled)("ant-pagination-item-active",r.active))},inputs:{active:"active",locale:"locale",index:"index",disabled:"disabled",direction:"direction",type:"type",itemRender:"itemRender"},outputs:{diffIndex:"diffIndex",gotoIndex:"gotoIndex"},standalone:!0,features:[oe,K],attrs:EA,decls:3,vars:5,consts:[["renderItemTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],[4,"ngSwitchCase"],["type","button","class","ant-pagination-item-link",3,"disabled",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["type","button",1,"ant-pagination-item-link",3,"disabled"],["nz-icon","","nzType","right",4,"ngSwitchCase"],["nz-icon","","nzType","left",4,"ngSwitchDefault"],["nz-icon","","nzType","right"],["nz-icon","","nzType","left"],["nz-icon","","nzType","left",4,"ngSwitchCase"],["nz-icon","","nzType","right",4,"ngSwitchDefault"],[1,"ant-pagination-item-link",3,"ngSwitch"],["class","ant-pagination-item-container",4,"ngSwitchDefault"],[1,"ant-pagination-item-container"],[3,"ngSwitch",4,"ngSwitchCase"],[1,"ant-pagination-item-ellipsis"],["nz-icon","","nzType","double-right","class","ant-pagination-item-link-icon",4,"ngSwitchCase"],["nz-icon","","nzType","double-left","class","ant-pagination-item-link-icon",4,"ngSwitchDefault"],["nz-icon","","nzType","double-right",1,"ant-pagination-item-link-icon"],["nz-icon","","nzType","double-left",1,"ant-pagination-item-link-icon"],["nz-icon","","nzType","double-left","class","ant-pagination-item-link-icon",4,"ngSwitchCase"],["nz-icon","","nzType","double-right","class","ant-pagination-item-link-icon",4,"ngSwitchDefault"]],template:function(i,r){if(i&1&&_(0,HA,5,4,"ng-template",null,0,_e)(2,BA,0,0,"ng-template",1),i&2){let s=te(1);f(2),h("ngTemplateOutlet",r.itemRender||s)("ngTemplateOutletContext",ri(2,$A,r.type,r.index))}},dependencies:[jn,Wn,Ge,Fe,Gi,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),Wb=(()=>{let n=class n{constructor(){this.nzSize="default",this.disabled=!1,this.showSizeChanger=!1,this.showQuickJumper=!1,this.total=0,this.pageIndex=1,this.pageSize=10,this.pageSizeOptions=[],this.pageIndexChange=new O,this.pageSizeChange=new O,this.listOfPageSizeOption=[]}onPageSizeChange(t){this.pageSize!==t&&this.pageSizeChange.next(t)}jumpToPageViaInput(t){let i=t.target,r=Math.floor(em(i.value,this.pageIndex));this.pageIndexChange.next(r),i.value=""}trackByOption(t,i){return i.value}ngOnChanges(t){let{pageSize:i,pageSizeOptions:r,locale:s}=t;(i||r||s)&&(this.listOfPageSizeOption=[...new Set([...this.pageSizeOptions,this.pageSize])].map(a=>({value:a,label:`${a} ${this.locale.items_per_page}`})))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["li","nz-pagination-options",""]],hostAttrs:[1,"ant-pagination-options"],inputs:{nzSize:"nzSize",disabled:"disabled",showSizeChanger:"showSizeChanger",showQuickJumper:"showQuickJumper",locale:"locale",total:"total",pageIndex:"pageIndex",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions"},outputs:{pageIndexChange:"pageIndexChange",pageSizeChange:"pageSizeChange"},standalone:!0,features:[oe,K],attrs:jA,decls:2,vars:2,consts:[["class","ant-pagination-options-size-changer",3,"nzDisabled","nzSize","ngModel","ngModelChange",4,"ngIf"],["class","ant-pagination-options-quick-jumper",4,"ngIf"],[1,"ant-pagination-options-size-changer",3,"nzDisabled","nzSize","ngModel","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf","ngForTrackBy"],[3,"nzLabel","nzValue"],[1,"ant-pagination-options-quick-jumper"],[3,"disabled","keydown.enter"]],template:function(i,r){i&1&&_(0,UA,2,5,"nz-select",0)(1,KA,4,3,"div",1),i&2&&(h("ngIf",r.showSizeChanger),f(),h("ngIf",r.showQuickJumper))},dependencies:[Ls,zu,Ou,we,nn,Kt,Rt,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),Ub=(()=>{let n=class n{constructor(t,i,r,s){this.cdr=t,this.renderer=i,this.elementRef=r,this.directionality=s,this.nzSize="default",this.itemRender=null,this.showTotal=null,this.disabled=!1,this.showSizeChanger=!1,this.showQuickJumper=!1,this.total=0,this.pageIndex=1,this.pageSize=10,this.pageSizeOptions=[10,20,30,40],this.pageIndexChange=new O,this.pageSizeChange=new O,this.ranges=[0,0],this.listOfPageItem=[],this.dir="ltr",this.destroy$=new J,i.removeChild(i.parentNode(r.nativeElement),r.nativeElement)}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.updateRtlStyle(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.updateRtlStyle()}updateRtlStyle(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-pagination-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-pagination-rtl")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}jumpPage(t){this.onPageIndexChange(t)}jumpDiff(t){this.jumpPage(this.pageIndex+t)}trackByPageItem(t,i){return`${i.type}-${i.index}`}onPageIndexChange(t){this.pageIndexChange.next(t)}onPageSizeChange(t){this.pageSizeChange.next(t)}getLastIndex(t,i){return Math.ceil(t/i)}buildIndexes(){let t=this.getLastIndex(this.total,this.pageSize);this.listOfPageItem=this.getListOfPageItem(this.pageIndex,t)}getListOfPageItem(t,i){let r=a=>{let l={type:"prev",disabled:t===1},c={type:"next",disabled:t===i};return[l,...a,c]},s=(a,l)=>{let c=[];for(let u=a;u<=l;u++)c.push({index:u,type:"page"});return c};return i<=9?r(s(1,i)):r(((l,c)=>{let u=[],d={type:"prev_5"},p={type:"next_5"},g=s(1,1),v=s(i,i);if(l<5)u=[...s(2,l===4?6:5),p];else if(l{let n=class n{constructor(t,i,r,s){this.cdr=t,this.renderer=i,this.elementRef=r,this.directionality=s,this.itemRender=null,this.disabled=!1,this.total=0,this.pageIndex=1,this.pageSize=10,this.pageIndexChange=new O,this.lastIndex=0,this.isFirstIndex=!1,this.isLastIndex=!1,this.dir="ltr",this.destroy$=new J,i.removeChild(i.parentNode(r.nativeElement),r.nativeElement)}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.updateRtlStyle(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.updateRtlStyle()}updateRtlStyle(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-pagination-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-pagination-rtl")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}jumpToPageViaInput(t){let i=t.target,r=em(i.value,this.pageIndex);this.onPageIndexChange(r),i.value=`${this.pageIndex}`}prePage(){this.onPageIndexChange(this.pageIndex-1)}nextPage(){this.onPageIndexChange(this.pageIndex+1)}onPageIndexChange(t){this.pageIndexChange.next(t)}updateBindingValue(){this.lastIndex=Math.ceil(this.total/this.pageSize),this.isFirstIndex=this.pageIndex===1,this.isLastIndex=this.pageIndex===this.lastIndex}ngOnChanges(t){let{pageIndex:i,total:r,pageSize:s}=t;(i||r||s)&&this.updateBindingValue()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(He),w(de),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-pagination-simple"]],viewQuery:function(i,r){if(i&1&&xe(jb,7),i&2){let s;ce(s=ue())&&(r.template=s.first)}},inputs:{itemRender:"itemRender",disabled:"disabled",locale:"locale",total:"total",pageIndex:"pageIndex",pageSize:"pageSize"},outputs:{pageIndexChange:"pageIndexChange"},standalone:!0,features:[oe,K],decls:2,vars:0,consts:[["containerTemplate",""],["nz-pagination-item","","type","prev",3,"disabled","direction","itemRender","click"],[1,"ant-pagination-simple-pager"],["size","3",3,"disabled","value","keydown.enter"],[1,"ant-pagination-slash"],["nz-pagination-item","","type","next",3,"disabled","direction","itemRender","click"]],template:function(i,r){i&1&&_(0,eN,8,12,"ng-template",null,0,_e)},dependencies:[Wm],encapsulation:2,changeDetection:0});let o=n;return o})(),rN="pagination",Um=(()=>{let n=class n{validatePageIndex(t,i){return t>i?i:t<1?1:t}onPageIndexChange(t){let i=this.getLastIndex(this.nzTotal,this.nzPageSize),r=this.validatePageIndex(t,i);r!==this.nzPageIndex&&!this.nzDisabled&&(this.nzPageIndex=r,this.nzPageIndexChange.emit(this.nzPageIndex))}onPageSizeChange(t){this.nzPageSize=t,this.nzPageSizeChange.emit(t);let i=this.getLastIndex(this.nzTotal,this.nzPageSize);this.nzPageIndex>i&&this.onPageIndexChange(i)}onTotalChange(t){let i=this.getLastIndex(t,this.nzPageSize);this.nzPageIndex>i&&Promise.resolve().then(()=>{this.onPageIndexChange(i),this.cdr.markForCheck()})}getLastIndex(t,i){return Math.ceil(t/i)}constructor(t,i,r,s,a){this.i18n=t,this.cdr=i,this.breakpointService=r,this.nzConfigService=s,this.directionality=a,this._nzModuleName=rN,this.nzPageSizeChange=new O,this.nzPageIndexChange=new O,this.nzShowTotal=null,this.nzItemRender=null,this.nzSize="default",this.nzPageSizeOptions=[10,20,30,40],this.nzShowSizeChanger=!1,this.nzShowQuickJumper=!1,this.nzSimple=!1,this.nzDisabled=!1,this.nzResponsive=!1,this.nzHideOnSinglePage=!1,this.nzTotal=0,this.nzPageIndex=1,this.nzPageSize=10,this.showPagination=!0,this.size="default",this.dir="ltr",this.destroy$=new J,this.total$=new tn(1)}ngOnInit(){this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Pagination"),this.cdr.markForCheck()}),this.total$.pipe(F(this.destroy$)).subscribe(t=>{this.onTotalChange(t)}),this.breakpointService.subscribe(xa).pipe(F(this.destroy$)).subscribe(t=>{this.nzResponsive&&(this.size=t===Rp.xs?"small":"default",this.cdr.markForCheck())}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngOnChanges(t){let{nzHideOnSinglePage:i,nzTotal:r,nzPageSize:s,nzSize:a}=t;r&&this.total$.next(this.nzTotal),(i||r||s)&&(this.showPagination=this.nzHideOnSinglePage&&this.nzTotal>this.nzPageSize||this.nzTotal>0&&!this.nzHideOnSinglePage),a&&(this.size=a.currentValue)}};n.\u0275fac=function(i){return new(i||n)(w(Di),w(fe),w(Ip),w(st),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-pagination"]],hostAttrs:[1,"ant-pagination"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-pagination-simple",r.nzSimple)("ant-pagination-disabled",r.nzDisabled)("mini",!r.nzSimple&&r.size==="small")("ant-pagination-rtl",r.dir==="rtl")},inputs:{nzShowTotal:"nzShowTotal",nzItemRender:"nzItemRender",nzSize:"nzSize",nzPageSizeOptions:"nzPageSizeOptions",nzShowSizeChanger:"nzShowSizeChanger",nzShowQuickJumper:"nzShowQuickJumper",nzSimple:"nzSimple",nzDisabled:"nzDisabled",nzResponsive:"nzResponsive",nzHideOnSinglePage:"nzHideOnSinglePage",nzTotal:"nzTotal",nzPageIndex:"nzPageIndex",nzPageSize:"nzPageSize"},outputs:{nzPageSizeChange:"nzPageSizeChange",nzPageIndexChange:"nzPageIndexChange"},exportAs:["nzPagination"],standalone:!0,features:[oe,K],decls:5,vars:18,consts:[[4,"ngIf"],[3,"disabled","itemRender","locale","pageSize","total","pageIndex","pageIndexChange"],["simplePagination",""],[3,"nzSize","itemRender","showTotal","disabled","locale","showSizeChanger","showQuickJumper","total","pageIndex","pageSize","pageSizeOptions","pageIndexChange","pageSizeChange"],["defaultPagination",""],[4,"ngIf","ngIfElse"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(_(0,iN,2,2,"ng-container",0),C(1,"nz-pagination-simple",1,2),A("pageIndexChange",function(a){return r.onPageIndexChange(a)}),S(),C(3,"nz-pagination-default",3,4),A("pageIndexChange",function(a){return r.onPageIndexChange(a)})("pageSizeChange",function(a){return r.onPageSizeChange(a)}),S()),i&2&&(h("ngIf",r.showPagination),f(),h("disabled",r.nzDisabled)("itemRender",r.nzItemRender)("locale",r.locale)("pageSize",r.nzPageSize)("total",r.nzTotal)("pageIndex",r.nzPageIndex),f(2),h("nzSize",r.size)("itemRender",r.nzItemRender)("showTotal",r.nzShowTotal)("disabled",r.nzDisabled)("locale",r.locale)("showSizeChanger",r.nzShowSizeChanger)("showQuickJumper",r.nzShowQuickJumper)("total",r.nzTotal)("pageIndex",r.nzPageIndex)("pageSize",r.nzPageSize)("pageSizeOptions",r.nzPageSizeOptions))},dependencies:[we,Be,Kb,Ub],encapsulation:2,changeDetection:0});let o=n;return N([De()],o.prototype,"nzSize",void 0),N([De()],o.prototype,"nzPageSizeOptions",void 0),N([De(),W()],o.prototype,"nzShowSizeChanger",void 0),N([De(),W()],o.prototype,"nzShowQuickJumper",void 0),N([De(),W()],o.prototype,"nzSimple",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzResponsive",void 0),N([W()],o.prototype,"nzHideOnSinglePage",void 0),N([ci()],o.prototype,"nzTotal",void 0),N([ci()],o.prototype,"nzPageIndex",void 0),N([ci()],o.prototype,"nzPageSize",void 0),o})(),qb=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Um,Kb,Wb,Wm,Ub]});let o=n;return o})();var sN=(()=>{let n=class n{create(t){return typeof ResizeObserver>"u"?null:new ResizeObserver(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),ds=(()=>{let n=class n{constructor(t){this.nzResizeObserverFactory=t,this.observedElements=new Map}ngOnDestroy(){this.observedElements.forEach((t,i)=>this.cleanupObserver(i))}observe(t){let i=YS(t);return new sp(r=>{let a=this.observeElement(i).subscribe(r);return()=>{a.unsubscribe(),this.unobserveElement(i)}})}observeElement(t){if(this.observedElements.has(t))this.observedElements.get(t).count++;else{let i=new J,r=this.nzResizeObserverFactory.create(s=>i.next(s));r&&r.observe(t),this.observedElements.set(t,{observer:r,stream:i,count:1})}return this.observedElements.get(t).stream}unobserveElement(t){this.observedElements.has(t)&&(this.observedElements.get(t).count--,this.observedElements.get(t).count||this.cleanupObserver(t))}cleanupObserver(t){if(this.observedElements.has(t)){let{observer:i,stream:r}=this.observedElements.get(t);i&&i.disconnect(),r.complete(),this.observedElements.delete(t)}}};n.\u0275fac=function(i){return new(i||n)(nt(sN))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var ks=["*"];function aN(o,n){}function lN(o,n){if(o&1){let e=Q();C(0,"label",15),A("ngModelChange",function(){I(e);let i=m().$implicit,r=m(2);return P(r.check(i))}),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked)}}function cN(o,n){if(o&1){let e=Q();C(0,"label",16),A("ngModelChange",function(){I(e);let i=m().$implicit,r=m(2);return P(r.check(i))}),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked)}}function uN(o,n){if(o&1){let e=Q();C(0,"li",12),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.check(r))}),_(1,lN,1,1,"label",13)(2,cN,1,1,"label",14),C(3,"span"),Y(4),S()()}if(o&2){let e=n.$implicit,t=m(2);h("nzSelected",e.checked),f(),h("ngIf",!t.filterMultiple),f(),h("ngIf",t.filterMultiple),f(2),ye(e.text)}}function dN(o,n){if(o&1){let e=Q();H(0),C(1,"nz-filter-trigger",3),A("nzVisibleChange",function(i){I(e);let r=m();return P(r.onVisibleChange(i))}),R(2,"span",4),S(),C(3,"nz-dropdown-menu",null,5)(5,"div",6)(6,"ul",7),_(7,uN,5,4,"li",8),S(),C(8,"div",9)(9,"button",10),A("click",function(){I(e);let i=m();return P(i.reset())}),Y(10),S(),C(11,"button",11),A("click",function(){I(e);let i=m();return P(i.confirm())}),Y(12),S()()()(),B()}if(o&2){let e=te(4),t=m();f(),h("nzVisible",t.isVisible)("nzActive",t.isChecked)("nzDropdownMenu",e),f(6),h("ngForOf",t.listOfParsedFilter)("ngForTrackBy",t.trackByValue),f(2),h("disabled",!t.isChecked),f(),Ne(" ",t.locale.filterReset," "),f(2),ye(t.locale.filterConfirm)}}function pN(o,n){if(o&1){let e=Q();C(0,"label",2),A("ngModelChange",function(i){I(e);let r=m();return P(r.onCheckedChange(i))}),S()}if(o&2){let e=m();k("ant-table-selection-select-all-custom",e.showRowSelection),h("ngModel",e.checked)("nzDisabled",e.disabled)("nzIndeterminate",e.indeterminate),ze("aria-label",e.label)}}function hN(o,n){if(o&1){let e=Q();C(0,"li",9),A("click",function(){let r=I(e).$implicit;return P(r.onSelect())}),Y(1),S()}if(o&2){let e=n.$implicit;f(),Ne(" ",e.text," ")}}function fN(o,n){if(o&1&&(C(0,"div",3)(1,"span",4),R(2,"span",5),S(),C(3,"nz-dropdown-menu",null,6)(5,"ul",7),_(6,hN,2,1,"li",8),S()()()),o&2){let e=te(4),t=m();f(),h("nzDropdownMenu",e),f(5),h("ngForOf",t.listOfSelections)}}function gN(o,n){}function mN(o,n){if(o&1&&R(0,"span",6),o&2){let e=m();k("active",e.sortOrder==="ascend")}}function vN(o,n){if(o&1&&R(0,"span",7),o&2){let e=m();k("active",e.sortOrder==="descend")}}var yN=["nzChecked",""];function CN(o,n){if(o&1){let e=Q();C(0,"button",5),A("expandChange",function(i){I(e);let r=m(2);return P(r.onExpandChange(i))}),S()}if(o&2){let e=m(2);h("expand",e.nzExpand)("spaceMode",!e.nzShowExpand)}}function _N(o,n){}function SN(o,n){if(o&1&&(H(0),_(1,_N,0,0,"ng-template",6),B()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.nzExpandIcon)}}function wN(o,n){if(o&1&&(H(0),R(1,"nz-row-indent",2),_(2,CN,1,2,"ng-template",null,3,_e)(4,SN,2,1,"ng-container",4),B()),o&2){let e=te(3),t=m();f(),h("indentSize",t.nzIndentSize),f(3),h("ngIf",t.nzExpandIcon)("ngIfElse",e)}}function bN(o,n){if(o&1){let e=Q();C(0,"label",7),A("ngModelChange",function(i){I(e);let r=m();return P(r.onCheckedChange(i))}),S()}if(o&2){let e=m();h("nzDisabled",e.nzDisabled)("ngModel",e.nzChecked)("nzIndeterminate",e.nzIndeterminate),ze("aria-label",e.nzLabel)}}var TN=["nzColumnKey",""];function EN(o,n){if(o&1){let e=Q();C(0,"nz-table-filter",5),A("filterChange",function(i){I(e);let r=m();return P(r.onFilterValueChange(i))}),S()}if(o&2){let e=m(),t=te(2),i=te(4);h("contentTemplate",t)("extraTemplate",i)("customFilter",e.nzCustomFilter)("filterMultiple",e.nzFilterMultiple)("listOfFilter",e.nzFilters)}}function xN(o,n){}function zN(o,n){if(o&1&&_(0,xN,0,0,"ng-template",6),o&2){let e=m(),t=te(6),i=te(8);h("ngTemplateOutlet",e.nzShowSort?t:i)}}function ON(o,n){o&1&&(Ie(0),Ie(1,1))}function DN(o,n){if(o&1&&R(0,"nz-table-sorters",7),o&2){let e=m(),t=te(8);h("sortOrder",e.sortOrder)("sortDirections",e.sortDirections)("contentTemplate",t)}}function RN(o,n){o&1&&Ie(0,2)}var IN=[[["","nz-th-extra",""]],[["nz-filter-trigger"]],"*"],PN=["[nz-th-extra]","nz-filter-trigger","*"],MN=["nzSelections",""],FN=["nz-table-content",""];function AN(o,n){if(o&1&&R(0,"col"),o&2){let e=n.$implicit;Re("width",e)("min-width",e)}}function NN(o,n){}function LN(o,n){if(o&1&&(C(0,"thead",3),_(1,NN,0,0,"ng-template",2),S()),o&2){let e=m();f(),h("ngTemplateOutlet",e.theadTemplate)}}function kN(o,n){}var Qb=["tdElement"],VN=["nz-table-fixed-row",""];function GN(o,n){}function HN(o,n){if(o&1&&(C(0,"div",4),Xn(1,"async"),_(2,GN,0,0,"ng-template",5),S()),o&2){let e=m(),t=te(5);Re("width",Vi(1,3,e.hostWidth$),"px"),f(2),h("ngTemplateOutlet",t)}}function BN(o,n){o&1&&Ie(0)}var $N=["tableHeaderElement"],jN=["tableBodyElement"];function WN(o,n){if(o&1&&(C(0,"div",7,8),R(2,"table",9),S()),o&2){let e=m(2);h("ngStyle",e.bodyStyleMap),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth)("contentTemplate",e.contentTemplate)}}function UN(o,n){}var KN=(o,n)=>({$implicit:o,index:n});function qN(o,n){if(o&1&&(H(0),_(1,UN,0,0,"ng-template",13),B()),o&2){let e=n.$implicit,t=n.index,i=m(3);f(),h("ngTemplateOutlet",i.virtualTemplate)("ngTemplateOutletContext",ri(2,KN,e,t))}}function YN(o,n){if(o&1&&(C(0,"cdk-virtual-scroll-viewport",10,8)(2,"table",11)(3,"tbody"),_(4,qN,2,5,"ng-container",12),S()()()),o&2){let e=m(2);Re("height",e.data.length?e.scrollY:e.noDateVirtualHeight),h("itemSize",e.virtualItemSize)("maxBufferPx",e.virtualMaxBufferPx)("minBufferPx",e.virtualMinBufferPx),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth),f(2),h("cdkVirtualForOf",e.data)("cdkVirtualForTrackBy",e.virtualForTrackBy)}}function QN(o,n){if(o&1&&(H(0),C(1,"div",2,3),R(3,"table",4),S(),_(4,WN,3,4,"div",5)(5,YN,5,9,"cdk-virtual-scroll-viewport",6),B()),o&2){let e=m();f(),h("ngStyle",e.headerStyleMap),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth)("theadTemplate",e.theadTemplate),f(),h("ngIf",!e.virtualTemplate),f(),h("ngIf",e.virtualTemplate)}}function XN(o,n){if(o&1&&(C(0,"div",14,8),R(2,"table",15),S()),o&2){let e=m();h("ngStyle",e.bodyStyleMap),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth)("theadTemplate",e.theadTemplate)("contentTemplate",e.contentTemplate)}}function ZN(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.title)}}function JN(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.footer)}}function eL(o,n){}function tL(o,n){if(o&1&&(H(0),_(1,eL,0,0,"ng-template",10),B()),o&2){m();let e=te(11);f(),h("ngTemplateOutlet",e)}}function nL(o,n){if(o&1&&R(0,"nz-table-title-footer",11),o&2){let e=m();h("title",e.nzTitle)}}function iL(o,n){if(o&1&&R(0,"nz-table-inner-scroll",12),o&2){let e=m(),t=te(13),i=te(3);h("data",e.data)("scrollX",e.scrollX)("scrollY",e.scrollY)("contentTemplate",t)("listOfColWidth",e.listOfAutoColWidth)("theadTemplate",e.theadTemplate)("verticalScrollBarWidth",e.verticalScrollBarWidth)("virtualTemplate",e.nzVirtualScrollDirective?e.nzVirtualScrollDirective.templateRef:null)("virtualItemSize",e.nzVirtualItemSize)("virtualMaxBufferPx",e.nzVirtualMaxBufferPx)("virtualMinBufferPx",e.nzVirtualMinBufferPx)("tableMainElement",i)("virtualForTrackBy",e.nzVirtualForTrackBy)}}function rL(o,n){if(o&1&&R(0,"nz-table-inner-default",13),o&2){let e=m(),t=te(13);h("tableLayout",e.nzTableLayout)("listOfColWidth",e.listOfManualColWidth)("theadTemplate",e.theadTemplate)("contentTemplate",t)}}function oL(o,n){if(o&1&&R(0,"nz-table-title-footer",14),o&2){let e=m();h("footer",e.nzFooter)}}function sL(o,n){}function aL(o,n){if(o&1&&(H(0),_(1,sL,0,0,"ng-template",10),B()),o&2){m();let e=te(11);f(),h("ngTemplateOutlet",e)}}function lL(o,n){if(o&1){let e=Q();C(0,"nz-pagination",16),A("nzPageSizeChange",function(i){I(e);let r=m(2);return P(r.onPageSizeChange(i))})("nzPageIndexChange",function(i){I(e);let r=m(2);return P(r.onPageIndexChange(i))}),S()}if(o&2){let e=m(2);h("hidden",!e.showPagination)("nzShowSizeChanger",e.nzShowSizeChanger)("nzPageSizeOptions",e.nzPageSizeOptions)("nzItemRender",e.nzItemRender)("nzShowQuickJumper",e.nzShowQuickJumper)("nzHideOnSinglePage",e.nzHideOnSinglePage)("nzShowTotal",e.nzShowTotal)("nzSize",e.nzPaginationType==="small"?"small":e.nzSize==="default"?"default":"small")("nzPageSize",e.nzPageSize)("nzTotal",e.nzTotal)("nzSimple",e.nzSimple)("nzPageIndex",e.nzPageIndex)}}function cL(o,n){if(o&1&&_(0,lL,1,12,"nz-pagination",15),o&2){let e=m();h("ngIf",e.nzShowPagination&&e.data.length)}}function uL(o,n){o&1&&Ie(0)}var dL=["nz-table-measure-row",""];function pL(o,n){o&1&&R(0,"td",1,2)}function hL(o,n){if(o&1){let e=Q();C(0,"tr",3),A("listOfAutoWidth",function(i){I(e);let r=m(2);return P(r.onListOfAutoWidthChange(i))}),S()}if(o&2){let e=m().ngIf;h("listOfMeasureColumn",e)}}function fL(o,n){if(o&1&&(H(0),_(1,hL,1,1,"tr",2),B()),o&2){let e=n.ngIf,t=m();f(),h("ngIf",t.isInsideTable&&e.length)}}function gL(o,n){if(o&1&&(C(0,"tr",4),R(1,"nz-embed-empty",5),Xn(2,"async"),S()),o&2){let e=m();f(),h("specificContent",Vi(2,1,e.noResult$))}}var mL=["contentTemplate"];function vL(o,n){o&1&&Ie(0)}function yL(o,n){}function CL(o,n){if(o&1&&(H(0),_(1,yL,0,0,"ng-template",2),B()),o&2){m();let e=te(1);f(),h("ngTemplateOutlet",e)}}var _L="filterTrigger",Xb=(()=>{let n=class n{onVisibleChange(t){this.nzVisible=t,this.nzVisibleChange.next(t)}hide(){this.nzVisible=!1,this.cdr.markForCheck()}show(){this.nzVisible=!0,this.cdr.markForCheck()}constructor(t,i,r,s){this.nzConfigService=t,this.ngZone=i,this.cdr=r,this.destroy$=s,this._nzModuleName=_L,this.nzActive=!1,this.nzVisible=!1,this.nzBackdrop=!1,this.nzVisibleChange=new O}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.nzDropdown.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.stopPropagation()})})}};n.\u0275fac=function(i){return new(i||n)(w(st),w($e),w(fe),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-filter-trigger"]],viewQuery:function(i,r){if(i&1&&xe(yr,7,de),i&2){let s;ce(s=ue())&&(r.nzDropdown=s.first)}},inputs:{nzActive:"nzActive",nzDropdownMenu:"nzDropdownMenu",nzVisible:"nzVisible",nzBackdrop:"nzBackdrop"},outputs:{nzVisibleChange:"nzVisibleChange"},exportAs:["nzFilterTrigger"],standalone:!0,features:[Ve([Pt]),K],ngContentSelectors:ks,decls:2,vars:8,consts:[["nz-dropdown","","nzTrigger","click","nzPlacement","bottomRight",1,"ant-table-filter-trigger",3,"nzBackdrop","nzClickHide","nzDropdownMenu","nzVisible","nzVisibleChange"]],template:function(i,r){i&1&&(Pe(),C(0,"span",0),A("nzVisibleChange",function(a){return r.onVisibleChange(a)}),Ie(1),S()),i&2&&(k("active",r.nzActive)("ant-table-filter-open",r.nzVisible),h("nzBackdrop",r.nzBackdrop)("nzClickHide",!1)("nzDropdownMenu",r.nzDropdownMenu)("nzVisible",r.nzVisible))},dependencies:[Lr,yr],encapsulation:2,changeDetection:0});let o=n;return N([De(),W()],o.prototype,"nzBackdrop",void 0),o})(),Zb=(()=>{let n=class n{trackByValue(t,i){return i.value}check(t){this.filterMultiple?(this.listOfParsedFilter=this.listOfParsedFilter.map(i=>i===t?ot(V({},i),{checked:!t.checked}):i),t.checked=!t.checked):this.listOfParsedFilter=this.listOfParsedFilter.map(i=>ot(V({},i),{checked:i===t})),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter)}confirm(){this.isVisible=!1,this.emitFilterData()}reset(){this.isVisible=!1,this.listOfParsedFilter=this.parseListOfFilter(this.listOfFilter,!0),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter),this.emitFilterData()}onVisibleChange(t){this.isVisible=t,t?this.listOfChecked=this.listOfParsedFilter.filter(i=>i.checked).map(i=>i.value):this.emitFilterData()}emitFilterData(){let t=this.listOfParsedFilter.filter(i=>i.checked).map(i=>i.value);QS(this.listOfChecked,t)||(this.filterMultiple?this.filterChange.emit(t):this.filterChange.emit(t.length>0?t[0]:null))}parseListOfFilter(t,i){return t.map(r=>{let s=i?!1:!!r.byDefault;return{text:r.text,value:r.value,checked:s}})}getCheckedStatus(t){return t.some(i=>i.checked)}constructor(t,i){this.cdr=t,this.i18n=i,this.contentTemplate=null,this.customFilter=!1,this.extraTemplate=null,this.filterMultiple=!0,this.listOfFilter=[],this.filterChange=new O,this.destroy$=new J,this.isChecked=!1,this.isVisible=!1,this.listOfParsedFilter=[],this.listOfChecked=[]}ngOnInit(){this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Table"),this.cdr.markForCheck()})}ngOnChanges(t){let{listOfFilter:i}=t;i&&this.listOfFilter&&this.listOfFilter.length&&(this.listOfParsedFilter=this.parseListOfFilter(this.listOfFilter),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Di))},n.\u0275cmp=j({type:n,selectors:[["nz-table-filter"]],hostAttrs:[1,"ant-table-filter-column"],inputs:{contentTemplate:"contentTemplate",customFilter:"customFilter",extraTemplate:"extraTemplate",filterMultiple:"filterMultiple",listOfFilter:"listOfFilter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[oe,K],decls:3,vars:3,consts:[[1,"ant-table-column-title"],[3,"ngTemplateOutlet"],[4,"ngIf","ngIfElse"],[3,"nzVisible","nzActive","nzDropdownMenu","nzVisibleChange"],["nz-icon","","nzType","filter","nzTheme","fill"],["filterMenu","nzDropdownMenu"],[1,"ant-table-filter-dropdown"],["nz-menu",""],["nz-menu-item","",3,"nzSelected","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ant-table-filter-dropdown-btns"],["nz-button","","nzType","link","nzSize","small",3,"disabled","click"],["nz-button","","nzType","primary","nzSize","small",3,"click"],["nz-menu-item","",3,"nzSelected","click"],["nz-radio","",3,"ngModel","ngModelChange",4,"ngIf"],["nz-checkbox","",3,"ngModel","ngModelChange",4,"ngIf"],["nz-radio","",3,"ngModel","ngModelChange"],["nz-checkbox","",3,"ngModel","ngModelChange"]],template:function(i,r){i&1&&(C(0,"span",0),_(1,aN,0,0,"ng-template",1),S(),_(2,dN,13,8,"ng-container",2)),i&2&&(f(),h("ngTemplateOutlet",r.contentTemplate),f(),h("ngIf",!r.customFilter)("ngIfElse",r.extraTemplate))},dependencies:[Be,we,Xb,Ge,Fe,Lr,cs,co,us,lt,ls,$i,Bi,nn,Kt,Rt,Hi,eo,yi,hr],encapsulation:2,changeDetection:0});let o=n;return o})(),SL=(()=>{let n=class n{constructor(){this.expand=!1,this.spaceMode=!1,this.expandChange=new O}onHostClick(){this.spaceMode||(this.expand=!this.expand,this.expandChange.next(this.expand))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["button","nz-row-expand-button",""]],hostAttrs:[1,"ant-table-row-expand-icon"],hostVars:7,hostBindings:function(i,r){i&1&&A("click",function(){return r.onHostClick()}),i&2&&(Ug("type","button"),k("ant-table-row-expand-icon-expanded",!r.spaceMode&&r.expand===!0)("ant-table-row-expand-icon-collapsed",!r.spaceMode&&r.expand===!1)("ant-table-row-expand-icon-spaced",r.spaceMode))},inputs:{expand:"expand",spaceMode:"spaceMode"},outputs:{expandChange:"expandChange"},standalone:!0});let o=n;return o})(),wL=(()=>{let n=class n{constructor(){this.indentSize=0}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["nz-row-indent"]],hostAttrs:[1,"ant-table-row-indent"],hostVars:2,hostBindings:function(i,r){i&2&&Re("padding-left",r.indentSize,"px")},inputs:{indentSize:"indentSize"},standalone:!0});let o=n;return o})(),Jb=(()=>{let n=class n{constructor(){this.listOfSelections=[],this.checked=!1,this.disabled=!1,this.indeterminate=!1,this.label=null,this.showCheckbox=!1,this.showRowSelection=!1,this.checkedChange=new O}onCheckedChange(t){this.checked=t,this.checkedChange.emit(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-selection"]],hostAttrs:[1,"ant-table-selection"],inputs:{listOfSelections:"listOfSelections",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",label:"label",showCheckbox:"showCheckbox",showRowSelection:"showRowSelection"},outputs:{checkedChange:"checkedChange"},standalone:!0,features:[K],decls:2,vars:2,consts:[["nz-checkbox","",3,"ant-table-selection-select-all-custom","ngModel","nzDisabled","nzIndeterminate","ngModelChange",4,"ngIf"],["class","ant-table-selection-extra",4,"ngIf"],["nz-checkbox","",3,"ngModel","nzDisabled","nzIndeterminate","ngModelChange"],[1,"ant-table-selection-extra"],["nz-dropdown","","nzPlacement","bottomLeft",1,"ant-table-selection-down",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["selectionMenu","nzDropdownMenu"],["nz-menu","",1,"ant-table-selection-menu"],["nz-menu-item","",3,"click",4,"ngFor","ngForOf"],["nz-menu-item","",3,"click"]],template:function(i,r){i&1&&_(0,pN,1,6,"label",0)(1,fN,7,2,"div",1),i&2&&(h("ngIf",r.showCheckbox),f(),h("ngIf",r.showRowSelection))},dependencies:[we,nn,Kt,Rt,$i,Bi,Lr,cs,co,yr,us,Ge,Fe,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),eT=(()=>{let n=class n{constructor(){this.sortDirections=["ascend","descend",null],this.sortOrder=null,this.contentTemplate=null,this.isUp=!1,this.isDown=!1}ngOnChanges(t){let{sortDirections:i}=t;i&&(this.isUp=this.sortDirections.indexOf("ascend")!==-1,this.isDown=this.sortDirections.indexOf("descend")!==-1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-sorters"]],hostAttrs:[1,"ant-table-column-sorters"],inputs:{sortDirections:"sortDirections",sortOrder:"sortOrder",contentTemplate:"contentTemplate"},standalone:!0,features:[oe,K],decls:6,vars:5,consts:[[1,"ant-table-column-title"],[3,"ngTemplateOutlet"],[1,"ant-table-column-sorter"],[1,"ant-table-column-sorter-inner"],["nz-icon","","nzType","caret-up","class","ant-table-column-sorter-up",3,"active",4,"ngIf"],["nz-icon","","nzType","caret-down","class","ant-table-column-sorter-down",3,"active",4,"ngIf"],["nz-icon","","nzType","caret-up",1,"ant-table-column-sorter-up"],["nz-icon","","nzType","caret-down",1,"ant-table-column-sorter-down"]],template:function(i,r){i&1&&(C(0,"span",0),_(1,gN,0,0,"ng-template",1),S(),C(2,"span",2)(3,"span",3),_(4,mN,1,2,"span",4)(5,vN,1,2,"span",5),S()()),i&2&&(f(),h("ngTemplateOutlet",r.contentTemplate),f(),k("ant-table-column-sorter-full",r.isDown&&r.isUp),f(2),h("ngIf",r.isUp),f(),h("ngIf",r.isDown))},dependencies:[Ge,Fe,Be,we],encapsulation:2,changeDetection:0});let o=n;return o})(),Ym=(()=>{let n=class n{setAutoLeftWidth(t){this.renderer.setStyle(this.elementRef.nativeElement,"left",t)}setAutoRightWidth(t){this.renderer.setStyle(this.elementRef.nativeElement,"right",t)}setIsFirstRight(t){this.setFixClass(t,"ant-table-cell-fix-right-first")}setIsLastLeft(t){this.setFixClass(t,"ant-table-cell-fix-left-last")}setFixClass(t,i){this.renderer.removeClass(this.elementRef.nativeElement,i),t&&this.renderer.addClass(this.elementRef.nativeElement,i)}constructor(t,i){this.renderer=t,this.elementRef=i,this.nzRight=!1,this.nzLeft=!1,this.colspan=null,this.colSpan=null,this.changes$=new J,this.isAutoLeft=!1,this.isAutoRight=!1,this.isFixedLeft=!1,this.isFixedRight=!1,this.isFixed=!1}ngOnChanges(){this.setIsFirstRight(!1),this.setIsLastLeft(!1),this.isAutoLeft=this.nzLeft===""||this.nzLeft===!0,this.isAutoRight=this.nzRight===""||this.nzRight===!0,this.isFixedLeft=this.nzLeft!==!1,this.isFixedRight=this.nzRight!==!1,this.isFixed=this.isFixedLeft||this.isFixedRight;let t=i=>typeof i=="string"&&i!==""?i:null;this.setAutoLeftWidth(t(this.nzLeft)),this.setAutoRightWidth(t(this.nzRight)),this.changes$.next()}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275dir=Se({type:n,selectors:[["td","nzRight",""],["th","nzRight",""],["td","nzLeft",""],["th","nzLeft",""]],hostVars:6,hostBindings:function(i,r){i&2&&(Re("position",r.isFixed?"sticky":null),k("ant-table-cell-fix-right",r.isFixedRight)("ant-table-cell-fix-left",r.isFixedLeft))},inputs:{nzRight:"nzRight",nzLeft:"nzLeft",colspan:"colspan",colSpan:"colSpan"},standalone:!0,features:[oe]});let o=n;return o})(),Ma=(()=>{let n=class n{setTheadTemplate(t){this.theadTemplate$.next(t)}setHasFixLeft(t){this.hasFixLeft$.next(t)}setHasFixRight(t){this.hasFixRight$.next(t)}setTableWidthConfig(t){this.tableWidthConfigPx$.next(t)}setListOfTh(t){let i=0;t.forEach(s=>{i+=s.colspan&&+s.colspan||s.colSpan&&+s.colSpan||1});let r=t.map(s=>s.nzWidth);this.columnCount$.next(i),this.listOfThWidthConfigPx$.next(r)}setListOfMeasureColumn(t){let i=[];t.forEach(r=>{let s=r.colspan&&+r.colspan||r.colSpan&&+r.colSpan||1;for(let a=0;a`${i}px`))}setShowEmpty(t){this.showEmpty$.next(t)}setNoResult(t){this.noResult$.next(t)}setScroll(t,i){let r=!!(t||i);r||this.setListOfAutoWidth([]),this.enableAutoMeasure$.next(r)}constructor(){this.theadTemplate$=new tn(1),this.hasFixLeft$=new tn(1),this.hasFixRight$=new tn(1),this.hostWidth$=new tn(1),this.columnCount$=new tn(1),this.showEmpty$=new tn(1),this.noResult$=new tn(1),this.listOfThWidthConfigPx$=new ct([]),this.tableWidthConfigPx$=new ct([]),this.manualWidthConfigPx$=Fn([this.tableWidthConfigPx$,this.listOfThWidthConfigPx$]).pipe(We(([t,i])=>t.length?t:i)),this.listOfAutoWidthPx$=new tn(1),this.listOfListOfThWidthPx$=_t(this.manualWidthConfigPx$,Fn([this.listOfAutoWidthPx$,this.manualWidthConfigPx$]).pipe(We(([t,i])=>t.length===i.length?t.map((r,s)=>r==="0px"?i[s]||null:i[s]||r):i))),this.listOfMeasureColumn$=new tn(1),this.listOfListOfThWidth$=this.listOfAutoWidthPx$.pipe(We(t=>t.map(i=>parseInt(i,10)))),this.enableAutoMeasure$=new tn(1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),tT=(()=>{let n=class n{constructor(t){this.isInsideTable=!1,this.isInsideTable=!!t}};n.\u0275fac=function(i){return new(i||n)(w(Ma,8))},n.\u0275dir=Se({type:n,selectors:[["th",9,"nz-disable-th",3,"mat-cell",""],["td",9,"nz-disable-td",3,"mat-cell",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-table-cell",r.isInsideTable)},standalone:!0});let o=n;return o})(),Km=(()=>{let n=class n{updatePageSize(t){this.pageSize$.next(t)}updateFrontPagination(t){this.frontPagination$.next(t)}updatePageIndex(t){this.pageIndex$.next(t)}updateListOfData(t){this.listOfData$.next(t)}updateListOfCustomColumn(t){this.listOfCustomColumn$.next(t)}constructor(){this.destroy$=new J,this.pageIndex$=new ct(1),this.frontPagination$=new ct(!0),this.pageSize$=new ct(10),this.listOfData$=new ct([]),this.listOfCustomColumn$=new ct([]),this.pageIndexDistinct$=this.pageIndex$.pipe(Bt()),this.pageSizeDistinct$=this.pageSize$.pipe(Bt()),this.listOfCalcOperator$=new ct([]),this.queryParams$=Fn([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfCalcOperator$]).pipe(Sa(0),yS(1),We(([t,i,r])=>({pageIndex:t,pageSize:i,sort:r.filter(s=>s.sortFn).map(s=>({key:s.key,value:s.sortOrder})),filter:r.filter(s=>s.filterFn).map(s=>({key:s.key,value:s.filterValue}))}))),this.listOfDataAfterCalc$=Fn([this.listOfData$,this.listOfCalcOperator$]).pipe(We(([t,i])=>{let r=[...t],s=i.filter(l=>{let{filterValue:c,filterFn:u}=l;return!(c==null||Array.isArray(c)&&c.length===0)&&typeof u=="function"});for(let l of s){let{filterFn:c,filterValue:u}=l;r=r.filter(d=>c(u,d))}let a=i.filter(l=>l.sortOrder!==null&&typeof l.sortFn=="function").sort((l,c)=>+c.sortPriority-+l.sortPriority);return i.length&&r.sort((l,c)=>{for(let u of a){let{sortFn:d,sortOrder:p}=u;if(d&&p){let g=d(l,c,p);if(g!==0)return p==="ascend"?g:-g}}return 0}),r})),this.listOfFrontEndCurrentPageData$=Fn([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfDataAfterCalc$]).pipe(F(this.destroy$),Qe(t=>{let[i,r,s]=t,a=Math.ceil(s.length/r)||1;return i<=a}),We(([t,i,r])=>r.slice((t-1)*i,t*i))),this.listOfCurrentPageData$=this.frontPagination$.pipe(on(t=>t?this.listOfFrontEndCurrentPageData$:this.listOfDataAfterCalc$)),this.total$=this.frontPagination$.pipe(on(t=>t?this.listOfDataAfterCalc$:this.listOfData$),We(t=>t.length),Bt())}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var Qm=(()=>{let n=class n{constructor(){this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzLabel=null,this.nzIndentSize=0,this.nzShowExpand=!1,this.nzShowCheckbox=!1,this.nzExpand=!1,this.nzExpandIcon=null,this.nzCheckedChange=new O,this.nzExpandChange=new O,this.isNzShowExpandChanged=!1,this.isNzShowCheckboxChanged=!1}onCheckedChange(t){this.nzChecked=t,this.nzCheckedChange.emit(t)}onExpandChange(t){this.nzExpand=t,this.nzExpandChange.emit(t)}ngOnChanges(t){let i=c=>c&&c.firstChange&&c.currentValue!==void 0,{nzExpand:r,nzChecked:s,nzShowExpand:a,nzShowCheckbox:l}=t;a&&(this.isNzShowExpandChanged=!0),l&&(this.isNzShowCheckboxChanged=!0),i(r)&&!this.isNzShowExpandChanged&&(this.nzShowExpand=!0),i(s)&&!this.isNzShowCheckboxChanged&&(this.nzShowCheckbox=!0)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["td","nzChecked",""],["td","nzDisabled",""],["td","nzIndeterminate",""],["td","nzIndentSize",""],["td","nzExpand",""],["td","nzShowExpand",""],["td","nzShowCheckbox",""]],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-cell-with-append",r.nzShowExpand||r.nzIndentSize>0)("ant-table-selection-column",r.nzShowCheckbox)},inputs:{nzChecked:"nzChecked",nzDisabled:"nzDisabled",nzIndeterminate:"nzIndeterminate",nzLabel:"nzLabel",nzIndentSize:"nzIndentSize",nzShowExpand:"nzShowExpand",nzShowCheckbox:"nzShowCheckbox",nzExpand:"nzExpand",nzExpandIcon:"nzExpandIcon"},outputs:{nzCheckedChange:"nzCheckedChange",nzExpandChange:"nzExpandChange"},standalone:!0,features:[oe,K],attrs:yN,ngContentSelectors:ks,decls:3,vars:2,consts:[[4,"ngIf"],["nz-checkbox","",3,"nzDisabled","ngModel","nzIndeterminate","ngModelChange",4,"ngIf"],[3,"indentSize"],["rowExpand",""],[4,"ngIf","ngIfElse"],["nz-row-expand-button","",3,"expand","spaceMode","expandChange"],[3,"ngTemplateOutlet"],["nz-checkbox","",3,"nzDisabled","ngModel","nzIndeterminate","ngModelChange"]],template:function(i,r){i&1&&(Pe(),_(0,wN,5,3,"ng-container",0)(1,bN,1,4,"label",1),Ie(2)),i&2&&(h("ngIf",r.nzShowExpand||r.nzIndentSize>0),f(),h("ngIf",r.nzShowCheckbox))},dependencies:[wL,SL,we,Be,$i,Bi,nn,Kt,Rt],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowExpand",void 0),N([W()],o.prototype,"nzShowCheckbox",void 0),N([W()],o.prototype,"nzExpand",void 0),o})(),uh=(()=>{let n=class n{getNextSortDirection(t,i){let r=t.indexOf(i);return r===t.length-1?t[0]:t[r+1]}setSortOrder(t){this.sortOrderChange$.next(t)}clearSortOrder(){this.sortOrder!==null&&this.setSortOrder(null)}onFilterValueChange(t){this.nzFilterChange.emit(t),this.nzFilterValue=t,this.updateCalcOperator()}updateCalcOperator(){this.calcOperatorChange$.next()}constructor(t,i,r,s){this.host=t,this.cdr=i,this.ngZone=r,this.destroy$=s,this.manualClickOrder$=new J,this.calcOperatorChange$=new J,this.nzFilterValue=null,this.sortOrder=null,this.sortDirections=["ascend","descend",null],this.sortOrderChange$=new J,this.isNzShowSortChanged=!1,this.isNzShowFilterChanged=!1,this.nzFilterMultiple=!0,this.nzSortOrder=null,this.nzSortPriority=!1,this.nzSortDirections=["ascend","descend",null],this.nzFilters=[],this.nzSortFn=null,this.nzFilterFn=null,this.nzShowSort=!1,this.nzShowFilter=!1,this.nzCustomFilter=!1,this.nzCheckedChange=new O,this.nzSortOrderChange=new O,this.nzFilterChange=new O}ngOnInit(){this.ngZone.runOutsideAngular(()=>Ke(this.host.nativeElement,"click").pipe(Qe(()=>this.nzShowSort),F(this.destroy$)).subscribe(()=>{let t=this.getNextSortDirection(this.sortDirections,this.sortOrder);this.ngZone.run(()=>{this.setSortOrder(t),this.manualClickOrder$.next(this)})})),this.sortOrderChange$.pipe(F(this.destroy$)).subscribe(t=>{this.sortOrder!==t&&(this.sortOrder=t,this.nzSortOrderChange.emit(t)),this.updateCalcOperator(),this.cdr.markForCheck()})}ngOnChanges(t){let{nzSortDirections:i,nzFilters:r,nzSortOrder:s,nzSortFn:a,nzFilterFn:l,nzSortPriority:c,nzFilterMultiple:u,nzShowSort:d,nzShowFilter:p}=t;i&&this.nzSortDirections&&this.nzSortDirections.length&&(this.sortDirections=this.nzSortDirections),s&&(this.sortOrder=this.nzSortOrder,this.setSortOrder(this.nzSortOrder)),d&&(this.isNzShowSortChanged=!0),p&&(this.isNzShowFilterChanged=!0);let g=v=>v&&v.firstChange&&v.currentValue!==void 0;if((g(s)||g(a))&&!this.isNzShowSortChanged&&(this.nzShowSort=!0),g(r)&&!this.isNzShowFilterChanged&&(this.nzShowFilter=!0),(r||u)&&this.nzShowFilter){let v=this.nzFilters.filter(y=>y.byDefault).map(y=>y.value);this.nzFilterValue=this.nzFilterMultiple?v:v[0]||null}(a||l||c||r)&&this.updateCalcOperator()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(fe),w($e),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["th","nzColumnKey",""],["th","nzSortFn",""],["th","nzSortOrder",""],["th","nzFilters",""],["th","nzShowSort",""],["th","nzShowFilter",""],["th","nzCustomFilter",""]],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-column-has-sorters",r.nzShowSort)("ant-table-column-sort",r.sortOrder==="descend"||r.sortOrder==="ascend")},inputs:{nzColumnKey:"nzColumnKey",nzFilterMultiple:"nzFilterMultiple",nzSortOrder:"nzSortOrder",nzSortPriority:"nzSortPriority",nzSortDirections:"nzSortDirections",nzFilters:"nzFilters",nzSortFn:"nzSortFn",nzFilterFn:"nzFilterFn",nzShowSort:"nzShowSort",nzShowFilter:"nzShowFilter",nzCustomFilter:"nzCustomFilter"},outputs:{nzCheckedChange:"nzCheckedChange",nzSortOrderChange:"nzSortOrderChange",nzFilterChange:"nzFilterChange"},standalone:!0,features:[Ve([Pt]),oe,K],attrs:TN,ngContentSelectors:PN,decls:9,vars:2,consts:[[3,"contentTemplate","extraTemplate","customFilter","filterMultiple","listOfFilter","filterChange",4,"ngIf","ngIfElse"],["notFilterTemplate",""],["extraTemplate",""],["sortTemplate",""],["contentTemplate",""],[3,"contentTemplate","extraTemplate","customFilter","filterMultiple","listOfFilter","filterChange"],[3,"ngTemplateOutlet"],[3,"sortOrder","sortDirections","contentTemplate"]],template:function(i,r){if(i&1&&(Pe(IN),_(0,EN,1,5,"nz-table-filter",0)(1,zN,1,1,"ng-template",null,1,_e)(3,ON,2,0,"ng-template",null,2,_e)(5,DN,1,3,"ng-template",null,3,_e)(7,RN,1,0,"ng-template",null,4,_e)),i&2){let s=te(2);h("ngIf",r.nzShowFilter||r.nzCustomFilter)("ngIfElse",s)}},dependencies:[Zb,we,Be,eT],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowSort",void 0),N([W()],o.prototype,"nzShowFilter",void 0),N([W()],o.prototype,"nzCustomFilter",void 0),o})(),Xm=(()=>{let n=class n{constructor(t,i){this.renderer=t,this.elementRef=i,this.changes$=new J,this.nzWidth=null,this.colspan=null,this.colSpan=null,this.rowspan=null,this.rowSpan=null}ngOnChanges(t){let{nzWidth:i,colspan:r,rowspan:s,colSpan:a,rowSpan:l}=t;if(r||a){let c=this.colspan||this.colSpan;Ml(c)?this.renderer.removeAttribute(this.elementRef.nativeElement,"colspan"):this.renderer.setAttribute(this.elementRef.nativeElement,"colspan",`${c}`)}if(s||l){let c=this.rowspan||this.rowSpan;Ml(c)?this.renderer.removeAttribute(this.elementRef.nativeElement,"rowspan"):this.renderer.setAttribute(this.elementRef.nativeElement,"rowspan",`${c}`)}(i||r)&&this.changes$.next()}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275dir=Se({type:n,selectors:[["th"]],inputs:{nzWidth:"nzWidth",colspan:"colspan",colSpan:"colSpan",rowspan:"rowspan",rowSpan:"rowSpan"},standalone:!0,features:[oe]});let o=n;return o})(),bL=(()=>{let n=class n{constructor(){this.nzSelections=[],this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzLabel=null,this.nzShowCheckbox=!1,this.nzShowRowSelection=!1,this.nzCheckedChange=new O,this.isNzShowExpandChanged=!1,this.isNzShowCheckboxChanged=!1}onCheckedChange(t){this.nzChecked=t,this.nzCheckedChange.emit(t)}ngOnChanges(t){let i=c=>c&&c.firstChange&&c.currentValue!==void 0,{nzChecked:r,nzSelections:s,nzShowExpand:a,nzShowCheckbox:l}=t;a&&(this.isNzShowExpandChanged=!0),l&&(this.isNzShowCheckboxChanged=!0),i(s)&&!this.isNzShowExpandChanged&&(this.nzShowRowSelection=!0),i(r)&&!this.isNzShowCheckboxChanged&&(this.nzShowCheckbox=!0)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["th","nzSelections",""],["th","nzChecked",""],["th","nzShowCheckbox",""],["th","nzShowRowSelection",""]],hostAttrs:[1,"ant-table-selection-column"],inputs:{nzSelections:"nzSelections",nzChecked:"nzChecked",nzDisabled:"nzDisabled",nzIndeterminate:"nzIndeterminate",nzLabel:"nzLabel",nzShowCheckbox:"nzShowCheckbox",nzShowRowSelection:"nzShowRowSelection"},outputs:{nzCheckedChange:"nzCheckedChange"},standalone:!0,features:[oe,K],attrs:MN,ngContentSelectors:ks,decls:2,vars:7,consts:[[3,"checked","disabled","indeterminate","label","listOfSelections","showCheckbox","showRowSelection","checkedChange"]],template:function(i,r){i&1&&(Pe(),C(0,"nz-table-selection",0),A("checkedChange",function(a){return r.onCheckedChange(a)}),S(),Ie(1)),i&2&&h("checked",r.nzChecked)("disabled",r.nzDisabled)("indeterminate",r.nzIndeterminate)("label",r.nzLabel)("listOfSelections",r.nzSelections)("showCheckbox",r.nzShowCheckbox)("showRowSelection",r.nzShowRowSelection)},dependencies:[Jb],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowCheckbox",void 0),N([W()],o.prototype,"nzShowRowSelection",void 0),o})();var nT=(()=>{let n=class n{constructor(){this.tableLayout="auto",this.theadTemplate=null,this.contentTemplate=null,this.listOfColWidth=[],this.scrollX=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["table","nz-table-content",""]],hostVars:8,hostBindings:function(i,r){i&2&&(Re("table-layout",r.tableLayout)("width",r.scrollX)("min-width",r.scrollX?"100%":null),k("ant-table-fixed",r.scrollX))},inputs:{tableLayout:"tableLayout",theadTemplate:"theadTemplate",contentTemplate:"contentTemplate",listOfColWidth:"listOfColWidth",scrollX:"scrollX"},standalone:!0,features:[K],attrs:FN,ngContentSelectors:ks,decls:4,vars:3,consts:[[3,"width","minWidth",4,"ngFor","ngForOf"],["class","ant-table-thead",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"ant-table-thead"]],template:function(i,r){i&1&&(Pe(),_(0,AN,1,4,"col",0)(1,LN,2,1,"thead",1)(2,kN,0,0,"ng-template",2),Ie(3)),i&2&&(h("ngForOf",r.listOfColWidth),f(),h("ngIf",r.theadTemplate),f(),h("ngTemplateOutlet",r.contentTemplate))},dependencies:[Be,we,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),Zm=(()=>{let n=class n{constructor(t,i){this.nzTableStyleService=t,this.renderer=i,this.hostWidth$=new ct(null),this.enableAutoMeasure$=new ct(!1),this.destroy$=new J}ngOnInit(){if(this.nzTableStyleService){let{enableAutoMeasure$:t,hostWidth$:i}=this.nzTableStyleService;t.pipe(F(this.destroy$)).subscribe(this.enableAutoMeasure$),i.pipe(F(this.destroy$)).subscribe(this.hostWidth$)}}ngAfterViewInit(){this.nzTableStyleService.columnCount$.pipe(F(this.destroy$)).subscribe(t=>{this.renderer.setAttribute(this.tdElement.nativeElement,"colspan",`${t}`)})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Ma),w(He))},n.\u0275cmp=j({type:n,selectors:[["tr","nz-table-fixed-row",""],["tr","nzExpand",""]],viewQuery:function(i,r){if(i&1&&xe(Qb,7),i&2){let s;ce(s=ue())&&(r.tdElement=s.first)}},standalone:!0,features:[K],attrs:VN,ngContentSelectors:ks,decls:6,vars:4,consts:[[1,"nz-disable-td","ant-table-cell"],["tdElement",""],["class","ant-table-expanded-row-fixed","style","position: sticky; left: 0px; overflow: hidden;",3,"width",4,"ngIf","ngIfElse"],["contentTemplate",""],[1,"ant-table-expanded-row-fixed",2,"position","sticky","left","0px","overflow","hidden"],[3,"ngTemplateOutlet"]],template:function(i,r){if(i&1&&(Pe(),C(0,"td",0,1),_(2,HN,3,5,"div",2),Xn(3,"async"),S(),_(4,BN,1,0,"ng-template",null,3,_e)),i&2){let s=te(5);f(2),h("ngIf",Vi(3,2,r.enableAutoMeasure$))("ngIfElse",s)}},dependencies:[we,ru,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),TL=(()=>{let n=class n{constructor(){this.tableLayout="auto",this.listOfColWidth=[],this.theadTemplate=null,this.contentTemplate=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-inner-default"]],hostAttrs:[1,"ant-table-container"],inputs:{tableLayout:"tableLayout",listOfColWidth:"listOfColWidth",theadTemplate:"theadTemplate",contentTemplate:"contentTemplate"},standalone:!0,features:[K],decls:2,vars:4,consts:[[1,"ant-table-content"],["nz-table-content","",3,"contentTemplate","tableLayout","listOfColWidth","theadTemplate"]],template:function(i,r){i&1&&(C(0,"div",0),R(1,"table",1),S()),i&2&&(f(),h("contentTemplate",r.contentTemplate)("tableLayout",r.tableLayout)("listOfColWidth",r.listOfColWidth)("theadTemplate",r.theadTemplate))},dependencies:[nT],encapsulation:2,changeDetection:0});let o=n;return o})(),qm=(()=>{let n=class n{setScrollPositionClassName(t=!1){let{scrollWidth:i,scrollLeft:r,clientWidth:s}=this.tableBodyElement.nativeElement,a="ant-table-ping-left",l="ant-table-ping-right";i===s&&i!==0||t?(this.renderer.removeClass(this.tableMainElement,a),this.renderer.removeClass(this.tableMainElement,l)):r===0?(this.renderer.removeClass(this.tableMainElement,a),this.renderer.addClass(this.tableMainElement,l)):i===r+s?(this.renderer.removeClass(this.tableMainElement,l),this.renderer.addClass(this.tableMainElement,a)):(this.renderer.addClass(this.tableMainElement,a),this.renderer.addClass(this.tableMainElement,l))}constructor(t,i,r,s){this.renderer=t,this.ngZone=i,this.platform=r,this.resizeService=s,this.data=[],this.scrollX=null,this.scrollY=null,this.contentTemplate=null,this.widthConfig=[],this.listOfColWidth=[],this.theadTemplate=null,this.virtualTemplate=null,this.virtualItemSize=0,this.virtualMaxBufferPx=200,this.virtualMinBufferPx=100,this.virtualForTrackBy=a=>a,this.headerStyleMap={},this.bodyStyleMap={},this.verticalScrollBarWidth=0,this.noDateVirtualHeight="182px",this.data$=new J,this.scroll$=new J,this.destroy$=new J}ngOnChanges(t){let{scrollX:i,scrollY:r,data:s}=t;if(i||r){let a=this.verticalScrollBarWidth!==0;this.headerStyleMap={overflowX:"hidden",overflowY:this.scrollY&&a?"scroll":"hidden"},this.bodyStyleMap={overflowY:this.scrollY?"scroll":"hidden",overflowX:this.scrollX?"auto":null,maxHeight:this.scrollY},this.ngZone.runOutsideAngular(()=>this.scroll$.next())}s&&this.ngZone.runOutsideAngular(()=>this.data$.next())}ngAfterViewInit(){this.platform.isBrowser&&this.ngZone.runOutsideAngular(()=>{let t=this.scroll$.pipe(Ot(null),Os(0),on(()=>Ke(this.tableBodyElement.nativeElement,"scroll").pipe(Ot(!0))),F(this.destroy$)),i=this.resizeService.subscribe().pipe(F(this.destroy$)),r=this.data$.pipe(F(this.destroy$));_t(t,i,r,this.scroll$).pipe(Ot(!0),Os(0),F(this.destroy$)).subscribe(()=>this.setScrollPositionClassName()),t.pipe(Qe(()=>!!this.scrollY)).subscribe(()=>this.tableHeaderElement.nativeElement.scrollLeft=this.tableBodyElement.nativeElement.scrollLeft)})}ngOnDestroy(){this.setScrollPositionClassName(!0),this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(He),w($e),w(gn),w(uu))},n.\u0275cmp=j({type:n,selectors:[["nz-table-inner-scroll"]],viewQuery:function(i,r){if(i&1&&(xe($N,5,de),xe(jN,5,de),xe(ur,5,ur)),i&2){let s;ce(s=ue())&&(r.tableHeaderElement=s.first),ce(s=ue())&&(r.tableBodyElement=s.first),ce(s=ue())&&(r.cdkVirtualScrollViewport=s.first)}},hostAttrs:[1,"ant-table-container"],inputs:{data:"data",scrollX:"scrollX",scrollY:"scrollY",contentTemplate:"contentTemplate",widthConfig:"widthConfig",listOfColWidth:"listOfColWidth",theadTemplate:"theadTemplate",virtualTemplate:"virtualTemplate",virtualItemSize:"virtualItemSize",virtualMaxBufferPx:"virtualMaxBufferPx",virtualMinBufferPx:"virtualMinBufferPx",tableMainElement:"tableMainElement",virtualForTrackBy:"virtualForTrackBy",verticalScrollBarWidth:"verticalScrollBarWidth"},standalone:!0,features:[oe,K],decls:2,vars:2,consts:[[4,"ngIf"],["class","ant-table-content",3,"ngStyle",4,"ngIf"],[1,"ant-table-header","nz-table-hide-scrollbar",3,"ngStyle"],["tableHeaderElement",""],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth","theadTemplate"],["class","ant-table-body",3,"ngStyle",4,"ngIf"],[3,"itemSize","maxBufferPx","minBufferPx","height",4,"ngIf"],[1,"ant-table-body",3,"ngStyle"],["tableBodyElement",""],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth","contentTemplate"],[3,"itemSize","maxBufferPx","minBufferPx"],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-table-content",3,"ngStyle"],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth","theadTemplate","contentTemplate"]],template:function(i,r){i&1&&_(0,QN,6,6,"ng-container",0)(1,XN,3,5,"div",1),i&2&&(h("ngIf",r.scrollY),f(),h("ngIf",!r.scrollY))},dependencies:[nT,we,Zt,JS,Fl,Al,ur,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),Jm=(()=>{let n=class n{constructor(t){this.templateRef=t}static ngTemplateContextGuard(t,i){return!0}};n.\u0275fac=function(i){return new(i||n)(w(En))},n.\u0275dir=Se({type:n,selectors:[["","nz-virtual-scroll",""]],exportAs:["nzVirtualScroll"],standalone:!0});let o=n;return o})(),iT=(()=>{let n=class n{constructor(){this.title=null,this.footer=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-title-footer"]],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-title",r.title!==null)("ant-table-footer",r.footer!==null)},inputs:{title:"title",footer:"footer"},standalone:!0,features:[K],decls:2,vars:2,consts:[[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,ZN,2,1,"ng-container",0)(1,JN,2,1,"ng-container",0),i&2&&(h("nzStringTemplateOutlet",r.title),f(),h("nzStringTemplateOutlet",r.footer))},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Yb="table",ev=(()=>{let n=class n{onPageSizeChange(t){this.nzTableDataService.updatePageSize(t)}onPageIndexChange(t){this.nzTableDataService.updatePageIndex(t)}constructor(t,i,r,s,a,l,c){this.elementRef=t,this.nzResizeObserver=i,this.nzConfigService=r,this.cdr=s,this.nzTableStyleService=a,this.nzTableDataService=l,this.directionality=c,this._nzModuleName=Yb,this.nzTableLayout="auto",this.nzShowTotal=null,this.nzItemRender=null,this.nzTitle=null,this.nzFooter=null,this.nzNoResult=void 0,this.nzPageSizeOptions=[10,20,30,40,50],this.nzVirtualItemSize=0,this.nzVirtualMaxBufferPx=200,this.nzVirtualMinBufferPx=100,this.nzVirtualForTrackBy=u=>u,this.nzLoadingDelay=0,this.nzPageIndex=1,this.nzPageSize=10,this.nzTotal=0,this.nzWidthConfig=[],this.nzData=[],this.nzCustomColumn=[],this.nzPaginationPosition="bottom",this.nzScroll={x:null,y:null},this.nzPaginationType="default",this.nzFrontPagination=!0,this.nzTemplateMode=!1,this.nzShowPagination=!0,this.nzLoading=!1,this.nzOuterBordered=!1,this.nzLoadingIndicator=null,this.nzBordered=!1,this.nzSize="default",this.nzShowSizeChanger=!1,this.nzHideOnSinglePage=!1,this.nzShowQuickJumper=!1,this.nzSimple=!1,this.nzPageSizeChange=new O,this.nzPageIndexChange=new O,this.nzQueryParams=new O,this.nzCurrentPageDataChange=new O,this.nzCustomColumnChange=new O,this.data=[],this.scrollX=null,this.scrollY=null,this.theadTemplate=null,this.listOfAutoColWidth=[],this.listOfManualColWidth=[],this.hasFixLeft=!1,this.hasFixRight=!1,this.showPagination=!0,this.destroy$=new J,this.templateMode$=new ct(!1),this.dir="ltr",this.verticalScrollBarWidth=0,this.nzConfigService.getConfigChangeEventForComponent(Yb).pipe(F(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){let{pageIndexDistinct$:t,pageSizeDistinct$:i,listOfCurrentPageData$:r,total$:s,queryParams$:a,listOfCustomColumn$:l}=this.nzTableDataService,{theadTemplate$:c,hasFixLeft$:u,hasFixRight$:d}=this.nzTableStyleService;this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(p=>{this.dir=p,this.cdr.detectChanges()}),a.pipe(F(this.destroy$)).subscribe(this.nzQueryParams),t.pipe(F(this.destroy$)).subscribe(p=>{p!==this.nzPageIndex&&(this.nzPageIndex=p,this.nzPageIndexChange.next(p))}),i.pipe(F(this.destroy$)).subscribe(p=>{p!==this.nzPageSize&&(this.nzPageSize=p,this.nzPageSizeChange.next(p))}),s.pipe(F(this.destroy$),Qe(()=>this.nzFrontPagination)).subscribe(p=>{p!==this.nzTotal&&(this.nzTotal=p,this.cdr.markForCheck())}),r.pipe(F(this.destroy$)).subscribe(p=>{this.data=p,this.nzCurrentPageDataChange.next(p),this.cdr.markForCheck()}),l.pipe(F(this.destroy$)).subscribe(p=>{this.nzCustomColumn=p,this.nzCustomColumnChange.next(p),this.cdr.markForCheck()}),c.pipe(F(this.destroy$)).subscribe(p=>{this.theadTemplate=p,this.cdr.markForCheck()}),u.pipe(F(this.destroy$)).subscribe(p=>{this.hasFixLeft=p,this.cdr.markForCheck()}),d.pipe(F(this.destroy$)).subscribe(p=>{this.hasFixRight=p,this.cdr.markForCheck()}),Fn([s,this.templateMode$]).pipe(We(([p,g])=>p===0&&!g),F(this.destroy$)).subscribe(p=>{this.nzTableStyleService.setShowEmpty(p)}),this.verticalScrollBarWidth=XS("vertical"),this.nzTableStyleService.listOfListOfThWidthPx$.pipe(F(this.destroy$)).subscribe(p=>{this.listOfAutoColWidth=p,this.cdr.markForCheck()}),this.nzTableStyleService.manualWidthConfigPx$.pipe(F(this.destroy$)).subscribe(p=>{this.listOfManualColWidth=p,this.cdr.markForCheck()})}ngOnChanges(t){let{nzScroll:i,nzPageIndex:r,nzPageSize:s,nzFrontPagination:a,nzData:l,nzCustomColumn:c,nzWidthConfig:u,nzNoResult:d,nzTemplateMode:p}=t;r&&this.nzTableDataService.updatePageIndex(this.nzPageIndex),s&&this.nzTableDataService.updatePageSize(this.nzPageSize),l&&(this.nzData=this.nzData||[],this.nzTableDataService.updateListOfData(this.nzData)),c&&(this.nzCustomColumn=this.nzCustomColumn||[],this.nzTableDataService.updateListOfCustomColumn(this.nzCustomColumn)),a&&this.nzTableDataService.updateFrontPagination(this.nzFrontPagination),i&&this.setScrollOnChanges(),u&&this.nzTableStyleService.setTableWidthConfig(this.nzWidthConfig),p&&this.templateMode$.next(this.nzTemplateMode),d&&this.nzTableStyleService.setNoResult(this.nzNoResult),this.updateShowPagination()}ngAfterViewInit(){this.nzResizeObserver.observe(this.elementRef).pipe(We(([t])=>{let{width:i}=t.target.getBoundingClientRect(),r=this.scrollY?this.verticalScrollBarWidth:0;return Math.floor(i-r)}),F(this.destroy$)).subscribe(this.nzTableStyleService.hostWidth$),this.nzTableInnerScrollComponent&&this.nzTableInnerScrollComponent.cdkVirtualScrollViewport&&(this.cdkVirtualScrollViewport=this.nzTableInnerScrollComponent.cdkVirtualScrollViewport)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setScrollOnChanges(){this.scrollX=this.nzScroll&&this.nzScroll.x||null,this.scrollY=this.nzScroll&&this.nzScroll.y||null,this.nzTableStyleService.setScroll(this.scrollX,this.scrollY)}updateShowPagination(){this.showPagination=this.nzHideOnSinglePage&&this.nzData.length>this.nzPageSize||this.nzData.length>0&&!this.nzHideOnSinglePage||!this.nzFrontPagination&&this.nzTotal>this.nzPageSize}};n.\u0275fac=function(i){return new(i||n)(w(de),w(ds),w(st),w(fe),w(Ma),w(Km),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-table"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Jm,5),i&2){let a;ce(a=ue())&&(r.nzVirtualScrollDirective=a.first)}},viewQuery:function(i,r){if(i&1&&xe(qm,5),i&2){let s;ce(s=ue())&&(r.nzTableInnerScrollComponent=s.first)}},hostAttrs:[1,"ant-table-wrapper"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-wrapper-rtl",r.dir==="rtl")("ant-table-custom-column",r.nzCustomColumn.length)},inputs:{nzTableLayout:"nzTableLayout",nzShowTotal:"nzShowTotal",nzItemRender:"nzItemRender",nzTitle:"nzTitle",nzFooter:"nzFooter",nzNoResult:"nzNoResult",nzPageSizeOptions:"nzPageSizeOptions",nzVirtualItemSize:"nzVirtualItemSize",nzVirtualMaxBufferPx:"nzVirtualMaxBufferPx",nzVirtualMinBufferPx:"nzVirtualMinBufferPx",nzVirtualForTrackBy:"nzVirtualForTrackBy",nzLoadingDelay:"nzLoadingDelay",nzPageIndex:"nzPageIndex",nzPageSize:"nzPageSize",nzTotal:"nzTotal",nzWidthConfig:"nzWidthConfig",nzData:"nzData",nzCustomColumn:"nzCustomColumn",nzPaginationPosition:"nzPaginationPosition",nzScroll:"nzScroll",nzPaginationType:"nzPaginationType",nzFrontPagination:"nzFrontPagination",nzTemplateMode:"nzTemplateMode",nzShowPagination:"nzShowPagination",nzLoading:"nzLoading",nzOuterBordered:"nzOuterBordered",nzLoadingIndicator:"nzLoadingIndicator",nzBordered:"nzBordered",nzSize:"nzSize",nzShowSizeChanger:"nzShowSizeChanger",nzHideOnSinglePage:"nzHideOnSinglePage",nzShowQuickJumper:"nzShowQuickJumper",nzSimple:"nzSimple"},outputs:{nzPageSizeChange:"nzPageSizeChange",nzPageIndexChange:"nzPageIndexChange",nzQueryParams:"nzQueryParams",nzCurrentPageDataChange:"nzCurrentPageDataChange",nzCustomColumnChange:"nzCustomColumnChange"},exportAs:["nzTable"],standalone:!0,features:[Ve([Ma,Km]),oe,K],ngContentSelectors:ks,decls:14,vars:27,consts:[[3,"nzDelay","nzSpinning","nzIndicator"],[4,"ngIf"],[1,"ant-table"],["tableMainElement",""],[3,"title",4,"ngIf"],[3,"data","scrollX","scrollY","contentTemplate","listOfColWidth","theadTemplate","verticalScrollBarWidth","virtualTemplate","virtualItemSize","virtualMaxBufferPx","virtualMinBufferPx","tableMainElement","virtualForTrackBy",4,"ngIf","ngIfElse"],["defaultTemplate",""],[3,"footer",4,"ngIf"],["paginationTemplate",""],["contentTemplate",""],[3,"ngTemplateOutlet"],[3,"title"],[3,"data","scrollX","scrollY","contentTemplate","listOfColWidth","theadTemplate","verticalScrollBarWidth","virtualTemplate","virtualItemSize","virtualMaxBufferPx","virtualMinBufferPx","tableMainElement","virtualForTrackBy"],[3,"tableLayout","listOfColWidth","theadTemplate","contentTemplate"],[3,"footer"],["class","ant-table-pagination ant-table-pagination-right",3,"hidden","nzShowSizeChanger","nzPageSizeOptions","nzItemRender","nzShowQuickJumper","nzHideOnSinglePage","nzShowTotal","nzSize","nzPageSize","nzTotal","nzSimple","nzPageIndex","nzPageSizeChange","nzPageIndexChange",4,"ngIf"],[1,"ant-table-pagination","ant-table-pagination-right",3,"hidden","nzShowSizeChanger","nzPageSizeOptions","nzItemRender","nzShowQuickJumper","nzHideOnSinglePage","nzShowTotal","nzSize","nzPageSize","nzTotal","nzSimple","nzPageIndex","nzPageSizeChange","nzPageIndexChange"]],template:function(i,r){if(i&1&&(Pe(),C(0,"nz-spin",0),_(1,tL,2,1,"ng-container",1),C(2,"div",2,3),_(4,nL,1,1,"nz-table-title-footer",4)(5,iL,1,13,"nz-table-inner-scroll",5)(6,rL,1,4,"ng-template",null,6,_e)(8,oL,1,1,"nz-table-title-footer",7),S(),_(9,aL,2,1,"ng-container",1),S(),_(10,cL,1,1,"ng-template",null,8,_e)(12,uL,1,0,"ng-template",null,9,_e)),i&2){let s=te(7);h("nzDelay",r.nzLoadingDelay)("nzSpinning",r.nzLoading)("nzIndicator",r.nzLoadingIndicator),f(),h("ngIf",r.nzPaginationPosition==="both"||r.nzPaginationPosition==="top"),f(),k("ant-table-rtl",r.dir==="rtl")("ant-table-fixed-header",r.nzData.length&&r.scrollY)("ant-table-fixed-column",r.scrollX)("ant-table-has-fix-left",r.hasFixLeft)("ant-table-has-fix-right",r.hasFixRight)("ant-table-bordered",r.nzBordered)("nz-table-out-bordered",r.nzOuterBordered&&!r.nzBordered)("ant-table-middle",r.nzSize==="middle")("ant-table-small",r.nzSize==="small"),f(2),h("ngIf",r.nzTitle),f(),h("ngIf",r.scrollY||r.scrollX)("ngIfElse",s),f(3),h("ngIf",r.nzFooter),f(),h("ngIf",r.nzPaginationPosition==="both"||r.nzPaginationPosition==="bottom")}},dependencies:[$b,we,Be,iT,qm,TL,qb,Um],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzFrontPagination",void 0),N([W()],o.prototype,"nzTemplateMode",void 0),N([W()],o.prototype,"nzShowPagination",void 0),N([W()],o.prototype,"nzLoading",void 0),N([W()],o.prototype,"nzOuterBordered",void 0),N([De()],o.prototype,"nzLoadingIndicator",void 0),N([De(),W()],o.prototype,"nzBordered",void 0),N([De()],o.prototype,"nzSize",void 0),N([De(),W()],o.prototype,"nzShowSizeChanger",void 0),N([De(),W()],o.prototype,"nzHideOnSinglePage",void 0),N([De(),W()],o.prototype,"nzShowQuickJumper",void 0),N([De(),W()],o.prototype,"nzSimple",void 0),o})(),EL=(()=>{let n=class n{constructor(t,i){this.nzResizeObserver=t,this.ngZone=i,this.listOfMeasureColumn=[],this.listOfAutoWidth=new O,this.destroy$=new J}trackByFunc(t,i){return i}ngAfterViewInit(){this.listOfTdElement.changes.pipe(Ot(this.listOfTdElement)).pipe(on(t=>Fn(t.toArray().map(i=>this.nzResizeObserver.observe(i).pipe(We(([r])=>{let{width:s}=r.target.getBoundingClientRect();return Math.floor(s)}))))),Sa(16),F(this.destroy$)).subscribe(t=>{this.ngZone instanceof $e&&$e.isInAngularZone()?this.listOfAutoWidth.next(t):this.ngZone.run(()=>this.listOfAutoWidth.next(t))})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(ds),w($e))},n.\u0275cmp=j({type:n,selectors:[["tr","nz-table-measure-row",""]],viewQuery:function(i,r){if(i&1&&xe(Qb,5),i&2){let s;ce(s=ue())&&(r.listOfTdElement=s)}},hostAttrs:[1,"ant-table-measure-now"],inputs:{listOfMeasureColumn:"listOfMeasureColumn"},outputs:{listOfAutoWidth:"listOfAutoWidth"},standalone:!0,features:[K],attrs:dL,decls:1,vars:2,consts:[["class","nz-disable-td","style","padding: 0px; border: 0px; height: 0px;",4,"ngFor","ngForOf","ngForTrackBy"],[1,"nz-disable-td",2,"padding","0px","border","0px","height","0px"],["tdElement",""]],template:function(i,r){i&1&&_(0,pL,2,0,"td",0),i&2&&h("ngForOf",r.listOfMeasureColumn)("ngForTrackBy",r.trackByFunc)},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),tv=(()=>{let n=class n{constructor(t){if(this.nzTableStyleService=t,this.isInsideTable=!1,this.showEmpty$=new ct(!1),this.noResult$=new ct(void 0),this.listOfMeasureColumn$=new ct([]),this.destroy$=new J,this.isInsideTable=!!this.nzTableStyleService,this.nzTableStyleService){let{showEmpty$:i,noResult$:r,listOfMeasureColumn$:s}=this.nzTableStyleService;r.pipe(F(this.destroy$)).subscribe(this.noResult$),s.pipe(F(this.destroy$)).subscribe(this.listOfMeasureColumn$),i.pipe(F(this.destroy$)).subscribe(this.showEmpty$)}}onListOfAutoWidthChange(t){this.nzTableStyleService.setListOfAutoWidth(t)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Ma,8))},n.\u0275cmp=j({type:n,selectors:[["tbody"]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-table-tbody",r.isInsideTable)},standalone:!0,features:[K],ngContentSelectors:ks,decls:5,vars:6,consts:[[4,"ngIf"],["class","ant-table-placeholder","nz-table-fixed-row","",4,"ngIf"],["nz-table-measure-row","",3,"listOfMeasureColumn","listOfAutoWidth",4,"ngIf"],["nz-table-measure-row","",3,"listOfMeasureColumn","listOfAutoWidth"],["nz-table-fixed-row","",1,"ant-table-placeholder"],["nzComponentName","table",3,"specificContent"]],template:function(i,r){i&1&&(Pe(),_(0,fL,2,1,"ng-container",0),Xn(1,"async"),Ie(2),_(3,gL,3,3,"tr",1),Xn(4,"async")),i&2&&(h("ngIf",Vi(1,2,r.listOfMeasureColumn$)),f(3),h("ngIf",Vi(4,4,r.showEmpty$)))},dependencies:[we,ru,EL,Zm,nh,Tu],encapsulation:2,changeDetection:0});let o=n;return o})(),nv=(()=>{let n=class n{constructor(t){this.nzTableStyleService=t,this.destroy$=new J,this.listOfFixedColumns$=new tn(1),this.listOfColumns$=new tn(1),this.listOfFixedColumnsChanges$=this.listOfFixedColumns$.pipe(on(i=>_t(this.listOfFixedColumns$,...i.map(r=>r.changes$)).pipe(zo(()=>this.listOfFixedColumns$))),F(this.destroy$)),this.listOfFixedLeftColumnChanges$=this.listOfFixedColumnsChanges$.pipe(We(i=>i.filter(r=>r.nzLeft!==!1))),this.listOfFixedRightColumnChanges$=this.listOfFixedColumnsChanges$.pipe(We(i=>i.filter(r=>r.nzRight!==!1))),this.listOfColumnsChanges$=this.listOfColumns$.pipe(on(i=>_t(this.listOfColumns$,...i.map(r=>r.changes$)).pipe(zo(()=>this.listOfColumns$))),F(this.destroy$)),this.isInsideTable=!1,this.isInsideTable=!!t}ngAfterContentInit(){this.nzTableStyleService&&(this.listOfCellFixedDirective.changes.pipe(Ot(this.listOfCellFixedDirective),F(this.destroy$)).subscribe(this.listOfFixedColumns$),this.listOfNzThDirective.changes.pipe(Ot(this.listOfNzThDirective),F(this.destroy$)).subscribe(this.listOfColumns$),this.listOfFixedLeftColumnChanges$.subscribe(t=>{t.forEach(i=>i.setIsLastLeft(i===t[t.length-1]))}),this.listOfFixedRightColumnChanges$.subscribe(t=>{t.forEach(i=>i.setIsFirstRight(i===t[0]))}),Fn([this.nzTableStyleService.listOfListOfThWidth$,this.listOfFixedLeftColumnChanges$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{i.forEach((r,s)=>{if(r.isAutoLeft){let l=i.slice(0,s).reduce((u,d)=>u+(d.colspan||d.colSpan||1),0),c=t.slice(0,l).reduce((u,d)=>u+d,0);r.setAutoLeftWidth(`${c}px`)}})}),Fn([this.nzTableStyleService.listOfListOfThWidth$,this.listOfFixedRightColumnChanges$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{i.forEach((r,s)=>{let a=i[i.length-s-1];if(a.isAutoRight){let c=i.slice(i.length-s,i.length).reduce((d,p)=>d+(p.colspan||p.colSpan||1),0),u=t.slice(t.length-c,t.length).reduce((d,p)=>d+p,0);a.setAutoRightWidth(`${u}px`)}})}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Ma,8))},n.\u0275dir=Se({type:n,selectors:[["tr",3,"mat-row","",3,"mat-header-row","",3,"nz-table-measure-row","",3,"nzExpand","",3,"nz-table-fixed-row",""]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,Xm,4),Ft(s,Ym,4)),i&2){let a;ce(a=ue())&&(r.listOfNzThDirective=a),ce(a=ue())&&(r.listOfCellFixedDirective=a)}},hostVars:2,hostBindings:function(i,r){i&2&&k("ant-table-row",r.isInsideTable)},standalone:!0});let o=n;return o})(),rT=(()=>{let n=class n{constructor(t,i,r,s){this.elementRef=t,this.renderer=i,this.nzTableStyleService=r,this.nzTableDataService=s,this.destroy$=new J,this.isInsideTable=!1,this.nzSortOrderChange=new O,this.isInsideTable=!!this.nzTableStyleService}ngOnInit(){this.nzTableStyleService&&this.nzTableStyleService.setTheadTemplate(this.templateRef)}ngAfterContentInit(){if(this.nzTableStyleService){let t=this.listOfNzTrDirective.changes.pipe(Ot(this.listOfNzTrDirective),We(a=>a&&a.first)),i=t.pipe(on(a=>a?a.listOfColumnsChanges$:xs),F(this.destroy$));i.subscribe(a=>this.nzTableStyleService.setListOfTh(a)),this.nzTableStyleService.enableAutoMeasure$.pipe(on(a=>a?i:Mn([]))).pipe(F(this.destroy$)).subscribe(a=>this.nzTableStyleService.setListOfMeasureColumn(a));let r=t.pipe(on(a=>a?a.listOfFixedLeftColumnChanges$:xs),F(this.destroy$)),s=t.pipe(on(a=>a?a.listOfFixedRightColumnChanges$:xs),F(this.destroy$));r.subscribe(a=>{this.nzTableStyleService.setHasFixLeft(a.length!==0)}),s.subscribe(a=>{this.nzTableStyleService.setHasFixRight(a.length!==0)})}if(this.nzTableDataService){let t=this.listOfNzThAddOnComponent.changes.pipe(Ot(this.listOfNzThAddOnComponent));t.pipe(on(()=>_t(...this.listOfNzThAddOnComponent.map(s=>s.manualClickOrder$))),F(this.destroy$)).subscribe(s=>{let a={key:s.nzColumnKey,value:s.sortOrder};this.nzSortOrderChange.emit(a),s.nzSortFn&&s.nzSortPriority===!1&&this.listOfNzThAddOnComponent.filter(l=>l!==s).forEach(l=>l.clearSortOrder())}),t.pipe(on(s=>_t(t,...s.map(a=>a.calcOperatorChange$)).pipe(zo(()=>t))),We(s=>s.filter(a=>!!a.nzSortFn||!!a.nzFilterFn).map(a=>{let{nzSortFn:l,sortOrder:c,nzFilterFn:u,nzFilterValue:d,nzSortPriority:p,nzColumnKey:g}=a;return{key:g,sortFn:l,sortPriority:p,sortOrder:c,filterFn:u,filterValue:d}})),Os(0),F(this.destroy$)).subscribe(s=>{this.nzTableDataService.listOfCalcOperator$.next(s)})}}ngAfterViewInit(){this.nzTableStyleService&&this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(Ma,8),w(Km,8))},n.\u0275cmp=j({type:n,selectors:[["thead",9,"ant-table-thead"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,nv,5),Ft(s,uh,5)),i&2){let a;ce(a=ue())&&(r.listOfNzTrDirective=a),ce(a=ue())&&(r.listOfNzThAddOnComponent=a)}},viewQuery:function(i,r){if(i&1&&xe(mL,7),i&2){let s;ce(s=ue())&&(r.templateRef=s.first)}},outputs:{nzSortOrderChange:"nzSortOrderChange"},standalone:!0,features:[K],ngContentSelectors:ks,decls:3,vars:1,consts:[["contentTemplate",""],[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),_(0,vL,1,0,"ng-template",null,0,_e)(2,CL,2,1,"ng-container",1)),i&2&&(f(2),h("ngIf",!r.isInsideTable))},dependencies:[we,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),oT=(()=>{let n=class n{constructor(){this.nzExpand=!0}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["tr","nzExpand",""]],hostAttrs:[1,"ant-table-expanded-row"],hostVars:1,hostBindings:function(i,r){i&2&&Ug("hidden",!r.nzExpand)},inputs:{nzExpand:"nzExpand"},standalone:!0});let o=n;return o})(),nc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ev,uh,Qm,tv,iT,qm,eT,Zb,Jb,Xb,bL]});let o=n;return o})();var xL=["nz-input-group-slot",""];function zL(o,n){if(o&1&&R(0,"span",2),o&2){let e=m();h("nzType",e.icon)}}function OL(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.template)}}var aT=["*"];function DL(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(2);h("icon",e.nzAddOnBeforeIcon)("template",e.nzAddOnBefore)}}function RL(o,n){}function IL(o,n){if(o&1&&(C(0,"span",8),_(1,RL,0,0,"ng-template",9),S()),o&2){let e=m(2),t=te(4);k("ant-input-affix-wrapper-disabled",e.disabled)("ant-input-affix-wrapper-sm",e.isSmall)("ant-input-affix-wrapper-lg",e.isLarge)("ant-input-affix-wrapper-focused",e.focused),h("ngClass",e.affixInGroupStatusCls),f(),h("ngTemplateOutlet",t)}}function PL(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(2);h("icon",e.nzAddOnAfterIcon)("template",e.nzAddOnAfter)}}function ML(o,n){if(o&1&&(C(0,"span",4),_(1,DL,1,2,"span",5)(2,IL,2,10,"span",6)(3,PL,1,2,"span",5),S()),o&2){let e=m(),t=te(6);f(),h("ngIf",e.nzAddOnBefore||e.nzAddOnBeforeIcon),f(),h("ngIf",e.isAffix||e.hasFeedback)("ngIfElse",t),f(),h("ngIf",e.nzAddOnAfter||e.nzAddOnAfterIcon)}}function FL(o,n){}function AL(o,n){if(o&1&&_(0,FL,0,0,"ng-template",9),o&2){m(2);let e=te(4);h("ngTemplateOutlet",e)}}function NL(o,n){if(o&1&&_(0,AL,1,1,"ng-template",10),o&2){let e=m(),t=te(6);h("ngIf",e.isAffix)("ngIfElse",t)}}function LL(o,n){if(o&1&&R(0,"span",13),o&2){let e=m(2);h("icon",e.nzPrefixIcon)("template",e.nzPrefix)}}function kL(o,n){}function VL(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",16),o&2){let e=m(3);h("status",e.status)}}function GL(o,n){if(o&1&&(C(0,"span",14),_(1,VL,1,1,"nz-form-item-feedback-icon",15),S()),o&2){let e=m(2);h("icon",e.nzSuffixIcon)("template",e.nzSuffix),f(),h("ngIf",e.isFeedback)}}function HL(o,n){if(o&1&&_(0,LL,1,2,"span",11)(1,kL,0,0,"ng-template",9)(2,GL,2,3,"span",12),o&2){let e=m(),t=te(6);h("ngIf",e.nzPrefix||e.nzPrefixIcon),f(),h("ngTemplateOutlet",t),f(),h("ngIf",e.nzSuffix||e.nzSuffixIcon||e.isFeedback)}}function BL(o,n){if(o&1&&(C(0,"span",18),R(1,"nz-form-item-feedback-icon",16),S()),o&2){let e=m(2);f(),h("status",e.status)}}function $L(o,n){if(o&1&&(Ie(0),_(1,BL,2,1,"span",17)),o&2){let e=m();f(),h("ngIf",!e.isAddOn&&!e.isAffix&&e.isFeedback)}}var jL=[[["textarea","nz-input",""]]],WL=["textarea[nz-input]"],lT=(()=>{let n=class n{constructor(){this.icon=null,this.type=null,this.template=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["","nz-input-group-slot",""]],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-input-group-addon",r.type==="addon")("ant-input-prefix",r.type==="prefix")("ant-input-suffix",r.type==="suffix")},inputs:{icon:"icon",type:"type",template:"template"},standalone:!0,features:[K],attrs:xL,ngContentSelectors:aT,decls:3,vars:2,consts:[["nz-icon","",3,"nzType",4,"ngIf"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType"]],template:function(i,r){i&1&&(Pe(),_(0,zL,1,1,"span",0)(1,OL,2,1,"ng-container",1),Ie(2)),i&2&&(h("ngIf",r.icon),f(),h("nzStringTemplateOutlet",r.template))},dependencies:[Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Fa=(()=>{let n=class n{get disabled(){return this.ngControl&&this.ngControl.disabled!==null?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=t!=null&&`${t}`!="false"}constructor(t,i,r,s,a,l,c){this.ngControl=t,this.renderer=i,this.elementRef=r,this.hostView=s,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=c,this.nzBorderless=!1,this.nzSize="default",this.nzStepperless=!0,this.nzStatus="",this._disabled=!1,this.disabled$=new J,this.dir="ltr",this.prefixCls="ant-input",this.status="",this.statusCls={},this.hasFeedback=!1,this.feedbackRef=null,this.components=[],this.destroy$=new J}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.ngControl&&this.ngControl.statusChanges?.pipe(Qe(()=>this.ngControl.disabled!==null),F(this.destroy$)).subscribe(()=>{this.disabled$.next(this.ngControl.disabled)}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnChanges(t){let{disabled:i,nzStatus:r}=t;i&&this.disabled$.next(this.disabled),r&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.renderFeedbackIcon(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.elementRef.nativeElement,r):this.renderer.removeClass(this.elementRef.nativeElement,r)})}renderFeedbackIcon(){if(!this.status||!this.hasFeedback||this.nzFormNoStatusService){this.hostView.clear(),this.feedbackRef=null;return}this.feedbackRef=this.feedbackRef||this.hostView.createComponent(mr),this.feedbackRef.location.nativeElement.classList.add("ant-input-suffix"),this.feedbackRef.instance.status=this.status,this.feedbackRef.instance.updateIcon()}};n.\u0275fac=function(i){return new(i||n)(w(Ri,10),w(He),w(de),w(Tn),w(Me,8),w(cn,8),w(_i,8))},n.\u0275dir=Se({type:n,selectors:[["input","nz-input",""],["textarea","nz-input",""]],hostAttrs:[1,"ant-input"],hostVars:13,hostBindings:function(i,r){i&2&&(ze("disabled",r.disabled||null),k("ant-input-disabled",r.disabled)("ant-input-borderless",r.nzBorderless)("ant-input-lg",r.nzSize==="large")("ant-input-sm",r.nzSize==="small")("ant-input-rtl",r.dir==="rtl")("ant-input-stepperless",r.nzStepperless))},inputs:{nzBorderless:"nzBorderless",nzSize:"nzSize",nzStepperless:"nzStepperless",nzStatus:"nzStatus",disabled:"disabled"},exportAs:["nzInput"],standalone:!0,features:[oe]});let o=n;return N([W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzStepperless",void 0),o})(),cT=(()=>{let n=class n{constructor(t){this.elementRef=t}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275dir=Se({type:n,selectors:[["nz-input-group","nzSuffix",""],["nz-input-group","nzPrefix",""]],standalone:!0});let o=n;return o})(),iv=(()=>{let n=class n{constructor(t,i,r,s,a,l,c){this.focusMonitor=t,this.elementRef=i,this.renderer=r,this.cdr=s,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=c,this.nzAddOnBeforeIcon=null,this.nzAddOnAfterIcon=null,this.nzPrefixIcon=null,this.nzSuffixIcon=null,this.nzStatus="",this.nzSize="default",this.nzSearch=!1,this.nzCompact=!1,this.isLarge=!1,this.isSmall=!1,this.isAffix=!1,this.isAddOn=!1,this.isFeedback=!1,this.focused=!1,this.disabled=!1,this.dir="ltr",this.prefixCls="ant-input",this.affixStatusCls={},this.groupStatusCls={},this.affixInGroupStatusCls={},this.status="",this.hasFeedback=!1,this.destroy$=new J}updateChildrenInputSize(){this.listOfNzInputDirective&&this.listOfNzInputDirective.forEach(t=>t.nzSize=this.nzSize)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{this.focused=!!t,this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngAfterContentInit(){this.updateChildrenInputSize();let t=this.listOfNzInputDirective.changes.pipe(Ot(this.listOfNzInputDirective));t.pipe(on(i=>_t(t,...i.map(r=>r.disabled$))),zo(()=>t),We(i=>i.some(r=>r.disabled)),F(this.destroy$)).subscribe(i=>{this.disabled=i,this.cdr.markForCheck()})}ngOnChanges(t){let{nzSize:i,nzSuffix:r,nzPrefix:s,nzPrefixIcon:a,nzSuffixIcon:l,nzAddOnAfter:c,nzAddOnBefore:u,nzAddOnAfterIcon:d,nzAddOnBeforeIcon:p,nzStatus:g}=t;i&&(this.updateChildrenInputSize(),this.isLarge=this.nzSize==="large",this.isSmall=this.nzSize==="small"),(r||s||a||l)&&(this.isAffix=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon)),(c||u||d||p)&&(this.isAddOn=!!(this.nzAddOnAfter||this.nzAddOnBefore||this.nzAddOnAfterIcon||this.nzAddOnBeforeIcon),this.nzFormNoStatusService?.noFormStatus?.next(this.isAddOn)),g&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.isFeedback=!!t&&i;let r=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon);this.isAffix=r||!this.isAddOn&&i,this.affixInGroupStatusCls=this.isAffix||this.isFeedback?this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,t,i):{},this.cdr.markForCheck(),this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,this.isAddOn?"":t,this.isAddOn?!1:i),this.groupStatusCls=vi(`${this.prefixCls}-group-wrapper`,this.isAddOn?t:"",this.isAddOn?i:!1);let s=V(V({},this.affixStatusCls),this.groupStatusCls);Object.keys(s).forEach(a=>{s[a]?this.renderer.addClass(this.elementRef.nativeElement,a):this.renderer.removeClass(this.elementRef.nativeElement,a)})}};n.\u0275fac=function(i){return new(i||n)(w(Oi),w(de),w(He),w(fe),w(Me,8),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-input-group"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Fa,4),i&2){let a;ce(a=ue())&&(r.listOfNzInputDirective=a)}},hostVars:40,hostBindings:function(i,r){i&2&&k("ant-input-group-compact",r.nzCompact)("ant-input-search-enter-button",r.nzSearch)("ant-input-search",r.nzSearch)("ant-input-search-rtl",r.dir==="rtl")("ant-input-search-sm",r.nzSearch&&r.isSmall)("ant-input-search-large",r.nzSearch&&r.isLarge)("ant-input-group-wrapper",r.isAddOn)("ant-input-group-wrapper-rtl",r.dir==="rtl")("ant-input-group-wrapper-lg",r.isAddOn&&r.isLarge)("ant-input-group-wrapper-sm",r.isAddOn&&r.isSmall)("ant-input-affix-wrapper",r.isAffix&&!r.isAddOn)("ant-input-affix-wrapper-rtl",r.dir==="rtl")("ant-input-affix-wrapper-focused",r.isAffix&&r.focused)("ant-input-affix-wrapper-disabled",r.isAffix&&r.disabled)("ant-input-affix-wrapper-lg",r.isAffix&&!r.isAddOn&&r.isLarge)("ant-input-affix-wrapper-sm",r.isAffix&&!r.isAddOn&&r.isSmall)("ant-input-group",!r.isAffix&&!r.isAddOn)("ant-input-group-rtl",r.dir==="rtl")("ant-input-group-lg",!r.isAffix&&!r.isAddOn&&r.isLarge)("ant-input-group-sm",!r.isAffix&&!r.isAddOn&&r.isSmall)},inputs:{nzAddOnBeforeIcon:"nzAddOnBeforeIcon",nzAddOnAfterIcon:"nzAddOnAfterIcon",nzPrefixIcon:"nzPrefixIcon",nzSuffixIcon:"nzSuffixIcon",nzAddOnBefore:"nzAddOnBefore",nzAddOnAfter:"nzAddOnAfter",nzPrefix:"nzPrefix",nzStatus:"nzStatus",nzSuffix:"nzSuffix",nzSize:"nzSize",nzSearch:"nzSearch",nzCompact:"nzCompact"},exportAs:["nzInputGroup"],standalone:!0,features:[Ve([_i]),oe,K],ngContentSelectors:aT,decls:7,vars:2,consts:[["class","ant-input-wrapper ant-input-group",4,"ngIf","ngIfElse"],["noAddOnTemplate",""],["affixTemplate",""],["contentTemplate",""],[1,"ant-input-wrapper","ant-input-group"],["nz-input-group-slot","","type","addon",3,"icon","template",4,"ngIf"],["class","ant-input-affix-wrapper",3,"ant-input-affix-wrapper-disabled","ant-input-affix-wrapper-sm","ant-input-affix-wrapper-lg","ant-input-affix-wrapper-focused","ngClass",4,"ngIf","ngIfElse"],["nz-input-group-slot","","type","addon",3,"icon","template"],[1,"ant-input-affix-wrapper",3,"ngClass"],[3,"ngTemplateOutlet"],[3,"ngIf","ngIfElse"],["nz-input-group-slot","","type","prefix",3,"icon","template",4,"ngIf"],["nz-input-group-slot","","type","suffix",3,"icon","template",4,"ngIf"],["nz-input-group-slot","","type","prefix",3,"icon","template"],["nz-input-group-slot","","type","suffix",3,"icon","template"],[3,"status",4,"ngIf"],[3,"status"],["nz-input-group-slot","","type","suffix",4,"ngIf"],["nz-input-group-slot","","type","suffix"]],template:function(i,r){if(i&1&&(Pe(),_(0,ML,4,4,"span",0)(1,NL,1,2,"ng-template",null,1,_e)(3,HL,3,3,"ng-template",null,2,_e)(5,$L,2,1,"ng-template",null,3,_e)),i&2){let s=te(2);h("ngIf",r.isAddOn)("ngIfElse",s)}},dependencies:[we,lT,St,Be,ro,mr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzSearch",void 0),N([W()],o.prototype,"nzCompact",void 0),o})(),uT=(()=>{let n=class n{set nzAutosize(t){typeof t=="string"||t===!0?this.autosize=!0:(r=>typeof r!="string"&&typeof r!="boolean"&&(!!r.maxRows||!!r.minRows))(t)&&(this.autosize=!0,this.minRows=t.minRows,this.maxRows=t.maxRows,this.maxHeight=this.setMaxHeight(),this.minHeight=this.setMinHeight())}resizeToFitContent(t=!1){if(this.cacheTextareaLineHeight(),!this.cachedLineHeight)return;let i=this.el,r=i.value;if(!t&&this.minRows===this.previousMinRows&&r===this.previousValue)return;let s=i.placeholder;i.classList.add("nz-textarea-autosize-measuring"),i.placeholder="";let a=Math.round((i.scrollHeight-this.inputGap)/this.cachedLineHeight)*this.cachedLineHeight+this.inputGap;this.maxHeight!==null&&a>this.maxHeight&&(a=this.maxHeight),this.minHeight!==null&&arequestAnimationFrame(()=>{let{selectionStart:l,selectionEnd:c}=i;!this.destroy$.isStopped&&document.activeElement===i&&i.setSelectionRange(l,c)})),this.previousValue=r,this.previousMinRows=this.minRows}cacheTextareaLineHeight(){if(this.cachedLineHeight>=0||!this.el.parentNode)return;let t=this.el.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this.el.parentNode.appendChild(t),this.cachedLineHeight=t.clientHeight-this.inputGap,this.el.parentNode.removeChild(t),this.maxHeight=this.setMaxHeight(),this.minHeight=this.setMinHeight()}setMinHeight(){let t=this.minRows&&this.cachedLineHeight?this.minRows*this.cachedLineHeight+this.inputGap:null;return t!==null&&(this.el.style.minHeight=`${t}px`),t}setMaxHeight(){let t=this.maxRows&&this.cachedLineHeight?this.maxRows*this.cachedLineHeight+this.inputGap:null;return t!==null&&(this.el.style.maxHeight=`${t}px`),t}noopInputHandler(){}constructor(t,i,r,s){this.elementRef=t,this.ngZone=i,this.platform=r,this.resizeService=s,this.autosize=!1,this.el=this.elementRef.nativeElement,this.maxHeight=null,this.minHeight=null,this.destroy$=new J,this.inputGap=10}ngAfterViewInit(){this.autosize&&this.platform.isBrowser&&(this.resizeToFitContent(),this.resizeService.subscribe().pipe(F(this.destroy$)).subscribe(()=>this.resizeToFitContent(!0)))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}ngDoCheck(){this.autosize&&this.platform.isBrowser&&this.resizeToFitContent()}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(gn),w(uu))},n.\u0275dir=Se({type:n,selectors:[["textarea","nzAutosize",""]],hostAttrs:["rows","1"],hostBindings:function(i,r){i&1&&A("input",function(){return r.noopInputHandler()})},inputs:{nzAutosize:"nzAutosize"},exportAs:["nzAutosize"],standalone:!0});let o=n;return o})(),dT=(()=>{let n=class n{constructor(t,i){this.renderer=t,this.elementRef=i,this.nzMaxCharacterCount=0,this.nzComputeCharacterCount=r=>r.length,this.nzFormatter=(r,s)=>`${r}${s>0?`/${s}`:""}`,this.configChange$=new J,this.destroy$=new J}ngAfterContentInit(){if(!this.nzInputDirective&&PS())throw new Error("[nz-textarea-count]: Could not find matching textarea[nz-input] child.");if(this.nzInputDirective.ngControl){let t=this.nzInputDirective.ngControl.valueChanges||xs;_t(t,this.configChange$).pipe(F(this.destroy$),We(()=>this.nzInputDirective.ngControl.value),Ot(this.nzInputDirective.ngControl.value)).subscribe(i=>{this.setDataCount(i)})}}setDataCount(t){let i=ht(t)?String(t):"",r=this.nzComputeCharacterCount(i),s=this.nzFormatter(r,this.nzMaxCharacterCount);this.renderer.setAttribute(this.elementRef.nativeElement,"data-count",s)}ngOnDestroy(){this.configChange$.complete(),this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-textarea-count"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Fa,7),i&2){let a;ce(a=ue())&&(r.nzInputDirective=a.first)}},hostAttrs:[1,"ant-input-textarea-show-count"],inputs:{nzMaxCharacterCount:"nzMaxCharacterCount",nzComputeCharacterCount:"nzComputeCharacterCount",nzFormatter:"nzFormatter"},standalone:!0,features:[K],ngContentSelectors:WL,decls:1,vars:0,template:function(i,r){i&1&&(Pe(jL),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Vs=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[iv,lT]});let o=n;return o})();var UL=["upHandler"],KL=["downHandler"],qL=["inputElement"];function YL(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",11),o&2){let e=m();h("status",e.status)}}var QL=["nz-input-number-group-slot",""];function XL(o,n){if(o&1&&R(0,"span",2),o&2){let e=m();h("nzType",e.icon)}}function ZL(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.template)}}var pT=["*"];function JL(o,n){if(o&1&&R(0,"div",7),o&2){let e=m(2);h("icon",e.nzAddOnBeforeIcon)("template",e.nzAddOnBefore)}}function ek(o,n){}function tk(o,n){if(o&1&&(C(0,"div",8),_(1,ek,0,0,"ng-template",9),S()),o&2){let e=m(2),t=te(4);k("ant-input-number-affix-wrapper-disabled",e.disabled)("ant-input-number-affix-wrapper-sm",e.isSmall)("ant-input-number-affix-wrapper-lg",e.isLarge)("ant-input-number-affix-wrapper-focused",e.focused),h("ngClass",e.affixInGroupStatusCls),f(),h("ngTemplateOutlet",t)}}function nk(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(2);h("icon",e.nzAddOnAfterIcon)("template",e.nzAddOnAfter)}}function ik(o,n){if(o&1&&(C(0,"span",4),_(1,JL,1,2,"div",5)(2,tk,2,10,"div",6)(3,nk,1,2,"span",5),S()),o&2){let e=m(),t=te(6);f(),h("ngIf",e.nzAddOnBefore||e.nzAddOnBeforeIcon),f(),h("ngIf",e.isAffix||e.hasFeedback)("ngIfElse",t),f(),h("ngIf",e.nzAddOnAfter||e.nzAddOnAfterIcon)}}function rk(o,n){}function ok(o,n){if(o&1&&_(0,rk,0,0,"ng-template",9),o&2){m(2);let e=te(4);h("ngTemplateOutlet",e)}}function sk(o,n){if(o&1&&_(0,ok,1,1,"ng-template",10),o&2){let e=m(),t=te(6);h("ngIf",e.isAffix)("ngIfElse",t)}}function ak(o,n){if(o&1&&R(0,"span",13),o&2){let e=m(2);h("icon",e.nzPrefixIcon)("template",e.nzPrefix)}}function lk(o,n){}function ck(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",16),o&2){let e=m(3);h("status",e.status)}}function uk(o,n){if(o&1&&(C(0,"span",14),_(1,ck,1,1,"nz-form-item-feedback-icon",15),S()),o&2){let e=m(2);h("icon",e.nzSuffixIcon)("template",e.nzSuffix),f(),h("ngIf",e.isFeedback)}}function dk(o,n){if(o&1&&_(0,ak,1,2,"span",11)(1,lk,0,0,"ng-template",9)(2,uk,2,3,"span",12),o&2){let e=m(),t=te(6);h("ngIf",e.nzPrefix||e.nzPrefixIcon),f(),h("ngTemplateOutlet",t),f(),h("ngIf",e.nzSuffix||e.nzSuffixIcon||e.isFeedback)}}function pk(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",16),o&2){let e=m(3);h("status",e.status)}}function hk(o,n){if(o&1&&(C(0,"span",18),_(1,pk,1,1,"nz-form-item-feedback-icon",15),S()),o&2){let e=m(2);f(),h("ngIf",e.isFeedback)}}function fk(o,n){if(o&1&&(Ie(0),_(1,hk,2,1,"span",17)),o&2){let e=m();f(),h("ngIf",!e.isAddOn&&!e.isAffix&&e.isFeedback)}}var ic=(()=>{let n=class n{onModelChange(t){this.parsedValue=this.nzParser(t),this.inputElement.nativeElement.value=`${this.parsedValue}`;let i=this.getCurrentValidValue(this.parsedValue);this.setValue(i)}getCurrentValidValue(t){let i=t;return i===""?i="":this.isNotCompleteNumber(i)?i=this.value:i=`${this.getValidValue(i)}`,this.toNumber(i)}isNotCompleteNumber(t){return isNaN(t)||t===""||t===null||!!(t&&t.toString().indexOf(".")===t.toString().length-1)}getValidValue(t){let i=parseFloat(t);return isNaN(i)?t:(ithis.nzMax&&(i=this.nzMax),i)}toNumber(t){if(this.isNotCompleteNumber(t))return t;let i=String(t);if(i.indexOf(".")>=0&&ht(this.nzPrecision)){if(typeof this.nzPrecisionMode=="function")return this.nzPrecisionMode(t,this.nzPrecision);if(this.nzPrecisionMode==="cut"){let r=i.split(".");return r[1]=r[1].slice(0,this.nzPrecision),Number(r.join("."))}return Number(Number(t).toFixed(this.nzPrecision))}return Number(t)}getRatio(t){let i=1;return t.metaKey||t.ctrlKey?i=.1:t.shiftKey&&(i=10),i}down(t,i){this.isFocused||this.focus(),this.step("down",t,i)}up(t,i){this.isFocused||this.focus(),this.step("up",t,i)}getPrecision(t){let i=t.toString();if(i.indexOf("e-")>=0)return parseInt(i.slice(i.indexOf("e-")+2),10);let r=0;return i.indexOf(".")>=0&&(r=i.length-i.indexOf(".")-1),r}getMaxPrecision(t,i){if(ht(this.nzPrecision))return this.nzPrecision;let r=this.getPrecision(i),s=this.getPrecision(this.nzStep),a=this.getPrecision(t);return t?Math.max(a,r+s):r+s}getPrecisionFactor(t,i){let r=this.getMaxPrecision(t,i);return Math.pow(10,r)}upStep(t,i){let r=this.getPrecisionFactor(t,i),s=Math.abs(this.getMaxPrecision(t,i)),a;return typeof t=="number"?a=((r*t+r*this.nzStep*i)/r).toFixed(s):a=this.nzMin===-1/0?this.nzStep:this.nzMin,this.toNumber(a)}downStep(t,i){let r=this.getPrecisionFactor(t,i),s=Math.abs(this.getMaxPrecision(t,i)),a;return typeof t=="number"?a=((r*t-r*this.nzStep*i)/r).toFixed(s):a=this.nzMin===-1/0?-this.nzStep:this.nzMin,this.toNumber(a)}step(t,i,r=1){if(this.stop(),i.preventDefault(),this.nzDisabled)return;let s=this.getCurrentValidValue(this.parsedValue)||0,a=0;t==="up"?a=this.upStep(s,r):t==="down"&&(a=this.downStep(s,r));let l=a>this.nzMax||athis.nzMax?a=this.nzMax:a{this[t](i,r)},300))}stop(){this.autoStepTimer&&clearTimeout(this.autoStepTimer)}setValue(t){if(`${this.value}`!=`${t}`&&this.onChange(t),this.value=t,this.parsedValue=t,this.disabledUp=this.disabledDown=!1,t||t===0){let i=Number(t);i>=this.nzMax&&(this.disabledUp=!0),i<=this.nzMin&&(this.disabledDown=!0)}}updateDisplayValue(t){let i=ht(this.nzFormatter(t))?this.nzFormatter(t):"";this.displayValue=i,this.inputElement.nativeElement.value=`${i}`}writeValue(t){this.value=t,this.setValue(t),this.updateDisplayValue(t),this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.disabled$.next(this.nzDisabled),this.cdr.markForCheck()}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r,s,a,l,c,u,d){this.ngZone=t,this.elementRef=i,this.cdr=r,this.focusMonitor=s,this.renderer=a,this.directionality=l,this.destroy$=c,this.nzFormStatusService=u,this.nzFormNoStatusService=d,this.isNzDisableFirstChange=!0,this.isFocused=!1,this.disabled$=new J,this.disabledUp=!1,this.disabledDown=!1,this.dir="ltr",this.prefixCls="ant-input-number",this.status="",this.statusCls={},this.hasFeedback=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzBlur=new O,this.nzFocus=new O,this.nzSize="default",this.nzMin=-1/0,this.nzMax=1/0,this.nzParser=p=>p.trim().replace(/。/g,".").replace(/[^\w\.-]+/g,""),this.nzPrecisionMode="toFixed",this.nzPlaceHolder="",this.nzStatus="",this.nzStep=1,this.nzInputMode="decimal",this.nzId=null,this.nzDisabled=!1,this.nzReadOnly=!1,this.nzAutoFocus=!1,this.nzBorderless=!1,this.nzFormatter=p=>p}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t?(this.isFocused=!0,this.nzFocus.emit()):(this.isFocused=!1,this.updateDisplayValue(this.value),this.nzBlur.emit(),Promise.resolve().then(()=>this.onTouched()))}),this.dir=this.directionality.value,this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t}),this.setupHandlersListeners(),this.ngZone.runOutsideAngular(()=>{Ke(this.inputElement.nativeElement,"keyup").pipe(F(this.destroy$)).subscribe(()=>this.stop()),Ke(this.inputElement.nativeElement,"keydown").pipe(F(this.destroy$)).subscribe(t=>{let{keyCode:i}=t;i!==38&&i!==40&&i!==13||this.ngZone.run(()=>{if(i===38){let r=this.getRatio(t);this.up(t,r),this.stop()}else if(i===40){let r=this.getRatio(t);this.down(t,r),this.stop()}else this.updateDisplayValue(this.value);this.cdr.markForCheck()})})})}ngOnChanges(t){let{nzStatus:i,nzDisabled:r}=t;if(t.nzFormatter&&!t.nzFormatter.isFirstChange()){let s=this.getCurrentValidValue(this.parsedValue);this.setValue(s),this.updateDisplayValue(s)}r&&this.disabled$.next(this.nzDisabled),i&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef)}setupHandlersListeners(){this.ngZone.runOutsideAngular(()=>{_t(Ke(this.upHandler.nativeElement,"mouseup"),Ke(this.upHandler.nativeElement,"mouseleave"),Ke(this.downHandler.nativeElement,"mouseup"),Ke(this.downHandler.nativeElement,"mouseleave")).pipe(F(this.destroy$)).subscribe(()=>this.stop())})}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.elementRef.nativeElement,r):this.renderer.removeClass(this.elementRef.nativeElement,r)})}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(fe),w(Oi),w(He),w(Me,8),w(Pt),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-input-number"]],viewQuery:function(i,r){if(i&1&&(xe(UL,7),xe(KL,7),xe(qL,7)),i&2){let s;ce(s=ue())&&(r.upHandler=s.first),ce(s=ue())&&(r.downHandler=s.first),ce(s=ue())&&(r.inputElement=s.first)}},hostAttrs:[1,"ant-input-number"],hostVars:16,hostBindings:function(i,r){i&2&&k("ant-input-number-in-form-item",!!r.nzFormStatusService)("ant-input-number-focused",r.isFocused)("ant-input-number-lg",r.nzSize==="large")("ant-input-number-sm",r.nzSize==="small")("ant-input-number-disabled",r.nzDisabled)("ant-input-number-readonly",r.nzReadOnly)("ant-input-number-rtl",r.dir==="rtl")("ant-input-number-borderless",r.nzBorderless)},inputs:{nzSize:"nzSize",nzMin:"nzMin",nzMax:"nzMax",nzParser:"nzParser",nzPrecision:"nzPrecision",nzPrecisionMode:"nzPrecisionMode",nzPlaceHolder:"nzPlaceHolder",nzStatus:"nzStatus",nzStep:"nzStep",nzInputMode:"nzInputMode",nzId:"nzId",nzDisabled:"nzDisabled",nzReadOnly:"nzReadOnly",nzAutoFocus:"nzAutoFocus",nzBorderless:"nzBorderless",nzFormatter:"nzFormatter"},outputs:{nzBlur:"nzBlur",nzFocus:"nzFocus"},exportAs:["nzInputNumber"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0},Pt]),oe,K],decls:11,vars:15,consts:[[1,"ant-input-number-handler-wrap"],["unselectable","unselectable",1,"ant-input-number-handler","ant-input-number-handler-up",3,"mousedown"],["upHandler",""],["nz-icon","","nzType","up",1,"ant-input-number-handler-up-inner"],["unselectable","unselectable",1,"ant-input-number-handler","ant-input-number-handler-down",3,"mousedown"],["downHandler",""],["nz-icon","","nzType","down",1,"ant-input-number-handler-down-inner"],[1,"ant-input-number-input-wrap"],["autocomplete","off",1,"ant-input-number-input",3,"disabled","placeholder","readOnly","ngModel","ngModelChange"],["inputElement",""],["class","ant-input-number-suffix",3,"status",4,"ngIf"],[1,"ant-input-number-suffix",3,"status"]],template:function(i,r){i&1&&(C(0,"div",0)(1,"span",1,2),A("mousedown",function(a){return r.up(a)}),R(3,"span",3),S(),C(4,"span",4,5),A("mousedown",function(a){return r.down(a)}),R(6,"span",6),S()(),C(7,"div",7)(8,"input",8,9),A("ngModelChange",function(a){return r.onModelChange(a)}),S()(),_(10,YL,1,1,"nz-form-item-feedback-icon",10)),i&2&&(f(),k("ant-input-number-handler-up-disabled",r.disabledUp),f(3),k("ant-input-number-handler-down-disabled",r.disabledDown),f(4),h("disabled",r.nzDisabled)("placeholder",r.nzPlaceHolder)("readOnly",r.nzReadOnly)("ngModel",r.displayValue),ze("id",r.nzId)("autofocus",r.nzAutoFocus?"autofocus":null)("min",r.nzMin)("max",r.nzMax)("step",r.nzStep)("inputmode",r.nzInputMode),f(2),h("ngIf",r.hasFeedback&&!!r.status&&!r.nzFormNoStatusService))},dependencies:[Ge,Fe,nn,Ii,Kt,Rt,ro,mr,we],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzReadOnly",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzBorderless",void 0),o})(),hT=(()=>{let n=class n{constructor(){this.icon=null,this.type=null,this.template=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["","nz-input-number-group-slot",""]],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-input-number-group-addon",r.type==="addon")("ant-input-number-prefix",r.type==="prefix")("ant-input-number-suffix",r.type==="suffix")},inputs:{icon:"icon",type:"type",template:"template"},standalone:!0,features:[K],attrs:QL,ngContentSelectors:pT,decls:3,vars:2,consts:[["nz-icon","",3,"nzType",4,"ngIf"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType"]],template:function(i,r){i&1&&(Pe(),_(0,XL,1,1,"span",0)(1,ZL,2,1,"ng-container",1),Ie(2)),i&2&&(h("ngIf",r.icon),f(),h("nzStringTemplateOutlet",r.template))},dependencies:[Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})();var gk=(()=>{let n=class n{constructor(t,i,r,s,a,l,c){this.focusMonitor=t,this.elementRef=i,this.renderer=r,this.cdr=s,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=c,this.nzAddOnBeforeIcon=null,this.nzAddOnAfterIcon=null,this.nzPrefixIcon=null,this.nzSuffixIcon=null,this.nzStatus="",this.nzSize="default",this.nzCompact=!1,this.isLarge=!1,this.isSmall=!1,this.isAffix=!1,this.isAddOn=!1,this.isFeedback=!1,this.focused=!1,this.disabled=!1,this.dir="ltr",this.prefixCls="ant-input-number",this.affixStatusCls={},this.groupStatusCls={},this.affixInGroupStatusCls={},this.status="",this.hasFeedback=!1,this.destroy$=new J}updateChildrenInputSize(){this.listOfNzInputNumberComponent&&this.listOfNzInputNumberComponent.forEach(t=>t.nzSize=this.nzSize)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{this.focused=!!t,this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngAfterContentInit(){this.updateChildrenInputSize();let t=this.listOfNzInputNumberComponent.changes.pipe(Ot(this.listOfNzInputNumberComponent));t.pipe(on(i=>_t(t,...i.map(r=>r.disabled$))),zo(()=>t),We(i=>i.some(r=>r.nzDisabled)),F(this.destroy$)).subscribe(i=>{this.disabled=i,this.cdr.markForCheck()})}ngOnChanges(t){let{nzSize:i,nzSuffix:r,nzPrefix:s,nzPrefixIcon:a,nzSuffixIcon:l,nzAddOnAfter:c,nzAddOnBefore:u,nzAddOnAfterIcon:d,nzAddOnBeforeIcon:p,nzStatus:g}=t;i&&(this.updateChildrenInputSize(),this.isLarge=this.nzSize==="large",this.isSmall=this.nzSize==="small"),(r||s||a||l)&&(this.isAffix=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon)),(c||u||d||p)&&(this.isAddOn=!!(this.nzAddOnAfter||this.nzAddOnBefore||this.nzAddOnAfterIcon||this.nzAddOnBeforeIcon),this.nzFormNoStatusService?.noFormStatus?.next(this.isAddOn)),g&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.isFeedback=!!t&&i;let r=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon);this.isAffix=r||!this.isAddOn&&i,this.affixInGroupStatusCls=this.isAffix||this.isFeedback?this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,t,i):{},this.cdr.markForCheck(),this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,this.isAddOn?"":t,this.isAddOn?!1:i),this.groupStatusCls=vi(`${this.prefixCls}-group-wrapper`,this.isAddOn?t:"",this.isAddOn?i:!1);let s=V(V({},this.affixStatusCls),this.groupStatusCls);Object.keys(s).forEach(a=>{s[a]?this.renderer.addClass(this.elementRef.nativeElement,a):this.renderer.removeClass(this.elementRef.nativeElement,a)})}};n.\u0275fac=function(i){return new(i||n)(w(Oi),w(de),w(He),w(fe),w(Me,8),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-input-number-group"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,ic,5),i&2){let a;ce(a=ue())&&(r.listOfNzInputNumberComponent=a)}},hostVars:24,hostBindings:function(i,r){i&2&&k("ant-input-number-group",r.nzCompact)("ant-input-number-group-compact",r.nzCompact)("ant-input-number-group-wrapper",r.isAddOn)("ant-input-number-group-wrapper-rtl",r.isAddOn&&r.dir==="rtl")("ant-input-number-group-wrapper-lg",r.isAddOn&&r.isLarge)("ant-input-number-group-wrapper-sm",r.isAddOn&&r.isSmall)("ant-input-number-affix-wrapper",!r.isAddOn&&r.isAffix)("ant-input-number-affix-wrapper-rtl",!r.isAddOn&&r.dir==="rtl")("ant-input-number-affix-wrapper-focused",!r.isAddOn&&r.isAffix&&r.focused)("ant-input-number-affix-wrapper-disabled",!r.isAddOn&&r.isAffix&&r.disabled)("ant-input-number-affix-wrapper-lg",!r.isAddOn&&r.isAffix&&r.isLarge)("ant-input-number-affix-wrapper-sm",!r.isAddOn&&r.isAffix&&r.isSmall)},inputs:{nzAddOnBeforeIcon:"nzAddOnBeforeIcon",nzAddOnAfterIcon:"nzAddOnAfterIcon",nzPrefixIcon:"nzPrefixIcon",nzSuffixIcon:"nzSuffixIcon",nzAddOnBefore:"nzAddOnBefore",nzAddOnAfter:"nzAddOnAfter",nzPrefix:"nzPrefix",nzStatus:"nzStatus",nzSuffix:"nzSuffix",nzSize:"nzSize",nzCompact:"nzCompact"},exportAs:["nzInputNumberGroup"],standalone:!0,features:[Ve([_i]),oe,K],ngContentSelectors:pT,decls:7,vars:2,consts:[["class","ant-input-number-wrapper ant-input-number-group",4,"ngIf","ngIfElse"],["noAddOnTemplate",""],["affixTemplate",""],["contentTemplate",""],[1,"ant-input-number-wrapper","ant-input-number-group"],["nz-input-number-group-slot","","type","addon",3,"icon","template",4,"ngIf"],["class","ant-input-number-affix-wrapper",3,"ant-input-number-affix-wrapper-disabled","ant-input-number-affix-wrapper-sm","ant-input-number-affix-wrapper-lg","ant-input-number-affix-wrapper-focused","ngClass",4,"ngIf","ngIfElse"],["nz-input-number-group-slot","","type","addon",3,"icon","template"],[1,"ant-input-number-affix-wrapper",3,"ngClass"],[3,"ngTemplateOutlet"],[3,"ngIf","ngIfElse"],["nz-input-number-group-slot","","type","prefix",3,"icon","template",4,"ngIf"],["nz-input-number-group-slot","","type","suffix",3,"icon","template",4,"ngIf"],["nz-input-number-group-slot","","type","prefix",3,"icon","template"],["nz-input-number-group-slot","","type","suffix",3,"icon","template"],[3,"status",4,"ngIf"],[3,"status"],["nz-input-number-group-slot","","type","suffix",4,"ngIf"],["nz-input-number-group-slot","","type","suffix"]],template:function(i,r){if(i&1&&(Pe(),_(0,ik,4,4,"span",0)(1,sk,1,2,"ng-template",null,1,_e)(3,dk,3,3,"ng-template",null,2,_e)(5,fk,2,1,"ng-template",null,3,_e)),i&2){let s=te(2);h("ngIf",r.isAddOn)("ngIfElse",s)}},dependencies:[we,hT,St,Be,ro,mr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzCompact",void 0),o})(),Gs=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ic,gk,hT]});let o=n;return o})();var mk=["hourListElement"],vk=["minuteListElement"],yk=["secondListElement"],Ck=["use12HoursListElement"];function _k(o,n){if(o&1&&(C(0,"div",4)(1,"div",5),Y(2),S()()),o&2){let e=m();f(2),ye(e.dateHelper.format(e.time==null?null:e.time.value,e.format)||"\xA0")}}function Sk(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){I(e);let i=m().$implicit,r=m(2);return P(r.selectHour(i))}),C(1,"div",11),Y(2),Xn(3,"number"),S()()}if(o&2){let e=m().$implicit,t=m(2);k("ant-picker-time-panel-cell-selected",t.isSelectedHour(e))("ant-picker-time-panel-cell-disabled",e.disabled),f(2),ye(up(3,5,e.index,"2.0-0"))}}function wk(o,n){if(o&1&&(H(0),_(1,Sk,4,8,"li",9),B()),o&2){let e=n.$implicit,t=m(2);f(),h("ngIf",!(t.nzHideDisabledOptions&&e.disabled))}}function bk(o,n){if(o&1&&(C(0,"ul",6,7),_(2,wk,2,1,"ng-container",8),S()),o&2){let e=m();f(2),h("ngForOf",e.hourRange)("ngForTrackBy",e.trackByFn)}}function Tk(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){I(e);let i=m().$implicit,r=m(2);return P(r.selectMinute(i))}),C(1,"div",11),Y(2),Xn(3,"number"),S()()}if(o&2){let e=m().$implicit,t=m(2);k("ant-picker-time-panel-cell-selected",t.isSelectedMinute(e))("ant-picker-time-panel-cell-disabled",e.disabled),f(2),ye(up(3,5,e.index,"2.0-0"))}}function Ek(o,n){if(o&1&&(H(0),_(1,Tk,4,8,"li",9),B()),o&2){let e=n.$implicit,t=m(2);f(),h("ngIf",!(t.nzHideDisabledOptions&&e.disabled))}}function xk(o,n){if(o&1&&(C(0,"ul",6,12),_(2,Ek,2,1,"ng-container",8),S()),o&2){let e=m();f(2),h("ngForOf",e.minuteRange)("ngForTrackBy",e.trackByFn)}}function zk(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){I(e);let i=m().$implicit,r=m(2);return P(r.selectSecond(i))}),C(1,"div",11),Y(2),Xn(3,"number"),S()()}if(o&2){let e=m().$implicit,t=m(2);k("ant-picker-time-panel-cell-selected",t.isSelectedSecond(e))("ant-picker-time-panel-cell-disabled",e.disabled),f(2),ye(up(3,5,e.index,"2.0-0"))}}function Ok(o,n){if(o&1&&(H(0),_(1,zk,4,8,"li",9),B()),o&2){let e=n.$implicit,t=m(2);f(),h("ngIf",!(t.nzHideDisabledOptions&&e.disabled))}}function Dk(o,n){if(o&1&&(C(0,"ul",6,13),_(2,Ok,2,1,"ng-container",8),S()),o&2){let e=m();f(2),h("ngForOf",e.secondRange)("ngForTrackBy",e.trackByFn)}}function Rk(o,n){if(o&1){let e=Q();H(0),C(1,"li",10),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.select12Hours(r))}),C(2,"div",11),Y(3),S()(),B()}if(o&2){let e=n.$implicit,t=m(2);f(),k("ant-picker-time-panel-cell-selected",t.isSelected12Hours(e)),f(2),ye(e.value)}}function Ik(o,n){if(o&1&&(C(0,"ul",6,14),_(2,Rk,4,3,"ng-container",15),S()),o&2){let e=m();f(2),h("ngForOf",e.use12HoursRange)}}function Pk(o,n){}function Mk(o,n){if(o&1&&(C(0,"div",23),_(1,Pk,0,0,"ng-template",24),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.nzAddOn)}}function Fk(o,n){if(o&1){let e=Q();C(0,"div",16),_(1,Mk,2,1,"div",17),C(2,"ul",18)(3,"li",19)(4,"a",20),A("click",function(){I(e);let i=m();return P(i.onClickNow())}),Y(5),Xn(6,"nzI18n"),S()(),C(7,"li",21)(8,"button",22),A("click",function(){I(e);let i=m();return P(i.onClickOk())}),Y(9),Xn(10,"nzI18n"),S()()()()}if(o&2){let e=m();f(),h("ngIf",e.nzAddOn),f(4),Ne(" ",e.nzNowText||Vi(6,3,"Calendar.lang.now")," "),f(4),Ne(" ",e.nzOkText||Vi(10,5,"Calendar.lang.ok")," ")}}var Ak=["inputElement"];function Nk(o,n){if(o&1&&(H(0),R(1,"span",8),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function Lk(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",9),o&2){let e=m();h("status",e.status)}}function kk(o,n){if(o&1){let e=Q();C(0,"span",10),A("click",function(i){I(e);let r=m();return P(r.onClickClearBtn(i))}),R(1,"span",11),S()}if(o&2){let e=m();f(),ze("aria-label",e.nzClearText)("title",e.nzClearText)}}function Vk(o,n){if(o&1){let e=Q();C(0,"div",12)(1,"div",13)(2,"div",14)(3,"nz-time-picker-panel",15),A("ngModelChange",function(i){I(e);let r=m();return P(r.value=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.onPanelValueChange(i))})("closePanel",function(){I(e);let i=m();return P(i.closePanel())}),Xn(4,"async"),S()()()()}if(o&2){let e=m();h("@slideMotion","enter"),f(3),h("ngClass",e.nzPopupClassName)("format",e.nzFormat)("nzHourStep",e.nzHourStep)("nzMinuteStep",e.nzMinuteStep)("nzSecondStep",e.nzSecondStep)("nzDisabledHours",e.nzDisabledHours)("nzDisabledMinutes",e.nzDisabledMinutes)("nzDisabledSeconds",e.nzDisabledSeconds)("nzPlaceHolder",e.nzPlaceHolder||Vi(4,19,e.i18nPlaceHolder$))("nzHideDisabledOptions",e.nzHideDisabledOptions)("nzUse12Hours",e.nzUse12Hours)("nzDefaultOpenValue",e.nzDefaultOpenValue)("nzAddOn",e.nzAddOn)("nzClearText",e.nzClearText)("nzNowText",e.nzNowText)("nzOkText",e.nzOkText)("nzAllowEmpty",e.nzAllowEmpty)("ngModel",e.value)}}var av=class{setMinutes(n,e){return e||(this.initValue(),this.value.setMinutes(n),this.update()),this}setHours(n,e){return e||(this.initValue(),this._use12Hours?this.selected12Hours==="PM"&&n!==12?this.value.setHours(n+12):this.selected12Hours==="AM"&&n===12?this.value.setHours(0):this.value.setHours(n):this.value.setHours(n),this.update()),this}setSeconds(n,e){return e||(this.initValue(),this.value.setSeconds(n),this.update()),this}setUse12Hours(n){return this._use12Hours=n,this}get changes(){return this._changes.asObservable()}setValue(n,e){return ht(e)&&(this._use12Hours=e),n!==this.value&&(this._value=n,ht(this.value)?this._use12Hours&&ht(this.hours)&&(this.selected12Hours=this.hours>=12?"PM":"AM"):this._clear()),this}initValue(){Ml(this.value)&&this.setValue(new Date,this._use12Hours)}clear(){this._clear(),this.update()}get isEmpty(){return!(ht(this.hours)||ht(this.minutes)||ht(this.seconds))}_clear(){this._value=void 0,this.selected12Hours=void 0}update(){this.isEmpty?this._value=void 0:(ht(this.hours)&&this.value.setHours(this.hours),ht(this.minutes)&&this.value.setMinutes(this.minutes),ht(this.seconds)&&this.value.setSeconds(this.seconds),this._use12Hours&&(this.selected12Hours==="PM"&&this.hours<12&&this.value.setHours(this.hours+12),this.selected12Hours==="AM"&&this.hours>=12&&this.value.setHours(this.hours-12))),this.changed()}changed(){this._changes.next(this.value)}get viewHours(){return this._use12Hours&&ht(this.hours)?this.calculateViewHour(this.hours):this.hours}setSelected12Hours(n){n.toUpperCase()!==this.selected12Hours&&(this.selected12Hours=n.toUpperCase(),this.update())}get value(){return this._value||this._defaultOpenValue}get hours(){return this.value?.getHours()}get minutes(){return this.value?.getMinutes()}get seconds(){return this.value?.getSeconds()}setDefaultOpenValue(n){return this._defaultOpenValue=n,this}constructor(){this.selected12Hours=void 0,this._use12Hours=!1,this._changes=new J}calculateViewHour(n){let e=this.selected12Hours;return e==="PM"&&n>12?n-12:e==="AM"&&n===0?12:n}};function sv(o,n=1,e=0){return new Array(Math.ceil(o/n)).fill(0).map((t,i)=>(i+e)*n)}var dh=(()=>{let n=class n{set nzAllowEmpty(t){ht(t)&&(this._allowEmpty=t)}get nzAllowEmpty(){return this._allowEmpty}set nzDisabledHours(t){this._disabledHours=t,this._disabledHours&&this.buildHours()}get nzDisabledHours(){return this._disabledHours}set nzDisabledMinutes(t){ht(t)&&(this._disabledMinutes=t,this.buildMinutes())}get nzDisabledMinutes(){return this._disabledMinutes}set nzDisabledSeconds(t){ht(t)&&(this._disabledSeconds=t,this.buildSeconds())}get nzDisabledSeconds(){return this._disabledSeconds}set format(t){if(ht(t)){this._format=t,this.enabledColumns=0;let i=new Set(t);this.hourEnabled=i.has("H")||i.has("h"),this.minuteEnabled=i.has("m"),this.secondEnabled=i.has("s"),this.hourEnabled&&this.enabledColumns++,this.minuteEnabled&&this.enabledColumns++,this.secondEnabled&&this.enabledColumns++,this.nzUse12Hours&&this.build12Hours()}}get format(){return this._format}set nzHourStep(t){ht(t)&&(this._nzHourStep=t,this.buildHours())}get nzHourStep(){return this._nzHourStep}set nzMinuteStep(t){ht(t)&&(this._nzMinuteStep=t,this.buildMinutes())}get nzMinuteStep(){return this._nzMinuteStep}set nzSecondStep(t){ht(t)&&(this._nzSecondStep=t,this.buildSeconds())}get nzSecondStep(){return this._nzSecondStep}trackByFn(t){return t}buildHours(){let t=24,i=this.nzDisabledHours?.(),r=0;if(this.nzUse12Hours&&(t=12,i&&(this.time.selected12Hours==="PM"?i=i.filter(s=>s>=12).map(s=>s>12?s-12:s):i=i.filter(s=>s<12||s===24).map(s=>s===24||s===0?12:s)),r=1),this.hourRange=sv(t,this.nzHourStep,r).map(s=>({index:s,disabled:!!i&&i.indexOf(s)!==-1})),this.nzUse12Hours&&this.hourRange[this.hourRange.length-1].index===12){let s=[...this.hourRange];s.unshift(s[s.length-1]),s.splice(s.length-1,1),this.hourRange=s}}buildMinutes(){this.minuteRange=sv(60,this.nzMinuteStep).map(t=>({index:t,disabled:!!this.nzDisabledMinutes&&this.nzDisabledMinutes(this.time.hours).indexOf(t)!==-1}))}buildSeconds(){this.secondRange=sv(60,this.nzSecondStep).map(t=>({index:t,disabled:!!this.nzDisabledSeconds&&this.nzDisabledSeconds(this.time.hours,this.time.minutes).indexOf(t)!==-1}))}build12Hours(){let t=this._format.includes("A");this.use12HoursRange=[{index:0,value:t?"AM":"am"},{index:1,value:t?"PM":"pm"}]}buildTimes(){this.buildHours(),this.buildMinutes(),this.buildSeconds(),this.build12Hours()}scrollToTime(t=0){if(this.hourEnabled&&this.hourListElement&&this.scrollToSelected(this.hourListElement.nativeElement,this.time.viewHours,t,"hour"),this.minuteEnabled&&this.minuteListElement&&this.scrollToSelected(this.minuteListElement.nativeElement,this.time.minutes,t,"minute"),this.secondEnabled&&this.secondListElement&&this.scrollToSelected(this.secondListElement.nativeElement,this.time.seconds,t,"second"),this.nzUse12Hours&&this.use12HoursListElement){let r=this.time.selected12Hours==="AM"?0:1;this.scrollToSelected(this.use12HoursListElement.nativeElement,r,t,"12-hour")}}selectHour(t){this.time.setHours(t.index,t.disabled),this._disabledMinutes&&this.buildMinutes(),(this._disabledSeconds||this._disabledMinutes)&&this.buildSeconds()}selectMinute(t){this.time.setMinutes(t.index,t.disabled),this._disabledSeconds&&this.buildSeconds()}selectSecond(t){this.time.setSeconds(t.index,t.disabled)}select12Hours(t){this.time.setSelected12Hours(t.value),this._disabledHours&&this.buildHours(),this._disabledMinutes&&this.buildMinutes(),this._disabledSeconds&&this.buildSeconds()}scrollToSelected(t,i,r=0,s){if(!t)return;let a=this.translateIndex(i,s),l=t.children[a]||t.children[0];this.scrollTo(t,l.offsetTop,r)}translateIndex(t,i){return i==="hour"?this.calcIndex(this.nzDisabledHours?.(),this.hourRange.map(r=>r.index).indexOf(t)):i==="minute"?this.calcIndex(this.nzDisabledMinutes?.(this.time.hours),this.minuteRange.map(r=>r.index).indexOf(t)):i==="second"?this.calcIndex(this.nzDisabledSeconds?.(this.time.hours,this.time.minutes),this.secondRange.map(r=>r.index).indexOf(t)):this.calcIndex([],this.use12HoursRange.map(r=>r.index).indexOf(t))}scrollTo(t,i,r){if(r<=0){t.scrollTop=i;return}let a=(i-t.scrollTop)/r*10;this.ngZone.runOutsideAngular(()=>{to(()=>{t.scrollTop=t.scrollTop+a,t.scrollTop!==i&&this.scrollTo(t,i,r-10)})})}calcIndex(t,i){return t?.length&&this.nzHideDisabledOptions?i-t.reduce((r,s)=>r+(s-1||(this.nzDisabledMinutes?.(i).indexOf(r)??-1)>-1||(this.nzDisabledSeconds?.(i,r).indexOf(s)??-1)>-1}onClickNow(){let t=new Date;this.timeDisabled(t)||(this.time.setValue(t),this.changed(),this.closePanel.emit())}onClickOk(){this.time.setValue(this.time.value,this.nzUse12Hours),this.changed(),this.closePanel.emit()}isSelectedHour(t){return t.index===this.time.viewHours}isSelectedMinute(t){return t.index===this.time.minutes}isSelectedSecond(t){return t.index===this.time.seconds}isSelected12Hours(t){return t.value.toUpperCase()===this.time.selected12Hours}constructor(t,i,r,s){this.ngZone=t,this.cdr=i,this.dateHelper=r,this.elementRef=s,this._nzHourStep=1,this._nzMinuteStep=1,this._nzSecondStep=1,this.unsubscribe$=new J,this._format="HH:mm:ss",this._disabledHours=()=>[],this._disabledMinutes=()=>[],this._disabledSeconds=()=>[],this._allowEmpty=!0,this.time=new av,this.hourEnabled=!0,this.minuteEnabled=!0,this.secondEnabled=!0,this.firstScrolled=!1,this.enabledColumns=3,this.nzInDatePicker=!1,this.nzHideDisabledOptions=!1,this.nzUse12Hours=!1,this.closePanel=new O}ngOnInit(){this.time.changes.pipe(F(this.unsubscribe$)).subscribe(()=>{this.changed(),this.touched(),this.scrollToTime(120)}),this.buildTimes(),this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.scrollToTime(),this.firstScrolled=!0}),Ke(this.elementRef.nativeElement,"mousedown").pipe(F(this.unsubscribe$)).subscribe(t=>{t.preventDefault()})})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnChanges(t){let{nzUse12Hours:i,nzDefaultOpenValue:r}=t;!i?.previousValue&&i?.currentValue&&(this.build12Hours(),this.enabledColumns++),r?.currentValue&&this.time.setDefaultOpenValue(this.nzDefaultOpenValue||new Date)}writeValue(t){this.time.setValue(t,this.nzUse12Hours),this.buildTimes(),t&&this.firstScrolled&&this.scrollToTime(120),this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouch=t}};n.\u0275fac=function(i){return new(i||n)(w($e),w(fe),w(no),w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-time-picker-panel"]],viewQuery:function(i,r){if(i&1&&(xe(mk,5),xe(vk,5),xe(yk,5),xe(Ck,5)),i&2){let s;ce(s=ue())&&(r.hourListElement=s.first),ce(s=ue())&&(r.minuteListElement=s.first),ce(s=ue())&&(r.secondListElement=s.first),ce(s=ue())&&(r.use12HoursListElement=s.first)}},hostAttrs:[1,"ant-picker-time-panel"],hostVars:12,hostBindings:function(i,r){i&2&&k("ant-picker-time-panel-column-0",r.enabledColumns===0&&!r.nzInDatePicker)("ant-picker-time-panel-column-1",r.enabledColumns===1&&!r.nzInDatePicker)("ant-picker-time-panel-column-2",r.enabledColumns===2&&!r.nzInDatePicker)("ant-picker-time-panel-column-3",r.enabledColumns===3&&!r.nzInDatePicker)("ant-picker-time-panel-narrow",r.enabledColumns<3)("ant-picker-time-panel-placement-bottomLeft",!r.nzInDatePicker)},inputs:{nzInDatePicker:"nzInDatePicker",nzAddOn:"nzAddOn",nzHideDisabledOptions:"nzHideDisabledOptions",nzClearText:"nzClearText",nzNowText:"nzNowText",nzOkText:"nzOkText",nzPlaceHolder:"nzPlaceHolder",nzUse12Hours:"nzUse12Hours",nzDefaultOpenValue:"nzDefaultOpenValue",nzAllowEmpty:"nzAllowEmpty",nzDisabledHours:"nzDisabledHours",nzDisabledMinutes:"nzDisabledMinutes",nzDisabledSeconds:"nzDisabledSeconds",format:"format",nzHourStep:"nzHourStep",nzMinuteStep:"nzMinuteStep",nzSecondStep:"nzSecondStep"},outputs:{closePanel:"closePanel"},exportAs:["nzTimePickerPanel"],standalone:!0,features:[Ve([{provide:zn,useExisting:n,multi:!0}]),oe,K],decls:7,vars:6,consts:[["class","ant-picker-header",4,"ngIf"],[1,"ant-picker-content"],["class","ant-picker-time-panel-column","style","position: relative;",4,"ngIf"],["class","ant-picker-footer",4,"ngIf"],[1,"ant-picker-header"],[1,"ant-picker-header-view"],[1,"ant-picker-time-panel-column",2,"position","relative"],["hourListElement",""],[4,"ngFor","ngForOf","ngForTrackBy"],["class","ant-picker-time-panel-cell",3,"ant-picker-time-panel-cell-selected","ant-picker-time-panel-cell-disabled","click",4,"ngIf"],[1,"ant-picker-time-panel-cell",3,"click"],[1,"ant-picker-time-panel-cell-inner"],["minuteListElement",""],["secondListElement",""],["use12HoursListElement",""],[4,"ngFor","ngForOf"],[1,"ant-picker-footer"],["class","ant-picker-footer-extra",4,"ngIf"],[1,"ant-picker-ranges"],[1,"ant-picker-now"],[3,"click"],[1,"ant-picker-ok"],["nz-button","","type","button","nzSize","small","nzType","primary",3,"click"],[1,"ant-picker-footer-extra"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(_(0,_k,3,1,"div",0),C(1,"div",1),_(2,bk,3,2,"ul",2)(3,xk,3,2,"ul",2)(4,Dk,3,2,"ul",2)(5,Ik,3,1,"ul",2),S(),_(6,Fk,11,7,"div",3)),i&2&&(h("ngIf",r.nzInDatePicker),f(2),h("ngIf",r.hourEnabled),f(),h("ngIf",r.minuteEnabled),f(),h("ngIf",r.secondEnabled),f(),h("ngIf",r.nzUse12Hours),f(),h("ngIf",!r.nzInDatePicker))},dependencies:[we,lt,Rl,Be,bp,wp,Hi,eo,yi,hr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzUse12Hours",void 0),o})(),Gk="timePicker",Hk=(()=>{let n=class n{emitValue(t){this.setValue(t,!0),this._onChange&&this._onChange(this.value),this._onTouched&&this._onTouched()}setValue(t,i=!1){i&&(this.preValue=lu(t)?new Date(t):null),this.value=lu(t)?new Date(t):null,this.inputValue=this.dateHelper.format(t,this.nzFormat),this.cdr.markForCheck()}open(){this.nzDisabled||this.nzOpen||(this.focus(),this.nzOpen=!0,this.nzOpenChange.emit(this.nzOpen))}close(){this.nzOpen=!1,this.cdr.markForCheck(),this.nzOpenChange.emit(this.nzOpen)}updateAutoFocus(){this.isInit&&!this.nzDisabled&&(this.nzAutoFocus?this.renderer.setAttribute(this.inputRef.nativeElement,"autofocus","autofocus"):this.renderer.removeAttribute(this.inputRef.nativeElement,"autofocus"))}onClickClearBtn(t){t.stopPropagation(),this.emitValue(null)}onClickOutside(t){this.element.nativeElement.contains(t.target)||this.setCurrentValueAndClose()}onFocus(t){this.focused=t,t||(this.checkTimeValid(this.value)?this.setCurrentValueAndClose():(this.setValue(this.preValue),this.close()))}focus(){this.inputRef.nativeElement&&this.inputRef.nativeElement.focus()}blur(){this.inputRef.nativeElement&&this.inputRef.nativeElement.blur()}onKeyupEsc(){this.setValue(this.preValue)}onKeyupEnter(){this.nzOpen&&lu(this.value)?this.setCurrentValueAndClose():this.nzOpen||this.open()}onInputChange(t){!this.platform.TRIDENT&&document.activeElement===this.inputRef.nativeElement&&(this.open(),this.parseTimeString(t))}onPanelValueChange(t){this.setValue(t),this.focus()}closePanel(){this.inputRef.nativeElement.blur()}setCurrentValueAndClose(){this.emitValue(this.value),this.close()}constructor(t,i,r,s,a,l,c,u,d,p){this.nzConfigService=t,this.i18n=i,this.element=r,this.renderer=s,this.cdr=a,this.dateHelper=l,this.platform=c,this.directionality=u,this.nzFormStatusService=d,this.nzFormNoStatusService=p,this._nzModuleName=Gk,this.destroy$=new J,this.isNzDisableFirstChange=!0,this.isInit=!1,this.focused=!1,this.inputValue="",this.value=null,this.preValue=null,this.i18nPlaceHolder$=Mn(void 0),this.overlayPositions=[{offsetY:3,originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{offsetY:-3,originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{offsetY:3,originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{offsetY:-3,originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}],this.dir="ltr",this.prefixCls="ant-picker",this.statusCls={},this.status="",this.hasFeedback=!1,this.nzId=null,this.nzSize=null,this.nzStatus="",this.nzHourStep=1,this.nzMinuteStep=1,this.nzSecondStep=1,this.nzClearText="clear",this.nzNowText="",this.nzOkText="",this.nzPopupClassName="",this.nzPlaceHolder="",this.nzFormat="HH:mm:ss",this.nzOpen=!1,this.nzUse12Hours=!1,this.nzSuffixIcon="clock-circle",this.nzOpenChange=new O,this.nzHideDisabledOptions=!1,this.nzAllowEmpty=!0,this.nzDisabled=!1,this.nzAutoFocus=!1,this.nzBackdrop=!1,this.nzBorderless=!1,this.nzInputReadOnly=!1}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),zl(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:Mn(!1)),We(([{status:t,hasFeedback:i},r])=>({status:r?"":t,hasFeedback:i})),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.inputSize=Math.max(8,this.nzFormat.length)+2,this.origin=new dr(this.element),this.i18nPlaceHolder$=this.i18n.localeChange.pipe(We(t=>t.TimePicker.placeholder)),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngOnChanges(t){let{nzUse12Hours:i,nzFormat:r,nzDisabled:s,nzAutoFocus:a,nzStatus:l}=t;if(i&&!i.previousValue&&i.currentValue&&!r&&(this.nzFormat="h:mm:ss a"),s){let c=s.currentValue,u=this.inputRef.nativeElement;c?this.renderer.setAttribute(u,"disabled",""):this.renderer.removeAttribute(u,"disabled")}a&&this.updateAutoFocus(),l&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}parseTimeString(t){let i=this.dateHelper.parseTime(t,this.nzFormat)||null;lu(i)&&(this.value=i,this.cdr.markForCheck())}ngAfterViewInit(){this.isInit=!0,this.updateAutoFocus()}writeValue(t){let i;t instanceof Date?i=t:Ml(t)?i=null:(qS('Non-Date type is not recommended for time-picker, use "Date" type.'),i=new Date(t)),this.setValue(i,!0)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}checkTimeValid(t){if(!t)return!0;let i=this.nzDisabledHours?.(),r=this.nzDisabledMinutes?.(t.getHours()),s=this.nzDisabledSeconds?.(t.getHours(),t.getMinutes());return!(i?.includes(t.getHours())||r?.includes(t.getMinutes())||s?.includes(t.getSeconds()))}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)})}};n.\u0275fac=function(i){return new(i||n)(w(st),w(Di),w(de),w(He),w(fe),w(no),w(gn),w(Me,8),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-time-picker"]],viewQuery:function(i,r){if(i&1&&xe(Ak,7),i&2){let s;ce(s=ue())&&(r.inputRef=s.first)}},hostAttrs:[1,"ant-picker"],hostVars:12,hostBindings:function(i,r){i&1&&A("click",function(){return r.open()}),i&2&&k("ant-picker-large",r.nzSize==="large")("ant-picker-small",r.nzSize==="small")("ant-picker-disabled",r.nzDisabled)("ant-picker-focused",r.focused)("ant-picker-rtl",r.dir==="rtl")("ant-picker-borderless",r.nzBorderless)},inputs:{nzId:"nzId",nzSize:"nzSize",nzStatus:"nzStatus",nzHourStep:"nzHourStep",nzMinuteStep:"nzMinuteStep",nzSecondStep:"nzSecondStep",nzClearText:"nzClearText",nzNowText:"nzNowText",nzOkText:"nzOkText",nzPopupClassName:"nzPopupClassName",nzPlaceHolder:"nzPlaceHolder",nzAddOn:"nzAddOn",nzDefaultOpenValue:"nzDefaultOpenValue",nzDisabledHours:"nzDisabledHours",nzDisabledMinutes:"nzDisabledMinutes",nzDisabledSeconds:"nzDisabledSeconds",nzFormat:"nzFormat",nzOpen:"nzOpen",nzUse12Hours:"nzUse12Hours",nzSuffixIcon:"nzSuffixIcon",nzHideDisabledOptions:"nzHideDisabledOptions",nzAllowEmpty:"nzAllowEmpty",nzDisabled:"nzDisabled",nzAutoFocus:"nzAutoFocus",nzBackdrop:"nzBackdrop",nzBorderless:"nzBorderless",nzInputReadOnly:"nzInputReadOnly"},outputs:{nzOpenChange:"nzOpenChange"},exportAs:["nzTimePicker"],standalone:!0,features:[Ve([{provide:zn,useExisting:n,multi:!0}]),oe,K],decls:9,vars:16,consts:[[1,"ant-picker-input"],["type","text","autocomplete","off",3,"size","placeholder","ngModel","disabled","readOnly","ngModelChange","focus","blur","keyup.enter","keyup.escape"],["inputElement",""],[1,"ant-picker-suffix"],[4,"nzStringTemplateOutlet"],[3,"status",4,"ngIf"],["class","ant-picker-clear",3,"click",4,"ngIf"],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayPositions","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayTransformOriginOn","detach","overlayOutsideClick"],["nz-icon","",3,"nzType"],[3,"status"],[1,"ant-picker-clear",3,"click"],["nz-icon","","nzType","close-circle","nzTheme","fill"],[1,"ant-picker-dropdown",2,"position","relative"],[1,"ant-picker-panel-container"],["tabindex","-1",1,"ant-picker-panel"],[3,"ngClass","format","nzHourStep","nzMinuteStep","nzSecondStep","nzDisabledHours","nzDisabledMinutes","nzDisabledSeconds","nzPlaceHolder","nzHideDisabledOptions","nzUse12Hours","nzDefaultOpenValue","nzAddOn","nzClearText","nzNowText","nzOkText","nzAllowEmpty","ngModel","ngModelChange","closePanel"]],template:function(i,r){i&1&&(C(0,"div",0)(1,"input",1,2),A("ngModelChange",function(a){return r.inputValue=a})("focus",function(){return r.onFocus(!0)})("blur",function(){return r.onFocus(!1)})("keyup.enter",function(){return r.onKeyupEnter()})("keyup.escape",function(){return r.onKeyupEsc()})("ngModelChange",function(a){return r.onInputChange(a)}),Xn(3,"async"),S(),C(4,"span",3),_(5,Nk,2,1,"ng-container",4)(6,Lk,1,1,"nz-form-item-feedback-icon",5),S(),_(7,kk,2,2,"span",6),S(),_(8,Vk,5,21,"ng-template",7),A("detach",function(){return r.close()})("overlayOutsideClick",function(a){return r.onClickOutside(a)})),i&2&&(f(),h("size",r.inputSize)("placeholder",r.nzPlaceHolder||Vi(3,14,r.i18nPlaceHolder$))("ngModel",r.inputValue)("disabled",r.nzDisabled)("readOnly",r.nzInputReadOnly),ze("id",r.nzId),f(4),h("nzStringTemplateOutlet",r.nzSuffixIcon),f(),h("ngIf",r.hasFeedback&&!!r.status),f(),h("ngIf",r.nzAllowEmpty&&!r.nzDisabled&&r.value),f(),h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayPositions",r.overlayPositions)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayOpen",r.nzOpen)("cdkConnectedOverlayTransformOriginOn",".ant-picker-dropdown"))},dependencies:[ru,nn,Ii,Kt,Rt,Ye,Ue,Ge,Fe,ro,mr,we,dh,St,vr,Nr,Fr,oi],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return N([De()],o.prototype,"nzHourStep",void 0),N([De()],o.prototype,"nzMinuteStep",void 0),N([De()],o.prototype,"nzSecondStep",void 0),N([De()],o.prototype,"nzClearText",void 0),N([De()],o.prototype,"nzNowText",void 0),N([De()],o.prototype,"nzOkText",void 0),N([De()],o.prototype,"nzPopupClassName",void 0),N([De()],o.prototype,"nzFormat",void 0),N([De(),W()],o.prototype,"nzUse12Hours",void 0),N([De()],o.prototype,"nzSuffixIcon",void 0),N([W()],o.prototype,"nzHideDisabledOptions",void 0),N([De(),W()],o.prototype,"nzAllowEmpty",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([De()],o.prototype,"nzBackdrop",void 0),N([W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzInputReadOnly",void 0),o})(),fT=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Hk,dh]});let o=n;return o})();function $k(o,n){o&1&&Xt(0)}function jk(o,n){if(o&1&&(H(0),_(1,$k,1,0,"ng-container",4),B()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.extraFooter)}}function Wk(o,n){if(o&1&&(H(0),R(1,"span",5),B()),o&2){let e=m(2);f(),h("innerHTML",e.extraFooter,Dt)}}function Uk(o,n){if(o&1&&(C(0,"div"),H(1,2),_(2,jk,2,1,"ng-container",3)(3,Wk,2,1,"ng-container",3),B(),S()),o&2){let e=m();Ae("",e.prefixCls,"-footer-extra"),f(),h("ngSwitch",!0),f(),h("ngSwitchCase",e.isTemplateRef(e.extraFooter)),f(),h("ngSwitchCase",e.isNonEmptyString(e.extraFooter))}}function Kk(o,n){if(o&1){let e=Q();C(0,"a",6),A("click",function(){I(e);let i=m();return P(i.isTodayDisabled?null:i.onClickToday())}),Y(1),S()}if(o&2){let e=m();Dl("",e.prefixCls,"-today-btn ",e.isTodayDisabled?e.prefixCls+"-today-btn-disabled":"",""),Vt("title",e.todayTitle),f(),Ne(" ",e.locale.today," ")}}function qk(o,n){o&1&&Xt(0)}function Yk(o,n){if(o&1){let e=Q();C(0,"li")(1,"a",7),A("click",function(){I(e);let i=m(2);return P(i.isTodayDisabled?null:i.onClickToday())}),Y(2),S()()}if(o&2){let e=m(2);Ae("",e.prefixCls,"-now"),f(),Ae("",e.prefixCls,"-now-btn"),f(),Ne(" ",e.locale.now," ")}}function Qk(o,n){if(o&1){let e=Q();C(0,"li")(1,"button",8),A("click",function(){I(e);let i=m(2);return P(i.okDisabled?null:i.clickOk.emit())}),Y(2),S()()}if(o&2){let e=m(2);Ae("",e.prefixCls,"-ok"),f(),h("disabled",e.okDisabled),f(),Ne(" ",e.locale.ok," ")}}function Xk(o,n){if(o&1&&(C(0,"ul"),_(1,qk,1,0,"ng-container",4)(2,Yk,3,7,"li",0)(3,Qk,3,5,"li",0),S()),o&2){let e=m();Ae("",e.prefixCls,"-ranges"),f(),h("ngTemplateOutlet",e.rangeQuickSelector),f(),h("ngIf",e.showNow),f(),h("ngIf",e.hasTimePicker)}}function Zk(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function Jk(o,n){o&1&&R(0,"th",6)}function eV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function tV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,Jk,1,0,"th",4)(3,eV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function nV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function iV(o,n){o&1&&Xt(0)}var kr=o=>({$implicit:o});function rV(o,n){if(o&1&&(H(0),_(1,iV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function oV(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function sV(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function aV(o,n){if(o&1&&(H(0)(1,13),_(2,rV,2,4,"ng-container",14)(3,oV,2,1,"ng-container",14)(4,sV,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function lV(o,n){o&1&&Xt(0)}function cV(o,n){if(o&1&&(H(0),_(1,lV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function uV(o,n){o&1&&Xt(0)}function dV(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,uV,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function pV(o,n){if(o&1&&(H(0),C(1,"div"),_(2,cV,2,4,"ng-container",18)(3,dV,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function hV(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,aV,5,3,"ng-container",14)(3,pV,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function fV(o,n){if(o&1&&(C(0,"tr",8),_(1,nV,2,4,"td",9)(2,hV,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function gV(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function mV(o,n){o&1&&R(0,"th",6)}function vV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function yV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,mV,1,0,"th",4)(3,vV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function CV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function _V(o,n){o&1&&Xt(0)}function SV(o,n){if(o&1&&(H(0),_(1,_V,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function wV(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function bV(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function TV(o,n){if(o&1&&(H(0)(1,13),_(2,SV,2,4,"ng-container",14)(3,wV,2,1,"ng-container",14)(4,bV,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function EV(o,n){o&1&&Xt(0)}function xV(o,n){if(o&1&&(H(0),_(1,EV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function zV(o,n){o&1&&Xt(0)}function OV(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,zV,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function DV(o,n){if(o&1&&(H(0),C(1,"div"),_(2,xV,2,4,"ng-container",18)(3,OV,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function RV(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,TV,5,3,"ng-container",14)(3,DV,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function IV(o,n){if(o&1&&(C(0,"tr",8),_(1,CV,2,4,"td",9)(2,RV,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function PV(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function MV(o,n){o&1&&R(0,"th",6)}function FV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function AV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,MV,1,0,"th",4)(3,FV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function NV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function LV(o,n){o&1&&Xt(0)}function kV(o,n){if(o&1&&(H(0),_(1,LV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function VV(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function GV(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function HV(o,n){if(o&1&&(H(0)(1,13),_(2,kV,2,4,"ng-container",14)(3,VV,2,1,"ng-container",14)(4,GV,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function BV(o,n){o&1&&Xt(0)}function $V(o,n){if(o&1&&(H(0),_(1,BV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function jV(o,n){o&1&&Xt(0)}function WV(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,jV,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function UV(o,n){if(o&1&&(H(0),C(1,"div"),_(2,$V,2,4,"ng-container",18)(3,WV,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function KV(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,HV,5,3,"ng-container",14)(3,UV,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function qV(o,n){if(o&1&&(C(0,"tr",8),_(1,NV,2,4,"td",9)(2,KV,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function YV(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function QV(o,n){o&1&&R(0,"th",6)}function XV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function ZV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,QV,1,0,"th",4)(3,XV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function JV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function e2(o,n){o&1&&Xt(0)}function t2(o,n){if(o&1&&(H(0),_(1,e2,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function n2(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function i2(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function r2(o,n){if(o&1&&(H(0)(1,13),_(2,t2,2,4,"ng-container",14)(3,n2,2,1,"ng-container",14)(4,i2,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function o2(o,n){o&1&&Xt(0)}function s2(o,n){if(o&1&&(H(0),_(1,o2,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function a2(o,n){o&1&&Xt(0)}function l2(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,a2,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function c2(o,n){if(o&1&&(H(0),C(1,"div"),_(2,s2,2,4,"ng-container",18)(3,l2,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function u2(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,r2,5,3,"ng-container",14)(3,c2,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function d2(o,n){if(o&1&&(C(0,"tr",8),_(1,JV,2,4,"td",9)(2,u2,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function p2(o,n){if(o&1){let e=Q();H(0),C(1,"decade-header",4),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"decade-table",5),A("valueChange",function(i){I(e);let r=m();return P(r.onChooseDecade(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.enablePrevNext("prev","decade"))("showSuperNextBtn",e.enablePrevNext("next","decade"))("showNextBtn",!1)("showPreBtn",!1),f(),Ae("",e.prefixCls,"-body"),f(),h("activeDate",e.activeDate)("value",e.value)("locale",e.locale)("disabledDate",e.disabledDate)}}function h2(o,n){if(o&1){let e=Q();H(0),C(1,"year-header",4),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"year-table",6),A("valueChange",function(i){I(e);let r=m();return P(r.onChooseYear(i))})("cellHover",function(i){I(e);let r=m();return P(r.cellHover.emit(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.enablePrevNext("prev","year"))("showSuperNextBtn",e.enablePrevNext("next","year"))("showNextBtn",!1)("showPreBtn",!1),f(),Ae("",e.prefixCls,"-body"),f(),h("activeDate",e.activeDate)("value",e.value)("locale",e.locale)("disabledDate",e.disabledDate)("selectedValue",e.selectedValue)("hoverValue",e.hoverValue)}}function f2(o,n){if(o&1){let e=Q();H(0),C(1,"month-header",4),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"month-table",7),A("valueChange",function(i){I(e);let r=m();return P(r.onChooseMonth(i))})("cellHover",function(i){I(e);let r=m();return P(r.cellHover.emit(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.enablePrevNext("prev","month"))("showSuperNextBtn",e.enablePrevNext("next","month"))("showNextBtn",!1)("showPreBtn",!1),f(),Ae("",e.prefixCls,"-body"),f(),h("value",e.value)("activeDate",e.activeDate)("locale",e.locale)("disabledDate",e.disabledDate)("selectedValue",e.selectedValue)("hoverValue",e.hoverValue)}}function g2(o,n){if(o&1){let e=Q();H(0),C(1,"date-header",8),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"date-table",9),A("valueChange",function(i){I(e);let r=m();return P(r.onSelectDate(i))})("cellHover",function(i){I(e);let r=m();return P(r.cellHover.emit(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.panelMode==="week"?e.enablePrevNext("prev","week"):e.enablePrevNext("prev","date"))("showSuperNextBtn",e.panelMode==="week"?e.enablePrevNext("next","week"):e.enablePrevNext("next","date"))("showPreBtn",e.panelMode==="week"?e.enablePrevNext("prev","week"):e.enablePrevNext("prev","date"))("showNextBtn",e.panelMode==="week"?e.enablePrevNext("next","week"):e.enablePrevNext("next","date")),f(),Ae("",e.prefixCls,"-body"),f(),h("locale",e.locale)("showWeek",e.showWeek)("value",e.value)("activeDate",e.activeDate)("disabledDate",e.disabledDate)("cellRender",e.dateRender)("selectedValue",e.selectedValue)("hoverValue",e.hoverValue)("canSelectWeek",e.panelMode==="week")}}function m2(o,n){if(o&1){let e=Q();H(0),C(1,"nz-time-picker-panel",10),A("ngModelChange",function(i){I(e);let r=m();return P(r.onSelectTime(i))}),S(),B()}if(o&2){let e=m();f(),h("nzInDatePicker",!0)("ngModel",e.value==null?null:e.value.nativeDate)("format",e.timeOptions.nzFormat)("nzHourStep",e.timeOptions.nzHourStep)("nzMinuteStep",e.timeOptions.nzMinuteStep)("nzSecondStep",e.timeOptions.nzSecondStep)("nzDisabledHours",e.timeOptions.nzDisabledHours)("nzDisabledMinutes",e.timeOptions.nzDisabledMinutes)("nzDisabledSeconds",e.timeOptions.nzDisabledSeconds)("nzHideDisabledOptions",!!e.timeOptions.nzHideDisabledOptions)("nzDefaultOpenValue",e.timeOptions.nzDefaultOpenValue)("nzUse12Hours",!!e.timeOptions.nzUse12Hours)("nzAddOn",e.timeOptions.nzAddOn)}}function v2(o,n){o&1&&Xt(0)}var y2=o=>({partType:o});function C2(o,n){if(o&1&&(H(0),_(1,v2,1,0,"ng-container",7),B()),o&2){let e=m(2),t=te(4);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,y2,e.datePickerService.activeInput))}}function _2(o,n){o&1&&Xt(0)}function S2(o,n){o&1&&Xt(0)}var gT=()=>({partType:"left"}),mT=()=>({partType:"right"});function w2(o,n){if(o&1&&_(0,_2,1,0,"ng-container",7)(1,S2,1,0,"ng-container",7),o&2){m(2);let e=te(4);h("ngTemplateOutlet",e)("ngTemplateOutletContext",ii(4,gT)),f(),h("ngTemplateOutlet",e)("ngTemplateOutletContext",ii(5,mT))}}function b2(o,n){o&1&&Xt(0)}function T2(o,n){if(o&1&&(H(0),C(1,"div"),R(2,"div"),C(3,"div")(4,"div"),_(5,C2,2,4,"ng-container",0)(6,w2,2,6,"ng-template",null,5,_e),S(),_(8,b2,1,0,"ng-container",6),S()(),B()),o&2){let e=te(7),t=m(),i=te(6);f(),Dl("",t.prefixCls,"-range-wrapper ",t.prefixCls,"-date-range-wrapper"),f(),Ol(t.arrowPosition),Ae("",t.prefixCls,"-range-arrow"),f(),Dl("",t.prefixCls,"-panel-container ",t.showWeek?t.prefixCls+"-week-number":"",""),f(),Ae("",t.prefixCls,"-panels"),f(),h("ngIf",t.hasTimePicker)("ngIfElse",e),f(3),h("ngTemplateOutlet",i)}}function E2(o,n){o&1&&Xt(0)}function x2(o,n){o&1&&Xt(0)}function z2(o,n){if(o&1&&(C(0,"div")(1,"div",8),_(2,E2,1,0,"ng-container",6)(3,x2,1,0,"ng-container",6),S()()),o&2){let e=m(),t=te(4),i=te(6);xS("",e.prefixCls,"-panel-container ",e.showWeek?e.prefixCls+"-week-number":""," ",e.hasTimePicker?e.prefixCls+"-time":""," ",e.isRange?e.prefixCls+"-range":"",""),f(),Ae("",e.prefixCls,"-panel"),k("ant-picker-panel-rtl",e.dir==="rtl"),f(),h("ngTemplateOutlet",t),f(),h("ngTemplateOutlet",i)}}function O2(o,n){if(o&1){let e=Q();C(0,"div")(1,"inner-popup",9),A("panelModeChange",function(i){let s=I(e).partType,a=m();return P(a.onPanelModeChange(i,s))})("cellHover",function(i){I(e);let r=m();return P(r.onCellHover(i))})("selectDate",function(i){I(e);let r=m();return P(r.changeValueFromSelect(i,!r.showTime))})("selectTime",function(i){let s=I(e).partType,a=m();return P(a.onSelectTime(i,s))})("headerChange",function(i){let s=I(e).partType,a=m();return P(a.onActiveDateChange(i,s))}),S()()}if(o&2){let e=n.partType,t=m();Ae("",t.prefixCls,"-panel"),k("ant-picker-panel-rtl",t.dir==="rtl"),f(),h("showWeek",t.showWeek)("endPanelMode",t.getPanelMode(t.endPanelMode,e))("partType",e)("locale",t.locale)("showTimePicker",t.hasTimePicker)("timeOptions",t.getTimeOptions(e))("panelMode",t.getPanelMode(t.panelMode,e))("activeDate",t.getActiveDate(e))("value",t.getValue(e))("disabledDate",t.disabledDate)("dateRender",t.dateRender)("selectedValue",t.datePickerService==null?null:t.datePickerService.value)("hoverValue",t.hoverValue)}}function D2(o,n){if(o&1){let e=Q();C(0,"calendar-footer",11),A("clickOk",function(){I(e);let i=m(2);return P(i.onClickOk())})("clickToday",function(i){I(e);let r=m(2);return P(r.onClickToday(i))}),S()}if(o&2){let e=m(2),t=te(8);h("locale",e.locale)("isRange",e.isRange)("showToday",e.showToday)("showNow",e.showNow)("hasTimePicker",e.hasTimePicker)("okDisabled",!e.isAllowed(e.datePickerService==null?null:e.datePickerService.value))("extraFooter",e.extraFooter)("rangeQuickSelector",e.ranges?t:null)}}function R2(o,n){if(o&1&&_(0,D2,1,8,"calendar-footer",10),o&2){let e=m();h("ngIf",e.hasFooter)}}function I2(o,n){if(o&1){let e=Q();C(0,"li",13),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.onClickPresetRange(s.ranges[r]))})("mouseenter",function(){let r=I(e).$implicit,s=m(2);return P(s.onHoverPresetRange(s.ranges[r]))})("mouseleave",function(){I(e);let i=m(2);return P(i.onPresetRangeMouseLeave())}),C(1,"span",14),Y(2),S()()}if(o&2){let e=n.$implicit,t=m(2);Ae("",t.prefixCls,"-preset"),f(2),ye(e)}}function P2(o,n){if(o&1&&_(0,I2,3,4,"li",12),o&2){let e=m();h("ngForOf",e.getObjectKeys(e.ranges))}}var M2=["separatorElement"],F2=["pickerInput"],A2=["rangePickerInput"];function N2(o,n){o&1&&Xt(0)}function L2(o,n){if(o&1){let e=Q();C(0,"div")(1,"input",7,8),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.inputValue=i)})("focus",function(i){I(e);let r=m(2);return P(r.onFocus(i))})("focusout",function(i){I(e);let r=m(2);return P(r.onFocusout(i))})("ngModelChange",function(i){I(e);let r=m(2);return P(r.onInputChange(i))})("keyup.enter",function(i){I(e);let r=m(2);return P(r.onKeyupEnter(i))}),S(),_(3,N2,1,0,"ng-container",9),S()}if(o&2){let e=m(2),t=te(4);Ae("",e.prefixCls,"-input"),f(),k("ant-input-disabled",e.nzDisabled),Vt("placeholder",e.getPlaceholder()),h("disabled",e.nzDisabled)("readOnly",e.nzInputReadOnly)("ngModel",e.inputValue)("size",e.inputSize),ze("id",e.nzId),f(2),h("ngTemplateOutlet",t)}}function k2(o,n){o&1&&Xt(0)}function V2(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(4);f(),ye(e.nzSeparator)}}function G2(o,n){o&1&&R(0,"span",14)}function H2(o,n){if(o&1&&(H(0),_(1,V2,2,1,"ng-container",0)(2,G2,1,0,"ng-template",null,13,_e),B()),o&2){let e=te(3),t=m(3);f(),h("ngIf",t.nzSeparator)("ngIfElse",e)}}function B2(o,n){o&1&&Xt(0)}function $2(o,n){o&1&&Xt(0)}function j2(o,n){if(o&1&&(H(0),C(1,"div"),_(2,k2,1,0,"ng-container",10),S(),C(3,"div",null,11)(5,"span"),_(6,H2,4,2,"ng-container",12),S()(),C(7,"div"),_(8,B2,1,0,"ng-container",10),S(),_(9,$2,1,0,"ng-container",9),B()),o&2){let e=m(2),t=te(2),i=te(4);f(),Ae("",e.prefixCls,"-input"),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",ii(18,gT)),f(),Ae("",e.prefixCls,"-range-separator"),f(2),Ae("",e.prefixCls,"-separator"),f(),h("nzStringTemplateOutlet",e.nzSeparator),f(),Ae("",e.prefixCls,"-input"),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",ii(19,mT)),f(),h("ngTemplateOutlet",i)}}function W2(o,n){if(o&1&&(H(0),_(1,L2,4,12,"div",5)(2,j2,10,20,"ng-container",6),B()),o&2){let e=m();f(),h("ngIf",!e.isRange),f(),h("ngIf",e.isRange)}}function U2(o,n){if(o&1){let e=Q();C(0,"input",15,16),A("click",function(i){I(e);let r=m();return P(r.onClickInputBox(i))})("focusout",function(i){I(e);let r=m();return P(r.onFocusout(i))})("focus",function(i){let s=I(e).partType,a=m();return P(a.onFocus(i,s))})("keyup.enter",function(i){I(e);let r=m();return P(r.onKeyupEnter(i))})("ngModelChange",function(i){let s=I(e).partType,a=m();return P(a.inputValue[a.datePickerService.getActiveIndex(s)]=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.onInputChange(i))}),S()}if(o&2){let e=n.partType,t=m();Vt("placeholder",t.getPlaceholder(e)),h("disabled",t.nzDisabled)("readOnly",t.nzInputReadOnly)("size",t.inputSize)("ngModel",t.inputValue[t.datePickerService.getActiveIndex(e)]),ze("id",t.nzId)}}function K2(o,n){if(o&1){let e=Q();C(0,"span",20),A("click",function(i){I(e);let r=m(2);return P(r.onClickClear(i))}),R(1,"span",21),S()}if(o&2){let e=m(2);Ae("",e.prefixCls,"-clear")}}function q2(o,n){if(o&1&&(H(0),R(1,"span",22),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function Y2(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",23),o&2){let e=m(2);h("status",e.status)}}function Q2(o,n){if(o&1&&(R(0,"div",17),_(1,K2,2,3,"span",18),C(2,"span"),_(3,q2,2,1,"ng-container",12)(4,Y2,1,1,"nz-form-item-feedback-icon",19),S()),o&2){let e=m();Ae("",e.prefixCls,"-active-bar"),h("ngStyle",e.activeBarStyle),f(),h("ngIf",e.showClear()),f(),Ae("",e.prefixCls,"-suffix"),f(),h("nzStringTemplateOutlet",e.nzSuffixIcon),f(),h("ngIf",e.hasFeedback&&!!e.status)}}function X2(o,n){if(o&1){let e=Q();C(0,"div",17)(1,"date-range-popup",24),A("panelModeChange",function(i){I(e);let r=m();return P(r.onPanelModeChange(i))})("calendarChange",function(i){I(e);let r=m();return P(r.onCalendarChange(i))})("resultOk",function(){I(e);let i=m();return P(i.onResultOk())}),S()()}if(o&2){let e=m();Dl("",e.prefixCls,"-dropdown ",e.nzDropdownClassName,""),k("ant-picker-dropdown-rtl",e.dir==="rtl")("ant-picker-dropdown-placement-bottomLeft",e.currentPositionY==="bottom"&&e.currentPositionX==="start")("ant-picker-dropdown-placement-topLeft",e.currentPositionY==="top"&&e.currentPositionX==="start")("ant-picker-dropdown-placement-bottomRight",e.currentPositionY==="bottom"&&e.currentPositionX==="end")("ant-picker-dropdown-placement-topRight",e.currentPositionY==="top"&&e.currentPositionX==="end")("ant-picker-dropdown-range",e.isRange)("ant-picker-active-left",e.datePickerService.activeInput==="left")("ant-picker-active-right",e.datePickerService.activeInput==="right"),h("ngStyle",e.nzPopupStyle),f(),h("isRange",e.isRange)("inline",e.nzInline)("defaultPickerValue",e.nzDefaultPickerValue)("showWeek",e.nzShowWeekNumber||e.nzMode==="week")("panelMode",e.panelMode)("locale",e.nzLocale==null?null:e.nzLocale.lang)("showToday",e.nzMode==="date"&&e.nzShowToday&&!e.isRange&&!e.nzShowTime)("showNow",e.nzMode==="date"&&e.nzShowNow&&!e.isRange&&!!e.nzShowTime)("showTime",e.nzShowTime)("dateRender",e.nzDateRender)("disabledDate",e.nzDisabledDate)("disabledTime",e.nzDisabledTime)("extraFooter",e.extraFooter)("ranges",e.nzRanges)("dir",e.dir)}}function Z2(o,n){o&1&&Xt(0)}function J2(o,n){if(o&1&&(C(0,"div",25),_(1,Z2,1,0,"ng-container",9),S()),o&2){let e=m(),t=te(6);h("nzNoAnimation",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("@slideMotion","enter"),f(),h("ngTemplateOutlet",t)}}var hh="ant-picker",eG={nzDisabledHours(){return[]},nzDisabledMinutes(){return[]},nzDisabledSeconds(){return[]}};function vT(o,n){let e=n?n(o&&o.nativeDate):{};return e=V(V({},eG),e),e}function tG(o,n){let e=!1;if(o){let t=o.getHours(),i=o.getMinutes(),r=o.getSeconds();n.nzDisabledHours().indexOf(t)===-1&&n.nzDisabledMinutes(t).indexOf(i)===-1?e=n.nzDisabledSeconds(t,i).indexOf(r)!==-1:e=!0}return!e}function nG(o,n){let e=vT(o,n);return tG(o,e)}function ph(o,n,e){return!(!o||n&&n(o.nativeDate)||e&&!nG(o,e))}function fh(o){return o&&o.replace(/Y/g,"y").replace(/D/g,"d")}var yT=(()=>{let n=class n{constructor(t){this.dateHelper=t,this.showToday=!1,this.showNow=!1,this.hasTimePicker=!1,this.isRange=!1,this.okDisabled=!1,this.rangeQuickSelector=null,this.clickOk=new O,this.clickToday=new O,this.prefixCls=hh,this.isTemplateRef=Jg,this.isNonEmptyString=Zg,this.isTodayDisabled=!1,this.todayTitle=""}ngOnChanges(t){let i=new Date;if(t.disabledDate&&(this.isTodayDisabled=!!(this.disabledDate&&this.disabledDate(i))),t.locale){let r=fh(this.locale.dateFormat);this.todayTitle=this.dateHelper.format(i,r)}}onClickToday(){let t=new Ln;this.clickToday.emit(t.clone())}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["calendar-footer"]],inputs:{locale:"locale",showToday:"showToday",showNow:"showNow",hasTimePicker:"hasTimePicker",isRange:"isRange",okDisabled:"okDisabled",disabledDate:"disabledDate",extraFooter:"extraFooter",rangeQuickSelector:"rangeQuickSelector"},outputs:{clickOk:"clickOk",clickToday:"clickToday"},exportAs:["calendarFooter"],standalone:!0,features:[oe,K],decls:4,vars:6,consts:[[3,"class",4,"ngIf"],["role","button",3,"class","title","click",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngTemplateOutlet"],[3,"innerHTML"],["role","button",3,"title","click"],[3,"click"],["nz-button","","type","button","nzType","primary","nzSize","small",3,"disabled","click"]],template:function(i,r){i&1&&(C(0,"div"),_(1,Uk,4,6,"div",0)(2,Kk,2,6,"a",1)(3,Xk,4,6,"ul",0),S()),i&2&&(Ae("",r.prefixCls,"-footer"),f(),h("ngIf",r.extraFooter),f(),h("ngIf",r.showToday),f(),h("ngIf",r.hasTimePicker||r.rangeQuickSelector))},dependencies:[we,jn,Wn,Be,Hi,eo,yi,hr],encapsulation:2,changeDetection:0});let o=n;return o})(),cv=(()=>{let n=class n{constructor(){this.activeInput="left",this.arrowLeft=0,this.isRange=!1,this.valueChange$=new tn(1),this.emitValue$=new J,this.inputPartChange$=new J}initValue(t=!1){t&&(this.initialValue=this.isRange?[]:null),this.setValue(this.initialValue)}hasValue(t=this.value){return Array.isArray(t)?!!t[0]||!!t[1]:!!t}makeValue(t){return this.isRange?t?t.map(i=>new Ln(i)):[]:t?new Ln(t):null}setActiveDate(t,i=!1,r="month"){let s={date:"month",month:"year",year:"decade"};this.isRange?this.activeDate=cw(t,i,s[r],this.activeInput):this.activeDate=Vl(t)}setValue(t){this.value=t,this.valueChange$.next(this.value)}getActiveIndex(t=this.activeInput){return{left:0,right:1}[t]}ngOnDestroy(){this.valueChange$.complete(),this.emitValue$.complete(),this.inputPartChange$.complete()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),gh=(()=>{let n=class n{constructor(){this.prefixCls="ant-picker-header",this.selectors=[],this.showSuperPreBtn=!0,this.showSuperNextBtn=!0,this.showPreBtn=!0,this.showNextBtn=!0,this.panelModeChange=new O,this.valueChange=new O}superPreviousTitle(){return this.locale.previousYear}previousTitle(){return this.locale.previousMonth}superNextTitle(){return this.locale.nextYear}nextTitle(){return this.locale.nextMonth}superPrevious(){this.changeValue(this.value.addYears(-1))}superNext(){this.changeValue(this.value.addYears(1))}previous(){this.changeValue(this.value.addMonths(-1))}next(){this.changeValue(this.value.addMonths(1))}changeValue(t){this.value!==t&&(this.value=t,this.valueChange.emit(this.value),this.render())}changeMode(t){this.panelModeChange.emit(t)}render(){this.value&&(this.selectors=this.getSelectors())}ngOnInit(){this.value||(this.value=new Ln),this.selectors=this.getSelectors()}ngOnChanges(t){(t.value||t.locale)&&this.render()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,inputs:{value:"value",locale:"locale",showSuperPreBtn:"showSuperPreBtn",showSuperNextBtn:"showSuperNextBtn",showPreBtn:"showPreBtn",showNextBtn:"showNextBtn"},outputs:{panelModeChange:"panelModeChange",valueChange:"valueChange"},features:[oe]});let o=n;return o})(),iG=(()=>{let n=class n extends gh{previous(){}next(){}get startYear(){return parseInt(`${this.value.getYear()/100}`,10)*100}get endYear(){return this.startYear+99}superPrevious(){this.changeValue(this.value.addYears(-100))}superNext(){this.changeValue(this.value.addYears(100))}getSelectors(){return[{className:`${this.prefixCls}-decade-btn`,title:"",onClick:()=>{},label:`${this.startYear}-${this.endYear}`}]}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["decade-header"]],exportAs:["decadeHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,Zk,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),mh=(()=>{let n=class n{constructor(){this.isTemplateRef=Jg,this.isNonEmptyString=Zg,this.headRow=[],this.bodyRows=[],this.MAX_ROW=6,this.MAX_COL=7,this.prefixCls="ant-picker",this.activeDate=new Ln,this.showWeek=!1,this.selectedValue=[],this.hoverValue=[],this.canSelectWeek=!1,this.valueChange=new O,this.cellHover=new O}render(){this.activeDate&&(this.headRow=this.makeHeadRow(),this.bodyRows=this.makeBodyRows())}trackByBodyRow(t,i){return i.trackByIndex}trackByBodyColumn(t,i){return i.trackByIndex}hasRangeValue(){return this.selectedValue?.length>0||this.hoverValue?.length>0}getClassMap(t){return{"ant-picker-cell":!0,"ant-picker-cell-in-view":!0,"ant-picker-cell-selected":t.isSelected,"ant-picker-cell-disabled":t.isDisabled,"ant-picker-cell-in-range":!!t.isInSelectedRange,"ant-picker-cell-range-start":!!t.isSelectedStart,"ant-picker-cell-range-end":!!t.isSelectedEnd,"ant-picker-cell-range-start-single":!!t.isStartSingle,"ant-picker-cell-range-end-single":!!t.isEndSingle,"ant-picker-cell-range-hover":!!t.isInHoverRange,"ant-picker-cell-range-hover-start":!!t.isHoverStart,"ant-picker-cell-range-hover-end":!!t.isHoverEnd,"ant-picker-cell-range-hover-edge-start":!!t.isFirstCellInPanel,"ant-picker-cell-range-hover-edge-end":!!t.isLastCellInPanel,"ant-picker-cell-range-start-near-hover":!!t.isRangeStartNearHover,"ant-picker-cell-range-end-near-hover":!!t.isRangeEndNearHover}}ngOnInit(){this.render()}ngOnChanges(t){t.activeDate&&!t.activeDate.currentValue&&(this.activeDate=new Ln),(t.disabledDate||t.locale||t.showWeek||t.selectWeek||this.isDateRealChange(t.activeDate)||this.isDateRealChange(t.value)||this.isDateRealChange(t.selectedValue)||this.isDateRealChange(t.hoverValue))&&this.render()}isDateRealChange(t){if(t){let i=t.previousValue,r=t.currentValue;return Array.isArray(r)?!Array.isArray(i)||r.length!==i.length||r.some((s,a)=>{let l=i[a];return l instanceof Ln?l.isSameDay(s):l!==s}):!this.isSameDate(i,r)}return!1}isSameDate(t,i){return!t&&!i||t&&i&&i.isSameDay(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,inputs:{prefixCls:"prefixCls",value:"value",locale:"locale",activeDate:"activeDate",showWeek:"showWeek",selectedValue:"selectedValue",hoverValue:"hoverValue",disabledDate:"disabledDate",cellRender:"cellRender",fullCellRender:"fullCellRender",canSelectWeek:"canSelectWeek"},outputs:{valueChange:"valueChange",cellHover:"cellHover"},features:[oe]});let o=n;return o})(),rG=4,oG=3,sG=(()=>{let n=class n extends mh{get startYear(){return parseInt(`${this.activeDate.getYear()/100}`,10)*100}get endYear(){return this.startYear+99}makeHeadRow(){return[]}makeBodyRows(){let t=[],i=this.value&&this.value.getYear(),r=this.startYear,s=this.endYear,a=r-10,l=0;for(let c=0;c=p&&i<=g,isLowerThanStart:gs,classMap:{},onClick(){},onMouseEnter(){}};y.classMap=this.getClassMap(y),y.onClick=()=>this.chooseDecade(p),l++,u.dateCells.push(y)}t.push(u)}return t}getClassMap(t){return{[`${this.prefixCls}-cell`]:!0,[`${this.prefixCls}-cell-in-view`]:!t.isBiggerThanEnd&&!t.isLowerThanStart,[`${this.prefixCls}-cell-selected`]:t.isSelected,[`${this.prefixCls}-cell-disabled`]:t.isDisabled}}chooseDecade(t){this.value=this.activeDate.setYear(t),this.valueChange.emit(this.value)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["decade-table"]],exportAs:["decadeTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,tV,4,2,"thead",1),C(2,"tbody"),_(3,fV,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),aG=(()=>{let n=class n extends gh{get startYear(){return parseInt(`${this.value.getYear()/10}`,10)*10}get endYear(){return this.startYear+9}superPrevious(){this.changeValue(this.value.addYears(-10))}superNext(){this.changeValue(this.value.addYears(10))}getSelectors(){return[{className:`${this.prefixCls}-year-btn`,title:"",onClick:()=>this.changeMode("decade"),label:`${this.startYear}-${this.endYear}`}]}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["year-header"]],exportAs:["yearHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,gV,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),lG=(()=>{let n=class n extends mh{constructor(t){super(),this.dateHelper=t,this.MAX_ROW=4,this.MAX_COL=3}makeHeadRow(){return[]}makeBodyRows(){let t=this.activeDate&&this.activeDate.getYear(),i=parseInt(`${t/10}`,10)*10,r=i+9,s=i-1,a=[],l=0;for(let c=0;c=i&&p<=r,isSelected:p===(this.value&&this.value.getYear()),content:v,title:v,classMap:{},isLastCellInPanel:g.getYear()===r,isFirstCellInPanel:g.getYear()===i,cellRender:Ds(this.cellRender,g),fullCellRender:Ds(this.fullCellRender,g),onClick:()=>this.chooseYear(x.value.getFullYear()),onMouseEnter:()=>this.cellHover.emit(g)};this.addCellProperty(x,g),u.dateCells.push(x),l++}a.push(u)}return a}getClassMap(t){return ot(V({},super.getClassMap(t)),{"ant-picker-cell-in-view":!!t.isSameDecade})}isDisabledYear(t){if(!this.disabledDate)return!1;let i=t.setMonth(0).setDate(1);for(let r=i;r.getYear()===t.getYear();r=r.addDays(1))if(!this.disabledDate(r.nativeDate))return!1;return!0}addCellProperty(t,i){if(this.hasRangeValue()){let[r,s]=this.hoverValue,[a,l]=this.selectedValue;a?.isSameYear(i)&&(t.isSelectedStart=!0,t.isSelected=!0),l?.isSameYear(i)&&(t.isSelectedEnd=!0,t.isSelected=!0),r&&s&&(t.isHoverStart=r.isSameYear(i),t.isHoverEnd=s.isSameYear(i),t.isInHoverRange=r.isBeforeYear(i)&&i.isBeforeYear(s)),t.isStartSingle=a&&!l,t.isEndSingle=!a&&l,t.isInSelectedRange=a?.isBeforeYear(i)&&i?.isBeforeYear(l),t.isRangeStartNearHover=a&&t.isInHoverRange,t.isRangeEndNearHover=l&&t.isInHoverRange}else i.isSameYear(this.value)&&(t.isSelected=!0);t.classMap=this.getClassMap(t)}chooseYear(t){this.value=this.activeDate.setYear(t),this.valueChange.emit(this.value),this.render()}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["year-table"]],exportAs:["yearTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,yV,4,2,"thead",1),C(2,"tbody"),_(3,IV,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),cG=(()=>{let n=class n extends gh{constructor(t){super(),this.dateHelper=t}getSelectors(){return[{className:`${this.prefixCls}-month-btn`,title:this.locale.yearSelect,onClick:()=>this.changeMode("year"),label:this.dateHelper.format(this.value.nativeDate,fh(this.locale.yearFormat))}]}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["month-header"]],exportAs:["monthHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,PV,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),uG=(()=>{let n=class n extends mh{constructor(t){super(),this.dateHelper=t,this.MAX_ROW=4,this.MAX_COL=3}makeHeadRow(){return[]}makeBodyRows(){let t=[],i=0;for(let r=0;rthis.chooseMonth(d.value.getMonth()),onMouseEnter:()=>this.cellHover.emit(l)};this.addCellProperty(d,l),s.dateCells.push(d),i++}t.push(s)}return t}isDisabledMonth(t){if(!this.disabledDate)return!1;let i=t.setDate(1);for(let r=i;r.getMonth()===t.getMonth();r=r.addDays(1))if(!this.disabledDate(r.nativeDate))return!1;return!0}addCellProperty(t,i){if(this.hasRangeValue()){let[r,s]=this.hoverValue,[a,l]=this.selectedValue;a?.isSameMonth(i)&&(t.isSelectedStart=!0,t.isSelected=!0),l?.isSameMonth(i)&&(t.isSelectedEnd=!0,t.isSelected=!0),r&&s&&(t.isHoverStart=r.isSameMonth(i),t.isHoverEnd=s.isSameMonth(i),t.isLastCellInPanel=i.getMonth()===11,t.isFirstCellInPanel=i.getMonth()===0,t.isInHoverRange=r.isBeforeMonth(i)&&i.isBeforeMonth(s)),t.isStartSingle=a&&!l,t.isEndSingle=!a&&l,t.isInSelectedRange=a?.isBeforeMonth(i)&&i?.isBeforeMonth(l),t.isRangeStartNearHover=a&&t.isInHoverRange,t.isRangeEndNearHover=l&&t.isInHoverRange}else i.isSameMonth(this.value)&&(t.isSelected=!0);t.classMap=this.getClassMap(t)}chooseMonth(t){this.value=this.activeDate.setMonth(t),this.valueChange.emit(this.value)}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["month-table"]],exportAs:["monthTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,AV,4,2,"thead",1),C(2,"tbody"),_(3,qV,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),dG=(()=>{let n=class n extends gh{constructor(t){super(),this.dateHelper=t}getSelectors(){return[{className:`${this.prefixCls}-year-btn`,title:this.locale.yearSelect,onClick:()=>this.changeMode("year"),label:this.dateHelper.format(this.value.nativeDate,fh(this.locale.yearFormat))},{className:`${this.prefixCls}-month-btn`,title:this.locale.monthSelect,onClick:()=>this.changeMode("month"),label:this.dateHelper.format(this.value.nativeDate,this.locale.monthFormat||"MMM")}]}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["date-header"]],exportAs:["dateHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,YV,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),pG=(()=>{let n=class n extends mh{constructor(t,i){super(),this.i18n=t,this.dateHelper=i}changeValueFromInside(t){this.activeDate=this.activeDate.setYear(t.getYear()).setMonth(t.getMonth()).setDate(t.getDate()),this.valueChange.emit(this.activeDate),this.activeDate.isSameMonth(this.value)||this.render()}makeHeadRow(){let t=[],i=this.activeDate.calendarStart({weekStartsOn:this.dateHelper.getFirstDayOfWeek()});for(let r=0;rthis.changeValueFromInside(c),onMouseEnter:()=>this.cellHover.emit(c)};this.addCellProperty(g,c),this.showWeek&&!a.weekNum&&(a.weekNum=this.dateHelper.getISOWeek(c.nativeDate)),c.isSameDay(this.value)&&(a.isActive=c.isSameDay(this.value)),a.dateCells.push(g)}a.classMap={"ant-picker-week-panel-row":this.canSelectWeek,"ant-picker-week-panel-row-selected":this.canSelectWeek&&a.isActive},t.push(a)}return t}addCellProperty(t,i){if(this.hasRangeValue()&&!this.canSelectWeek){let[r,s]=this.hoverValue,[a,l]=this.selectedValue;a?.isSameDay(i)&&(t.isSelectedStart=!0,t.isSelected=!0),l?.isSameDay(i)&&(t.isSelectedEnd=!0,t.isSelected=!0),r&&s&&(t.isHoverStart=r.isSameDay(i),t.isHoverEnd=s.isSameDay(i),t.isLastCellInPanel=i.isLastDayOfMonth(),t.isFirstCellInPanel=i.isFirstDayOfMonth(),t.isInHoverRange=r.isBeforeDay(i)&&i.isBeforeDay(s)),t.isStartSingle=a&&!l,t.isEndSingle=!a&&l,t.isInSelectedRange=a?.isBeforeDay(i)&&i.isBeforeDay(l),t.isRangeStartNearHover=a&&t.isInHoverRange,t.isRangeEndNearHover=l&&t.isInHoverRange}t.isToday=i.isToday(),t.isSelected=i.isSameDay(this.value),t.isDisabled=!!this.disabledDate?.(i.nativeDate),t.classMap=this.getClassMap(t)}getClassMap(t){let i=new Ln(t.value);return ot(V({},super.getClassMap(t)),{"ant-picker-cell-today":!!t.isToday,"ant-picker-cell-in-view":i.isSameMonth(this.activeDate)})}};n.\u0275fac=function(i){return new(i||n)(w(Di),w(no))},n.\u0275cmp=j({type:n,selectors:[["date-table"]],inputs:{locale:"locale"},exportAs:["dateTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,ZV,4,2,"thead",1),C(2,"tbody"),_(3,d2,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),hG=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})(),CT=(()=>{let n=class n{constructor(){this.panelModeChange=new O,this.headerChange=new O,this.selectDate=new O,this.selectTime=new O,this.cellHover=new O,this.prefixCls=hh}enablePrevNext(t,i){return!(!this.showTimePicker&&i===this.endPanelMode&&(this.partType==="left"&&t==="next"||this.partType==="right"&&t==="prev"))}onSelectTime(t){this.selectTime.emit(new Ln(t))}onSelectDate(t){let i=t instanceof Ln?t:new Ln(t),r=this.timeOptions&&this.timeOptions.nzDefaultOpenValue;!this.value&&r&&i.setHms(r.getHours(),r.getMinutes(),r.getSeconds()),this.selectDate.emit(i)}onChooseMonth(t){this.activeDate=this.activeDate.setMonth(t.getMonth()),this.endPanelMode==="month"?(this.value=t,this.selectDate.emit(t)):(this.headerChange.emit(t),this.panelModeChange.emit(this.endPanelMode))}onChooseYear(t){this.activeDate=this.activeDate.setYear(t.getYear()),this.endPanelMode==="year"?(this.value=t,this.selectDate.emit(t)):(this.headerChange.emit(t),this.panelModeChange.emit(this.endPanelMode))}onChooseDecade(t){this.activeDate=this.activeDate.setYear(t.getYear()),this.endPanelMode==="decade"?(this.value=t,this.selectDate.emit(t)):(this.headerChange.emit(t),this.panelModeChange.emit("year"))}ngOnChanges(t){t.activeDate&&!t.activeDate.currentValue&&(this.activeDate=new Ln),t.panelMode&&t.panelMode.currentValue==="time"&&(this.panelMode="date")}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["inner-popup"]],inputs:{activeDate:"activeDate",endPanelMode:"endPanelMode",panelMode:"panelMode",showWeek:"showWeek",locale:"locale",showTimePicker:"showTimePicker",timeOptions:"timeOptions",disabledDate:"disabledDate",dateRender:"dateRender",selectedValue:"selectedValue",hoverValue:"hoverValue",value:"value",partType:"partType"},outputs:{panelModeChange:"panelModeChange",headerChange:"headerChange",selectDate:"selectDate",selectTime:"selectTime",cellHover:"cellHover"},exportAs:["innerPopup"],standalone:!0,features:[oe,K],decls:8,vars:11,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngIf"],[3,"value","locale","showSuperPreBtn","showSuperNextBtn","showNextBtn","showPreBtn","valueChange","panelModeChange"],[3,"activeDate","value","locale","disabledDate","valueChange"],[3,"activeDate","value","locale","disabledDate","selectedValue","hoverValue","valueChange","cellHover"],[3,"value","activeDate","locale","disabledDate","selectedValue","hoverValue","valueChange","cellHover"],[3,"value","locale","showSuperPreBtn","showSuperNextBtn","showPreBtn","showNextBtn","valueChange","panelModeChange"],[3,"locale","showWeek","value","activeDate","disabledDate","cellRender","selectedValue","hoverValue","canSelectWeek","valueChange","cellHover"],[3,"nzInDatePicker","ngModel","format","nzHourStep","nzMinuteStep","nzSecondStep","nzDisabledHours","nzDisabledMinutes","nzDisabledSeconds","nzHideDisabledOptions","nzDefaultOpenValue","nzUse12Hours","nzAddOn","ngModelChange"]],template:function(i,r){i&1&&(C(0,"div")(1,"div"),H(2,0),_(3,p2,4,13,"ng-container",1)(4,h2,4,15,"ng-container",1)(5,f2,4,15,"ng-container",1)(6,g2,4,18,"ng-container",2),B(),S(),_(7,m2,2,13,"ng-container",3),S()),i&2&&(k("ant-picker-datetime-panel",r.showTimePicker),f(),Dl("",r.prefixCls,"-",r.panelMode,"-panel"),f(),h("ngSwitch",r.panelMode),f(),h("ngSwitchCase","decade"),f(),h("ngSwitchCase","year"),f(),h("ngSwitchCase","month"),f(2),h("ngIf",r.showTimePicker&&r.timeOptions))},dependencies:[jn,Wn,hG,dG,pG,iG,sG,cG,uG,aG,lG,Gi,we,fT,dh,nn,Kt,Rt],encapsulation:2,changeDetection:0});let o=n;return o})(),uv=(()=>{let n=class n{get hasTimePicker(){return!!this.showTime}get hasFooter(){return this.showToday||this.hasTimePicker||!!this.extraFooter||!!this.ranges}get arrowPosition(){return this.dir==="rtl"?{right:`${this.datePickerService?.arrowLeft}px`}:{left:`${this.datePickerService?.arrowLeft}px`}}constructor(t,i,r,s){this.datePickerService=t,this.cdr=i,this.ngZone=r,this.host=s,this.inline=!1,this.dir="ltr",this.panelModeChange=new O,this.calendarChange=new O,this.resultOk=new O,this.prefixCls=hh,this.endPanelMode="date",this.timeOptions=null,this.hoverValue=[],this.checkedPartArr=[!1,!1],this.destroy$=new J,this.disabledStartTime=a=>this.disabledTime&&this.disabledTime(a,"start"),this.disabledEndTime=a=>this.disabledTime&&this.disabledTime(a,"end")}ngOnInit(){_t(this.datePickerService.valueChange$,this.datePickerService.inputPartChange$).pipe(F(this.destroy$)).subscribe(()=>{this.updateActiveDate(),this.cdr.markForCheck()}),this.ngZone.runOutsideAngular(()=>{Ke(this.host.nativeElement,"mousedown").pipe(F(this.destroy$)).subscribe(t=>t.preventDefault())})}ngOnChanges(t){(t.showTime||t.disabledTime)&&this.showTime&&this.buildTimeOptions(),t.panelMode&&(this.endPanelMode=this.panelMode),t.defaultPickerValue&&this.updateActiveDate()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}updateActiveDate(){let t=this.datePickerService.hasValue()?this.datePickerService.value:this.datePickerService.makeValue(this.defaultPickerValue);this.datePickerService.setActiveDate(t,this.hasTimePicker,this.getPanelMode(this.endPanelMode))}onClickOk(){let t={left:0,right:1}[this.datePickerService.activeInput],i=this.isRange?this.datePickerService.value[t]:this.datePickerService.value;this.changeValueFromSelect(i),this.resultOk.emit()}onClickToday(t){this.changeValueFromSelect(t,!this.showTime)}onCellHover(t){if(!this.isRange)return;let i={left:1,right:0}[this.datePickerService.activeInput],r=this.datePickerService.value[i];r&&(r.isBeforeDay(t)?this.hoverValue=[r,t]:this.hoverValue=[t,r])}onPanelModeChange(t,i){this.isRange?this.datePickerService.getActiveIndex(i)===0?this.panelMode=[t,this.panelMode[1]]:this.panelMode=[this.panelMode[0],t]:this.panelMode=t,this.panelModeChange.emit(this.panelMode)}onActiveDateChange(t,i){if(this.isRange){let r=[];r[this.datePickerService.getActiveIndex(i)]=t,this.datePickerService.setActiveDate(r,this.hasTimePicker,this.getPanelMode(this.endPanelMode,i))}else this.datePickerService.setActiveDate(t)}onSelectTime(t,i){if(this.isRange){let r=Vl(this.datePickerService.value),s=this.datePickerService.getActiveIndex(i);r[s]=this.overrideHms(t,r[s]),this.datePickerService.setValue(r)}else{let r=this.overrideHms(t,this.datePickerService.value);this.datePickerService.setValue(r)}this.datePickerService.inputPartChange$.next(null),this.buildTimeOptions()}changeValueFromSelect(t,i=!0){if(this.isRange){let r=Vl(this.datePickerService.value),s=this.datePickerService.activeInput,a=s;r[this.datePickerService.getActiveIndex(s)]=t,this.checkedPartArr[this.datePickerService.getActiveIndex(s)]=!0,this.hoverValue=r,i?this.inline?(a=this.reversedPart(s),a==="right"&&(r[this.datePickerService.getActiveIndex(a)]=null,this.checkedPartArr[this.datePickerService.getActiveIndex(a)]=!1),this.datePickerService.setValue(r),this.calendarChange.emit(r),this.isBothAllowed(r)&&this.checkedPartArr[0]&&this.checkedPartArr[1]&&(this.clearHoverValue(),this.datePickerService.emitValue$.next())):(am(r)&&(a=this.reversedPart(s),r[this.datePickerService.getActiveIndex(a)]=null,this.checkedPartArr[this.datePickerService.getActiveIndex(a)]=!1),this.datePickerService.setValue(r),this.isBothAllowed(r)&&this.checkedPartArr[0]&&this.checkedPartArr[1]?(this.calendarChange.emit(r),this.clearHoverValue(),this.datePickerService.emitValue$.next()):this.isAllowed(r)&&(a=this.reversedPart(s),this.calendarChange.emit([t.clone()]))):this.datePickerService.setValue(r),this.datePickerService.inputPartChange$.next(a)}else this.datePickerService.setValue(t),this.datePickerService.inputPartChange$.next(null),i&&this.isAllowed(t)&&this.datePickerService.emitValue$.next();this.buildTimeOptions()}reversedPart(t){return t==="left"?"right":"left"}getPanelMode(t,i){return this.isRange?t[this.datePickerService.getActiveIndex(i)]:t}getValue(t){return this.isRange?(this.datePickerService.value||[])[this.datePickerService.getActiveIndex(t)]:this.datePickerService.value}getActiveDate(t){return this.isRange?this.datePickerService.activeDate[this.datePickerService.getActiveIndex(t)]:this.datePickerService.activeDate}isOneAllowed(t){let i=this.datePickerService.getActiveIndex(),r=[this.disabledStartTime,this.disabledEndTime];return ph(t[i],this.disabledDate,r[i])}isBothAllowed(t){return ph(t[0],this.disabledDate,this.disabledStartTime)&&ph(t[1],this.disabledDate,this.disabledEndTime)}isAllowed(t,i=!1){return this.isRange?i?this.isBothAllowed(t):this.isOneAllowed(t):ph(t,this.disabledDate,this.disabledTime)}getTimeOptions(t){return this.showTime&&this.timeOptions?this.timeOptions instanceof Array?this.timeOptions[this.datePickerService.getActiveIndex(t)]:this.timeOptions:null}onClickPresetRange(t){let i=typeof t=="function"?t():t;i&&(this.datePickerService.setValue([new Ln(i[0]),new Ln(i[1])]),this.datePickerService.emitValue$.next())}onPresetRangeMouseLeave(){this.clearHoverValue()}onHoverPresetRange(t){typeof t!="function"&&(this.hoverValue=[new Ln(t[0]),new Ln(t[1])])}getObjectKeys(t){return t?Object.keys(t):[]}show(t){return!(this.showTime&&this.isRange&&this.datePickerService.activeInput!==t)}clearHoverValue(){this.hoverValue=[]}buildTimeOptions(){if(this.showTime){let t=typeof this.showTime=="object"?this.showTime:{};if(this.isRange){let i=this.datePickerService.value;this.timeOptions=[this.overrideTimeOptions(t,i[0],"start"),this.overrideTimeOptions(t,i[1],"end")]}else this.timeOptions=this.overrideTimeOptions(t,this.datePickerService.value)}else this.timeOptions=null}overrideTimeOptions(t,i,r){let s;return r?s=r==="start"?this.disabledStartTime:this.disabledEndTime:s=this.disabledTime,V(V({},t),vT(i,s))}overrideHms(t,i){return t=t||new Ln,i=i||new Ln,i.setHms(t.getHours(),t.getMinutes(),t.getSeconds())}};n.\u0275fac=function(i){return new(i||n)(w(cv),w(fe),w($e),w(de))},n.\u0275cmp=j({type:n,selectors:[["date-range-popup"]],inputs:{isRange:"isRange",inline:"inline",showWeek:"showWeek",locale:"locale",disabledDate:"disabledDate",disabledTime:"disabledTime",showToday:"showToday",showNow:"showNow",showTime:"showTime",extraFooter:"extraFooter",ranges:"ranges",dateRender:"dateRender",panelMode:"panelMode",defaultPickerValue:"defaultPickerValue",dir:"dir"},outputs:{panelModeChange:"panelModeChange",calendarChange:"calendarChange",resultOk:"resultOk"},exportAs:["dateRangePopup"],standalone:!0,features:[oe,K],decls:9,vars:2,consts:[[4,"ngIf","ngIfElse"],["singlePanel",""],["tplInnerPopup",""],["tplFooter",""],["tplRangeQuickSelector",""],["noTimePicker",""],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["tabindex","-1"],[3,"showWeek","endPanelMode","partType","locale","showTimePicker","timeOptions","panelMode","activeDate","value","disabledDate","dateRender","selectedValue","hoverValue","panelModeChange","cellHover","selectDate","selectTime","headerChange"],[3,"locale","isRange","showToday","showNow","hasTimePicker","okDisabled","extraFooter","rangeQuickSelector","clickOk","clickToday",4,"ngIf"],[3,"locale","isRange","showToday","showNow","hasTimePicker","okDisabled","extraFooter","rangeQuickSelector","clickOk","clickToday"],[3,"class","click","mouseenter","mouseleave",4,"ngFor","ngForOf"],[3,"click","mouseenter","mouseleave"],[1,"ant-tag","ant-tag-blue"]],template:function(i,r){if(i&1&&_(0,T2,9,19,"ng-container",0)(1,z2,4,13,"ng-template",null,1,_e)(3,O2,2,18,"ng-template",null,2,_e)(5,R2,1,1,"ng-template",null,3,_e)(7,P2,1,1,"ng-template",null,4,_e),i&2){let s=te(2);h("ngIf",r.isRange)("ngIfElse",s)}},dependencies:[CT,Be,we,yT,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),lv={position:"relative"},fG="datePicker",ps=(()=>{let n=class n{get nzShowTime(){return this.showTime}set nzShowTime(t){this.showTime=typeof t=="object"?t:os(t)}get realOpenState(){return this.isOpenHandledByUser()?!!this.nzOpen:this.overlayOpen}ngAfterViewInit(){this.nzAutoFocus&&this.focus(),this.isRange&&this.platform.isBrowser&&this.nzResizeObserver.observe(this.elementRef).pipe(F(this.destroy$)).subscribe(()=>{this.updateInputWidthAndArrowLeft()}),this.datePickerService.inputPartChange$.pipe(F(this.destroy$)).subscribe(t=>{t&&(this.datePickerService.activeInput=t),this.focus(),this.updateInputWidthAndArrowLeft()}),this.platform.isBrowser&&this.ngZone.runOutsideAngular(()=>Ke(this.elementRef.nativeElement,"mousedown").pipe(F(this.destroy$)).subscribe(t=>{t.target.tagName.toLowerCase()!=="input"&&t.preventDefault()}))}updateInputWidthAndArrowLeft(){this.inputWidth=this.rangePickerInputs?.first?.nativeElement.offsetWidth||0;let t={position:"absolute",width:`${this.inputWidth}px`};this.datePickerService.arrowLeft=this.datePickerService.activeInput==="left"?0:this.inputWidth+this.separatorElement?.nativeElement.offsetWidth||0,this.dir==="rtl"?this.activeBarStyle=ot(V({},t),{right:`${this.datePickerService.arrowLeft}px`}):this.activeBarStyle=ot(V({},t),{left:`${this.datePickerService.arrowLeft}px`}),this.cdr.markForCheck()}getInput(t){if(!this.nzInline)return this.isRange?t==="left"?this.rangePickerInputs?.first.nativeElement:this.rangePickerInputs?.last.nativeElement:this.pickerInput.nativeElement}focus(){let t=this.getInput(this.datePickerService.activeInput);this.document.activeElement!==t&&t?.focus()}onFocus(t,i){t.preventDefault(),i&&this.datePickerService.inputPartChange$.next(i),this.renderClass(!0)}onFocusout(t){t.preventDefault(),this.onTouchedFn(),this.elementRef.nativeElement.contains(t.relatedTarget)||this.checkAndClose(),this.renderClass(!1)}open(){this.nzInline||!this.realOpenState&&!this.nzDisabled&&(this.updateInputWidthAndArrowLeft(),this.overlayOpen=!0,this.nzOnOpenChange.emit(!0),this.focus(),this.cdr.markForCheck())}close(){this.nzInline||this.realOpenState&&(this.overlayOpen=!1,this.nzOnOpenChange.emit(!1))}showClear(){return!this.nzDisabled&&!this.isEmptyValue(this.datePickerService.value)&&this.nzAllowClear}checkAndClose(){if(this.realOpenState)if(this.panel.isAllowed(this.datePickerService.value,!0)){if(Array.isArray(this.datePickerService.value)&&am(this.datePickerService.value)){let t=this.datePickerService.getActiveIndex(),i=this.datePickerService.value[t];this.panel.changeValueFromSelect(i,!0);return}this.updateInputValue(),this.datePickerService.emitValue$.next()}else this.datePickerService.setValue(this.datePickerService.initialValue),this.close()}onClickInputBox(t){t.stopPropagation(),this.focus(),this.isOpenHandledByUser()||this.open()}onOverlayKeydown(t){t.keyCode===27&&this.datePickerService.initValue()}onPositionChange(t){this.currentPositionX=t.connectionPair.originX,this.currentPositionY=t.connectionPair.originY,this.cdr.detectChanges()}onClickClear(t){t.preventDefault(),t.stopPropagation(),this.datePickerService.initValue(!0),this.datePickerService.emitValue$.next()}updateInputValue(){let t=this.datePickerService.value;this.isRange?this.inputValue=t?t.map(i=>this.formatValue(i)):["",""]:this.inputValue=this.formatValue(t),this.cdr.markForCheck()}formatValue(t){return this.dateHelper.format(t&&t.nativeDate,this.nzFormat)}onInputChange(t,i=!1){if(!this.platform.TRIDENT&&this.document.activeElement===this.getInput(this.datePickerService.activeInput)&&!this.realOpenState){this.open();return}let r=this.checkValidDate(t);r&&this.realOpenState&&this.panel.changeValueFromSelect(r,i)}onKeyupEnter(t){this.onInputChange(t.target.value,!0)}checkValidDate(t){let i=new Ln(this.dateHelper.parseDate(t,this.nzFormat));return!i.isValid()||t!==this.dateHelper.format(i.nativeDate,this.nzFormat)?null:i}getPlaceholder(t){return this.isRange?this.nzPlaceHolder[this.datePickerService.getActiveIndex(t)]:this.nzPlaceHolder}isEmptyValue(t){return t===null?!0:this.isRange?!t||!Array.isArray(t)||t.every(i=>!i):!t}isOpenHandledByUser(){return this.nzOpen!==void 0}constructor(t,i,r,s,a,l,c,u,d,p,g,v,y,x,E,z){this.nzConfigService=t,this.datePickerService=i,this.i18n=r,this.cdr=s,this.renderer=a,this.ngZone=l,this.elementRef=c,this.dateHelper=u,this.nzResizeObserver=d,this.platform=p,this.destroy$=g,this.directionality=y,this.noAnimation=x,this.nzFormStatusService=E,this.nzFormNoStatusService=z,this._nzModuleName=fG,this.isRange=!1,this.dir="ltr",this.statusCls={},this.status="",this.hasFeedback=!1,this.panelMode="date",this.isCustomPlaceHolder=!1,this.isCustomFormat=!1,this.showTime=!1,this.isNzDisableFirstChange=!0,this.nzAllowClear=!0,this.nzAutoFocus=!1,this.nzDisabled=!1,this.nzBorderless=!1,this.nzInputReadOnly=!1,this.nzInline=!1,this.nzPlaceHolder="",this.nzPopupStyle=lv,this.nzSize="default",this.nzStatus="",this.nzShowToday=!0,this.nzMode="date",this.nzShowNow=!0,this.nzDefaultPickerValue=null,this.nzSeparator=void 0,this.nzSuffixIcon="calendar",this.nzBackdrop=!1,this.nzId=null,this.nzPlacement="bottomLeft",this.nzShowWeekNumber=!1,this.nzOnPanelChange=new O,this.nzOnCalendarChange=new O,this.nzOnOk=new O,this.nzOnOpenChange=new O,this.inputSize=12,this.prefixCls=hh,this.activeBarStyle={},this.overlayOpen=!1,this.overlayPositions=[...Fm],this.currentPositionX="start",this.currentPositionY="bottom",this.onChangeFn=()=>{},this.onTouchedFn=()=>{},this.document=v,this.origin=new dr(this.elementRef)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),zl(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:Mn(!1)),We(([{status:t,hasFeedback:i},r])=>({status:r?"":t,hasFeedback:i})),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.nzLocale||this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>this.setLocale()),this.datePickerService.isRange=this.isRange,this.datePickerService.initValue(!0),this.datePickerService.emitValue$.pipe(F(this.destroy$)).subscribe(()=>{let t=this.showTime?"second":"day",i=this.datePickerService.value,r=this.datePickerService.initialValue;if(!this.isRange&&i?.isSame(r?.nativeDate,t))return this.onTouchedFn(),this.close();if(this.isRange){let[s,a]=r,[l,c]=i;if(s?.isSame(l?.nativeDate,t)&&a?.isSame(c?.nativeDate,t))return this.onTouchedFn(),this.close()}if(this.datePickerService.initialValue=Vl(i),this.isRange){let s=i;s.length?this.onChangeFn([s[0]?.nativeDate??null,s[1]?.nativeDate??null]):this.onChangeFn([])}else i?this.onChangeFn(i.nativeDate):this.onChangeFn(null);this.onTouchedFn(),this.close()}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.inputValue=this.isRange?["",""]:"",this.setModeAndFormat(),this.datePickerService.valueChange$.pipe(F(this.destroy$)).subscribe(()=>{this.updateInputValue()})}ngOnChanges(t){let{nzStatus:i,nzPlacement:r}=t;t.nzPopupStyle&&(this.nzPopupStyle=this.nzPopupStyle?V(V({},this.nzPopupStyle),lv):lv),t.nzPlaceHolder?.currentValue&&(this.isCustomPlaceHolder=!0),t.nzFormat?.currentValue&&(this.isCustomFormat=!0),t.nzLocale&&this.setDefaultPlaceHolder(),t.nzRenderExtraFooter&&(this.extraFooter=Ds(this.nzRenderExtraFooter)),t.nzMode&&(this.setDefaultPlaceHolder(),this.setModeAndFormat()),i&&this.setStatusStyles(this.nzStatus,this.hasFeedback),r&&this.setPlacement(this.nzPlacement)}setModeAndFormat(){let t={year:"yyyy",month:"yyyy-MM",week:"YYYY-ww",date:this.nzShowTime?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd"};this.nzMode||(this.nzMode="date"),this.panelMode=this.isRange?[this.nzMode,this.nzMode]:this.nzMode,this.isCustomFormat||(this.nzFormat=t[this.nzMode]),this.inputSize=Math.max(10,this.nzFormat.length)+2,this.updateInputValue()}onOpenChange(t){this.nzOnOpenChange.emit(t)}writeValue(t){this.setValue(t),this.cdr.markForCheck()}registerOnChange(t){this.onChangeFn=t}registerOnTouched(t){this.onTouchedFn=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.cdr.markForCheck(),this.isNzDisableFirstChange=!1}setLocale(){this.nzLocale=this.i18n.getLocaleData("DatePicker",{}),this.setDefaultPlaceHolder(),this.cdr.markForCheck()}setDefaultPlaceHolder(){if(!this.isCustomPlaceHolder&&this.nzLocale){let t={year:this.getPropertyOfLocale("yearPlaceholder"),month:this.getPropertyOfLocale("monthPlaceholder"),week:this.getPropertyOfLocale("weekPlaceholder"),date:this.getPropertyOfLocale("placeholder")},i={year:this.getPropertyOfLocale("rangeYearPlaceholder"),month:this.getPropertyOfLocale("rangeMonthPlaceholder"),week:this.getPropertyOfLocale("rangeWeekPlaceholder"),date:this.getPropertyOfLocale("rangePlaceholder")};this.nzPlaceHolder=this.isRange?i[this.nzMode]:t[this.nzMode]}}getPropertyOfLocale(t){return this.nzLocale.lang[t]||this.i18n.getLocaleData(`DatePicker.lang.${t}`)}setValue(t){let i=this.datePickerService.makeValue(t);this.datePickerService.setValue(i),this.datePickerService.initialValue=Vl(i),this.cdr.detectChanges()}renderClass(t){t?this.renderer.addClass(this.elementRef.nativeElement,"ant-picker-focused"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-picker-focused")}onPanelModeChange(t){this.nzOnPanelChange.emit(t)}onCalendarChange(t){if(this.isRange&&Array.isArray(t)){let i=t.filter(r=>r instanceof Ln).map(r=>r.nativeDate);this.nzOnCalendarChange.emit(i)}}onResultOk(){if(this.isRange){let t=this.datePickerService.value;t.length?this.nzOnOk.emit([t[0]?.nativeDate||null,t[1]?.nativeDate||null]):this.nzOnOk.emit([])}else this.datePickerService.value?this.nzOnOk.emit(this.datePickerService.value.nativeDate):this.nzOnOk.emit(null)}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.elementRef.nativeElement,r):this.renderer.removeClass(this.elementRef.nativeElement,r)})}setPlacement(t){let i=ql[t];this.overlayPositions=[i,...Fm],this.currentPositionX=i.originX,this.currentPositionY=i.originY}};n.\u0275fac=function(i){return new(i||n)(w(st),w(cv),w(Di),w(fe),w(He),w($e),w(de),w(no),w(ds),w(gn),w(Pt),w(gi),w(Me,8),w(ft,9),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-date-picker"],["nz-week-picker"],["nz-month-picker"],["nz-year-picker"],["nz-range-picker"]],viewQuery:function(i,r){if(i&1&&(xe(oi,5),xe(uv,5),xe(M2,5),xe(F2,5),xe(A2,5)),i&2){let s;ce(s=ue())&&(r.cdkConnectedOverlay=s.first),ce(s=ue())&&(r.panel=s.first),ce(s=ue())&&(r.separatorElement=s.first),ce(s=ue())&&(r.pickerInput=s.first),ce(s=ue())&&(r.rangePickerInputs=s)}},hostVars:16,hostBindings:function(i,r){i&1&&A("click",function(a){return r.onClickInputBox(a)}),i&2&&k("ant-picker",!0)("ant-picker-range",r.isRange)("ant-picker-large",r.nzSize==="large")("ant-picker-small",r.nzSize==="small")("ant-picker-disabled",r.nzDisabled)("ant-picker-rtl",r.dir==="rtl")("ant-picker-borderless",r.nzBorderless)("ant-picker-inline",r.nzInline)},inputs:{nzAllowClear:"nzAllowClear",nzAutoFocus:"nzAutoFocus",nzDisabled:"nzDisabled",nzBorderless:"nzBorderless",nzInputReadOnly:"nzInputReadOnly",nzInline:"nzInline",nzOpen:"nzOpen",nzDisabledDate:"nzDisabledDate",nzLocale:"nzLocale",nzPlaceHolder:"nzPlaceHolder",nzPopupStyle:"nzPopupStyle",nzDropdownClassName:"nzDropdownClassName",nzSize:"nzSize",nzStatus:"nzStatus",nzFormat:"nzFormat",nzDateRender:"nzDateRender",nzDisabledTime:"nzDisabledTime",nzRenderExtraFooter:"nzRenderExtraFooter",nzShowToday:"nzShowToday",nzMode:"nzMode",nzShowNow:"nzShowNow",nzRanges:"nzRanges",nzDefaultPickerValue:"nzDefaultPickerValue",nzSeparator:"nzSeparator",nzSuffixIcon:"nzSuffixIcon",nzBackdrop:"nzBackdrop",nzId:"nzId",nzPlacement:"nzPlacement",nzShowWeekNumber:"nzShowWeekNumber",nzShowTime:"nzShowTime"},outputs:{nzOnPanelChange:"nzOnPanelChange",nzOnCalendarChange:"nzOnCalendarChange",nzOnOk:"nzOnOk",nzOnOpenChange:"nzOnOpenChange"},exportAs:["nzDatePicker"],standalone:!0,features:[Ve([Pt,cv,{provide:zn,multi:!0,useExisting:pn(()=>n)}]),oe,K],decls:8,vars:7,consts:[[4,"ngIf","ngIfElse"],["tplRangeInput",""],["tplRightRest",""],["inlineMode",""],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayTransformOriginOn","positionChange","detach","overlayKeydown"],[3,"class",4,"ngIf"],[4,"ngIf"],["autocomplete","off",3,"disabled","readOnly","ngModel","placeholder","size","ngModelChange","focus","focusout","keyup.enter"],["pickerInput",""],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["separatorElement",""],[4,"nzStringTemplateOutlet"],["defaultSeparator",""],["nz-icon","","nzType","swap-right","nzTheme","outline"],["autocomplete","off",3,"disabled","readOnly","size","ngModel","placeholder","click","focusout","focus","keyup.enter","ngModelChange"],["rangePickerInput",""],[3,"ngStyle"],[3,"class","click",4,"ngIf"],[3,"status",4,"ngIf"],[3,"click"],["nz-icon","","nzType","close-circle","nzTheme","fill"],["nz-icon","",3,"nzType"],[3,"status"],[3,"isRange","inline","defaultPickerValue","showWeek","panelMode","locale","showToday","showNow","showTime","dateRender","disabledDate","disabledTime","extraFooter","ranges","dir","panelModeChange","calendarChange","resultOk"],[1,"ant-picker-wrapper",2,"position","relative",3,"nzNoAnimation"]],template:function(i,r){if(i&1&&(_(0,W2,3,2,"ng-container",0)(1,U2,2,6,"ng-template",null,1,_e)(3,Q2,5,10,"ng-template",null,2,_e)(5,X2,2,36,"ng-template",null,3,_e)(7,J2,2,3,"ng-template",4),A("positionChange",function(a){return r.onPositionChange(a)})("detach",function(){return r.close()})("overlayKeydown",function(a){return r.onOverlayKeydown(a)})),i&2){let s=te(6);h("ngIf",!r.nzInline)("ngIfElse",s),f(7),h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayOpen",r.realOpenState)("cdkConnectedOverlayPositions",r.overlayPositions)("cdkConnectedOverlayTransformOriginOn",".ant-picker-wrapper")}},dependencies:[we,nn,Ii,Kt,Rt,Be,Ye,Ue,Ge,Fe,Zt,ro,mr,uv,oi,vr,Nr,ft],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return N([W()],o.prototype,"nzAllowClear",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzInputReadOnly",void 0),N([W()],o.prototype,"nzInline",void 0),N([W()],o.prototype,"nzOpen",void 0),N([W()],o.prototype,"nzShowToday",void 0),N([W()],o.prototype,"nzShowNow",void 0),N([De()],o.prototype,"nzSeparator",void 0),N([De()],o.prototype,"nzSuffixIcon",void 0),N([De()],o.prototype,"nzBackdrop",void 0),N([W()],o.prototype,"nzShowWeekNumber",void 0),o})(),_T=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.nzMode="month"}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-month-picker"]],exportAs:["nzMonthPicker"],standalone:!0});let o=n;return o})(),vh=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.isRange=!0}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-range-picker"]],exportAs:["nzRangePicker"],standalone:!0});let o=n;return o})(),ST=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.nzMode="week"}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-week-picker"]],exportAs:["nzWeekPicker"],standalone:!0});let o=n;return o})(),wT=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.nzMode="year"}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-year-picker"]],exportAs:["nzYearPicker"],standalone:!0});let o=n;return o})(),Hs=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ps,yT,CT,uv]});let o=n;return o})();var gG=["okBtn"],mG=["cancelBtn"];function vG(o,n){o&1&&(C(0,"div",15),R(1,"span",16),S())}function yG(o,n){if(o&1&&(H(0),R(1,"span",18),B()),o&2){let e=n.$implicit;f(),h("nzType",e||"exclamation-circle")}}function CG(o,n){if(o&1&&(H(0),_(1,yG,2,1,"ng-container",8),C(2,"div",17),Y(3),S(),B()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzIcon),f(2),ye(e.nzTitle)}}function _G(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzCancelText)}}function SG(o,n){o&1&&(H(0),Y(1),Xn(2,"nzI18n"),B()),o&2&&(f(),ye(Vi(2,1,"Modal.cancelText")))}function wG(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzOkText)}}function bG(o,n){o&1&&(H(0),Y(1),Xn(2,"nzI18n"),B()),o&2&&(f(),ye(Vi(2,1,"Modal.okText")))}function TG(o,n){if(o&1){let e=Q();C(0,"div",2)(1,"div",3),_(2,vG,2,0,"div",4),C(3,"div",5)(4,"div")(5,"div",6)(6,"div",7),_(7,CG,4,2,"ng-container",8),S(),C(8,"div",9)(9,"button",10,11),A("click",function(){I(e);let i=m();return P(i.onCancel())}),_(11,_G,2,1,"ng-container",12)(12,SG,3,3,"ng-container",12),S(),C(13,"button",13,14),A("click",function(){I(e);let i=m();return P(i.onConfirm())}),_(15,wG,2,1,"ng-container",12)(16,bG,3,3,"ng-container",12),S()()()()()()()}if(o&2){let e=m();k("ant-popover-rtl",e.dir==="rtl"),h("cdkTrapFocusAutoCapture",e.nzAutoFocus!==null)("ngClass",e._classMap)("ngStyle",e.nzOverlayStyle)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),f(2),h("ngIf",e.nzPopconfirmShowArrow),f(5),h("nzStringTemplateOutlet",e.nzTitle),f(2),h("nzSize","small"),ze("cdkFocusInitial",e.nzAutoFocus==="cancel"||null),f(2),h("ngIf",e.nzCancelText),f(),h("ngIf",!e.nzCancelText),f(),h("nzSize","small")("nzType",e.nzOkType!=="danger"?e.nzOkType:"primary")("nzDanger",e.nzOkDanger||e.nzOkType==="danger")("nzLoading",e.confirmLoading),ze("cdkFocusInitial",e.nzAutoFocus==="ok"||null),f(2),h("ngIf",e.nzOkText),f(),h("ngIf",!e.nzOkText)}}var EG="popconfirm",bT=(()=>{let n=class n extends Su{getProxyPropertyMap(){return V({nzOkText:["nzOkText",()=>this.nzOkText],nzOkType:["nzOkType",()=>this.nzOkType],nzOkDanger:["nzOkDanger",()=>this.nzOkDanger],nzCancelText:["nzCancelText",()=>this.nzCancelText],nzBeforeConfirm:["nzBeforeConfirm",()=>this.nzBeforeConfirm],nzCondition:["nzCondition",()=>this.nzCondition],nzIcon:["nzIcon",()=>this.nzIcon],nzPopconfirmShowArrow:["nzPopconfirmShowArrow",()=>this.nzPopconfirmShowArrow],nzPopconfirmBackdrop:["nzBackdrop",()=>this.nzPopconfirmBackdrop],nzAutoFocus:["nzAutoFocus",()=>this.nzAutofocus]},super.getProxyPropertyMap())}constructor(t,i,r,s,a){super(t,i,r,s,a),this._nzModuleName=EG,this.trigger="click",this.placement="top",this.nzCondition=!1,this.nzPopconfirmShowArrow=!0,this.nzPopconfirmBackdrop=!1,this.nzAutofocus=null,this.visibleChange=new O,this.nzOnCancel=new O,this.nzOnConfirm=new O,this.componentRef=this.hostView.createComponent(TT)}createComponent(){super.createComponent(),this.component.nzOnCancel.pipe(F(this.destroy$)).subscribe(()=>{this.nzOnCancel.emit()}),this.component.nzOnConfirm.pipe(F(this.destroy$)).subscribe(()=>{this.nzOnConfirm.emit()})}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft,9),w(st))},n.\u0275dir=Se({type:n,selectors:[["","nz-popconfirm",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-popover-open",r.visible)},inputs:{arrowPointAtCenter:[le.None,"nzPopconfirmArrowPointAtCenter","arrowPointAtCenter"],title:[le.None,"nzPopconfirmTitle","title"],directiveTitle:[le.None,"nz-popconfirm","directiveTitle"],trigger:[le.None,"nzPopconfirmTrigger","trigger"],placement:[le.None,"nzPopconfirmPlacement","placement"],origin:[le.None,"nzPopconfirmOrigin","origin"],mouseEnterDelay:[le.None,"nzPopconfirmMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[le.None,"nzPopconfirmMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[le.None,"nzPopconfirmOverlayClassName","overlayClassName"],overlayStyle:[le.None,"nzPopconfirmOverlayStyle","overlayStyle"],visible:[le.None,"nzPopconfirmVisible","visible"],nzOkText:"nzOkText",nzOkType:"nzOkType",nzOkDanger:"nzOkDanger",nzCancelText:"nzCancelText",nzBeforeConfirm:"nzBeforeConfirm",nzIcon:"nzIcon",nzCondition:"nzCondition",nzPopconfirmShowArrow:"nzPopconfirmShowArrow",nzPopconfirmBackdrop:"nzPopconfirmBackdrop",nzAutofocus:"nzAutofocus"},outputs:{visibleChange:"nzPopconfirmVisibleChange",nzOnCancel:"nzOnCancel",nzOnConfirm:"nzOnConfirm"},exportAs:["nzPopconfirm"],standalone:!0,features:[Xe]});let o=n;return N([W()],o.prototype,"arrowPointAtCenter",void 0),N([W()],o.prototype,"nzOkDanger",void 0),N([W()],o.prototype,"nzCondition",void 0),N([W()],o.prototype,"nzPopconfirmShowArrow",void 0),N([De()],o.prototype,"nzPopconfirmBackdrop",void 0),N([De()],o.prototype,"nzAutofocus",void 0),o})(),TT=(()=>{let n=class n extends Ql{constructor(t,i,r,s,a){super(t,r,a),this.elementRef=i,this.nzCondition=!1,this.nzPopconfirmShowArrow=!0,this.nzOkType="primary",this.nzOkDanger=!1,this.nzAutoFocus=null,this.nzBeforeConfirm=null,this.nzOnCancel=new J,this.nzOnConfirm=new J,this._trigger="click",this.elementFocusedBeforeModalWasOpened=null,this._prefix="ant-popover",this.confirmLoading=!1,this.document=s}ngOnDestroy(){super.ngOnDestroy(),this.nzOnCancel.complete(),this.nzOnConfirm.complete()}show(){this.nzCondition?this.onConfirm():(this.capturePreviouslyFocusedElement(),super.show())}hide(){super.hide(),this.restoreFocus()}handleConfirm(){this.nzOnConfirm.next(),super.hide()}onCancel(){this.nzOnCancel.next(),super.hide()}onConfirm(){if(this.nzBeforeConfirm){let t=mp(this.nzBeforeConfirm()).pipe(xl());this.confirmLoading=!0,t.pipe(El(()=>{this.confirmLoading=!1,this.cdr.markForCheck()}),F(this.nzVisibleChange),F(this.destroy$)).subscribe(i=>{i&&this.handleConfirm()})}else this.handleConfirm()}capturePreviouslyFocusedElement(){this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement)}restoreFocus(){let t=this.elementFocusedBeforeModalWasOpened;if(t&&typeof t.focus=="function"){let i=this.document.activeElement,r=this.elementRef.nativeElement;(!i||i===this.document.body||i===r||r.contains(i))&&t.focus()}}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(de),w(Me,8),w(gi,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-popconfirm"]],viewQuery:function(i,r){if(i&1&&(xe(gG,5,de),xe(mG,5,de)),i&2){let s;ce(s=ue())&&(r.okBtn=s),ce(s=ue())&&(r.cancelBtn=s)}},exportAs:["nzPopconfirmComponent"],standalone:!0,features:[Xe,K],decls:2,vars:6,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],["cdkTrapFocus","",1,"ant-popover",3,"cdkTrapFocusAutoCapture","ngClass","ngStyle","nzNoAnimation"],[1,"ant-popover-content"],["class","ant-popover-arrow",4,"ngIf"],[1,"ant-popover-inner"],[1,"ant-popover-inner-content"],[1,"ant-popover-message"],[4,"nzStringTemplateOutlet"],[1,"ant-popover-buttons"],["nz-button","",3,"nzSize","click"],["cancelBtn",""],[4,"ngIf"],["nz-button","",3,"nzSize","nzType","nzDanger","nzLoading","click"],["okBtn",""],[1,"ant-popover-arrow"],[1,"ant-popover-arrow-content"],[1,"ant-popover-message-title"],["nz-icon","","nzTheme","fill",3,"nzType"]],template:function(i,r){i&1&&(_(0,TG,17,21,"ng-template",0,1,_e),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.hide()})("positionChange",function(a){return r.onPositionChange(a)})),i&2&&h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayOpen",r._visible)("cdkConnectedOverlayPush",r.cdkConnectedOverlayPush)("nzArrowPointAtCenter",r.nzArrowPointAtCenter)},dependencies:[Fr,oi,vr,Nr,Cp,tw,St,Zt,ft,we,Ye,Ue,Ge,Fe,Hi,eo,yi,hr,bp,wp],encapsulation:2,data:{animation:[Is]},changeDetection:0});let o=n;return o})(),rc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[TT]});let o=n;return o})();function xG(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzText)}}function zG(o,n){if(o&1&&(C(0,"span",1),_(1,xG,2,1,"ng-container",2),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzText)}}var pv=(()=>{let n=class n{constructor(){this.nzType="horizontal",this.nzOrientation="center",this.nzDashed=!1,this.nzPlain=!1}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-divider"]],hostAttrs:[1,"ant-divider"],hostVars:16,hostBindings:function(i,r){i&2&&k("ant-divider-horizontal",r.nzType==="horizontal")("ant-divider-vertical",r.nzType==="vertical")("ant-divider-with-text",r.nzText)("ant-divider-plain",r.nzPlain)("ant-divider-with-text-left",r.nzText&&r.nzOrientation==="left")("ant-divider-with-text-right",r.nzText&&r.nzOrientation==="right")("ant-divider-with-text-center",r.nzText&&r.nzOrientation==="center")("ant-divider-dashed",r.nzDashed)},inputs:{nzText:"nzText",nzType:"nzType",nzOrientation:"nzOrientation",nzDashed:"nzDashed",nzPlain:"nzPlain"},exportAs:["nzDivider"],standalone:!0,features:[K],decls:1,vars:1,consts:[["class","ant-divider-inner-text",4,"ngIf"],[1,"ant-divider-inner-text"],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,zG,2,1,"span",0),i&2&&h("ngIf",r.nzText)},dependencies:[we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDashed",void 0),N([W()],o.prototype,"nzPlain",void 0),o})(),oc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[pv]});let o=n;return o})();function zT(o){if(!o)return!1;for(var n=0,e=o.length;n=194&&o[n]<=223)if(o[n+1]>>6===2){n+=2;continue}else return!1;if((o[n]===224&&o[n+1]>=160&&o[n+1]<=191||o[n]===237&&o[n+1]>=128&&o[n+1]<=159)&&o[n+2]>>6===2){n+=3;continue}if((o[n]>=225&&o[n]<=236||o[n]>=238&&o[n]<=239)&&o[n+1]>>6===2&&o[n+2]>>6===2){n+=3;continue}if((o[n]===240&&o[n+1]>=144&&o[n+1]<=191||o[n]>=241&&o[n]<=243&&o[n+1]>>6===2||o[n]===244&&o[n+1]>=128&&o[n+1]<=143)&&o[n+2]>>6===2&&o[n+3]>>6===2){n+=4;continue}return!1}return!0}function OG(o,n){return(e,t,i)=>{let r=i.value;return i.value=function(...s){let l=this[n?.ngZoneName||"ngZone"];if(!l)return r.call(this,...s);let c;return l[o](()=>{c=r.call(this,...s)}),c},i}}function hv(o){return OG("runOutsideAngular",o)}var OT=(()=>{let n=class n{constructor(t){this.http=ae(NS),this.lazy=ae(HS),this.ngZone=ae($e),this.cog=t.merge("xlsx",{url:"https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js",modules:["https://cdn.jsdelivr.net/npm/xlsx/dist/cpexcel.js"]})}init(){return typeof XLSX<"u"?Promise.resolve([]):this.lazy.load([this.cog.url].concat(this.cog.modules))}read(t){let{read:i,utils:{sheet_to_json:r}}=XLSX,s={},a=new Uint8Array(t),l="array";if(!zT(a))try{t=cptable.utils.decode(936,a),l="string"}catch{}let c=i(t,{type:l});return c.SheetNames.forEach(u=>{let d=c.Sheets[u];s[u]=r(d,{header:1})}),s}import(t){return new Promise((i,r)=>{let s=a=>this.ngZone.run(()=>i(this.read(a)));this.init().then(()=>{if(typeof t=="string"){this.http.request("GET",t,{responseType:"arraybuffer"}).subscribe({next:l=>s(new Uint8Array(l)),error:l=>r(l)});return}let a=new FileReader;a.onload=l=>s(l.target.result),a.onerror=l=>r(l),a.readAsArrayBuffer(t)}).catch(()=>r("Unable to load xlsx.js"))})}export(t){return xo(this,null,function*(){return new Promise((i,r)=>{this.init().then(()=>{t=V({format:"xlsx"},t);let{writeFile:s,utils:{book_new:a,aoa_to_sheet:l,book_append_sheet:c}}=XLSX,u=a();Array.isArray(t.sheets)?t.sheets.forEach((p,g)=>{let v=l(p.data);c(u,v,p.name||`Sheet${g+1}`)}):(u.SheetNames=Object.keys(t.sheets),u.Sheets=t.sheets),t.callback&&t.callback(u);let d=t.filename||`export.${t.format}`;s(u,d,V({bookType:t.format,bookSST:!1,type:"array"},t.opts)),i({filename:d,wb:u})}).catch(s=>r(s))})})}numberToSchema(t){let r="";do--t,r=String.fromCharCode(65+t%26)+r,t=t/26>>0;while(t>0);return r}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return N([hv()],o.prototype,"read",null),N([hv()],o.prototype,"export",null),o})();var fv=class{constructor(n){this.dir=n}get $implicit(){return this.dir.let}get let(){return this.dir.let}},DT=(()=>{let n=class n{constructor(t,i){t.createEmbeddedView(i,new fv(this))}static ngTemplateContextGuard(t,i){return!0}};n.\u0275fac=function(i){return new(i||n)(w(Tn),w(En))},n.\u0275dir=Se({type:n,selectors:[["","let",""]],inputs:{let:"let"},standalone:!0});let o=n;return o})();var RT=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var RG=["*"];function IT(o){return tm(o)?o.touches[0]||o.changedTouches[0]:o}var gv=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.listeners=new Map,this.handleMouseDownOutsideAngular$=new J,this.documentMouseUpOutsideAngular$=new J,this.documentMouseMoveOutsideAngular$=new J,this.mouseEnteredOutsideAngular$=new J,this.document=i}startResizing(t){let i=tm(t);this.clearListeners();let r=i?"touchmove":"mousemove",s=i?"touchend":"mouseup",a=c=>{this.documentMouseMoveOutsideAngular$.next(c)},l=c=>{this.documentMouseUpOutsideAngular$.next(c),this.clearListeners()};this.listeners.set(r,a),this.listeners.set(s,l),this.ngZone.runOutsideAngular(()=>{this.listeners.forEach((c,u)=>{this.document.addEventListener(u,c)})})}clearListeners(){this.listeners.forEach((t,i)=>{this.document.removeEventListener(i,t)}),this.listeners.clear()}ngOnDestroy(){this.handleMouseDownOutsideAngular$.complete(),this.documentMouseUpOutsideAngular$.complete(),this.documentMouseMoveOutsideAngular$.complete(),this.mouseEnteredOutsideAngular$.complete(),this.clearListeners()}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(gi))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),MT=(()=>{let n=class n{constructor(t,i,r,s,a,l){this.elementRef=t,this.renderer=i,this.nzResizableService=r,this.platform=s,this.ngZone=a,this.destroy$=l,this.nzBounds="parent",this.nzMinHeight=40,this.nzMinWidth=40,this.nzGridColumnCount=-1,this.nzMaxColumn=-1,this.nzMinColumn=-1,this.nzLockAspectRatio=!1,this.nzPreview=!1,this.nzDisabled=!1,this.nzResize=new O,this.nzResizeEnd=new O,this.nzResizeStart=new O,this.resizing=!1,this.currentHandleEvent=null,this.ghostElement=null,this.sizeCache=null,this.nzResizableService.handleMouseDownOutsideAngular$.pipe(F(this.destroy$)).subscribe(c=>{this.nzDisabled||(this.resizing=!0,this.nzResizableService.startResizing(c.mouseEvent),this.currentHandleEvent=c,this.nzResizeStart.observers.length&&this.ngZone.run(()=>this.nzResizeStart.emit({mouseEvent:c.mouseEvent,direction:c.direction})),this.elRect=this.el.getBoundingClientRect())}),this.nzResizableService.documentMouseUpOutsideAngular$.pipe(F(this.destroy$),Qe(Boolean)).subscribe(c=>{this.resizing&&(this.resizing=!1,this.nzResizableService.documentMouseUpOutsideAngular$.next(null),this.endResize(c))}),this.nzResizableService.documentMouseMoveOutsideAngular$.pipe(F(this.destroy$)).subscribe(c=>{this.resizing&&this.resize(c)})}setPosition(){let t=getComputedStyle(this.el).position;(t==="static"||!t)&&this.renderer.setStyle(this.el,"position","relative")}calcSize(t,i,r){let s,a,l,c,u=0,d=0,p=this.nzMinWidth,g=1/0,v=1/0;if(this.nzBounds==="parent"){let y=this.renderer.parentNode(this.el);if(y instanceof HTMLElement){let x=y.getBoundingClientRect();g=x.width,v=x.height}}else if(this.nzBounds==="window")typeof window<"u"&&(g=window.innerWidth,v=window.innerHeight);else if(this.nzBounds&&this.nzBounds.nativeElement&&this.nzBounds.nativeElement instanceof HTMLElement){let y=this.nzBounds.nativeElement.getBoundingClientRect();g=y.width,v=y.height}return l=im(this.nzMaxWidth,g),c=im(this.nzMaxHeight,v),this.nzGridColumnCount!==-1&&(d=l/this.nzGridColumnCount,p=this.nzMinColumn!==-1?d*this.nzMinColumn:p,l=this.nzMaxColumn!==-1?d*this.nzMaxColumn:l),r!==-1?/(left|right)/i.test(this.currentHandleEvent.direction)?(s=Math.min(Math.max(t,p),l),a=Math.min(Math.max(s/r,this.nzMinHeight),c),(a>=c||a<=this.nzMinHeight)&&(s=Math.min(Math.max(a*r,p),l))):(a=Math.min(Math.max(i,this.nzMinHeight),c),s=Math.min(Math.max(a*r,p),l),(s>=l||s<=p)&&(a=Math.min(Math.max(s/r,this.nzMinHeight),c))):(s=Math.min(Math.max(t,p),l),a=Math.min(Math.max(i,this.nzMinHeight),c)),this.nzGridColumnCount!==-1&&(u=Math.round(s/d),s=u*d),{col:u,width:s,height:a}}resize(t){let i=this.elRect,r=IT(t),s=IT(this.currentHandleEvent.mouseEvent),a=i.width,l=i.height,c=this.nzLockAspectRatio?a/l:-1;switch(this.currentHandleEvent.direction){case"bottomRight":a=r.clientX-i.left,l=r.clientY-i.top;break;case"bottomLeft":a=i.width+s.clientX-r.clientX,l=r.clientY-i.top;break;case"topRight":a=r.clientX-i.left,l=i.height+s.clientY-r.clientY;break;case"topLeft":a=i.width+s.clientX-r.clientX,l=i.height+s.clientY-r.clientY;break;case"top":l=i.height+s.clientY-r.clientY;break;case"right":a=r.clientX-i.left;break;case"bottom":l=r.clientY-i.top;break;case"left":a=i.width+s.clientX-r.clientX}let u=this.calcSize(a,l,c);this.sizeCache=V({},u),this.nzResize.observers.length&&this.ngZone.run(()=>{this.nzResize.emit(ot(V({},u),{mouseEvent:t,direction:this.currentHandleEvent.direction}))}),this.nzPreview&&this.previewResize(u)}endResize(t){this.removeGhostElement();let i=this.sizeCache?V({},this.sizeCache):{width:this.elRect.width,height:this.elRect.height};this.nzResizeEnd.observers.length&&this.ngZone.run(()=>{this.nzResizeEnd.emit(ot(V({},i),{mouseEvent:t,direction:this.currentHandleEvent.direction}))}),this.sizeCache=null,this.currentHandleEvent=null}previewResize({width:t,height:i}){this.createGhostElement(),this.renderer.setStyle(this.ghostElement,"width",`${t}px`),this.renderer.setStyle(this.ghostElement,"height",`${i}px`)}createGhostElement(){this.ghostElement||(this.ghostElement=this.renderer.createElement("div"),this.renderer.setAttribute(this.ghostElement,"class","nz-resizable-preview")),this.renderer.appendChild(this.el,this.ghostElement)}removeGhostElement(){this.ghostElement&&this.renderer.removeChild(this.el,this.ghostElement)}ngAfterViewInit(){this.platform.isBrowser&&(this.el=this.elementRef.nativeElement,this.setPosition(),this.ngZone.runOutsideAngular(()=>{Ke(this.el,"mouseenter").pipe(F(this.destroy$)).subscribe(()=>{this.nzResizableService.mouseEnteredOutsideAngular$.next(!0)}),Ke(this.el,"mouseleave").pipe(F(this.destroy$)).subscribe(()=>{this.nzResizableService.mouseEnteredOutsideAngular$.next(!1)})}))}ngOnDestroy(){this.ghostElement=null,this.sizeCache=null}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(gv),w(gn),w($e),w(Pt))},n.\u0275dir=Se({type:n,selectors:[["","nz-resizable",""]],hostAttrs:[1,"nz-resizable"],hostVars:4,hostBindings:function(i,r){i&2&&k("nz-resizable-resizing",r.resizing)("nz-resizable-disabled",r.nzDisabled)},inputs:{nzBounds:"nzBounds",nzMaxHeight:"nzMaxHeight",nzMaxWidth:"nzMaxWidth",nzMinHeight:"nzMinHeight",nzMinWidth:"nzMinWidth",nzGridColumnCount:"nzGridColumnCount",nzMaxColumn:"nzMaxColumn",nzMinColumn:"nzMinColumn",nzLockAspectRatio:"nzLockAspectRatio",nzPreview:"nzPreview",nzDisabled:"nzDisabled"},outputs:{nzResize:"nzResize",nzResizeEnd:"nzResizeEnd",nzResizeStart:"nzResizeStart"},exportAs:["nzResizable"],standalone:!0,features:[Ve([gv,Pt])]});let o=n;return N([W()],o.prototype,"nzLockAspectRatio",void 0),N([W()],o.prototype,"nzPreview",void 0),N([W()],o.prototype,"nzDisabled",void 0),o})(),mv=class{constructor(n,e){this.direction=n,this.mouseEvent=e}},PT=BS({passive:!0}),FT=(()=>{let n=class n{constructor(t,i,r,s,a){this.ngZone=t,this.nzResizableService=i,this.renderer=r,this.host=s,this.destroy$=a,this.nzDirection="bottomRight",this.nzCursorType="window",this.nzMouseDown=new O}ngOnInit(){this.nzResizableService.mouseEnteredOutsideAngular$.pipe(F(this.destroy$)).subscribe(t=>{t?this.renderer.addClass(this.host.nativeElement,"nz-resizable-handle-box-hover"):this.renderer.removeClass(this.host.nativeElement,"nz-resizable-handle-box-hover")}),this.ngZone.runOutsideAngular(()=>{_t(Ke(this.host.nativeElement,"mousedown",PT),Ke(this.host.nativeElement,"touchstart",PT)).pipe(F(this.destroy$)).subscribe(t=>{this.nzResizableService.handleMouseDownOutsideAngular$.next(new mv(this.nzDirection,t))})})}onPointerDown(t){t.target.setPointerCapture(t.pointerId)}onPointerUp(t){t.target.releasePointerCapture(t.pointerId)}};n.\u0275fac=function(i){return new(i||n)(w($e),w(gv),w(He),w(de),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-resize-handle"],["","nz-resize-handle",""]],hostAttrs:[1,"nz-resizable-handle"],hostVars:20,hostBindings:function(i,r){i&1&&A("pointerdown",function(a){return r.onPointerDown(a)})("pointerup",function(a){return r.onPointerUp(a)}),i&2&&k("nz-resizable-handle-top",r.nzDirection==="top")("nz-resizable-handle-right",r.nzDirection==="right")("nz-resizable-handle-bottom",r.nzDirection==="bottom")("nz-resizable-handle-left",r.nzDirection==="left")("nz-resizable-handle-topRight",r.nzDirection==="topRight")("nz-resizable-handle-bottomRight",r.nzDirection==="bottomRight")("nz-resizable-handle-bottomLeft",r.nzDirection==="bottomLeft")("nz-resizable-handle-topLeft",r.nzDirection==="topLeft")("nz-resizable-handle-cursor-type-grid",r.nzCursorType==="grid")("nz-resizable-handle-cursor-type-window",r.nzCursorType==="window")},inputs:{nzDirection:"nzDirection",nzCursorType:"nzCursorType"},outputs:{nzMouseDown:"nzMouseDown"},exportAs:["nzResizeHandle"],standalone:!0,features:[Ve([Pt]),K],ngContentSelectors:RG,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})();var AT=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();function MG(o,n){if(o&1){let e=Q();C(0,"div",5)(1,"input",6),A("ngModelChange",function(i){I(e);let r=m();return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.n.emit(i))})("keyup.enter",function(){I(e);let i=m();return P(i.confirm())}),S()()}if(o&2){let e=m();f(),h("ngModel",e.f.menus[0].value),ze("placeholder",e.f.placeholder)}}function FG(o,n){if(o&1){let e=Q();C(0,"div",7)(1,"nz-input-number",8),A("ngModelChange",function(i){I(e);let r=m();return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.n.emit(i))}),S()()}if(o&2){let e=m();f(),h("ngModel",e.f.menus[0].value)("nzMin",e.f.number.min)("nzMax",e.f.number.max)("nzStep",e.f.number.step)("nzPrecision",e.f.number.precision)("nzPlaceHolder",e.f.placeholder)}}function AG(o,n){if(o&1){let e=Q();C(0,"nz-range-picker",11),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m(2);return P(r.n.emit(i))}),S()}if(o&2){let e=m(2);h("nzMode",e.f.date.mode)("ngModel",e.f.menus[0].value)("nzShowNow",e.f.date.showNow)("nzShowToday",e.f.date.showToday)("nzDisabledDate",e.f.date.disabledDate)("nzDisabledTime",e.f.date.disabledTime)}}function NG(o,n){if(o&1){let e=Q();C(0,"nz-date-picker",11),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m(2);return P(r.n.emit(i))}),S()}if(o&2){let e=m(2);h("nzMode",e.f.date.mode)("ngModel",e.f.menus[0].value)("nzShowNow",e.f.date.showNow)("nzShowToday",e.f.date.showToday)("nzDisabledDate",e.f.date.disabledDate)("nzDisabledTime",e.f.date.disabledTime)}}function LG(o,n){if(o&1&&(C(0,"div",9),_(1,AG,1,6,"nz-range-picker",10)(2,NG,1,6),S()),o&2){let e=m();f(),ie(1,e.f.date.range?1:2)}}function kG(o,n){}var VG=(o,n,e)=>({$implicit:o,col:n,handle:e});function GG(o,n){if(o&1&&(C(0,"div",12),_(1,kG,0,0,"ng-template",13),S()),o&2){let e=m();f(),h("ngTemplateOutlet",e.f.custom)("ngTemplateOutletContext",iu(2,VG,e.f,e.col,e))}}function HG(o,n){if(o&1){let e=Q();C(0,"label",17),A("ngModelChange",function(i){I(e);let r=m().$implicit;return P(r.checked=i)})("ngModelChange",function(){I(e);let i=m(3);return P(i.checkboxChange())}),Y(1),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked),f(),Ne(" ",e.text," ")}}function BG(o,n){if(o&1){let e=Q();C(0,"label",18),A("ngModelChange",function(){I(e);let i=m().$implicit,r=m(2);return P(r.radioChange(i))}),Y(1),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked),f(),Ne(" ",e.text," ")}}function $G(o,n){if(o&1&&(C(0,"li",15),_(1,HG,2,2,"label",16)(2,BG,2,2),S()),o&2){let e=m(2);f(),ie(1,e.f.multiple?1:2)}}function jG(o,n){if(o&1&&(C(0,"ul",14),Cn(1,$G,3,1,"li",15,yn),S()),o&2){let e=m();f(),_n(e.f.menus)}}function WG(o,n){if(o&1){let e=Q();C(0,"div",19)(1,"a",20),A("click",function(){I(e);let i=m();return P(i.confirm())}),C(2,"span"),Y(3),S()(),C(4,"a",21),A("click",function(){I(e);let i=m();return P(i.reset())}),C(5,"span"),Y(6),S()()()}if(o&2){let e=m();f(3),ye(e.f.confirmText||e.locale.filterConfirm),f(3),ye(e.f.clearText||e.locale.filterReset)}}var UG=["table"],KG=["contextmenuTpl"];function qG(o,n){if(o&1&&R(0,"small",14),o&2){let e=m().$implicit;h("innerHTML",e.optional,Dt)}}function YG(o,n){if(o&1&&R(0,"i",15),o&2){let e=m().$implicit;h("nzTooltipTitle",e.optionalHelp)}}function QG(o,n){if(o&1&&(R(0,"span",11),_(1,qG,1,1,"small",12)(2,YG,1,1,"i",13)),o&2){let e=n.$implicit;h("innerHTML",e._text,Dt),f(),ie(1,e.optional?1:-1),f(),ie(2,e.optionalHelp?2:-1)}}function XG(o,n){if(o&1){let e=Q();C(0,"label",16),A("ngModelChange",function(i){I(e);let r=m();return P(r._allChecked=i)})("ngModelChange",function(){I(e);let i=m();return P(i.checkAll())}),S()}if(o&2){let e=n.$implicit,t=m();k("ant-table-selection-select-all-custom",e),h("nzDisabled",t._allCheckedDisabled)("ngModel",t._allChecked)("nzIndeterminate",t._indeterminate)}}function ZG(o,n){if(o&1&&R(0,"th",17),o&2){let e=m(3);h("rowSpan",e._headers.length)}}function JG(o,n){o&1&&(C(0,"nz-resize-handle",20),R(1,"i"),S())}function eH(o,n){}var yh=(o,n)=>({$implicit:o,index:n});function tH(o,n){if(o&1&&_(0,eH,0,0,"ng-template",5),o&2){let e=m().let,t=m(),i=t.$implicit,r=t.$index;h("ngTemplateOutlet",e.__renderTitle)("ngTemplateOutletContext",ri(2,yh,i.column,r))}}function nH(o,n){}var iH=()=>({$implicit:!1});function rH(o,n){if(o&1&&_(0,nH,0,0,"ng-template",5),o&2){m(7);let e=te(3);h("ngTemplateOutlet",e)("ngTemplateOutletContext",ii(2,iH))}}function oH(o,n){}function sH(o,n){if(o&1&&(C(0,"div",26)(1,"div",27),R(2,"i",28),S()()),o&2){m();let e=te(4);f(),h("nzDropdownMenu",e)}}function aH(o,n){if(o&1){let e=Q();C(0,"li",29),A("click",function(){let r=I(e).$implicit,s=m(8);return P(s._rowSelection(r))}),S()}if(o&2){let e=n.$implicit;h("innerHTML",e.text,Dt)}}var lH=()=>({$implicit:!0});function cH(o,n){if(o&1&&(C(0,"div",22),_(1,oH,0,0,"ng-template",5)(2,sH,3,1,"div",23),C(3,"nz-dropdown-menu",null,24)(5,"ul",25),Cn(6,aH,1,1,"li",30,yn),S()()()),o&2){let e=m(3).let;m(4);let t=te(3);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",ii(3,lH)),f(),ie(2,e.selections.length?2:-1),f(4),_n(e.selections)}}function uH(o,n){if(o&1&&_(0,rH,1,3,null,5)(1,cH,8,4),o&2){let e=m(2).let;ie(0,e.selections.length===0?0:1)}}function dH(o,n){}var Bs=o=>({$implicit:o});function pH(o,n){if(o&1&&_(0,dH,0,0,"ng-template",5),o&2){let e=m(2).let;m(4);let t=te(1);h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,Bs,e.title))}}function hH(o,n){if(o&1&&_(0,uH,2,1)(1,pH,1,4),o&2){let e=m().let,t;ie(0,(t=e.type)==="checkbox"?0:1)}}function fH(o,n){if(o&1){let e=Q();C(0,"st-filter",31),A("n",function(i){I(e);let r=m(5);return P(r.handleFilterNotify(i))})("handle",function(i){I(e);let r=m().let,s=m(4);return P(s._handleFilter(r,i))}),S()}if(o&2){let e=m().let,t=m().$implicit,i=m(3);h("col",t.column)("f",e.filter)("locale",i.locale)}}function gH(o,n){if(o&1){let e=Q();C(0,"th",19),A("nzSortOrderChange",function(i){let s=I(e).let,a=m().$index,l=m(3);return P(l.sort(s,a,i))})("nzResizeEnd",function(i){let s=I(e).let,a=m(4);return P(a.colResize(i,s))}),_(1,JG,2,0,"nz-resize-handle",20)(2,tH,1,5,null,5)(3,hH,2,1)(4,fH,1,3,"st-filter",21),S()}if(o&2){let e=n.let,t=m(),i=t.$implicit,r=t.$index,s=t.$count,a=t.$index;k("st__has-filter",e.filter),h("colSpan",i.colSpan)("rowSpan",i.rowSpan)("nzWidth",e.width)("nzLeft",e._left)("nzRight",e._right)("ngClass",e._className)("nzShowSort",e._sort.enabled)("nzSortOrder",e._sort.default)("nzCustomFilter",!!e.filter)("nzDisabled",r===s-1||e.resizable.disabled)("nzMaxWidth",e.resizable.maxWidth)("nzMinWidth",e.resizable.minWidth)("nzBounds",e.resizable.bounds)("nzPreview",e.resizable.preview),ze("data-col",e.indexKey)("data-col-index",a),f(),ie(1,r!==s-1&&!e.resizable.disabled?1:-1),f(),ie(2,e.__renderTitle?2:3),f(2),ie(4,e.filter?4:-1)}}function mH(o,n){if(o&1&&_(0,gH,5,21,"th",18),o&2){let e=n.$implicit;h("let",e.column)}}function vH(o,n){if(o&1&&(C(0,"tr"),_(1,ZG,1,1,"th",17),Cn(2,mH,1,1,"th",32,yn),S()),o&2){let e=n.$implicit,t=n.$index,i=m(2);f(),ie(1,t===0&&i.expand?1:-1),f(),_n(e)}}function yH(o,n){if(o&1&&(C(0,"thead"),Cn(1,vH,4,1,"tr",null,yn),S()),o&2){let e=m();f(),_n(e._headers)}}function CH(o,n){}function _H(o,n){if(o&1&&_(0,CH,0,0,"ng-template",5),o&2){let e=m();h("ngTemplateOutlet",e.bodyHeader)("ngTemplateOutletContext",yt(2,Bs,e._statistical))}}function SH(o,n){if(o&1){let e=Q();C(0,"td",36),A("nzExpandChange",function(i){I(e);let r=m().$implicit,s=m();return P(s._expandChange(r,i))})("click",function(i){I(e);let r=m(2);return P(r._stopPropagation(i))}),S()}if(o&2){let e=m().$implicit,t=m();h("nzShowExpand",t.expand&&e.showExpand!==!1)("nzExpand",e.expand)}}function wH(o,n){}function bH(o,n){if(o&1&&(C(0,"span",40),_(1,wH,0,0,"ng-template",5),S()),o&2){let e=m(2).$implicit;m(2);let t=te(1);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,Bs,e.title))}}function TH(o,n){if(o&1){let e=Q();C(0,"td",37),_(1,bH,2,4,"span",38),C(2,"st-td",39),A("n",function(i){I(e);let r=m(3);return P(r._handleTd(i))}),S()()}if(o&2){let e=m(),t=e.$implicit,i=e.$index,r=m(),s=r.$implicit,a=r.index,l=m();h("nzLeft",!!t._left)("nzRight",!!t._right)("ngClass",t._className),ze("data-col-index",i)("colspan",(s._values[i].props==null?null:s._values[i].props.colSpan)===1||s._values[i].props==null?null:s._values[i].props.colSpan)("rowspan",(s._values[i].props==null?null:s._values[i].props.rowSpan)===1||s._values[i].props==null?null:s._values[i].props.rowSpan),f(),ie(1,l.responsive?1:-1),f(),h("data",l._data)("i",s)("index",a)("c",t)("cIdx",i)}}function EH(o,n){if(o&1&&_(0,TH,3,12,"td",37),o&2){let e=n.$index,t=m().$implicit;ie(0,(t._values[e].props==null?null:t._values[e].props.colSpan)>0&&(t._values[e].props==null?null:t._values[e].props.rowSpan)>0?0:-1)}}function xH(o,n){}function zH(o,n){if(o&1){let e=Q();C(0,"tr",33),A("click",function(i){let r=I(e),s=r.$implicit,a=r.index,l=m();return P(l._rowClick(i,s,a,!1))})("dblclick",function(i){let r=I(e),s=r.$implicit,a=r.index,l=m();return P(l._rowClick(i,s,a,!0))}),_(1,SH,1,2,"td",34),Cn(2,EH,1,1,null,null,yn),S(),C(4,"tr",35),_(5,xH,0,0,"ng-template",5),S()}if(o&2){let e=n.$implicit,t=n.index,i=m();h("ngClass",e._rowClassName),ze("data-index",t),f(),ie(1,i.expand?1:-1),f(),_n(i._columns),f(2),h("nzExpand",e.expand),f(),h("ngTemplateOutlet",i.expand)("ngTemplateOutletContext",ri(6,yh,e,t))}}function OH(o,n){}function DH(o,n){if(o&1&&_(0,OH,0,0,"ng-template",5),o&2){let e=n.$implicit,t=n.index;m(2);let i=te(10);h("ngTemplateOutlet",i)("ngTemplateOutletContext",ri(2,yh,e,t))}}function RH(o,n){o&1&&_(0,DH,1,5,"ng-template",7)}function IH(o,n){}function PH(o,n){if(o&1&&_(0,IH,0,0,"ng-template",5),o&2){let e=n.$implicit,t=n.$index;m(2);let i=te(10);h("ngTemplateOutlet",i)("ngTemplateOutletContext",ri(2,yh,e,t))}}function MH(o,n){if(o&1&&Cn(0,PH,1,5,null,5,yn),o&2){let e=m();_n(e._data)}}function FH(o,n){}function AH(o,n){if(o&1&&_(0,FH,0,0,"ng-template",5),o&2){let e=m();h("ngTemplateOutlet",e.body)("ngTemplateOutletContext",yt(2,Bs,e._statistical))}}function NH(o,n){if(o&1&&Y(0),o&2){let e=n.range,t=n.$implicit,i=m();ye(i.renderTotal(t,e))}}function LH(o,n){if(o&1){let e=Q();C(0,"li",29),A("click",function(){I(e);let i=m().$implicit;return P(i.fn(i))}),S()}if(o&2){let e=m().$implicit;h("innerHTML",e.text,Dt)}}function kH(o,n){if(o&1){let e=Q();C(0,"li",29),A("click",function(){let r=I(e).$implicit;return P(r.fn(r))}),S()}if(o&2){let e=n.$implicit;h("innerHTML",e.text,Dt)}}function VH(o,n){if(o&1&&(C(0,"li",41)(1,"ul"),Cn(2,kH,1,1,"li",30,yn),S()()),o&2){let e=m().$implicit;h("nzTitle",e.text),f(2),_n(e.children)}}function GH(o,n){if(o&1&&_(0,LH,1,1,"li",30)(1,VH,4,1),o&2){let e=n.$implicit;ie(0,e.children.length===0?0:1)}}function HH(o,n){}function BH(o,n){if(o&1&&(C(0,"span",5),_(1,HH,0,0,"ng-template",3),S()),o&2){let e=m(),t=e.child,i=e.$implicit;m();let r=te(3);k("d-block",t)("width-100",t),h("nzTooltipTitle",i.tooltip),f(),h("ngTemplateOutlet",r)("ngTemplateOutletContext",yt(7,Bs,i))}}function $H(o,n){}function jH(o,n){if(o&1&&_(0,$H,0,0,"ng-template",3),o&2){let e=m().$implicit;m();let t=te(3);h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,Bs,e))}}function WH(o,n){if(o&1&&_(0,BH,2,9,"span",4)(1,jH,1,4),o&2){let e=n.$implicit;ie(0,e.tooltip?0:1)}}function UH(o,n){}function KH(o,n){if(o&1){let e=Q();C(0,"a",7),A("nzOnConfirm",function(){I(e);let i=m().$implicit,r=m();return P(r._btn(i))})("click",function(i){I(e);let r=m(2);return P(r._stopPropagation(i))}),_(1,UH,0,0,"ng-template",3),S()}if(o&2){let e=m().$implicit;m();let t=te(5);h("nzPopconfirmTitle",e.pop.title)("nzIcon",e.pop.icon)("nzCondition",e.pop.condition(e))("nzCancelText",e.pop.cancelText)("nzOkText",e.pop.okText)("nzOkType",e.pop.okType)("ngClass",e._className),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(9,Bs,e))}}function qH(o,n){}function YH(o,n){if(o&1){let e=Q();C(0,"a",8),A("click",function(i){I(e);let r=m().$implicit,s=m();return P(s._btn(r,i))}),_(1,qH,0,0,"ng-template",3),S()}if(o&2){let e=m().$implicit;m();let t=te(5);h("ngClass",e._className),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(3,Bs,e))}}function QH(o,n){if(o&1&&_(0,KH,2,11,"a",6)(1,YH,2,5),o&2){let e=n.$implicit;ie(0,e.pop?0:1)}}function XH(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(2).$implicit;h("nzIconfont",e._icon.iconfont)}}function ZH(o,n){if(o&1&&R(0,"i",11),o&2){let e=m(2).$implicit;h("nzType",e._icon.type)("nzTheme",e._icon.theme)("nzSpin",e._icon.spin)("nzTwotoneColor",e._icon.twoToneColor)}}function JH(o,n){if(o&1&&_(0,XH,1,1,"i",10)(1,ZH,1,4),o&2){let e=m().$implicit;ie(0,e._icon.iconfont?0:1)}}var e3=o=>({"pl-xs":o});function t3(o,n){if(o&1&&(_(0,JH,2,1),R(1,"span",9)),o&2){let e=n.$implicit;ie(0,e._icon?0:-1),f(),h("innerHTML",e._text,Dt)("ngClass",yt(3,e3,e._icon))}}function n3(o,n){}var i3=(o,n,e)=>({$implicit:o,index:n,column:e});function r3(o,n){if(o&1&&_(0,n3,0,0,"ng-template",3),o&2){let e=m();h("ngTemplateOutlet",e.c.__render)("ngTemplateOutletContext",iu(2,i3,e.i,e.index,e.c))}}function o3(o,n){if(o&1){let e=Q();C(0,"label",12),A("ngModelChange",function(i){I(e);let r=m(2);return P(r._checkbox(i))}),S()}if(o&2){let e=m(2);h("nzDisabled",e.i.disabled)("ngModel",e.i.checked)}}function s3(o,n){if(o&1){let e=Q();C(0,"label",13),A("ngModelChange",function(){I(e);let i=m(2);return P(i._radio())}),S()}if(o&2){let e=m(2);h("nzDisabled",e.i.disabled)("ngModel",e.i.checked)}}function a3(o,n){if(o&1){let e=Q();C(0,"a",14),A("click",function(i){I(e);let r=m(2);return P(r._link(i))}),S()}if(o&2){let e=m(2);h("innerHTML",e.i._values[e.cIdx]._text,Dt),ze("title",e.i._values[e.cIdx].text)}}function l3(o,n){if(o&1&&(C(0,"nz-tag",15),R(1,"span",16),S()),o&2){let e=m(2);h("nzColor",e.i._values[e.cIdx].color)("nz-tooltip",e.i._values[e.cIdx].tooltip),f(),h("innerHTML",e.i._values[e.cIdx]._text,Dt)}}function c3(o,n){if(o&1&&R(0,"nz-badge",17),o&2){let e=m(2);h("nzStatus",e.i._values[e.cIdx].color)("nzText",e.i._values[e.cIdx].text)("nz-tooltip",e.i._values[e.cIdx].tooltip)}}function u3(o,n){if(o&1&&R(0,"cell",18),o&2){let e=m(2),t;h("value",e.i._values[e.cIdx].text)("options",(t=e.i._values[e.cIdx].cell)!==null&&t!==void 0?t:e.c.cell)}}function d3(o,n){}function p3(o,n){if(o&1&&_(0,d3,0,0,"ng-template",19),o&2){let e=m(2);h("record",e.i)("column",e.c)}}function h3(o,n){if(o&1&&R(0,"span",20),o&2){let e=m(3);h("innerText",e.i._values[e.cIdx]._text),ze("title",e.c._isTruncate?e.i._values[e.cIdx].text:null)}}function f3(o,n){if(o&1&&R(0,"span",16),o&2){let e=m(3);h("innerHTML",e.i._values[e.cIdx]._text,Dt),ze("title",e.c._isTruncate?e.i._values[e.cIdx].text:null)}}function g3(o,n){if(o&1&&_(0,h3,1,2,"span",20)(1,f3,1,2),o&2){let e=m(2);ie(0,e.c.safeType==="text"?0:1)}}function m3(o,n){o&1&&R(0,"li",26)}function v3(o,n){}var y3=o=>({$implicit:o,child:!0});function C3(o,n){if(o&1&&(C(0,"li",27),_(1,v3,0,0,"ng-template",3),S()),o&2){let e=m().$implicit;m(4);let t=te(1);k("st__btn-disabled",e._disabled),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(4,y3,e))}}function _3(o,n){if(o&1&&_(0,m3,1,0,"li",26)(1,C3,2,6),o&2){let e=n.$implicit;ie(0,e.type==="divider"?0:1)}}function S3(o,n){if(o&1&&(C(0,"a",22),R(1,"span",16)(2,"i",23),S(),C(3,"nz-dropdown-menu",null,24)(5,"ul",25),Cn(6,_3,2,1,null,null,yn),S()()),o&2){let e=te(4),t=m().$implicit;h("nzDropdownMenu",e),f(),h("innerHTML",t._text,Dt),f(5),_n(t.children)}}function w3(o,n){}var b3=o=>({$implicit:o,child:!1});function T3(o,n){if(o&1&&(C(0,"span"),_(1,w3,0,0,"ng-template",3),S()),o&2){let e=m().$implicit;m(2);let t=te(1);k("st__btn-disabled",e._disabled),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(4,b3,e))}}function E3(o,n){o&1&&R(0,"nz-divider",21)}function x3(o,n){if(o&1&&_(0,S3,8,2)(1,T3,2,6)(2,E3,1,0,"nz-divider",21),o&2){let e=n.$implicit,t=n.$index,i=n.$count;ie(0,e.children.length>0?0:1),f(2),ie(2,t!==i-1?2:-1)}}function z3(o,n){if(o&1&&(_(0,o3,1,2)(1,s3,1,2)(2,a3,1,2)(3,l3,2,3)(4,c3,1,3)(5,u3,1,2)(6,p3,1,2)(7,g3,2,1),Cn(8,x3,3,2,null,null,yn)),o&2){let e=m(),t;ie(0,(t=e.c.type)==="checkbox"?0:t==="radio"?1:t==="link"?2:t==="tag"?3:t==="badge"?4:t==="cell"?5:t==="widget"?6:7),f(8),_n(e.i._values[e.cIdx].buttons)}}var VT=(()=>{let n=class n{constructor(){this.titles={},this.rows={}}add(t,i,r){this[t==="title"?"titles":"rows"][i]=r}getTitle(t){return this.titles[t]}getRow(t){return this.rows[t]}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var vv=(()=>{let n=class n{constructor(){this._widgets={}}get widgets(){return this._widgets}register(t,i){this._widgets[t]=i}has(t){return this._widgets.hasOwnProperty(t)}get(t){return this._widgets[t]}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),NT=(()=>{let n=class n{constructor(t,i,r,s,a){this.dom=t,this.rowSource=i,this.acl=r,this.i18nSrv=s,this.stWidgetRegistry=a}setCog(t){this.cog=t}fixPop(t,i){if(t.pop==null||t.pop===!1){t.pop=!1;return}let r=V({},i);typeof t.pop=="string"?r.title=t.pop:typeof t.pop=="object"&&(r=V(V({},r),t.pop)),typeof r.condition!="function"&&(r.condition=()=>!1),t.pop=r}btnCoerce(t){if(!t)return[];let i=[],{modal:r,drawer:s,pop:a,btnIcon:l}=this.cog;for(let c of t)this.acl&&c.acl&&!this.acl.can(c.acl)||((c.type==="modal"||c.type==="static")&&(c.modal==null||c.modal.component==null?c.type="none":c.modal=V(V({paramsName:"record",size:"lg"},r),c.modal)),c.type==="drawer"&&(c.drawer==null||c.drawer.component==null?c.type="none":c.drawer=V(V({paramsName:"record",size:"lg"},s),c.drawer)),c.type==="del"&&typeof c.pop>"u"&&(c.pop=!0),this.fixPop(c,a),typeof c.icon!="function"&&(c.icon=V(V({},l),typeof c.icon=="string"?{type:c.icon}:c.icon)),c.children=c.children&&c.children.length>0?this.btnCoerce(c.children):[],c.i18n&&this.i18nSrv&&(c.text=this.i18nSrv.fanyi(c.i18n)),i.push(c));return this.btnCoerceIf(i),i}btnCoerceIf(t){for(let i of t)i.iifBehavior=i.iifBehavior||this.cog.iifBehavior,i.children&&i.children.length>0?this.btnCoerceIf(i.children):i.children=[]}fixedCoerce(t){let i=(r,s)=>r+ +s.width.toString().replace("px","");t.filter(r=>r.fixed&&r.fixed==="left"&&r.width).forEach((r,s)=>r._left=`${t.slice(0,s).reduce(i,0)}px`),t.filter(r=>r.fixed&&r.fixed==="right"&&r.width).reverse().forEach((r,s)=>r._right=`${s>0?t.slice(-s).reduce(i,0):0}px`)}sortCoerce(t){let i=this.fixSortCoerce(t);return i.reName=V(V({},this.cog.sortReName),i.reName),i}fixSortCoerce(t){if(typeof t.sort>"u")return{enabled:!1};let i={};return typeof t.sort=="string"?i.key=t.sort:typeof t.sort!="boolean"?i=t.sort:typeof t.sort=="boolean"&&(i.compare=(r,s)=>r[t.indexKey]-s[t.indexKey]),i.key||(i.key=t.indexKey),i.enabled=!0,i}filterCoerce(t){if(t.filter==null)return null;let i=t.filter;i.type=i.type||"default",i.showOPArea=i.showOPArea!==!1;let r="filter",s="fill",a=!0,l;switch(i.type){case"keyword":r="search",s="outline";break;case"number":r="search",s="outline",i.number=V({step:1,min:-1/0,max:1/0},i.number);break;case"date":r="calendar",s="outline",i.date=V({range:!1,mode:"date",showToday:!0,showNow:!1},i.date);break;case"custom":break;default:a=!1;break}if(a&&(i.menus==null||i.menus.length===0)&&(i.menus=[{value:l}]),i.menus?.length===0)return null;typeof i.multiple>"u"&&(i.multiple=!0),i.confirmText=i.confirmText||this.cog.filterConfirmText,i.clearText=i.clearText||this.cog.filterClearText,i.key=i.key||t.indexKey,i.icon=i.icon||r;let c={type:r,theme:s};return typeof i.icon=="string"?i.icon=ot(V({},c),{type:i.icon}):i.icon=V(V({},c),i.icon),this.updateDefault(i),this.acl&&(i.menus=i.menus?.filter(u=>this.acl.can(u.acl))),i.menus?.length===0?null:i}restoreRender(t){t.renderTitle&&(t.__renderTitle=typeof t.renderTitle=="string"?this.rowSource.getTitle(t.renderTitle):t.renderTitle),t.render&&(t.__render=typeof t.render=="string"?this.rowSource.getRow(t.render):t.render)}widgetCoerce(t){t.type==="widget"&&(t.widget==null||!this.stWidgetRegistry.has(t.widget.type))&&delete t.type}genHeaders(t){let i=[],r=[],s=(l,c,u=0)=>{i[u]=i[u]||[];let d=c;return l.map(g=>{let v={column:g,colStart:d,hasSubColumns:!1},y=1,x=g.children;return Array.isArray(x)&&x.length>0?(y=s(x,d,u+1).reduce((E,z)=>E+z,0),v.hasSubColumns=!0):r.push(v.column.width||""),"colSpan"in g&&(y=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=y,v.colEnd=v.colStart+y-1,i[u].push(v),d+=y,y})};s(t,0);let a=i.length;for(let l=0;l{!("rowSpan"in c)&&!c.hasSubColumns&&(c.rowSpan=a-l)});return{headers:i,headerWidths:a>1?r:null}}cleanCond(t){let i=[],r=Jr(t);for(let s of r)typeof s.iif=="function"&&!s.iif(s)||this.acl&&s.acl&&!this.acl.can(s.acl)||(Array.isArray(s.children)&&s.children.length>0&&(s.children=this.cleanCond(s.children)),i.push(s));return i}mergeClass(t){let i=[];t._isTruncate&&i.push("text-truncate");let r=t.className;if(!r){let l={number:"text-right",currency:"text-right",date:"text-center"}[t.type];l&&i.push(l),t._className=i;return}let s=Array.isArray(r);if(!s&&typeof r=="object"){let l=r;i.forEach(c=>l[c]=!0),t._className=l;return}let a=s?Array.from(r):[r];a.splice(0,0,...i),t._className=[...new Set(a)].filter(l=>!!l)}process(t,i){if(!t||t.length===0)return{columns:[],headers:[],headerWidths:null};let{noIndex:r}=this.cog,s=0,a=0,l=0,c=[],u=g=>{g.index&&(Array.isArray(g.index)||(g.index=g.index.toString().split(".")),g.indexKey=g.index.join("."));let v=(typeof g.title=="string"?{text:g.title}:g.title)||{};return v.i18n&&this.i18nSrv&&(v.text=this.i18nSrv.fanyi(v.i18n)),v.text&&(v._text=this.dom.bypassSecurityTrustHtml(v.text)),g.title=v,g.type==="no"&&(g.noIndex=g.noIndex==null?r:g.noIndex),g.selections==null&&(g.selections=[]),g.type==="checkbox"&&(++s,g.width||(g.width=`${g.selections.length>0?62:50}px`)),this.acl&&(g.selections=g.selections.filter(y=>this.acl.can(y.acl))),g.type==="radio"&&(++a,g.selections=[],g.width||(g.width="50px")),g.cell!=null&&(g.type="cell"),g.type==="yn"&&(g.yn=V(V({truth:!0},this.cog.yn),g.yn)),g.type==="date"&&(g.dateFormat=g.dateFormat||this.cog.date?.format),(g.type==="link"&&typeof g.click!="function"||g.type==="badge"&&g.badge==null||g.type==="tag"&&g.tag==null||g.type==="enum"&&g.enum==null)&&(g.type=""),g._isTruncate=!!g.width&&i.widthMode.strictBehavior==="truncate"&&g.type!=="img",this.mergeClass(g),typeof g.width=="number"&&(g._width=g.width,g.width=`${g.width}px`),g._left=!1,g._right=!1,g.safeType=g.safeType??i.safeType,g._sort=this.sortCoerce(g),g.filter=this.filterCoerce(g),g.buttons=this.btnCoerce(g.buttons),this.widgetCoerce(g),this.restoreRender(g),g.resizable=V(V({disabled:!0,bounds:"window",minWidth:60,maxWidth:360,preview:!0},i.resizable),typeof g.resizable=="boolean"?{disabled:!g.resizable}:g.resizable),g.__point=l++,g},d=g=>{for(let v of g)c.push(u(v)),Array.isArray(v.children)&&d(v.children)},p=this.cleanCond(t);if(d(p),s>1)throw new Error("[st]: just only one column checkbox");if(a>1)throw new Error("[st]: just only one column radio");return this.fixedCoerce(c),V({columns:c.filter(g=>!Array.isArray(g.children)||g.children.length===0)},this.genHeaders(p))}restoreAllRender(t){t.forEach(i=>this.restoreRender(i))}updateDefault(t){return t.menus==null?this:(t.type==="default"?t.default=t.menus.findIndex(i=>i.checked)!==-1:t.default=!!t.menus[0].value,this)}cleanFilter(t){let i=t.filter;return i.default=!1,i.type==="default"?i.menus.forEach(r=>r.checked=!1):i.menus[0].value=void 0,this}};n.\u0275fac=function(i){return new(i||n)(nt(Ro),nt(VT,1),nt(pp,8),nt(Rs,8),nt(vv))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),LT=(()=>{let n=class n{constructor(t,i,r,s,a,l){this.http=t,this.datePipe=i,this.ynPipe=r,this.numberPipe=s,this.currencySrv=a,this.dom=l,this.sortTick=0}setCog(t){this.cog=t}process(t){let i,r=!1,{data:s,res:a,total:l,page:c,pi:u,ps:d,paginator:p,columns:g}=t,v,y,x,E,z,M=c.show;return typeof s=="string"?(r=!0,i=this.getByRemote(s,t).pipe(We(G=>{z=G;let U;if(Array.isArray(G))U=G,v=U.length,y=v,M=!1;else{let se=a.reName;if(typeof se=="function"){let ve=se(G,{pi:u,ps:d,total:l});U=ve.list,v=ve.total}else{U=ou(G,se.list,[]),(U==null||!Array.isArray(U))&&(U=[]);let ve=se.total&&ou(G,se.total,null);v=ve==null?l||0:+ve}}return Jr(U)}))):s==null||Array.isArray(s)?i=Mn(s??[]):i=s,r||(i=i.pipe(We(G=>{z=G;let U=Jr(G),se=this.getSorterFn(g);return se&&(U=U.sort(se)),U}),We(G=>(g.filter(U=>U.filter).forEach(U=>{let se=U.filter,ve=this.getFilteredData(se);if(ve.length===0)return;let he=se.fn;typeof he=="function"&&(G=G.filter(be=>ve.some(Ee=>he(Ee,be))))}),G)),We(G=>{if(p&&c.front){let U=Math.ceil(G.length/d);if(E=Math.max(1,u>U?U:u),v=G.length,c.show===!0)return G.slice((E-1)*d,E*d)}return G}))),typeof a.process=="function"&&(i=i.pipe(We(G=>a.process(G,z)))),i=i.pipe(We(G=>this.optimizeData({result:G,columns:g,rowClassName:t.rowClassName}))),i.pipe(We(G=>{x=G;let U=v||l,se=y||d;return{pi:E,ps:y,total:v,list:x,statistical:this.genStatistical(g,x,z),pageShow:typeof M>"u"?U>se:M}}))}get(t,i,r){try{let s=i.safeType==="safeHtml";if(i.format){let d=i.format(t,i,r)||"";return{text:d,_text:s?this.dom.bypassSecurityTrustHtml(d):d,org:d,safeType:i.safeType}}let a=ou(t,i.index,i.default),l=a,c,u;switch(i.type){case"no":l=this.getNoIndex(t,i,r);break;case"img":l=a?``:"";break;case"number":l=this.numberPipe.transform(a,i.numberDigits);break;case"currency":l=this.currencySrv.format(a,i.currency?.format);break;case"date":l=a===i.default?i.default:this.datePipe.transform(a,i.dateFormat);break;case"yn":l=this.ynPipe.transform(a===i.yn.truth,i.yn.yes,i.yn.no,i.yn.mode,!1);break;case"enum":l=i.enum[a];break;case"tag":case"badge":let d=i.type==="tag"?i.tag:i.badge;if(d&&d[l]){let p=d[l];l=p.text,c=p.color,u=p.tooltip}else l="";break}return l==null&&(l=""),{text:l,_text:s?this.dom.bypassSecurityTrustHtml(l):l,org:a,color:c,tooltip:u,safeType:i.safeType,buttons:[]}}catch(s){let a="INVALID DATA";return console.error("Failed to get data",t,i,s),{text:a,_text:a,org:a,buttons:[],safeType:"text"}}}getByRemote(t,i){let{req:r,page:s,paginator:a,pi:l,ps:c,singleSort:u,multiSort:d,columns:p}=i,g=(r.method||"GET").toUpperCase(),v={},y=r.reName;a&&(r.type==="page"?v={[y.pi]:s.zeroIndexed?l-1:l,[y.ps]:c}:v={[y.skip]:(l-1)*c,[y.limit]:c}),v=V(V(V(V({},v),r.params),this.getReqSortMap(u,d,p)),this.getReqFilterMap(p)),i.req.ignoreParamNull==!0&&Object.keys(v).forEach(E=>{v[E]==null&&delete v[E]});let x={params:v,body:r.body,headers:r.headers};return g==="POST"&&r.allInBody===!0&&(x={body:V(V({},r.body),v),headers:r.headers}),typeof r.process=="function"&&(x=r.process(x)),x.params instanceof Yg||(x.params=new Yg({fromObject:x.params})),typeof i.customRequest=="function"?i.customRequest({method:g,url:t,options:x}):this.http.request(g,t,x)}getCell(t,i,r){let s=typeof t.onCell=="function"?t.onCell(i,r):null,a=s?.colSpan??1,l=s?.rowSpan??1;return{colSpan:a<=0?null:a,rowSpan:l<=0?null:l}}optimizeData(t){let{result:i,columns:r,rowClassName:s}=t;for(let a=0,l=i.length;a{let u=this.getCell(c,i[a],a);if(Array.isArray(c.buttons)&&c.buttons.length>0)return{buttons:this.genButtons(c.buttons,i[a],c),_text:"",props:u};let d;return typeof c.cell=="function"&&(d=c.cell(i[a],c)),ot(V({},this.get(i[a],c,a)),{props:u,cell:d})}),i[a]._rowClassName=[s?s(i[a],a):null,i[a].className].filter(c=>!!c).join(" ");return i}getNoIndex(t,i,r){return typeof i.noIndex=="function"?i.noIndex(t,i,r):i.noIndex+r}genButtons(t,i,r){let s=c=>Jr(c).filter(u=>{let d=typeof u.iif=="function"?u.iif(i,u,r):!0,p=u.iifBehavior==="disabled";return u._result=d,u._disabled=!d&&p,u.children?.length&&(u.children=s(u.children)),d||p}),a=s(t),l=c=>{for(let u of c)u._text=typeof u.text=="function"?u.text(i,u):u.text||"",u._className=typeof u.className=="function"?u.className(i,u):u.className,u._icon=typeof u.icon=="function"?u.icon(i,u):u.icon,u.children?.length&&(u.children=l(u.children));return c};return this.fixMaxMultiple(l(a),r)}fixMaxMultiple(t,i){let r=i.maxMultipleButton,s=t.length;if(r==null||s<=0)return t;let a=V(V({},this.cog.maxMultipleButton),typeof r=="number"?{count:r}:r);if(a.count>=s)return t;let l=t.slice(0,a.count);return l.push({_text:a.text,children:t.slice(a.count)}),l}getValidSort(t){return t.filter(i=>i._sort&&i._sort.enabled&&i._sort.default).map(i=>i._sort)}getSorterFn(t){let i=this.getValidSort(t);if(i.length===0)return;let r=i[0];if(r.compare!==null&&typeof r.compare=="function")return(s,a)=>{let l=r.compare(s,a);return l!==0?r.default==="descend"?-l:l:0}}get nextSortTick(){return++this.sortTick}getReqSortMap(t,i,r){let s={},a=this.getValidSort(r);if(i){let d=V({key:"sort",separator:"-",nameSeparator:".",keepEmptyKey:!0,arrayParam:!1},i),p=a.sort((g,v)=>g.tick-v.tick).map(g=>g.key+d.nameSeparator+((g.reName||{})[g.default]||g.default));return s={[d.key]:d.arrayParam?p:p.join(d.separator)},p.length===0&&d.keepEmptyKey===!1?{}:s}if(a.length===0)return s;let l=a[0],c=l.key,u=(a[0].reName||{})[l.default]||l.default;return t&&(u=c+(t.nameSeparator||".")+u,c=t.key||"sort"),s[c]=u,s}getFilteredData(t){return t.type==="default"?t.menus.filter(i=>i.checked===!0):t.menus.slice(0,1)}getReqFilterMap(t){let i={};return t.filter(r=>r.filter&&r.filter.default===!0).forEach(r=>{let s=r.filter,a=this.getFilteredData(s),l={};s.reName?l=s.reName(s.menus,r):l[s.key]=a.map(c=>c.value).join(","),i=V(V({},i),l)}),i}genStatistical(t,i,r){let s={};return t.forEach((a,l)=>{s[a.key||a.indexKey||l]=a.statistical==null?{}:this.getStatistical(a,l,i,r)}),s}getStatistical(t,i,r,s){let a=t.statistical,l=V({digits:2,currency:void 0},typeof a=="string"?{type:a}:a),c={value:0},u=!1;if(typeof l.type=="function")c=l.type(this.getValues(i,r),t,r,s),u=!0;else switch(l.type){case"count":c.value=r.length;break;case"distinctCount":c.value=this.getValues(i,r).filter((d,p,g)=>g.indexOf(d)===p).length;break;case"sum":c.value=this.toFixed(this.getSum(i,r),l.digits),u=!0;break;case"average":c.value=this.toFixed(this.getSum(i,r)/r.length,l.digits),u=!0;break;case"max":c.value=Math.max(...this.getValues(i,r)),u=!0;break;case"min":c.value=Math.min(...this.getValues(i,r)),u=!0;break}return l.currency===!0||l.currency==null&&u===!0?c.text=this.currencySrv.format(c.value,t.currency?.format):c.text=String(c.value),c}toFixed(t,i){return isNaN(t)||!isFinite(t)?0:parseFloat(t.toFixed(i))}getValues(t,i){return i.map(r=>r._values[t].org).map(r=>r===""||r==null?0:r)}getSum(t,i){return this.getValues(t,i).reduce((r,s)=>r+=parseFloat(String(s)),0)}};n.\u0275fac=function(i){return new(i||n)(nt(mw),nt(Hl,1),nt(Op,1),nt(Rl,1),nt(Zp),nt(Ro))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),kT=(()=>{let n=class n{constructor(){this.xlsxSrv=ae(OT,{optional:!0})}_stGet(t,i,r,s){let a={t:"s",v:""};if(i.format)a.v=i.format(t,i,r);else{let l=t._values?t._values[s].text:ou(t,i.index,"");if(a.v=l,l!=null)switch(i.type){case"currency":a.t="n";break;case"date":`${l}`.length>0&&(a.t="d",a.z=i.dateFormat);break;case"yn":let c=i.yn;a.v=l===c.truth?c.yes:c.no;break}}return a.v=a.v??"",a}genSheet(t){let i={},r=i[t.sheetname||"Sheet1"]={},s=t.data.length,a=t.columens,l=0,c=!1,u=d=>d.exported===!1||!d.index||!(!d.buttons||d.buttons.length===0);for(let[d,p]of a.entries()){if(u(p))continue;!c&&p._width!=null&&(c=!0),++l;let g=this.xlsxSrv.numberToSchema(l);r[`${g}1`]={t:"s",v:typeof p.title=="object"?p.title.text:p.title};for(let v=0;v!u(d)).map(d=>({wpx:d._width}))),l>0&&s>0&&(r["!ref"]=`A1:${this.xlsxSrv.numberToSchema(l)}${s+1}`),i}export(t){return xo(this,null,function*(){if(this.xlsxSrv==null)return Promise.reject();let i=this.genSheet(t);return this.xlsxSrv.export({sheets:i,filename:t.filename,callback:t.callback})})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),O3=(()=>{let n=class n{constructor(){this.stWidgetRegistry=ae(vv),this.viewContainerRef=ae(Tn)}ngOnInit(){let t=this.column.widget,i=this.stWidgetRegistry.get(t.type);this.viewContainerRef.clear();let r=this.viewContainerRef.createComponent(i),{record:s,column:a}=this,l=t.params?t.params({record:s,column:a}):{record:s};Object.keys(l).forEach(c=>{r.instance[c]=l[c]})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","st-widget-host",""]],inputs:{record:"record",column:"column"}});let o=n;return o})(),D3={pi:1,ps:10,size:"default",responsive:!0,responsiveHideHeaderFooter:!1,req:{type:"page",method:"GET",allInBody:!1,lazyLoad:!1,ignoreParamNull:!1,reName:{pi:"pi",ps:"ps",skip:"skip",limit:"limit"}},res:{reName:{list:["list"],total:["total"]}},page:{front:!0,zeroIndexed:!1,position:"bottom",placement:"right",show:!0,showSize:!1,pageSizes:[10,20,30,40,50],showQuickJumper:!1,total:!0,toTop:!0,toTopOffset:100,itemRender:null,simple:!1},modal:{paramsName:"record",size:"lg",exact:!0},drawer:{paramsName:"record",size:"md",footer:!0,footerHeight:55},pop:{title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",trigger:"click",placement:"top"},btnIcon:{theme:"outline",spin:!1},noIndex:1,expandRowByClick:!1,expandAccordion:!1,widthMode:{type:"default",strictBehavior:"truncate"},virtualItemSize:54,virtualMaxBufferPx:200,virtualMinBufferPx:100,iifBehavior:"hide",loadingDelay:0,safeType:"safeHtml",date:{format:"yyyy-MM-dd HH:mm"},yn:{truth:!0,yes:"\u662F",mode:"icon"},maxMultipleButton:{text:"\u66F4\u591A",count:2}},R3=(()=>{let n=class n{constructor(){this.cdr=ae(fe),this.visible=!1,this.locale={},this.n=new O,this.handle=new O}get icon(){return this.f.icon}stopPropagation(t){t.stopPropagation()}checkboxChange(){this.n.emit(this.f.menus?.filter(t=>t.checked))}radioChange(t){this.f.menus.forEach(i=>i.checked=!1),t.checked=!t.checked,this.n.emit(t)}close(t){t!=null&&this.handle.emit(t),this.visible=!1,this.cdr.detectChanges()}confirm(){return this.handle.emit(!0),this}reset(){return this.handle.emit(!1),this}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["st-filter"]],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-table-filter-trigger-container",!0)("st__filter",!0)("ant-table-filter-trigger-container-open",r.visible)},inputs:{col:"col",locale:"locale",f:"f"},outputs:{n:"n",handle:"handle"},decls:11,vars:9,consts:[["nz-dropdown","","nzTrigger","click","nzOverlayClassName","st__filter-wrap",1,"ant-table-filter-trigger",3,"nzDropdownMenu","nzClickHide","nzVisible","nzVisibleChange","click"],["nz-icon","",3,"nzType","nzTheme"],["filterMenu","nzDropdownMenu"],[1,"ant-table-filter-dropdown"],["class","ant-table-filter-dropdown-btns"],[1,"st__filter-keyword"],["type","text","nz-input","",3,"ngModel","ngModelChange","keyup.enter"],[1,"p-sm","st__filter-number"],[1,"width-100",3,"ngModel","nzMin","nzMax","nzStep","nzPrecision","nzPlaceHolder","ngModelChange"],[1,"p-sm","st__filter-date"],["nzInline","",3,"nzMode","ngModel","nzShowNow","nzShowToday","nzDisabledDate","nzDisabledTime"],["nzInline","",3,"nzMode","ngModel","nzShowNow","nzShowToday","nzDisabledDate","nzDisabledTime","ngModelChange"],[1,"st__filter-custom"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-menu",""],["nz-menu-item",""],["nz-checkbox","",3,"ngModel"],["nz-checkbox","",3,"ngModel","ngModelChange"],["nz-radio","",3,"ngModel","ngModelChange"],[1,"ant-table-filter-dropdown-btns"],[1,"ant-table-filter-dropdown-link","confirm",3,"click"],[1,"ant-table-filter-dropdown-link","clear",3,"click"]],template:function(i,r){if(i&1&&(C(0,"span",0),A("nzVisibleChange",function(a){return r.visible=a})("click",function(a){return r.stopPropagation(a)}),R(1,"i",1),S(),C(2,"nz-dropdown-menu",null,2)(4,"div",3),_(5,MG,2,2)(6,FG,2,6)(7,LG,3,1)(8,GG,2,6)(9,jG,3,0)(10,WG,7,2,"div",4),S()()),i&2){let s=te(3),a;k("active",r.visible||r.f.default),h("nzDropdownMenu",s)("nzClickHide",!1)("nzVisible",r.visible),f(),h("nzType",r.icon.type)("nzTheme",r.icon.theme),f(4),ie(5,(a=r.f.type)==="keyword"?5:a==="number"?6:a==="date"?7:a==="custom"?8:9),f(5),ie(10,r.f.showOPArea?10:-1)}},dependencies:[Be,Ii,Kt,Rt,Fe,Bi,cs,co,yr,us,ls,Fa,ic,ps,vh],encapsulation:2,changeDetection:0});let o=n;return o})(),I3=(()=>{let n=class n{get req(){return this._req}set req(t){this._req=Pl({},!0,this.cog.req,t)}get res(){return this._res}set res(t){let i=this._res=Pl({},!0,this.cog.res,t),r=i.reName;typeof r!="function"&&(Array.isArray(r.list)||(r.list=r.list.split(".")),Array.isArray(r.total)||(r.total=r.total.split("."))),this._res=i}get page(){return this._page}set page(t){this._page=V(V({},this.cog.page),t),this.updateTotalTpl()}get multiSort(){return this._multiSort}set multiSort(t){if(typeof t=="boolean"&&!it(t)||typeof t=="object"&&Object.keys(t).length===0){this._multiSort=void 0;return}this._multiSort=V({},typeof t=="object"?t:{})}set widthMode(t){this._widthMode=V(V({},this.cog.widthMode),t)}get widthMode(){return this._widthMode}set widthConfig(t){this._widthConfig=t,this.customWidthConfig=t&&t.length>0}set resizable(t){this._resizable=typeof t=="object"?t:{disabled:!it(t)}}get count(){return this._data.length}get list(){return this._data}get noColumns(){return this.columns==null}constructor(t){this.i18nSrv=ae(Rs,{optional:!0}),this.el=ae(de).nativeElement,this.cdr=ae(fe),this.doc=ae(gi),this.exportSrv=ae(kT),this.columnSource=ae(NT),this.dataSource=ae(LT),this.delonI18n=ae(cu),this.cms=ae(Ib),this.destroy$=ae(rs),this.totalTpl="",this.inied=!1,this.customWidthConfig=!1,this._widthConfig=[],this.locale={},this._loading=!1,this._data=[],this._statistical={},this._isPagination=!0,this._allChecked=!1,this._allCheckedDisabled=!1,this._indeterminate=!1,this._headers=[],this._columns=[],this.contextmenuList=[],this.ps=10,this.pi=1,this.total=0,this.loading=null,this.loadingDelay=0,this.loadingIndicator=null,this.bordered=!1,this.scroll={x:null,y:null},this.showHeader=!0,this.expandRowByClick=!1,this.expandAccordion=!1,this.expand=null,this.responsive=!0,this.error=new O,this.change=new O,this.virtualScroll=!1,this.virtualItemSize=54,this.virtualMaxBufferPx=200,this.virtualMinBufferPx=100,this.virtualForTrackBy=i=>i,this.delonI18n.change.pipe(li()).subscribe(()=>{this.locale=this.delonI18n.getData("st"),this._columns.length>0&&(this.updateTotalTpl(),this.cd())}),this.i18nSrv?.change.pipe(li(),Qe(()=>this._columns.length>0)).subscribe(()=>this.refreshColumns()),this.setCog(t.merge("st",D3))}setCog(t){let i=V({},t.multiSort);delete t.multiSort,this.cog=t,Object.assign(this,t),i.global!==!1&&(this.multiSort=i),this.columnSource.setCog(t),this.dataSource.setCog(t)}cd(){return this.cdr.detectChanges(),this}refreshData(){return this._data=[...this._data],this.cd()}renderTotal(t,i){return this.totalTpl?this.totalTpl.replace("{{total}}",t).replace("{{range[0]}}",i[0]).replace("{{range[1]}}",i[1]):""}changeEmit(t,i){let r={type:t,pi:this.pi,ps:this.ps,total:this.total};i!=null&&(r[t]=i),this.change.emit(r)}get filteredData(){return this.loadData({paginator:!1}).pipe(We(t=>t.list))}updateTotalTpl(){let{total:t}=this.page;typeof t=="string"&&t.length?this.totalTpl=t:it(t)?this.totalTpl=this.locale.total:this.totalTpl=""}setLoading(t){this.loading==null&&(this._loading=t,this.cdr.detectChanges())}loadData(t){let{pi:i,ps:r,data:s,req:a,res:l,page:c,total:u,singleSort:d,multiSort:p,rowClassName:g}=this;return this.dataSource.process(V({pi:i,ps:r,total:u,data:s,req:a,res:l,page:c,columns:this._columns,singleSort:d,multiSort:p,rowClassName:g,paginator:!0,customRequest:this.customRequest||this.cog.customRequest},t)).pipe(li(this.destroy$))}loadPageData(){return this.setLoading(!0),this.loadData().pipe(El(()=>this.setLoading(!1)),lp(t=>(this.error.emit({type:"req",error:t}),pS(()=>t))),We(t=>{let i="undefined";return typeof t.pi!==i&&(this.pi=t.pi),typeof t.ps!==i&&(this.ps=t.ps),typeof t.total!==i&&(this.total=t.total),typeof t.pageShow!==i&&(this._isPagination=t.pageShow),this._data=t.list??[],this._statistical=t.statistical,this.cdkVirtualScrollViewport!=null&&Promise.resolve().then(()=>this.cdkVirtualScrollViewport?.checkViewportSize()),this._refCheck(),this.changeEmit("loaded",t.list),this}))}clear(t=!0){return t&&this.clearStatus(),this._data=[],this.cd()}clearStatus(){return this.clearCheck().clearRadio().clearFilter().clearSort()}load(t=1,i,r){return t!==-1&&(this.pi=t),typeof i<"u"&&(this.req.params=r&&r.merge?V(V({},this.req.params),i):i),this._change("pi",r),this}reload(t,i){return this.load(-1,t,i)}reset(t,i){return this.clearStatus().load(1,t,i),this}_toTop(t){if(!(t??this.page.toTop))return;let i=this.el;i.scrollIntoView(),this.doc.documentElement.scrollTop-=this.page.toTopOffset,this.scroll&&(this.cdkVirtualScrollViewport?this.cdkVirtualScrollViewport.scrollTo({top:0,left:0}):i.querySelector(".ant-table-body, .ant-table-content")?.scrollTo(0,0))}_change(t,i){(t==="pi"||t==="ps"&&this.pi<=Math.ceil(this.total/this.ps))&&this.loadPageData().subscribe(()=>this._toTop(i?.toTop)),this.changeEmit(t)}closeOtherExpand(t){this.expandAccordion!==!1&&this._data.filter(i=>i!==t).forEach(i=>i.expand=!1)}_rowClick(t,i,r,s){let a=t.target;if(a.nodeName==="INPUT")return;let{expand:l,expandRowByClick:c}=this;if(l&&i.showExpand!==!1&&c){i.expand=!i.expand,this.closeOtherExpand(i),this.changeEmit("expand",i);return}let u={e:t,item:i,index:r};s?this.changeEmit("dblClick",u):(this._clickRowClassName(a,i,r),this.changeEmit("click",u))}_clickRowClassName(t,i,r){let s=this.clickRowClassName;if(s==null)return;let a=V({exclusive:!1},typeof s=="string"?{fn:()=>s}:s),l=a.fn(i,r),c=t.closest("tr");a.exclusive&&c.parentElement.querySelectorAll("tr").forEach(u=>u.classList.remove(l)),c.classList.contains(l)?c.classList.remove(l):c.classList.add(l)}_expandChange(t,i){t.expand=i,this.closeOtherExpand(t),this.changeEmit("expand",t)}_stopPropagation(t){t.stopPropagation()}_refColAndData(){return this._columns.forEach(t=>{this._data.forEach((i,r)=>{let s=i._values;if(t.type==="no"){let a=`${this.dataSource.getNoIndex(i,t,r)}`;s[t.__point]={text:a,_text:a,org:r,safeType:"text"}}s[t.__point].props=this.dataSource.getCell(t,i,r)})}),this.refreshData()}addRow(t,i){return Array.isArray(t)||(t=[t]),this._data.splice(i?.index??0,0,...t),this.optimizeData()._refColAndData()}removeRow(t){if(typeof t=="number")this._data.splice(t,1);else{Array.isArray(t)||(t=[t]);let r=this._data;for(var i=r.length;i--;)t.indexOf(r[i])!==-1&&r.splice(i,1)}return this._refCheck()._refColAndData()}setRow(t,i,r){return r=V({refreshSchema:!1,emitReload:!1},r),typeof t!="number"&&(t=this._data.indexOf(t)),this._data[t]=Pl(this._data[t],!1,i),this.optimizeData(),r.refreshSchema?(this.resetColumns({emitReload:r.emitReload}),this):this.refreshData()}sort(t,i,r){this.multiSort?(t._sort.default=r,t._sort.tick=this.dataSource.nextSortTick):this._columns.forEach((s,a)=>s._sort.default=a===i?r:null),this.cdr.detectChanges(),this.loadPageData().subscribe(()=>{let s={value:r,map:this.dataSource.getReqSortMap(this.singleSort,this.multiSort,this._columns),column:t};this.changeEmit("sort",s)})}clearSort(){return this._columns.forEach(t=>t._sort.default=null),this}_handleFilter(t,i){i||this.columnSource.cleanFilter(t),this.pi=1,this.columnSource.updateDefault(t.filter),this.loadPageData().subscribe(()=>this.changeEmit("filter",t))}handleFilterNotify(t){this.changeEmit("filterChange",t)}clearFilter(){return this._columns.filter(t=>t.filter&&t.filter.default===!0).forEach(t=>this.columnSource.cleanFilter(t)),this}clearCheck(){return this.checkAll(!1)}_refCheck(){let t=this._data.filter(s=>!s.disabled),i=t.filter(s=>s.checked===!0);this._allChecked=i.length>0&&i.length===t.length;let r=t.every(s=>!s.checked);return this._indeterminate=!this._allChecked&&!r,this._allCheckedDisabled=this._data.length===this._data.filter(s=>s.disabled).length,this.cd()}checkAll(t){return t=typeof t>"u"?this._allChecked:t,this._data.filter(i=>!i.disabled).forEach(i=>i.checked=t),this._refCheck()._checkNotify().refreshData()}_rowSelection(t){return t.select(this._data),this._refCheck()._checkNotify()}_checkNotify(){let t=this._data.filter(i=>!i.disabled&&i.checked===!0);return this.changeEmit("checkbox",t),this}clearRadio(){return this._data.filter(t=>t.checked).forEach(t=>t.checked=!1),this.changeEmit("radio",null),this.refreshData()}_handleTd(t){switch(t.type){case"checkbox":this._refCheck()._checkNotify();break;case"radio":this.changeEmit("radio",t.item),this.refreshData();break}}export(t,i){let r=Array.isArray(t)?this.dataSource.optimizeData({columns:this._columns,result:t}):this._data;(t===!0?this.filteredData:Mn(r)).subscribe(s=>this.exportSrv.export(ot(V({columens:this._columns},i),{data:s})))}colResize({width:t},i){i.width=`${t}px`,this.changeEmit("resize",i)}onContextmenu(t){if(!this.contextmenu)return;t.preventDefault(),t.stopPropagation();let i=t.target.closest("[data-col-index]");if(!i)return;let r=Number(i.dataset.colIndex),s=Number(i.closest("tr").dataset.index),a=isNaN(s),l=this.contextmenu({event:t,type:a?"head":"body",rowIndex:a?null:s,colIndex:r,data:a?null:this.list[s],column:this._columns[r]});(hS(l)?l:Mn(l)).pipe(li(this.destroy$),Qe(c=>c.length>0)).subscribe(c=>{this.contextmenuList=c.map(u=>(Array.isArray(u.children)||(u.children=[]),u)),this.cdr.detectChanges(),this.cms.create(t,this.contextmenuTpl)})}get cdkVirtualScrollViewport(){return this.orgTable?.cdkVirtualScrollViewport}_resetColumns(t){return t=V({emitReload:!0,preClearData:!1},t),typeof t.columns<"u"&&(this.columns=t.columns),typeof t.pi<"u"&&(this.pi=t.pi),typeof t.ps<"u"&&(this.ps=t.ps),t.emitReload&&(t.preClearData=!0),t.preClearData&&(this._data=[]),this.refreshColumns(),t.emitReload?this.loadPageData():(this.cd(),Mn(this))}resetColumns(t){return fS(this._resetColumns(t))}refreshColumns(){let t=this.columnSource.process(this.columns,{widthMode:this.widthMode,resizable:this._resizable,safeType:this.cog.safeType});return this._columns=t.columns,this._headers=t.headers,this.customWidthConfig===!1&&t.headerWidths!=null&&(this._widthConfig=t.headerWidths),this}optimizeData(){return this._data=this.dataSource.optimizeData({columns:this._columns,result:this._data,rowClassName:this.rowClassName}),this}pureItem(t){if(typeof t=="number"&&(t=this._data[t]),!t)return null;let i=Jr(t);return["_values","_rowClassName"].forEach(r=>delete i[r]),i}ngAfterViewInit(){this.refreshColumns(),this.req.lazyLoad||this.loadPageData().subscribe(),this.inied=!0}ngOnChanges(t){t.loading&&(this._loading=t.loading.currentValue),this.inied&&(t.columns&&this.refreshColumns().optimizeData(),t.data&&this.loadPageData().subscribe())}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["st"]],viewQuery:function(i,r){if(i&1&&(xe(UG,5),xe(KG,5)),i&2){let s;ce(s=ue())&&(r.orgTable=s.first),ce(s=ue())&&(r.contextmenuTpl=s.first)}},hostVars:14,hostBindings:function(i,r){i&2&&k("st",!0)("st__p-left",r.page.placement==="left")("st__p-center",r.page.placement==="center")("st__width-strict",r.widthMode.type==="strict")("st__row-class",r.rowClassName)("ant-table-rep",r.responsive)("ant-table-rep__hide-header-footer",r.responsiveHideHeaderFooter)},inputs:{req:"req",res:"res",page:"page",data:"data",columns:"columns",contextmenu:"contextmenu",ps:[le.HasDecoratorInputTransform,"ps","ps",t=>fn(t,10)],pi:[le.HasDecoratorInputTransform,"pi","pi",t=>fn(t,1)],total:[le.HasDecoratorInputTransform,"total","total",t=>fn(t,0)],loading:"loading",loadingDelay:[le.HasDecoratorInputTransform,"loadingDelay","loadingDelay",fn],loadingIndicator:"loadingIndicator",bordered:[le.HasDecoratorInputTransform,"bordered","bordered",it],size:"size",scroll:"scroll",singleSort:"singleSort",multiSort:"multiSort",rowClassName:"rowClassName",clickRowClassName:"clickRowClassName",widthMode:"widthMode",widthConfig:"widthConfig",resizable:"resizable",header:"header",showHeader:[le.HasDecoratorInputTransform,"showHeader","showHeader",it],footer:"footer",bodyHeader:"bodyHeader",body:"body",expandRowByClick:[le.HasDecoratorInputTransform,"expandRowByClick","expandRowByClick",it],expandAccordion:[le.HasDecoratorInputTransform,"expandAccordion","expandAccordion",it],expand:"expand",noResult:"noResult",responsive:[le.HasDecoratorInputTransform,"responsive","responsive",it],responsiveHideHeaderFooter:[le.HasDecoratorInputTransform,"responsiveHideHeaderFooter","responsiveHideHeaderFooter",it],virtualScroll:[le.HasDecoratorInputTransform,"virtualScroll","virtualScroll",it],virtualItemSize:[le.HasDecoratorInputTransform,"virtualItemSize","virtualItemSize",fn],virtualMaxBufferPx:[le.HasDecoratorInputTransform,"virtualMaxBufferPx","virtualMaxBufferPx",fn],virtualMinBufferPx:[le.HasDecoratorInputTransform,"virtualMinBufferPx","virtualMinBufferPx",fn],customRequest:"customRequest",virtualForTrackBy:"virtualForTrackBy"},outputs:{error:"error",change:"change"},exportAs:["st"],features:[Ve([LT,VT,NT,kT,Hl,Op,Rl]),fi,oe],decls:21,vars:34,consts:[["titleTpl",""],["chkAllTpl",""],[3,"nzData","nzPageIndex","nzPageSize","nzTotal","nzShowPagination","nzFrontPagination","nzBordered","nzSize","nzLoading","nzLoadingDelay","nzLoadingIndicator","nzTitle","nzFooter","nzScroll","nzVirtualItemSize","nzVirtualMaxBufferPx","nzVirtualMinBufferPx","nzVirtualForTrackBy","nzNoResult","nzPageSizeOptions","nzShowQuickJumper","nzShowSizeChanger","nzPaginationPosition","nzPaginationType","nzItemRender","nzSimple","nzShowTotal","nzWidthConfig","nzPageIndexChange","nzPageSizeChange","contextmenu"],["table",""],[1,"st__body"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["bodyTpl",""],["nz-virtual-scroll",""],["totalTpl",""],["contextmenuTpl","nzDropdownMenu"],["nz-menu","",1,"st__contextmenu"],[3,"innerHTML"],["class","st__head-optional",3,"innerHTML"],["class","st__head-tip","nz-tooltip","","nz-icon","","nzType","question-circle",3,"nzTooltipTitle"],[1,"st__head-optional",3,"innerHTML"],["nz-tooltip","","nz-icon","","nzType","question-circle",1,"st__head-tip",3,"nzTooltipTitle"],["nz-checkbox","",1,"st__checkall",3,"nzDisabled","ngModel","nzIndeterminate","ngModelChange"],["nzWidth","50px",3,"rowSpan"],["nz-resizable","",3,"colSpan","rowSpan","nzWidth","nzLeft","nzRight","ngClass","nzShowSort","nzSortOrder","nzCustomFilter","st__has-filter","nzDisabled","nzMaxWidth","nzMinWidth","nzBounds","nzPreview","nzSortOrderChange","nzResizeEnd",4,"let"],["nz-resizable","",3,"colSpan","rowSpan","nzWidth","nzLeft","nzRight","ngClass","nzShowSort","nzSortOrder","nzCustomFilter","nzDisabled","nzMaxWidth","nzMinWidth","nzBounds","nzPreview","nzSortOrderChange","nzResizeEnd"],["nzDirection","right"],["nz-th-extra","",3,"col","f","locale"],[1,"ant-table-selection"],["class","ant-table-selection-extra"],["selectionMenu","nzDropdownMenu"],["nz-menu","",1,"ant-table-selection-menu"],[1,"ant-table-selection-extra"],["nz-dropdown","","nzPlacement","bottomLeft",1,"ant-table-selection-down","st__checkall-selection",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["nz-menu-item","",3,"innerHTML","click"],["nz-menu-item","",3,"innerHTML"],["nz-th-extra","",3,"col","f","locale","n","handle"],["nz-resizable","",3,"colSpan","rowSpan","nzWidth","nzLeft","nzRight","ngClass","nzShowSort","nzSortOrder","nzCustomFilter","st__has-filter","nzDisabled","nzMaxWidth","nzMinWidth","nzBounds","nzPreview"],[3,"ngClass","click","dblclick"],["nzWidth","50px",3,"nzShowExpand","nzExpand"],[3,"nzExpand"],["nzWidth","50px",3,"nzShowExpand","nzExpand","nzExpandChange","click"],[3,"nzLeft","nzRight","ngClass"],["class","ant-table-rep__title"],[3,"data","i","index","c","cIdx","n"],[1,"ant-table-rep__title"],["nz-submenu","",3,"nzTitle"]],template:function(i,r){if(i&1&&(_(0,QG,3,3,"ng-template",null,0,_e)(2,XG,1,5,"ng-template",null,1,_e),C(4,"nz-table",2,3),A("nzPageIndexChange",function(a){return r.pi=a})("nzPageIndexChange",function(){return r._change("pi")})("nzPageSizeChange",function(a){return r.ps=a})("nzPageSizeChange",function(){return r._change("ps")})("contextmenu",function(a){return r.onContextmenu(a)}),_(6,yH,3,0,"thead"),C(7,"tbody",4),_(8,_H,1,4,null,5)(9,zH,6,9,"ng-template",null,6,_e)(11,RH,1,0,null,7)(12,MH,2,0)(13,AH,1,4,null,5),S(),_(14,NH,1,1,"ng-template",null,8,_e),S(),C(16,"nz-dropdown-menu",null,9)(18,"ul",10),Cn(19,GH,2,1,null,null,yn),S()()),i&2){let s=te(15);f(4),k("st__no-column",r.noColumns),h("nzData",r._data)("nzPageIndex",r.pi)("nzPageSize",r.ps)("nzTotal",r.total)("nzShowPagination",r._isPagination)("nzFrontPagination",!1)("nzBordered",r.bordered)("nzSize",r.size)("nzLoading",r.noColumns||r._loading)("nzLoadingDelay",r.loadingDelay)("nzLoadingIndicator",r.loadingIndicator)("nzTitle",r.header)("nzFooter",r.footer)("nzScroll",r.scroll)("nzVirtualItemSize",r.virtualItemSize)("nzVirtualMaxBufferPx",r.virtualMaxBufferPx)("nzVirtualMinBufferPx",r.virtualMinBufferPx)("nzVirtualForTrackBy",r.virtualForTrackBy)("nzNoResult",r.noResult)("nzPageSizeOptions",r.page.pageSizes)("nzShowQuickJumper",r.page.showQuickJumper)("nzShowSizeChanger",r.page.showSize)("nzPaginationPosition",r.page.position)("nzPaginationType",r.page.type)("nzItemRender",r.page.itemRender)("nzSimple",r.page.simple)("nzShowTotal",s)("nzWidthConfig",r._widthConfig),f(2),ie(6,r.showHeader?6:-1),f(2),ie(8,r._loading?-1:8),f(3),ie(11,r.virtualScroll?11:12),f(2),ie(13,r._loading?-1:13),f(6),_n(r.contextmenuList)}},dependencies:()=>[St,Be,Kt,Rt,DT,ev,uh,tT,Xm,Qm,rT,tv,nv,Jm,Ym,oT,Zm,Fe,Bi,cs,co,Jp,yr,us,Si,MT,FT,R3,P3],encapsulation:2,changeDetection:0});let o=n;return o})(),P3=(()=>{let n=class n{constructor(){this.stComp=ae(I3,{host:!0}),this.router=ae(mi),this.modalHelper=ae(fw),this.drawerHelper=ae(gw),this.n=new O}get routerState(){let{pi:t,ps:i,total:r}=this.stComp;return{pi:t,ps:i,total:r}}report(t){this.n.emit({type:t,item:this.i,col:this.c})}_checkbox(t){this.i.checked=t,this.report("checkbox")}_radio(){this.data.filter(t=>!t.disabled).forEach(t=>t.checked=!1),this.i.checked=!0,this.report("radio")}_link(t){this._stopPropagation(t);let i=this.c.click(this.i,this.stComp);return typeof i=="string"&&this.router.navigateByUrl(i,{state:this.routerState}),!1}_stopPropagation(t){t.preventDefault(),t.stopPropagation()}_btn(t,i){i?.stopPropagation();let r=this.stComp.cog,s=this.i;if(t.type==="modal"||t.type==="static"){r.modal.pureRecoard===!0&&(s=this.stComp.pureItem(s));let a=t.modal,l={[a.paramsName]:s};this.modalHelper[t.type==="modal"?"create":"createStatic"](a.component,V(V({},l),a.params&&a.params(s)),Pl({},!0,r.modal,a)).pipe(Qe(c=>typeof c<"u")).subscribe(c=>this.btnCallback(s,t,c));return}else if(t.type==="drawer"){r.drawer.pureRecoard===!0&&(s=this.stComp.pureItem(s));let a=t.drawer,l={[a.paramsName]:s};this.drawerHelper.create(a.title,a.component,V(V({},l),a.params&&a.params(s)),Pl({},!0,r.drawer,a)).pipe(Qe(c=>typeof c<"u")).subscribe(c=>this.btnCallback(s,t,c));return}else if(t.type==="link"){let a=this.btnCallback(s,t);typeof a=="string"&&this.router.navigateByUrl(a,{state:this.routerState});return}this.btnCallback(s,t)}btnCallback(t,i,r){if(i.click)if(typeof i.click=="string")switch(i.click){case"load":this.stComp.load();break;case"reload":this.stComp.reload();break}else return i.click(t,r,this.stComp)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["st-td"]],inputs:{c:"c",cIdx:"cIdx",data:"data",i:"i",index:"index"},outputs:{n:"n"},decls:8,vars:1,consts:[["btnTpl",""],["btnItemTpl",""],["btnTextTpl",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-tooltip","",3,"nzTooltipTitle","d-block","width-100"],["nz-tooltip","",3,"nzTooltipTitle"],["nz-popconfirm","","class","st__btn-text",3,"nzPopconfirmTitle","nzIcon","nzCondition","nzCancelText","nzOkText","nzOkType","ngClass"],["nz-popconfirm","",1,"st__btn-text",3,"nzPopconfirmTitle","nzIcon","nzCondition","nzCancelText","nzOkText","nzOkType","ngClass","nzOnConfirm","click"],[1,"st__btn-text",3,"ngClass","click"],[3,"innerHTML","ngClass"],["nz-icon","",3,"nzIconfont"],["nz-icon","",3,"nzType","nzTheme","nzSpin","nzTwotoneColor"],["nz-checkbox","",3,"nzDisabled","ngModel","ngModelChange"],["nz-radio","",3,"nzDisabled","ngModel","ngModelChange"],[3,"innerHTML","click"],[3,"nzColor","nz-tooltip"],[3,"innerHTML"],[3,"nzStatus","nzText","nz-tooltip"],[3,"value","options"],["st-widget-host","",3,"record","column"],[3,"innerText"],["nzType","vertical"],["nz-dropdown","","nzOverlayClassName","st__btn-sub",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["btnMenu","nzDropdownMenu"],["nz-menu",""],["nz-menu-divider",""],["nz-menu-item",""]],template:function(i,r){i&1&&_(0,WH,2,1,"ng-template",null,0,_e)(2,QH,2,1,"ng-template",null,1,_e)(4,t3,2,5,"ng-template",null,2,_e)(6,r3,1,6,null,3)(7,z3,10,1),i&2&&(f(6),ie(6,r.c.__render?6:7))},dependencies:[St,Be,Kt,Rt,Hm,bT,Fe,_u,Bi,pv,cs,co,Ob,yr,Rb,us,ls,bu,Si,O3],encapsulation:2,changeDetection:0});let o=n;return o})();var Ch=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,nn,su,RT,bb,rc,nc,Ge,Up,$i,oc,Lr,ec,Jl,Xp,Vs,ji,AT,Gs,Hs]});let o=n;return o})();function ome(...o){return ba([{provide:wa,multi:!0,useValue:()=>{let n=ae(vv);o.forEach(e=>n.register(e.KEY,e.type))}}])}var Aa=(()=>{let n=class n{getGutter(){let t=[null,null],i=this.nzGutter||0;return(Array.isArray(i)?i:[i,null]).forEach((s,a)=>{typeof s=="object"&&s!==null?(t[a]=null,Object.keys(xa).map(l=>{let c=l;this.mediaMatcher.matchMedia(xa[c]).matches&&s[c]&&(t[a]=s[c])})):t[a]=Number(s)||null}),t}setGutterStyle(){let[t,i]=this.getGutter();this.actualGutter$.next([t,i]);let r=(s,a)=>{let l=this.elementRef.nativeElement;a!==null&&this.renderer.setStyle(l,s,`-${a/2}px`)};r("margin-left",t),r("margin-right",t),r("margin-top",i),r("margin-bottom",i)}constructor(t,i,r,s,a,l,c){this.elementRef=t,this.renderer=i,this.mediaMatcher=r,this.ngZone=s,this.platform=a,this.breakpointService=l,this.directionality=c,this.nzAlign=null,this.nzJustify=null,this.nzGutter=null,this.actualGutter$=new tn(1),this.dir="ltr",this.destroy$=new J}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t}),this.setGutterStyle()}ngOnChanges(t){t.nzGutter&&this.setGutterStyle()}ngAfterViewInit(){this.platform.isBrowser&&this.breakpointService.subscribe(xa).pipe(F(this.destroy$)).subscribe(()=>{this.setGutterStyle()})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(yp),w($e),w(gn),w(Ip),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-row",""],["nz-row"],["nz-form-item"]],hostAttrs:[1,"ant-row"],hostVars:20,hostBindings:function(i,r){i&2&&k("ant-row-top",r.nzAlign==="top")("ant-row-middle",r.nzAlign==="middle")("ant-row-bottom",r.nzAlign==="bottom")("ant-row-start",r.nzJustify==="start")("ant-row-end",r.nzJustify==="end")("ant-row-center",r.nzJustify==="center")("ant-row-space-around",r.nzJustify==="space-around")("ant-row-space-between",r.nzJustify==="space-between")("ant-row-space-evenly",r.nzJustify==="space-evenly")("ant-row-rtl",r.dir==="rtl")},inputs:{nzAlign:"nzAlign",nzJustify:"nzJustify",nzGutter:"nzGutter"},exportAs:["nzRow"],standalone:!0,features:[oe]});let o=n;return o})(),sc=(()=>{let n=class n{setHostClassMap(){let t=V({"ant-col":!0,[`ant-col-${this.nzSpan}`]:ht(this.nzSpan),[`ant-col-order-${this.nzOrder}`]:ht(this.nzOrder),[`ant-col-offset-${this.nzOffset}`]:ht(this.nzOffset),[`ant-col-pull-${this.nzPull}`]:ht(this.nzPull),[`ant-col-push-${this.nzPush}`]:ht(this.nzPush),"ant-col-rtl":this.dir==="rtl"},this.generateClass());for(let i in this.classMap)this.classMap.hasOwnProperty(i)&&this.renderer.removeClass(this.elementRef.nativeElement,i);this.classMap=V({},t);for(let i in this.classMap)this.classMap.hasOwnProperty(i)&&this.classMap[i]&&this.renderer.addClass(this.elementRef.nativeElement,i)}setHostFlexStyle(){this.hostFlexStyle=this.parseFlex(this.nzFlex)}parseFlex(t){return typeof t=="number"?`${t} ${t} auto`:typeof t=="string"&&/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?`0 0 ${t}`:t}generateClass(){let t=["nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],i={};return t.forEach(r=>{let s=r.replace("nz","").toLowerCase();if(ht(this[r]))if(typeof this[r]=="number"||typeof this[r]=="string")i[`ant-col-${s}-${this[r]}`]=!0;else{let a=this[r];["span","pull","push","offset","order"].forEach(c=>{let u=c==="span"?"-":`-${c}-`;i[`ant-col-${s}${u}${a[c]}`]=a&&ht(a[c])})}}),i}constructor(t,i,r,s){this.elementRef=t,this.nzRowDirective=i,this.renderer=r,this.directionality=s,this.classMap={},this.destroy$=new J,this.hostFlexStyle=null,this.dir="ltr",this.nzFlex=null,this.nzSpan=null,this.nzOrder=null,this.nzOffset=null,this.nzPush=null,this.nzPull=null,this.nzXs=null,this.nzSm=null,this.nzMd=null,this.nzLg=null,this.nzXl=null,this.nzXXl=null}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.setHostClassMap()}),this.setHostClassMap(),this.setHostFlexStyle()}ngOnChanges(t){this.setHostClassMap();let{nzFlex:i}=t;i&&this.setHostFlexStyle()}ngAfterViewInit(){this.nzRowDirective&&this.nzRowDirective.actualGutter$.pipe(F(this.destroy$)).subscribe(([t,i])=>{let r=(s,a)=>{let l=this.elementRef.nativeElement;a!==null&&this.renderer.setStyle(l,s,`${a/2}px`)};r("padding-left",t),r("padding-right",t),r("padding-top",i),r("padding-bottom",i)})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Aa,9),w(He),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-col",""],["nz-col"],["nz-form-control"],["nz-form-label"]],hostVars:2,hostBindings:function(i,r){i&2&&Re("flex",r.hostFlexStyle)},inputs:{nzFlex:"nzFlex",nzSpan:"nzSpan",nzOrder:"nzOrder",nzOffset:"nzOffset",nzPush:"nzPush",nzPull:"nzPull",nzXs:"nzXs",nzSm:"nzSm",nzMd:"nzMd",nzLg:"nzLg",nzXl:"nzXl",nzXXl:"nzXXl"},exportAs:["nzCol"],standalone:!0,features:[oe]});let o=n;return o})(),$s=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var yv=["*"];function F3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.innerTip)}}var A3=o=>[o],N3=o=>({$implicit:o});function L3(o,n){if(o&1&&(C(0,"div",4)(1,"div",5),_(2,F3,2,1,"ng-container",6),S()()),o&2){let e=m();h("@helpMotion",void 0),f(),h("ngClass",yt(4,A3,"ant-form-item-explain-"+e.status)),f(),h("nzStringTemplateOutlet",e.innerTip)("nzStringTemplateOutletContext",yt(6,N3,e.validateControl))}}function k3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzExtra)}}function V3(o,n){if(o&1&&(C(0,"div",7),_(1,k3,2,1,"ng-container",8),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzExtra)}}function G3(o,n){if(o&1&&(H(0),R(1,"span",3),B()),o&2){let e=n.$implicit,t=m(2);f(),h("nzType",e)("nzTheme",t.tooltipIcon.theme)}}function H3(o,n){if(o&1&&(C(0,"span",1),_(1,G3,2,2,"ng-container",2),S()),o&2){let e=m();h("nzTooltipTitle",e.nzTooltipTitle),f(),h("nzStringTemplateOutlet",e.tooltipIcon.type)}}var Na=(()=>{let n=class n{setWithHelpViaTips(t){this.withHelpClass=t,this.cdr.markForCheck()}setStatus(t){this.status=t,this.cdr.markForCheck()}setHasFeedback(t){this.hasFeedback=t,this.cdr.markForCheck()}constructor(t){this.cdr=t,this.status="",this.hasFeedback=!1,this.withHelpClass=!1,this.destroy$=new J}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-form-item"]],hostAttrs:[1,"ant-form-item"],hostVars:12,hostBindings:function(i,r){i&2&&k("ant-form-item-has-success",r.status==="success")("ant-form-item-has-warning",r.status==="warning")("ant-form-item-has-error",r.status==="error")("ant-form-item-is-validating",r.status==="validating")("ant-form-item-has-feedback",r.hasFeedback&&r.status)("ant-form-item-with-help",r.withHelpClass)},exportAs:["nzFormItem"],standalone:!0,features:[K],ngContentSelectors:yv,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),B3="form",Cv={type:"question-circle",theme:"outline"},_h=(()=>{let n=class n{getInputObservable(t){return this.inputChanges$.pipe(Qe(i=>t in i),We(i=>i[t]))}constructor(t,i){this.nzConfigService=t,this.directionality=i,this._nzModuleName=B3,this.nzLayout="horizontal",this.nzNoColon=!1,this.nzAutoTips={},this.nzDisableAutoTips=!1,this.nzTooltipIcon=Cv,this.nzLabelAlign="right",this.nzLabelWrap=!1,this.dir="ltr",this.destroy$=new J,this.inputChanges$=new J,this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(r=>{this.dir=r})}ngOnChanges(t){this.inputChanges$.next(t)}ngOnDestroy(){this.inputChanges$.complete(),this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-form",""]],hostAttrs:[1,"ant-form"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-form-horizontal",r.nzLayout==="horizontal")("ant-form-vertical",r.nzLayout==="vertical")("ant-form-inline",r.nzLayout==="inline")("ant-form-rtl",r.dir==="rtl")},inputs:{nzLayout:"nzLayout",nzNoColon:"nzNoColon",nzAutoTips:"nzAutoTips",nzDisableAutoTips:"nzDisableAutoTips",nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:"nzLabelWrap"},exportAs:["nzForm"],standalone:!0,features:[oe]});let o=n;return N([De(),W()],o.prototype,"nzNoColon",void 0),N([De()],o.prototype,"nzAutoTips",void 0),N([W()],o.prototype,"nzDisableAutoTips",void 0),N([De()],o.prototype,"nzTooltipIcon",void 0),N([De(),W()],o.prototype,"nzLabelWrap",void 0),o})(),_v=(()=>{let n=class n{get disableAutoTips(){return this.nzDisableAutoTips!=="default"?os(this.nzDisableAutoTips):this.nzFormDirective?.nzDisableAutoTips}set nzHasFeedback(t){this._hasFeedback=os(t),this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this._hasFeedback}),this.nzFormItemComponent&&this.nzFormItemComponent.setHasFeedback(this._hasFeedback)}get nzHasFeedback(){return this._hasFeedback}set nzValidateStatus(t){t instanceof Ms||t instanceof Rt?(this.validateControl=t,this.validateString=null,this.watchControl()):t instanceof yu?(this.validateControl=t.control,this.validateString=null,this.watchControl()):(this.validateString=t,this.validateControl=null,this.setStatus())}watchControl(){this.validateChanges.unsubscribe(),this.validateControl&&this.validateControl.statusChanges&&(this.validateChanges=this.validateControl.statusChanges.pipe(Ot(null),F(this.destroyed$)).subscribe(()=>{this.disableAutoTips||this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck()}))}setStatus(){this.status=this.getControlStatus(this.validateString),this.innerTip=this.getInnerTip(this.status),this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this.nzHasFeedback}),this.nzFormItemComponent&&(this.nzFormItemComponent.setWithHelpViaTips(!!this.innerTip),this.nzFormItemComponent.setStatus(this.status))}getControlStatus(t){let i;return t==="warning"||this.validateControlStatus("INVALID","warning")?i="warning":t==="error"||this.validateControlStatus("INVALID")?i="error":t==="validating"||t==="pending"||this.validateControlStatus("PENDING")?i="validating":t==="success"||this.validateControlStatus("VALID")?i="success":i="",i}validateControlStatus(t,i){if(this.validateControl){let{dirty:r,touched:s,status:a}=this.validateControl;return(!!r||!!s)&&(i?this.validateControl.hasError(i):a===t)}else return!1}getInnerTip(t){switch(t){case"error":return!this.disableAutoTips&&this.autoErrorTip||this.nzErrorTip||null;case"validating":return this.nzValidatingTip||null;case"success":return this.nzSuccessTip||null;case"warning":return this.nzWarningTip||null;default:return null}}updateAutoErrorTip(){if(this.validateControl){let t=this.validateControl.errors||{},i="";for(let r in t)if(t.hasOwnProperty(r)&&(i=t[r]?.[this.localeId]??this.nzAutoTips?.[this.localeId]?.[r]??this.nzAutoTips.default?.[r]??this.nzFormDirective?.nzAutoTips?.[this.localeId]?.[r]??this.nzFormDirective?.nzAutoTips.default?.[r]),i)break;this.autoErrorTip=i}}subscribeAutoTips(t){t?.pipe(F(this.destroyed$)).subscribe(()=>{this.disableAutoTips||(this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck())})}constructor(t,i,r,s,a){this.nzFormItemComponent=t,this.cdr=i,this.nzFormDirective=s,this.nzFormStatusService=a,this._hasFeedback=!1,this.validateChanges=lr.EMPTY,this.validateString=null,this.destroyed$=new J,this.status="",this.validateControl=null,this.innerTip=null,this.nzAutoTips={},this.nzDisableAutoTips="default",this.subscribeAutoTips(r.localeChange.pipe(CS(l=>this.localeId=l.locale))),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzAutoTips")),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzDisableAutoTips").pipe(Qe(()=>this.nzDisableAutoTips==="default")))}ngOnChanges(t){let{nzDisableAutoTips:i,nzAutoTips:r,nzSuccessTip:s,nzWarningTip:a,nzErrorTip:l,nzValidatingTip:c}=t;i||r?(this.updateAutoErrorTip(),this.setStatus()):(s||a||l||c)&&this.setStatus()}ngOnInit(){this.setStatus()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}ngAfterContentInit(){!this.validateControl&&!this.validateString&&(this.defaultValidateControl instanceof Dm?this.nzValidateStatus=this.defaultValidateControl.control:this.nzValidateStatus=this.defaultValidateControl)}};n.\u0275fac=function(i){return new(i||n)(w(Na,9),w(fe),w(Di),w(_h,8),w(cn))},n.\u0275cmp=j({type:n,selectors:[["nz-form-control"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Ri,5),i&2){let a;ce(a=ue())&&(r.defaultValidateControl=a.first)}},hostAttrs:[1,"ant-form-item-control"],inputs:{nzSuccessTip:"nzSuccessTip",nzWarningTip:"nzWarningTip",nzErrorTip:"nzErrorTip",nzValidatingTip:"nzValidatingTip",nzExtra:"nzExtra",nzAutoTips:"nzAutoTips",nzDisableAutoTips:"nzDisableAutoTips",nzHasFeedback:"nzHasFeedback",nzValidateStatus:"nzValidateStatus"},exportAs:["nzFormControl"],standalone:!0,features:[Ve([cn]),oe,K],ngContentSelectors:yv,decls:5,vars:2,consts:[[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],["class","ant-form-item-explain ant-form-item-explain-connected",4,"ngIf"],["class","ant-form-item-extra",4,"ngIf"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],["role","alert",3,"ngClass"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[1,"ant-form-item-extra"],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0)(1,"div",1),Ie(2),S()(),_(3,L3,3,8,"div",2)(4,V3,2,1,"div",3)),i&2&&(f(3),h("ngIf",r.innerTip),f(),h("ngIf",r.nzExtra))},dependencies:[St,Ye,Ue,we],encapsulation:2,data:{animation:[jl]},changeDetection:0});let o=n;return o})();function HT(o){let n=typeof o=="string"?{type:o}:o;return V(V({},Cv),n)}var $3=(()=>{let n=class n{set nzNoColon(t){this.noColon=os(t)}get nzNoColon(){return this.noColon!=="default"?this.noColon:this.nzFormDirective?.nzNoColon}set nzTooltipIcon(t){this._tooltipIcon=HT(t)}get tooltipIcon(){return this._tooltipIcon!=="default"?this._tooltipIcon:HT(this.nzFormDirective?.nzTooltipIcon||Cv)}set nzLabelAlign(t){this.labelAlign=t}get nzLabelAlign(){return this.labelAlign!=="default"?this.labelAlign:this.nzFormDirective?.nzLabelAlign||"right"}set nzLabelWrap(t){this.labelWrap=os(t)}get nzLabelWrap(){return this.labelWrap!=="default"?this.labelWrap:this.nzFormDirective?.nzLabelWrap}constructor(t,i){this.cdr=t,this.nzFormDirective=i,this.nzRequired=!1,this.noColon="default",this._tooltipIcon="default",this.labelAlign="default",this.labelWrap="default",this.destroy$=new J,this.nzFormDirective&&(this.nzFormDirective.getInputObservable("nzNoColon").pipe(Qe(()=>this.noColon==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzTooltipIcon").pipe(Qe(()=>this._tooltipIcon==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelAlign").pipe(Qe(()=>this.labelAlign==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelWrap").pipe(Qe(()=>this.labelWrap==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(_h,12))},n.\u0275cmp=j({type:n,selectors:[["nz-form-label"]],hostAttrs:[1,"ant-form-item-label"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-form-item-label-left",r.nzLabelAlign==="left")("ant-form-item-label-wrap",r.nzLabelWrap)},inputs:{nzFor:"nzFor",nzRequired:"nzRequired",nzNoColon:"nzNoColon",nzTooltipTitle:"nzTooltipTitle",nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:"nzLabelWrap"},exportAs:["nzFormLabel"],standalone:!0,features:[K],ngContentSelectors:yv,decls:3,vars:6,consts:[["class","ant-form-item-tooltip","nz-tooltip","",3,"nzTooltipTitle",4,"ngIf"],["nz-tooltip","",1,"ant-form-item-tooltip",3,"nzTooltipTitle"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType","nzTheme"]],template:function(i,r){i&1&&(Pe(),C(0,"label"),Ie(1),_(2,H3,2,2,"span",0),S()),i&2&&(k("ant-form-item-no-colon",r.nzNoColon)("ant-form-item-required",r.nzRequired),ze("for",r.nzFor),f(2),h("ngIf",r.nzTooltipTitle))},dependencies:[we,Ye,Ue,Si,Ge,Fe],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzRequired",void 0),o})();var ac=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[$3,_v,$s]});let o=n;return o})();var j3=["switchElement"];function W3(o,n){o&1&&R(0,"span",8)}function U3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzCheckedChildren)}}function K3(o,n){if(o&1&&(H(0),_(1,U3,2,1,"ng-container",9),B()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzCheckedChildren)}}function q3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzUnCheckedChildren)}}function Y3(o,n){if(o&1&&_(0,q3,2,1,"ng-container",9),o&2){let e=m();h("nzStringTemplateOutlet",e.nzUnCheckedChildren)}}var Q3="switch",wv=(()=>{let n=class n{updateValue(t){this.isChecked!==t&&(this.isChecked=t,this.onChange(this.isChecked))}focus(){this.focusMonitor.focusVia(this.switchElement.nativeElement,"keyboard")}blur(){this.switchElement.nativeElement.blur()}constructor(t,i,r,s,a,l){this.nzConfigService=t,this.host=i,this.ngZone=r,this.cdr=s,this.focusMonitor=a,this.directionality=l,this._nzModuleName=Q3,this.isChecked=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzLoading=!1,this.nzDisabled=!1,this.nzControl=!1,this.nzCheckedChildren=null,this.nzUnCheckedChildren=null,this.nzSize="default",this.nzId=null,this.dir="ltr",this.destroy$=new J,this.isNzDisableFirstChange=!0}ngOnInit(){this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{Ke(this.host.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.preventDefault(),!(this.nzControl||this.nzDisabled||this.nzLoading)&&this.ngZone.run(()=>{this.updateValue(!this.isChecked),this.cdr.markForCheck()})}),Ke(this.switchElement.nativeElement,"keydown").pipe(F(this.destroy$)).subscribe(t=>{if(this.nzControl||this.nzDisabled||this.nzLoading)return;let{keyCode:i}=t;i!==37&&i!==39&&i!==32&&i!==13||(t.preventDefault(),this.ngZone.run(()=>{i===37?this.updateValue(!1):i===39?this.updateValue(!0):(i===32||i===13)&&this.updateValue(!this.isChecked),this.cdr.markForCheck()}))})})}ngAfterViewInit(){this.focusMonitor.monitor(this.switchElement.nativeElement,!0).pipe(F(this.destroy$)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched())})}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.switchElement.nativeElement),this.destroy$.next(),this.destroy$.complete()}writeValue(t){this.isChecked=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(de),w($e),w(fe),w(Oi),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-switch"]],viewQuery:function(i,r){if(i&1&&xe(j3,7),i&2){let s;ce(s=ue())&&(r.switchElement=s.first)}},inputs:{nzLoading:"nzLoading",nzDisabled:"nzDisabled",nzControl:"nzControl",nzCheckedChildren:"nzCheckedChildren",nzUnCheckedChildren:"nzUnCheckedChildren",nzSize:"nzSize",nzId:"nzId"},exportAs:["nzSwitch"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],decls:9,vars:16,consts:[["nz-wave","","type","button",1,"ant-switch",3,"disabled","nzWaveExtraNode"],["switchElement",""],[1,"ant-switch-handle"],["nz-icon","","nzType","loading","class","ant-switch-loading-icon",4,"ngIf"],[1,"ant-switch-inner"],[4,"ngIf","ngIfElse"],["uncheckTemplate",""],[1,"ant-click-animating-node"],["nz-icon","","nzType","loading",1,"ant-switch-loading-icon"],[4,"nzStringTemplateOutlet"]],template:function(i,r){if(i&1&&(C(0,"button",0,1)(2,"span",2),_(3,W3,1,0,"span",3),S(),C(4,"span",4),_(5,K3,2,1,"ng-container",5)(6,Y3,1,1,"ng-template",null,6,_e),S(),R(8,"div",7),S()),i&2){let s=te(7);k("ant-switch-checked",r.isChecked)("ant-switch-loading",r.nzLoading)("ant-switch-disabled",r.nzDisabled)("ant-switch-small",r.nzSize==="small")("ant-switch-rtl",r.dir==="rtl"),h("disabled",r.nzDisabled)("nzWaveExtraNode",!0),ze("id",r.nzId),f(3),h("ngIf",r.nzLoading),f(2),h("ngIf",r.isChecked)("ngIfElse",s)}},dependencies:[lw,hr,Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzLoading",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzControl",void 0),N([De()],o.prototype,"nzSize",void 0),o})(),lc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[wv]});let o=n;return o})();var xz=cS(nC(),1),zz=cS(_z(),1);var bc=class o{get treeService(){return this.service||this.parentNode&&this.parentNode.treeService}constructor(n,e=null,t=null){if(this._title="",this.level=0,this.parentNode=null,this._icon="",this._children=[],this._isLeaf=!1,this._isChecked=!1,this._isSelectable=!1,this._isDisabled=!1,this._isDisableCheckbox=!1,this._isExpanded=!1,this._isHalfChecked=!1,this._isSelected=!1,this._isLoading=!1,this.canHide=!1,this.isMatched=!1,this.service=null,n instanceof o)return n;this.service=t||null,this.origin=n,this.key=n.key,this.parentNode=e,this._title=n.title||"---",this._icon=n.icon||"",this._isLeaf=n.isLeaf||!1,this._children=[],this._isChecked=n.checked||!1,this._isSelectable=n.disabled||n.selectable!==!1,this._isDisabled=n.disabled||!1,this._isDisableCheckbox=n.disableCheckbox||!1,this._isExpanded=n.isLeaf?!1:n.expanded||!1,this._isHalfChecked=!1,this._isSelected=!n.disabled&&n.selected||!1,this._isLoading=!1,this.isMatched=!1,e?this.level=e.level+1:this.level=0,typeof n.children<"u"&&n.children!==null&&n.children.forEach(i=>{let r=this.treeService;r&&!r.isCheckStrictly&&n.checked&&!n.disabled&&!i.disabled&&!i.disableCheckbox&&(i.checked=n.checked),this._children.push(new o(i,this))})}get title(){return this._title}set title(n){this._title=n,this.update()}get icon(){return this._icon}set icon(n){this._icon=n,this.update()}get children(){return this._children}set children(n){this._children=n,this.update()}get isLeaf(){return this._isLeaf}set isLeaf(n){this._isLeaf=n,this.update()}get isChecked(){return this._isChecked}set isChecked(n){this._isChecked=n,this.origin.checked=n,this.afterValueChange("isChecked")}get isHalfChecked(){return this._isHalfChecked}set isHalfChecked(n){this._isHalfChecked=n,this.afterValueChange("isHalfChecked")}get isSelectable(){return this._isSelectable}set isSelectable(n){this._isSelectable=n,this.update()}get isDisabled(){return this._isDisabled}set isDisabled(n){this._isDisabled=n,this.update()}get isDisableCheckbox(){return this._isDisableCheckbox}set isDisableCheckbox(n){this._isDisableCheckbox=n,this.update()}get isExpanded(){return this._isExpanded}set isExpanded(n){this._isExpanded=n,this.origin.expanded=n,this.afterValueChange("isExpanded"),this.afterValueChange("reRender")}get isSelected(){return this._isSelected}set isSelected(n){this._isSelected=n,this.origin.selected=n,this.afterValueChange("isSelected")}get isLoading(){return this._isLoading}set isLoading(n){this._isLoading=n,this.update()}setSyncChecked(n=!1,e=!1){this.setChecked(n,e),this.treeService&&!this.treeService.isCheckStrictly&&this.treeService.conduct(this)}setChecked(n=!1,e=!1){this.origin.checked=n,this.isChecked=n,this.isHalfChecked=e}setExpanded(n){this._isExpanded=n,this.origin.expanded=n,this.afterValueChange("isExpanded")}getParentNode(){return this.parentNode}getChildren(){return this.children}addChildren(n,e=-1){this.isLeaf||(n.forEach(t=>{let i=s=>{s.getChildren().forEach(a=>{a.level=a.getParentNode().level+1,a.origin.level=a.level,i(a)})},r=t;r instanceof o?r.parentNode=this:r=new o(t,this),r.level=this.level+1,r.origin.level=r.level,i(r);try{e===-1?this.children.push(r):this.children.splice(e,0,r)}catch{}}),this.origin.children=this.getChildren().map(t=>t.origin),this.isLoading=!1),this.afterValueChange("addChildren"),this.afterValueChange("reRender")}clearChildren(){this.afterValueChange("clearChildren"),this.children=[],this.origin.children=[],this.afterValueChange("reRender")}remove(){let n=this.getParentNode();n&&(n.children=n.getChildren().filter(e=>e.key!==this.key),n.origin.children=n.origin.children.filter(e=>e.key!==this.key),this.afterValueChange("remove"),this.afterValueChange("reRender"))}afterValueChange(n){if(this.treeService)switch(n){case"isChecked":this.treeService.setCheckedNodeList(this);break;case"isHalfChecked":this.treeService.setHalfCheckedNodeList(this);break;case"isExpanded":this.treeService.setExpandedNodeList(this);break;case"isSelected":this.treeService.setNodeActive(this);break;case"clearChildren":this.treeService.afterRemove(this.getChildren());break;case"remove":this.treeService.afterRemove([this]);break;case"reRender":this.treeService.flattenTreeData(this.treeService.rootNodes,this.treeService.getExpandedNodeList().map(e=>e.key));break}this.update()}update(){this.component&&this.component.markForCheck()}};function cC(o){let{isDisabled:n,isDisableCheckbox:e}=o;return!!(n||e)}function Sz(o,n){return n.length>0&&n.indexOf(o)>-1}function u4(o,n){return`${o}-${n}`}function d4(o,n){return o??n}function uC(o=[],n=[]){let e=new Set(n===!0?[]:n),t=[];function i(r,s=null){return r.map((a,l)=>{let c=u4(s?s.pos:"0",l),u=d4(a.key,c);a.isStart=[...s?s.isStart:[],l===0],a.isEnd=[...s?s.isEnd:[],l===r.length-1];let d={parent:s,pos:c,children:[],data:a,isStart:[...s?s.isStart:[],l===0],isEnd:[...s?s.isEnd:[],l===r.length-1]};return t.push(d),n===!0||e.has(u)||a.isExpanded?d.children=i(a.children||[],d):d.children=[],d})}return i(o),t}var Tc=(()=>{let n=class n{constructor(){this.DRAG_SIDE_RANGE=.25,this.DRAG_MIN_GAP=2,this.isCheckStrictly=!1,this.isMultiple=!1,this.rootNodes=[],this.flattenNodes$=new ct([]),this.selectedNodeList=[],this.expandedNodeList=[],this.checkedNodeList=[],this.halfCheckedNodeList=[],this.matchedNodeList=[]}initTree(t){this.rootNodes=t,this.expandedNodeList=[],this.selectedNodeList=[],this.halfCheckedNodeList=[],this.checkedNodeList=[],this.matchedNodeList=[]}flattenTreeData(t,i=[]){this.flattenNodes$.next(uC(t,i).map(r=>r.data))}getSelectedNode(){return this.selectedNode}getSelectedNodeList(){return this.conductNodeState("select")}getCheckedNodeKeys(){let t=[],i=this.getCheckedNodeList(),r=s=>{s.forEach(a=>{t.push(a.key),!(a.children.length<1)&&r(a.children)})};return r(i),t}getCheckedNodeList(){return this.conductNodeState("check")}getHalfCheckedNodeList(){return this.conductNodeState("halfCheck")}getExpandedNodeList(){return this.conductNodeState("expand")}getMatchedNodeList(){return this.conductNodeState("match")}isArrayOfNzTreeNode(t){return t.every(i=>i instanceof bc)}setSelectedNode(t){this.selectedNode=t}setNodeActive(t){!this.isMultiple&&t.isSelected&&(this.selectedNodeList.forEach(i=>{t.key!==i.key&&(i.isSelected=!1)}),this.selectedNodeList=[]),this.setSelectedNodeList(t,this.isMultiple)}setSelectedNodeList(t,i=!1){let r=this.getIndexOfArray(this.selectedNodeList,t.key);i?t.isSelected&&r===-1&&this.selectedNodeList.push(t):t.isSelected&&r===-1&&(this.selectedNodeList=[t]),t.isSelected||(this.selectedNodeList=this.selectedNodeList.filter(s=>s.key!==t.key))}setHalfCheckedNodeList(t){let i=this.getIndexOfArray(this.halfCheckedNodeList,t.key);t.isHalfChecked&&i===-1?this.halfCheckedNodeList.push(t):!t.isHalfChecked&&i>-1&&(this.halfCheckedNodeList=this.halfCheckedNodeList.filter(r=>t.key!==r.key))}setCheckedNodeList(t){let i=this.getIndexOfArray(this.checkedNodeList,t.key);t.isChecked&&i===-1?this.checkedNodeList.push(t):!t.isChecked&&i>-1&&(this.checkedNodeList=this.checkedNodeList.filter(r=>t.key!==r.key))}conductNodeState(t="check"){let i=[];switch(t){case"select":i=this.selectedNodeList;break;case"expand":i=this.expandedNodeList;break;case"match":i=this.matchedNodeList;break;case"check":i=this.checkedNodeList;let r=s=>{let a=s.getParentNode();return a?this.checkedNodeList.findIndex(l=>l.key===a.key)>-1?!0:r(a):!1};this.isCheckStrictly||(i=this.checkedNodeList.filter(s=>!r(s)));break;case"halfCheck":this.isCheckStrictly||(i=this.halfCheckedNodeList);break}return i}setExpandedNodeList(t){if(t.isLeaf)return;let i=this.getIndexOfArray(this.expandedNodeList,t.key);t.isExpanded&&i===-1?this.expandedNodeList.push(t):!t.isExpanded&&i>-1&&this.expandedNodeList.splice(i,1)}setMatchedNodeList(t){let i=this.getIndexOfArray(this.matchedNodeList,t.key);t.isMatched&&i===-1?this.matchedNodeList.push(t):!t.isMatched&&i>-1&&this.matchedNodeList.splice(i,1)}refreshCheckState(t=!1){t||this.checkedNodeList.forEach(i=>{this.conduct(i,t)})}conduct(t,i=!1){let r=t.isChecked;t&&!i&&(this.conductUp(t),this.conductDown(t,r))}conductUp(t){let i=t.getParentNode();i&&(cC(i)||(i.children.every(r=>cC(r)||!r.isHalfChecked&&r.isChecked)?(i.isChecked=!0,i.isHalfChecked=!1):i.children.some(r=>r.isHalfChecked||r.isChecked)?(i.isChecked=!1,i.isHalfChecked=!0):(i.isChecked=!1,i.isHalfChecked=!1)),this.setCheckedNodeList(i),this.setHalfCheckedNodeList(i),this.conductUp(i))}conductDown(t,i){cC(t)||(t.isChecked=i,t.isHalfChecked=!1,this.setCheckedNodeList(t),this.setHalfCheckedNodeList(t),t.children.forEach(r=>{this.conductDown(r,i)}))}afterRemove(t){let i=r=>{this.selectedNodeList=this.selectedNodeList.filter(s=>s.key!==r.key),this.expandedNodeList=this.expandedNodeList.filter(s=>s.key!==r.key),this.checkedNodeList=this.checkedNodeList.filter(s=>s.key!==r.key),r.children&&r.children.forEach(s=>{i(s)})};t.forEach(r=>{i(r)}),this.refreshCheckState(this.isCheckStrictly)}refreshDragNode(t){t.children.length===0?this.conductUp(t):t.children.forEach(i=>{this.refreshDragNode(i)})}resetNodeLevel(t){let i=t.getParentNode();i?t.level=i.level+1:t.level=0;for(let r of t.children)this.resetNodeLevel(r)}calcDropPosition(t){let{clientY:i}=t,{top:r,bottom:s,height:a}=t.target.getBoundingClientRect(),l=Math.max(a*this.DRAG_SIDE_RANGE,this.DRAG_MIN_GAP);return i<=r+l?-1:i>=s-l?1:0}dropAndApply(t,i=-1){if(!t||i>1)return;let r=t.treeService,s=t.getParentNode(),a=this.selectedNode.getParentNode();switch(a?a.children=a.children.filter(l=>l.key!==this.selectedNode.key):this.rootNodes=this.rootNodes.filter(l=>l.key!==this.selectedNode.key),i){case 0:t.addChildren([this.selectedNode]),this.resetNodeLevel(t);break;case-1:case 1:let l=i===1?1:0;if(s){s.addChildren([this.selectedNode],s.children.indexOf(t)+l);let c=this.selectedNode.getParentNode();c&&this.resetNodeLevel(c)}else{let c=this.rootNodes.indexOf(t)+l;this.rootNodes.splice(c,0,this.selectedNode),this.rootNodes[c].parentNode=null,this.resetNodeLevel(this.rootNodes[c])}break}this.rootNodes.forEach(l=>{l.treeService||(l.service=r),this.refreshDragNode(l)})}formatEvent(t,i,r){let s={eventName:t,node:i,event:r};switch(t){case"dragstart":case"dragenter":case"dragover":case"dragleave":case"drop":case"dragend":Object.assign(s,{dragNode:this.getSelectedNode()});break;case"click":case"dblclick":Object.assign(s,{selectedKeys:this.selectedNodeList}),Object.assign(s,{nodes:this.selectedNodeList}),Object.assign(s,{keys:this.selectedNodeList.map(l=>l.key)});break;case"check":let a=this.getCheckedNodeList();Object.assign(s,{checkedKeys:a}),Object.assign(s,{nodes:a}),Object.assign(s,{keys:a.map(l=>l.key)});break;case"search":Object.assign(s,{matchedKeys:this.getMatchedNodeList()}),Object.assign(s,{nodes:this.getMatchedNodeList()}),Object.assign(s,{keys:this.getMatchedNodeList().map(l=>l.key)});break;case"expand":Object.assign(s,{nodes:this.expandedNodeList}),Object.assign(s,{keys:this.expandedNodeList.map(l=>l.key)});break}return s}getIndexOfArray(t,i){return t.findIndex(r=>r.key===i)}conductCheck(t,i){this.checkedNodeList=[],this.halfCheckedNodeList=[];let r=s=>{s.forEach(a=>{t===null?a.isChecked=!!a.origin.checked:Sz(a.key,t||[])?(a.isChecked=!0,a.isHalfChecked=!1):(a.isChecked=!1,a.isHalfChecked=!1),a.children.length>0&&r(a.children)})};r(this.rootNodes),this.refreshCheckState(i)}conductExpandedKeys(t=[]){let i=new Set(t===!0?[]:t);this.expandedNodeList=[];let r=s=>{s.forEach(a=>{a.setExpanded(t===!0||i.has(a.key)||a.isExpanded===!0),a.isExpanded&&this.setExpandedNodeList(a),a.children.length>0&&r(a.children)})};r(this.rootNodes)}conductSelectedKeys(t,i){this.selectedNodeList.forEach(s=>s.isSelected=!1),this.selectedNodeList=[];let r=s=>s.every(a=>{if(Sz(a.key,t)){if(a.isSelected=!0,this.setSelectedNodeList(a),!i)return!1}else a.isSelected=!1;return a.children.length>0?r(a.children):!0});r(this.rootNodes)}expandNodeAllParentBySearch(t){let i=r=>{if(r&&(r.canHide=!1,r.setExpanded(!0),this.setExpandedNodeList(r),r.getParentNode()))return i(r.getParentNode())};i(t.getParentNode())}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),wz=new hn("NzTreeHigherOrder"),nf=class{constructor(n){this.nzTreeService=n}coerceTreeNodes(n){let e=[];return this.nzTreeService.isArrayOfNzTreeNode(n)?e=n.map(t=>(t.service=this.nzTreeService,t)):e=n.map(t=>new bc(t,null,this.nzTreeService)),e}getTreeNodes(){return this.nzTreeService.rootNodes}getTreeNodeByKey(n){let e=[],t=i=>{e.push(i),i.getChildren().forEach(r=>{t(r)})};return this.getTreeNodes().forEach(i=>{t(i)}),e.find(i=>i.key===n)||null}getCheckedNodeList(){return this.nzTreeService.getCheckedNodeList()}getSelectedNodeList(){return this.nzTreeService.getSelectedNodeList()}getHalfCheckedNodeList(){return this.nzTreeService.getHalfCheckedNodeList()}getExpandedNodeList(){return this.nzTreeService.getExpandedNodeList()}getMatchedNodeList(){return this.nzTreeService.getMatchedNodeList()}};var bz=(()=>{let n=class n{constructor(t){this.c=t.merge("utilArray",{deepMapName:"deep",parentMapName:"parent",idMapName:"id",parentIdMapName:"parent_id",childrenMapName:"children",titleMapName:"title",checkedMapname:"checked",selectedMapname:"selected",expandedMapname:"expanded",disabledMapname:"disabled"})}treeToArr(t,i){let r=V({deepMapName:this.c.deepMapName,parentMapName:this.c.parentMapName,childrenMapName:this.c.childrenMapName,clearChildren:!0,cb:null},i),s=[],a=(l,c,u=0)=>{for(let d of l){d[r.deepMapName]=u,d[r.parentMapName]=c,r.cb&&r.cb(d,c,u),s.push(d);let p=d[r.childrenMapName];p!=null&&Array.isArray(p)&&p.length>0&&a(p,d,u+1),r.clearChildren&&delete d[r.childrenMapName]}};return a(t,null),s}arrToTree(t,i){if(!Array.isArray(t)||t.length===0)return[];let r=V({idMapName:this.c.idMapName,parentIdMapName:this.c.parentIdMapName,childrenMapName:this.c.childrenMapName,cb:null},i),s=[],a={},l=r.rootParentIdValue,c=t;if(!l){let u=c.map(p=>p[r.parentIdMapName]),d=u.findIndex(p=>p==null);l=d!==-1?u[d]:u.sort()[0]}for(let u of c){let d=u[r.idMapName],p=u[r.parentIdMapName];a[d]=a[d]||[],u[r.childrenMapName]=a[d],r.cb&&r.cb(u),p!==l?(a[p]=a[p]||[],a[p].push(u)):s.push(u)}return s}arrToTreeNode(t,i){let r=V({idMapName:this.c.idMapName,parentIdMapName:this.c.parentIdMapName,titleMapName:this.c.titleMapName,isLeafMapName:"isLeaf",checkedMapname:this.c.checkedMapname,selectedMapname:this.c.selectedMapname,expandedMapname:this.c.expandedMapname,disabledMapname:this.c.disabledMapname,cb:null},i),s=this.arrToTree(t,{idMapName:r.idMapName,parentIdMapName:r.parentIdMapName,childrenMapName:"children"});return this.visitTree(s,(a,l,c)=>{a.key=a[r.idMapName],a.title=a[r.titleMapName],a.checked=a[r.checkedMapname],a.selected=a[r.selectedMapname],a.expanded=a[r.expandedMapname],a.disabled=a[r.disabledMapname],a[r.isLeafMapName]==null?a.isLeaf=a.children.length===0:a.isLeaf=a[r.isLeafMapName],r.cb&&r.cb(a,l,c)}),s.map(a=>new bc(a))}visitTree(t,i,r){r=V({childrenMapName:this.c.childrenMapName},r);let s=(a,l,c)=>{for(let u of a){i(u,l,c);let d=u[r.childrenMapName];Array.isArray(d)&&d.length>0&&s(d,u,c+1)}};s(t,null,1)}findTree(t,i,r){let s;return this.visitTree(t,a=>{s===void 0&&i(a)&&(s=a)},r),s}getKeysByTreeNode(t,i){let r=V({includeHalfChecked:!0},i),s=[];return this.visitTree(t,(a,l,c)=>{(a.isChecked||r.includeHalfChecked&&a.isHalfChecked)&&s.push(r.cb?r.cb(a,l,c):r.keyMapName?a.origin[r.keyMapName]:a.key)}),s}baseFlat(t,i,r=[]){let s=-1;for(;++s0&&Array.isArray(a))if(i>1)this.baseFlat(a,i-1,r);else{let l=-1,c=r.length;for(;++l{let a=i(s);return Object.prototype.hasOwnProperty.call(r,a)?r[a].push(s):r[a]=[s],r},{}):{}}uniq(t,i){return Array.from(t.reduce((r,s)=>{let a=i?typeof i=="string"?s[i]:i(s):s;return r.has(a)||r.set(a,s),r},new Map).values())}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var f4=["target"];function g4(o,n){}function m4(o,n){o&1&&Xt(0)}function v4(o,n){o&1&&Ie(0)}function y4(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(5);h("nzType",e._btn.submit_icon.type)("nzTheme",e._btn.submit_icon.theme)("nzTwotoneColor",e._btn.submit_icon.twoToneColor)("nzIconfont",e._btn.submit_icon.iconfont)}}function C4(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(6);h("nzType",e._btn.reset_icon.type)("nzTheme",e._btn.reset_icon.theme)("nzTwotoneColor",e._btn.reset_icon.twoToneColor)("nzIconfont",e._btn.reset_icon.iconfont)}}function _4(o,n){if(o&1){let e=Q();C(0,"button",12),A("click",function(){I(e);let i=m(5);return P(i.reset(!0))}),_(1,C4,1,4,"i",10),Y(2),S()}if(o&2){let e=m(5);h("nzType",e._btn.reset_type)("nzSize",e._btn.render.size)("disabled",e.loading),f(),ie(1,e._btn.reset_icon?1:-1),f(),Ne(" ",e._btn.reset," ")}}function S4(o,n){if(o&1&&(C(0,"button",9),_(1,y4,1,4,"i",10),Y(2),S(),_(3,_4,3,5,"button",11)),o&2){let e=m(4);h("nzType",e._btn.submit_type)("nzSize",e._btn.render.size)("nzLoading",e.loading)("disabled",e.liveValidate&&!e.valid),f(),ie(1,e._btn.submit_icon?1:-1),f(),Ne(" ",e._btn.submit," "),f(),ie(3,e._btn.reset?3:-1)}}function w4(o,n){}function b4(o,n){if(o&1&&_(0,w4,0,0,"ng-template",13),o&2){m(4);let e=te(1);h("ngTemplateOutlet",e)}}function T4(o,n){if(o&1&&(C(0,"nz-form-item",5)(1,"div",6)(2,"div",7)(3,"div",8),_(4,S4,4,7)(5,b4,1,1),S()()()()),o&2){let e=m(3);h("ngClass",e._btn.render.class)("fixed-label",e._btn.render.spanLabelFixed),f(),h("nzSpan",e.btnGrid.span)("nzOffset",e.btnGrid.offset)("nzXs",e.btnGrid.xs)("nzSm",e.btnGrid.sm)("nzMd",e.btnGrid.md)("nzLg",e.btnGrid.lg)("nzXl",e.btnGrid.xl)("nzXXl",e.btnGrid.xxl),f(3),ie(4,e.button?4:5)}}function E4(o,n){if(o&1&&_(0,T4,6,11,"nz-form-item",4),o&2){let e=m(2);ie(0,e._btn&&e._btn.render?0:-1)}}function x4(o,n){}function z4(o,n){if(o&1&&_(0,x4,0,0,"ng-template",13),o&2){m(2);let e=te(1);h("ngTemplateOutlet",e)}}function O4(o,n){if(o&1&&_(0,E4,1,1)(1,z4,1,1),o&2){let e=m();ie(0,e.button!=="none"?0:1)}}function D4(o,n){if(o&1&&R(0,"sf-item",3),o&2){let e=m(),t=te(3);h("formProperty",e.rootProperty)("footer",t)}}var Oz=["*"];function R4(o,n){if(o&1&&R(0,"i",11),o&2){let e=m(4);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipColor",e.oh.bgColor)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function I4(o,n){if(o&1&&(C(0,"span",10),Y(1),_(2,R4,1,9,"i",11),S()),o&2){let e=m(3);f(),Ne(" ",e.ui.optional," "),f(),ie(2,e.oh?2:-1)}}function P4(o,n){if(o&1&&(C(0,"label")(1,"span",8),Y(2),S(),_(3,I4,3,2,"span",9),S()),o&2){let e=m(2);k("ant-form-item-required",e.ui._required),ze("for",e.id),f(2),ye(e.t),f(),ie(3,e.ui.optional||e.oh?3:-1)}}function M4(o,n){if(o&1&&(C(0,"div",6),_(1,P4,4,5,"label",7),S()),o&2){let e=m();h("nzSpan",e.ui.spanLabel),f(),ie(1,e.t?1:-1)}}function F4(o,n){if(o&1&&(C(0,"div",12)(1,"div",13),Y(2),S()()),o&2){let e=m();h("@helpMotion",void 0),f(2),Ne(" ",e.error," ")}}function A4(o,n){if(o&1&&R(0,"div",14),o&2){let e=m();h("innerHTML",e.ui._description,Dt)}}function N4(o,n){if(o&1&&R(0,"i",9),o&2){let e=m(2);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function L4(o,n){if(o&1){let e=Q();C(0,"div",7)(1,"label"),Y(2),C(3,"span",8),Y(4),_(5,N4,1,8,"i",9),S()(),C(6,"div",10)(7,"button",11),A("click",function(){I(e);let i=m();return P(i.addItem())}),S()()()}if(o&2){let e=m();h("nzSpan",e.ui.spanLabel),f(),k("ant-form-item-required",e.ui.required),f(),Ne(" ",e.schema.title," "),f(2),Ne(" ",e.ui.optional," "),f(),ie(5,e.oh?5:-1),f(2),h("nzType",e.addType)("disabled",e.addDisabled)("innerHTML",e.addTitle,Dt)}}function k4(o,n){if(o&1){let e=Q();C(0,"span",16),A("click",function(){I(e);let i=m(2).index,r=m();return P(r.removeItem(i))}),R(1,"i",17),S()}if(o&2){let e=m(3);ze("title",e.removeTitle)}}function V4(o,n){if(o&1&&(C(0,"div",13)(1,"nz-card"),R(2,"sf-item",14),_(3,k4,2,1,"span",15),S()()),o&2){let e=m(),t=e.index,i=e.$implicit,r=m();h("nzSpan",r.arraySpan),ze("data-index",t),f(2),h("formProperty",i),f(),ie(3,r.showRemove?3:-1)}}function G4(o,n){if(o&1&&(H(0),_(1,V4,4,4,"div",12),B()),o&2){let e=n.$implicit;f(),ie(1,e.visible&&!e.ui.hidden?1:-1)}}function H4(o,n){if(o&1&&(C(0,"div",18),Y(1),S()),o&2){let e=m();f(),ye(e.error)}}function B4(o,n){if(o&1&&R(0,"div",19),o&2){let e=m();h("innerHTML",e.ui._description,Dt)}}function $4(o,n){if(o&1){let e=Q();C(0,"label",3),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.allChecked=i)})("ngModelChange",function(){I(e);let i=m(2);return P(i.onAllChecked())}),Y(1),S()}if(o&2){let e=m(2);h("ngModel",e.allChecked)("nzIndeterminate",e.indeterminate),f(),Ne(" ",e.ui.checkAllText||e.l.checkAllText," ")}}function j4(o,n){if(o&1&&_(0,$4,2,3,"label",2),o&2){let e=m();ie(0,e.ui.checkAll?0:-1)}}function W4(o,n){if(o&1&&R(0,"i",7),o&2){let e=m(3);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function U4(o,n){if(o&1){let e=Q();C(0,"label",5),A("ngModelChange",function(i){I(e);let r=m(2);return P(r._setValue(i))}),Y(1),C(2,"span",6),Y(3),_(4,W4,1,8,"i",7),S()()}if(o&2){let e=m(2);h("nzDisabled",e.disabled)("ngModel",e.value),f(),Ne(" ",e.schema.title," "),f(2),Ne(" ",e.ui.optional," "),f(),ie(4,e.oh?4:-1)}}function K4(o,n){}function q4(o,n){if(o&1){let e=Q();_(0,K4,0,0,"ng-template",8),C(1,"nz-checkbox-group",9),A("ngModelChange",function(){I(e);let i=m(3);return P(i.notifySet())}),S()}if(o&2){let e=m(3),t=te(1);h("ngTemplateOutlet",t),f(),h("ngModel",e.data)}}function Y4(o,n){}function Q4(o,n){if(o&1&&(C(0,"div",12),_(1,Y4,0,0,"ng-template",8),S()),o&2){let e=m(4),t=te(1);h("nzSpan",e.grid_span),f(),h("ngTemplateOutlet",t)}}function X4(o,n){if(o&1&&(C(0,"div",12)(1,"label",13),Y(2),S()()),o&2){let e=n.$implicit,t=m(4);h("nzSpan",t.grid_span),f(),h("nzValue",e.value)("ngModel",e.checked)("nzDisabled",e.disabled),f(),Ne(" ",e.label," ")}}function Z4(o,n){if(o&1){let e=Q();C(0,"nz-checkbox-wrapper",10),A("nzOnChange",function(i){I(e);let r=m(3);return P(r.groupInGridChange(i))}),C(1,"div",11),_(2,Q4,2,2,"div",12),Cn(3,X4,3,5,"div",12,yn),S()()}if(o&2){let e=m(3);f(2),ie(2,e.ui.checkAll?2:-1),f(),_n(e.data)}}function J4(o,n){if(o&1&&_(0,q4,2,2)(1,Z4,5,1),o&2){let e=m(2);ie(0,e.grid_span===0?0:1)}}function e5(o,n){if(o&1&&_(0,U4,5,5,"label",4)(1,J4,2,1),o&2){let e=m();ie(0,e.data.length===0?0:1)}}function t5(o,n){}var n5=(o,n,e)=>({$implicit:o,schema:n,ui:e});function i5(o,n){if(o&1){let e=Q();C(0,"nz-year-picker",1),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function r5(o,n){if(o&1){let e=Q();C(0,"nz-month-picker",1),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function o5(o,n){if(o&1){let e=Q();C(0,"nz-week-picker",2),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function s5(o,n){if(o&1){let e=Q();C(0,"nz-range-picker",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))})("nzOnOk",function(i){I(e);let r=m();return P(r._ok(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzDisabledTime",e.ui.disabledTime)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzRanges",e.ui.ranges)("nzShowTime",e.ui.showTime)("nzSeparator",e.ui.separator)("nzShowWeekNumber",e.ui.showWeekNumber||!1)("nzMode",e.ui.rangeMode)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function a5(o,n){if(o&1){let e=Q();C(0,"nz-date-picker",4),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))})("nzOnOk",function(i){I(e);let r=m();return P(r._ok(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzDisabledTime",e.ui.disabledTime)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzShowTime",e.ui.showTime)("nzShowToday",e.i.showToday)("nzShowWeekNumber",e.ui.showWeekNumber||!1)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}var l5=o=>({"ant-input-number__hide-step":o});function c5(o,n){if(o&1&&(C(0,"div",4),Y(1),S()),o&2){let e=m(2);f(),ye(e.title)}}function u5(o,n){if(o&1&&(C(0,"div",5),R(1,"sf-item",6),S()),o&2){let e=m().$implicit;h("nzSpan",e.grid.span)("nzOffset",e.grid.offset)("nzXs",e.grid.xs)("nzSm",e.grid.sm)("nzMd",e.grid.md)("nzLg",e.grid.lg)("nzXl",e.grid.xl)("nzXXl",e.grid.xxl),f(),h("formProperty",e.property)("fixed-label",e.spanLabelFixed)}}function d5(o,n){if(o&1&&_(0,u5,2,10,"div",5),o&2){let e=n.$implicit;ie(0,e.property.visible&&e.show?0:-1)}}function p5(o,n){if(o&1&&(C(0,"div",3),Cn(1,d5,1,1,null,null,yn),S()),o&2){let e=m(2);h("nzGutter",e.grid.gutter),f(),_n(e.list)}}function h5(o,n){if(o&1&&R(0,"sf-item",6),o&2){let e=m().$implicit;h("formProperty",e.property)("fixed-label",e.spanLabelFixed)}}function f5(o,n){if(o&1&&_(0,h5,1,2,"sf-item",6),o&2){let e=n.$implicit;ie(0,e.property.visible&&e.show?0:-1)}}function g5(o,n){if(o&1&&Cn(0,f5,1,1,null,null,yn),o&2){let e=m(2);_n(e.list)}}function m5(o,n){if(o&1&&_(0,c5,2,1,"div",2)(1,p5,3,1,"div",3)(2,g5,2,0),o&2){let e=n.$implicit,t=m();ie(0,!e&&t.title?0:-1),f(),ie(1,t.grid?1:2)}}function v5(o,n){if(o&1&&R(0,"i",13),o&2){let e=m(3);h("nzType",e.expand?"down":"up")}}function y5(o,n){if(o&1&&R(0,"i",15),o&2){let e=m(4);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipColor",e.oh.bgColor)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function C5(o,n){if(o&1&&(C(0,"span",14),Y(1),_(2,y5,1,9,"i",15),S()),o&2){let e=m(3);f(),Ne(" ",e.ui.optional," "),f(),ie(2,e.oh?2:-1)}}function _5(o,n){if(o&1){let e=Q();C(0,"div",10),A("click",function(){I(e);let i=m(2);return P(i.changeExpand())}),_(1,v5,1,1,"i",11),Y(2),_(3,C5,3,2,"span",12),S()}if(o&2){let e=m(2);k("point",e.showExpand),f(),ie(1,e.showExpand?1:-1),f(),Ne(" ",e.title," "),f(),ie(3,e.ui.optional||e.oh?3:-1)}}function S5(o,n){}var w5=()=>[],b5=()=>({$implicit:!0});function T5(o,n){if(o&1&&(C(0,"nz-card",7),_(1,_5,4,5,"ng-template",null,8,_e)(3,S5,0,0,"ng-template",9),S()),o&2){let e=te(2),t=m(),i=te(1);k("sf__object-card-fold",!t.expand),h("nzTitle",e)("nzExtra",t.ui.cardExtra)("nzSize",t.ui.cardSize||"small")("nzActions",t.ui.cardActions||ii(11,w5))("nzBodyStyle",t.ui.cardBodyStyle)("nzBordered",t.ui.cardBordered||!0)("nzBorderless",t.ui.cardBorderless||!1),f(3),h("ngTemplateOutlet",i)("ngTemplateOutletContext",ii(12,b5))}}function E5(o,n){}function x5(o,n){if(o&1&&_(0,E5,0,0,"ng-template",16),o&2){m();let e=te(1);h("ngTemplateOutlet",e)}}function z5(o,n){if(o&1&&(C(0,"label",2),R(1,"span",3),S()),o&2){let e=n.$implicit,t=m(2);h("nzValue",e.value)("nzDisabled",t.disabled||e.disabled),f(),h("innerHTML",e.label,Dt)}}function O5(o,n){if(o&1&&Cn(0,z5,2,3,"label",2,yn),o&2){let e=m();_n(e.data)}}function D5(o,n){if(o&1&&(C(0,"label",4),R(1,"span",3),S()),o&2){let e=n.$implicit,t=m(2);h("nzValue",e.value)("nzDisabled",t.disabled||e.disabled),f(),h("innerHTML",e.label,Dt)}}function R5(o,n){if(o&1&&Cn(0,D5,2,3,"label",4,yn),o&2){let e=m();_n(e.data)}}function I5(o,n){if(o&1&&R(0,"nz-option",3),o&2){let e=n.$implicit;h("nzLabel",e.label)("nzValue",e.value)("nzHide",e.hide)("nzDisabled",e.disabled)}}function P5(o,n){if(o&1&&Cn(0,I5,1,4,"nz-option",3,yn),o&2){let e=m();_n(e.data)}}function M5(o,n){if(o&1&&R(0,"nz-option",5),o&2){let e=n.$implicit;h("nzLabel",e.label)("nzValue",e.value)("nzDisabled",e.disabled)("nzHide",e.hide)}}function F5(o,n){if(o&1&&(C(0,"nz-option-group",4),Cn(1,M5,1,4,"nz-option",5,yn),S()),o&2){let e=n.$implicit;h("nzLabel",e.label),f(),_n(e.children)}}function A5(o,n){if(o&1&&Cn(0,F5,3,1,"nz-option-group",4,yn),o&2){let e=m();_n(e.data)}}function N5(o,n){if(o&1&&(C(0,"nz-option",2),R(1,"i",6),Y(2),S()),o&2){let e=m();f(2),Ne(" ",e.ui.searchLoadingText," ")}}function L5(o,n){if(o&1){let e=Q();C(0,"input",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.change(i))})("keyup.enter",function(i){I(e);let r=m();return P(r.enter(i))})("focus",function(i){I(e);let r=m();return P(r.focus(i))})("blur",function(i){I(e);let r=m();return P(r.blur(i))}),S()}if(o&2){let e=m();h("disabled",e.disabled)("nzSize",e.ui.size)("nzBorderless",e.ui.borderless)("ngModel",e.value),ze("id",e.id)("disabled",e.disabled)("maxLength",e.schema.maxLength||null)("type",e.ui.type||"text")("placeholder",e.ui.placeholder)("autocomplete",e.ui.autocomplete)("autoFocus",e.ui.autofocus)}}function k5(o,n){}function V5(o,n){if(o&1&&(C(0,"nz-input-group",2),_(1,k5,0,0,"ng-template",4),S()),o&2){let e=m(),t=te(2);h("nzAddOnBefore",e.ui.addOnBefore)("nzAddOnAfter",e.ui.addOnAfter)("nzAddOnBeforeIcon",e.ui.addOnBeforeIcon)("nzAddOnAfterIcon",e.ui.addOnAfterIcon)("nzPrefix",e.ui.prefix)("nzPrefixIcon",e.ui.prefixIcon)("nzSuffix",e.ui.suffix)("nzSuffixIcon",e.ui.suffixIcon),f(),h("ngTemplateOutlet",t)}}function G5(o,n){}function H5(o,n){if(o&1&&_(0,G5,0,0,"ng-template",4),o&2){m();let e=te(2);h("ngTemplateOutlet",e)}}function B5(o,n){if(o&1&&R(0,"span",1),o&2){let e=m();h("innerHTML",e.text,Dt)}}function $5(o,n){if(o&1&&R(0,"span",2),o&2){let e=m();h("innerText",e.text)}}function j5(o,n){if(o&1){let e=Q();C(0,"textarea",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.change(i))})("focus",function(i){I(e);let r=m();return P(r.focus(i))})("blur",function(i){I(e);let r=m();return P(r.blur(i))}),Y(1," "),S()}if(o&2){let e=m();h("disabled",e.disabled)("nzSize",e.ui.size)("ngModel",e.value)("nzAutosize",e.autosize)("nzBorderless",e.ui.borderless),ze("id",e.id)("disabled",e.disabled)("maxLength",e.schema.maxLength||null)("placeholder",e.ui.placeholder)}}function W5(o,n){if(o&1){let e=Q();C(0,"nz-textarea-count",2)(1,"textarea",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.change(i))})("focus",function(i){I(e);let r=m();return P(r.focus(i))})("blur",function(i){I(e);let r=m();return P(r.blur(i))}),Y(2," "),S()()}if(o&2){let e=m();h("nzMaxCharacterCount",e.ui.maxCharacterCount)("nzComputeCharacterCount",e.ui.computeCharacterCount),f(),h("disabled",e.disabled)("nzSize",e.ui.size)("ngModel",e.value)("nzAutosize",e.autosize)("nzBorderless",e.ui.borderless),ze("id",e.id)("disabled",e.disabled)("maxLength",e.schema.maxLength||null)("placeholder",e.ui.placeholder)}}function U5(o,n){}function K5(o,n){if(o&1&&_(0,U5,0,0,"ng-template",4),o&2){m();let e=te(2);h("ngTemplateOutlet",e)}}var q5={formatMap:{"date-time":{widget:"date",showTime:!0,format:"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"},date:{widget:"date",format:"yyyy-MM-dd"},"full-date":{widget:"date",format:"yyyy-MM-dd"},time:{widget:"time",format:"HH:mm:ss.SSSxxx"},"full-time":{widget:"time"},week:{widget:"date",mode:"week",format:"yyyy-ww"},month:{widget:"date",mode:"month",format:"yyyy-MM"},uri:{widget:"upload"},email:{widget:"autocomplete",type:"email"},color:{widget:"string",type:"color"},"":{widget:"string"}},ingoreKeywords:["type","enum"],liveValidate:!0,autocomplete:null,firstVisual:!1,onlyVisual:!1,errors:{},ui:{},button:{submit_type:"primary",reset_type:"default"},uiDateStringFormat:"yyyy-MM-dd HH:mm:ss",uiDateNumberFormat:"T",uiTimeStringFormat:"HH:mm:ss",uiTimeNumberFormat:"T",uiEmailSuffixes:["qq.com","163.com","gmail.com","126.com","aliyun.com"],delay:!1};function gC(o){return o.merge("sf",q5)}var Vo="/";function Dz(o){return o==null}function mo(o,n){return o==null?n:`${o}`!="false"}function rf(o,...n){}function Y5(o,n){let e=/^#\/definitions\/(.*)$/.exec(o);if(e&&e[1]){let t=e[1].split(Vo),i=n;for(let r of t)if(r=r.replace(/~1/g,Vo).replace(/~0/g,"~"),i.hasOwnProperty(r))i=i[r];else throw new Error(`Could not find a definition for ${o}.`);return i}throw new Error(`Could not find a definition for ${o}.`)}function mC(o,n={}){if(o.hasOwnProperty("$ref")){let t=Y5(o.$ref,n),e=o,{$ref:i}=e,r=op(e,["$ref"]);return mC(V(V({},t),r),n)}return o}function Q5(o,n){let e=(t,i)=>{X5(t,i),Object.keys(t.properties).forEach(r=>{let s=t.properties[r],a=`$${r}`;s.items&&e(s.items,i[a].$items),s.properties&&e(s,i[a])})};e(o,n)}function X5(o,n){if(!(o.hasOwnProperty("if")&&o.hasOwnProperty("then")))return null;if(!o.if.properties)throw new Error("if: does not contain 'properties'");let e=Object.keys(o.properties),t=Object.keys(o.if.properties);dC(e,t),dC(e,o.then.required),o.required=o.required.concat(o.then.required);let i=o.hasOwnProperty("else");i&&(dC(e,o.else.required),o.required=o.required.concat(o.else.required));let r={},s={};return t.forEach(a=>{let l=o.if.properties[a].enum;r[a]=l,i&&(s[a]=c=>!l.includes(c))}),o.then.required.forEach(a=>n[`$${a}`].visibleIf=r),i&&o.else.required.forEach(a=>n[`$${a}`].visibleIf=s),o}function dC(o,n){n.forEach(e=>{if(!o.includes(e))throw new Error(`if: properties does not contain '${e}'`)})}function Z5(o,n){if(!Array.isArray(n))return o;let e=u=>u.reduce((d,p)=>(d[p]=!0,d),{}),t=u=>`property [${u.join("', '")}]`,i=e(o),r=e(n),s=n.filter(u=>u!=="*"&&!i[u]);if(s.length)throw new Error(`ui schema order list contains extraneous ${t(s)}`);let a=o.filter(u=>!r[u]),l=n.indexOf("*");if(l===-1){if(a.length)throw new Error(`ui schema order list does not contain ${t(a)}`);return n}if(l!==n.lastIndexOf("*"))throw new Error("ui schema order list contains more than one wildcard item");let c=[...n];return c.splice(l,1,...a),c}function Rz(o,n,e){return Dz(o)||!Array.isArray(o)||o.length===0?[]:(typeof o[0]!="object"&&(o=o.map(t=>({label:t,value:t}))),n&&(Array.isArray(n)||(n=[n]),o.forEach(t=>{~n.indexOf(t.value)&&(t.checked=!0)})),e&&o.forEach(t=>t.disabled=!0),o)}function J5(o,n,e){return Rz(Jr(o||[]),n,e)}function vC(o,n,e,t){return typeof n.asyncData=="function"?n.asyncData(t).pipe(We(i=>Rz(i,e,o.readOnly))):Mn(J5(o.enum,e,o.readOnly))}var of=class{constructor(n,e,t,i,r,s,a,l){this.injector=n,this._options=l,this._errors=null,this._valueChanges=new ct({path:null,pathValue:null,value:null}),this._errorsChanges=new ct(null),this._visible=!0,this._visibilityChanges=new ct(!0),this._objErrors={},this._value=null,this.schema=t,this.ui=i,this.schemaValidator=e.createValidatorFn(t,{ingoreKeywords:this.ui.ingoreKeywords,debug:i.debug}),this.formData=r||t.default,this._parent=s,s?this._root=s.root:this._root=this,this.path=a}get valueChanges(){return this._valueChanges}get errorsChanges(){return this._errorsChanges}get type(){return this.schema.type}get parent(){return this._parent}get root(){return this._root}get value(){return this._value}get errors(){return this._errors}get visible(){return this._visible}get valid(){return this._errors===null||this._errors.length===0}get options(){return this._options}cd(n=!1){this.widget?.detectChanges(n)}updateValueAndValidity(n){n=V({onlySelf:!1,emitValidator:!0,emitValueEvent:!0,updatePath:"",updateValue:null},n),this._updateValue(),n.emitValueEvent&&(n.updatePath=n.updatePath||this.path,n.updateValue=n.updateValue==null?this.value:n.updateValue,this.valueChanges.next({value:this.value,path:n.updatePath,pathValue:n.updateValue})),n.emitValidator&&this.ui.liveValidate===!0&&this._runValidation(),this.parent&&!n.onlySelf&&this.parent.updateValueAndValidity(ot(V({},n),{emitValidator:!1}))}searchProperty(n){let e=this,t=null,i=null;if(n[0]===Vo)t=this.findRoot(),i=t.getProperty(n.substring(1));else for(;i===null&&e.parent!==null;)e=t=e.parent,i=t.getProperty(n);return i}findRoot(){let n=this;for(;n.parent!==null;)n=n.parent;return n}isEmptyData(n){if(Dz(n))return!0;switch(this.type){case"string":return`${n}`.length===0}return!1}_runValidation(){let n,e=this.isEmptyData(this._value);e&&this.ui._required?n=[{keyword:"required"}]:e?n=[]:n=this.schemaValidator(this._value)||[];let t=this.ui.validator;if(typeof t=="function"){let i=t(this.value,this,this.findRoot());if(i instanceof sp){i.subscribe(r=>{this.setCustomErrors(n,r),this.cd(!1)});return}this.setCustomErrors(n,i);return}this._errors=n,this.setErrors(this._errors)}setCustomErrors(n,e){let t=Array.isArray(e)&&e.length>0;t&&e.forEach(i=>{if(!i.message)throw new Error("The custom validator must contain a 'message' attribute to viewed error text");i.keyword=null}),this._errors=t?n.concat(...e):n,this.setErrors(this._errors)}setErrors(n=[],e=!0){let t=Array.isArray(n)?n:[n];if(e&&t&&!this.ui.onlyVisual){let i=this.widget&&this.widget.l.error||{};t=t.map(r=>{let s=r.keyword==null&&r.message?r.message:(this.ui.errors||{})[r.keyword]||this._options.errors[r.keyword]||i[r.keyword]||"";return s&&typeof s=="function"&&(s=s(r)),s&&(~s.indexOf("{")&&r.params&&(s=s.replace(/{([\.a-zA-Z0-9]+)}/g,(a,l)=>r.params[l]||"")),r.message=s),r})}this._errors=t,this._errorsChanges.next(t),this._parent&&this._parent.setParentAndPlatErrors(t,this.path)}setParentAndPlatErrors(n,e){this._objErrors[e]=n;let t=[];Object.keys(this._objErrors).forEach(i=>{let r=this.searchProperty(i);r&&!r.visible||t.push(...this._objErrors[i])}),this.setErrors(t,!1)}setVisible(n){return this._visible=n,this._visibilityChanges.next(n),n&&this.injector.get($e).onStable.pipe(Zr(1)).subscribe(()=>{this.resetValue(this.value,!0)}),this}_bindVisibility(){let n=this.ui.visibleIf;if(typeof n=="object"&&Object.keys(n).length===0)this.setVisible(!1);else if(n!=null){let e=[];for(let t in n)if(n.hasOwnProperty(t)){let i=this.searchProperty(t);if(i){let r=i.valueChanges.pipe(We(l=>{let c=n[t];if(typeof c=="function"){let u=c(l.value,i);if(typeof u=="object"){let d=V({show:!1,required:!1},u),p=this.parent?.schema.required;if(p&&this.propertyId){let g=p.findIndex(v=>v===this.propertyId);d.required?g===-1&&p.push(this.propertyId):g!==-1&&p.splice(g,1),this.ui._required=d.required}return d.show}return u}return c.indexOf("$ANY$")!==-1?l.value&&l.value.length>0:c.indexOf(l.value)!==-1})),s=i._visibilityChanges,a=Fn([r,s]).pipe(We(l=>l[0]&&l[1]));e.push(a)}}Fn(e).pipe(We(t=>this.ui.visibleIfLogical==="and"?t.every(i=>i):t.some(i=>i)),Bt()).subscribe(t=>this.setVisible(t))}}updateFeedback(n=""){this.ui.feedback=n,this.widget?.injector.get(cn).formStatusChanges.next({status:n,hasFeedback:!!n}),this.cd(!0)}},Ec=class o extends of{constructor(){super(...arguments),this.properties=null}getProperty(n){let e=n.indexOf(Vo),t=e!==-1?n.substring(0,e):n,i=this.properties[t];if(i!==null&&e!==-1&&i instanceof o){let r=n.substring(e+1);i=i.getProperty(r)}return i}forEachChild(n){for(let e in this.properties)if(this.properties.hasOwnProperty(e)){let t=this.properties[e];n(t,e)}}forEachChildRecursive(n){this.forEachChild(e=>{n(e),e instanceof o&&e.forEachChildRecursive(n)})}_bindVisibility(){super._bindVisibility(),this._bindVisibilityRecursive()}_bindVisibilityRecursive(){this.forEachChildRecursive(n=>{n._bindVisibility()})}isRoot(){return this===this.root}},sf=class extends Ec{get propertiesId(){return this._propertiesId}constructor(n,e,t,i,r,s,a,l,c){super(n,t,i,r,s,a,l,c),this.formPropertyFactory=e,this._propertiesId=[],this.createProperties()}createProperties(){this.properties={},this._propertiesId=[];let n;try{n=Z5(Object.keys(this.schema.properties),this.ui.order)}catch(e){console.error(`Invalid ${this.schema.title||"root"} object field configuration:`,e)}n.forEach(e=>{this.properties[e]=this.formPropertyFactory.createProperty(this.schema.properties[e],this.ui[`$${e}`],(this.formData||{})[e],this,e),this._propertiesId.push(e)})}setValue(n,e){let t=this.properties;for(let i in n)n.hasOwnProperty(i)&&t[i]&&t[i].setValue(n[i],!0);this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}resetValue(n,e){n=n||this.schema.default||{};let t=this.properties;for(let i in this.schema.properties)this.schema.properties.hasOwnProperty(i)&&t[i].resetValue(n[i],!0);this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}_hasValue(){return this.value!=null&&!!Object.keys(this.value).length}_updateValue(){let n={};this.forEachChild((e,t)=>{e.visible&&e._hasValue()&&(n[t]=e.value)}),this._value=n}},af=class extends Ec{constructor(n,e,t,i,r,s,a,l,c){super(n,t,i,r,s,a,l,c),this.formPropertyFactory=e,this.properties=[]}getProperty(n){let e=n.indexOf(Vo),t=+(e!==-1?n.substring(0,e):n),i=this.properties;if(isNaN(t)||t>=i.length)return;let r=n.substring(e+1);return i[t].getProperty(r)}setValue(n,e){this.properties=[],this.clearErrors(),this.resetProperties(n),this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}resetValue(n,e){this._value=n||this.schema.default||[],this.setValue(this._value,e)}_hasValue(){return!0}_updateValue(){let n=[];this.forEachChild(e=>{e.visible&&n.push(V(V({},this.widget?.cleanValue?null:e.formData),e.value))}),this._value=n}addProperty(n){let e=this.formPropertyFactory.createProperty(Jr(this.schema.items),Jr(this.ui.$items),n,this);return this.properties.push(e),e}resetProperties(n){for(let e of n)this.addProperty(e).resetValue(e,!0)}clearErrors(n){(n||this)._objErrors={}}add(n){let e=this.addProperty(n);return e.resetValue(n,!1),e}remove(n){let e=this.properties;this.clearErrors(),e.splice(n,1),e.forEach((t,i)=>{t.path=[t.parent.path,i].join(Vo),this.clearErrors(t),t instanceof sf&&t.forEachChild(r=>{r.updateValueAndValidity()})}),e.length===0&&this.updateValueAndValidity()}},nd=class extends of{setValue(n,e){this._value=n,this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}resetValue(n,e){n==null&&(n=this.schema.default!==void 0?this.schema.default:this.fallbackValue()),this._value=n,this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0}),this.widget&&(this.widget.reset(n),this.cd(e))}_hasValue(){return this.fallbackValue()!==this.value}_updateValue(){}},pC=class extends nd{fallbackValue(){return null}},hC=class extends nd{fallbackValue(){return null}setValue(n,e){typeof n=="string"&&(n.length?n=n.indexOf(".")>-1?parseFloat(n):parseInt(n,10):n=void 0),this._value=n,this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}},fC=class extends nd{fallbackValue(){return null}setValue(n,e){this._value=n??"",this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}},id=class{constructor(n,e,t){this.injector=n,this.schemaValidatorFactory=e,this.options=gC(t)}createProperty(n,e,t,i=null,r){let s=null,a="";if(i)switch(a+=i.path,i.parent!==null&&(a+=Vo),i.type){case"object":a+=r;break;case"array":a+=i.properties.length;break;default:throw new Error(`Instanciation of a FormProperty with an unknown parent type: ${i.type}`)}else a=Vo;if(n.$ref){let l=mC(n,i.root.schema.definitions);s=this.createProperty(l,e,t,i,a)}else switch((r&&i.schema.required.indexOf(r.split(Vo).pop())!==-1||e.showRequired===!0)&&(e._required=!0),n.title==null&&(n.title=r),(n.type==="string"||n.type==="number")&&!n.format&&!e.format?e.widget==="date"?e._format=n.type==="string"?this.options.uiDateStringFormat:this.options.uiDateNumberFormat:e.widget==="time"&&(e._format=n.type==="string"?this.options.uiTimeStringFormat:this.options.uiTimeNumberFormat):e._format=e.format,n.type){case"integer":case"number":s=new hC(this.injector,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"string":s=new fC(this.injector,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"boolean":s=new pC(this.injector,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"object":s=new sf(this.injector,this,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"array":s=new af(this.injector,this,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;default:throw new TypeError(`Undefined type ${n.type}`)}return s.propertyId=r,s instanceof Ec&&this.initializeRoot(s),s}initializeRoot(n){n._bindVisibility()}},rd=class{constructor(){this.onDestroy=new J}destroy(){this.onDestroy.next(!0)}},cf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),Iz=(()=>{let n=class n extends cf{constructor(){if(super(),this.ngZone=ae($e),this.cogSrv=ae(In),!(typeof document=="object"&&document))return;this.options=gC(this.cogSrv);let t=this.options.ajv||{};this.ngZone.runOutsideAngular(()=>{this.ajv=new xz.default(ot(V({allErrors:!0,loopEnum:50},t),{formats:V({"data-url":/^data:([a-z]+\/[a-z0-9-+.]+)?;name=(.*);base64,(.*)$/,color:oo.color,mobile:oo.mobile,"id-card":oo.idCard},t.formats)})),(0,zz.default)(this.ajv)})}createValidatorFn(t,i){let r=[...this.options.ingoreKeywords,...i.ingoreKeywords||[]];return s=>{try{this.ngZone.runOutsideAngular(()=>this.ajv.validate(t,s))}catch{}let a=this.ajv.errors;return this.options&&r&&a&&(a=a.filter(l=>r.indexOf(l.keyword)===-1)),a}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),Wa=class{constructor(){this._widgets={}}get widgets(){return this._widgets}setDefault(n){this.defaultWidget=n}register(n,e){this._widgets[n]=e}has(n){return this._widgets.hasOwnProperty(n)}getType(n){return this.has(n)?this._widgets[n]:this.defaultWidget}},Pz=(()=>{let n=class n{constructor(){this.registry=ae(Wa)}createWidget(t,i){this.registry.has(i);let r=this.registry.getType(i);return t.createComponent(r)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),e6=0,uf=(()=>{let n=class n{constructor(){this.widgetFactory=ae(Pz),this.terminator=ae(rd),this.destroy$=new J,this.widget=null,this.footer=null}onWidgetInstanciated(t){this.widget=t;let i=`_sf-${e6++}`,r=this.formProperty.ui;this.widget.formProperty=this.formProperty,this.widget.schema=this.formProperty.schema,this.widget.ui=r,this.widget.id=i,this.formProperty.widget=t}ngOnInit(){this.terminator.onDestroy.subscribe(()=>this.ngOnDestroy())}ngOnChanges(){let t=this.formProperty;this.ref=this.widgetFactory.createWidget(this.container,t.ui.widget||t.schema.type),this.onWidgetInstanciated(this.ref.instance)}ngOnDestroy(){let{destroy$:t}=this;t.next(),t.complete(),this.ref.destroy()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sf-item"]],viewQuery:function(i,r){if(i&1&&xe(f4,7,Tn),i&2){let s;ce(s=ue())&&(r.container=s.first)}},hostVars:2,hostBindings:function(i,r){i&2&&k("sf__item",!0)},inputs:{formProperty:"formProperty",footer:"footer"},exportAs:["sfItem"],features:[Ve([cn]),oe],decls:3,vars:1,consts:[["target",""],[4,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,g4,0,0,"ng-template",null,0,_e)(2,m4,1,0,"ng-container",1),i&2&&(f(2),h("ngTemplateOutlet",r.footer))},dependencies:[Be],encapsulation:2});let o=n;return o})(),Mz=(()=>{let n=class n{constructor(){this.el=ae(de).nativeElement,this.render=ae(He),this._inited=!1}init(){if(!this._inited||this.num==null||this.num<=0)return;let t=this.el,i=t.querySelector(".ant-row")||t;this.render.addClass(i,"sf__fixed");let r=i.querySelector(".ant-form-item-label"),s=i.querySelector(".ant-form-item-control-wrapper,.ant-form-item-control"),a=`${this.num}px`;r?(this.render.setStyle(r,"flex",`0 0 ${a}`),this.render.setStyle(s,"max-width",`calc(100% - ${a})`)):this.render.setStyle(s,"margin-left",a)}ngAfterViewInit(){this._inited=!0,this.init()}ngOnChanges(){this._inited&&this.init()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","fixed-label",""]],inputs:{num:[le.HasDecoratorInputTransform,"fixed-label","num",t=>fn(t,0)]},features:[fi,oe]});let o=n;return o})();function t6(o,n,e){return new id(o,n,e)}var n6=(()=>{let n=class n{get btnGrid(){return this._btn.render.grid}set mode(t){switch(t){case"search":this.layout="inline",this.firstVisual=!1,this.liveValidate=!1,this._btn&&(this._btn.submit=this._btn.search);break;case"edit":this.layout="horizontal",this.firstVisual=!1,this.liveValidate=!0,this._btn&&(this._btn.submit=this._btn.edit);break}this._mode=t}get mode(){return this._mode}get valid(){return this._valid}get value(){return this._item}getProperty(t){return this.rootProperty?.searchProperty(t)}getValue(t){return this.getProperty(t)?.value}setValue(t,i){let r=this.getProperty(t);if(!r)throw new Error(`Invalid path: ${t}`);return r.resetValue(i,!1),this}setDisabled(t,i){let r=this.getProperty(t);if(!r)throw new Error(`Invalid path: ${t}`);return r.schema.readOnly=i,r.widget.detectChanges(),this}setRequired(t,i){let r=this.getProperty(t);if(!r)throw new Error(`Invalid path: ${t}`);let s=t.split(Vo).pop(),a=r.parent?.schema.required||[],l=a.findIndex(c=>c===s);return i?l===-1&&a.push(s):l!==-1&&a.splice(l,1),r.parent.schema.required=a,r.ui._required=i,r.widget.detectChanges(),this.validator({onlyRoot:!1}),this}updateFeedback(t,i=""){return this.getProperty(t)?.updateFeedback(i),this}onSubmit(t){t.preventDefault(),t.stopPropagation(),this.liveValidate||this.validator(),this.valid&&this.formSubmit.emit(this.value)}constructor(t){this.formPropertyFactory=ae(id),this.terminator=ae(rd),this.dom=ae(Ro),this.cdr=ae(fe),this.localeSrv=ae(cu),this.aclSrv=ae(pp,{optional:!0}),this.i18nSrv=ae(Rs,{optional:!0}),this.platform=ae(gn),this._renders=new Map,this._valid=!0,this._inited=!1,this.locale={},this.rootProperty=null,this.layout="horizontal",this.button={},this.liveValidate=!0,this.firstVisual=!0,this.onlyVisual=!1,this.compact=!1,this.loading=!1,this.disabled=!1,this.noColon=!1,this.cleanValue=!1,this.delay=!1,this.formValueChange=new O,this.formChange=new O,this.formSubmit=new O,this.formReset=new O,this.formError=new O,this.options=gC(t),this.liveValidate=this.options.liveValidate,this.firstVisual=this.options.firstVisual,this.autocomplete=this.options.autocomplete,this.delay=this.options.delay,this.localeSrv.change.pipe(li()).subscribe(()=>{this.locale=this.localeSrv.getData("sf"),this._inited&&(this.validator({emitError:!1,onlyRoot:!1}),this.coverButtonProperty(),this.cdr.markForCheck())});let i=[this.aclSrv?this.aclSrv.change:null,this.i18nSrv?this.i18nSrv.change:null].filter(r=>r!=null);i.length>0&&_t(...i).pipe(Qe(()=>this._inited),li()).subscribe(()=>this.refreshSchema())}fanyi(t){return(this.i18nSrv?this.i18nSrv.fanyi(t):"")||t}inheritUI(t){["optionalHelp"].filter(i=>!!this._defUi[i]).forEach(i=>t[i]=V(V({},this._defUi[i]),t[i]))}coverProperty(){let t=this.layout==="horizontal",i=Jr(this.schema),{definitions:r}=i,s=(a,l,c,u,d)=>{Array.isArray(a.required)||(a.required=[]),Object.keys(a.properties).forEach(p=>{let g="$",v=g+p,y=mC(a.properties[p],r),x=V(V({},y.ui),c[v]),E=V(V(V(V(ot(V(V({},this._defUi),u),{visibleIf:void 0,hidden:void 0,optional:void 0,optionalHelp:void 0,widget:y.type}),y.format&&this.options.formatMap[y.format]),typeof y.ui=="string"?{widget:y.ui}:null),!y.format&&!y.ui&&Array.isArray(y.enum)&&y.enum.length>0?{widget:"select"}:null),x);if(Object.keys(E).filter(z=>z.startsWith(g)).forEach(z=>delete E[z]),t?u.spanLabelFixed?x.spanLabelFixed||(E.spanLabelFixed=u.spanLabelFixed):(E.spanLabel||(E.spanLabel=typeof u.spanLabel>"u"?5:u.spanLabel),E.spanControl||(E.spanControl=typeof u.spanControl>"u"?19:u.spanControl),E.offsetControl||(E.offsetControl=typeof u.offsetControl>"u"?null:u.offsetControl)):(E.spanLabel=null,E.spanControl=null,E.offsetControl=null),this.layout==="inline"&&delete E.grid,this.layout!=="horizontal"&&(E.spanLabelFixed=null),E.spanLabelFixed!=null&&E.spanLabelFixed>0&&(E.spanLabel=null,E.spanControl=null),E.widget==="date"&&E.end!=null){let z=a.properties[E.end];z?z.ui=ot(V({},z.ui),{widget:E.widget,hidden:!0}):E.end=null}if(this.inheritUI(E),E.optionalHelp){typeof E.optionalHelp=="string"&&(E.optionalHelp={text:E.optionalHelp});let z=E.optionalHelp=V({text:"",icon:"question-circle",placement:"top",trigger:"hover",mouseEnterDelay:.15,mouseLeaveDelay:.1},E.optionalHelp);z.i18n&&(z.text=this.fanyi(z.i18n)),z.text||(E.optionalHelp=void 0)}if(E.i18n&&(y.title=this.fanyi(E.i18n)),E.descriptionI18n&&(y.description=this.fanyi(E.descriptionI18n)),y.description&&(E._description=this.dom.bypassSecurityTrustHtml(y.description)),E.hidden=typeof E.hidden=="boolean"?E.hidden:!1,E.hidden===!1&&E.acl&&this.aclSrv&&!this.aclSrv.can(E.acl)&&(E.hidden=!0),d[v]=E,delete y.ui,E.hidden===!0){let z=a.required.indexOf(p);z!==-1&&a.required.splice(z,1)}y.items&&(E.$items=V(V(V({},y.items.ui),c[v]),E.$items),s(y.items,y.items,c[v]?.$items??{},E.$items,E.$items)),y.properties&&Object.keys(y.properties).length&&s(y,a,c[v]||{},E,E)})};this.ui==null&&(this.ui={}),this._defUi=V(V(V({onlyVisual:this.options.onlyVisual,size:this.options.size,liveValidate:this.liveValidate},this.options.ui),i.ui),this.ui["*"]),this.onlyVisual===!0&&(this._defUi.onlyVisual=!0),this.layout==="inline"&&delete this._defUi.grid,this._ui=V({},this._defUi),s(i,i,this.ui,this.ui,this._ui),Q5(i,this._ui),this._schema=i,delete i.ui,rf(this._ui,"cover schema & ui",this._ui,i)}coverButtonProperty(){this._btn=V(V(V({render:{size:"default"}},this.locale),this.options.button),this.button);let t=Object.keys(this._ui).find(r=>r.startsWith("$")),i=this._btn.render;if(this.layout==="horizontal"){let r=t?this._ui[t]:this._defUi;i.grid||(i.grid={offset:r.spanLabel,span:r.spanControl}),i.spanLabelFixed==null&&(i.spanLabelFixed=r.spanLabelFixed),!i.class&&typeof r.spanLabelFixed=="number"&&r.spanLabelFixed>0&&(i.class="text-center")}else i.grid={};this._mode&&(this.mode=this._mode),rf(this._ui,"button property",this._btn)}ngOnInit(){this.platform.isBrowser&&(this.validator(),this._inited=!0)}ngOnChanges(t){if(!this.platform.isBrowser)return;let i=["disabled","loading"];if(Object.keys(t).every(r=>i.includes(r))){this.cdr.detectChanges();return}this.delay||this.refreshSchema()}_addTpl(t,i){this._inited&&(this._renders.has(t)||(this._renders.set(t,i),this.attachCustomRender()))}attachCustomRender(){this._renders.forEach((t,i)=>{let r=this.rootProperty?.searchProperty(i);r!=null&&(r.ui._render=t)})}validator(t={emitError:!0,onlyRoot:!0}){if(this.rootProperty==null||!this.platform.isBrowser)return!1;let i=s=>{s._runValidation(),!(!(s instanceof Ec)||!s.properties)&&(Array.isArray(s.properties)?s.properties.forEach(a=>i(a)):Object.keys(s.properties).forEach(a=>i(s.properties[a])))};t.onlyRoot?this.rootProperty._runValidation():i(this.rootProperty);let r=this.rootProperty.errors;return this._valid=!(r&&r.length),t.emitError&&!this._valid&&this.formError.emit(r),this.cdr.detectChanges(),this._valid}refreshSchema(t,i){if(!this.platform.isBrowser)return this;if(t&&(this.schema=t),i&&(this.ui=i),!this.schema||typeof this.schema.properties>"u")throw new Error("Invalid Schema");if(this.schema.ui&&typeof this.schema.ui=="string")throw new Error("Don't support string with root ui property");this.schema.type="object",this._formData=V({},this.formData),this._inited&&this.terminator.destroy(),this.cleanRootSub(),this.coverProperty(),this.coverButtonProperty(),this.rootProperty=this.formPropertyFactory.createProperty(this._schema,this._ui,this.formData),this.attachCustomRender(),this.cdr.detectChanges(),this.reset();let r=!0;return this.rootProperty.valueChanges.subscribe(s=>{if(this._item=V(V({},this.cleanValue?null:this.formData),s.value),r){r=!1;return}this.formChange.emit(this._item),this.formValueChange.emit({value:this._item,path:s.path,pathValue:s.pathValue})}),this.rootProperty.errorsChanges.subscribe(s=>{this._valid=!(s&&s.length),this.formError.emit(s),this.cdr.detectChanges()}),this}reset(t=!1){return this.rootProperty==null||!this.platform.isBrowser?this:(this.rootProperty.resetValue(this.formData,!1),Promise.resolve().then(()=>this.cdr.detectChanges()),t&&this.formReset.emit(this.value),this)}cleanRootSub(){this.rootProperty&&(this.rootProperty.errorsChanges.unsubscribe(),this.rootProperty.valueChanges.unsubscribe())}ngOnDestroy(){this.cleanRootSub(),this.terminator.destroy()}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["sf"],["","sf",""]],hostVars:16,hostBindings:function(i,r){i&2&&k("sf",!0)("sf__inline",r.layout==="inline")("sf__horizontal",r.layout==="horizontal")("sf__search",r.mode==="search")("sf__edit",r.mode==="edit")("sf__no-error",r.onlyVisual)("sf__no-colon",r.noColon)("sf__compact",r.compact)},inputs:{layout:"layout",schema:"schema",ui:"ui",formData:"formData",button:"button",liveValidate:[le.HasDecoratorInputTransform,"liveValidate","liveValidate",it],autocomplete:"autocomplete",firstVisual:[le.HasDecoratorInputTransform,"firstVisual","firstVisual",it],onlyVisual:[le.HasDecoratorInputTransform,"onlyVisual","onlyVisual",it],compact:[le.HasDecoratorInputTransform,"compact","compact",it],mode:"mode",loading:[le.HasDecoratorInputTransform,"loading","loading",it],disabled:[le.HasDecoratorInputTransform,"disabled","disabled",it],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",it],cleanValue:[le.HasDecoratorInputTransform,"cleanValue","cleanValue",it],delay:[le.HasDecoratorInputTransform,"delay","delay",it]},outputs:{formValueChange:"formValueChange",formChange:"formChange",formSubmit:"formSubmit",formReset:"formReset",formError:"formError"},exportAs:["sf"],features:[Ve([Pz,{provide:id,useFactory:t6,deps:[$n,cf,In]},rd]),fi,oe],ngContentSelectors:Oz,decls:6,vars:3,consts:[["con",""],["btnTpl",""],["nz-form","",3,"nzLayout","submit"],[3,"formProperty","footer"],["class","sf-btns",3,"ngClass","fixed-label"],[1,"sf-btns",3,"ngClass","fixed-label"],["nz-col","",1,"ant-form-item-control",3,"nzSpan","nzOffset","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],["type","submit","nz-button","","data-type","submit",3,"nzType","nzSize","nzLoading","disabled"],["nz-icon","",3,"nzType","nzTheme","nzTwotoneColor","nzIconfont"],["type","button","nz-button","","data-type","reset",3,"nzType","nzSize","disabled"],["type","button","nz-button","","data-type","reset",3,"nzType","nzSize","disabled","click"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),_(0,v4,1,0,"ng-template",null,0,_e)(2,O4,2,1,"ng-template",null,1,_e),C(4,"form",2),A("submit",function(a){return r.onSubmit(a)}),_(5,D4,1,2,"sf-item",3),S()),i&2&&(f(4),h("nzLayout",r.layout),ze("autocomplete",r.autocomplete),f(),ie(5,r.rootProperty?5:-1))},dependencies:[St,Be,ob,Zw,zm,eo,yi,hr,sc,Aa,_h,Na,Fe,uf,Mz],encapsulation:2,changeDetection:0});let o=n;return o})(),$r=(()=>{let n=class n{constructor(){this.statusSrv=ae(cn),this._showTitle=!1,this.title=null}set showTitle(t){this._showTitle=!!t}get t(){return this.title===null?this.schema.title:this.title}get oh(){return this.ui.optionalHelp}ngOnChanges(){let t=!!this.error;this.statusSrv.formStatusChanges.next({status:t?"error":"",hasFeedback:!!this.ui.feedback})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sf-item-wrap"]],inputs:{id:"id",schema:"schema",ui:"ui",showError:"showError",error:"error",showTitle:"showTitle",title:"title"},features:[oe],ngContentSelectors:Oz,decls:8,vars:21,consts:[["nz-col","","class","ant-form-item-label",3,"nzSpan"],["nz-col","",1,"ant-form-item-control",3,"nzSpan","nzOffset"],[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],["class","ant-form-item-explain ant-form-item-explain-connected"],["class","ant-form-item-extra",3,"innerHTML"],["nz-col","",1,"ant-form-item-label",3,"nzSpan"],[3,"ant-form-item-required"],[1,"sf__label-text"],["class","sf__optional"],[1,"sf__optional"],["nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipColor","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],["role","alert",1,"ant-form-item-explain-error"],[1,"ant-form-item-extra",3,"innerHTML"]],template:function(i,r){i&1&&(Pe(),C(0,"nz-form-item"),_(1,M4,2,2,"div",0),C(2,"div",1)(3,"div",2)(4,"div",3),Ie(5),S()(),_(6,F4,3,2,"div",4)(7,A4,1,1,"div",5),S()()),i&2&&(Re("width",r.ui.width,"px"),k("ant-form-item-has-error",r.showError)("ant-form-item-with-help",r.showError)("ant-form-item-has-success",r.ui.feedback==="success")("ant-form-item-has-warning",r.ui.feedback==="warning")("ant-form-item-has-error",r.ui.feedback==="error")("ant-form-item-is-validating",r.ui.feedback==="validating")("ant-form-item-has-feedback",r.ui.feedback),f(),ie(1,r._showTitle?1:-1),f(),h("nzSpan",r.ui.spanControl)("nzOffset",r.ui.offsetControl),f(4),ie(6,!r.ui.onlyVisual&&r.showError?6:-1),f(),ie(7,r.schema.description?7:-1))},dependencies:[yi,sc,Aa,Na,Fe,Si],encapsulation:2,data:{animation:[jl]}});let o=n;return o})();var df=(()=>{let n=class n{constructor(){this.cd=ae(fe),this.injector=ae($n),this.sfItemComp=ae(uf),this.sfComp=ae(n6),this.showError=!1,this.id=""}get cls(){return this.ui.class||""}get disabled(){return!!(this.schema.readOnly===!0||this.sfComp.disabled)}get l(){return this.formProperty.root.widget.sfComp.locale}get oh(){return this.ui.optionalHelp}get dom(){return this.injector.get(Ro)}get cleanValue(){return this.sfComp?.cleanValue}ngAfterViewInit(){this.formProperty.errorsChanges.pipe(F(this.sfItemComp.destroy$)).subscribe(t=>{if(t==null)return;rf(this.ui,"errorsChanges",this.formProperty.path,t);let i=this.sfComp?.firstVisual;(i||!i&&this.sfComp?._inited)&&(this.showError=t.length>0,this.error=this.showError?t[0].message:"",this.cd.detectChanges())}),this.afterViewInit()}setValue(t){this.formProperty.setValue(t,!1),rf(this.ui,"valueChanges",this.formProperty.path,this.formProperty)}get value(){return this.formProperty.value}detectChanges(t=!1){t?this.cd.markForCheck():this.formProperty.root.widget?.cd.markForCheck()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,hostVars:2,hostBindings:function(i,r){i&2&&cr(r.cls)}});let o=n;return o})(),Fz=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),Go=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),i6=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}ngAfterViewInit(){this.formProperty.errorsChanges.pipe(F(this.sfItemComp.destroy$)).subscribe(()=>this.cd.detectChanges())}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),r6=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}ngAfterViewInit(){this.formProperty.errorsChanges.pipe(F(this.sfItemComp.destroy$)).subscribe(()=>this.cd.detectChanges())}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),o6=(()=>{let n=class n extends i6{constructor(){super(...arguments),this.arraySpan=8}get addDisabled(){return this.disabled||this.schema.maxItems!=null&&this.formProperty.properties.length>=this.schema.maxItems}get showRemove(){return!(this.disabled||!this.removeTitle||this.schema.minItems!=null&&this.formProperty.properties.length<=this.schema.minItems)}ngOnInit(){let{grid:t,addTitle:i,addType:r,removable:s,removeTitle:a}=this.ui;t&&t.arraySpan&&(this.arraySpan=t.arraySpan),this.addTitle=this.dom.bypassSecurityTrustHtml(i||this.l.addText),this.addType=r||"dashed",this.removeTitle=s===!1?null:a||this.l.removeText}reValid(){this.formProperty.updateValueAndValidity({onlySelf:!1,emitValueEvent:!1,emitValidator:!0})}addItem(){let t=this.formProperty.add({});this.reValid(),this.ui.add?.(t)}removeItem(t){this.formProperty.remove(t),this.reValid(),this.ui.remove?.(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-array"]],hostVars:2,hostBindings:function(i,r){i&2&&k("sf__array",!0)},features:[Xe],decls:8,vars:10,consts:[["nz-col","","class","ant-form-item-label",3,"nzSpan"],["nz-col","",1,"ant-form-item-control-wrapper",3,"nzSpan","nzOffset"],[1,"ant-form-item-control"],["nz-row","",1,"sf__array-container"],[4,"ngFor","ngForOf"],["class","ant-form-explain"],["class","ant-form-extra",3,"innerHTML"],["nz-col","",1,"ant-form-item-label",3,"nzSpan"],[1,"sf__optional"],["nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[1,"sf__array-add"],["type","button","nz-button","",3,"nzType","disabled","innerHTML","click"],["nz-col","","class","sf__array-item",3,"nzSpan"],["nz-col","",1,"sf__array-item",3,"nzSpan"],[3,"formProperty"],["class","sf__array-remove"],[1,"sf__array-remove",3,"click"],["nz-icon","","nzType","delete"],[1,"ant-form-explain"],[1,"ant-form-extra",3,"innerHTML"]],template:function(i,r){i&1&&(C(0,"nz-form-item"),_(1,L4,8,9,"div",0),C(2,"div",1)(3,"div",2)(4,"div",3),_(5,G4,2,1,"ng-container",4),S(),_(6,H4,2,1,"div",5)(7,B4,1,1,"div",6),S()()()),i&2&&(k("ant-form-item-with-help",r.showError),f(),ie(1,r.schema.title?1:-1),f(),h("nzSpan",r.ui.spanControl)("nzOffset",r.ui.offsetControl),f(),k("has-error",r.showError),f(2),h("ngForOf",r.formProperty.properties),f(),ie(6,!r.ui.onlyVisual&&r.showError?6:-1),f(),ie(7,r.schema.description?7:-1))},dependencies:[lt,eo,yi,hr,um,sc,Aa,Na,Fe,Si,uf],encapsulation:2});let o=n;return o})(),s6=(()=>{let n=class n extends Go{};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-boolean"]],features:[Xe],decls:2,vars:12,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"ngModel","nzDisabled","nzSize","nzCheckedChildren","nzUnCheckedChildren","nzLoading","ngModelChange"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-switch",1),A("ngModelChange",function(a){return r.setValue(a)}),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("ngModel",r.value)("nzDisabled",r.disabled)("nzSize",r.ui.size)("nzCheckedChildren",r.ui.checkedChildren)("nzUnCheckedChildren",r.ui.unCheckedChildren)("nzLoading",r.ui.loading))},dependencies:[Kt,Rt,wv,$r],encapsulation:2});let o=n;return o})(),a6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.data=[],this.allChecked=!1,this.indeterminate=!1,this.labelTitle="",this.inited=!1}reset(t){this.inited=!1,vC(this.schema,this.ui,t).subscribe(i=>{this.data=i,this.allChecked=!1,this.indeterminate=!1,this.labelTitle=i.length===0?"":this.schema.title;let{span:r}=this.ui;this.grid_span=r&&r>0?r:0,this.updateAllChecked(),this.inited=!0,this.detectChanges()})}_setValue(t){this.setValue(t),this.detectChanges(),this.notifyChange(t)}notifySet(){let t=this.data.filter(i=>i.checked);this.updateAllChecked().setValue(t.map(i=>i.value)),this.notifyChange(t)}groupInGridChange(t){this.data.forEach(i=>i.checked=t.indexOf(i.value)!==-1),this.notifySet()}onAllChecked(){this.data.forEach(t=>t.checked=this.allChecked),this.notifySet()}updateAllChecked(){return this.data.every(t=>t.checked!==!0)?(this.allChecked=!1,this.indeterminate=!1):this.data.every(t=>t.checked===!0)?(this.allChecked=!0,this.indeterminate=!1):this.indeterminate=!0,this.detectChanges(),this}notifyChange(t){this.ui.change&&this.ui.change(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-checkbox"]],features:[Xe],decls:4,vars:8,consts:[["all",""],[3,"id","schema","ui","showError","error","showTitle","title"],["nz-checkbox","","class","sf__checkbox-all mr-sm",3,"ngModel","nzIndeterminate"],["nz-checkbox","",1,"sf__checkbox-all","mr-sm",3,"ngModel","nzIndeterminate","ngModelChange"],["nz-checkbox","",3,"nzDisabled","ngModel"],["nz-checkbox","",3,"nzDisabled","ngModel","ngModelChange"],[1,"sf__optional"],["nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[3,"ngTemplateOutlet"],[3,"ngModel","ngModelChange"],[1,"sf__checkbox-list",3,"nzOnChange"],["nz-row",""],["nz-col","",3,"nzSpan"],["nz-checkbox","",3,"nzValue","ngModel","nzDisabled"]],template:function(i,r){i&1&&(_(0,j4,1,1,"ng-template",null,0,_e),C(2,"sf-item-wrap",1),_(3,e5,2,1),S()),i&2&&(f(2),h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",!0)("title",r.labelTitle),f(),ie(3,r.inited?3:-1))},dependencies:[Be,Kt,Rt,yi,Bi,Pm,Im,sc,Aa,Fe,Si,$r],encapsulation:2});let o=n;return o})(),l6=(()=>{let n=class n extends Go{};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-custom"]],features:[Xe],decls:2,vars:12,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,t5,0,0,"ng-template",1),S()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("ngTemplateOutlet",r.ui._render)("ngTemplateOutletContext",iu(8,n5,r,r.schema,r.ui)))},dependencies:[Be,$r],encapsulation:2});let o=n;return o})(),c6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.flatRange=!1,this.displayValue=null}ngOnInit(){let{mode:t,end:i,displayFormat:r,allowClear:s,showToday:a}=this.ui;if(this.mode=t||"date",this.flatRange=i!=null,this.startFormat=this.ui._format,this.flatRange){this.mode="range";let l=this.endProperty.ui;this.endFormat=l.format?l._format:this.startFormat}if(r)this.displayFormat=r;else switch(this.mode){case"year":this.displayFormat="yyyy";break;case"month":this.displayFormat="yyyy-MM";break;case"week":this.displayFormat="yyyy-ww";break}this.i={allowClear:mo(s,!0),showToday:mo(a,!0)}}reset(t){let i={formatString:this.startFormat,defaultValue:null};if(Array.isArray(t)?t=t.map(r=>Ep(r,i)):t=Ep(t,i),this.flatRange){let r=Ep(this.endProperty.formData,{formatString:this.endFormat||this.startFormat,defaultValue:null});this.displayValue=t==null||r==null?[]:[t,r]}else this.displayValue=t;this.detectChanges(),this.displayValue&&setTimeout(()=>this._change(this.displayValue,!1))}_change(t,i=!0){if(i&&this.ui.change&&this.ui.change(t),t==null||Array.isArray(t)&&t.length<2){this.setValue(null),this.setEnd(null);return}let r=Array.isArray(t)?[Sp(t[0],this.startFormat),Sp(t[1],this.endFormat||this.startFormat)]:Sp(t,this.startFormat);this.flatRange?(this.setValue(r[0]),this.setEnd(r[1])):this.setValue(r)}_openChange(t){this.ui.onOpenChange&&this.ui.onOpenChange(t)}_ok(t){this.ui.onOk&&this.ui.onOk(t)}get endProperty(){return this.formProperty.parent.properties[this.ui.end]}setEnd(t){this.flatRange&&(this.endProperty.setValue(t,!0),this.endProperty.updateValueAndValidity())}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-date"]],features:[Xe],decls:6,vars:7,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzRenderExtraFooter","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzDisabledTime","nzRenderExtraFooter","nzRanges","nzShowTime","nzSeparator","nzShowWeekNumber","nzMode","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange","nzOnOk"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzDisabledTime","nzRenderExtraFooter","nzShowTime","nzShowToday","nzShowWeekNumber","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange","nzOnOk"]],template:function(i,r){if(i&1&&(C(0,"sf-item-wrap",0),_(1,i5,1,15)(2,r5,1,15)(3,o5,1,14)(4,s5,1,21)(5,a5,1,19),S()),i&2){let s;h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),ie(1,(s=r.mode)==="year"?1:s==="month"?2:s==="week"?3:s==="range"?4:5)}},dependencies:[St,Kt,Rt,ps,vh,_T,wT,ST,$r],encapsulation:2});let o=n;return o})(),Tz=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.formatter=t=>t,this.parser=t=>t,this.width=""}ngOnInit(){let{minimum:t,exclusiveMinimum:i,maximum:r,exclusiveMaximum:s,multipleOf:a,type:l}=this.schema;this.step=a||1,typeof t<"u"&&(this.min=i?t+this.step:t),typeof r<"u"&&(this.max=s?r-this.step:r),l==="integer"&&(this.min=Math.trunc(this.min),this.max=Math.trunc(this.max),this.step=Math.trunc(this.step));let c=this.ui;c.prefix!=null&&(c.formatter=u=>u==null?"":`${c.prefix} ${u}`,c.parser=u=>u.replace(`${c.prefix} `,"")),c.unit!=null&&(c.formatter=u=>u==null?"":`${u} ${c.unit}`,c.parser=u=>u.replace(` ${c.unit}`,"")),c.formatter&&(this.formatter=c.formatter),c.parser&&(this.parser=c.parser),this.width=typeof c.widgetWidth=="number"?`${c.widgetWidth}px`:c.widgetWidth??"90px"}_setValue(t){this.setValue(this.schema.type==="integer"?Math.floor(t):t),this.ui.change&&this.ui.change(this.value)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-number"]],features:[Xe],decls:2,vars:22,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzId","ngModel","nzDisabled","nzSize","nzMin","nzMax","nzStep","nzFormatter","nzParser","nzPrecision","nzPlaceHolder","ngClass","ngModelChange"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-input-number",1),A("ngModelChange",function(a){return r._setValue(a)}),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),Re("width",r.width),h("nzId",r.id)("ngModel",r.value)("nzDisabled",r.disabled)("nzSize",r.ui.size)("nzMin",r.min)("nzMax",r.max)("nzStep",r.step)("nzFormatter",r.formatter)("nzParser",r.parser)("nzPrecision",r.ui.precision)("nzPlaceHolder",r.ui.placeholder||"")("ngClass",yt(20,l5,r.ui.hideStep)))},dependencies:[St,Kt,Rt,ic,$r],encapsulation:2});let o=n;return o})(),u6=(()=>{let n=class n extends r6{constructor(){super(...arguments),this.type="default",this.list=[],this.showExpand=!0,this.expand=!0}ngOnInit(){let{formProperty:t,ui:i}=this,{grid:r,showTitle:s,type:a}=i;this.showExpand=mo(i.showExpand,!0),this.expand=mo(i.expand,!0),this.type=a??"default",(this.type==="card"||!t.isRoot()&&!(t.parent instanceof af)&&s===!0)&&(this.title=this.schema.title),this.grid=r;let l=[];for(let c of t.propertiesId){let u=t.properties[c],d={property:u,grid:u.ui.grid||r||{},spanLabelFixed:u.ui.spanLabelFixed,show:u.ui.hidden===!1};l.push(d)}this.list=l}changeExpand(){this.showExpand&&(this.expand=!this.expand,this.detectChanges(!0))}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-object"]],features:[Xe],decls:4,vars:1,consts:[["default",""],["class","sf__object-card",3,"nzTitle","nzExtra","nzSize","nzActions","nzBodyStyle","nzBordered","nzBorderless","sf__object-card-fold"],["class","sf__title"],["nz-row","",3,"nzGutter"],[1,"sf__title"],["nz-col","",3,"nzSpan","nzOffset","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],[3,"formProperty","fixed-label"],[1,"sf__object-card",3,"nzTitle","nzExtra","nzSize","nzActions","nzBodyStyle","nzBordered","nzBorderless"],["cardTitleTpl",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"click"],["nz-icon","","class","mr-xs text-xs",3,"nzType"],["class","sf__optional"],["nz-icon","",1,"mr-xs","text-xs",3,"nzType"],[1,"sf__optional"],["s","","nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipColor","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,m5,3,2,"ng-template",null,0,_e)(2,T5,4,13,"nz-card",1)(3,x5,1,1),i&2&&(f(2),ie(2,r.type==="card"?2:3))},dependencies:[Be,yi,um,sc,Aa,Fe,Si,uf,Mz],encapsulation:2});let o=n;return o})(),d6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.data=[]}reset(t){this.styleType=(this.ui.styleType||"default")==="default",vC(this.schema,this.ui,t).subscribe(i=>{this.data=i,this.detectChanges()})}_setValue(t){this.setValue(t),this.ui.change&&this.ui.change(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-radio"]],features:[Xe],decls:4,vars:11,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzSize","nzName","ngModel","nzButtonStyle","ngModelChange"],["nz-radio","",3,"nzValue","nzDisabled"],[3,"innerHTML"],["nz-radio-button","",3,"nzValue","nzDisabled"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-radio-group",1),A("ngModelChange",function(a){return r._setValue(a)}),_(2,O5,2,0)(3,R5,2,0),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("nzSize",r.ui.size)("nzName",r.id)("ngModel",r.value)("nzButtonStyle",r.ui.buttonStyle||"outline"),f(),ie(2,r.styleType?2:3))},dependencies:[Kt,Rt,ls,Vm,yb,$r],encapsulation:2});let o=n;return o})(),p6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.search$=new J,this.data=[],this.hasGroup=!1,this.loading=!1}checkGroup(t){this.hasGroup=(t||[]).filter(i=>i.group===!0).length>0}ngOnInit(){let{autoClearSearchValue:t,borderless:i,autoFocus:r,dropdownMatchSelectWidth:s,serverSearch:a,maxMultipleCount:l,mode:c,showSearch:u,tokenSeparators:d,maxTagCount:p,compareWith:g,optionHeightPx:v,optionOverflowSize:y,showArrow:x}=this.ui;this.i={autoClearSearchValue:mo(t,!0),borderless:mo(i,!1),autoFocus:mo(r,!1),dropdownMatchSelectWidth:mo(s,!0),serverSearch:mo(a,!1),maxMultipleCount:l||1/0,mode:c||"default",showSearch:mo(u,!0),tokenSeparators:d||[],maxTagCount:p||void 0,optionHeightPx:v||32,optionOverflowSize:y||8,showArrow:typeof x!="boolean"?void 0:x,compareWith:g||((z,M)=>z===M)};let E=this.ui.onSearch;E&&this.search$.pipe(F(this.sfItemComp.destroy$),Bt(),Sa(this.ui.searchDebounceTime||300),on(z=>E(z)),lp(()=>[])).subscribe(z=>{this.data=z,this.checkGroup(z),this.loading=!1,this.detectChanges()})}reset(t){let i=this.ui.onSearch;vC(this.schema,this.ui,t).subscribe(r=>{this._value=t,i==null&&(this.data=r),this.checkGroup(r),this.detectChanges()}),t&&i!=null&&this.search$.next(t)}change(t){this.ui.change&&this.ui.change(t,this.getOrgData(t)),this.setValue(t??void 0)}getOrgData(t){let i=this.injector.get(bz);return Array.isArray(t)?t.map(r=>i.findTree(this.data,s=>s.value===r)):i.findTree(this.data,r=>r.value===t)}openChange(t){this.ui.openChange&&this.ui.openChange(t)}scrollToBottom(){this.ui.scrollToBottom&&this.ui.scrollToBottom()}onSearch(t){this.ui.onSearch&&(this.loading=!0,this.search$.next(t))}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-select"]],features:[Xe],decls:5,vars:39,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzId","nzDisabled","ngModel","nzSize","nzPlaceHolder","nzNotFoundContent","nzDropdownClassName","nzAllowClear","nzDropdownStyle","nzCustomTemplate","nzSuffixIcon","nzRemoveIcon","nzClearIcon","nzMenuItemSelectedIcon","nzMaxTagPlaceholder","nzDropdownRender","nzAutoClearSearchValue","nzBorderless","nzAutoFocus","nzDropdownMatchSelectWidth","nzServerSearch","nzMaxMultipleCount","nzMode","nzShowSearch","nzShowArrow","nzTokenSeparators","nzMaxTagCount","compareWith","nzOptionHeightPx","nzOptionOverflowSize","ngModelChange","nzOpenChange","nzOnSearch","nzScrollToBottom"],["nzDisabled","","nzCustomContent",""],[3,"nzLabel","nzValue","nzHide","nzDisabled"],[3,"nzLabel"],[3,"nzLabel","nzValue","nzDisabled","nzHide"],["nz-icon","","nzType","loading"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-select",1),A("ngModelChange",function(a){return r._value=a})("ngModelChange",function(a){return r.change(a)})("nzOpenChange",function(a){return r.openChange(a)})("nzOnSearch",function(a){return r.onSearch(a)})("nzScrollToBottom",function(){return r.scrollToBottom()}),_(2,P5,2,0)(3,A5,2,0)(4,N5,3,1,"nz-option",2),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("nzId",r.id)("nzDisabled",r.disabled)("ngModel",r._value)("nzSize",r.ui.size)("nzPlaceHolder",r.ui.placeholder)("nzNotFoundContent",r.ui.notFoundContent)("nzDropdownClassName",r.ui.dropdownClassName)("nzAllowClear",r.ui.allowClear)("nzDropdownStyle",r.ui.dropdownStyle)("nzCustomTemplate",r.ui.customTemplate)("nzSuffixIcon",r.ui.suffixIcon)("nzRemoveIcon",r.ui.removeIcon)("nzClearIcon",r.ui.clearIcon)("nzMenuItemSelectedIcon",r.ui.menuItemSelectedIcon)("nzMaxTagPlaceholder",r.ui.maxTagPlaceholder)("nzDropdownRender",r.ui.dropdownRender)("nzAutoClearSearchValue",r.i.autoClearSearchValue)("nzBorderless",r.i.borderless)("nzAutoFocus",r.i.autoFocus)("nzDropdownMatchSelectWidth",r.i.dropdownMatchSelectWidth)("nzServerSearch",r.i.serverSearch)("nzMaxMultipleCount",r.i.maxMultipleCount)("nzMode",r.i.mode)("nzShowSearch",r.i.showSearch)("nzShowArrow",r.i.showArrow)("nzTokenSeparators",r.i.tokenSeparators)("nzMaxTagCount",r.i.maxTagCount)("compareWith",r.i.compareWith)("nzOptionHeightPx",r.i.optionHeightPx)("nzOptionOverflowSize",r.i.optionOverflowSize),f(),ie(2,!r.loading&&!r.hasGroup?2:-1),f(),ie(3,!r.loading&&r.hasGroup?3:-1),f(),ie(4,r.loading?4:-1))},dependencies:[Kt,Rt,yi,Fe,zu,Ou,Eu,$r],encapsulation:2});let o=n;return o})(),Ez=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.change$=null}ngOnInit(){let{addOnAfter:t,addOnAfterIcon:i,addOnBefore:r,addOnBeforeIcon:s,prefix:a,prefixIcon:l,suffix:c,suffixIcon:u,autofocus:d}=this.ui;this.type=t||r||i||s||a||l||c||u?"addon":"",d===!0&&setTimeout(()=>{this.injector.get(de).nativeElement.querySelector(`#${this.id}`).focus()},20),this.initChange()}reset(t){!t&&this.schema.format==="color"&&this.setValue("#000000")}initChange(){let t=this.ui.changeDebounceTime,i=this.ui.change;if(t==null||t<=0||i==null)return;this.change$=new ct(this.value);let r=this.change$.asObservable().pipe(Sa(t),F(this.sfItemComp.destroy$));this.ui.changeMap!=null&&(r=r.pipe(on(this.ui.changeMap))),r.subscribe(s=>i(s))}change(t){if(this.setValue(t),this.change$!=null){this.change$.next(t);return}this.ui.change&&this.ui.change(t)}focus(t){this.ui.focus&&this.ui.focus(t)}blur(t){this.ui.blur&&this.ui.blur(t)}enter(t){this.ui.enter&&this.ui.enter(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-string"]],features:[Xe],decls:5,vars:7,consts:[[3,"id","schema","ui","showError","error","showTitle"],["ipt",""],[3,"nzAddOnBefore","nzAddOnAfter","nzAddOnBeforeIcon","nzAddOnAfterIcon","nzPrefix","nzPrefixIcon","nzSuffix","nzSuffixIcon"],["nz-input","",3,"disabled","nzSize","nzBorderless","ngModel","ngModelChange","keyup.enter","focus","blur"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,L5,1,11,"ng-template",null,1,_e)(3,V5,2,9,"nz-input-group",2)(4,H5,1,1),S()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(3),ie(3,r.type==="addon"?3:4))},dependencies:[Be,Ii,Kt,Rt,yi,Fa,iv,cT,$r],encapsulation:2});let o=n;return o})(),h6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.text=""}ngOnInit(){this.ui._required=!1,this.ui.html=mo(this.ui.html,!0)}reset(t){this.text=t||this.ui.defaultText||"-"}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-text"]],features:[Xe],decls:3,vars:9,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"innerHTML"],[3,"innerText"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,B5,1,1,"span",1)(2,$5,1,1),S()),i&2&&(k("sf__text-html",r.ui.html),h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),ie(1,r.ui.html?1:2))},dependencies:[$r],encapsulation:2});let o=n;return o})(),f6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.autosize=!0}ngOnInit(){this.ui.autosize!=null&&(this.autosize=this.ui.autosize),this.ui.computeCharacterCount==null&&(this.ui.computeCharacterCount=t=>t.length)}change(t){this.setValue(t),this.ui.change&&this.ui.change(t)}focus(t){this.ui.focus&&this.ui.focus(t)}blur(t){this.ui.blur&&this.ui.blur(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-textarea"]],features:[Xe],decls:5,vars:7,consts:[[3,"id","schema","ui","showError","error","showTitle"],["ipt",""],[3,"nzMaxCharacterCount","nzComputeCharacterCount"],["nz-input","",3,"disabled","nzSize","ngModel","nzAutosize","nzBorderless","ngModelChange","focus","blur"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,j5,2,9,"ng-template",null,1,_e)(3,W5,3,11,"nz-textarea-count",2)(4,K5,1,1),S()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(3),ie(3,r.ui.maxCharacterCount?3:4))},dependencies:[Be,Ii,Kt,Rt,dT,Fa,uT,$r],encapsulation:2});let o=n;return o})(),lf=class extends Wa{constructor(){super(),this.register("object",u6),this.register("array",o6),this.register("text",h6),this.register("string",Ez),this.register("number",Tz),this.register("integer",Tz),this.register("date",c6),this.register("radio",d6),this.register("checkbox",a6),this.register("boolean",s6),this.register("textarea",f6),this.register("select",p6),this.register("custom",l6),this.setDefault(Ez)}},g6=[Hi,$l,$i,Hs,ac,$s,Ge,Vs,Gs,Gl,Jl,Ls,lc,ji];var vs=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[{provide:cf,useClass:Iz,deps:[In,$e]},{provide:Wa,useClass:lf}]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,nn,lm,g6]});let o=n;return o})();function nCe(o){let n=[{provide:cf,useClass:Iz,deps:[In,$e]},{provide:Wa,useClass:lf}];return o?.widgets&&n.push({provide:wa,multi:!0,useValue:()=>{let e=ae(Wa);o?.widgets?.forEach(t=>e.register(t.KEY,t.type))}}),ba(n)}function m6(o,n){if(o&1&&(H(0),R(1,"span",1),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function v6(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m().$implicit;f(),Ne(" ",e.tab.label," ")}}var y6=()=>({visible:!1});function C6(o,n){if(o&1){let e=Q();C(0,"li",8),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.onSelect(r))})("contextmenu",function(i){let s=I(e).$implicit,a=m(2);return P(a.onContextmenu(s,i))}),_(1,v6,2,1,"ng-container",9),S()}if(o&2){let e=n.$implicit;k("ant-tabs-dropdown-menu-item-disabled",e.disabled),h("nzSelected",e.active)("nzDisabled",e.disabled),f(),h("nzStringTemplateOutlet",e.tab.label)("nzStringTemplateOutletContext",ii(6,y6))}}function _6(o,n){if(o&1&&(C(0,"ul",6),_(1,C6,2,7,"li",7),S()),o&2){let e=m();f(),h("ngForOf",e.items)}}function S6(o,n){if(o&1){let e=Q();C(0,"button",10),A("click",function(){I(e);let i=m();return P(i.addClicked.emit())}),S()}if(o&2){let e=m();h("addIcon",e.addIcon)}}var w6=()=>({minWidth:"46px"}),b6=["navWarp"],T6=["navList"];function E6(o,n){if(o&1){let e=Q();C(0,"button",8),A("click",function(){I(e);let i=m();return P(i.addClicked.emit())}),S()}if(o&2){let e=m();h("addIcon",e.addIcon),ze("tabindex",-1)}}function x6(o,n){}function z6(o,n){if(o&1&&(C(0,"div",9),_(1,x6,0,0,"ng-template",10),S()),o&2){let e=m();f(),h("ngTemplateOutlet",e.extraTemplate)}}var O6=["*"],D6=["nz-tab-body",""];function R6(o,n){}function I6(o,n){if(o&1&&(H(0),_(1,R6,0,0,"ng-template",1),B()),o&2){let e=m();f(),h("ngTemplateOutlet",e.content)}}function P6(o,n){if(o&1&&(H(0),R(1,"span",1),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}var M6=["contentTemplate"];function F6(o,n){o&1&&Ie(0)}function A6(o,n){o&1&&Ie(0,1)}var N6=[[["","nz-tab-link",""]],"*"],L6=["[nz-tab-link]","*"];function k6(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m().$implicit;f(),ye(e.label)}}function V6(o,n){if(o&1){let e=Q();C(0,"button",10),A("click",function(i){I(e);let r=m().index,s=m(2);return P(s.onClose(r,i))}),S()}if(o&2){let e=m().$implicit;h("closeIcon",e.nzCloseIcon)}}var G6=()=>({visible:!0});function H6(o,n){if(o&1){let e=Q();C(0,"div",6),A("click",function(i){let r=I(e),s=r.$implicit,a=r.index,l=m(2);return P(l.clickNavItem(s,a,i))})("contextmenu",function(i){let s=I(e).$implicit,a=m(2);return P(a.contextmenuNavItem(s,i))}),C(1,"button",7),_(2,k6,2,1,"ng-container",8)(3,V6,1,1,"button",9),S()()}if(o&2){let e=n.$implicit,t=n.index,i=m(2);Re("margin-right",i.position==="horizontal"?i.nzTabBarGutter:null,"px")("margin-bottom",i.position==="vertical"?i.nzTabBarGutter:null,"px"),k("ant-tabs-tab-active",i.nzSelectedIndex===t)("ant-tabs-tab-disabled",e.nzDisabled),f(),h("id",i.getTabContentId(t))("disabled",e.nzDisabled)("tab",e)("active",i.nzSelectedIndex===t),ze("tabIndex",i.getTabIndex(e,t))("aria-disabled",e.nzDisabled)("aria-selected",i.nzSelectedIndex===t&&!i.nzHideAll)("aria-controls",i.getTabContentId(t)),f(),h("nzStringTemplateOutlet",e.label)("nzStringTemplateOutletContext",ii(19,G6)),f(),h("ngIf",e.nzClosable&&i.closable&&!e.nzDisabled)}}function B6(o,n){if(o&1){let e=Q();C(0,"nz-tabs-nav",4),A("tabScroll",function(i){I(e);let r=m();return P(r.nzTabListScroll.emit(i))})("selectFocusedIndex",function(i){I(e);let r=m();return P(r.setSelectedIndex(i))})("addClicked",function(){I(e);let i=m();return P(i.onAdd())}),_(1,H6,4,20,"div",5),S()}if(o&2){let e=m();h("ngStyle",e.nzTabBarStyle)("selectedIndex",e.nzSelectedIndex||0)("inkBarAnimated",e.inkBarAnimated)("addable",e.addable)("addIcon",e.nzAddIcon)("hideBar",e.nzHideAll)("position",e.position)("extraTemplate",e.nzTabBarExtraContent),f(),h("ngForOf",e.tabs)}}function $6(o,n){if(o&1&&R(0,"div",11),o&2){let e=n.$implicit,t=n.index,i=m();h("id",i.getTabContentId(t))("active",i.nzSelectedIndex===t&&!i.nzHideAll)("content",e.content)("forceRender",e.nzForceRender)("tabPaneAnimated",i.tabPaneAnimated),ze("aria-labelledby",i.getTabContentId(t))}}var hf=(()=>{let n=class n{constructor(t){this.elementRef=t,this.addIcon="plus",this.element=this.elementRef.nativeElement}getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-tab-add-button"],["button","nz-tab-add-button",""]],hostAttrs:["aria-label","Add tab","type","button",1,"ant-tabs-nav-add"],inputs:{addIcon:"addIcon"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nz-icon","","nzTheme","outline",3,"nzType"]],template:function(i,r){i&1&&_(0,m6,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.addIcon)},dependencies:[Ye,Ue,Ge,Fe],encapsulation:2});let o=n;return o})(),Nz=(()=>{let n=class n{get _animated(){return this.animationMode!=="NoopAnimations"&&this.animated}constructor(t,i,r){this.elementRef=t,this.ngZone=i,this.animationMode=r,this.position="horizontal",this.animated=!0}alignToElement(t){this.ngZone.runOutsideAngular(()=>{to(()=>this.setStyles(t))})}setStyles(t){let i=this.elementRef.nativeElement;this.position==="horizontal"?(i.style.top="",i.style.height="",i.style.left=this.getLeftPosition(t),i.style.width=this.getElementWidth(t)):(i.style.left="",i.style.width="",i.style.top=this.getTopPosition(t),i.style.height=this.getElementHeight(t))}getLeftPosition(t){return t?`${t.offsetLeft||0}px`:"0"}getElementWidth(t){return t?`${t.offsetWidth||0}px`:"0"}getTopPosition(t){return t?`${t.offsetTop||0}px`:"0"}getElementHeight(t){return t?`${t.offsetHeight||0}px`:"0"}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(TS,8))},n.\u0275dir=Se({type:n,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-tabs-ink-bar-animated",r._animated)},inputs:{position:"position",animated:"animated"},standalone:!0});let o=n;return o})(),Gz=(()=>{let n=class n{constructor(t){this.elementRef=t,this.disabled=!1,this.active=!1,this.el=t.nativeElement,this.parentElement=this.el.parentElement}focus(){this.el.focus()}get width(){return this.parentElement.offsetWidth}get height(){return this.parentElement.offsetHeight}get left(){return this.parentElement.offsetLeft}get top(){return this.parentElement.offsetTop}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275dir=Se({type:n,selectors:[["","nzTabNavItem",""]],inputs:{disabled:"disabled",tab:"tab",active:"active"},standalone:!0});let o=n;return o})(),yC=(()=>{let n=class n{constructor(t,i){this.cdr=t,this.elementRef=i,this.items=[],this.addable=!1,this.addIcon="plus",this.addClicked=new O,this.selected=new O,this.closeAnimationWaitTimeoutId=-1,this.menuOpened=!1,this.element=this.elementRef.nativeElement}onSelect(t){t.disabled||(t.tab.nzClick.emit(),this.selected.emit(t))}onContextmenu(t,i){t.disabled||t.tab.nzContextmenu.emit(i)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(t){t||(this.closeAnimationWaitTimeoutId=setTimeout(()=>{this.menuOpened=!1,this.cdr.markForCheck()},150))}getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}ngOnDestroy(){clearTimeout(this.closeAnimationWaitTimeoutId)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-tabs-nav-operations-hidden",r.items.length===0)},inputs:{items:"items",addable:"addable",addIcon:"addIcon"},outputs:{addClicked:"addClicked",selected:"selected"},exportAs:["nzTabNavOperation"],standalone:!0,features:[K],decls:7,vars:6,consts:[["nz-dropdown","","type","button","tabindex","-1","aria-hidden","true","nzOverlayClassName","nz-tabs-dropdown",1,"ant-tabs-nav-more",3,"nzDropdownMenu","nzOverlayStyle","nzMatchWidthElement","nzVisibleChange","mouseenter"],["dropdownTrigger","nzDropdown"],["nz-icon","","nzType","ellipsis"],["menu","nzDropdownMenu"],["nz-menu","",4,"ngIf"],["nz-tab-add-button","",3,"addIcon","click",4,"ngIf"],["nz-menu",""],["nz-menu-item","","class","ant-tabs-dropdown-menu-item",3,"ant-tabs-dropdown-menu-item-disabled","nzSelected","nzDisabled","click","contextmenu",4,"ngFor","ngForOf"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"nzSelected","nzDisabled","click","contextmenu"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-add-button","",3,"addIcon","click"]],template:function(i,r){if(i&1&&(C(0,"button",0,1),A("nzVisibleChange",function(a){return r.menuVisChange(a)})("mouseenter",function(){return r.showItems()}),R(2,"span",2),S(),C(3,"nz-dropdown-menu",null,3),_(5,_6,2,1,"ul",4),S(),_(6,S6,1,1,"button",5)),i&2){let s=te(4);h("nzDropdownMenu",s)("nzOverlayStyle",ii(5,w6))("nzMatchWidthElement",null),f(5),h("ngIf",r.menuOpened),f(),h("ngIf",r.addable)}},dependencies:[Ge,Fe,we,lt,Ye,Ue,hf,us,ec,cs,co,yr],encapsulation:2,changeDetection:0});let o=n;return o})(),j6=.1,Lz=.01,pf=20,kz=.995**pf,W6=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.elementRef=i,this.lastWheelDirection=null,this.lastWheelTimestamp=0,this.lastTimestamp=0,this.lastTimeDiff=0,this.lastMixedWheel=0,this.lastWheelPrevent=!1,this.touchPosition=null,this.lastOffset=null,this.motion=-1,this.unsubscribe=()=>{},this.offsetChange=new O,this.tabScroll=new O,this.onTouchEnd=r=>{if(!this.touchPosition)return;let s=this.lastOffset,a=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,s){let l=s.x/a,c=s.y/a,u=Math.abs(l),d=Math.abs(c);if(Math.max(u,d){if(Math.abs(p){if(!this.touchPosition)return;r.preventDefault();let{screenX:s,screenY:a}=r.touches[0],l=s-this.touchPosition.x,c=a-this.touchPosition.y;this.onOffset(l,c,r);let u=Date.now();this.lastTimeDiff=u-this.lastTimestamp,this.lastTimestamp=u,this.lastOffset={x:l,y:c},this.touchPosition={x:s,y:a}},this.onTouchStart=r=>{let{screenX:s,screenY:a}=r.touches[0];this.touchPosition={x:s,y:a},window.clearInterval(this.motion)},this.onWheel=r=>{let{deltaX:s,deltaY:a}=r,l,c=Math.abs(s),u=Math.abs(a);c===u?l=this.lastWheelDirection==="x"?s:a:c>u?(l=s,this.lastWheelDirection="x"):(l=a,this.lastWheelDirection="y");let d=Date.now(),p=Math.abs(l);(d-this.lastWheelTimestamp>100||p-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-l,-l,r),(r.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=d,this.lastMixedWheel=p}}ngOnInit(){this.unsubscribe=this.ngZone.runOutsideAngular(()=>{let t=this.elementRef.nativeElement,i=Ke(t,"wheel"),r=Ke(t,"touchstart"),s=Ke(t,"touchmove"),a=Ke(t,"touchend"),l=new lr;return l.add(this.subscribeWrap("wheel",i,this.onWheel)),l.add(this.subscribeWrap("touchstart",r,this.onTouchStart)),l.add(this.subscribeWrap("touchmove",s,this.onTouchMove)),l.add(this.subscribeWrap("touchend",a,this.onTouchEnd)),()=>{l.unsubscribe()}})}subscribeWrap(t,i,r){return i.subscribe(s=>{this.tabScroll.emit({type:t,event:s}),s.defaultPrevented||r(s)})}onOffset(t,i,r){this.ngZone.run(()=>{this.offsetChange.emit({x:t,y:i,event:r})})}ngOnDestroy(){this.unsubscribe()}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de))},n.\u0275dir=Se({type:n,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"},standalone:!0});let o=n;return o})(),U6=typeof requestAnimationFrame<"u"?uS:ap,Vz=150,CC=(()=>{let n=class n{get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let i=Qg(t);this._selectedIndex!==i&&(this._selectedIndex=t,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(t))}get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(t){!this.isValidIndex(t)||this.focusIndex===t||!this.keyManager||this.keyManager.setActiveItem(t)}get showAddButton(){return this.hiddenItems.length===0&&this.addable}constructor(t,i,r,s,a){this.cdr=t,this.ngZone=i,this.viewportRuler=r,this.nzResizeObserver=s,this.dir=a,this.indexFocused=new O,this.selectFocusedIndex=new O,this.addClicked=new O,this.tabScroll=new O,this.position="horizontal",this.addable=!1,this.hideBar=!1,this.addIcon="plus",this.inkBarAnimated=!0,this.translate=null,this.transformX=0,this.transformY=0,this.pingLeft=!1,this.pingRight=!1,this.pingTop=!1,this.pingBottom=!1,this.hiddenItems=[],this.destroy$=new J,this._selectedIndex=0,this.wrapperWidth=0,this.wrapperHeight=0,this.scrollListWidth=0,this.scrollListHeight=0,this.operationWidth=0,this.operationHeight=0,this.addButtonWidth=0,this.addButtonHeight=0,this.selectedIndexChanged=!1,this.lockAnimationTimeoutId=-1,this.cssTransformTimeWaitingId=-1}ngAfterViewInit(){let t=this.dir?this.dir.change.asObservable():Mn(null),i=this.viewportRuler.change(150),r=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new ew(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),to(r),_t(this.nzResizeObserver.observe(this.navWarpRef),this.nzResizeObserver.observe(this.navListRef)).pipe(F(this.destroy$),zs(16,U6)).subscribe(()=>{r()}),_t(t,i,this.items.changes).pipe(F(this.destroy$)).subscribe(()=>{Promise.resolve().then(r),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe(F(this.destroy$)).subscribe(s=>{this.indexFocused.emit(s),this.setTabFocus(s),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}ngOnDestroy(){clearTimeout(this.lockAnimationTimeoutId),clearTimeout(this.cssTransformTimeWaitingId),this.destroy$.next(),this.destroy$.complete()}onSelectedFromMenu(t){let i=this.items.toArray().findIndex(r=>r===t);i!==-1&&(this.keyManager.updateActiveItem(i),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(t)))}onOffsetChange(t){if(this.position==="horizontal"){if(this.lockAnimationTimeoutId===-1&&(this.transformX>=0&&t.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&t.x<0))return;t.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+t.x),this.setTransform(this.transformX,0)}else{if(this.lockAnimationTimeoutId===-1&&(this.transformY>=0&&t.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&t.y<0))return;t.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+t.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(t){let i=this.navWarpRef.nativeElement.contains(t.target);if(!(Nl(t)||!i))switch(t.keyCode){case 37:case 38:case 39:case 40:this.lockAnimation(),this.keyManager.onKeydown(t);break;case 13:case 32:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(t)}}isValidIndex(t){if(!this.items)return!0;let i=this.items?this.items.toArray()[t]:null;return!!i&&!i.disabled}scrollToTab(t){if(!this.items.find(r=>r===t))return;let i=this.items.toArray();if(this.position==="horizontal"){let r=this.transformX;if(this.getLayoutDirection()==="rtl"){let s=i[0].left+i[0].width-t.left-t.width;sthis.transformX+this.wrapperWidth&&(r=s+t.width-this.wrapperWidth)}else t.left<-this.transformX?r=-t.left:t.left+t.width>-this.transformX+this.wrapperWidth&&(r=-(t.left+t.width-this.wrapperWidth));this.transformX=r,this.transformY=0,this.setTransform(r,0)}else{let r=this.transformY;t.top<-this.transformY?r=-t.top:t.top+t.height>-this.transformY+this.wrapperHeight&&(r=-(t.top+t.height-this.wrapperHeight)),this.transformY=r,this.transformX=0,this.setTransform(0,r)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},Vz)}lockAnimation(){this.lockAnimationTimeoutId===-1&&this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=-1},Vz)})}setTransform(t,i){this.navListRef.nativeElement.style.transform=`translate(${t}px, ${i}px)`}clampTransformX(t){let i=this.wrapperWidth-this.scrollListWidth;return this.getLayoutDirection()==="rtl"?Math.max(Math.min(i,t),0):Math.min(Math.max(i,t),0)}clampTransformY(t){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,t),0)}updateScrollListPosition(){this.resetSizes(),this.transformX=this.clampTransformX(this.transformX),this.transformY=this.clampTransformY(this.transformY),this.setVisibleRange(),this.setPingStatus(),this.keyManager&&(this.keyManager.updateActiveItem(this.keyManager.activeItemIndex),this.keyManager.activeItem&&this.scrollToTab(this.keyManager.activeItem))}resetSizes(){this.addButtonWidth=this.addBtnRef?this.addBtnRef.getElementWidth():0,this.addButtonHeight=this.addBtnRef?this.addBtnRef.getElementHeight():0,this.operationWidth=this.operationRef.getElementWidth(),this.operationHeight=this.operationRef.getElementHeight(),this.wrapperWidth=this.navWarpRef.nativeElement.offsetWidth||0,this.wrapperHeight=this.navWarpRef.nativeElement.offsetHeight||0,this.scrollListHeight=this.navListRef.nativeElement.offsetHeight||0,this.scrollListWidth=this.navListRef.nativeElement.offsetWidth||0}alignInkBarToSelectedTab(){let t=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,i=t?t.elementRef.nativeElement:null;i&&this.inkBar.alignToElement(i.parentElement)}setPingStatus(){let t={top:!1,right:!1,bottom:!1,left:!1},i=this.navWarpRef.nativeElement;this.position==="horizontal"?this.getLayoutDirection()==="rtl"?(t.right=this.transformX>0,t.left=this.transformX+this.wrapperWidth{let s=`ant-tabs-nav-wrap-ping-${r}`;t[r]?i.classList.add(s):i.classList.remove(s)})}setVisibleRange(){let t,i,r,s,a,l,c=this.items.toArray(),u={width:0,height:0,left:0,top:0,right:0},d=z=>{let M,G=c[z]||u;return i==="right"?M=c[0].left+c[0].width-c[z].left-c[z].width:M=G[i],M};this.position==="horizontal"?(t="width",s=this.wrapperWidth,a=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),l=this.addButtonWidth,r=Math.abs(this.transformX),this.getLayoutDirection()==="rtl"?(i="right",this.pingRight=this.transformX>0,this.pingLeft=this.transformX+this.wrapperWidths&&(p=s-l),!c.length){this.hiddenItems=[],this.cdr.markForCheck();return}let g=c.length,v=g;for(let z=0;zr+p){v=z-1;break}}let y=0;for(let z=g-1;z>=0;z-=1)if(d(z){let n=class n{constructor(){this.content=null,this.active=!1,this.tabPaneAnimated=!0,this.forceRender=!1}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:12,hostBindings:function(i,r){i&2&&(ze("tabindex",r.active?0:-1)("aria-hidden",!r.active),Re("visibility",r.tabPaneAnimated?r.active?null:"hidden":null)("height",r.tabPaneAnimated?r.active?null:0:null)("overflow-y",r.tabPaneAnimated?r.active?null:"none":null)("display",r.tabPaneAnimated||r.active?null:"none"),k("ant-tabs-tabpane-active",r.active))},inputs:{content:"content",active:"active",tabPaneAnimated:"tabPaneAnimated",forceRender:"forceRender"},exportAs:["nzTabBody"],standalone:!0,features:[K],attrs:D6,decls:1,vars:1,consts:[[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,I6,2,1,"ng-container",0),i&2&&h("ngIf",r.active||r.forceRender)},dependencies:[we,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),Hz=(()=>{let n=class n{constructor(){this.closeIcon="close"}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-tab-close-button"],["button","nz-tab-close-button",""]],hostAttrs:["aria-label","Close tab","type","button",1,"ant-tabs-tab-remove"],inputs:{closeIcon:"closeIcon"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nz-icon","","nzTheme","outline",3,"nzType"]],template:function(i,r){i&1&&_(0,P6,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.closeIcon)},dependencies:[Ye,Ue,Ge,Fe],encapsulation:2});let o=n;return o})(),q6=(()=>{let n=class n{constructor(t){this.templateRef=t}};n.\u0275fac=function(i){return new(i||n)(w(En,1))},n.\u0275dir=Se({type:n,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"],standalone:!0});let o=n;return o})(),Y6=(()=>{let n=class n{constructor(t,i){this.elementRef=t,this.routerLink=i}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Po,10))},n.\u0275dir=Se({type:n,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"],standalone:!0});let o=n;return o})(),Q6=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","nz-tab",""]],exportAs:["nzTab"],standalone:!0});let o=n;return o})(),Bz=new hn("NZ_TAB_SET"),X6=(()=>{let n=class n{get content(){return this.template||this.contentTemplate}get label(){return this.nzTitle||this.nzTabLinkTemplateDirective?.templateRef}constructor(t){this.closestTabSet=t,this.nzTitle="",this.nzClosable=!1,this.nzCloseIcon="close",this.nzDisabled=!1,this.nzForceRender=!1,this.nzSelect=new O,this.nzDeselect=new O,this.nzClick=new O,this.nzContextmenu=new O,this.template=null,this.isActive=!1,this.position=null,this.origin=null,this.stateChanges=new J}ngOnChanges(t){let{nzTitle:i,nzDisabled:r,nzForceRender:s}=t;(i||r||s)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Bz))},n.\u0275cmp=j({type:n,selectors:[["nz-tab"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,q6,5),Ft(s,Q6,5,En),Ft(s,Y6,5)),i&2){let a;ce(a=ue())&&(r.nzTabLinkTemplateDirective=a.first),ce(a=ue())&&(r.template=a.first),ce(a=ue())&&(r.linkDirective=a.first)}},viewQuery:function(i,r){if(i&1&&xe(M6,7),i&2){let s;ce(s=ue())&&(r.contentTemplate=s.first)}},inputs:{nzTitle:"nzTitle",nzClosable:"nzClosable",nzCloseIcon:"nzCloseIcon",nzDisabled:"nzDisabled",nzForceRender:"nzForceRender"},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],standalone:!0,features:[oe,K],ngContentSelectors:L6,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(i,r){i&1&&(Pe(N6),_(0,F6,1,0,"ng-template",null,0,_e)(2,A6,1,0,"ng-template",null,1,_e))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzClosable",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzForceRender",void 0),o})(),_C=class{},Z6="tabs",J6=0,e9=(()=>{let n=class n{get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(t){this.indexToSelect=Qg(t,null)}get position(){return["top","bottom"].indexOf(this.nzTabPosition)===-1?"vertical":"horizontal"}get addable(){return this.nzType==="editable-card"&&!this.nzHideAdd}get closable(){return this.nzType==="editable-card"}get line(){return this.nzType==="line"}get inkBarAnimated(){return this.line&&(typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.inkBar)}get tabPaneAnimated(){return this.position==="horizontal"&&this.line&&(typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.tabPane)}constructor(t,i,r,s,a){this.nzConfigService=t,this.ngZone=i,this.cdr=r,this.directionality=s,this.router=a,this._nzModuleName=Z6,this.nzTabPosition="top",this.nzCanDeactivate=null,this.nzAddIcon="plus",this.nzTabBarStyle=null,this.nzType="line",this.nzSize="default",this.nzAnimated=!0,this.nzTabBarGutter=void 0,this.nzHideAdd=!1,this.nzCentered=!1,this.nzHideAll=!1,this.nzLinkRouter=!1,this.nzLinkExact=!0,this.nzSelectChange=new O(!0),this.nzSelectedIndexChange=new O,this.nzTabListScroll=new O,this.nzClose=new O,this.nzAdd=new O,this.allTabs=new Kg,this.tabs=new Kg,this.dir="ltr",this.destroy$=new J,this.indexToSelect=0,this.selectedIndex=null,this.tabLabelSubscription=lr.EMPTY,this.tabsSubscription=lr.EMPTY,this.canDeactivateSubscription=lr.EMPTY,this.tabSetId=J6++}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.tabs.destroy(),this.tabLabelSubscription.unsubscribe(),this.tabsSubscription.unsubscribe(),this.canDeactivateSubscription.unsubscribe()}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabsSubscription=this.tabs.changes.subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){let i=this.tabs.toArray();for(let r=0;r{this.tabs.forEach((r,s)=>r.isActive=s===t),i||this.nzSelectedIndexChange.emit(t)})}this.tabs.forEach((i,r)=>{i.position=r-t,this.selectedIndex!=null&&i.position===0&&!i.origin&&(i.origin=t-this.selectedIndex)}),this.selectedIndex!==t&&(this.selectedIndex=t,this.cdr.markForCheck())}onClose(t,i){i.preventDefault(),i.stopPropagation(),this.nzClose.emit({index:t})}onAdd(){this.nzAdd.emit()}clampTabIndex(t){return Math.min(this.tabs.length-1,Math.max(t||0,0))}createChangeEvent(t){let i=new _C;return i.index=t,this.tabs&&this.tabs.length&&(i.tab=this.tabs.toArray()[t],this.tabs.forEach((r,s)=>{s!==t&&r.nzDeselect.emit()}),i.tab.nzSelect.emit()),i}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=_t(...this.tabs.map(t=>t.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe(Ot(this.allTabs)).subscribe(t=>{this.tabs.reset(t.filter(i=>i.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(t,i){return typeof this.nzCanDeactivate=="function"?mp(this.nzCanDeactivate(t,i)).pipe(xl(),F(this.destroy$)):Mn(!0)}clickNavItem(t,i,r){t.nzDisabled||(t.nzClick.emit(),this.isRouterLinkClickEvent(i,r)||this.setSelectedIndex(i))}isRouterLinkClickEvent(t,i){let r=i.target;return this.nzLinkRouter?!!this.tabs.toArray()[t]?.linkDirective?.elementRef.nativeElement.contains(r):!1}contextmenuNavItem(t,i){t.nzDisabled||t.nzContextmenu.emit(i)}setSelectedIndex(t){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,t).subscribe(i=>{i&&(this.nzSelectedIndex=t,this.tabNavBarRef.focusIndex=t,this.cdr.markForCheck())})}getTabIndex(t,i){return t.nzDisabled?null:this.selectedIndex===i?0:-1}getTabContentId(t){return`nz-tabs-${this.tabSetId}-tab-${t}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${gp} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);this.router.events.pipe(F(this.destroy$),Qe(t=>t instanceof Io),Ot(!0),Os(0)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router.navigated){let t=this.findShouldActiveTabIndex();t!==this.selectedIndex&&this.setSelectedIndex(t),this.nzHideAll=t===-1}}findShouldActiveTabIndex(){let t=this.tabs.toArray(),i=this.isLinkActive(this.router);return t.findIndex(r=>{let s=r.linkDirective;return s?i(s.routerLink):!1})}isLinkActive(t){return i=>i?t.isActive(i.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"}):!1}getTabContentMarginValue(){return-(this.nzSelectedIndex||0)*100}getTabContentMarginLeft(){return this.tabPaneAnimated&&this.dir!=="rtl"?`${this.getTabContentMarginValue()}%`:""}getTabContentMarginRight(){return this.tabPaneAnimated&&this.dir==="rtl"?`${this.getTabContentMarginValue()}%`:""}};n.\u0275fac=function(i){return new(i||n)(w(st),w($e),w(fe),w(Me,8),w(mi,8))},n.\u0275cmp=j({type:n,selectors:[["nz-tabset"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,X6,5),i&2){let a;ce(a=ue())&&(r.allTabs=a)}},viewQuery:function(i,r){if(i&1&&xe(CC,5),i&2){let s;ce(s=ue())&&(r.tabNavBarRef=s.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(i,r){i&2&&k("ant-tabs-card",r.nzType==="card"||r.nzType==="editable-card")("ant-tabs-editable",r.nzType==="editable-card")("ant-tabs-editable-card",r.nzType==="editable-card")("ant-tabs-centered",r.nzCentered)("ant-tabs-rtl",r.dir==="rtl")("ant-tabs-top",r.nzTabPosition==="top")("ant-tabs-bottom",r.nzTabPosition==="bottom")("ant-tabs-left",r.nzTabPosition==="left")("ant-tabs-right",r.nzTabPosition==="right")("ant-tabs-default",r.nzSize==="default")("ant-tabs-small",r.nzSize==="small")("ant-tabs-large",r.nzSize==="large")},inputs:{nzSelectedIndex:"nzSelectedIndex",nzTabPosition:"nzTabPosition",nzTabBarExtraContent:"nzTabBarExtraContent",nzCanDeactivate:"nzCanDeactivate",nzAddIcon:"nzAddIcon",nzTabBarStyle:"nzTabBarStyle",nzType:"nzType",nzSize:"nzSize",nzAnimated:"nzAnimated",nzTabBarGutter:"nzTabBarGutter",nzHideAdd:"nzHideAdd",nzCentered:"nzCentered",nzHideAll:"nzHideAll",nzLinkRouter:"nzLinkRouter",nzLinkExact:"nzLinkExact"},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabset"],standalone:!0,features:[Ve([{provide:Bz,useExisting:n}]),K],decls:4,vars:16,consts:[[3,"ngStyle","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","tabScroll","selectFocusedIndex","addClicked",4,"ngIf"],[1,"ant-tabs-content-holder"],[1,"ant-tabs-content"],["role","tabpanel","nz-tab-body","",3,"id","active","content","forceRender","tabPaneAnimated",4,"ngFor","ngForOf"],[3,"ngStyle","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","tabScroll","selectFocusedIndex","addClicked"],["class","ant-tabs-tab",3,"margin-right","margin-bottom","ant-tabs-tab-active","ant-tabs-tab-disabled","click","contextmenu",4,"ngFor","ngForOf"],[1,"ant-tabs-tab",3,"click","contextmenu"],["role","tab","nzTabNavItem","","cdkMonitorElementFocus","",1,"ant-tabs-tab-btn",3,"id","disabled","tab","active"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-close-button","",3,"closeIcon","click",4,"ngIf"],["nz-tab-close-button","",3,"closeIcon","click"],["role","tabpanel","nz-tab-body","",3,"id","active","content","forceRender","tabPaneAnimated"]],template:function(i,r){i&1&&(_(0,B6,2,9,"nz-tabs-nav",0),C(1,"div",1)(2,"div",2),_(3,$6,1,6,"div",3),S()()),i&2&&(h("ngIf",r.tabs.length||r.addable),f(2),Re("margin-left",r.getTabContentMarginLeft())("margin-right",r.getTabContentMarginRight()),k("ant-tabs-content-top",r.nzTabPosition==="top")("ant-tabs-content-bottom",r.nzTabPosition==="bottom")("ant-tabs-content-left",r.nzTabPosition==="left")("ant-tabs-content-right",r.nzTabPosition==="right")("ant-tabs-content-animated",r.tabPaneAnimated),f(),h("ngForOf",r.tabs))},dependencies:[CC,we,Zt,lt,Gz,Cp,nw,Ye,Ue,Hz,K6],encapsulation:2});let o=n;return N([De()],o.prototype,"nzType",void 0),N([De()],o.prototype,"nzSize",void 0),N([De()],o.prototype,"nzAnimated",void 0),N([De()],o.prototype,"nzTabBarGutter",void 0),N([W()],o.prototype,"nzHideAdd",void 0),N([W()],o.prototype,"nzCentered",void 0),N([W()],o.prototype,"nzHideAll",void 0),N([W()],o.prototype,"nzLinkRouter",void 0),N([W()],o.prototype,"nzLinkExact",void 0),o})();var ff=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[e9,CC,yC,hf,Hz]});let o=n;return o})();var xc=function(o){return o[o.Menu=0]="Menu",o[o.MenuForce=1]="MenuForce",o[o.URL=2]="URL",o}(xc||{}),n9=new hn("REUSE_TAB_CACHED_MANAGER");var i9=new hn("REUSE_TAB_STORAGE_KEY"),r9=new hn("REUSE_TAB_STORAGE_STATE");var $z=(()=>{let n=class n{get snapshot(){return this.injector.get(dp).snapshot}get inited(){return this._inited}get curUrl(){return this.getUrl(this.snapshot)}set max(t){this._max=Math.min(Math.max(t,2),100);for(let i=this.cached.list.length;i>this._max;i--)this.cached.list.pop()}set keepingScroll(t){this._keepingScroll=t,this.initScroll()}get keepingScroll(){return this._keepingScroll}get items(){return this.cached.list}get count(){return this.cached.list.length}get change(){return this._cachedChange.asObservable()}set title(t){let i=this.curUrl;typeof t=="string"&&(t={text:t}),this.cached.title[i]=t,this.di("update current tag title: ",t),this._cachedChange.next({active:"title",url:i,title:t,list:this.cached.list})}index(t){return this.cached.list.findIndex(i=>i.url===t)}exists(t){return this.index(t)!==-1}get(t){return t&&this.cached.list.find(i=>i.url===t)||null}remove(t,i){let r=typeof t=="string"?this.index(t):t,s=r!==-1?this.cached.list[r]:null;return!s||!i&&!s.closable?!1:(this.destroy(s._handle),this.cached.list.splice(r,1),delete this.cached.title[t],!0)}close(t,i=!1){return this.removeUrlBuffer=t,this.remove(t,i),this._cachedChange.next({active:"close",url:t,list:this.cached.list}),this.di("close tag",t),!0}closeRight(t,i=!1){let r=this.index(t);for(let s=this.count-1;s>r;s--)this.remove(s,i);return this.removeUrlBuffer=null,this._cachedChange.next({active:"closeRight",url:t,list:this.cached.list}),this.di("close right tages",t),!0}clear(t=!1){this.cached.list.forEach(i=>{!t&&i.closable&&this.destroy(i._handle)}),this.cached.list=this.cached.list.filter(i=>!t&&!i.closable),this.removeUrlBuffer=null,this._cachedChange.next({active:"clear",list:this.cached.list}),this.di("clear all catch")}move(t,i){let r=this.cached.list.findIndex(a=>a.url===t);if(r===-1)return;let s=this.cached.list.slice();s.splice(i<0?s.length+i:i,0,s.splice(r,1)[0]),this.cached.list=s,this._cachedChange.next({active:"move",url:t,position:i,list:this.cached.list})}replace(t){let i=this.curUrl;this.injector.get(mi).navigateByUrl(t).then(()=>{this.exists(i)?this.close(i,!0):this.removeUrlBuffer=i})}getTitle(t,i){if(this.cached.title[t])return this.cached.title[t];if(i&&i.data&&(i.data.titleI18n||i.data.title))return{text:i.data.title,i18n:i.data.titleI18n};let r=this.getMenu(t);return r?{text:r.text,i18n:r.i18n}:{text:t}}clearTitleCached(){this.cached.title={}}set closable(t){let i=this.curUrl;this.cached.closable[i]=t,this.di("update current tag closable: ",t),this._cachedChange.next({active:"closable",closable:t,list:this.cached.list})}getClosable(t,i){if(typeof this.cached.closable[t]<"u")return this.cached.closable[t];if(i&&i.data&&typeof i.data.reuseClosable=="boolean")return i.data.reuseClosable;let r=this.mode!==xc.URL?this.getMenu(t):null;return r&&typeof r.reuseClosable=="boolean"?r.reuseClosable:!0}clearClosableCached(){this.cached.closable={}}getTruthRoute(t){let i=t;for(;i.firstChild;)i=i.firstChild;return i}getUrl(t){let i=this.getTruthRoute(t),r=[];for(;i;)r.push(i.url.join("/")),i=i.parent;return`/${r.filter(a=>a).reverse().join("/")}`}can(t){let i=this.getUrl(t);if(i===this.removeUrlBuffer)return!1;if(t.data&&typeof t.data.reuse=="boolean")return t.data.reuse;if(this.mode!==xc.URL){let r=this.getMenu(i);if(!r)return!1;if(this.mode===xc.Menu){if(r.reuse===!1)return!1}else if(!r.reuse||r.reuse!==!0)return!1;return!0}return!this.isExclude(i)}isExclude(t){return this.excludes.findIndex(i=>i.test(t))!==-1}refresh(t){this._cachedChange.next({active:"refresh",data:t})}destroy(t){t&&t.componentRef&&t.componentRef.destroy&&t.componentRef.destroy()}di(...t){}constructor(){this.injector=ae($n),this.menuService=ae(xp),this.cached=ae(n9),this.stateKey=ae(i9),this.stateSrv=ae(r9),this._inited=!1,this._max=10,this._keepingScroll=!1,this._cachedChange=new ct(null),this.removeUrlBuffer=null,this.positionBuffer={},this.debug=!1,this.routeParamMatchMode="strict",this.mode=xc.Menu,this.excludes=[],this.storageState=!1,this.cached==null&&(this.cached={list:[],title:{},closable:{}})}init(){this.initScroll(),this._inited=!0,this.loadState()}loadState(){this.storageState&&(this.cached.list=this.stateSrv.get(this.stateKey).map(t=>({title:{text:t.title},url:t.url,position:t.position})),this._cachedChange.next({active:"loadState"}))}getMenu(t){let i=this.menuService.getPathByUrl(t);return!i||i.length===0?null:i.pop()}runHook(t,i,r="init"){if(typeof i=="number"&&(i=this.cached.list[i]._handle?.componentRef),i==null||!i.instance)return;let s=i.instance,a=s[t];typeof a=="function"&&(t==="_onReuseInit"?a.call(s,r):a.call(s))}hasInValidRoute(t){return!t.routeConfig||!!t.routeConfig.loadChildren||!!t.routeConfig.children}shouldDetach(t){return this.hasInValidRoute(t)?!1:(this.di("#shouldDetach",this.can(t),this.getUrl(t)),this.can(t))}saveCache(t,i,r){let s=this.getTruthRoute(t),a=this.getUrl(t),l=this.index(a),c={title:this.getTitle(a,s),url:a,closable:this.getClosable(a,t),_snapshot:t,_handle:i};if(l<0){if(this.items.splice(r??this.items.length,0,c),this.count>this._max){let u=this.items.findIndex(d=>d.url!==a&&d.closable);if(u!==-1){let d=this.items[u];this.remove(u,!1),nu(1).pipe(Zr(1)).subscribe(()=>this._cachedChange.next({active:"close",url:d.url,list:this.cached.list}))}}}else this.items[l]=c}store(t,i){let r=this.getUrl(t),s=this.index(r);if(s===-1)return;i!=null&&this.saveCache(t,i);let a=this.cached.list,l={title:this.getTitle(r,t),closable:this.getClosable(r,t),position:this.getKeepingScroll(r,t)?this.positionBuffer[r]:null,url:r,_snapshot:t,_handle:i},c=a[s]._handle?.componentRef;i==null&&c!=null&&nu(100).pipe(Zr(1)).subscribe(()=>this.runHook("_onReuseInit",c)),a[s]=l,this.removeUrlBuffer=null,this.di("#store","[override]",r),i&&i.componentRef&&this.runHook("_onReuseDestroy",i.componentRef),this._cachedChange.next({active:"override",item:l,list:a})}shouldAttach(t){if(this.hasInValidRoute(t))return!1;let i=this.getUrl(t),r=this.get(i),s=!!(r&&r._handle);return this.di("#shouldAttach",s,i),s||this._cachedChange.next({active:"add",url:i,list:this.cached.list}),s}retrieve(t){if(this.hasInValidRoute(t))return null;let i=this.getUrl(t),r=this.get(i),s=r&&r._handle||null;return this.di("#retrieve",i,s),s}shouldReuseRoute(t,i){let r=t.routeConfig===i.routeConfig;if(!r)return!1;let s=t.routeConfig&&t.routeConfig.path||"";return s.length>0&&~s.indexOf(":")&&(this.routeParamMatchMode==="strict"?r=this.getUrl(t)===this.getUrl(i):r=s===(i.routeConfig&&i.routeConfig.path||"")),this.di("====================="),this.di("#shouldReuseRoute",r,`${this.getUrl(i)}=>${this.getUrl(t)}`,t,i),r}getKeepingScroll(t,i){if(i&&i.data&&typeof i.data.keepingScroll=="boolean")return i.data.keepingScroll;let r=this.mode!==xc.URL?this.getMenu(t):null;return r&&typeof r.keepingScroll=="boolean"?r.keepingScroll:this.keepingScroll}get isDisabledInRouter(){return this.injector.get(VS,{}).scrollPositionRestoration==="disabled"}get ss(){return this.injector.get(yw)}initScroll(){this._router$&&this._router$.unsubscribe(),this._router$=this.injector.get(mi).events.subscribe(t=>{if(t instanceof kS){let i=this.curUrl;this.getKeepingScroll(i,this.getTruthRoute(this.snapshot))?this.positionBuffer[i]=this.ss.getScrollPosition(this.keepingScrollContainer):delete this.positionBuffer[i]}else if(t instanceof Io){let i=this.curUrl,r=this.get(i);r&&r.position&&this.getKeepingScroll(i,this.getTruthRoute(this.snapshot))&&(this.isDisabledInRouter?this.ss.scrollToPosition(this.keepingScrollContainer,r.position):setTimeout(()=>this.ss.scrollToPosition(this.keepingScrollContainer,r.position),1))}})}ngOnDestroy(){let{_cachedChange:t,_router$:i}=this;this.clear(),this.cached.list=[],t.complete(),i&&i.unsubscribe()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var o9=["fixedEl"],s9=["*"],SC=function(o){return o.resize="resize",o.scroll="scroll",o.touchstart="touchstart",o.touchmove="touchmove",o.touchend="touchend",o.pageshow="pageshow",o.load="LOAD",o}(SC||{});function a9(o){return typeof window<"u"&&o===window}function jz(o){return a9(o)?{top:0,left:0,bottom:0}:o.getBoundingClientRect()}var l9="affix",zc="ant-affix",c9=20,wC=(()=>{let n=class n{get target(){let t=this.nzTarget;return(typeof t=="string"?this.document.querySelector(t):t)||window}constructor(t,i,r,s,a,l,c,u,d,p){this.nzConfigService=r,this.scrollSrv=s,this.ngZone=a,this.platform=l,this.renderer=c,this.nzResizeObserver=u,this.cdr=d,this.directionality=p,this._nzModuleName=l9,this.nzChange=new O,this.dir="ltr",this.positionChangeSubscription=lr.EMPTY,this.offsetChanged$=new tn(1),this.destroy$=new J,this.placeholderNode=t.nativeElement,this.document=i}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.registerListeners(),this.updatePosition({}),this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzOffsetBottom:i,nzOffsetTop:r,nzTarget:s}=t;(i||r)&&this.offsetChanged$.next(),s&&this.registerListeners()}ngAfterViewInit(){this.registerListeners()}ngOnDestroy(){this.removeListeners()}registerListeners(){if(!this.platform.isBrowser)return;this.removeListeners();let t=this.target===window?this.document.body:this.target;this.positionChangeSubscription=this.ngZone.runOutsideAngular(()=>_t(...Object.keys(SC).map(i=>Ke(this.target,i)),this.offsetChanged$.pipe(We(()=>({}))),this.nzResizeObserver.observe(t)).pipe(_S(c9,void 0,{trailing:!0}),F(this.destroy$)).subscribe(i=>this.updatePosition(i))),this.timeout=setTimeout(()=>this.updatePosition({}))}removeListeners(){clearTimeout(this.timeout),this.positionChangeSubscription.unsubscribe(),this.destroy$.next(!0),this.destroy$.complete()}getOffset(t,i){let r=t.getBoundingClientRect(),s=jz(i),a=this.scrollSrv.getScroll(i,!0),l=this.scrollSrv.getScroll(i,!1),c=this.document.body,u=c.clientTop||0,d=c.clientLeft||0;return{top:r.top-s.top+a-u,left:r.left-s.left+l-d,width:r.width,height:r.height}}setAffixStyle(t,i){let r=this.affixStyle,s=this.target===window;if(t.type==="scroll"&&r&&i&&s||Xg(r,i))return;let a=!!i,l=this.fixedEl.nativeElement;this.renderer.setStyle(l,"cssText",nm(i)),this.affixStyle=i,a?l.classList.add(zc):l.classList.remove(zc),this.updateRtlClass(),(i&&!r||!i&&r)&&this.nzChange.emit(a)}setPlaceholderStyle(t){let i=this.placeholderStyle;Xg(t,i)||(this.renderer.setStyle(this.placeholderNode,"cssText",nm(t)),this.placeholderStyle=t)}syncPlaceholderStyle(t){if(!this.affixStyle)return;this.renderer.setStyle(this.placeholderNode,"cssText",""),this.placeholderStyle=void 0;let i={width:this.placeholderNode.offsetWidth,height:this.fixedEl.nativeElement.offsetHeight};this.setAffixStyle(t,V(V({},this.affixStyle),i)),this.setPlaceholderStyle(i)}updatePosition(t){if(!this.platform.isBrowser)return;let i=this.target,r=this.nzOffsetTop,s=this.scrollSrv.getScroll(i,!0),a=this.getOffset(this.placeholderNode,i),l=this.fixedEl.nativeElement,c={width:l.offsetWidth,height:l.offsetHeight},u={top:!1,bottom:!1};typeof r!="number"&&typeof this.nzOffsetBottom!="number"?(u.top=!0,r=0):(u.top=typeof r=="number",u.bottom=typeof this.nzOffsetBottom=="number");let d=jz(i),p=i.innerHeight||i.clientHeight;if(s>=a.top-r&&u.top){let g=a.width,v=d.top+r;this.setAffixStyle(t,{position:"fixed",top:v,left:d.left+a.left,width:g}),this.setPlaceholderStyle({width:g,height:c.height})}else if(s<=a.top+c.height+this.nzOffsetBottom-p&&u.bottom){let g=i===window?0:window.innerHeight-d.bottom,v=a.width;this.setAffixStyle(t,{position:"fixed",bottom:g+this.nzOffsetBottom,left:d.left+a.left,width:v}),this.setPlaceholderStyle({width:v,height:a.height})}else t.type===SC.resize&&this.affixStyle&&this.affixStyle.position==="fixed"&&this.placeholderNode.offsetWidth?this.setAffixStyle(t,ot(V({},this.affixStyle),{width:this.placeholderNode.offsetWidth})):this.setAffixStyle(t),this.setPlaceholderStyle();t.type==="resize"&&this.syncPlaceholderStyle(t)}updateRtlClass(){let t=this.fixedEl.nativeElement;this.dir==="rtl"?t.classList.contains(zc)?t.classList.add(`${zc}-rtl`):t.classList.remove(`${zc}-rtl`):t.classList.remove(`${zc}-rtl`)}};n.\u0275fac=function(i){return new(i||n)(w(de),w(gi),w(st),w(xw),w($e),w(gn),w(He),w(ds),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-affix"]],viewQuery:function(i,r){if(i&1&&xe(o9,7),i&2){let s;ce(s=ue())&&(r.fixedEl=s.first)}},inputs:{nzTarget:"nzTarget",nzOffsetTop:"nzOffsetTop",nzOffsetBottom:"nzOffsetBottom"},outputs:{nzChange:"nzChange"},exportAs:["nzAffix"],standalone:!0,features:[oe,K],ngContentSelectors:s9,decls:3,vars:0,consts:[["fixedEl",""]],template:function(i,r){i&1&&(Pe(),C(0,"div",null,0),Ie(2),S())},dependencies:[$S,hp],encapsulation:2,changeDetection:0});let o=n;return N([De(),ci(void 0)],o.prototype,"nzOffsetTop",void 0),N([De(),ci(void 0)],o.prototype,"nzOffsetBottom",void 0),o})(),Wz=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[wC]});let o=n;return o})();var bC=["*"];function u9(o,n){}function d9(o,n){if(o&1&&(H(0),C(1,"span",3),_(2,u9,0,0,"ng-template",4),R(3,"span",5),S(),B()),o&2){let e=m(),t=te(2);f(),h("nzDropdownMenu",e.nzOverlay),f(),h("ngTemplateOutlet",t)}}function p9(o,n){o&1&&(C(0,"span",6),Ie(1),S())}function h9(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.nzBreadCrumbComponent.nzSeparator," ")}}function f9(o,n){if(o&1&&(C(0,"nz-breadcrumb-separator"),_(1,h9,2,1,"ng-container",7),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzBreadCrumbComponent.nzSeparator)}}function g9(o,n){if(o&1){let e=Q();C(0,"nz-breadcrumb-item")(1,"a",2),A("click",function(i){let s=I(e).$implicit,a=m(2);return P(a.navigate(s.url,i))}),Y(2),S()()}if(o&2){let e=n.$implicit;f(),ze("href",e.url,Do),f(),ye(e.label)}}function m9(o,n){if(o&1&&(H(0),_(1,g9,3,2,"nz-breadcrumb-item",1),B()),o&2){let e=m();f(),h("ngForOf",e.breadcrumbs)}}var v9=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-breadcrumb-separator"]],hostAttrs:[1,"ant-breadcrumb-separator"],exportAs:["nzBreadcrumbSeparator"],standalone:!0,features:[K],ngContentSelectors:bC,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2});let o=n;return o})(),gf=class{},mf=(()=>{let n=class n{constructor(t){this.nzBreadCrumbComponent=t}};n.\u0275fac=function(i){return new(i||n)(w(gf))},n.\u0275cmp=j({type:n,selectors:[["nz-breadcrumb-item"]],inputs:{nzOverlay:"nzOverlay"},exportAs:["nzBreadcrumbItem"],standalone:!0,features:[K],ngContentSelectors:bC,decls:4,vars:3,consts:[[4,"ngIf","ngIfElse"],["noMenuTpl",""],[4,"ngIf"],["nz-dropdown","",1,"ant-breadcrumb-overlay-link",3,"nzDropdownMenu"],[3,"ngTemplateOutlet"],["nz-icon","","nzType","down"],[1,"ant-breadcrumb-link"],[4,"nzStringTemplateOutlet"]],template:function(i,r){if(i&1&&(Pe(),_(0,d9,4,2,"ng-container",0)(1,p9,2,0,"ng-template",null,1,_e)(3,f9,2,1,"nz-breadcrumb-separator",2)),i&2){let s=te(2);h("ngIf",!!r.nzOverlay)("ngIfElse",s),f(3),h("ngIf",r.nzBreadCrumbComponent.nzSeparator)}},dependencies:[we,Be,v9,Lr,yr,Ge,Fe,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),TC=(()=>{let n=class n{constructor(t,i,r,s,a){this.injector=t,this.cdr=i,this.elementRef=r,this.renderer=s,this.directionality=a,this.nzAutoGenerate=!1,this.nzSeparator="/",this.nzRouteLabel="breadcrumb",this.nzRouteLabelFn=l=>l,this.breadcrumbs=[],this.dir="ltr",this.destroy$=new J}ngOnInit(){this.nzAutoGenerate&&this.registerRouterChange(),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.prepareComponentForRtl(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.prepareComponentForRtl()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}navigate(t,i){i.preventDefault(),this.injector.get(mi).navigateByUrl(t)}registerRouterChange(){try{let t=this.injector.get(mi),i=this.injector.get(dp);t.events.pipe(Qe(r=>r instanceof Io),F(this.destroy$),Ot(!0)).subscribe(()=>{this.breadcrumbs=this.getBreadcrumbs(i.root),this.cdr.markForCheck()})}catch{throw new Error(`${gp} You should import RouterModule if you want to use 'NzAutoGenerate'.`)}}getBreadcrumbs(t,i="",r=[]){let s=t.children;if(s.length===0)return r;for(let a of s)if(a.outlet===LS){let l=a.snapshot.url.map(d=>d.path).filter(d=>d).join("/"),c=l?`${i}/${l}`:i,u=this.nzRouteLabelFn(a.snapshot.data[this.nzRouteLabel]);if(l&&u){let d={label:u,params:a.snapshot.params,url:c};r.push(d)}return this.getBreadcrumbs(a,c,r)}return r}prepareComponentForRtl(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl")}};n.\u0275fac=function(i){return new(i||n)(w($n),w(fe),w(de),w(He),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-breadcrumb"]],hostAttrs:[1,"ant-breadcrumb"],inputs:{nzAutoGenerate:"nzAutoGenerate",nzSeparator:"nzSeparator",nzRouteLabel:"nzRouteLabel",nzRouteLabelFn:"nzRouteLabelFn"},exportAs:["nzBreadcrumb"],standalone:!0,features:[Ve([{provide:gf,useExisting:n}]),K],ngContentSelectors:bC,decls:2,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"click"]],template:function(i,r){i&1&&(Pe(),Ie(0),_(1,m9,2,1,"ng-container",0)),i&2&&(f(),h("ngIf",r.nzAutoGenerate&&r.breadcrumbs.length))},dependencies:[lt,we,mf],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzAutoGenerate",void 0),o})(),Uz=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[TC,mf]});let o=n;return o})();var y9=["nzType","avatar"];function C9(o,n){if(o&1&&(C(0,"div",5),R(1,"nz-skeleton-element",6),S()),o&2){let e=m(2);f(),h("nzSize",e.avatar.size||"default")("nzShape",e.avatar.shape||"circle")}}function _9(o,n){if(o&1&&R(0,"h3",7),o&2){let e=m(2);Re("width",e.toCSSUnit(e.title.width))}}function S9(o,n){if(o&1&&R(0,"li"),o&2){let e=n.index,t=m(3);Re("width",t.toCSSUnit(t.widthList[e]))}}function w9(o,n){if(o&1&&(C(0,"ul",8),_(1,S9,1,2,"li",9),S()),o&2){let e=m(2);f(),h("ngForOf",e.rowsList)}}function b9(o,n){if(o&1&&(H(0),_(1,C9,2,2,"div",1),C(2,"div",2),_(3,_9,1,2,"h3",3)(4,w9,2,1,"ul",4),S(),B()),o&2){let e=m();f(),h("ngIf",!!e.nzAvatar),f(2),h("ngIf",!!e.nzTitle),f(),h("ngIf",!!e.nzParagraph)}}function T9(o,n){o&1&&(H(0),Ie(1),B())}var E9=["*"],x9=(()=>{let n=class n{constructor(){this.nzActive=!1,this.nzBlock=!1}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-skeleton-active",r.nzActive)("ant-skeleton-block",r.nzBlock)},inputs:{nzActive:"nzActive",nzType:"nzType",nzBlock:"nzBlock"},standalone:!0});let o=n;return N([W()],o.prototype,"nzBlock",void 0),o})();var z9=(()=>{let n=class n{constructor(){this.nzShape="circle",this.nzSize="default",this.styleMap={}}ngOnChanges(t){if(t.nzSize&&typeof this.nzSize=="number"){let i=`${this.nzSize}px`;this.styleMap={width:i,height:i,"line-height":i}}else this.styleMap={}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-skeleton-element","nzType","avatar"]],inputs:{nzShape:"nzShape",nzSize:"nzSize"},standalone:!0,features:[oe,K],attrs:y9,decls:1,vars:9,consts:[[1,"ant-skeleton-avatar",3,"ngStyle"]],template:function(i,r){i&1&&R(0,"span",0),i&2&&(k("ant-skeleton-avatar-square",r.nzShape==="square")("ant-skeleton-avatar-circle",r.nzShape==="circle")("ant-skeleton-avatar-lg",r.nzSize==="large")("ant-skeleton-avatar-sm",r.nzSize==="small"),h("ngStyle",r.styleMap))},dependencies:[Zt],encapsulation:2,changeDetection:0});let o=n;return o})();var Kz=(()=>{let n=class n{constructor(t){this.cdr=t,this.nzActive=!1,this.nzLoading=!0,this.nzRound=!1,this.nzTitle=!0,this.nzAvatar=!1,this.nzParagraph=!0,this.rowsList=[],this.widthList=[]}toCSSUnit(t=""){return Ea(t)}getTitleProps(){let t=!!this.nzAvatar,i=!!this.nzParagraph,r="";return!t&&i?r="38%":t&&i&&(r="50%"),V({width:r},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return V({shape:t,size:"large"},this.getProps(this.nzAvatar))}getParagraphProps(){let t=!!this.nzAvatar,i=!!this.nzTitle,r={};return(!t||!i)&&(r.width="61%"),!t&&i?r.rows=3:r.rows=2,V(V({},r),this.getProps(this.nzParagraph))}getProps(t){return t&&typeof t=="object"?t:{}}getWidthList(){let{width:t,rows:i}=this.paragraph,r=[];return t&&Array.isArray(t)?r=t:t&&!Array.isArray(t)&&(r=[],r[i-1]=t),r}updateProps(){this.title=this.getTitleProps(),this.avatar=this.getAvatarProps(),this.paragraph=this.getParagraphProps(),this.rowsList=[...Array(this.paragraph.rows)],this.widthList=this.getWidthList(),this.cdr.markForCheck()}ngOnInit(){this.updateProps()}ngOnChanges(t){(t.nzTitle||t.nzAvatar||t.nzParagraph)&&this.updateProps()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-skeleton-with-avatar",!!r.nzAvatar)("ant-skeleton-active",r.nzActive)("ant-skeleton-round",!!r.nzRound)},inputs:{nzActive:"nzActive",nzLoading:"nzLoading",nzRound:"nzRound",nzTitle:"nzTitle",nzAvatar:"nzAvatar",nzParagraph:"nzParagraph"},exportAs:["nzSkeleton"],standalone:!0,features:[oe,K],ngContentSelectors:E9,decls:2,vars:2,consts:[[4,"ngIf"],["class","ant-skeleton-header",4,"ngIf"],[1,"ant-skeleton-content"],["class","ant-skeleton-title",3,"width",4,"ngIf"],["class","ant-skeleton-paragraph",4,"ngIf"],[1,"ant-skeleton-header"],["nzType","avatar",3,"nzSize","nzShape"],[1,"ant-skeleton-title"],[1,"ant-skeleton-paragraph"],[3,"width",4,"ngFor","ngForOf"]],template:function(i,r){i&1&&(Pe(),_(0,b9,5,3,"ng-container",0)(1,T9,2,0,"ng-container",0)),i&2&&(h("ngIf",r.nzLoading),f(),h("ngIf",!r.nzLoading))},dependencies:[x9,z9,we,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),qz=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var O9=["conTpl"],D9=["affix"];function R9(o,n){}function I9(o,n){if(o&1&&(C(0,"nz-affix",0,2),_(2,R9,0,0,"ng-template",3),S()),o&2){let e=m(),t=te(3);h("nzOffsetTop",e.fixedOffsetTop),f(2),h("ngTemplateOutlet",t)}}function P9(o,n){}function M9(o,n){if(o&1&&_(0,P9,0,0,"ng-template",3),o&2){m();let e=te(3);h("ngTemplateOutlet",e)}}function F9(o,n){}function A9(o,n){if(o&1&&_(0,F9,0,0,"ng-template",3),o&2){let e=m(2);h("ngTemplateOutlet",e.breadcrumb)}}function N9(o,n){if(o&1&&(C(0,"a",15),Y(1),S()),o&2){let e=m().$implicit;h("routerLink",e.link),f(),ye(e.title)}}function L9(o,n){if(o&1&&Y(0),o&2){let e=m().$implicit;Ne(" ",e.title," ")}}function k9(o,n){if(o&1&&(C(0,"nz-breadcrumb-item"),_(1,N9,2,2,"a",15)(2,L9,1,1),S()),o&2){let e=n.$implicit;f(),ie(1,e.link?1:2)}}function V9(o,n){if(o&1&&(C(0,"nz-breadcrumb"),Cn(1,k9,3,1,"nz-breadcrumb-item",null,yn),S()),o&2){let e=m(3);f(),_n(e.paths)}}function G9(o,n){if(o&1&&_(0,V9,3,0,"nz-breadcrumb"),o&2){let e=m(2);ie(0,e.paths&&e.paths.length>0?0:-1)}}function H9(o,n){}function B9(o,n){if(o&1&&(C(0,"div",16),_(1,H9,0,0,"ng-template",3),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.logo)}}function $9(o,n){}function j9(o,n){if(o&1&&_(0,$9,0,0,"ng-template",3),o&2){let e=m(3);h("ngTemplateOutlet",e._titleTpl)}}function W9(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(5);f(),ye(e.titleSub)}}function U9(o,n){if(o&1&&(C(0,"small"),_(1,W9,2,1,"ng-container",18),S()),o&2){let e=m(4);f(),h("nzStringTemplateOutlet",e.titleSub)}}function K9(o,n){if(o&1&&(Y(0),_(1,U9,2,1,"small")),o&2){let e=m(3);Ne(" ",e._titleVal," "),f(),ie(1,e.titleSub?1:-1)}}function q9(o,n){if(o&1&&(C(0,"h1",17),_(1,j9,1,1,null,3)(2,K9,2,2),S()),o&2){let e=m(2);f(),ie(1,e._titleTpl?1:2)}}function Y9(o,n){}function Q9(o,n){if(o&1&&(C(0,"div",19),_(1,Y9,0,0,"ng-template",3),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.action)}}function X9(o,n){}function Z9(o,n){}function J9(o,n){if(o&1&&(C(0,"div",20),_(1,Z9,0,0,"ng-template",3),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.extra)}}function e8(o,n){}var t8=()=>({rows:3}),n8=()=>({size:"large",shape:"circle"});function i8(o,n){if(o&1){let e=Q();C(0,"div",4)(1,"div")(2,"nz-skeleton",5),_(3,A9,1,1,null,3)(4,G9,1,1),C(5,"div",6),_(6,B9,2,1,"div",7),C(7,"div",8)(8,"div",9),_(9,q9,3,1,"h1",10)(10,Q9,2,1,"div",11),S(),C(11,"div",9)(12,"div",12,13),A("cdkObserveContent",function(){I(e);let i=m();return P(i.checkContent())}),Ie(14),_(15,X9,0,0,"ng-template",3),S(),_(16,J9,2,1,"div",14),S()()(),_(17,e8,0,0,"ng-template",3),S()()()}if(o&2){let e=m();k("page-header-rtl",e.dir==="rtl"),f(),k("page-header__wide",e.wide),f(),h("nzLoading",e.loading)("nzTitle",!1)("nzActive",!0)("nzParagraph",ii(16,t8))("nzAvatar",ii(17,n8)),f(),ie(3,e.breadcrumb?3:4),f(3),ie(6,e.logo?6:-1),f(3),ie(9,e._titleVal||e._titleTpl?9:-1),f(),ie(10,e.action?10:-1),f(5),h("ngTemplateOutlet",e.content),f(),ie(16,e.extra?16:-1),f(),h("ngTemplateOutlet",e.tab)}}var r8=["*"],o8=(()=>{let n=class n{get menus(){return this.menuSrv.getPathByUrl(this.router.url,this.recursiveBreadcrumb)}set title(t){t instanceof En?(this._title=null,this._titleTpl=t,this._titleVal=""):(this._title=t,this._titleVal=this._title)}constructor(t,i,r){this.renderer=ae(He),this.router=ae(mi),this.cdr=ae(fe),this.menuSrv=ae(xp),this.i18nSrv=ae(Rs,{optional:!0}),this.titleSrv=ae(pw,{optional:!0}),this.reuseSrv=ae($z,{optional:!0}),this.directionality=ae(Me,{optional:!0}),this.destroy$=ae(rs),this.inited=!1,this.isBrowser=!0,this.dir="ltr",this._titleVal="",this.paths=[],this._title=null,this._titleTpl=null,this.loading=!1,this.wide=!1,this.breadcrumb=null,this.logo=null,this.action=null,this.content=null,this.extra=null,this.tab=null,this.isBrowser=r.isBrowser,i.attach(this,"pageHeader",{home:"\u9996\u9875",homeLink:"/",autoBreadcrumb:!0,recursiveBreadcrumb:!1,autoTitle:!0,syncTitle:!0,fixed:!1,fixedOffsetTop:64}),t.notify.pipe(li(),Qe(a=>this.affix&&a.type==="layout"&&a.name==="collapsed")).subscribe(()=>this.affix.updatePosition({}));let s=[this.router.events.pipe(Qe(a=>a instanceof Io))];this.menuSrv!=null&&s.push(this.menuSrv.change),this.i18nSrv!=null&&s.push(this.i18nSrv.change),_t(...s).pipe(li(),Qe(()=>this.inited)).subscribe(()=>this.refresh())}refresh(){this.setTitle().genBreadcrumb(),this.cdr.detectChanges()}genBreadcrumb(){if(this.breadcrumb||!this.autoBreadcrumb||this.menus.length<=0){this.paths=[];return}let t=[];this.menus.forEach(i=>{if(typeof i.hideInBreadcrumb<"u"&&i.hideInBreadcrumb)return;let r=i.text;i.i18n&&this.i18nSrv&&(r=this.i18nSrv.fanyi(i.i18n)),t.push({title:r,link:i.link&&[i.link]})}),this.home&&t.splice(0,0,{title:this.homeI18n&&this.i18nSrv&&this.i18nSrv.fanyi(this.homeI18n)||this.home,link:[this.homeLink]}),this.paths=t}setTitle(){if(this._title==null&&this._titleTpl==null&&this.autoTitle&&this.menus.length>0){let t=this.menus[this.menus.length-1],i=t.text;t.i18n&&this.i18nSrv&&(i=this.i18nSrv.fanyi(t.i18n)),this._titleVal=i}return this._titleVal&&this.syncTitle&&(this.titleSrv&&this.titleSrv.setTitle(this._titleVal),!this.inited&&this.reuseSrv&&(this.reuseSrv.title=this._titleVal)),this}checkContent(){Bl(this.conTpl.nativeElement)?this.renderer.setAttribute(this.conTpl.nativeElement,"hidden",""):this.renderer.removeAttribute(this.conTpl.nativeElement,"hidden")}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(li(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.refresh(),this.inited=!0}ngAfterViewInit(){this.checkContent()}ngOnChanges(){this.inited&&this.refresh()}};n.\u0275fac=function(i){return new(i||n)(w(dw),w(In),w(gn))},n.\u0275cmp=j({type:n,selectors:[["page-header"]],viewQuery:function(i,r){if(i&1&&(xe(O9,5),xe(D9,5)),i&2){let s;ce(s=ue())&&(r.conTpl=s.first),ce(s=ue())&&(r.affix=s.first)}},inputs:{title:"title",titleSub:"titleSub",loading:[le.HasDecoratorInputTransform,"loading","loading",it],wide:[le.HasDecoratorInputTransform,"wide","wide",it],home:"home",homeLink:"homeLink",homeI18n:"homeI18n",autoBreadcrumb:[le.HasDecoratorInputTransform,"autoBreadcrumb","autoBreadcrumb",it],autoTitle:[le.HasDecoratorInputTransform,"autoTitle","autoTitle",it],syncTitle:[le.HasDecoratorInputTransform,"syncTitle","syncTitle",it],fixed:[le.HasDecoratorInputTransform,"fixed","fixed",it],fixedOffsetTop:[le.HasDecoratorInputTransform,"fixedOffsetTop","fixedOffsetTop",fn],breadcrumb:"breadcrumb",recursiveBreadcrumb:[le.HasDecoratorInputTransform,"recursiveBreadcrumb","recursiveBreadcrumb",it],logo:"logo",action:"action",content:"content",extra:"extra",tab:"tab"},exportAs:["pageHeader"],standalone:!0,features:[fi,oe,K],ngContentSelectors:r8,decls:4,vars:1,consts:[[3,"nzOffsetTop"],["phTpl",""],["affix",""],[3,"ngTemplateOutlet"],[1,"page-header"],[1,"d-block",3,"nzLoading","nzTitle","nzActive","nzParagraph","nzAvatar"],[1,"page-header__detail"],["class","page-header__logo"],[1,"page-header__main"],[1,"page-header__row"],["class","page-header__title"],["class","page-header__action"],[1,"page-header__desc",3,"cdkObserveContent"],["conTpl",""],["class","page-header__extra"],[3,"routerLink"],[1,"page-header__logo"],[1,"page-header__title"],[4,"nzStringTemplateOutlet"],[1,"page-header__action"],[1,"page-header__extra"]],template:function(i,r){i&1&&(Pe(),_(0,I9,3,2,"nz-affix",0)(1,M9,1,1)(2,i8,18,18,"ng-template",null,1,_e)),i&2&&ie(0,r.isBrowser&&r.fixed?0:1)},dependencies:[wC,Be,Kz,TC,mf,Po,Ue,Ll],encapsulation:2,changeDetection:0});let o=n;return o})(),s8=[o8],vf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,Il,vp,Wz,qz,Uz,Ye,s8]});let o=n;return o})();function l8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.title)}}function c8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.description)}}function u8(o,n){if(o&1&&(C(0,"div",7),_(1,c8,2,1,"ng-container",3),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.description)}}function d8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.extra)}}function p8(o,n){if(o&1&&(C(0,"div",8),_(1,d8,2,1,"ng-container",3),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.extra)}}var h8=["*"],h0e=(()=>{let n=class n{constructor(){this.cdr=ae(fe),this.directionality=ae(Me,{optional:!0}),this.destroy$=ae(rs),this._type="",this._icon="",this.dir="ltr"}set type(t){switch(this._type=t,t){case"success":this._icon="check-circle";break;case"error":this._icon="close-circle";break;default:this._icon=t;break}}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(li(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["result"]],hostVars:4,hostBindings:function(i,r){i&2&&k("result",!0)("result-rtl",r.dir==="rtl")},inputs:{type:"type",title:"title",description:"description",extra:"extra"},exportAs:["result"],standalone:!0,features:[K],ngContentSelectors:h8,decls:8,vars:7,consts:[[1,"result__icon"],["nz-icon","",3,"nzType"],[1,"result__title"],[4,"nzStringTemplateOutlet"],["class","result__desc"],["class","result__extra"],[1,"result__actions"],[1,"result__desc"],[1,"result__extra"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0),R(1,"i",1),S(),C(2,"div",2),_(3,l8,2,1,"ng-container",3),S(),_(4,u8,2,1,"div",4)(5,p8,2,1,"div",5),C(6,"div",6),Ie(7),S()),i&2&&(f(),Ae("result__icon-",r._type,""),h("nzType",r._icon),f(2),h("nzStringTemplateOutlet",r.title),f(),ie(4,r.description?4:-1),f(),ie(5,r.extra?5:-1))},dependencies:[Fe,Ue],encapsulation:2,changeDetection:0});let o=n;return o})();var yf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,Ge,Ye]});let o=n;return o})();var xC=["*"];function g8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.title)}}function m8(o,n){if(o&1&&(C(0,"div",0),_(1,g8,2,1,"ng-container",1),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.title)}}var v8=["contentElement"];function y8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.label)}}function C8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.optional)}}function _8(o,n){if(o&1&&R(0,"i",12),o&2){let e=m(3);h("nzTooltipTitle",e.optionalHelp)("nzTooltipColor",e.optionalHelpColor)}}function S8(o,n){if(o&1&&(C(0,"span",11),_(1,C8,2,1,"ng-container",9)(2,_8,1,2,"i",12),S()),o&2){let e=m(2);k("se__label-optional-no-text",!e.optional),f(),h("nzStringTemplateOutlet",e.optional),f(),ie(2,e.optionalHelp?2:-1)}}var w8=(o,n)=>({"ant-form-item-required":o,"se__no-colon":n});function b8(o,n){if(o&1&&(C(0,"label",7)(1,"span",8),_(2,y8,2,1,"ng-container",9),S(),_(3,S8,3,4,"span",10),S()),o&2){let e=m();h("ngClass",ri(4,w8,e.required,e._noColon)),ze("for",e._id),f(2),h("nzStringTemplateOutlet",e.label),f(),ie(3,e.optional||e.optionalHelp?3:-1)}}function T8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e._error)}}function E8(o,n){if(o&1&&(C(0,"div",13)(1,"div",14),_(2,T8,2,1,"ng-container",9),S()()),o&2){let e=m();h("@helpMotion",void 0),f(2),h("nzStringTemplateOutlet",e._error)}}function x8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.extra)}}function z8(o,n){if(o&1&&(C(0,"div",15),_(1,x8,2,1,"ng-container",9),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.extra)}}var O8=(()=>{let n=class n{constructor(){if(this.parentComp=ae(Yz,{host:!0,optional:!0}),this.el=ae(de).nativeElement,this.ren=ae(He),this.parentComp==null)throw new Error("[se-title] must include 'se-container' component")}setClass(){let{el:t}=this,i=this.parentComp.gutter;this.ren.setStyle(t,"padding-left",`${i/2}px`),this.ren.setStyle(t,"padding-right",`${i/2}px`)}ngOnInit(){this.setClass()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["se-title"],["","se-title",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("se__title",!0)},exportAs:["seTitle"],standalone:!0,features:[K],ngContentSelectors:xC,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Yz=(()=>{let n=class n{get gutter(){return this.nzLayout==="horizontal"?this._gutter:0}set gutter(t){this._gutter=t}get nzLayout(){return this._nzLayout}set nzLayout(t){this._nzLayout=t,t==="inline"&&(this.size="compact")}set errors(t){this.setErrors(t)}get margin(){return-(this.gutter/2)}get errorNotify(){return this.errorNotify$.pipe(Qe(t=>t!=null))}constructor(t){this.errorNotify$=new ct(null),this.noColon=!1,this.line=!1,t.attach(this,"se",{size:"default",nzLayout:"horizontal",gutter:32,col:2,labelWidth:150,firstVisual:!1,ingoreDirty:!1})}setErrors(t){for(let i of t)this.errorNotify$.next(i)}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["se-container"],["","se-container",""]],hostVars:16,hostBindings:function(i,r){i&2&&(Re("margin-left",r.margin,"px")("margin-right",r.margin,"px"),k("ant-row",!0)("se__container",!0)("se__horizontal",r.nzLayout==="horizontal")("se__vertical",r.nzLayout==="vertical")("se__inline",r.nzLayout==="inline")("se__compact",r.size==="compact"))},inputs:{colInCon:[le.HasDecoratorInputTransform,"se-container","colInCon",t=>t==null?null:fn(t)],col:[le.HasDecoratorInputTransform,"col","col",t=>t==null?null:fn(t)],labelWidth:[le.HasDecoratorInputTransform,"labelWidth","labelWidth",t=>t==null?null:fn(t)],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",it],title:"title",gutter:[le.HasDecoratorInputTransform,"gutter","gutter",fn],nzLayout:"nzLayout",size:"size",firstVisual:[le.HasDecoratorInputTransform,"firstVisual","firstVisual",it],ingoreDirty:[le.HasDecoratorInputTransform,"ingoreDirty","ingoreDirty",it],line:[le.HasDecoratorInputTransform,"line","line",it],errors:"errors"},exportAs:["seContainer"],standalone:!0,features:[fi,K],ngContentSelectors:xC,decls:2,vars:1,consts:[["se-title",""],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),_(0,m8,2,1,"div",0),Ie(1)),i&2&&ie(0,r.title?0:-1)},dependencies:[O8,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),EC="se",D8=0,Qz=(()=>{let n=class n{set error(t){this.errorData=typeof t=="string"||t instanceof En?{"":t}:t}set id(t){this._id=t,this._autoId=!1}get paddingValue(){return this.parentComp.gutter/2}get showErr(){return this.invalid&&!!this._error&&!this.compact}get compact(){return this.parentComp.size==="compact"}get ngControl(){return this.ngModel||this.formControlName}constructor(){if(this.parentComp=ae(Yz,{host:!0,optional:!0}),this.el=ae(de).nativeElement,this.rep=ae(zp),this.ren=ae(He),this.cdr=ae(fe),this.statusSrv=ae(cn),this.destroy$=ae(rs),this.clsMap=[],this.inited=!1,this.onceFlag=!1,this.errorData={},this.isBindModel=!1,this.invalid=!1,this._labelWidth=null,this._noColon=null,this.optional=null,this.optionalHelp=null,this.required=!1,this.controlClass="",this.hideLabel=!1,this._id=`_se-${++D8}`,this._autoId=!0,this.parentComp==null)throw new Error("[se] must include 'se-container' component");this.parentComp.errorNotify.pipe(li(),Qe(t=>this.inited&&this.ngControl!=null&&this.ngControl.name===t.name)).subscribe(t=>{this.error=t.error,this.updateStatus(this.ngControl.invalid)})}setClass(){let{el:t,ren:i,clsMap:r,col:s,cdr:a,line:l,labelWidth:c,rep:u,noColon:d}=this,p=this.parentComp;this._noColon=d??p.noColon,this._labelWidth=p.nzLayout==="horizontal"?c??p.labelWidth:null,r.forEach(y=>i.removeClass(t,y)),r.length=0;let g=p.colInCon||p.col,v=p.nzLayout==="horizontal"?u.genCls(s??g,g):[];return r.push("ant-form-item",...v,`${EC}__item`),(l||p.line)&&r.push(`${EC}__line`),r.forEach(y=>i.addClass(t,y)),a.detectChanges(),this}bindModel(){if(!(!this.ngControl||this.isBindModel)){if(this.isBindModel=!0,this.ngControl.statusChanges.pipe(li(this.destroy$)).subscribe(t=>this.updateStatus(t==="INVALID")),this._autoId){let t=this.ngControl.valueAccessor,i=(t?.elementRef||t?._elementRef)?.nativeElement;i&&(i.id?this._id=i.id:i.id=this._id)}if(this.required!==!0){let t=this.ngControl?.control?.hasValidator(Np.required);t!==!0&&(t=(this.ngControl?._rawValidators).find(r=>r instanceof Rm)!=null),this.required=t,this.cdr.detectChanges()}}}updateStatus(t){if(this.ngControl?.disabled||this.ngControl?.isDisabled)return;this.invalid=!this.onceFlag&&t&&this.parentComp.ingoreDirty===!1&&!this.ngControl?.dirty?!1:t;let i=this.ngControl?.errors;if(i!=null&&Object.keys(i).length>0){let r=Object.keys(i)[0]||"",s=this.errorData[r];this._error=s??(this.errorData[""]||"")}this.statusSrv.formStatusChanges.next({status:this.invalid?"error":"",hasFeedback:!1}),this.cdr.detectChanges()}checkContent(){let t=this.contentElement.nativeElement,i=`${EC}__item-empty`;Bl(t)?this.ren.addClass(t,i):this.ren.removeClass(t,i)}ngAfterContentInit(){this.checkContent()}ngOnChanges(){this.onceFlag=this.parentComp.firstVisual,this.inited&&this.setClass().bindModel()}ngAfterViewInit(){this.setClass().bindModel(),this.inited=!0,this.onceFlag&&Promise.resolve().then(()=>{this.updateStatus(this.ngControl?.invalid),this.onceFlag=!1})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["se"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,Rt,7),Ft(s,yu,7)),i&2){let a;ce(a=ue())&&(r.ngModel=a.first),ce(a=ue())&&(r.formControlName=a.first)}},viewQuery:function(i,r){if(i&1&&xe(v8,7),i&2){let s;ce(s=ue())&&(r.contentElement=s.first)}},hostVars:10,hostBindings:function(i,r){i&2&&(Re("padding-left",r.paddingValue,"px")("padding-right",r.paddingValue,"px"),k("se__hide-label",r.hideLabel)("ant-form-item-has-error",r.invalid)("ant-form-item-with-help",r.showErr))},inputs:{optional:"optional",optionalHelp:"optionalHelp",optionalHelpColor:"optionalHelpColor",error:"error",extra:"extra",label:"label",col:[le.HasDecoratorInputTransform,"col","col",t=>t==null?null:fn(t)],required:[le.HasDecoratorInputTransform,"required","required",it],controlClass:"controlClass",line:[le.HasDecoratorInputTransform,"line","line",t=>t==null?null:it(t)],labelWidth:[le.HasDecoratorInputTransform,"labelWidth","labelWidth",t=>t==null?null:fn(t)],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",t=>t==null?null:it(t)],hideLabel:[le.HasDecoratorInputTransform,"hideLabel","hideLabel",it],id:"id"},exportAs:["se"],standalone:!0,features:[Ve([cn]),fi,oe,K],ngContentSelectors:xC,decls:9,vars:10,consts:[[1,"ant-form-item-label"],["class","se__label",3,"ngClass"],[1,"ant-form-item-control","se__control"],[1,"ant-form-item-control-input-content",3,"cdkObserveContent"],["contentElement",""],["class","ant-form-item-explain ant-form-item-explain-connected"],["class","ant-form-item-extra"],[1,"se__label",3,"ngClass"],[1,"se__label-text"],[4,"nzStringTemplateOutlet"],["class","se__label-optional",3,"se__label-optional-no-text"],[1,"se__label-optional"],["nz-tooltip","","nz-icon","","nzType","question-circle",3,"nzTooltipTitle","nzTooltipColor"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],["role","alert",1,"ant-form-item-explain-error"],[1,"ant-form-item-extra"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0),_(1,b8,4,7,"label",1),S(),C(2,"div",2)(3,"div")(4,"div",3,4),A("cdkObserveContent",function(){return r.checkContent()}),Ie(6),S()(),_(7,E8,3,2,"div",5)(8,z8,2,1,"div",6),S()),i&2&&(Re("width",r._labelWidth,"px"),k("se__nolabel",r.hideLabel||!r.label),f(),ie(1,r.label?1:-1),f(2),Ae("ant-form-item-control-input ",r.controlClass,""),f(4),ie(7,r.showErr?7:-1),f(),ie(8,r.extra&&!r.compact?8:-1))},dependencies:[St,Ue,Si,Fe,Ll],encapsulation:2,data:{animation:[jl]},changeDetection:0});let o=n;return o})();var Cf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,ji,Ge,Ye]});let o=n;return o})();var OC=["*"];function R8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.title)}}function I8(o,n){if(o&1&&(C(0,"sv-title"),_(1,R8,2,1,"ng-container",1),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.title)}}var P8=["conEl"];function M8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.label)}}function F8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.optional)}}function A8(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(3);h("nzTooltipTitle",e.optionalHelp)("nzTooltipColor",e.optionalHelpColor)}}function N8(o,n){if(o&1&&(C(0,"span",9),_(1,F8,2,1,"ng-container",7)(2,A8,1,2,"i",10),S()),o&2){let e=m(2);k("sv__label-optional-no-text",!e.optional),f(),h("nzStringTemplateOutlet",e.optional),f(),ie(2,e.optionalHelp?2:-1)}}function L8(o,n){if(o&1&&(C(0,"div",5)(1,"span",6),_(2,M8,2,1,"ng-container",7),S(),_(3,N8,3,4,"span",8),S()),o&2){let e=m();Re("width",e.labelWidth,"px"),k("sv__label-empty",!e.label)("sv__label-width",e.labelWidth!==null&&e.labelWidth!==void 0)("sv__no-colon",e._noColon),f(2),h("nzStringTemplateOutlet",e.label),f(),ie(3,e.optional||e.optionalHelp?3:-1)}}function k8(o,n){if(o&1&&(C(0,"span",12),Y(1),S()),o&2){let e=m(2);f(),ye(e.unit)}}function V8(o,n){if(o&1&&_(0,k8,2,1,"span",11),o&2){let e=m();h("nzStringTemplateOutlet",e.unit)}}var G8=(()=>{let n=class n{constructor(){if(this.el=ae(de).nativeElement,this.parentComp=ae(Zz,{host:!0,optional:!0}),this.ren=ae(He),this.parentComp==null)throw new Error("[sv-title] must include 'sv-container' component")}setClass(){let t=this.parentComp.gutter,i=this.el;this.ren.setStyle(i,"padding-left",`${t/2}px`),this.ren.setStyle(i,"padding-right",`${t/2}px`)}ngOnInit(){this.setClass()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sv-title"],["","sv-title",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("sv__title",!0)},exportAs:["svTitle"],standalone:!0,features:[K],ngContentSelectors:OC,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Zz=(()=>{let n=class n{get margin(){return this.bordered?{}:{"margin-left.px":-(this.gutter/2),"margin-right.px":-(this.gutter/2)}}constructor(t){this.noColon=!1,this.bordered=!1,t.attach(this,"sv",{size:"large",gutter:32,layout:"horizontal",col:3,default:!0})}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["sv-container"],["","sv-container",""]],hostVars:14,hostBindings:function(i,r){i&2&&k("sv__container",!0)("sv__horizontal",r.layout==="horizontal")("sv__vertical",r.layout==="vertical")("sv__small",r.size==="small")("sv__large",r.size==="large")("sv__bordered",r.bordered)("clearfix",!0)},inputs:{colInCon:[le.HasDecoratorInputTransform,"sv-container","colInCon",t=>t==null?null:fn(t)],title:"title",size:"size",gutter:[le.HasDecoratorInputTransform,"gutter","gutter",fn],layout:"layout",labelWidth:[le.HasDecoratorInputTransform,"labelWidth","labelWidth",fn],col:[le.HasDecoratorInputTransform,"col","col",fn],default:[le.HasDecoratorInputTransform,"default","default",it],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",it],bordered:[le.HasDecoratorInputTransform,"bordered","bordered",it]},exportAs:["svContainer"],standalone:!0,features:[fi,K],ngContentSelectors:OC,decls:3,vars:2,consts:[[1,"ant-row",3,"ngStyle"],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0),_(1,I8,2,1,"sv-title"),Ie(2),S()),i&2&&(h("ngStyle",r.margin),f(),ie(1,r.title?1:-1))},dependencies:[Zt,G8,Ue],encapsulation:2,changeDetection:0});let o=n;return o})();var zC="sv",q0e=(()=>{let n=class n{get paddingValue(){return this.parentComp.bordered?null:this.parentComp.gutter/2}get labelWidth(){let{labelWidth:t,layout:i}=this.parentComp;return i==="horizontal"?t:null}constructor(){if(this.el=ae(de).nativeElement,this.parentComp=ae(Zz,{host:!0,optional:!0}),this.rep=ae(zp),this.ren=ae(He),this.clsMap=[],this._noColon=!1,this.hideLabel=!1,this.parentComp==null)throw new Error("[sv] must include 'sv-container' component")}setClass(){let{ren:t,col:i,clsMap:r,type:s,rep:a,noColon:l}=this,c=this.parentComp,u=this.el;this._noColon=c.bordered?!0:l??c.noColon,r.forEach(p=>t.removeClass(u,p)),r.length=0;let d=c.colInCon||c.col;r.push(...a.genCls(i??d,d)),r.push(`${zC}__item`),c.labelWidth&&r.push(`${zC}__item-fixed`),s&&r.push(`${zC}__type-${s}`),r.forEach(p=>t.addClass(u,p))}ngAfterViewInit(){this.setClass(),this.checkContent()}ngOnChanges(){this.setClass()}checkContent(){let{conEl:t}=this,i=this.default;if(!(i??this.parentComp?.default))return;let r=t.nativeElement,s="sv__default";r.classList.contains(s)&&r.classList.remove(s),Bl(r)&&r.classList.add(s)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sv"],["","sv",""]],viewQuery:function(i,r){if(i&1&&xe(P8,5),i&2){let s;ce(s=ue())&&(r.conEl=s.first)}},hostVars:4,hostBindings:function(i,r){i&2&&Re("padding-left",r.paddingValue,"px")("padding-right",r.paddingValue,"px")},inputs:{optional:"optional",optionalHelp:"optionalHelp",optionalHelpColor:"optionalHelpColor",label:"label",unit:"unit",col:[le.HasDecoratorInputTransform,"col","col",t=>t==null?null:fn(t)],default:[le.HasDecoratorInputTransform,"default","default",t=>t==null?null:it(t)],type:"type",noColon:[le.HasDecoratorInputTransform,"noColon","noColon",t=>t==null?null:it(t)],hideLabel:[le.HasDecoratorInputTransform,"hideLabel","hideLabel",it]},exportAs:["sv"],standalone:!0,features:[fi,oe,K],ngContentSelectors:OC,decls:6,vars:2,consts:[["class","sv__label",3,"sv__label-empty","sv__label-width","sv__no-colon","width"],[1,"sv__detail"],[3,"cdkObserveContent"],["conEl",""],["class","sv__unit"],[1,"sv__label"],[1,"sv__label-text"],[4,"nzStringTemplateOutlet"],["class","sv__label-optional",3,"sv__label-optional-no-text"],[1,"sv__label-optional"],["nz-tooltip","","nz-icon","","nzType","question-circle",3,"nzTooltipTitle","nzTooltipColor"],["class","sv__unit",4,"nzStringTemplateOutlet"],[1,"sv__unit"]],template:function(i,r){i&1&&(Pe(),_(0,L8,4,10,"div",0),C(1,"div",1)(2,"span",2,3),A("cdkObserveContent",function(){return r.checkContent()}),Ie(4),S(),_(5,V8,1,1,"span",4),S()),i&2&&(ie(0,r.hideLabel?-1:0),f(5),ie(5,r.unit?5:-1))},dependencies:[Ue,Si,Fe,Ll],encapsulation:2,changeDetection:0});let o=n;return o})();var _f=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,vp,ji,Ge,Ye]});let o=n;return o})();function B8(o,n){o&1&&Xt(0)}function $8(o,n){if(o&1&&_(0,B8,1,0,"ng-container",7),o&2){let e=m(3);h("nzStringTemplateOutlet",e.nzIcon)}}function j8(o,n){if(o&1&&R(0,"span",8),o&2){let e=m(3);h("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme)}}function W8(o,n){if(o&1&&(C(0,"div",6),_(1,$8,1,1,"ng-container")(2,j8,1,2),S()),o&2){let e=m(2);f(),ie(1,e.nzIcon?1:2)}}function U8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(4);f(),ye(e.nzMessage)}}function K8(o,n){if(o&1&&(C(0,"span",12),_(1,U8,2,1,"ng-container",7),S()),o&2){let e=m(3);f(),h("nzStringTemplateOutlet",e.nzMessage)}}function q8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(4);f(),ye(e.nzDescription)}}function Y8(o,n){if(o&1&&(C(0,"span",13),_(1,q8,2,1,"ng-container",7),S()),o&2){let e=m(3);f(),h("nzStringTemplateOutlet",e.nzDescription)}}function Q8(o,n){if(o&1&&(C(0,"div",9),_(1,K8,2,1,"span",10)(2,Y8,2,1,"span",11),S()),o&2){let e=m(2);f(),ie(1,e.nzMessage?1:-1),f(),ie(2,e.nzDescription?2:-1)}}function X8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.nzAction)}}function Z8(o,n){if(o&1&&(C(0,"div",14),_(1,X8,2,1,"ng-container",7),S()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzAction)}}function J8(o,n){if(o&1&&(H(0),C(1,"span",16),Y(2),S(),B()),o&2){let e=m(4);f(2),ye(e.nzCloseText)}}function eK(o,n){if(o&1&&_(0,J8,3,1,"ng-container",7),o&2){let e=m(3);h("nzStringTemplateOutlet",e.nzCloseText)}}function tK(o,n){o&1&&R(0,"span",17)}function nK(o,n){if(o&1){let e=Q();C(0,"button",15),A("click",function(){I(e);let i=m(2);return P(i.closeAlert())}),_(1,eK,1,1,"ng-container")(2,tK,1,0),S()}if(o&2){let e=m(2);f(),ie(1,e.nzCloseText?1:2)}}function iK(o,n){if(o&1){let e=Q();C(0,"div",1),A("@slideAlertMotion.done",function(){I(e);let i=m();return P(i.onFadeAnimationDone())}),_(1,W8,3,1,"div",2)(2,Q8,3,2,"div",3)(3,Z8,2,1,"div",4)(4,nK,3,1,"button",5),S()}if(o&2){let e=m();k("ant-alert-rtl",e.dir==="rtl")("ant-alert-success",e.nzType==="success")("ant-alert-info",e.nzType==="info")("ant-alert-warning",e.nzType==="warning")("ant-alert-error",e.nzType==="error")("ant-alert-no-icon",!e.nzShowIcon)("ant-alert-banner",e.nzBanner)("ant-alert-closable",e.nzCloseable)("ant-alert-with-description",!!e.nzDescription),h("@.disabled",e.nzNoAnimation)("@slideAlertMotion",void 0),f(),ie(1,e.nzShowIcon?1:-1),f(),ie(2,e.nzMessage||e.nzDescription?2:-1),f(),ie(3,e.nzAction?3:-1),f(),ie(4,e.nzCloseable||e.nzCloseText?4:-1)}}var Jz="alert",rK=(()=>{let n=class n{constructor(t,i,r){this.nzConfigService=t,this.cdr=i,this.directionality=r,this._nzModuleName=Jz,this.nzAction=null,this.nzCloseText=null,this.nzIconType=null,this.nzMessage=null,this.nzDescription=null,this.nzType="info",this.nzCloseable=!1,this.nzShowIcon=!1,this.nzBanner=!1,this.nzNoAnimation=!1,this.nzIcon=null,this.nzOnClose=new O,this.closed=!1,this.iconTheme="fill",this.inferredIconType="info-circle",this.dir="ltr",this.isTypeSet=!1,this.isShowIconSet=!1,this.destroy$=new J,this.nzConfigService.getConfigChangeEventForComponent(Jz).pipe(F(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}closeAlert(){this.closed=!0}onFadeAnimationDone(){this.closed&&this.nzOnClose.emit(!0)}ngOnChanges(t){let{nzShowIcon:i,nzDescription:r,nzType:s,nzBanner:a}=t;if(i&&(this.isShowIconSet=!0),s)switch(this.isTypeSet=!0,this.nzType){case"error":this.inferredIconType="close-circle";break;case"success":this.inferredIconType="check-circle";break;case"info":this.inferredIconType="info-circle";break;case"warning":this.inferredIconType="exclamation-circle";break}r&&(this.iconTheme=this.nzDescription?"outline":"fill"),a&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=!0))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:"nzCloseable",nzShowIcon:"nzShowIcon",nzBanner:"nzBanner",nzNoAnimation:"nzNoAnimation",nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],standalone:!0,features:[oe,K],decls:1,vars:1,consts:[["class","ant-alert",3,"ant-alert-rtl","ant-alert-success","ant-alert-info","ant-alert-warning","ant-alert-error","ant-alert-no-icon","ant-alert-banner","ant-alert-closable","ant-alert-with-description"],[1,"ant-alert"],["class","ant-alert-icon"],["class","ant-alert-content"],["class","ant-alert-action"],["type","button","tabindex","0","class","ant-alert-close-icon"],[1,"ant-alert-icon"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType","nzTheme"],[1,"ant-alert-content"],["class","ant-alert-message"],["class","ant-alert-description"],[1,"ant-alert-message"],[1,"ant-alert-description"],[1,"ant-alert-action"],["type","button","tabindex","0",1,"ant-alert-close-icon",3,"click"],[1,"ant-alert-close-text"],["nz-icon","","nzType","close"]],template:function(i,r){i&1&&_(0,iK,5,24,"div",0),i&2&&ie(0,r.closed?-1:0)},dependencies:[Ge,Fe,Ye,Ue],encapsulation:2,data:{animation:[Ew]},changeDetection:0});let o=n;return N([De(),W()],o.prototype,"nzCloseable",void 0),N([De(),W()],o.prototype,"nzShowIcon",void 0),N([W()],o.prototype,"nzBanner",void 0),N([W()],o.prototype,"nzNoAnimation",void 0),o})(),Sf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[rK]});let o=n;return o})();var sK=["textEl"];function aK(o,n){if(o&1&&R(0,"span",0),o&2){let e=m();h("nzType",e.nzIcon)}}function lK(o,n){if(o&1){let e=Q();C(0,"img",3),A("error",function(i){I(e);let r=m();return P(r.imgError(i))}),S()}if(o&2){let e=m();h("src",e.nzSrc,Do),ze("srcset",e.nzSrcSet)("alt",e.nzAlt)}}function cK(o,n){if(o&1&&(C(0,"span",4,5),Y(2),S()),o&2){let e=m();f(2),ye(e.nzText)}}var uK="avatar",dK=(()=>{let n=class n{constructor(t,i,r,s,a){this.nzConfigService=t,this.elementRef=i,this.cdr=r,this.platform=s,this.ngZone=a,this._nzModuleName=uK,this.nzShape="circle",this.nzSize="default",this.nzGap=4,this.nzError=new O,this.hasText=!1,this.hasSrc=!0,this.hasIcon=!1,this.classMap={},this.customSize=null,this.el=this.elementRef.nativeElement}imgError(t){this.nzError.emit(t),t.defaultPrevented||(this.hasSrc=!1,this.hasIcon=!1,this.hasText=!1,this.nzIcon?this.hasIcon=!0:this.nzText&&(this.hasText=!0),this.cdr.detectChanges(),this.setSizeStyle(),this.notifyCalc())}ngOnChanges(){this.hasText=!this.nzSrc&&!!this.nzText,this.hasIcon=!this.nzSrc&&!!this.nzIcon,this.hasSrc=!!this.nzSrc,this.setSizeStyle(),this.notifyCalc()}calcStringSize(){if(!this.hasText)return;let t=this.textEl.nativeElement,i=t.offsetWidth,r=this.el.getBoundingClientRect().width,s=this.nzGap*2{setTimeout(()=>{this.calcStringSize()})})}setSizeStyle(){typeof this.nzSize=="number"?this.customSize=`${this.nzSize}px`:this.customSize=null,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(de),w(fe),w(gn),w($e))},n.\u0275cmp=j({type:n,selectors:[["nz-avatar"]],viewQuery:function(i,r){if(i&1&&xe(sK,5),i&2){let s;ce(s=ue())&&(r.textEl=s.first)}},hostAttrs:[1,"ant-avatar"],hostVars:20,hostBindings:function(i,r){i&2&&(Re("width",r.customSize)("height",r.customSize)("line-height",r.customSize)("font-size",r.hasIcon&&r.customSize?r.nzSize/2:null,"px"),k("ant-avatar-lg",r.nzSize==="large")("ant-avatar-sm",r.nzSize==="small")("ant-avatar-square",r.nzShape==="square")("ant-avatar-circle",r.nzShape==="circle")("ant-avatar-icon",r.nzIcon)("ant-avatar-image",r.hasSrc))},inputs:{nzShape:"nzShape",nzSize:"nzSize",nzGap:"nzGap",nzText:"nzText",nzSrc:"nzSrc",nzSrcSet:"nzSrcSet",nzAlt:"nzAlt",nzIcon:"nzIcon"},outputs:{nzError:"nzError"},exportAs:["nzAvatar"],standalone:!0,features:[oe,K],decls:3,vars:3,consts:[["nz-icon","",3,"nzType"],[3,"src"],["class","ant-avatar-string"],[3,"src","error"],[1,"ant-avatar-string"],["textEl",""]],template:function(i,r){i&1&&_(0,aK,1,1,"span",0)(1,lK,1,3,"img",1)(2,cK,3,1,"span",2),i&2&&(ie(0,r.nzIcon&&r.hasIcon?0:-1),f(),ie(1,r.nzSrc&&r.hasSrc?1:-1),f(),ie(2,r.nzText&&r.hasText?2:-1))},dependencies:[Ge,Fe,hp],encapsulation:2,changeDetection:0});let o=n;return N([De()],o.prototype,"nzShape",void 0),N([De()],o.prototype,"nzSize",void 0),N([De(),ci()],o.prototype,"nzGap",void 0),o})();var wf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[dK]});let o=n;return o})();function hK(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.nzTitle)}}function fK(o,n){if(o&1&&(C(0,"div",10),_(1,hK,2,1,"ng-container",9),S()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzTitle)}}function gK(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzContent)}}function mK(o,n){if(o&1&&(C(0,"div",2)(1,"div",3)(2,"div",4),R(3,"span",5),S(),C(4,"div",6)(5,"div"),_(6,fK,2,1,"div",7),C(7,"div",8),_(8,gK,2,1,"ng-container",9),S()()()()()),o&2){let e=m();k("ant-popover-rtl",e.dir==="rtl"),h("ngClass",e._classMap)("ngStyle",e.nzOverlayStyle)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),f(6),h("ngIf",e.nzTitle),f(2),h("nzStringTemplateOutlet",e.nzContent)}}var vK="popover",jSe=(()=>{let n=class n extends Su{getProxyPropertyMap(){return V({nzPopoverBackdrop:["nzBackdrop",()=>this.nzPopoverBackdrop]},super.getProxyPropertyMap())}constructor(t,i,r,s,a){super(t,i,r,s,a),this._nzModuleName=vK,this.trigger="hover",this.placement="top",this.nzPopoverBackdrop=!1,this.visibleChange=new O,this.componentRef=this.hostView.createComponent(eO)}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft,9),w(st))},n.\u0275dir=Se({type:n,selectors:[["","nz-popover",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-popover-open",r.visible)},inputs:{arrowPointAtCenter:[le.None,"nzPopoverArrowPointAtCenter","arrowPointAtCenter"],title:[le.None,"nzPopoverTitle","title"],content:[le.None,"nzPopoverContent","content"],directiveTitle:[le.None,"nz-popover","directiveTitle"],trigger:[le.None,"nzPopoverTrigger","trigger"],placement:[le.None,"nzPopoverPlacement","placement"],origin:[le.None,"nzPopoverOrigin","origin"],visible:[le.None,"nzPopoverVisible","visible"],mouseEnterDelay:[le.None,"nzPopoverMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[le.None,"nzPopoverMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[le.None,"nzPopoverOverlayClassName","overlayClassName"],overlayStyle:[le.None,"nzPopoverOverlayStyle","overlayStyle"],nzPopoverBackdrop:"nzPopoverBackdrop"},outputs:{visibleChange:"nzPopoverVisibleChange"},exportAs:["nzPopover"],standalone:!0,features:[Xe]});let o=n;return N([W()],o.prototype,"arrowPointAtCenter",void 0),N([De()],o.prototype,"nzPopoverBackdrop",void 0),o})(),eO=(()=>{let n=class n extends Ql{constructor(t,i,r){super(t,i,r),this._prefix="ant-popover"}get hasBackdrop(){return this.nzTrigger==="click"?this.nzBackdrop:!1}isEmpty(){return qp(this.nzTitle)&&qp(this.nzContent)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-popover"]],exportAs:["nzPopoverComponent"],standalone:!0,features:[Xe,K],decls:2,vars:6,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],[1,"ant-popover",3,"ngClass","ngStyle","nzNoAnimation"],[1,"ant-popover-content"],[1,"ant-popover-arrow"],[1,"ant-popover-arrow-content"],["role","tooltip",1,"ant-popover-inner"],["class","ant-popover-title",4,"ngIf"],[1,"ant-popover-inner-content"],[4,"nzStringTemplateOutlet"],[1,"ant-popover-title"]],template:function(i,r){i&1&&(_(0,mK,9,9,"ng-template",0,1,_e),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.hide()})("positionChange",function(a){return r.onPositionChange(a)})),i&2&&h("cdkConnectedOverlayHasBackdrop",r.hasBackdrop)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayOpen",r._visible)("cdkConnectedOverlayPush",r.cdkConnectedOverlayPush)("nzArrowPointAtCenter",r.nzArrowPointAtCenter)},dependencies:[Fr,oi,vr,Nr,St,Zt,ft,we,Ye,Ue],encapsulation:2,data:{animation:[Is]},changeDetection:0});let o=n;return o})(),bf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[eO]});let o=n;return o})();function CK(o,n){if(o&1&&(H(0),R(1,"span",8),B()),o&2){let e=m(3);f(),h("nzType",e.icon)}}function _K(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=n.$implicit,t=m(4);f(),Ne(" ",e(t.nzPercent)," ")}}var SK=o=>({$implicit:o});function wK(o,n){if(o&1&&_(0,_K,2,1,"ng-container",9),o&2){let e=m(3);h("nzStringTemplateOutlet",e.formatter)("nzStringTemplateOutletContext",yt(2,SK,e.nzPercent))}}function bK(o,n){if(o&1&&(C(0,"span",5),_(1,CK,2,1,"ng-container",6)(2,wK,1,4,"ng-template",null,7,_e),S()),o&2){let e=te(3),t=m(2);f(),h("ngIf",(t.status==="exception"||t.status==="success")&&!t.nzFormat)("ngIfElse",e)}}function TK(o,n){if(o&1&&_(0,bK,4,2,"span",4),o&2){let e=m();h("ngIf",e.nzShowInfo)}}function EK(o,n){if(o&1&&R(0,"div",17),o&2){let e=m(4);Re("width",e.nzSuccessPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("height",e.strokeWidth,"px")}}function xK(o,n){if(o&1&&(C(0,"div",13)(1,"div",14),R(2,"div",15),_(3,EK,1,6,"div",16),S()()),o&2){let e=m(3);f(2),Re("width",e.nzPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("background",e.isGradient?null:e.nzStrokeColor)("background-image",e.isGradient?e.lineGradient:null)("height",e.strokeWidth,"px"),f(),h("ngIf",e.nzSuccessPercent||e.nzSuccessPercent===0)}}function zK(o,n){}function OK(o,n){if(o&1&&(H(0),_(1,xK,4,11,"div",11)(2,zK,0,0,"ng-template",12),B()),o&2){let e=m(2),t=te(1);f(),h("ngIf",!e.isSteps),f(),h("ngTemplateOutlet",t)}}function DK(o,n){if(o&1&&R(0,"div",20),o&2){let e=n.$implicit;h("ngStyle",e)}}function RK(o,n){}function IK(o,n){if(o&1&&(C(0,"div",18),_(1,DK,1,1,"div",19)(2,RK,0,0,"ng-template",12),S()),o&2){let e=m(2),t=te(1);f(),h("ngForOf",e.steps),f(),h("ngTemplateOutlet",t)}}function PK(o,n){if(o&1&&(C(0,"div"),_(1,OK,3,2,"ng-container",2)(2,IK,3,2,"div",10),S()),o&2){let e=m();f(),h("ngIf",!e.isSteps),f(),h("ngIf",e.isSteps)}}function MK(o,n){if(o&1&&(Oo(),R(0,"stop")),o&2){let e=n.$implicit;ze("offset",e.offset)("stop-color",e.color)}}function FK(o,n){if(o&1&&(Oo(),C(0,"defs")(1,"linearGradient",24),_(2,MK,1,2,"stop",25),S()()),o&2){let e=m(2);f(),h("id","gradient-"+e.gradientId),f(),h("ngForOf",e.circleGradient)}}function AK(o,n){if(o&1&&(Oo(),R(0,"path",26)),o&2){let e=n.$implicit,t=m(2);h("ngStyle",e.strokePathStyle),ze("d",t.pathString)("stroke-linecap",t.nzStrokeLinecap)("stroke",e.stroke)("stroke-width",t.nzPercent?t.strokeWidth:0)}}function NK(o,n){o&1&&Oo()}function LK(o,n){if(o&1&&(C(0,"div",14),Oo(),C(1,"svg",21),_(2,FK,3,2,"defs",2),R(3,"path",22),_(4,AK,1,5,"path",23),S(),_(5,NK,0,0,"ng-template",12),S()),o&2){let e=m(),t=te(1);Re("width",e.nzWidth,"px")("height",e.nzWidth,"px")("font-size",e.nzWidth*.15+6,"px"),k("ant-progress-circle-gradient",e.isGradient),f(2),h("ngIf",e.isGradient),f(),h("ngStyle",e.trailPathStyle),ze("stroke-width",e.strokeWidth)("d",e.pathString),f(),h("ngForOf",e.progressCirclePath)("ngForTrackBy",e.trackByFn),f(),h("ngTemplateOutlet",t)}}function kK(o){return+o.replace("%","")}var nO=o=>{let n=[];return Object.keys(o).forEach(e=>{let t=o[e],i=kK(e);isNaN(i)||n.push({key:i,value:t})}),n=n.sort((e,t)=>e.key-t.key),n},VK=o=>nO(o).map(({key:n,value:e})=>({offset:`${n}%`,color:e})),GK=o=>{let r=o,{from:n="#1890ff",to:e="#1890ff",direction:t="to right"}=r,i=op(r,["from","to","direction"]);if(Object.keys(i).length!==0){let s=nO(i).map(({key:a,value:l})=>`${l} ${a}%`).join(", ");return`linear-gradient(${t}, ${s})`}return`linear-gradient(${t}, ${n}, ${e})`},HK=0,tO="progress",BK=new Map([["success","check"],["exception","close"]]),$K=new Map([["normal","#108ee9"],["exception","#ff5500"],["success","#87d068"]]),jK=o=>`${o}%`,WK=(()=>{let n=class n{get formatter(){return this.nzFormat||jK}get status(){return this.nzStatus||this.inferredStatus}get strokeWidth(){return this.nzStrokeWidth||(this.nzType==="line"&&this.nzSize!=="small"?8:6)}get isCircleStyle(){return this.nzType==="circle"||this.nzType==="dashboard"}constructor(t,i,r){this.cdr=t,this.nzConfigService=i,this.directionality=r,this._nzModuleName=tO,this.nzShowInfo=!0,this.nzWidth=132,this.nzStrokeColor=void 0,this.nzSize="default",this.nzPercent=0,this.nzStrokeWidth=void 0,this.nzGapDegree=void 0,this.nzType="line",this.nzGapPosition="top",this.nzStrokeLinecap="round",this.nzSteps=0,this.steps=[],this.lineGradient=null,this.isGradient=!1,this.isSteps=!1,this.gradientId=HK++,this.progressCirclePath=[],this.trailPathStyle=null,this.dir="ltr",this.trackByFn=s=>`${s}`,this.cachedStatus="normal",this.inferredStatus="normal",this.destroy$=new J}ngOnChanges(t){let{nzSteps:i,nzGapPosition:r,nzStrokeLinecap:s,nzStrokeColor:a,nzGapDegree:l,nzType:c,nzStatus:u,nzPercent:d,nzSuccessPercent:p,nzStrokeWidth:g}=t;u&&(this.cachedStatus=this.nzStatus||this.cachedStatus),(d||p)&&(parseInt(this.nzPercent.toString(),10)>=100?(ht(this.nzSuccessPercent)&&this.nzSuccessPercent>=100||this.nzSuccessPercent===void 0)&&(this.inferredStatus="success"):this.inferredStatus=this.cachedStatus),(u||d||p||a)&&this.updateIcon(),a&&this.setStrokeColor(),(r||s||l||c||d||a||a)&&this.getCirclePaths(),(d||i||g)&&(this.isSteps=this.nzSteps>0,this.isSteps&&this.getSteps())}ngOnInit(){this.nzConfigService.getConfigChangeEventForComponent(tO).pipe(F(this.destroy$)).subscribe(()=>{this.updateIcon(),this.setStrokeColor(),this.getCirclePaths()}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}updateIcon(){let t=BK.get(this.status);this.icon=t?t+(this.isCircleStyle?"-o":"-circle-fill"):""}getSteps(){let t=Math.floor(this.nzSteps*(this.nzPercent/100)),i=this.nzSize==="small"?2:14,r=[];for(let s=0;s{for(let c of a)(0,Ju.checkReportMissingProp)(o,c)}):(e.if((0,Ly._)`${l} && (${(0,Ju.checkMissingProp)(o,a,r)})`),(0,Ju.reportMissingProp)(o,r),e.else())}}Lo.validatePropertyDeps=Px;function Mx(o,n=o.schema){let{gen:e,data:t,keyword:i,it:r}=o,s=e.name("valid");for(let a in n)(0,NW.alwaysValidSchema)(r,n[a])||(e.if((0,Ju.propertyInData)(e,t,a,r.opts.ownProperties),()=>{let l=o.subschema({keyword:i,schemaProp:a},s);o.mergeValidEvaluated(l,s)},()=>e.var(s,!0)),o.ok(s))}Lo.validateSchemaDeps=Mx;Lo.default=LW});var Nx=ke(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});var Ax=wt(),VW=jt(),GW={message:"property name must be valid",params:({params:o})=>(0,Ax._)`{propertyName: ${o.propertyName}}`},HW={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:GW,code(o){let{gen:n,schema:e,data:t,it:i}=o;if((0,VW.alwaysValidSchema)(i,e))return;let r=n.name("valid");n.forIn("key",t,s=>{o.setParams({propertyName:s}),o.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},r),n.if((0,Ax.not)(r),()=>{o.error(!0),i.allErrors||n.break()})}),o.ok(r)}};ky.default=HW});var Gy=ke(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});var qh=Gr(),fo=wt(),BW=gs(),Yh=jt(),$W={message:"must NOT have additional properties",params:({params:o})=>(0,fo._)`{additionalProperty: ${o.additionalProperty}}`},jW={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:$W,code(o){let{gen:n,schema:e,parentSchema:t,data:i,errsCount:r,it:s}=o;if(!r)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,Yh.alwaysValidSchema)(s,e))return;let c=(0,qh.allSchemaProperties)(t.properties),u=(0,qh.allSchemaProperties)(t.patternProperties);d(),o.ok((0,fo._)`${r} === ${BW.default.errors}`);function d(){n.forIn("key",i,x=>{!c.length&&!u.length?v(x):n.if(p(x),()=>v(x))})}function p(x){let E;if(c.length>8){let z=(0,Yh.schemaRefOrVal)(s,t.properties,"properties");E=(0,qh.isOwnProperty)(n,z,x)}else c.length?E=(0,fo.or)(...c.map(z=>(0,fo._)`${x} === ${z}`)):E=fo.nil;return u.length&&(E=(0,fo.or)(E,...u.map(z=>(0,fo._)`${(0,qh.usePattern)(o,z)}.test(${x})`))),(0,fo.not)(E)}function g(x){n.code((0,fo._)`delete ${i}[${x}]`)}function v(x){if(l.removeAdditional==="all"||l.removeAdditional&&e===!1){g(x);return}if(e===!1){o.setParams({additionalProperty:x}),o.error(),a||n.break();return}if(typeof e=="object"&&!(0,Yh.alwaysValidSchema)(s,e)){let E=n.name("valid");l.removeAdditional==="failing"?(y(x,E,!1),n.if((0,fo.not)(E),()=>{o.reset(),g(x)})):(y(x,E),a||n.if((0,fo.not)(E),()=>n.break()))}}function y(x,E,z){let M={keyword:"additionalProperties",dataProp:x,dataPropType:Yh.Type.Str};z===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(M,E)}}};Vy.default=jW});var Vx=ke(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});var WW=Hu(),Lx=Gr(),Hy=jt(),kx=Gy(),UW={keyword:"properties",type:"object",schemaType:"object",code(o){let{gen:n,schema:e,parentSchema:t,data:i,it:r}=o;r.opts.removeAdditional==="all"&&t.additionalProperties===void 0&&kx.default.code(new WW.KeywordCxt(r,kx.default,"additionalProperties"));let s=(0,Lx.allSchemaProperties)(e);for(let d of s)r.definedProperties.add(d);r.opts.unevaluated&&s.length&&r.props!==!0&&(r.props=Hy.mergeEvaluated.props(n,(0,Hy.toHash)(s),r.props));let a=s.filter(d=>!(0,Hy.alwaysValidSchema)(r,e[d]));if(a.length===0)return;let l=n.name("valid");for(let d of a)c(d)?u(d):(n.if((0,Lx.propertyInData)(n,i,d,r.opts.ownProperties)),u(d),r.allErrors||n.else().var(l,!0),n.endIf()),o.it.definedProperties.add(d),o.ok(l);function c(d){return r.opts.useDefaults&&!r.compositeRule&&e[d].default!==void 0}function u(d){o.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};By.default=UW});var $x=ke($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});var Gx=Gr(),Qh=wt(),Hx=jt(),Bx=jt(),KW={keyword:"patternProperties",type:"object",schemaType:"object",code(o){let{gen:n,schema:e,data:t,parentSchema:i,it:r}=o,{opts:s}=r,a=(0,Gx.allSchemaProperties)(e),l=a.filter(y=>(0,Hx.alwaysValidSchema)(r,e[y]));if(a.length===0||l.length===a.length&&(!r.opts.unevaluated||r.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&i.properties,u=n.name("valid");r.props!==!0&&!(r.props instanceof Qh.Name)&&(r.props=(0,Bx.evaluatedPropsToName)(n,r.props));let{props:d}=r;p();function p(){for(let y of a)c&&g(y),r.allErrors?v(y):(n.var(u,!0),v(y),n.if(u))}function g(y){for(let x in c)new RegExp(y).test(x)&&(0,Hx.checkStrictMode)(r,`property ${x} matches pattern ${y} (use allowMatchingProperties)`)}function v(y){n.forIn("key",t,x=>{n.if((0,Qh._)`${(0,Gx.usePattern)(o,y)}.test(${x})`,()=>{let E=l.includes(y);E||o.subschema({keyword:"patternProperties",schemaProp:y,dataProp:x,dataPropType:Bx.Type.Str},u),r.opts.unevaluated&&d!==!0?n.assign((0,Qh._)`${d}[${x}]`,!0):!E&&!r.allErrors&&n.if((0,Qh.not)(u),()=>n.break())})})}}};$y.default=KW});var jx=ke(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});var qW=jt(),YW={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){let{gen:n,schema:e,it:t}=o;if((0,qW.alwaysValidSchema)(t,e)){o.fail();return}let i=n.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),o.failResult(i,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};jy.default=YW});var Wx=ke(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});var QW=Gr(),XW={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:QW.validateUnion,error:{message:"must match a schema in anyOf"}};Wy.default=XW});var Ux=ke(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});var Xh=wt(),ZW=jt(),JW={message:"must match exactly one schema in oneOf",params:({params:o})=>(0,Xh._)`{passingSchemas: ${o.passing}}`},eU={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:JW,code(o){let{gen:n,schema:e,parentSchema:t,it:i}=o;if(!Array.isArray(e))throw new Error("ajv implementation error");if(i.opts.discriminator&&t.discriminator)return;let r=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");o.setParams({passing:a}),n.block(c),o.result(s,()=>o.reset(),()=>o.error(!0));function c(){r.forEach((u,d)=>{let p;(0,ZW.alwaysValidSchema)(i,u)?n.var(l,!0):p=o.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&n.if((0,Xh._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Xh._)`[${a}, ${d}]`).else(),n.if(l,()=>{n.assign(s,!0),n.assign(a,d),p&&o.mergeEvaluated(p,Xh.Name)})})}}};Uy.default=eU});var Kx=ke(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});var tU=jt(),nU={keyword:"allOf",schemaType:"array",code(o){let{gen:n,schema:e,it:t}=o;if(!Array.isArray(e))throw new Error("ajv implementation error");let i=n.name("valid");e.forEach((r,s)=>{if((0,tU.alwaysValidSchema)(t,r))return;let a=o.subschema({keyword:"allOf",schemaProp:s},i);o.ok(i),o.mergeEvaluated(a)})}};Ky.default=nU});var Qx=ke(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});var Zh=wt(),Yx=jt(),iU={message:({params:o})=>(0,Zh.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,Zh._)`{failingKeyword: ${o.ifClause}}`},rU={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:iU,code(o){let{gen:n,parentSchema:e,it:t}=o;e.then===void 0&&e.else===void 0&&(0,Yx.checkStrictMode)(t,'"if" without "then" and "else" is ignored');let i=qx(t,"then"),r=qx(t,"else");if(!i&&!r)return;let s=n.let("valid",!0),a=n.name("_valid");if(l(),o.reset(),i&&r){let u=n.let("ifClause");o.setParams({ifClause:u}),n.if(a,c("then",u),c("else",u))}else i?n.if(a,c("then")):n.if((0,Zh.not)(a),c("else"));o.pass(s,()=>o.error(!0));function l(){let u=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);o.mergeEvaluated(u)}function c(u,d){return()=>{let p=o.subschema({keyword:u},a);n.assign(s,a),o.mergeValidEvaluated(p,s),d?n.assign(d,(0,Zh._)`${u}`):o.setParams({ifClause:u})}}}};function qx(o,n){let e=o.schema[n];return e!==void 0&&!(0,Yx.alwaysValidSchema)(o,e)}qy.default=rU});var Xx=ke(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});var oU=jt(),sU={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:n,it:e}){n.if===void 0&&(0,oU.checkStrictMode)(e,`"${o}" without "if" is ignored`)}};Yy.default=sU});var Zx=ke(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});var aU=Py(),lU=Ox(),cU=My(),uU=Rx(),dU=Ix(),pU=Fx(),hU=Nx(),fU=Gy(),gU=Vx(),mU=$x(),vU=jx(),yU=Wx(),CU=Ux(),_U=Kx(),SU=Qx(),wU=Xx();function bU(o=!1){let n=[vU.default,yU.default,CU.default,_U.default,SU.default,wU.default,hU.default,fU.default,pU.default,gU.default,mU.default];return o?n.push(lU.default,uU.default):n.push(aU.default,cU.default),n.push(dU.default),n}Qy.default=bU});var Jx=ke(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});var Vn=wt(),TU={message:({schemaCode:o})=>(0,Vn.str)`must match format "${o}"`,params:({schemaCode:o})=>(0,Vn._)`{format: ${o}}`},EU={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:TU,code(o,n){let{gen:e,data:t,$data:i,schema:r,schemaCode:s,it:a}=o,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=a;if(!l.validateFormats)return;i?p():g();function p(){let v=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),y=e.const("fDef",(0,Vn._)`${v}[${s}]`),x=e.let("fType"),E=e.let("format");e.if((0,Vn._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>e.assign(x,(0,Vn._)`${y}.type || "string"`).assign(E,(0,Vn._)`${y}.validate`),()=>e.assign(x,(0,Vn._)`"string"`).assign(E,y)),o.fail$data((0,Vn.or)(z(),M()));function z(){return l.strictSchema===!1?Vn.nil:(0,Vn._)`${s} && !${E}`}function M(){let G=u.$async?(0,Vn._)`(${y}.async ? await ${E}(${t}) : ${E}(${t}))`:(0,Vn._)`${E}(${t})`,U=(0,Vn._)`(typeof ${E} == "function" ? ${G} : ${E}.test(${t}))`;return(0,Vn._)`${E} && ${E} !== true && ${x} === ${n} && !${U}`}}function g(){let v=d.formats[r];if(!v){z();return}if(v===!0)return;let[y,x,E]=M(v);y===n&&o.pass(G());function z(){if(l.strictSchema===!1){d.logger.warn(U());return}throw new Error(U());function U(){return`unknown format "${r}" ignored in schema at path "${c}"`}}function M(U){let se=U instanceof RegExp?(0,Vn.regexpCode)(U):l.code.formats?(0,Vn._)`${l.code.formats}${(0,Vn.getProperty)(r)}`:void 0,ve=e.scopeValue("formats",{key:r,ref:U,code:se});return typeof U=="object"&&!(U instanceof RegExp)?[U.type||"string",U.validate,(0,Vn._)`${ve}.validate`]:["string",U,ve]}function G(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Vn._)`await ${E}(${t})`}return typeof x=="function"?(0,Vn._)`${E}(${t})`:(0,Vn._)`${E}.test(${t})`}}}};Xy.default=EU});var ez=ke(Zy=>{"use strict";Object.defineProperty(Zy,"__esModule",{value:!0});var xU=Jx(),zU=[xU.default];Zy.default=zU});var tz=ke(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.contentVocabulary=vc.metadataVocabulary=void 0;vc.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];vc.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var iz=ke(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});var OU=ux(),DU=Tx(),RU=Zx(),IU=ez(),nz=tz(),PU=[OU.default,DU.default,(0,RU.default)(),IU.default,nz.metadataVocabulary,nz.contentVocabulary];Jy.default=PU});var rz=ke(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.DiscrError=void 0;var MU;(function(o){o.Tag="tag",o.Mapping="mapping"})(MU=ed.DiscrError||(ed.DiscrError={}))});var sz=ke(tC=>{"use strict";Object.defineProperty(tC,"__esModule",{value:!0});var yc=wt(),eC=rz(),oz=Lh(),FU=jt(),AU={message:({params:{discrError:o,tagName:n}})=>o===eC.DiscrError.Tag?`tag "${n}" must be string`:`value of tag "${n}" must be in oneOf`,params:({params:{discrError:o,tag:n,tagName:e}})=>(0,yc._)`{error: ${o}, tag: ${e}, tagValue: ${n}}`},NU={keyword:"discriminator",type:"object",schemaType:"object",error:AU,code(o){let{gen:n,data:e,schema:t,parentSchema:i,it:r}=o,{oneOf:s}=i;if(!r.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=t.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(t.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=n.let("valid",!1),c=n.const("tag",(0,yc._)`${e}${(0,yc.getProperty)(a)}`);n.if((0,yc._)`typeof ${c} == "string"`,()=>u(),()=>o.error(!1,{discrError:eC.DiscrError.Tag,tag:c,tagName:a})),o.ok(l);function u(){let g=p();n.if(!1);for(let v in g)n.elseIf((0,yc._)`${c} === ${v}`),n.assign(l,d(g[v]));n.else(),o.error(!1,{discrError:eC.DiscrError.Mapping,tag:c,tagName:a}),n.endIf()}function d(g){let v=n.name("valid"),y=o.subschema({keyword:"oneOf",schemaProp:g},v);return o.mergeEvaluated(y,yc.Name),v}function p(){var g;let v={},y=E(i),x=!0;for(let G=0;G{LU.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var nC=ke((Pn,cz)=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.MissingRefError=Pn.ValidationError=Pn.CodeGen=Pn.Name=Pn.nil=Pn.stringify=Pn.str=Pn._=Pn.KeywordCxt=void 0;var kU=rx(),VU=iz(),GU=sz(),lz=az(),HU=["/properties"],Jh="http://json-schema.org/draft-07/schema",ef=class extends kU.default{_addVocabularies(){super._addVocabularies(),VU.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(GU.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(lz,HU):lz;this.addMetaSchema(n,Jh,!1),this.refs["http://json-schema.org/schema"]=Jh}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Jh)?Jh:void 0)}};cz.exports=Pn=ef;Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=ef;var BU=Hu();Object.defineProperty(Pn,"KeywordCxt",{enumerable:!0,get:function(){return BU.KeywordCxt}});var Cc=wt();Object.defineProperty(Pn,"_",{enumerable:!0,get:function(){return Cc._}});Object.defineProperty(Pn,"str",{enumerable:!0,get:function(){return Cc.str}});Object.defineProperty(Pn,"stringify",{enumerable:!0,get:function(){return Cc.stringify}});Object.defineProperty(Pn,"nil",{enumerable:!0,get:function(){return Cc.nil}});Object.defineProperty(Pn,"Name",{enumerable:!0,get:function(){return Cc.Name}});Object.defineProperty(Pn,"CodeGen",{enumerable:!0,get:function(){return Cc.CodeGen}});var $U=Fh();Object.defineProperty(Pn,"ValidationError",{enumerable:!0,get:function(){return $U.default}});var jU=Ah();Object.defineProperty(Pn,"MissingRefError",{enumerable:!0,get:function(){return jU.default}})});var gz=ke(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.formatNames=ko.fastFormats=ko.fullFormats=void 0;function _c(o,n){return{validate:o,compare:n}}ko.fullFormats={date:_c(pz,oC),time:_c(hz,sC),"date-time":_c(qU,fz),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:XU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:r4,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:ZU,int32:{type:"number",validate:t4},int64:{type:"number",validate:n4},float:{type:"number",validate:dz},double:{type:"number",validate:dz},password:!0,binary:!0};ko.fastFormats=ot(V({},ko.fullFormats),{date:_c(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,oC),time:_c(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,sC),"date-time":_c(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,fz),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});ko.formatNames=Object.keys(ko.fullFormats);function WU(o){return o%4===0&&(o%100!==0||o%400===0)}var UU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,KU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function pz(o){let n=UU.exec(o);if(!n)return!1;let e=+n[1],t=+n[2],i=+n[3];return t>=1&&t<=12&&i>=1&&i<=(t===2&&WU(e)?29:KU[t])}function oC(o,n){if(o&&n)return o>n?1:on?1:o=JU}function n4(o){return Number.isInteger(o)}function dz(){return!0}var i4=/[^\\]\\Z/;function r4(o){if(i4.test(o))return!1;try{return new RegExp(o),!0}catch{return!1}}});var mz=ke(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.formatLimitDefinition=void 0;var o4=nC(),go=wt(),Xs=go.operators,tf={formatMaximum:{okStr:"<=",ok:Xs.LTE,fail:Xs.GT},formatMinimum:{okStr:">=",ok:Xs.GTE,fail:Xs.LT},formatExclusiveMaximum:{okStr:"<",ok:Xs.LT,fail:Xs.GTE},formatExclusiveMinimum:{okStr:">",ok:Xs.GT,fail:Xs.LTE}},s4={message:({keyword:o,schemaCode:n})=>go.str`should be ${tf[o].okStr} ${n}`,params:({keyword:o,schemaCode:n})=>go._`{comparison: ${tf[o].okStr}, limit: ${n}}`};Sc.formatLimitDefinition={keyword:Object.keys(tf),type:"string",schemaType:"string",$data:!0,error:s4,code(o){let{gen:n,data:e,schemaCode:t,keyword:i,it:r}=o,{opts:s,self:a}=r;if(!s.validateFormats)return;let l=new o4.KeywordCxt(r,a.RULES.all.format.definition,"format");l.$data?c():u();function c(){let p=n.scopeValue("formats",{ref:a.formats,code:s.code.formats}),g=n.const("fmt",go._`${p}[${l.schemaCode}]`);o.fail$data(go.or(go._`typeof ${g} != "object"`,go._`${g} instanceof RegExp`,go._`typeof ${g}.compare != "function"`,d(g)))}function u(){let p=l.schema,g=a.formats[p];if(!g||g===!0)return;if(typeof g!="object"||g instanceof RegExp||typeof g.compare!="function")throw new Error(`"${i}": format "${p}" does not define "compare" function`);let v=n.scopeValue("formats",{key:p,ref:g,code:s.code.formats?go._`${s.code.formats}${go.getProperty(p)}`:void 0});o.fail$data(d(v))}function d(p){return go._`${p}.compare(${e}, ${t}) ${tf[i].fail} 0`}},dependencies:["format"]};var a4=o=>(o.addKeyword(Sc.formatLimitDefinition),o);Sc.default=a4});var _z=ke((td,Cz)=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var wc=gz(),l4=mz(),aC=wt(),vz=new aC.Name("fullFormats"),c4=new aC.Name("fastFormats"),lC=(o,n={keywords:!0})=>{if(Array.isArray(n))return yz(o,n,wc.fullFormats,vz),o;let[e,t]=n.mode==="fast"?[wc.fastFormats,c4]:[wc.fullFormats,vz],i=n.formats||wc.formatNames;return yz(o,i,e,t),n.keywords&&l4.default(o),o};lC.get=(o,n="full")=>{let t=(n==="fast"?wc.fastFormats:wc.fullFormats)[o];if(!t)throw new Error(`Unknown format "${o}"`);return t};function yz(o,n,e,t){var i,r;(i=(r=o.opts.code).formats)!==null&&i!==void 0||(r.formats=aC._`require("ajv-formats/dist/formats").${t}`);for(let s of n)o.addFormat(s,e[s])}Cz.exports=td=lC;Object.defineProperty(td,"__esModule",{value:!0});td.default=lC});var fr=(()=>{let n=class n{};n.SLOW="0.3s",n.BASE="0.2s",n.FAST="0.1s";let o=n;return o})(),Ci=(()=>{let n=class n{};n.EASE_BASE_OUT="cubic-bezier(0.7, 0.3, 0.1, 1)",n.EASE_BASE_IN="cubic-bezier(0.9, 0, 0.3, 0.7)",n.EASE_OUT="cubic-bezier(0.215, 0.61, 0.355, 1)",n.EASE_IN="cubic-bezier(0.55, 0.055, 0.675, 0.19)",n.EASE_IN_OUT="cubic-bezier(0.645, 0.045, 0.355, 1)",n.EASE_OUT_BACK="cubic-bezier(0.12, 0.4, 0.29, 1.46)",n.EASE_IN_BACK="cubic-bezier(0.71, -0.46, 0.88, 0.6)",n.EASE_IN_OUT_BACK="cubic-bezier(0.71, -0.46, 0.29, 1.46)",n.EASE_OUT_CIRC="cubic-bezier(0.08, 0.82, 0.17, 1)",n.EASE_IN_CIRC="cubic-bezier(0.6, 0.04, 0.98, 0.34)",n.EASE_IN_OUT_CIRC="cubic-bezier(0.78, 0.14, 0.15, 0.86)",n.EASE_OUT_QUINT="cubic-bezier(0.23, 1, 0.32, 1)",n.EASE_IN_QUINT="cubic-bezier(0.755, 0.05, 0.855, 0.06)",n.EASE_IN_OUT_QUINT="cubic-bezier(0.86, 0, 0.07, 1)";let o=n;return o})(),_w=Ar("collapseMotion",[pr("expanded",pt({height:"*"})),pr("collapsed",pt({height:0,overflow:"hidden"})),pr("hidden",pt({height:0,overflow:"hidden",borderTopWidth:"0"})),Sn("expanded => collapsed",mn(`150ms ${Ci.EASE_IN_OUT}`)),Sn("expanded => hidden",mn(`150ms ${Ci.EASE_IN_OUT}`)),Sn("collapsed => expanded",mn(`150ms ${Ci.EASE_IN_OUT}`)),Sn("hidden => expanded",mn(`150ms ${Ci.EASE_IN_OUT}`))]),Sw=Ar("treeCollapseMotion",[Sn("* => *",[rm("nz-tree-node:leave,nz-tree-builtin-node:leave",[pt({overflow:"hidden"}),om(0,[mn(`150ms ${Ci.EASE_IN_OUT}`,pt({height:0,opacity:0,"padding-bottom":0}))])],{optional:!0}),rm("nz-tree-node:enter,nz-tree-builtin-node:enter",[pt({overflow:"hidden",height:0,opacity:0,"padding-bottom":0}),om(0,[mn(`150ms ${Ci.EASE_IN_OUT}`,pt({overflow:"hidden",height:"*",opacity:"*","padding-bottom":"*"}))])],{optional:!0})])]),ww=Ar("fadeMotion",[Sn(":enter",[pt({opacity:0}),mn(`${fr.BASE}`,pt({opacity:1}))]),Sn(":leave",[pt({opacity:1}),mn(`${fr.BASE}`,pt({opacity:0}))])]),jl=Ar("helpMotion",[Sn(":enter",[pt({opacity:0,transform:"translateY(-5px)"}),mn(`${fr.SLOW} ${Ci.EASE_IN_OUT}`,pt({opacity:1,transform:"translateY(0)"}))]),Sn(":leave",[pt({opacity:1,transform:"translateY(0)"}),mn(`${fr.SLOW} ${Ci.EASE_IN_OUT}`,pt({opacity:0,transform:"translateY(-5px)"}))])]),bw=Ar("moveUpMotion",[Sn("* => enter",[pt({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}),mn(`${fr.BASE}`,pt({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}))]),Sn("* => leave",[pt({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}),mn(`${fr.BASE}`,pt({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}))])]),Tw=Ar("notificationMotion",[pr("enterRight",pt({opacity:1,transform:"translateX(0)"})),Sn("* => enterRight",[pt({opacity:0,transform:"translateX(5%)"}),mn("100ms linear")]),pr("enterLeft",pt({opacity:1,transform:"translateX(0)"})),Sn("* => enterLeft",[pt({opacity:0,transform:"translateX(-5%)"}),mn("100ms linear")]),pr("enterTop",pt({opacity:1,transform:"translateY(0)"})),Sn("* => enterTop",[pt({opacity:0,transform:"translateY(-5%)"}),mn("100ms linear")]),pr("enterBottom",pt({opacity:1,transform:"translateY(0)"})),Sn("* => enterBottom",[pt({opacity:0,transform:"translateY(5%)"}),mn("100ms linear")]),pr("leave",pt({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"})),Sn("* => leave",[pt({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),mn("100ms linear")])]),GI=`${fr.BASE} ${Ci.EASE_OUT_QUINT}`,HI=`${fr.BASE} ${Ci.EASE_IN_QUINT}`,Mo=Ar("slideMotion",[pr("void",pt({opacity:0,transform:"scaleY(0.8)"})),pr("enter",pt({opacity:1,transform:"scaleY(1)"})),Sn("void => *",[mn(GI)]),Sn("* => void",[mn(HI)])]),Ew=Ar("slideAlertMotion",[Sn(":leave",[pt({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),mn(`${fr.SLOW} ${Ci.EASE_IN_OUT_CIRC}`,pt({opacity:0,transform:"scaleY(0)",transformOrigin:"0% 0%"}))])]),Is=Ar("zoomBigMotion",[Sn("void => active",[pt({opacity:0,transform:"scale(0.8)"}),mn(`${fr.BASE} ${Ci.EASE_OUT_CIRC}`,pt({opacity:1,transform:"scale(1)"}))]),Sn("active => void",[pt({opacity:1,transform:"scale(1)"}),mn(`${fr.BASE} ${Ci.EASE_IN_OUT_CIRC}`,pt({opacity:0,transform:"scale(0.8)"}))])]),dm=Ar("zoomBadgeMotion",[Sn(":enter",[pt({opacity:0,transform:"scale(0) translate(50%, -50%)"}),mn(`${fr.SLOW} ${Ci.EASE_OUT_BACK}`,pt({opacity:1,transform:"scale(1) translate(50%, -50%)"}))]),Sn(":leave",[pt({opacity:1,transform:"scale(1) translate(50%, -50%)"}),mn(`${fr.SLOW} ${Ci.EASE_IN_BACK}`,pt({opacity:0,transform:"scale(0) translate(50%, -50%)"}))])]),Xre=Ar("thumbMotion",[pr("from",pt({transform:"translateX({{ transform }}px)",width:"{{ width }}px"}),{params:{transform:0,width:0}}),pr("to",pt({transform:"translateX({{ transform }}px)",width:"{{ width }}px"}),{params:{transform:100,width:0}}),Sn("from => to",mn(`300ms ${Ci.EASE_IN_OUT}`))]);var pm=()=>{},uu=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.rendererFactory2=i,this.resizeSource$=new J,this.listeners=0,this.disposeHandle=pm,this.handler=()=>{this.ngZone.run(()=>{this.resizeSource$.next()})},this.renderer=this.rendererFactory2.createRenderer(null,null)}ngOnDestroy(){this.handler=pm}subscribe(){return this.registerListener(),this.resizeSource$.pipe(zs(16),El(()=>this.unregisterListener()))}unsubscribe(){this.unregisterListener()}registerListener(){this.listeners===0&&this.ngZone.runOutsideAngular(()=>{this.disposeHandle=this.renderer.listen("window","resize",this.handler)}),this.listeners+=1}unregisterListener(){this.listeners-=1,this.listeners===0&&(this.disposeHandle(),this.disposeHandle=pm)}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(ES))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),$I=new Map,Dp=(()=>{let n=class n{constructor(){this._singletonRegistry=new Map}get singletonRegistry(){return KS.isTestMode?$I:this._singletonRegistry}registerSingletonWithKey(t,i){let r=this.singletonRegistry.has(t),s=r?this.singletonRegistry.get(t):this.withNewTarget(i);r||this.singletonRegistry.set(t,s)}unregisterSingletonWithKey(t){this.singletonRegistry.has(t)&&this.singletonRegistry.delete(t)}getSingletonWithKey(t){return this.singletonRegistry.has(t)?this.singletonRegistry.get(t).target:null}withNewTarget(t){return{target:t}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();function jI(o,n,e,t){let i=e-n,r=o/(t/2);return r<1?i/2*r*r*r+n:i/2*((r-=2)*r*r+2)+n}var xw=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.doc=i}setScrollTop(t,i=0){t===window?(this.doc.body.scrollTop=i,this.doc.documentElement.scrollTop=i):t.scrollTop=i}getOffset(t){let i={top:0,left:0};if(!t||!t.getClientRects().length)return i;let r=t.getBoundingClientRect();if(r.width||r.height){let s=t.ownerDocument.documentElement;i.top=r.top-s.clientTop,i.left=r.left-s.clientLeft}else i.top=r.top,i.left=r.left;return i}getScroll(t,i=!0){if(typeof window>"u")return 0;let r=i?"scrollTop":"scrollLeft",s=0;return this.isWindow(t)?s=t[i?"pageYOffset":"pageXOffset"]:t instanceof Document?s=t.documentElement[r]:t&&(s=t[r]),t&&!this.isWindow(t)&&typeof s!="number"&&(s=(t.ownerDocument||t).documentElement[r]),s}isWindow(t){return t!=null&&t===t.window}scrollTo(t,i=0,r={}){let s=t||window,a=this.getScroll(s),l=Date.now(),{easing:c,callback:u,duration:d=450}=r,p=()=>{let v=Date.now()-l,y=(c||jI)(v>d?d:v,a,i,d);this.isWindow(s)?s.scrollTo(window.pageXOffset,y):s instanceof HTMLDocument||s.constructor.name==="HTMLDocument"?s.documentElement.scrollTop=y:s.scrollTop=y,vto(p))}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(gi))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),Rp=function(o){return o.xxl="xxl",o.xl="xl",o.lg="lg",o.md="md",o.sm="sm",o.xs="xs",o}(Rp||{}),xa={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"};var Ip=(()=>{let n=class n{constructor(t,i){this.resizeService=t,this.mediaMatcher=i,this.destroy$=new J,this.resizeService.subscribe().pipe(F(this.destroy$)).subscribe(()=>{})}ngOnDestroy(){this.destroy$.next()}subscribe(t,i){if(i){let r=()=>this.matchMedia(t,!0);return this.resizeService.subscribe().pipe(We(r),Ot(r()),Bt((s,a)=>s[0]===a[0]),We(s=>s[1]))}else{let r=()=>this.matchMedia(t);return this.resizeService.subscribe().pipe(We(r),Ot(r()),Bt())}}matchMedia(t,i){let r=Rp.md,s={};return Object.keys(t).map(a=>{let l=a,c=this.mediaMatcher.matchMedia(xa[l]).matches;s[a]=c,c&&(r=l)}),i?[r,s]:r}};n.\u0275fac=function(i){return new(i||n)(nt(uu),nt(yp))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),Pt=(()=>{let n=class n extends J{ngOnDestroy(){this.next(),this.complete()}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();function WI(o,n){o&1&&R(0,"span",10)}function UI(o,n){o&1&&R(0,"span",11)}function KI(o,n){o&1&&R(0,"span",12)}function qI(o,n){o&1&&R(0,"span",13)}function YI(o,n){o&1&&R(0,"span",14)}function QI(o,n){if(o&1&&(H(0),R(1,"span",15),B()),o&2){let e=m();f(),h("innerHTML",e.instance.content,Dt)}}function XI(o,n){if(o&1){let e=Q();C(0,"nz-message",2),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)}}var ZI=0,du=class{constructor(n,e,t){this.nzSingletonService=n,this.overlay=e,this.injector=t}remove(n){this.container&&(n?this.container.remove(n):this.container.removeAll())}getInstanceId(){return`${this.componentPrefix}-${ZI++}`}withContainer(n){let e=this.nzSingletonService.getSingletonWithKey(this.componentPrefix);if(e)return e;let t=this.overlay.create({hasBackdrop:!1,scrollStrategy:this.overlay.scrollStrategies.noop(),positionStrategy:this.overlay.position().global()}),i=new kl(n,null,this.injector),r=t.attach(i),s=t.hostElement;return s.style.zIndex="1010",e||(this.container=e=r.instance,this.nzSingletonService.registerSingletonWithKey(this.componentPrefix,e),this.container.afterAllInstancesRemoved.subscribe(()=>{this.container=void 0,this.nzSingletonService.unregisterSingletonWithKey(this.componentPrefix),t.dispose()})),e}},hm=(()=>{let n=class n{constructor(t,i){this.cdr=t,this.nzConfigService=i,this.instances=[],this._afterAllInstancesRemoved=new J,this.afterAllInstancesRemoved=this._afterAllInstancesRemoved.asObservable(),this.destroy$=new J,this.updateConfig()}ngOnInit(){this.subscribeConfigChange()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}create(t){let i=this.onCreate(t);return this.instances.length>=this.config.nzMaxStack&&(this.instances=this.instances.slice(1)),this.instances=[...this.instances,i],this.readyInstances(),i}remove(t,i=!1){this.instances.map((r,s)=>({index:s,instance:r})).filter(({instance:r})=>r.messageId===t).forEach(({index:r,instance:s})=>{this.instances.splice(r,1),this.instances=[...this.instances],this.onRemove(s,i),this.readyInstances()}),this.instances.length||this.onAllInstancesRemoved()}removeAll(){this.instances.forEach(t=>this.onRemove(t,!1)),this.instances=[],this.readyInstances(),this.onAllInstancesRemoved()}onCreate(t){return t.options=this.mergeOptions(t.options),t.onClose=new J,t}onRemove(t,i){t.onClose.next(i),t.onClose.complete()}onAllInstancesRemoved(){this._afterAllInstancesRemoved.next(),this._afterAllInstancesRemoved.complete()}readyInstances(){this.cdr.detectChanges()}mergeOptions(t){let{nzDuration:i,nzAnimate:r,nzPauseOnHover:s}=this.config;return V({nzDuration:i,nzAnimate:r,nzPauseOnHover:s},t)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(st))},n.\u0275dir=Se({type:n});let o=n;return o})(),fm=(()=>{let n=class n{constructor(t){this.cdr=t,this.destroyed=new O,this.animationStateChanged=new J,this.userAction=!1,this.eraseTimer=null}ngOnInit(){this.options=this.instance.options,this.options.nzAnimate&&(this.instance.state="enter",this.animationStateChanged.pipe(Qe(t=>t.phaseName==="done"&&t.toState==="leave"),Zr(1)).subscribe(()=>{clearTimeout(this.closeTimer),this.destroyed.next({id:this.instance.messageId,userAction:this.userAction})})),this.autoClose=this.options.nzDuration>0,this.autoClose&&(this.initErase(),this.startEraseTimeout())}ngOnDestroy(){this.autoClose&&this.clearEraseTimeout(),this.animationStateChanged.complete()}onEnter(){this.autoClose&&this.options.nzPauseOnHover&&(this.clearEraseTimeout(),this.updateTTL())}onLeave(){this.autoClose&&this.options.nzPauseOnHover&&this.startEraseTimeout()}destroy(t=!1){this.userAction=t,this.options.nzAnimate?(this.instance.state="leave",this.cdr.detectChanges(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.destroyed.next({id:this.instance.messageId,userAction:t})},200)):this.destroyed.next({id:this.instance.messageId,userAction:t})}initErase(){this.eraseTTL=this.options.nzDuration,this.eraseTimingStart=Date.now()}updateTTL(){this.autoClose&&(this.eraseTTL-=Date.now()-this.eraseTimingStart)}startEraseTimeout(){this.eraseTTL>0?(this.clearEraseTimeout(),this.eraseTimer=setTimeout(()=>this.destroy(),this.eraseTTL),this.eraseTimingStart=Date.now()):this.destroy()}clearEraseTimeout(){this.eraseTimer!==null&&(clearTimeout(this.eraseTimer),this.eraseTimer=null)}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275dir=Se({type:n});let o=n;return o})(),zw=(()=>{let n=class n extends fm{constructor(t){super(t),this.destroyed=new O}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-message"]],inputs:{instance:"instance"},outputs:{destroyed:"destroyed"},exportAs:["nzMessage"],standalone:!0,features:[Xe,K],decls:10,vars:9,consts:[[1,"ant-message-notice",3,"mouseenter","mouseleave"],[1,"ant-message-notice-content"],[1,"ant-message-custom-content",3,"ngClass"],[3,"ngSwitch"],["nz-icon","","nzType","check-circle",4,"ngSwitchCase"],["nz-icon","","nzType","info-circle",4,"ngSwitchCase"],["nz-icon","","nzType","exclamation-circle",4,"ngSwitchCase"],["nz-icon","","nzType","close-circle",4,"ngSwitchCase"],["nz-icon","","nzType","loading",4,"ngSwitchCase"],[4,"nzStringTemplateOutlet"],["nz-icon","","nzType","check-circle"],["nz-icon","","nzType","info-circle"],["nz-icon","","nzType","exclamation-circle"],["nz-icon","","nzType","close-circle"],["nz-icon","","nzType","loading"],[3,"innerHTML"]],template:function(i,r){i&1&&(C(0,"div",0),A("@moveUpMotion.done",function(a){return r.animationStateChanged.next(a)})("mouseenter",function(){return r.onEnter()})("mouseleave",function(){return r.onLeave()}),C(1,"div",1)(2,"div",2),H(3,3),_(4,WI,1,0,"span",4)(5,UI,1,0,"span",5)(6,KI,1,0,"span",6)(7,qI,1,0,"span",7)(8,YI,1,0,"span",8),B(),_(9,QI,2,1,"ng-container",9),S()()()),i&2&&(h("@moveUpMotion",r.instance.state),f(2),h("ngClass","ant-message-"+r.instance.type),f(),h("ngSwitch",r.instance.type),f(),h("ngSwitchCase","success"),f(),h("ngSwitchCase","info"),f(),h("ngSwitchCase","warning"),f(),h("ngSwitchCase","error"),f(),h("ngSwitchCase","loading"),f(),h("nzStringTemplateOutlet",r.instance.content))},dependencies:[St,jn,Wn,Ge,Fe,Ye,Ue],encapsulation:2,data:{animation:[bw]},changeDetection:0});let o=n;return o})(),Pp="message",JI={nzAnimate:!0,nzDuration:3e3,nzMaxStack:7,nzPauseOnHover:!0,nzTop:24,nzDirection:"ltr"},Ow=(()=>{let n=class n extends hm{constructor(t,i){super(t,i),this.dir="ltr";let r=this.nzConfigService.getConfigForComponent(Pp);this.dir=r?.nzDirection||"ltr"}subscribeConfigChange(){this.nzConfigService.getConfigChangeEventForComponent(Pp).pipe(F(this.destroy$)).subscribe(()=>{this.updateConfig();let t=this.nzConfigService.getConfigForComponent(Pp);if(t){let{nzDirection:i}=t;this.dir=i||this.dir}})}updateConfig(){this.config=V(V(V({},JI),this.config),this.nzConfigService.getConfigForComponent(Pp)),this.top=Ea(this.config.nzTop),this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(st))},n.\u0275cmp=j({type:n,selectors:[["nz-message-container"]],exportAs:["nzMessageContainer"],standalone:!0,features:[Xe,K],decls:2,vars:5,consts:[[1,"ant-message"],[3,"instance","destroyed",4,"ngFor","ngForOf"],[3,"instance","destroyed"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,XI,1,1,"nz-message",1),S()),i&2&&(Re("top",r.top),k("ant-message-rtl",r.dir==="rtl"),f(),h("ngForOf",r.instances))},dependencies:[zw,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),Soe=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Ow,zw]});let o=n;return o})(),woe=(()=>{let n=class n extends du{constructor(t,i,r){super(t,i,r),this.componentPrefix="message-"}success(t,i){return this.createInstance({type:"success",content:t},i)}error(t,i){return this.createInstance({type:"error",content:t},i)}info(t,i){return this.createInstance({type:"info",content:t},i)}warning(t,i){return this.createInstance({type:"warning",content:t},i)}loading(t,i){return this.createInstance({type:"loading",content:t},i)}create(t,i,r){return this.createInstance({type:t,content:i},r)}createInstance(t,i){return this.container=this.withContainer(Ow),this.container.create(ot(V({},t),{createdAt:new Date,messageId:this.getInstanceId(),options:i}))}};n.\u0275fac=function(i){return new(i||n)(nt(Dp),nt(ss),nt($n))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();function eP(o,n){o&1&&R(0,"span",17)}function tP(o,n){o&1&&R(0,"span",18)}function nP(o,n){o&1&&R(0,"span",19)}function iP(o,n){o&1&&R(0,"span",20)}function rP(o,n){if(o&1&&(H(0),R(1,"div",21),B()),o&2){let e=m(2);f(),h("innerHTML",e.instance.title,Dt)}}function oP(o,n){if(o&1&&(H(0),R(1,"div",21),B()),o&2){let e=m(2);f(),h("innerHTML",e.instance.content,Dt)}}function sP(o,n){}var aP=o=>({$implicit:o});function lP(o,n){if(o&1&&(C(0,"span",22),_(1,sP,0,0,"ng-template",23),S()),o&2){let e=n.ngIf,t=m(2);f(),h("ngTemplateOutlet",e)("ngTemplateOutletContext",yt(2,aP,t))}}function cP(o,n){if(o&1&&(C(0,"div",7)(1,"div",7)(2,"div"),H(3,8),_(4,eP,1,0,"span",9)(5,tP,1,0,"span",10)(6,nP,1,0,"span",11)(7,iP,1,0,"span",12),B(),C(8,"div",13),_(9,rP,2,1,"ng-container",14),S(),C(10,"div",15),_(11,oP,2,1,"ng-container",14),S(),_(12,lP,2,4,"span",16),S()()()),o&2){let e=m();f(2),k("ant-notification-notice-with-icon",e.instance.type!=="blank"),f(),h("ngSwitch",e.instance.type),f(),h("ngSwitchCase","success"),f(),h("ngSwitchCase","info"),f(),h("ngSwitchCase","warning"),f(),h("ngSwitchCase","error"),f(2),h("nzStringTemplateOutlet",e.instance.title),f(2),h("nzStringTemplateOutlet",e.instance.content),f(),h("ngIf",e.instance.options==null?null:e.instance.options.nzButton)}}function uP(o,n){}function dP(o,n){if(o&1&&(H(0),R(1,"span",24),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function pP(o,n){if(o&1&&(H(0),_(1,dP,2,1,"ng-container",14),B()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.instance.options==null?null:e.instance.options.nzCloseIcon)}}function hP(o,n){o&1&&R(0,"span",25)}var fP=(o,n)=>({$implicit:o,data:n});function gP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","topLeft")}}function mP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","topRight")}}function vP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","bottomLeft")}}function yP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","bottomRight")}}function CP(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","top")}}function _P(o,n){if(o&1){let e=Q();C(0,"nz-notification",7),A("destroyed",function(i){I(e);let r=m();return P(r.remove(i.id,i.userAction))}),S()}if(o&2){let e=n.$implicit;h("instance",e)("placement","bottom")}}var Dw=(()=>{let n=class n extends fm{constructor(t){super(t),this.destroyed=new O}ngOnDestroy(){super.ngOnDestroy(),this.instance.onClick.complete()}onClick(t){this.instance.onClick.next(t)}close(){this.destroy(!0)}get state(){if(this.instance.state==="enter")switch(this.placement){case"topLeft":case"bottomLeft":return"enterLeft";case"topRight":case"bottomRight":return"enterRight";case"top":return"enterTop";case"bottom":return"enterBottom";default:return"enterRight"}else return this.instance.state}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-notification"]],inputs:{instance:"instance",index:"index",placement:"placement"},outputs:{destroyed:"destroyed"},exportAs:["nzNotification"],standalone:!0,features:[Xe,K],decls:8,vars:12,consts:[[1,"ant-notification-notice","ant-notification-notice-closable",3,"ngStyle","ngClass","click","mouseenter","mouseleave"],["class","ant-notification-notice-content",4,"ngIf"],[3,"ngIf","ngTemplateOutlet","ngTemplateOutletContext"],["tabindex","0",1,"ant-notification-notice-close",3,"click"],[1,"ant-notification-notice-close-x"],[4,"ngIf","ngIfElse"],["iconTpl",""],[1,"ant-notification-notice-content"],[3,"ngSwitch"],["nz-icon","","nzType","check-circle","class","ant-notification-notice-icon ant-notification-notice-icon-success",4,"ngSwitchCase"],["nz-icon","","nzType","info-circle","class","ant-notification-notice-icon ant-notification-notice-icon-info",4,"ngSwitchCase"],["nz-icon","","nzType","exclamation-circle","class","ant-notification-notice-icon ant-notification-notice-icon-warning",4,"ngSwitchCase"],["nz-icon","","nzType","close-circle","class","ant-notification-notice-icon ant-notification-notice-icon-error",4,"ngSwitchCase"],[1,"ant-notification-notice-message"],[4,"nzStringTemplateOutlet"],[1,"ant-notification-notice-description"],["class","ant-notification-notice-btn",4,"ngIf"],["nz-icon","","nzType","check-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-success"],["nz-icon","","nzType","info-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-info"],["nz-icon","","nzType","exclamation-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-warning"],["nz-icon","","nzType","close-circle",1,"ant-notification-notice-icon","ant-notification-notice-icon-error"],[3,"innerHTML"],[1,"ant-notification-notice-btn"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-icon","",3,"nzType"],["nz-icon","","nzType","close",1,"ant-notification-close-icon"]],template:function(i,r){if(i&1&&(C(0,"div",0),A("@notificationMotion.done",function(a){return r.animationStateChanged.next(a)})("click",function(a){return r.onClick(a)})("mouseenter",function(){return r.onEnter()})("mouseleave",function(){return r.onLeave()}),_(1,cP,13,10,"div",1)(2,uP,0,0,"ng-template",2),C(3,"a",3),A("click",function(){return r.close()}),C(4,"span",4),_(5,pP,2,1,"ng-container",5)(6,hP,1,0,"ng-template",null,6,_e),S()()()),i&2){let s=te(7);h("ngStyle",(r.instance.options==null?null:r.instance.options.nzStyle)||null)("ngClass",(r.instance.options==null?null:r.instance.options.nzClass)||"")("@notificationMotion",r.state),f(),h("ngIf",!r.instance.template),f(),h("ngIf",r.instance.template)("ngTemplateOutlet",r.instance.template)("ngTemplateOutletContext",ri(9,fP,r,r.instance.options==null?null:r.instance.options.nzData)),f(3),h("ngIf",r.instance.options==null?null:r.instance.options.nzCloseIcon)("ngIfElse",s)}},dependencies:[Zt,St,we,jn,Wn,Ge,Fe,Ye,Ue,Be],encapsulation:2,data:{animation:[Tw]}});let o=n;return o})(),Mp="notification",SP={nzTop:"24px",nzBottom:"24px",nzPlacement:"topRight",nzDuration:4500,nzMaxStack:7,nzPauseOnHover:!0,nzAnimate:!0,nzDirection:"ltr"},Rw=(()=>{let n=class n extends hm{constructor(t,i){super(t,i),this.dir="ltr",this.instances=[],this.topLeftInstances=[],this.topRightInstances=[],this.bottomLeftInstances=[],this.bottomRightInstances=[],this.topInstances=[],this.bottomInstances=[];let r=this.nzConfigService.getConfigForComponent(Mp);this.dir=r?.nzDirection||"ltr"}create(t){let i=this.onCreate(t),r=i.options.nzKey,s=this.instances.find(a=>a.options.nzKey===t.options.nzKey);return r&&s?this.replaceNotification(s,i):(this.instances.length>=this.config.nzMaxStack&&(this.instances=this.instances.slice(1)),this.instances=[...this.instances,i]),this.readyInstances(),i}onCreate(t){return t.options=this.mergeOptions(t.options),t.onClose=new J,t.onClick=new J,t}subscribeConfigChange(){this.nzConfigService.getConfigChangeEventForComponent(Mp).pipe(F(this.destroy$)).subscribe(()=>{this.updateConfig();let t=this.nzConfigService.getConfigForComponent(Mp);if(t){let{nzDirection:i}=t;this.dir=i||this.dir}})}updateConfig(){this.config=V(V(V({},SP),this.config),this.nzConfigService.getConfigForComponent(Mp)),this.top=Ea(this.config.nzTop),this.bottom=Ea(this.config.nzBottom),this.cdr.markForCheck()}replaceNotification(t,i){t.title=i.title,t.content=i.content,t.template=i.template,t.type=i.type,t.options=i.options}readyInstances(){let t={topLeft:[],topRight:[],bottomLeft:[],bottomRight:[],top:[],bottom:[]};this.instances.forEach(i=>{switch(i.options.nzPlacement){case"topLeft":t.topLeft.push(i);break;case"topRight":t.topRight.push(i);break;case"bottomLeft":t.bottomLeft.push(i);break;case"bottomRight":t.bottomRight.push(i);break;case"top":t.top.push(i);break;case"bottom":t.bottom.push(i);break;default:t.topRight.push(i)}}),this.topLeftInstances=t.topLeft,this.topRightInstances=t.topRight,this.bottomLeftInstances=t.bottomLeft,this.bottomRightInstances=t.bottomRight,this.topInstances=t.top,this.bottomInstances=t.bottom,this.cdr.detectChanges()}mergeOptions(t){let{nzDuration:i,nzAnimate:r,nzPauseOnHover:s,nzPlacement:a}=this.config;return V({nzDuration:i,nzAnimate:r,nzPauseOnHover:s,nzPlacement:a},t)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(st))},n.\u0275cmp=j({type:n,selectors:[["nz-notification-container"]],exportAs:["nzNotificationContainer"],standalone:!0,features:[Xe,K],decls:12,vars:46,consts:[[1,"ant-notification","ant-notification-topLeft"],[3,"instance","placement","destroyed",4,"ngFor","ngForOf"],[1,"ant-notification","ant-notification-topRight"],[1,"ant-notification","ant-notification-bottomLeft"],[1,"ant-notification","ant-notification-bottomRight"],[1,"ant-notification","ant-notification-top"],[1,"ant-notification","ant-notification-bottom"],[3,"instance","placement","destroyed"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,gP,1,2,"nz-notification",1),S(),C(2,"div",2),_(3,mP,1,2,"nz-notification",1),S(),C(4,"div",3),_(5,vP,1,2,"nz-notification",1),S(),C(6,"div",4),_(7,yP,1,2,"nz-notification",1),S(),C(8,"div",5),_(9,CP,1,2,"nz-notification",1),S(),C(10,"div",6),_(11,_P,1,2,"nz-notification",1),S()),i&2&&(Re("top",r.top)("left","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.topLeftInstances),f(),Re("top",r.top)("right","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.topRightInstances),f(),Re("bottom",r.bottom)("left","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.bottomLeftInstances),f(),Re("bottom",r.bottom)("right","0px"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.bottomRightInstances),f(),Re("top",r.top)("left","50%")("transform","translateX(-50%)"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.topInstances),f(),Re("bottom",r.bottom)("left","50%")("transform","translateX(-50%)"),k("ant-notification-rtl",r.dir==="rtl"),f(),h("ngForOf",r.bottomInstances))},dependencies:[Dw,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),Fp=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Dw,Rw]});let o=n;return o})(),wP=0,Hoe=(()=>{let n=class n extends du{constructor(t,i,r){super(t,i,r),this.componentPrefix="notification-"}success(t,i,r){return this.create("success",t,i,r)}error(t,i,r){return this.create("error",t,i,r)}info(t,i,r){return this.create("info",t,i,r)}warning(t,i,r){return this.create("warning",t,i,r)}blank(t,i,r){return this.create("blank",t,i,r)}create(t,i,r,s){return this.createInstance({type:t,title:i,content:r},s)}template(t,i){return this.createInstance({template:t},i)}generateMessageId(){return`${this.componentPrefix}-${wP++}`}createInstance(t,i){return this.container=this.withContainer(Rw),this.container.create(ot(V({},t),{createdAt:new Date,messageId:i?.nzKey||this.generateMessageId(),options:i}))}};n.\u0275fac=function(i){return new(i||n)(nt(Dp),nt(ss),nt($n))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var kw=(()=>{let n=class n{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275dir=Se({type:n});let o=n;return o})(),Vw=(()=>{let n=class n extends kw{};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),zn=new hn("NgValueAccessor"),TP={provide:zn,useExisting:pn(()=>ym),multi:!0},ym=(()=>{let n=class n extends Vw{writeValue(t){this.setProperty("checked",t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&A("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},features:[Ve([TP]),Xe]});let o=n;return o})(),EP={provide:zn,useExisting:pn(()=>Ii),multi:!0};function xP(){let o=qg()?qg().getUserAgent():"";return/android (\d+)/.test(o.toLowerCase())}var Cm=new hn("CompositionEventMode"),Ii=(()=>{let n=class n extends kw{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!xP())}writeValue(t){let i=t??"";this.setProperty("value",i)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de),w(Cm,8))},n.\u0275dir=Se({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&A("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},features:[Ve([EP]),Xe]});let o=n;return o})();function Ps(o){return o==null||(typeof o=="string"||Array.isArray(o))&&o.length===0}function Gw(o){return o!=null&&typeof o.length=="number"}var za=new hn("NgValidators"),vu=new hn("NgAsyncValidators"),zP=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Np=class{static min(n){return OP(n)}static max(n){return DP(n)}static required(n){return Hw(n)}static requiredTrue(n){return RP(n)}static email(n){return IP(n)}static minLength(n){return PP(n)}static maxLength(n){return Bw(n)}static pattern(n){return MP(n)}static nullValidator(n){return Lp(n)}static compose(n){return qw(n)}static composeAsync(n){return Yw(n)}};function OP(o){return n=>{if(Ps(n.value)||Ps(o))return null;let e=parseFloat(n.value);return!isNaN(e)&&e{if(Ps(n.value)||Ps(o))return null;let e=parseFloat(n.value);return!isNaN(e)&&e>o?{max:{max:o,actual:n.value}}:null}}function Hw(o){return Ps(o.value)?{required:!0}:null}function RP(o){return o.value===!0?null:{required:!0}}function IP(o){return Ps(o.value)||zP.test(o.value)?null:{email:!0}}function PP(o){return n=>Ps(n.value)||!Gw(n.value)?null:n.value.lengthGw(n.value)&&n.value.length>o?{maxlength:{requiredLength:o,actualLength:n.value.length}}:null}function MP(o){if(!o)return Lp;let n,e;return typeof o=="string"?(e="",o.charAt(0)!=="^"&&(e+="^"),e+=o,o.charAt(o.length-1)!=="$"&&(e+="$"),n=new RegExp(e)):(e=o.toString(),n=o),t=>{if(Ps(t.value))return null;let i=t.value;return n.test(i)?null:{pattern:{requiredPattern:e,actualValue:i}}}}function Lp(o){return null}function $w(o){return o!=null}function jw(o){return zS(o)?dS(o):o}function Ww(o){let n={};return o.forEach(e=>{n=e!=null?V(V({},n),e):n}),Object.keys(n).length===0?null:n}function Uw(o,n){return n.map(e=>e(o))}function FP(o){return!o.validate}function Kw(o){return o.map(n=>FP(n)?n:e=>n.validate(e))}function qw(o){if(!o)return null;let n=o.filter($w);return n.length==0?null:function(e){return Ww(Uw(e,n))}}function _m(o){return o!=null?qw(Kw(o)):null}function Yw(o){if(!o)return null;let n=o.filter($w);return n.length==0?null:function(e){let t=Uw(e,n).map(jw);return gS(t).pipe(We(Ww))}}function Sm(o){return o!=null?Yw(Kw(o)):null}function Iw(o,n){return o===null?[n]:Array.isArray(o)?[...o,n]:[o,n]}function Qw(o){return o._rawValidators}function Xw(o){return o._rawAsyncValidators}function gm(o){return o?Array.isArray(o)?o:[o]:[]}function kp(o,n){return Array.isArray(o)?o.includes(n):o===n}function Pw(o,n){let e=gm(n);return gm(o).forEach(i=>{kp(e,i)||e.push(i)}),e}function Mw(o,n){return gm(n).filter(e=>!kp(o,e))}var Vp=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=_m(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Sm(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,e){return this.control?this.control.hasError(n,e):!1}getError(n,e){return this.control?this.control.getError(n,e):null}},as=class extends Vp{get formDirective(){return null}get path(){return null}},Ri=class extends Vp{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Gp=class{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},AP={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},ose=ot(V({},AP),{"[class.ng-submitted]":"isSubmitted"}),Kt=(()=>{let n=class n extends Gp{constructor(t){super(t)}};n.\u0275fac=function(i){return new(i||n)(w(Ri,2))},n.\u0275dir=Se({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&k("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[Xe]});let o=n;return o})(),Zw=(()=>{let n=class n extends Gp{constructor(t){super(t)}};n.\u0275fac=function(i){return new(i||n)(w(as,10))},n.\u0275dir=Se({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&k("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[Xe]});let o=n;return o})();var pu="VALID",Ap="INVALID",Wl="PENDING",hu="DISABLED";function wm(o){return(jp(o)?o.validators:o)||null}function NP(o){return Array.isArray(o)?_m(o):o||null}function bm(o,n){return(jp(n)?n.asyncValidators:o)||null}function LP(o){return Array.isArray(o)?Sm(o):o||null}function jp(o){return o!=null&&!Array.isArray(o)&&typeof o=="object"}function Jw(o,n,e){let t=o.controls;if(!(n?Object.keys(t):t).length)throw new cp(1e3,"");if(!t[e])throw new cp(1001,"")}function eb(o,n,e){o._forEachChild((t,i)=>{if(e[i]===void 0)throw new cp(1002,"")})}var Ms=class{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===pu}get invalid(){return this.status===Ap}get pending(){return this.status==Wl}get disabled(){return this.status===hu}get enabled(){return this.status!==hu}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Pw(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Pw(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Mw(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Mw(n,this._rawAsyncValidators))}hasValidator(n){return kp(this._rawValidators,n)}hasAsyncValidator(n){return kp(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Wl,n.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=hu,this.errors=null,this._forEachChild(t=>{t.disable(ot(V({},n),{onlySelf:!0}))}),this._updateValue(),n.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ot(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=pu,this._forEachChild(t=>{t.enable(ot(V({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(ot(V({},n),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pu||this.status===Wl)&&this._runAsyncValidator(n.emitEvent)),n.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?hu:pu}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Wl,this._hasOwnPendingAsyncValidator=!0;let e=jw(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(e.emitEvent!==!1)}get(n){let e=n;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,i)=>t&&t._find(i),this)}getError(n,e){let t=e?this.get(e):this;return t&&t.errors?t.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new O,this.statusChanges=new O}_calculateStatus(){return this._allControlsDisabled()?hu:this.errors?Ap:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Wl)?Wl:this._anyControlsHaveStatus(Ap)?Ap:pu}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){jp(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){let e=this._parent&&this._parent.dirty;return!n&&!!e&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=NP(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=LP(this._rawAsyncValidators)}},Ul=class extends Ms{constructor(n,e,t){super(wm(e),bm(t,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,t={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){eb(this,!0,n),Object.keys(n).forEach(t=>{Jw(this,!0,t),this.controls[t].setValue(n[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(Object.keys(n).forEach(t=>{let i=this.controls[t];i&&i.patchValue(n[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((t,i)=>{t.reset(n?n[i]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,t)=>(n[t]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&n(t,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&n(t))return!0;return!1}_reduceValue(){let n={};return this._reduceChildren(n,(e,t,i)=>((t.enabled||this.disabled)&&(e[i]=t.value),e))}_reduceChildren(n,e){let t=n;return this._forEachChild((i,r)=>{t=e(t,i,r)}),t}_allControlsDisabled(){for(let n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}};var mm=class extends Ul{};var Kl=new hn("CallSetDisabledState",{providedIn:"root",factory:()=>Wp}),Wp="always";function tb(o,n){return[...n.path,o]}function mu(o,n,e=Wp){Tm(o,n),n.valueAccessor.writeValue(o.value),(o.disabled||e==="always")&&n.valueAccessor.setDisabledState?.(o.disabled),VP(o,n),HP(o,n),GP(o,n),kP(o,n)}function Hp(o,n,e=!0){let t=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(t),n.valueAccessor.registerOnTouched(t)),$p(o,n),o&&(n._invokeOnDestroyCallbacks(),o._registerOnCollectionChange(()=>{}))}function Bp(o,n){o.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function kP(o,n){if(n.valueAccessor.setDisabledState){let e=t=>{n.valueAccessor.setDisabledState(t)};o.registerOnDisabledChange(e),n._registerOnDestroy(()=>{o._unregisterOnDisabledChange(e)})}}function Tm(o,n){let e=Qw(o);n.validator!==null?o.setValidators(Iw(e,n.validator)):typeof e=="function"&&o.setValidators([e]);let t=Xw(o);n.asyncValidator!==null?o.setAsyncValidators(Iw(t,n.asyncValidator)):typeof t=="function"&&o.setAsyncValidators([t]);let i=()=>o.updateValueAndValidity();Bp(n._rawValidators,i),Bp(n._rawAsyncValidators,i)}function $p(o,n){let e=!1;if(o!==null){if(n.validator!==null){let i=Qw(o);if(Array.isArray(i)&&i.length>0){let r=i.filter(s=>s!==n.validator);r.length!==i.length&&(e=!0,o.setValidators(r))}}if(n.asyncValidator!==null){let i=Xw(o);if(Array.isArray(i)&&i.length>0){let r=i.filter(s=>s!==n.asyncValidator);r.length!==i.length&&(e=!0,o.setAsyncValidators(r))}}}let t=()=>{};return Bp(n._rawValidators,t),Bp(n._rawAsyncValidators,t),e}function VP(o,n){n.valueAccessor.registerOnChange(e=>{o._pendingValue=e,o._pendingChange=!0,o._pendingDirty=!0,o.updateOn==="change"&&nb(o,n)})}function GP(o,n){n.valueAccessor.registerOnTouched(()=>{o._pendingTouched=!0,o.updateOn==="blur"&&o._pendingChange&&nb(o,n),o.updateOn!=="submit"&&o.markAsTouched()})}function nb(o,n){o._pendingDirty&&o.markAsDirty(),o.setValue(o._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(o._pendingValue),o._pendingChange=!1}function HP(o,n){let e=(t,i)=>{n.valueAccessor.writeValue(t),i&&n.viewToModelUpdate(t)};o.registerOnChange(e),n._registerOnDestroy(()=>{o._unregisterOnChange(e)})}function ib(o,n){o==null,Tm(o,n)}function BP(o,n){return $p(o,n)}function Em(o,n){if(!o.hasOwnProperty("model"))return!1;let e=o.model;return e.isFirstChange()?!0:!Object.is(n,e.currentValue)}function $P(o){return Object.getPrototypeOf(o.constructor)===Vw}function rb(o,n){o._syncPendingControls(),n.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function xm(o,n){if(!n)return null;Array.isArray(n);let e,t,i;return n.forEach(r=>{r.constructor===Ii?e=r:$P(r)?t=r:i=r}),i||t||e||null}function jP(o,n){let e=o.indexOf(n);e>-1&&o.splice(e,1)}var WP={provide:as,useExisting:pn(()=>zm)},fu=Promise.resolve(),zm=(()=>{let n=class n extends as{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new O,this.form=new Ul({},_m(t),Sm(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){fu.then(()=>{let i=this._findContainer(t.path);t.control=i.registerControl(t.name,t.control),mu(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){fu.then(()=>{let i=this._findContainer(t.path);i&&i.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){fu.then(()=>{let i=this._findContainer(t.path),r=new Ul({});ib(r,t),i.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){fu.then(()=>{let i=this._findContainer(t.path);i&&i.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,i){fu.then(()=>{this.form.get(t.path).setValue(i)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,rb(this.form,this._directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}};n.\u0275fac=function(i){return new(i||n)(w(za,10),w(vu,10),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&A("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[le.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ve([WP]),Xe]});let o=n;return o})();function Fw(o,n){let e=o.indexOf(n);e>-1&&o.splice(e,1)}function Aw(o){return typeof o=="object"&&o!==null&&Object.keys(o).length===2&&"value"in o&&"disabled"in o}var gu=class extends Ms{constructor(n=null,e,t){super(wm(e),bm(t,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),jp(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Aw(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){Fw(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){Fw(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(n){Aw(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};var UP=o=>o instanceof gu;var KP={provide:Ri,useExisting:pn(()=>Rt)},Nw=Promise.resolve(),Rt=(()=>{let n=class n extends Ri{constructor(t,i,r,s,a,l){super(),this._changeDetectorRef=a,this.callSetDisabledState=l,this.control=new gu,this._registered=!1,this.name="",this.update=new O,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=xm(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Em(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){mu(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){Nw.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&it(i);Nw.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?tb(t,this._parent):[t]}};n.\u0275fac=function(i){return new(i||n)(w(as,9),w(za,10),w(vu,10),w(zn,10),w(fe,8),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[le.None,"disabled","isDisabled"],model:[le.None,"ngModel","model"],options:[le.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ve([KP]),Xe,oe]});let o=n;return o})(),ob=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let o=n;return o})();var qP=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var Om=new hn("NgModelWithFormControlWarning"),YP={provide:Ri,useExisting:pn(()=>Dm)},Dm=(()=>{let n=class n extends Ri{set isDisabled(t){}constructor(t,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this.update=new O,this._ngModelWarningSent=!1,this._setValidators(t),this._setAsyncValidators(i),this.valueAccessor=xm(this,r)}ngOnChanges(t){if(this._isControlChanged(t)){let i=t.form.previousValue;i&&Hp(i,this,!1),mu(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Em(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Hp(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}};n._ngModelWarningSentOnce=!1,n.\u0275fac=function(i){return new(i||n)(w(za,10),w(vu,10),w(zn,10),w(Om,8),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["","formControl",""]],inputs:{form:[le.None,"formControl","form"],isDisabled:[le.None,"disabled","isDisabled"],model:[le.None,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Ve([YP]),Xe,oe]});let o=n;return o})(),QP={provide:as,useExisting:pn(()=>XP)},XP=(()=>{let n=class n extends as{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new O,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&($p(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let i=this.form.get(t.path);return mu(i,t,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){Hp(t.control||null,t,!1),jP(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,rb(this.form,this.directives),this.ngSubmit.emit(t),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{let i=t.control,r=this.form.get(t.path);i!==r&&(Hp(i||null,t),UP(r)&&(mu(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let i=this.form.get(t.path);ib(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let i=this.form.get(t.path);i&&BP(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Tm(this.form,this),this._oldForm&&$p(this._oldForm,this)}_checkFormPresent(){this.form}};n.\u0275fac=function(i){return new(i||n)(w(za,10),w(vu,10),w(Kl,8))},n.\u0275dir=Se({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&A("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[le.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ve([QP]),Xe,oe]});let o=n;return o})();var ZP={provide:Ri,useExisting:pn(()=>yu)},yu=(()=>{let n=class n extends Ri{set isDisabled(t){}constructor(t,i,r,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new O,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=xm(this,s)}ngOnChanges(t){this._added||this._setUpControl(),Em(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return tb(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}};n._ngModelWarningSentOnce=!1,n.\u0275fac=function(i){return new(i||n)(w(as,13),w(za,10),w(vu,10),w(zn,10),w(Om,8))},n.\u0275dir=Se({type:n,selectors:[["","formControlName",""]],inputs:{name:[le.None,"formControlName","name"],isDisabled:[le.None,"disabled","isDisabled"],model:[le.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ve([ZP]),Xe,oe]});let o=n;return o})();function JP(o){return typeof o=="number"?o:parseInt(o,10)}var sb=(()=>{let n=class n{constructor(){this._validator=Lp}ngOnChanges(t){if(this.inputName in t){let i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Lp,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,features:[oe]});let o=n;return o})();var eM={provide:za,useExisting:pn(()=>Rm),multi:!0};var Rm=(()=>{let n=class n extends sb{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=it,this.createValidator=t=>Hw}enabled(t){return t}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&ze("required",r._enabled?"":null)},inputs:{required:"required"},features:[Ve([eM]),Xe]});let o=n;return o})();var tM={provide:za,useExisting:pn(()=>nM),multi:!0},nM=(()=>{let n=class n extends sb{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=t=>JP(t),this.createValidator=t=>Bw(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&ze("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Ve([tM]),Xe]});let o=n;return o})();var ab=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[qP]});let o=n;return o})(),vm=class extends Ms{constructor(n,e,t){super(wm(e),bm(t,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,t={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(n,e={}){let t=this._adjustIndex(n);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,t={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),e&&(this.controls.splice(i,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){eb(this,!1,n),n.forEach((t,i)=>{Jw(this,!1,i),this.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(n.forEach((t,i)=>{this.at(i)&&this.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((t,i)=>{t.reset(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,t)=>{n(e,t)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(let n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}};function Lw(o){return!!o&&(o.asyncValidators!==void 0||o.validators!==void 0||o.updateOn!==void 0)}var ase=(()=>{let n=class n{constructor(){this.useNonNullable=!1}get nonNullable(){let t=new n;return t.useNonNullable=!0,t}group(t,i=null){let r=this._reduceControls(t),s={};return Lw(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new Ul(r,s)}record(t,i=null){let r=this._reduceControls(t);return new mm(r,i)}control(t,i,r){let s={};return this.useNonNullable?(Lw(i)?s=i:(s.validators=i,s.asyncValidators=r),new gu(t,ot(V({},s),{nonNullable:!0}))):new gu(t,i,r)}array(t,i,r){let s=t.map(a=>this._createControl(a));return new vm(s,i,r)}_reduceControls(t){let i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){if(t instanceof gu)return t;if(t instanceof Ms)return t;if(Array.isArray(t)){let i=t[0],r=t.length>1?t[1]:null,s=t.length>2?t[2]:null;return this.control(i,r,s)}else return this.control(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var nn=(()=>{let n=class n{static withConfig(t){return{ngModule:n,providers:[{provide:Kl,useValue:t.callSetDisabledState??Wp}]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ab]});let o=n;return o})(),Cu=(()=>{let n=class n{static withConfig(t){return{ngModule:n,providers:[{provide:Om,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Kl,useValue:t.callSetDisabledState??Wp}]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ab]});let o=n;return o})();function iM(o,n){if(o&1&&(C(0,"p",6),Y(1),S()),o&2){let e=n.$implicit,t=m(2).index,i=m(2);k("current",e===i.countArray[t]),f(),Ne(" ",e," ")}}function rM(o,n){if(o&1&&(H(0),_(1,iM,2,3,"p",5),B()),o&2){let e=m(3);f(),h("ngForOf",e.countSingleArray)}}function oM(o,n){if(o&1&&(C(0,"span",3),_(1,rM,2,1,"ng-container",4),S()),o&2){let e=n.index,t=m(2);Re("transform","translateY("+-t.countArray[e]*100+"%)"),h("nzNoAnimation",t.noAnimation),f(),h("ngIf",!t.nzDot&&t.countArray[e]!==void 0)}}function sM(o,n){if(o&1&&(H(0),_(1,oM,2,4,"span",2),B()),o&2){let e=m();f(),h("ngForOf",e.maxNumberArray)}}function aM(o,n){if(o&1&&Y(0),o&2){let e=m();Ne("",e.nzOverflowCount,"+")}}function lM(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzText)}}function cM(o,n){if(o&1&&(H(0),R(1,"span",2),C(2,"span",3),_(3,lM,2,1,"ng-container",1),S(),B()),o&2){let e=m();f(),Ae("ant-badge-status-dot ant-badge-status-",e.nzStatus||e.presetColor,""),Re("background",!e.presetColor&&e.nzColor),h("ngStyle",e.nzStyle),f(2),h("nzStringTemplateOutlet",e.nzText)}}function uM(o,n){if(o&1&&R(0,"nz-badge-sup",5),o&2){let e=m(2);h("nzOffset",e.nzOffset)("nzSize",e.nzSize)("nzTitle",e.nzTitle)("nzStyle",e.nzStyle)("nzDot",e.nzDot)("nzOverflowCount",e.nzOverflowCount)("disableAnimation",!!(e.nzStandalone||e.nzStatus||e.nzColor||e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzCount",e.nzCount)("noAnimation",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))}}function dM(o,n){if(o&1&&(H(0),_(1,uM,1,9,"nz-badge-sup",4),B()),o&2){let e=m();f(),h("ngIf",e.showSup)}}var lb=["*"];function pM(o,n){if(o&1&&(H(0),C(1,"span",3),Y(2),S(),B()),o&2){let e=m();f(2),ye(e.nzText)}}var hM=(()=>{let n=class n{constructor(){this.nzStyle=null,this.nzDot=!1,this.nzOverflowCount=99,this.disableAnimation=!1,this.noAnimation=!1,this.nzSize="default",this.maxNumberArray=[],this.countArray=[],this.count=0,this.countSingleArray=[0,1,2,3,4,5,6,7,8,9]}generateMaxNumberArray(){this.maxNumberArray=this.nzOverflowCount.toString().split("")}ngOnInit(){this.generateMaxNumberArray()}ngOnChanges(t){let{nzOverflowCount:i,nzCount:r}=t;r&&typeof r.currentValue=="number"&&(this.count=Math.max(0,r.currentValue),this.countArray=this.count.toString().split("").map(s=>+s)),i&&this.generateMaxNumberArray()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-badge-sup"]],hostAttrs:[1,"ant-scroll-number"],hostVars:17,hostBindings:function(i,r){i&2&&(ze("title",r.nzTitle===null?"":r.nzTitle||r.nzCount),Ta("@.disabled",r.disableAnimation)("@zoomBadgeMotion",void 0),Ol(r.nzStyle),Re("right",r.nzOffset&&r.nzOffset[0]?-r.nzOffset[0]:null,"px")("margin-top",r.nzOffset&&r.nzOffset[1]?r.nzOffset[1]:null,"px"),k("ant-badge-count",!r.nzDot)("ant-badge-count-sm",r.nzSize==="small")("ant-badge-dot",r.nzDot)("ant-badge-multiple-words",r.countArray.length>=2))},inputs:{nzOffset:"nzOffset",nzTitle:"nzTitle",nzStyle:"nzStyle",nzDot:"nzDot",nzOverflowCount:"nzOverflowCount",disableAnimation:"disableAnimation",nzCount:"nzCount",noAnimation:"noAnimation",nzSize:"nzSize"},exportAs:["nzBadgeSup"],standalone:!0,features:[oe,K],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["overflowTemplate",""],["class","ant-scroll-number-only",3,"nzNoAnimation","transform",4,"ngFor","ngForOf"],[1,"ant-scroll-number-only",3,"nzNoAnimation"],[4,"ngIf"],["class","ant-scroll-number-only-unit",3,"current",4,"ngFor","ngForOf"],[1,"ant-scroll-number-only-unit"]],template:function(i,r){if(i&1&&_(0,sM,2,1,"ng-container",0)(1,aM,1,1,"ng-template",null,1,_e),i&2){let s=te(2);h("ngIf",r.count<=r.nzOverflowCount)("ngIfElse",s)}},dependencies:[lt,we,ft],encapsulation:2,data:{animation:[dm]},changeDetection:0});let o=n;return o})(),cb=["pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"],fM="badge",_u=(()=>{let n=class n{constructor(t,i,r,s,a,l){this.nzConfigService=t,this.renderer=i,this.cdr=r,this.elementRef=s,this.directionality=a,this.noAnimation=l,this._nzModuleName=fM,this.showSup=!1,this.presetColor=null,this.dir="ltr",this.destroy$=new J,this.nzShowZero=!1,this.nzShowDot=!0,this.nzStandalone=!1,this.nzDot=!1,this.nzOverflowCount=99,this.nzColor=void 0,this.nzStyle=null,this.nzText=null,this.nzSize="default"}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.prepareBadgeForRtl(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.prepareBadgeForRtl()}ngOnChanges(t){let{nzColor:i,nzShowDot:r,nzDot:s,nzCount:a,nzShowZero:l}=t;i&&(this.presetColor=this.nzColor&&cb.indexOf(this.nzColor)!==-1?this.nzColor:null),(r||s||a||l)&&(this.showSup=this.nzShowDot&&this.nzDot||typeof this.nzCount=="number"&&this.nzCount>0||typeof this.nzCount=="number"&&this.nzCount<=0&&this.nzShowZero)}prepareBadgeForRtl(){this.isRtlLayout?this.renderer.addClass(this.elementRef.nativeElement,"ant-badge-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-badge-rtl")}get isRtlLayout(){return this.dir==="rtl"}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(He),w(fe),w(de),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-badge"]],hostAttrs:[1,"ant-badge"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-badge-status",r.nzStatus)("ant-badge-not-a-wrapper",!!(r.nzStandalone||r.nzStatus||r.nzColor))},inputs:{nzShowZero:"nzShowZero",nzShowDot:"nzShowDot",nzStandalone:"nzStandalone",nzDot:"nzDot",nzOverflowCount:"nzOverflowCount",nzColor:"nzColor",nzStyle:"nzStyle",nzText:"nzText",nzTitle:"nzTitle",nzStatus:"nzStatus",nzCount:"nzCount",nzOffset:"nzOffset",nzSize:"nzSize"},exportAs:["nzBadge"],standalone:!0,features:[oe,K],ngContentSelectors:lb,decls:3,vars:2,consts:[[4,"ngIf"],[4,"nzStringTemplateOutlet"],[3,"ngStyle"],[1,"ant-badge-status-text"],[3,"nzOffset","nzSize","nzTitle","nzStyle","nzDot","nzOverflowCount","disableAnimation","nzCount","noAnimation",4,"ngIf"],[3,"nzOffset","nzSize","nzTitle","nzStyle","nzDot","nzOverflowCount","disableAnimation","nzCount","noAnimation"]],template:function(i,r){i&1&&(Pe(),_(0,cM,4,7,"ng-container",0),Ie(1),_(2,dM,2,1,"ng-container",1)),i&2&&(h("ngIf",r.nzStatus||r.nzColor),f(2),h("nzStringTemplateOutlet",r.nzCount))},dependencies:[we,Zt,hM,Ye,Ue],encapsulation:2,data:{animation:[dm]},changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowZero",void 0),N([W()],o.prototype,"nzShowDot",void 0),N([W()],o.prototype,"nzStandalone",void 0),N([W()],o.prototype,"nzDot",void 0),N([De()],o.prototype,"nzOverflowCount",void 0),N([De()],o.prototype,"nzColor",void 0),o})(),gM=(()=>{let n=class n{constructor(){this.nzPlacement="end",this.nzText=null,this.presetColor=null}ngOnChanges(t){let{nzColor:i}=t;i&&(this.presetColor=this.nzColor&&cb.indexOf(this.nzColor)!==-1?this.nzColor:null)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-ribbon"]],hostAttrs:[1,"ant-ribbon-wrapper"],inputs:{nzColor:"nzColor",nzPlacement:"nzPlacement",nzText:"nzText"},exportAs:["nzRibbon"],standalone:!0,features:[oe,K],ngContentSelectors:lb,decls:4,vars:11,consts:[[1,"ant-ribbon"],[4,"nzStringTemplateOutlet"],[1,"ant-ribbon-corner"],[1,"ant-ribbon-text"]],template:function(i,r){i&1&&(Pe(),Ie(0),C(1,"div",0),_(2,pM,3,1,"ng-container",1),R(3,"div",2),S()),i&2&&(f(),cr(r.presetColor&&"ant-ribbon-color-"+r.presetColor),Re("background-color",!r.presetColor&&r.nzColor),k("ant-ribbon-placement-end",r.nzPlacement==="end")("ant-ribbon-placement-start",r.nzPlacement==="start"),f(),h("nzStringTemplateOutlet",r.nzText),f(),Re("color",!r.presetColor&&r.nzColor))},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Up=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[_u,gM]});let o=n;return o})();function vM(o,n){if(o&1&&R(0,"span",1),o&2){let e=m();h("nzType",e.iconType)}}var cn=(()=>{let n=class n{constructor(){this.formStatusChanges=new tn(1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),_i=(()=>{let n=class n{constructor(){this.noFormStatus=new ct(!1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),yM={error:"close-circle-fill",validating:"loading",success:"check-circle-fill",warning:"exclamation-circle-fill"},mr=(()=>{let n=class n{constructor(t){this.cdr=t,this.status="",this.iconType=null}ngOnChanges(t){this.updateIcon()}updateIcon(){this.iconType=this.status?yM[this.status]:null,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-form-item-feedback-icon"]],hostAttrs:[1,"ant-form-item-feedback-icon"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-form-item-feedback-icon-error",r.status==="error")("ant-form-item-feedback-icon-warning",r.status==="warning")("ant-form-item-feedback-icon-success",r.status==="success")("ant-form-item-feedback-icon-validating",r.status==="validating")},inputs:{status:"status"},exportAs:["nzFormFeedbackIcon"],features:[oe],decls:1,vars:1,consts:[["nz-icon","",3,"nzType",4,"ngIf"],["nz-icon","",3,"nzType"]],template:function(i,r){i&1&&_(0,vM,1,1,"span",0),i&2&&h("ngIf",r.iconType)},dependencies:[we,Fe],encapsulation:2,changeDetection:0});let o=n;return o})(),ro=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,Ge]});let o=n;return o})();var db=["*"],CM=["inputElement"],_M=["nz-checkbox",""];function SM(o,n){if(o&1){let e=Q();C(0,"label",1),A("nzCheckedChange",function(i){let s=I(e).$implicit,a=m();return P(a.onCheckedChange(s,i))}),C(1,"span"),Y(2),S()()}if(o&2){let e=n.$implicit,t=m();h("nzDisabled",e.disabled||t.nzDisabled)("nzChecked",e.checked),f(2),ye(e.label)}}var Im=(()=>{let n=class n{constructor(){this.nzOnChange=new O,this.checkboxList=[]}addCheckbox(t){this.checkboxList.push(t)}removeCheckbox(t){this.checkboxList.splice(this.checkboxList.indexOf(t),1)}onChange(){let t=this.checkboxList.filter(i=>i.nzChecked).map(i=>i.nzValue);this.nzOnChange.emit(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-checkbox-wrapper"]],hostAttrs:[1,"ant-checkbox-group"],outputs:{nzOnChange:"nzOnChange"},exportAs:["nzCheckboxWrapper"],standalone:!0,features:[K],ngContentSelectors:db,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Bi=(()=>{let n=class n{innerCheckedChange(t){this.nzDisabled||(this.nzChecked=t,this.onChange(this.nzChecked),this.nzCheckedChange.emit(this.nzChecked),this.nzCheckboxWrapperComponent&&this.nzCheckboxWrapperComponent.onChange())}writeValue(t){this.nzChecked=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r,s,a,l,c){this.ngZone=t,this.elementRef=i,this.nzCheckboxWrapperComponent=r,this.cdr=s,this.focusMonitor=a,this.directionality=l,this.nzFormStatusService=c,this.dir="ltr",this.destroy$=new J,this.isNzDisableFirstChange=!0,this.onChange=()=>{},this.onTouched=()=>{},this.nzCheckedChange=new O,this.nzValue=null,this.nzAutoFocus=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzChecked=!1,this.nzId=null}ngOnInit(){this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched())}),this.nzCheckboxWrapperComponent&&this.nzCheckboxWrapperComponent.addCheckbox(this),this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.preventDefault(),this.focus(),!this.nzDisabled&&this.ngZone.run(()=>{this.innerCheckedChange(!this.nzChecked),this.cdr.markForCheck()})}),Ke(this.inputElement.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>t.stopPropagation())})}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.nzCheckboxWrapperComponent&&this.nzCheckboxWrapperComponent.removeCheckbox(this),this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(Im,8),w(fe),w(Oi),w(Me,8),w(cn,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-checkbox",""]],viewQuery:function(i,r){if(i&1&&xe(CM,7),i&2){let s;ce(s=ue())&&(r.inputElement=s.first)}},hostAttrs:[1,"ant-checkbox-wrapper"],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-checkbox-wrapper-in-form-item",!!r.nzFormStatusService)("ant-checkbox-wrapper-checked",r.nzChecked)("ant-checkbox-rtl",r.dir==="rtl")},inputs:{nzValue:"nzValue",nzAutoFocus:"nzAutoFocus",nzDisabled:"nzDisabled",nzIndeterminate:"nzIndeterminate",nzChecked:"nzChecked",nzId:"nzId"},outputs:{nzCheckedChange:"nzCheckedChange"},exportAs:["nzCheckbox"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],attrs:_M,ngContentSelectors:db,decls:6,vars:11,consts:[[1,"ant-checkbox"],["type","checkbox",1,"ant-checkbox-input",3,"checked","ngModel","disabled","ngModelChange"],["inputElement",""],[1,"ant-checkbox-inner"]],template:function(i,r){i&1&&(Pe(),C(0,"span",0)(1,"input",1,2),A("ngModelChange",function(a){return r.innerCheckedChange(a)}),S(),R(3,"span",3),S(),C(4,"span"),Ie(5),S()),i&2&&(k("ant-checkbox-checked",r.nzChecked&&!r.nzIndeterminate)("ant-checkbox-disabled",r.nzDisabled)("ant-checkbox-indeterminate",r.nzIndeterminate),f(),h("checked",r.nzChecked)("ngModel",r.nzChecked)("disabled",r.nzDisabled),ze("autofocus",r.nzAutoFocus?"autofocus":null)("id",r.nzId))},dependencies:[nn,ym,Kt,Rt],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzIndeterminate",void 0),N([W()],o.prototype,"nzChecked",void 0),o})(),Pm=(()=>{let n=class n{trackByOption(t,i){return i.value}onCheckedChange(t,i){t.checked=i,this.onChange(this.options)}constructor(t,i,r,s){this.elementRef=t,this.focusMonitor=i,this.cdr=r,this.directionality=s,this.onChange=()=>{},this.onTouched=()=>{},this.options=[],this.nzDisabled=!1,this.dir="ltr",this.destroy$=new J,this.isNzDisableFirstChange=!0}ngOnInit(){this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched())}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}writeValue(t){this.options=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Oi),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-checkbox-group"]],hostAttrs:[1,"ant-checkbox-group"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-checkbox-group-rtl",r.dir==="rtl")},inputs:{nzDisabled:"nzDisabled"},exportAs:["nzCheckboxGroup"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],decls:1,vars:2,consts:[["nz-checkbox","","class","ant-checkbox-group-item",3,"nzDisabled","nzChecked","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["nz-checkbox","",1,"ant-checkbox-group-item",3,"nzDisabled","nzChecked","nzCheckedChange"]],template:function(i,r){i&1&&_(0,SM,3,3,"label",0),i&2&&h("ngForOf",r.options)("ngForTrackBy",r.trackByOption)},dependencies:[lt,Bi],encapsulation:2});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),o})(),$i=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Bi,Pm]});let o=n;return o})();var bt={top:new ln({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),topCenter:new ln({originX:"center",originY:"top"},{overlayX:"center",overlayY:"bottom"}),topLeft:new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),topRight:new ln({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"}),right:new ln({originX:"end",originY:"center"},{overlayX:"start",overlayY:"center"}),rightTop:new ln({originX:"end",originY:"top"},{overlayX:"start",overlayY:"top"}),rightBottom:new ln({originX:"end",originY:"bottom"},{overlayX:"start",overlayY:"bottom"}),bottom:new ln({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"}),bottomCenter:new ln({originX:"center",originY:"bottom"},{overlayX:"center",overlayY:"top"}),bottomLeft:new ln({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),bottomRight:new ln({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"}),left:new ln({originX:"start",originY:"center"},{overlayX:"end",overlayY:"center"}),leftTop:new ln({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"}),leftBottom:new ln({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"})},Mm=[bt.top,bt.right,bt.bottom,bt.left],Wse=[bt.bottomLeft,bt.bottomRight,bt.topLeft,bt.topRight,bt.topCenter,bt.bottomCenter],Use=[new ln({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"bottom"}),new ln({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"bottom"})],Kse=[bt.bottomLeft,new ln({originX:"start",originY:"bottom"},{overlayX:"end",overlayY:"top"})];function Da(o){for(let n in bt)if(o.connectionPair.originX===bt[n].originX&&o.connectionPair.originY===bt[n].originY&&o.connectionPair.overlayX===bt[n].overlayX&&o.connectionPair.overlayY===bt[n].overlayY)return n}var ql={bottomLeft:new ln({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"},void 0,2),topLeft:new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"},void 0,-2),bottomRight:new ln({originX:"end",originY:"bottom"},{overlayX:"end",overlayY:"top"},void 0,2),topRight:new ln({originX:"end",originY:"top"},{overlayX:"end",overlayY:"bottom"},void 0,-2)},Fm=[ql.bottomLeft,ql.topLeft,ql.bottomRight,ql.topRight],Nr=(()=>{let n=class n{constructor(t,i){this.cdkConnectedOverlay=t,this.nzDestroyService=i,this.nzArrowPointAtCenter=!1,this.cdkConnectedOverlay.backdropClass="nz-overlay-transparent-backdrop",this.cdkConnectedOverlay.positionChange.pipe(F(this.nzDestroyService)).subscribe(r=>{this.nzArrowPointAtCenter&&this.updateArrowPosition(r)})}updateArrowPosition(t){let i=this.getOriginRect(),r=Da(t),s=0,a=0;r==="topLeft"||r==="bottomLeft"?s=i.width/2-14:r==="topRight"||r==="bottomRight"?s=-(i.width/2-14):r==="leftTop"||r==="rightTop"?a=i.height/2-10:(r==="leftBottom"||r==="rightBottom")&&(a=-(i.height/2-10)),(this.cdkConnectedOverlay.offsetX!==s||this.cdkConnectedOverlay.offsetY!==a)&&(this.cdkConnectedOverlay.offsetY=a,this.cdkConnectedOverlay.offsetX=s,this.cdkConnectedOverlay.overlayRef.updatePosition())}getFlexibleConnectedPositionStrategyOrigin(){return this.cdkConnectedOverlay.origin instanceof dr?this.cdkConnectedOverlay.origin.elementRef:this.cdkConnectedOverlay.origin}getOriginRect(){let t=this.getFlexibleConnectedPositionStrategyOrigin();if(t instanceof de)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let i=t.width||0,r=t.height||0;return{top:t.y,bottom:t.y+r,left:t.x,right:t.x+i,height:r,width:i}}};n.\u0275fac=function(i){return new(i||n)(w(oi),w(Pt))},n.\u0275dir=Se({type:n,selectors:[["","cdkConnectedOverlay","","nzConnectedOverlay",""]],inputs:{nzArrowPointAtCenter:"nzArrowPointAtCenter"},exportAs:["nzConnectedOverlay"],features:[Ve([Pt])]});let o=n;return N([W()],o.prototype,"nzArrowPointAtCenter",void 0),o})(),vr=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var wM=["overlay"];function bM(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzTitle)}}function TM(o,n){if(o&1&&(C(0,"div",2)(1,"div",3)(2,"div",4),R(3,"span",5),S(),C(4,"div",6),_(5,bM,2,1,"ng-container",7),S()()()),o&2){let e=m();k("ant-tooltip-rtl",e.dir==="rtl"),h("ngClass",e._classMap)("ngStyle",e.nzOverlayStyle)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),f(3),h("ngStyle",e._contentStyleMap),f(),h("ngStyle",e._contentStyleMap),f(),h("nzStringTemplateOutlet",e.nzTitle)("nzStringTemplateOutletContext",e.nzTitleContext)}}var Su=(()=>{let n=class n{get _title(){return this.title||this.directiveTitle||null}get _content(){return this.content||this.directiveContent||null}get _trigger(){return typeof this.trigger<"u"?this.trigger:"hover"}get _placement(){let t=this.placement;return Array.isArray(t)&&t.length>0?t:typeof t=="string"&&t?[t]:["top"]}get _visible(){return(typeof this.visible<"u"?this.visible:this.internalVisible)||!1}get _mouseEnterDelay(){return this.mouseEnterDelay||.15}get _mouseLeaveDelay(){return this.mouseLeaveDelay||.1}get _overlayClassName(){return this.overlayClassName||null}get _overlayStyle(){return this.overlayStyle||null}getProxyPropertyMap(){return{noAnimation:["noAnimation",()=>!!this.noAnimation]}}constructor(t,i,r,s,a){this.elementRef=t,this.hostView=i,this.renderer=r,this.noAnimation=s,this.nzConfigService=a,this.visibleChange=new O,this.internalVisible=!1,this.destroy$=new J,this.triggerDisposables=[]}ngOnChanges(t){let{trigger:i}=t;i&&!i.isFirstChange()&&this.registerTriggers(),this.component&&this.updatePropertiesByChanges(t)}ngAfterViewInit(){this.createComponent(),this.registerTriggers()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.clearTogglingTimer(),this.removeTriggerListeners()}show(){this.component?.show()}hide(){this.component?.hide()}updatePosition(){this.component&&this.component.updatePosition()}createComponent(){let t=this.componentRef;this.component=t.instance,this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),t.location.nativeElement),this.component.setOverlayOrigin(this.origin||this.elementRef),this.initProperties();let i=this.component.nzVisibleChange.pipe(Bt());i.pipe(F(this.destroy$)).subscribe(r=>{this.internalVisible=r,this.visibleChange.emit(r)}),i.pipe(Qe(r=>r),Os(0,ap),Qe(()=>!!this.component?.overlay?.overlayRef),F(this.destroy$)).subscribe(()=>{this.component?.updatePosition()})}registerTriggers(){let t=this.elementRef.nativeElement,i=this.trigger;if(this.removeTriggerListeners(),i==="hover"){let r;this.triggerDisposables.push(this.renderer.listen(t,"mouseenter",()=>{this.delayEnterLeave(!0,!0,this._mouseEnterDelay)})),this.triggerDisposables.push(this.renderer.listen(t,"mouseleave",()=>{this.delayEnterLeave(!0,!1,this._mouseLeaveDelay),this.component?.overlay.overlayRef&&!r&&(r=this.component.overlay.overlayRef.overlayElement,this.triggerDisposables.push(this.renderer.listen(r,"mouseenter",()=>{this.delayEnterLeave(!1,!0,this._mouseEnterDelay)})),this.triggerDisposables.push(this.renderer.listen(r,"mouseleave",()=>{this.delayEnterLeave(!1,!1,this._mouseLeaveDelay)})))}))}else i==="focus"?(this.triggerDisposables.push(this.renderer.listen(t,"focusin",()=>this.show())),this.triggerDisposables.push(this.renderer.listen(t,"focusout",()=>this.hide()))):i==="click"&&this.triggerDisposables.push(this.renderer.listen(t,"click",r=>{r.preventDefault(),this.show()}))}updatePropertiesByChanges(t){this.updatePropertiesByKeys(Object.keys(t))}updatePropertiesByKeys(t){let i=V({title:["nzTitle",()=>this._title],directiveTitle:["nzTitle",()=>this._title],content:["nzContent",()=>this._content],directiveContent:["nzContent",()=>this._content],trigger:["nzTrigger",()=>this._trigger],placement:["nzPlacement",()=>this._placement],visible:["nzVisible",()=>this._visible],mouseEnterDelay:["nzMouseEnterDelay",()=>this._mouseEnterDelay],mouseLeaveDelay:["nzMouseLeaveDelay",()=>this._mouseLeaveDelay],overlayClassName:["nzOverlayClassName",()=>this._overlayClassName],overlayStyle:["nzOverlayStyle",()=>this._overlayStyle],arrowPointAtCenter:["nzArrowPointAtCenter",()=>this.arrowPointAtCenter],cdkConnectedOverlayPush:["cdkConnectedOverlayPush",()=>this.cdkConnectedOverlayPush]},this.getProxyPropertyMap());(t||Object.keys(i).filter(r=>!r.startsWith("directive"))).forEach(r=>{if(i[r]){let[s,a]=i[r];this.updateComponentValue(s,a())}}),this.component?.updateByDirective()}initProperties(){this.updatePropertiesByKeys()}updateComponentValue(t,i){typeof i<"u"&&(this.component[t]=i)}delayEnterLeave(t,i,r=-1){this.delayTimer?this.clearTogglingTimer():r>0?this.delayTimer=setTimeout(()=>{this.delayTimer=void 0,i?this.show():this.hide()},r*1e3):i&&t?this.show():this.hide()}removeTriggerListeners(){this.triggerDisposables.forEach(t=>t()),this.triggerDisposables.length=0}clearTogglingTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=void 0)}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft),w(st))},n.\u0275dir=Se({type:n,features:[oe]});let o=n;return o})(),EM=(()=>{let n=class n{set nzVisible(t){let i=os(t);this._visible!==i&&(this._visible=i,this.nzVisibleChange.next(i))}get nzVisible(){return this._visible}set nzTrigger(t){this._trigger=t}get nzTrigger(){return this._trigger}set nzPlacement(t){let i=t.map(r=>bt[r]);this._positions=[...i,...Mm]}constructor(t,i,r){this.cdr=t,this.directionality=i,this.noAnimation=r,this.nzTitle=null,this.nzContent=null,this.nzArrowPointAtCenter=!1,this.nzOverlayStyle={},this.nzBackdrop=!1,this.cdkConnectedOverlayPush=!0,this.nzVisibleChange=new J,this._visible=!1,this._trigger="hover",this.preferredPlacement="top",this.dir="ltr",this._classMap={},this._prefix="ant-tooltip",this._positions=[...Mm],this.destroy$=new J}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.nzVisibleChange.complete(),this.destroy$.next(),this.destroy$.complete()}show(){this.nzVisible||(this.isEmpty()||(this.nzVisible=!0,this.nzVisibleChange.next(!0),this.cdr.detectChanges()),this.origin&&this.overlay&&this.overlay.overlayRef&&this.overlay.overlayRef.getDirection()==="rtl"&&this.overlay.overlayRef.setDirection("ltr"))}hide(){this.nzVisible&&(this.nzVisible=!1,this.nzVisibleChange.next(!1),this.cdr.detectChanges())}updateByDirective(){this.updateStyles(),this.cdr.detectChanges(),Promise.resolve().then(()=>{this.updatePosition(),this.updateVisibilityByTitle()})}updatePosition(){this.origin&&this.overlay&&this.overlay.overlayRef&&this.overlay.overlayRef.updatePosition()}onPositionChange(t){this.preferredPlacement=Da(t),this.updateStyles(),this.cdr.detectChanges()}setOverlayOrigin(t){this.origin=t,this.cdr.markForCheck()}onClickOutside(t){!this.origin.nativeElement.contains(t.target)&&this.nzTrigger!==null&&this.hide()}updateVisibilityByTitle(){this.isEmpty()&&this.hide()}updateStyles(){this._classMap={[this.nzOverlayClassName]:!0,[`${this._prefix}-placement-${this.preferredPlacement}`]:!0}}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8),w(ft))},n.\u0275dir=Se({type:n,viewQuery:function(i,r){if(i&1&&xe(wM,5),i&2){let s;ce(s=ue())&&(r.overlay=s.first)}}});let o=n;return o})();function qp(o){return o instanceof En?!1:o===""||!ht(o)}var Si=(()=>{let n=class n extends Su{constructor(t,i,r,s){super(t,i,r,s),this.titleContext=null,this.trigger="hover",this.placement="top",this.cdkConnectedOverlayPush=!0,this.visibleChange=new O,this.componentRef=this.hostView.createComponent(Ql)}getProxyPropertyMap(){return ot(V({},super.getProxyPropertyMap()),{nzTooltipColor:["nzColor",()=>this.nzTooltipColor],titleContext:["nzTitleContext",()=>this.titleContext]})}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft,9))},n.\u0275dir=Se({type:n,selectors:[["","nz-tooltip",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-tooltip-open",r.visible)},inputs:{title:[le.None,"nzTooltipTitle","title"],titleContext:[le.None,"nzTooltipTitleContext","titleContext"],directiveTitle:[le.None,"nz-tooltip","directiveTitle"],trigger:[le.None,"nzTooltipTrigger","trigger"],placement:[le.None,"nzTooltipPlacement","placement"],origin:[le.None,"nzTooltipOrigin","origin"],visible:[le.None,"nzTooltipVisible","visible"],mouseEnterDelay:[le.None,"nzTooltipMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[le.None,"nzTooltipMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[le.None,"nzTooltipOverlayClassName","overlayClassName"],overlayStyle:[le.None,"nzTooltipOverlayStyle","overlayStyle"],arrowPointAtCenter:[le.None,"nzTooltipArrowPointAtCenter","arrowPointAtCenter"],cdkConnectedOverlayPush:"cdkConnectedOverlayPush",nzTooltipColor:"nzTooltipColor"},outputs:{visibleChange:"nzTooltipVisibleChange"},exportAs:["nzTooltip"],standalone:!0,features:[Xe]});let o=n;return N([W()],o.prototype,"arrowPointAtCenter",void 0),N([W()],o.prototype,"cdkConnectedOverlayPush",void 0),o})(),Ql=(()=>{let n=class n extends EM{constructor(t,i,r){super(t,i,r),this.nzTitle=null,this.nzTitleContext=null,this._contentStyleMap={}}isEmpty(){return qp(this.nzTitle)}updateStyles(){let t=this.nzColor&&fp(this.nzColor);this._classMap={[this.nzOverlayClassName]:!0,[`${this._prefix}-placement-${this.preferredPlacement}`]:!0,[`${this._prefix}-${this.nzColor}`]:t},this._contentStyleMap={backgroundColor:this.nzColor&&!t?this.nzColor:null,"--color":this.nzColor}}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-tooltip"]],exportAs:["nzTooltipComponent"],standalone:!0,features:[Xe,K],decls:2,vars:5,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],[1,"ant-tooltip",3,"ngClass","ngStyle","nzNoAnimation"],[1,"ant-tooltip-content"],[1,"ant-tooltip-arrow"],[1,"ant-tooltip-arrow-content",3,"ngStyle"],[1,"ant-tooltip-inner",3,"ngStyle"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"]],template:function(i,r){i&1&&(_(0,TM,6,11,"ng-template",0,1,_e),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.hide()})("positionChange",function(a){return r.onPositionChange(a)})),i&2&&h("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayOpen",r._visible)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayPush",r.cdkConnectedOverlayPush)("nzArrowPointAtCenter",r.nzArrowPointAtCenter)},dependencies:[Fr,oi,St,Zt,ft,Ye,Ue,vr,Nr],encapsulation:2,data:{animation:[Is]},changeDetection:0});let o=n;return o})(),ji=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Ql]});let o=n;return o})();var pb=new hn("WINDOW",{factory:()=>{let{defaultView:o}=ae(gi);if(!o)throw new Error("Window is not available");return o}}),_ae=new hn("PAGE_VISIBILITY`",{factory:()=>{let o=ae(gi);return Ke(o,"visibilitychange").pipe(Ot(0),We(()=>!o.hidden),Bt(),vS())}});var zM=["imgRef"],OM=["imagePreviewWrapper"];function DM(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),R(1,"span",11),S()}if(o&2){let e=n.$implicit,t=m();k("ant-image-preview-operations-operation-disabled",t.zoomOutDisabled&&e.type==="zoomOut"),f(),h("nzType",e.icon)}}function RM(o,n){if(o&1&&R(0,"img",13,14),o&2){let e=m().$implicit,t=m();Re("width",e.width)("height",e.height)("transform",t.previewImageTransform),ze("src",t.sanitizerResourceUrl(e.src),Do)("srcset",e.srcset)("alt",e.alt)}}function IM(o,n){if(o&1&&(H(0),_(1,RM,2,9,"img",12),B()),o&2){let e=n.index,t=m();f(),h("ngIf",t.index===e)}}function PM(o,n){if(o&1){let e=Q();H(0),C(1,"div",15),A("click",function(i){I(e);let r=m();return P(r.onSwitchLeft(i))}),R(2,"span",16),S(),C(3,"div",17),A("click",function(i){I(e);let r=m();return P(r.onSwitchRight(i))}),R(4,"span",18),S(),B()}if(o&2){let e=m();f(),k("ant-image-preview-switch-left-disabled",e.index<=0),f(2),k("ant-image-preview-switch-right-disabled",e.index>=e.images.length-1)}}var Yp={enter:"ant-fade-enter",enterActive:"ant-fade-enter-active",leave:"ant-fade-leave",leaveActive:"ant-fade-leave-active"},MM="ant-image-preview-mask",fb="image";function FM(o){let n={};return o.width<=o.clientWidth&&o.height<=o.clientHeight&&(n={x:0,y:0}),(o.width>o.clientWidth||o.height>o.clientHeight)&&(n={x:hb(o.left,o.width,o.clientWidth),y:hb(o.top,o.height,o.clientHeight)}),n}function AM(o){let n=o.getBoundingClientRect(),e=document.documentElement;return{left:n.left+(window.pageXOffset||e.scrollLeft)-(e.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||e.scrollTop)-(e.clientTop||document.body.clientTop||0)}}function NM(){let o=document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;return{width:o,height:n}}function hb(o,n,e){let t=o+n,i=(n-e)/2,r=null;return n>e?(o>0&&(r=i),o<0&&te)&&(r=o<0?i:-i),r}var wu=class{constructor(){this.nzKeyboard=!0,this.nzNoAnimation=!1,this.nzMaskClosable=!0,this.nzCloseOnNavigation=!0}},Qp={x:0,y:0},LM=.5,kM=1,VM=0,gb=(()=>{let n=class n{get animationDisabled(){return this.config.nzNoAnimation??!1}get maskClosable(){let t=this.nzConfigService.getConfigForComponent(fb)||{};return this.config.nzMaskClosable??t.nzMaskClosable??!0}constructor(t,i,r,s,a,l,c,u){this.ngZone=t,this.host=i,this.cdr=r,this.nzConfigService=s,this.config=a,this.overlayRef=l,this.destroy$=c,this.sanitizer=u,this._defaultNzZoom=kM,this._defaultNzScaleStep=LM,this._defaultNzRotate=VM,this.images=[],this.index=0,this.isDragging=!1,this.visible=!0,this.animationState="enter",this.animationStateChanged=new O,this.scaleStepMap=new Map,this.previewImageTransform="",this.previewImageWrapperTransform="",this.operations=[{icon:"close",onClick:()=>{this.onClose()},type:"close"},{icon:"zoom-in",onClick:()=>{this.onZoomIn()},type:"zoomIn"},{icon:"zoom-out",onClick:()=>{this.onZoomOut()},type:"zoomOut"},{icon:"rotate-right",onClick:()=>{this.onRotateRight()},type:"rotateRight"},{icon:"rotate-left",onClick:()=>{this.onRotateLeft()},type:"rotateLeft"}],this.zoomOutDisabled=!1,this.position=V({},Qp),this.containerClick=new O,this.closeClick=new O,this.zoom=this.config.nzZoom??this._defaultNzZoom,this.scaleStep=this.config.nzScaleStep??this._defaultNzScaleStep,this.rotate=this.config.nzRotate??this._defaultNzRotate,this.updateZoomOutDisabled(),this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform()}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.host.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.target===t.currentTarget&&this.maskClosable&&this.containerClick.observers.length&&this.ngZone.run(()=>this.containerClick.emit())}),Ke(this.imagePreviewWrapper.nativeElement,"mousedown").pipe(F(this.destroy$)).subscribe(()=>{this.isDragging=!0})})}setImages(t,i){i&&(this.scaleStepMap=i),this.images=t,this.cdr.markForCheck()}switchTo(t){this.index=t,this.cdr.markForCheck()}next(){this.index0&&(this.reset(),this.index--,this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform(),this.updateZoomOutDisabled(),this.cdr.markForCheck())}markForCheck(){this.cdr.markForCheck()}onClose(){this.closeClick.emit()}onZoomIn(){let t=this.scaleStepMap.get(this.images[this.index].src??this.images[this.index].srcset)??this.scaleStep;this.zoom+=t,this.updatePreviewImageTransform(),this.updateZoomOutDisabled(),this.position=V({},Qp)}onZoomOut(){if(this.zoom>1){let t=this.scaleStepMap.get(this.images[this.index].src??this.images[this.index].srcset)??this.scaleStep;this.zoom-=t,this.updatePreviewImageTransform(),this.updateZoomOutDisabled(),this.position=V({},Qp)}}onRotateRight(){this.rotate+=90,this.updatePreviewImageTransform()}onRotateLeft(){this.rotate-=90,this.updatePreviewImageTransform()}onSwitchLeft(t){t.preventDefault(),t.stopPropagation(),this.prev()}onSwitchRight(t){t.preventDefault(),t.stopPropagation(),this.next()}onAnimationStart(t){t.toState==="enter"?this.setEnterAnimationClass():t.toState==="leave"&&this.setLeaveAnimationClass(),this.animationStateChanged.emit(t)}onAnimationDone(t){t.toState==="enter"?this.setEnterAnimationClass():t.toState==="leave"&&this.setLeaveAnimationClass(),this.animationStateChanged.emit(t)}startLeaveAnimation(){this.animationState="leave",this.cdr.markForCheck()}onDragReleased(){this.isDragging=!1;let t=this.imageRef.nativeElement.offsetWidth*this.zoom,i=this.imageRef.nativeElement.offsetHeight*this.zoom,{left:r,top:s}=AM(this.imageRef.nativeElement),{width:a,height:l}=NM(),c=this.rotate%180!==0,d=FM({width:c?i:t,height:c?t:i,left:r,top:s,clientWidth:a,clientHeight:l});(ht(d.x)||ht(d.y))&&(this.position=V(V({},this.position),d))}sanitizerResourceUrl(t){return this.sanitizer.bypassSecurityTrustResourceUrl(t)}updatePreviewImageTransform(){this.previewImageTransform=`scale3d(${this.zoom}, ${this.zoom}, 1) rotate(${this.rotate}deg)`}updatePreviewImageWrapperTransform(){this.previewImageWrapperTransform=`translate3d(${this.position.x}px, ${this.position.y}px, 0)`}updateZoomOutDisabled(){this.zoomOutDisabled=this.zoom<=1}setEnterAnimationClass(){if(this.animationDisabled)return;let t=this.overlayRef.backdropElement;t&&(t.classList.add(Yp.enter),t.classList.add(Yp.enterActive))}setLeaveAnimationClass(){if(this.animationDisabled)return;let t=this.overlayRef.backdropElement;t&&(t.classList.add(Yp.leave),t.classList.add(Yp.leaveActive))}reset(){this.zoom=this.config.nzZoom??this._defaultNzZoom,this.scaleStep=this.config.nzScaleStep??this._defaultNzScaleStep,this.rotate=this.config.nzRotate??this._defaultNzRotate,this.position=V({},Qp)}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(fe),w(st),w(wu),w(_p),w(Pt),w(Ro))},n.\u0275cmp=j({type:n,selectors:[["nz-image-preview"]],viewQuery:function(i,r){if(i&1&&(xe(zM,5),xe(OM,7)),i&2){let s;ce(s=ue())&&(r.imageRef=s.first),ce(s=ue())&&(r.imagePreviewWrapper=s.first)}},hostAttrs:["tabindex","-1","role","document",1,"ant-image-preview-wrap"],hostVars:6,hostBindings:function(i,r){i&1&&OS("@fadeMotion.start",function(a){return r.onAnimationStart(a)})("@fadeMotion.done",function(a){return r.onAnimationDone(a)}),i&2&&(Ta("@.disabled",r.config.nzNoAnimation)("@fadeMotion",r.animationState),Re("z-index",r.config.nzZIndex),k("ant-image-preview-moving",r.isDragging))},exportAs:["nzImagePreview"],standalone:!0,features:[Ve([Pt]),K],decls:11,vars:6,consts:[[1,"ant-image-preview"],["tabindex","0","aria-hidden","true",2,"width","0","height","0","overflow","hidden","outline","none"],[1,"ant-image-preview-content"],[1,"ant-image-preview-body"],[1,"ant-image-preview-operations"],["class","ant-image-preview-operations-operation",3,"ant-image-preview-operations-operation-disabled","click",4,"ngFor","ngForOf"],["cdkDrag","",1,"ant-image-preview-img-wrapper",3,"cdkDragFreeDragPosition","cdkDragReleased"],["imagePreviewWrapper",""],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"ant-image-preview-operations-operation",3,"click"],["nz-icon","","nzTheme","outline",1,"ant-image-preview-operations-icon",3,"nzType"],["cdkDragHandle","","class","ant-image-preview-img",3,"width","height","transform",4,"ngIf"],["cdkDragHandle","",1,"ant-image-preview-img"],["imgRef",""],[1,"ant-image-preview-switch-left",3,"click"],["nz-icon","","nzType","left","nzTheme","outline"],[1,"ant-image-preview-switch-right",3,"click"],["nz-icon","","nzType","right","nzTheme","outline"]],template:function(i,r){i&1&&(C(0,"div",0),R(1,"div",1),C(2,"div",2)(3,"div",3)(4,"ul",4),_(5,DM,2,3,"li",5),S(),C(6,"div",6,7),A("cdkDragReleased",function(){return r.onDragReleased()}),_(8,IM,2,1,"ng-container",8),S(),_(9,PM,5,4,"ng-container",9),S()(),R(10,"div",1),S()),i&2&&(f(5),h("ngForOf",r.operations),f(),Re("transform",r.previewImageWrapperTransform),h("cdkDragFreeDragPosition",r.position),f(2),h("ngForOf",r.images),f(),h("ngIf",r.images.length>1))},dependencies:[lt,Ge,Fe,iw,rw,we],encapsulation:2,data:{animation:[ww]},changeDetection:0});let o=n;return o})(),Nm=class{constructor(n,e,t){this.previewInstance=n,this.config=e,this.overlayRef=t,this.destroy$=new J,t.keydownEvents().pipe(Qe(i=>this.config.nzKeyboard&&(i.keyCode===27||i.keyCode===37||i.keyCode===39)&&!Nl(i))).subscribe(i=>{i.preventDefault(),i.keyCode===27&&this.close(),i.keyCode===37&&this.prev(),i.keyCode===39&&this.next()}),t.detachments().subscribe(()=>{this.overlayRef.dispose()}),n.containerClick.pipe(Zr(1),F(this.destroy$)).subscribe(()=>{this.close()}),n.closeClick.pipe(Zr(1),F(this.destroy$)).subscribe(()=>{this.close()}),n.animationStateChanged.pipe(Qe(i=>i.phaseName==="done"&&i.toState==="leave"),Zr(1)).subscribe(()=>{this.dispose()})}switchTo(n){this.previewInstance.switchTo(n)}next(){this.previewInstance.next()}prev(){this.previewInstance.prev()}close(){this.previewInstance.startLeaveAnimation()}dispose(){this.destroy$.next(),this.overlayRef.dispose()}},Lm=(()=>{let n=class n{constructor(t,i,r,s){this.overlay=t,this.injector=i,this.nzConfigService=r,this.directionality=s}preview(t,i,r){return this.display(t,i,r)}display(t,i,r){let s=V(V({},new wu),i??{}),a=this.createOverlay(s),l=this.attachPreviewComponent(a,s);l.setImages(t,r);let c=new Nm(l,s,a);return l.previewRef=c,c}attachPreviewComponent(t,i){let r=$n.create({parent:this.injector,providers:[{provide:_p,useValue:t},{provide:wu,useValue:i}]}),s=new kl(gb,null,r);return t.attach(s).instance}createOverlay(t){let i=this.nzConfigService.getConfigForComponent(fb)||{},r=new aw({hasBackdrop:!0,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global(),disposeOnNavigation:t.nzCloseOnNavigation??i.nzCloseOnNavigation??!0,backdropClass:MM,direction:t.nzDirection||i.nzDirection||this.directionality.value});return this.overlay.create(r)}};n.\u0275fac=function(i){return new(i||n)(nt(ss),nt($n),nt(st),nt(Me,8))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var mb=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({providers:[Lm],imports:[gb]});let o=n;return o})();var vb=["*"],GM=["inputElement"],HM=["nz-radio",""],Vm=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","nz-radio-button",""]],standalone:!0});let o=n;return o})(),km=(()=>{let n=class n{constructor(){this.selected$=new tn(1),this.touched$=new J,this.disabled$=new tn(1),this.name$=new tn(1)}touch(){this.touched$.next()}select(t){this.selected$.next(t)}setDisabled(t){this.disabled$.next(t)}setName(t){this.name$.next(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),yb=(()=>{let n=class n{constructor(t,i,r){this.cdr=t,this.nzRadioService=i,this.directionality=r,this.value=null,this.destroy$=new J,this.isNzDisableFirstChange=!0,this.onChange=()=>{},this.onTouched=()=>{},this.nzDisabled=!1,this.nzButtonStyle="outline",this.nzSize="default",this.nzName=null,this.dir="ltr"}ngOnInit(){this.nzRadioService.selected$.pipe(F(this.destroy$)).subscribe(t=>{this.value!==t&&(this.value=t,this.onChange(this.value))}),this.nzRadioService.touched$.pipe(F(this.destroy$)).subscribe(()=>{Promise.resolve().then(()=>this.onTouched())}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzDisabled:i,nzName:r}=t;i&&this.nzRadioService.setDisabled(this.nzDisabled),r&&this.nzRadioService.setName(this.nzName)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}writeValue(t){this.value=t,this.nzRadioService.select(t),this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.nzRadioService.setDisabled(this.nzDisabled),this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(km),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-radio-group"]],hostAttrs:[1,"ant-radio-group"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-radio-group-large",r.nzSize==="large")("ant-radio-group-small",r.nzSize==="small")("ant-radio-group-solid",r.nzButtonStyle==="solid")("ant-radio-group-rtl",r.dir==="rtl")},inputs:{nzDisabled:"nzDisabled",nzButtonStyle:"nzButtonStyle",nzSize:"nzSize",nzName:"nzName"},exportAs:["nzRadioGroup"],standalone:!0,features:[Ve([km,{provide:zn,useExisting:pn(()=>n),multi:!0}]),oe,K],ngContentSelectors:vb,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),o})(),ls=(()=>{let n=class n{focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r,s,a,l,c,u){this.ngZone=t,this.elementRef=i,this.cdr=r,this.focusMonitor=s,this.directionality=a,this.nzRadioService=l,this.nzRadioButtonDirective=c,this.nzFormStatusService=u,this.isNgModel=!1,this.destroy$=new J,this.isNzDisableFirstChange=!0,this.isChecked=!1,this.name=null,this.isRadioButton=!!this.nzRadioButtonDirective,this.onChange=()=>{},this.onTouched=()=>{},this.nzValue=null,this.nzDisabled=!1,this.nzAutoFocus=!1,this.dir="ltr"}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}writeValue(t){this.isChecked=t,this.cdr.markForCheck()}registerOnChange(t){this.isNgModel=!0,this.onChange=t}registerOnTouched(t){this.onTouched=t}ngOnInit(){this.nzRadioService&&(this.nzRadioService.name$.pipe(F(this.destroy$)).subscribe(t=>{this.name=t,this.cdr.markForCheck()}),this.nzRadioService.disabled$.pipe(F(this.destroy$)).subscribe(t=>{this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}),this.nzRadioService.selected$.pipe(F(this.destroy$)).subscribe(t=>{let i=this.isChecked;this.isChecked=this.nzValue===t,this.isNgModel&&i!==this.isChecked&&this.isChecked===!1&&this.onChange(!1),this.cdr.markForCheck()})),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t||(Promise.resolve().then(()=>this.onTouched()),this.nzRadioService&&this.nzRadioService.touch())}),this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.setupClickListener()}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.focusMonitor.stopMonitoring(this.elementRef)}setupClickListener(){this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.stopPropagation(),t.preventDefault(),!(this.nzDisabled||this.isChecked)&&this.ngZone.run(()=>{this.focus(),this.nzRadioService?.select(this.nzValue),this.isNgModel&&(this.isChecked=!0,this.onChange(!0)),this.cdr.markForCheck()})})})}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(fe),w(Oi),w(Me,8),w(km,8),w(Vm,8),w(cn,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-radio",""],["","nz-radio-button",""]],viewQuery:function(i,r){if(i&1&&xe(GM,7),i&2){let s;ce(s=ue())&&(r.inputElement=s.first)}},hostVars:18,hostBindings:function(i,r){i&2&&k("ant-radio-wrapper-in-form-item",!!r.nzFormStatusService)("ant-radio-wrapper",!r.isRadioButton)("ant-radio-button-wrapper",r.isRadioButton)("ant-radio-wrapper-checked",r.isChecked&&!r.isRadioButton)("ant-radio-button-wrapper-checked",r.isChecked&&r.isRadioButton)("ant-radio-wrapper-disabled",r.nzDisabled&&!r.isRadioButton)("ant-radio-button-wrapper-disabled",r.nzDisabled&&r.isRadioButton)("ant-radio-wrapper-rtl",!r.isRadioButton&&r.dir==="rtl")("ant-radio-button-wrapper-rtl",r.isRadioButton&&r.dir==="rtl")},inputs:{nzValue:"nzValue",nzDisabled:"nzDisabled",nzAutoFocus:"nzAutoFocus"},exportAs:["nzRadio"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],attrs:HM,ngContentSelectors:vb,decls:6,vars:24,consts:[["type","radio",3,"disabled","checked"],["inputElement",""]],template:function(i,r){i&1&&(Pe(),C(0,"span"),R(1,"input",0,1)(3,"span"),S(),C(4,"span"),Ie(5),S()),i&2&&(k("ant-radio",!r.isRadioButton)("ant-radio-checked",r.isChecked&&!r.isRadioButton)("ant-radio-disabled",r.nzDisabled&&!r.isRadioButton)("ant-radio-button",r.isRadioButton)("ant-radio-button-checked",r.isChecked&&r.isRadioButton)("ant-radio-button-disabled",r.nzDisabled&&r.isRadioButton),f(),k("ant-radio-input",!r.isRadioButton)("ant-radio-button-input",r.isRadioButton),h("disabled",r.nzDisabled)("checked",r.isChecked),ze("autofocus",r.nzAutoFocus?"autofocus":null)("name",r.name),f(2),k("ant-radio-inner",!r.isRadioButton)("ant-radio-button-inner",r.isRadioButton))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),o})(),Jl=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();function BM(o,n){if(o&1){let e=Q();C(0,"span",1),A("click",function(i){I(e);let r=m();return P(r.closeTag(i))}),S()}}var $M=["*"],bu=(()=>{let n=class n{constructor(t,i,r,s){this.cdr=t,this.renderer=i,this.elementRef=r,this.directionality=s,this.isPresetColor=!1,this.nzMode="default",this.nzChecked=!1,this.nzOnClose=new O,this.nzCheckedChange=new O,this.dir="ltr",this.destroy$=new J}updateCheckedStatus(){this.nzMode==="checkable"&&(this.nzChecked=!this.nzChecked,this.nzCheckedChange.emit(this.nzChecked))}closeTag(t){this.nzOnClose.emit(t),t.defaultPrevented||this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}clearPresetColor(){let t=this.elementRef.nativeElement,i=new RegExp(`(ant-tag-(?:${[...WS,...jS].join("|")}))`,"g"),r=t.classList.toString(),s=[],a=i.exec(r);for(;a!==null;)s.push(a[1]),a=i.exec(r);t.classList.remove(...s)}setPresetColor(){let t=this.elementRef.nativeElement;this.clearPresetColor(),this.nzColor?this.isPresetColor=fp(this.nzColor)||US(this.nzColor):this.isPresetColor=!1,this.isPresetColor&&t.classList.add(`ant-tag-${this.nzColor}`)}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzColor:i}=t;i&&this.setPresetColor()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(He),w(de),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-tag"]],hostAttrs:[1,"ant-tag"],hostVars:10,hostBindings:function(i,r){i&1&&A("click",function(){return r.updateCheckedStatus()}),i&2&&(Re("background-color",r.isPresetColor?"":r.nzColor),k("ant-tag-has-color",r.nzColor&&!r.isPresetColor)("ant-tag-checkable",r.nzMode==="checkable")("ant-tag-checkable-checked",r.nzChecked)("ant-tag-rtl",r.dir==="rtl"))},inputs:{nzMode:"nzMode",nzColor:"nzColor",nzChecked:"nzChecked"},outputs:{nzOnClose:"nzOnClose",nzCheckedChange:"nzCheckedChange"},exportAs:["nzTag"],standalone:!0,features:[oe,K],ngContentSelectors:$M,decls:2,vars:1,consts:[["nz-icon","","nzType","close","class","ant-tag-close-icon","tabindex","-1",3,"click",4,"ngIf"],["nz-icon","","nzType","close","tabindex","-1",1,"ant-tag-close-icon",3,"click"]],template:function(i,r){i&1&&(Pe(),Ie(0),_(1,BM,1,0,"span",0)),i&2&&(f(),h("ngIf",r.nzMode==="closeable"))},dependencies:[Ge,Fe,we],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzChecked",void 0),o})(),Xp=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[bu]});let o=n;return o})();function _b(o,n){if(!o)return"";let e=V({},typeof n=="string"?{mask:n}:n),t=V({0:{pattern:/\d/,default:"0"},9:{pattern:/\d/},"#":{pattern:/[a-zA-Z0-9]/},U:{pattern:/[a-zA-Z]/,transform:r=>r.toLocaleUpperCase()},L:{pattern:/[a-zA-Z]/,transform:r=>r.toLocaleLowerCase()},"*":{pattern:/.*/,transform:r=>"*"}},e.tokens),i=o.split("");return e.mask.split("").reduce((r,s)=>{let a=t[s];if(!a)return r.push(s),r;let l=i.shift()??"";return a.pattern.test(l)?(typeof a.transform=="function"?r.push(a.transform(l)):r.push(l),r):(a.default&&r.push(a.default),r)},[]).join("")}var Ia={num:"(([-+]?\\d+\\.\\d+)|([-+]?\\d+)|([-+]?\\.\\d+))(?:[eE]([-+]?\\d+))?",idCard:"(^\\d{15}$)|(^\\d{17}(?:[0-9]|X)$)",mobile:"^(0|\\+?86|17951)?1[0-9]{10}$",url:"(((^https?:(?://)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+(?::\\d+)?|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:/[\\+~%\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)",ip:"(?:^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$)|(?:^(?:(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)|(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)|(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)|(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)|(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)",color:"(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\\b|(?:rgb|hsl)a?\\([^\\)]*\\)",chinese:"[\u4E00-\u9FA5]+"};function Pa(o,n){return new RegExp(`^${o}$`,n)}var oo={num:Pa(Ia.num),idCard:Pa(Ia.idCard,"i"),mobile:Pa(Ia.mobile),url:Pa(Ia.url),ip:Pa(Ia.ip),color:Pa(Ia.color),chinese:Pa(Ia.chinese)};function Sb(o){return oo.num.test(o.toString())}function WM(o){return Sb(o)&&parseInt(o.toString(),10).toString()===o.toString()}function xle(o){return Sb(o)&&!WM(o)}function zle(o){return oo.idCard.test(o)}function Ole(o){return oo.mobile.test(o)}function Dle(o){return oo.url.test(o)}function Rle(o){return oo.ip.test(o)}function Ile(o){return oo.color.test(o)}function Ple(o){return oo.chinese.test(o)}var UM=[{unit:"Q",value:Math.pow(10,15)},{unit:"T",value:Math.pow(10,12)},{unit:"B",value:Math.pow(10,9)},{unit:"M",value:Math.pow(10,6)},{unit:"K",value:1e3}],Zp=(()=>{let n=class n{constructor(t){this.locale=ae(RS),this.defCurrencyCode=ae(IS,{optional:!0})??"USD",this.currencyPipe=new FS(this.locale,this.defCurrencyCode),this.c=t.merge("utilCurrency",{startingUnit:"yuan",megaUnit:{Q:"\u4EAC",T:"\u5146",B:"\u4EBF",M:"\u4E07",K:"\u5343"},precision:2,ingoreZeroPrecision:!0})}format(t,i){i=V({startingUnit:this.c.startingUnit,precision:this.c.precision,ingoreZeroPrecision:this.c.ingoreZeroPrecision,ngCurrency:this.c.ngCurrency},i);let r=Number(t);if(t==null||isNaN(r))return"";if(i.startingUnit==="cent"&&(r=r/100),i.ngCurrency!=null){let a=i.ngCurrency;return this.currencyPipe.transform(r,a.currencyCode,a.display,a.digitsInfo,a.locale||this.locale)}let s=MS(r,this.locale,`.${i.ingoreZeroPrecision?1:i.precision}-${i.precision}`);return i.ingoreZeroPrecision?s.replace(/(?:\.[0]+)$/g,""):s}mega(t,i){i=V({precision:this.c.precision,unitI18n:this.c.megaUnit,startingUnit:this.c.startingUnit},i);let r=Number(t),s={raw:t,value:"",unit:"",unitI18n:""};if(isNaN(r)||r===0)return s.value=t.toString(),s;i.startingUnit==="cent"&&(r=r/100);let a=Math.abs(+r),l=Math.pow(10,i.precision),c=r<0;for(let u of UM){let d=a/u.value;if(d=Math.round(d*l)/l,d>=1){a=d,s.unit=u.unit;break}}return s.value=(c?"-":"")+a,s.unitI18n=i.unitI18n[s.unit],s}cny(t,i){if(i=V({inWords:!0,minusSymbol:"\u8D1F",startingUnit:this.c.startingUnit},i),t=Number(t),isNaN(t))return"";i.startingUnit==="cent"&&(t=t/100),t=t.toString();let r,s;[r,s]=t.split(".");let a="";r.startsWith("-")&&(a=i.minusSymbol,r=r.substring(1)),/^-?\d+$/.test(t)&&(s=null),r=(+r).toString();let l=i.inWords,c={num:l?["","\u58F9","\u8D30","\u53C1","\u8086","\u4F0D","\u9646","\u67D2","\u634C","\u7396","\u70B9"]:["","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u70B9"],radice:l?["","\u62FE","\u4F70","\u4EDF","\u4E07","\u62FE","\u4F70","\u4EDF","\u4EBF","\u62FE","\u4F70","\u4EDF","\u4E07\u4EBF","\u62FE","\u4F70","\u4EDF","\u5146","\u62FE","\u4F70","\u4EDF"]:["","\u5341","\u767E","\u5343","\u4E07","\u5341","\u767E","\u5343","\u4EBF","\u5341","\u767E","\u5343","\u4E07\u4EBF","\u5341","\u767E","\u5343","\u5146","\u5341","\u767E","\u5343"],dec:["\u89D2","\u5206","\u5398","\u6BEB"]};l&&(t=(+t).toFixed(5).toString());let u="",d=r.length;if(r==="0"||d===0)u="\u96F6";else{let y="";for(let x=0;x1&&E!==0&&r[x-1]==="0"?"\u96F6":"",U=E===0&&z%4!==0||r.substring(x-3,x-3+4)==="0000",se=y,ve=c.num[E];y=U?"":c.radice[z],x===0&&ve==="\u4E00"&&y==="\u5341"&&(ve=""),E>1&&ve==="\u4E8C"&&["","\u5341","\u767E"].indexOf(y)===-1&&se!=="\u5341"&&(ve="\u4E24"),u+=G+ve+y}}let p="",g=s?s.toString().length:0;if(s===null)p=l?"\u6574":"";else if(s==="0")p="\u96F6";else for(let y=0;yc.dec.length-1);y++){let x=s[y],E=x==="0"?"\u96F6":"",z=c.num[+x],M=l?c.dec[y]:"";p+=E+z+M}return a+(l?u+(p==="\u96F6"?"\u5143\u6574":`\u5143${p}`):u+(p===""?"":`\u70B9${p}`))}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var wb=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();function qM(o,n){if(o&1){let e=Q();C(0,"label",3),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.change(i))}),Y(1),S()}if(o&2){let e=m(2);h("nzDisabled",e.disabled)("ngModel",e.value),f(),Ne(" ",e.safeOpt.checkbox==null?null:e.safeOpt.checkbox.label," ")}}function YM(o,n){if(o&1){let e=Q();C(0,"label",4),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.change(i))}),Y(1),S()}if(o&2){let e=m(2);h("nzDisabled",e.disabled)("ngModel",e.value),f(),Ne(" ",e.safeOpt.radio==null?null:e.safeOpt.radio.label," ")}}function QM(o,n){if(o&1){let e=Q();C(0,"a",5),A("click",function(i){I(e);let r=m(2);return P(r._link(i))}),S()}if(o&2){let e=m(2);h("innerHTML",e._text,Dt),ze("target",e.safeOpt.link==null?null:e.safeOpt.link.target)("title",e.value)}}function XM(o,n){if(o&1&&(C(0,"nz-tag",6),R(1,"span",7),S()),o&2){let e=m(2);h("nzColor",e.res==null||e.res.result==null?null:e.res.result.color),f(),h("innerHTML",e._text,Dt)}}function ZM(o,n){if(o&1&&R(0,"nz-badge",8),o&2){let e=m(2);Vt("nzText",e._text),h("nzStatus",e.res==null||e.res.result==null?null:e.res.result.color)}}function JM(o,n){}function eF(o,n){if(o&1&&_(0,JM,0,0,"ng-template",9),o&2){let e=m(2);h("data",e.hostData)}}function tF(o,n){if(o&1){let e=Q();C(0,"img",10),A("click",function(){let r=I(e).$implicit,s=m(3);return P(s._showImg(r))}),S()}if(o&2){let e=n.$implicit,t=m(3);k("point",t.safeOpt.img==null?null:t.safeOpt.img.big),ze("src",e,Do)("height",t.safeOpt.img==null?null:t.safeOpt.img.size)("width",t.safeOpt.img==null?null:t.safeOpt.img.size)}}function nF(o,n){if(o&1&&Cn(0,tF,1,5,"img",11,yn),o&2){let e=m(2);_n(e._text)}}function iF(o,n){if(o&1&&R(0,"span",12),o&2){let e=m(3);h("innerText",e._text),ze("title",e.value)}}function rF(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(3);h("innerHTML",e._text,Dt),ze("title",e.value)}}function oF(o,n){if(o&1&&(C(0,"span",14),Y(1),S()),o&2){let e=m(3);f(),ye(e._unit)}}function sF(o,n){if(o&1&&_(0,iF,1,2,"span",12)(1,rF,1,2)(2,oF,2,1,"span",13),o&2){let e=m(2);ie(0,e.isText?0:1),f(2),ie(2,e._unit?2:-1)}}function aF(o,n){if(o&1&&_(0,qM,2,3)(1,YM,2,3)(2,QM,1,3)(3,XM,2,2)(4,ZM,1,2)(5,eF,1,1)(6,nF,2,0)(7,sF,3,2),o&2){let e=m(),t;ie(0,(t=e.safeOpt.type)==="checkbox"?0:t==="radio"?1:t==="link"?2:t==="tag"?3:t==="badge"?4:t==="widget"?5:t==="img"?6:7)}}function lF(o,n){if(o&1&&Y(0),o&2){let e=m(2);Ne(" ",e.safeOpt.default==null?null:e.safeOpt.default.text," ")}}function cF(o,n){}function uF(o,n){if(o&1&&(C(0,"span",15),_(1,cF,0,0,"ng-template",16),S()),o&2){let e=m(3),t=te(1);h("nz-tooltip",e.safeOpt.tooltip),f(),h("ngTemplateOutlet",t)}}function dF(o,n){}function pF(o,n){if(o&1&&_(0,dF,0,0,"ng-template",16),o&2){m(3);let e=te(1);h("ngTemplateOutlet",e)}}function hF(o,n){if(o&1&&_(0,uF,2,2,"span",15)(1,pF,1,1),o&2){let e=m(2);ie(0,e.safeOpt.tooltip?0:1)}}function fF(o,n){if(o&1&&_(0,lF,1,1)(1,hF,2,1),o&2){let e=m();ie(0,e.showDefault?0:1)}}function gF(o,n){o&1&&R(0,"span",2)}function mF(o,n){}function vF(o,n){if(o&1&&_(0,mF,0,0,"ng-template",16),o&2){m();let e=te(3);h("ngTemplateOutlet",e)}}var Gm=(()=>{let n=class n{constructor(t){this.nzI18n=ae(Di),this.currency=ae(Zp),this.dom=ae(Ro),this.widgets={date:{type:"fn",ref:(i,r)=>({text:uw(i,r.date.format,this.nzI18n.getDateLocale())})},mega:{type:"fn",ref:(i,r)=>{let s=this.currency.mega(i,r.mega);return{text:s.value,unit:s.unitI18n}}},currency:{type:"fn",ref:(i,r)=>({text:this.currency.format(i,r.currency)})},cny:{type:"fn",ref:(i,r)=>({text:this.currency.cny(i,r.cny)})},boolean:{type:"fn",ref:(i,r)=>({text:this.dom.bypassSecurityTrustHtml(vw(i,r.boolean))})},img:{type:"fn",ref:i=>({text:Array.isArray(i)?i:[i]})}},this.globalOptions=t.merge("cell",{date:{format:"yyyy-MM-dd HH:mm:ss"},img:{size:32},default:{text:"-"}})}registerWidget(t,i){this.widgets[t]={type:"widget",ref:i}}getWidget(t){return this.widgets[t]}genType(t,i){if(i.type!=null)return i.type;let r=typeof t;return r==="number"&&/^[0-9]{13}$/g.test(t)||t instanceof Date||i.date!=null?"date":i.widget!=null?"widget":i.mega!=null?"mega":i.currency!=null?"currency":i.cny!=null?"cny":i.img!=null?"img":i.link!=null?"link":i.html!=null?"html":i.badge!=null?"badge":i.tag!=null?"tag":i.checkbox!=null?"checkbox":i.radio!=null?"radio":i.enum!=null?"enum":r==="number"?"number":r==="boolean"||i.boolean!=null?"boolean":"string"}fixOptions(t){return GS({},this.globalOptions,t)}get(t,i){let r=this.genType(t,V({},i)),s=this.fixOptions(i);s.type=r;let a=typeof t=="object"&&typeof t?.getTypeName=="function"&&t?.getTypeName()!=null,l={result:typeof t=="object"&&!a?t:{text:t==null?"":a?t:`${t}`},options:s},c=this.widgets[r];return c?.type==="fn"&&(l.result=c.ref(t,s)),(typeof t=="function"?t(t,s):Mn(l.result)).pipe(We(u=>{l.result=u;let d;switch(r){case"badge":d=(s.badge?.data??{})[t],l.result=V({color:"default"},d);break;case"tag":d=(s.tag?.data??{})[t],l.result=d;break;case"enum":l.result={text:(s.enum??{})[t]};break;case"html":l.safeHtml=s.html?.safe;break;case"string":a&&(l.safeHtml="safeHtml");break}return(r==="badge"||r==="tag")&&d?.tooltip!=null&&(l.options.tooltip=d.tooltip),s.mask!=null&&(l.result.text=_b(l.result.text,s.mask)),l}))}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),yF=(()=>{let n=class n{constructor(){this.srv=ae(Gm),this.viewContainerRef=ae(Tn)}ngOnInit(){let t=this.data.options.widget,i=this.srv.getWidget(t.key)?.ref;if(i==null)return;this.viewContainerRef.clear();let r=this.viewContainerRef.createComponent(i);r.instance.data=this.data}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","cell-widget-host",""]],inputs:{data:"data"},standalone:!0});let o=n;return o})(),Hm=(()=>{let n=class n{constructor(){this.srv=ae(Gm),this.router=ae(mi),this.cdr=ae(fe),this.renderer=ae(He),this.imgSrv=ae(Lm),this.win=ae(pb),this.el=ae(de).nativeElement,this.showDefault=!1,this.valueChange=new O,this.loading=!1,this.disabled=!1}get safeOpt(){return this.res?.options??{}}get isText(){return this.res?.safeHtml==="text"}get hostData(){return{value:this.value,options:this.srv.fixOptions(this.options)}}updateValue(){this.destroy$?.unsubscribe(),this.destroy$=this.srv.get(this.value,this.options).subscribe(t=>{this.res=t,this.showDefault=this.value==this.safeOpt.default.condition,this._text=t.result?.text??"",this._unit=t.result?.unit??this.safeOpt?.unit,this.cdr.detectChanges(),this.setClass()})}setClass(){let{el:t,renderer:i}=this,{renderType:r,size:s,type:a}=this.safeOpt;Cw(t,i,{cell:!0,[`cell__${r}`]:r!=null,[`cell__${s}`]:s!=null,"cell__has-unit":this._unit,"cell__has-default":this.showDefault,cell__disabled:this.disabled}),t.setAttribute("data-type",`${a}`)}ngOnChanges(t){Object.keys(t).every(i=>["loading","disabled"].includes(i))?this.setClass():this.updateValue()}change(t){this.value=t,this.valueChange.emit(t)}_link(t){if(t.preventDefault(),t.stopPropagation(),this.disabled)return;let i=this.safeOpt.link,r=i?.url;r!=null&&(/https?:\/\//g.test(r)?this.win.open(r,i?.target):this.router.navigateByUrl(r))}_showImg(t){let i=this.safeOpt.img;if(i==null||i.big==null)return;let r=-1,s=this._text.map((a,l)=>(r===-1&&a===t&&(r=l),typeof i.big=="function"?i.big(a):a));this.imgSrv.preview(s.map(a=>({src:a})),i.previewOptions).switchTo(r)}ngOnDestroy(){this.destroy$?.unsubscribe()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["cell"],["","cell",""]],inputs:{value:"value",options:"options",loading:[le.HasDecoratorInputTransform,"loading","loading",it],disabled:[le.HasDecoratorInputTransform,"disabled","disabled",it]},outputs:{valueChange:"valueChange"},exportAs:["cell"],standalone:!0,features:[fi,oe,K],decls:6,vars:1,consts:[["text",""],["textWrap",""],["nz-icon","","nzType","loading"],["nz-checkbox","",3,"nzDisabled","ngModel","ngModelChange"],["nz-radio","",3,"nzDisabled","ngModel","ngModelChange"],[3,"innerHTML","click"],[3,"nzColor"],[3,"innerHTML"],[3,"nzStatus","nzText"],["cell-widget-host","",3,"data"],[1,"img",3,"click"],["class","img",3,"point"],[3,"innerText"],["class","unit"],[1,"unit"],[3,"nz-tooltip"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,aF,8,1,"ng-template",null,0,_e)(2,fF,2,1,"ng-template",null,1,_e)(4,gF,1,0,"span",2)(5,vF,1,1),i&2&&(f(4),ie(4,r.loading?4:5))},dependencies:[nn,Kt,Rt,Be,Bi,ls,Fe,bu,_u,Si,mb,yF],encapsulation:2,changeDetection:0});let o=n;return o})(),CF=[Hm],bb=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,nn,$i,Jl,Up,Xp,ji,Ge,wb,CF]});let o=n;return o})();function dce(...o){return ba([{provide:wa,multi:!0,useValue:()=>{let n=ae(Gm);o.forEach(e=>n.registerWidget(e.KEY,e.type))}}])}var wF=["nz-menu-item",""],Eb=["*"],bF=["nz-submenu-inline-child",""];function TF(o,n){}var EF=["nz-submenu-none-inline-child",""];function xF(o,n){}var zF=["nz-submenu-title",""];function OF(o,n){if(o&1&&R(0,"span",4),o&2){let e=m();h("nzType",e.nzIcon)}}function DF(o,n){if(o&1&&(H(0),C(1,"span",5),Y(2),S(),B()),o&2){let e=m();f(2),ye(e.nzTitle)}}function RF(o,n){o&1&&R(0,"span",9)}function IF(o,n){o&1&&R(0,"span",10)}function PF(o,n){if(o&1&&(C(0,"span",6),_(1,RF,1,0,"span",7)(2,IF,1,0,"span",8),S()),o&2){let e=m();h("ngSwitch",e.dir),f(),h("ngSwitchCase","rtl")}}function MF(o,n){o&1&&R(0,"span",11)}var FF=["nz-submenu",""];function AF(o,n){o&1&&Ie(0,0,["*ngIf","!nzTitle"])}function NF(o,n){if(o&1&&R(0,"div",6),o&2){let e=m(),t=te(7);h("mode",e.mode)("nzOpen",e.nzOpen)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("menuClass",e.nzMenuClassName)("templateOutlet",t)}}function LF(o,n){if(o&1){let e=Q();C(0,"div",8),A("subMenuMouseState",function(i){I(e);let r=m(2);return P(r.setMouseEnterState(i))}),S()}if(o&2){let e=m(2),t=te(7);h("theme",e.theme)("mode",e.mode)("nzOpen",e.nzOpen)("position",e.position)("nzDisabled",e.nzDisabled)("isMenuInsideDropDown",e.isMenuInsideDropDown)("templateOutlet",t)("menuClass",e.nzMenuClassName)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)}}function kF(o,n){if(o&1){let e=Q();_(0,LF,1,10,"ng-template",7),A("positionChange",function(i){I(e);let r=m();return P(r.onPositionChange(i))})}if(o&2){let e=m(),t=te(1);h("cdkConnectedOverlayPositions",e.overlayPositions)("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayWidth",e.triggerWidth)("cdkConnectedOverlayOpen",e.nzOpen)("cdkConnectedOverlayTransformOriginOn",".ant-menu-submenu")}}function VF(o,n){o&1&&Ie(0,1)}var GF=[[["","title",""]],"*"],HF=["[title]","*"],BF=["titleElement"],$F=["nz-menu-group",""];function jF(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.nzTitle)}}function WF(o,n){o&1&&Ie(0,1,["*ngIf","!nzTitle"])}var UF=["*",[["","title",""]]],KF=["*","[title]"],ao=new hn("NzIsInDropDownMenuToken"),xb=new hn("NzMenuServiceLocalToken"),so=(()=>{let n=class n{constructor(){this.descendantMenuItemClick$=new J,this.childMenuItemClick$=new J,this.theme$=new ct("light"),this.mode$=new ct("vertical"),this.inlineIndent$=new ct(24),this.isChildSubMenuOpen$=new ct(!1)}onDescendantMenuItemClick(t){this.descendantMenuItemClick$.next(t)}onChildMenuItemClick(t){this.childMenuItemClick$.next(t)}setMode(t){this.mode$.next(t)}setTheme(t){this.theme$.next(t)}setInlineIndent(t){this.inlineIndent$.next(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),Bm=(()=>{let n=class n{onChildMenuItemClick(t){this.childMenuItemClick$.next(t)}setOpenStateWithoutDebounce(t){this.isCurrentSubMenuOpen$.next(t)}setMouseEnterTitleOrOverlayState(t){this.isMouseEnterTitleOrOverlay$.next(t)}constructor(t,i,r){this.nzHostSubmenuService=t,this.nzMenuService=i,this.isMenuInsideDropDown=r,this.mode$=this.nzMenuService.mode$.pipe(We(c=>c==="inline"?"inline":c==="vertical"||this.nzHostSubmenuService?"vertical":"horizontal")),this.level=1,this.isCurrentSubMenuOpen$=new ct(!1),this.isChildSubMenuOpen$=new ct(!1),this.isMouseEnterTitleOrOverlay$=new J,this.childMenuItemClick$=new J,this.destroy$=new J,this.nzHostSubmenuService&&(this.level=this.nzHostSubmenuService.level+1);let s=this.childMenuItemClick$.pipe(zo(()=>this.mode$),Qe(c=>c!=="inline"||this.isMenuInsideDropDown),Tl(!1)),a=_t(this.isMouseEnterTitleOrOverlay$,s);Fn([this.isChildSubMenuOpen$,a]).pipe(We(([c,u])=>c||u),zs(150),Bt(),F(this.destroy$)).pipe(Bt()).subscribe(c=>{this.setOpenStateWithoutDebounce(c),this.nzHostSubmenuService?this.nzHostSubmenuService.isChildSubMenuOpen$.next(c):this.nzMenuService.isChildSubMenuOpen$.next(c)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(nt(n,12),nt(so),nt(ao))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),co=(()=>{let n=class n{clickMenuItem(t){this.nzDisabled?(t.preventDefault(),t.stopPropagation()):(this.nzMenuService.onDescendantMenuItemClick(this),this.nzSubmenuService?this.nzSubmenuService.onChildMenuItemClick(this):this.nzMenuService.onChildMenuItemClick(this))}setSelectedState(t){this.nzSelected=t,this.selected$.next(t)}updateRouterActive(){!this.listOfRouterLink||!this.router||!this.router.navigated||!this.nzMatchRouter||Promise.resolve().then(()=>{let t=this.hasActiveLinks();this.nzSelected!==t&&(this.nzSelected=t,this.setSelectedState(this.nzSelected),this.cdr.markForCheck())})}hasActiveLinks(){let t=this.isLinkActive(this.router);return this.routerLink&&t(this.routerLink)||this.listOfRouterLink.some(t)}isLinkActive(t){return i=>t.isActive(i.urlTree||"",{paths:this.nzMatchRouterExact?"exact":"subset",queryParams:this.nzMatchRouterExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"})}constructor(t,i,r,s,a,l,c){this.nzMenuService=t,this.cdr=i,this.nzSubmenuService=r,this.isMenuInsideDropDown=s,this.directionality=a,this.routerLink=l,this.router=c,this.destroy$=new J,this.level=this.nzSubmenuService?this.nzSubmenuService.level+1:1,this.selected$=new J,this.inlinePaddingLeft=null,this.dir="ltr",this.nzDisabled=!1,this.nzSelected=!1,this.nzDanger=!1,this.nzMatchRouterExact=!1,this.nzMatchRouter=!1,c&&this.router.events.pipe(F(this.destroy$),Qe(u=>u instanceof Io)).subscribe(()=>{this.updateRouterActive()})}ngOnInit(){Fn([this.nzMenuService.mode$,this.nzMenuService.inlineIndent$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{this.inlinePaddingLeft=t==="inline"?this.level*i:null}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngAfterContentInit(){this.listOfRouterLink.changes.pipe(F(this.destroy$)).subscribe(()=>this.updateRouterActive()),this.updateRouterActive()}ngOnChanges(t){t.nzSelected&&this.setSelectedState(this.nzSelected)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(so),w(fe),w(Bm,8),w(ao),w(Me,8),w(Po,8),w(mi,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-menu-item",""]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Po,5),i&2){let a;ce(a=ue())&&(r.listOfRouterLink=a)}},hostVars:20,hostBindings:function(i,r){i&1&&A("click",function(a){return r.clickMenuItem(a)}),i&2&&(Re("padding-left",r.dir==="rtl"?null:r.nzPaddingLeft||r.inlinePaddingLeft,"px")("padding-right",r.dir==="rtl"?r.nzPaddingLeft||r.inlinePaddingLeft:null,"px"),k("ant-dropdown-menu-item",r.isMenuInsideDropDown)("ant-dropdown-menu-item-selected",r.isMenuInsideDropDown&&r.nzSelected)("ant-dropdown-menu-item-danger",r.isMenuInsideDropDown&&r.nzDanger)("ant-dropdown-menu-item-disabled",r.isMenuInsideDropDown&&r.nzDisabled)("ant-menu-item",!r.isMenuInsideDropDown)("ant-menu-item-selected",!r.isMenuInsideDropDown&&r.nzSelected)("ant-menu-item-danger",!r.isMenuInsideDropDown&&r.nzDanger)("ant-menu-item-disabled",!r.isMenuInsideDropDown&&r.nzDisabled))},inputs:{nzPaddingLeft:"nzPaddingLeft",nzDisabled:"nzDisabled",nzSelected:"nzSelected",nzDanger:"nzDanger",nzMatchRouterExact:"nzMatchRouterExact",nzMatchRouter:"nzMatchRouter"},exportAs:["nzMenuItem"],standalone:!0,features:[oe,K],attrs:wF,ngContentSelectors:Eb,decls:2,vars:0,consts:[[1,"ant-menu-title-content"]],template:function(i,r){i&1&&(Pe(),C(0,"span",0),Ie(1),S())},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzSelected",void 0),N([W()],o.prototype,"nzDanger",void 0),N([W()],o.prototype,"nzMatchRouterExact",void 0),N([W()],o.prototype,"nzMatchRouter",void 0),o})(),qF=(()=>{let n=class n{constructor(t,i,r){this.elementRef=t,this.renderer=i,this.directionality=r,this.templateOutlet=null,this.menuClass="",this.mode="vertical",this.nzOpen=!1,this.listOfCacheClassName=[],this.expandState="collapsed",this.dir="ltr",this.destroy$=new J}calcMotionState(){this.nzOpen?this.expandState="expanded":this.expandState="collapsed"}ngOnInit(){this.calcMotionState(),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnChanges(t){let{mode:i,nzOpen:r,menuClass:s}=t;(i||r)&&this.calcMotionState(),s&&(this.listOfCacheClassName.length&&this.listOfCacheClassName.filter(a=>!!a).forEach(a=>{this.renderer.removeClass(this.elementRef.nativeElement,a)}),this.menuClass&&(this.listOfCacheClassName=this.menuClass.split(" "),this.listOfCacheClassName.filter(a=>!!a).forEach(a=>{this.renderer.addClass(this.elementRef.nativeElement,a)})))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu-inline-child",""]],hostAttrs:[1,"ant-menu","ant-menu-inline","ant-menu-sub"],hostVars:3,hostBindings:function(i,r){i&2&&(Ta("@collapseMotion",r.expandState),k("ant-menu-rtl",r.dir==="rtl"))},inputs:{templateOutlet:"templateOutlet",menuClass:"menuClass",mode:"mode",nzOpen:"nzOpen"},exportAs:["nzSubmenuInlineChild"],standalone:!0,features:[oe,K],attrs:bF,decls:1,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,TF,0,0,"ng-template",0),i&2&&h("ngTemplateOutlet",r.templateOutlet)},dependencies:[Be],encapsulation:2,data:{animation:[_w]},changeDetection:0});let o=n;return o})(),YF=(()=>{let n=class n{constructor(t){this.directionality=t,this.menuClass="",this.theme="light",this.templateOutlet=null,this.isMenuInsideDropDown=!1,this.mode="vertical",this.position="right",this.nzDisabled=!1,this.nzOpen=!1,this.subMenuMouseState=new O,this.expandState="collapsed",this.dir="ltr",this.destroy$=new J}setMouseState(t){this.nzDisabled||this.subMenuMouseState.next(t)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}calcMotionState(){this.nzOpen?this.mode==="horizontal"?this.expandState="bottom":this.mode==="vertical"&&(this.expandState="active"):this.expandState="collapsed"}ngOnInit(){this.calcMotionState(),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnChanges(t){let{mode:i,nzOpen:r}=t;(i||r)&&this.calcMotionState()}};n.\u0275fac=function(i){return new(i||n)(w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu-none-inline-child",""]],hostAttrs:[1,"ant-menu-submenu","ant-menu-submenu-popup"],hostVars:14,hostBindings:function(i,r){i&1&&A("mouseenter",function(){return r.setMouseState(!0)})("mouseleave",function(){return r.setMouseState(!1)}),i&2&&(Ta("@slideMotion",r.expandState)("@zoomBigMotion",r.expandState),k("ant-menu-light",r.theme==="light")("ant-menu-dark",r.theme==="dark")("ant-menu-submenu-placement-bottom",r.mode==="horizontal")("ant-menu-submenu-placement-right",r.mode==="vertical"&&r.position==="right")("ant-menu-submenu-placement-left",r.mode==="vertical"&&r.position==="left")("ant-menu-submenu-rtl",r.dir==="rtl"))},inputs:{menuClass:"menuClass",theme:"theme",templateOutlet:"templateOutlet",isMenuInsideDropDown:"isMenuInsideDropDown",mode:"mode",position:"position",nzDisabled:"nzDisabled",nzOpen:"nzOpen"},outputs:{subMenuMouseState:"subMenuMouseState"},exportAs:["nzSubmenuNoneInlineChild"],standalone:!0,features:[oe,K],attrs:EF,decls:2,vars:16,consts:[[3,"ngClass"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,xF,0,0,"ng-template",1),S()),i&2&&(k("ant-dropdown-menu",r.isMenuInsideDropDown)("ant-menu",!r.isMenuInsideDropDown)("ant-dropdown-menu-vertical",r.isMenuInsideDropDown)("ant-menu-vertical",!r.isMenuInsideDropDown)("ant-dropdown-menu-sub",r.isMenuInsideDropDown)("ant-menu-sub",!r.isMenuInsideDropDown)("ant-menu-rtl",r.dir==="rtl"),h("ngClass",r.menuClass),f(),h("ngTemplateOutlet",r.templateOutlet))},dependencies:[St,Be],encapsulation:2,data:{animation:[Is,Mo]},changeDetection:0});let o=n;return o})(),zb=(()=>{let n=class n{constructor(t,i){this.cdr=t,this.directionality=i,this.nzIcon=null,this.nzTitle=null,this.isMenuInsideDropDown=!1,this.nzDisabled=!1,this.paddingLeft=null,this.mode="vertical",this.toggleSubMenu=new O,this.subMenuMouseState=new O,this.dir="ltr",this.destroy$=new J}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setMouseState(t){this.nzDisabled||this.subMenuMouseState.next(t)}clickTitle(){this.mode==="inline"&&!this.nzDisabled&&this.toggleSubMenu.emit()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu-title",""]],hostVars:8,hostBindings:function(i,r){i&1&&A("click",function(){return r.clickTitle()})("mouseenter",function(){return r.setMouseState(!0)})("mouseleave",function(){return r.setMouseState(!1)}),i&2&&(Re("padding-left",r.dir==="rtl"?null:r.paddingLeft,"px")("padding-right",r.dir==="rtl"?r.paddingLeft:null,"px"),k("ant-dropdown-menu-submenu-title",r.isMenuInsideDropDown)("ant-menu-submenu-title",!r.isMenuInsideDropDown))},inputs:{nzIcon:"nzIcon",nzTitle:"nzTitle",isMenuInsideDropDown:"isMenuInsideDropDown",nzDisabled:"nzDisabled",paddingLeft:"paddingLeft",mode:"mode"},outputs:{toggleSubMenu:"toggleSubMenu",subMenuMouseState:"subMenuMouseState"},exportAs:["nzSubmenuTitle"],standalone:!0,features:[K],attrs:zF,ngContentSelectors:Eb,decls:6,vars:4,consts:[["nz-icon","",3,"nzType",4,"ngIf"],[4,"nzStringTemplateOutlet"],["class","ant-dropdown-menu-submenu-expand-icon",3,"ngSwitch",4,"ngIf","ngIfElse"],["notDropdownTpl",""],["nz-icon","",3,"nzType"],[1,"ant-menu-title-content"],[1,"ant-dropdown-menu-submenu-expand-icon",3,"ngSwitch"],["nz-icon","","nzType","left","class","ant-dropdown-menu-submenu-arrow-icon",4,"ngSwitchCase"],["nz-icon","","nzType","right","class","ant-dropdown-menu-submenu-arrow-icon",4,"ngSwitchDefault"],["nz-icon","","nzType","left",1,"ant-dropdown-menu-submenu-arrow-icon"],["nz-icon","","nzType","right",1,"ant-dropdown-menu-submenu-arrow-icon"],[1,"ant-menu-submenu-arrow"]],template:function(i,r){if(i&1&&(Pe(),_(0,OF,1,1,"span",0)(1,DF,3,1,"ng-container",1),Ie(2),_(3,PF,3,2,"span",2)(4,MF,1,0,"ng-template",null,3,_e)),i&2){let s=te(5);h("ngIf",r.nzIcon),f(),h("nzStringTemplateOutlet",r.nzTitle),f(2),h("ngIf",r.isMenuInsideDropDown)("ngIfElse",s)}},dependencies:[Ge,Fe,we,Ye,Ue,jn,Wn,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),Tb=[bt.rightTop,bt.right,bt.rightBottom,bt.leftTop,bt.left,bt.leftBottom],QF=[bt.bottomLeft,bt.bottomRight,bt.topRight,bt.topLeft],Jp=(()=>{let n=class n{setOpenStateWithoutDebounce(t){this.nzSubmenuService.setOpenStateWithoutDebounce(t)}toggleSubMenu(){this.setOpenStateWithoutDebounce(!this.nzOpen)}setMouseEnterState(t){this.isActive=t,this.mode!=="inline"&&this.nzSubmenuService.setMouseEnterTitleOrOverlayState(t)}setTriggerWidth(){this.mode==="horizontal"&&this.platform.isBrowser&&this.cdkOverlayOrigin&&this.nzPlacement==="bottomLeft"&&(this.triggerWidth=this.cdkOverlayOrigin.nativeElement.getBoundingClientRect().width)}onPositionChange(t){let i=Da(t);i==="rightTop"||i==="rightBottom"||i==="right"?this.position="right":(i==="leftTop"||i==="leftBottom"||i==="left")&&(this.position="left")}constructor(t,i,r,s,a,l,c){this.nzMenuService=t,this.cdr=i,this.nzSubmenuService=r,this.platform=s,this.isMenuInsideDropDown=a,this.directionality=l,this.noAnimation=c,this.nzMenuClassName="",this.nzPaddingLeft=null,this.nzTitle=null,this.nzIcon=null,this.nzOpen=!1,this.nzDisabled=!1,this.nzPlacement="bottomLeft",this.nzOpenChange=new O,this.cdkOverlayOrigin=null,this.listOfNzSubMenuComponent=null,this.listOfNzMenuItemDirective=null,this.level=this.nzSubmenuService.level,this.destroy$=new J,this.position="right",this.triggerWidth=null,this.theme="light",this.mode="vertical",this.inlinePaddingLeft=null,this.overlayPositions=Tb,this.isSelected=!1,this.isActive=!1,this.dir="ltr"}ngOnInit(){this.nzMenuService.theme$.pipe(F(this.destroy$)).subscribe(t=>{this.theme=t,this.cdr.markForCheck()}),this.nzSubmenuService.mode$.pipe(F(this.destroy$)).subscribe(t=>{this.mode=t,t==="horizontal"?this.overlayPositions=[bt[this.nzPlacement],...QF]:t==="vertical"&&(this.overlayPositions=Tb),this.cdr.markForCheck()}),Fn([this.nzSubmenuService.mode$,this.nzMenuService.inlineIndent$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{this.inlinePaddingLeft=t==="inline"?this.level*i:null,this.cdr.markForCheck()}),this.nzSubmenuService.isCurrentSubMenuOpen$.pipe(F(this.destroy$)).subscribe(t=>{this.isActive=t,t!==this.nzOpen&&(this.setTriggerWidth(),this.nzOpen=t,this.nzOpenChange.emit(this.nzOpen),this.cdr.markForCheck())}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.markForCheck()})}ngAfterContentInit(){this.setTriggerWidth();let t=this.listOfNzMenuItemDirective,i=t.changes,r=_t(i,...t.map(s=>s.selected$));i.pipe(Ot(t),on(()=>r),Ot(!0),We(()=>t.some(s=>s.nzSelected)),F(this.destroy$)).subscribe(s=>{this.isSelected=s,this.cdr.markForCheck()})}ngOnChanges(t){let{nzOpen:i}=t;i&&(this.nzSubmenuService.setOpenStateWithoutDebounce(this.nzOpen),this.setTriggerWidth())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(so),w(fe),w(Bm),w(gn),w(ao),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["","nz-submenu",""]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,n,5),Ft(s,co,5)),i&2){let a;ce(a=ue())&&(r.listOfNzSubMenuComponent=a),ce(a=ue())&&(r.listOfNzMenuItemDirective=a)}},viewQuery:function(i,r){if(i&1&&xe(dr,7,de),i&2){let s;ce(s=ue())&&(r.cdkOverlayOrigin=s.first)}},hostVars:34,hostBindings:function(i,r){i&2&&k("ant-dropdown-menu-submenu",r.isMenuInsideDropDown)("ant-dropdown-menu-submenu-disabled",r.isMenuInsideDropDown&&r.nzDisabled)("ant-dropdown-menu-submenu-open",r.isMenuInsideDropDown&&r.nzOpen)("ant-dropdown-menu-submenu-selected",r.isMenuInsideDropDown&&r.isSelected)("ant-dropdown-menu-submenu-vertical",r.isMenuInsideDropDown&&r.mode==="vertical")("ant-dropdown-menu-submenu-horizontal",r.isMenuInsideDropDown&&r.mode==="horizontal")("ant-dropdown-menu-submenu-inline",r.isMenuInsideDropDown&&r.mode==="inline")("ant-dropdown-menu-submenu-active",r.isMenuInsideDropDown&&r.isActive)("ant-menu-submenu",!r.isMenuInsideDropDown)("ant-menu-submenu-disabled",!r.isMenuInsideDropDown&&r.nzDisabled)("ant-menu-submenu-open",!r.isMenuInsideDropDown&&r.nzOpen)("ant-menu-submenu-selected",!r.isMenuInsideDropDown&&r.isSelected)("ant-menu-submenu-vertical",!r.isMenuInsideDropDown&&r.mode==="vertical")("ant-menu-submenu-horizontal",!r.isMenuInsideDropDown&&r.mode==="horizontal")("ant-menu-submenu-inline",!r.isMenuInsideDropDown&&r.mode==="inline")("ant-menu-submenu-active",!r.isMenuInsideDropDown&&r.isActive)("ant-menu-submenu-rtl",r.dir==="rtl")},inputs:{nzMenuClassName:"nzMenuClassName",nzPaddingLeft:"nzPaddingLeft",nzTitle:"nzTitle",nzIcon:"nzIcon",nzOpen:"nzOpen",nzDisabled:"nzDisabled",nzPlacement:"nzPlacement"},outputs:{nzOpenChange:"nzOpenChange"},exportAs:["nzSubmenu"],standalone:!0,features:[Ve([Bm]),oe,K],attrs:FF,ngContentSelectors:HF,decls:8,vars:9,consts:[["nz-submenu-title","","cdkOverlayOrigin","",3,"nzIcon","nzTitle","mode","nzDisabled","isMenuInsideDropDown","paddingLeft","subMenuMouseState","toggleSubMenu"],["origin","cdkOverlayOrigin"],[4,"ngIf"],["nz-submenu-inline-child","",3,"mode","nzOpen","nzNoAnimation","menuClass","templateOutlet",4,"ngIf","ngIfElse"],["nonInlineTemplate",""],["subMenuTemplate",""],["nz-submenu-inline-child","",3,"mode","nzOpen","nzNoAnimation","menuClass","templateOutlet"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayPositions","cdkConnectedOverlayOrigin","cdkConnectedOverlayWidth","cdkConnectedOverlayOpen","cdkConnectedOverlayTransformOriginOn","positionChange"],["nz-submenu-none-inline-child","",3,"theme","mode","nzOpen","position","nzDisabled","isMenuInsideDropDown","templateOutlet","menuClass","nzNoAnimation","subMenuMouseState"]],template:function(i,r){if(i&1&&(Pe(GF),C(0,"div",0,1),A("subMenuMouseState",function(a){return r.setMouseEnterState(a)})("toggleSubMenu",function(){return r.toggleSubMenu()}),_(2,AF,1,0,"ng-content",2),S(),_(3,NF,1,6,"div",3)(4,kF,1,5,"ng-template",null,4,_e)(6,VF,1,0,"ng-template",null,5,_e)),i&2){let s=te(5);h("nzIcon",r.nzIcon)("nzTitle",r.nzTitle)("mode",r.mode)("nzDisabled",r.nzDisabled)("isMenuInsideDropDown",r.isMenuInsideDropDown)("paddingLeft",r.nzPaddingLeft||r.inlinePaddingLeft),f(2),h("ngIf",!r.nzTitle),f(),h("ngIf",r.mode==="inline")("ngIfElse",s)}},dependencies:[zb,qF,we,ft,YF,Fr,oi,dr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzOpen",void 0),N([W()],o.prototype,"nzDisabled",void 0),o})();function XF(){let o=ae(so,{skipSelf:!0,optional:!0}),n=ae(xb);return o??n}function ZF(){return ae(ao,{skipSelf:!0,optional:!0})??!1}var cs=(()=>{let n=class n{setInlineCollapsed(t){this.nzInlineCollapsed=t,this.inlineCollapsed$.next(t)}updateInlineCollapse(){this.listOfNzMenuItemDirective&&(this.nzInlineCollapsed?(this.listOfOpenedNzSubMenuComponent=this.listOfNzSubMenuComponent.filter(t=>t.nzOpen),this.listOfNzSubMenuComponent.forEach(t=>t.setOpenStateWithoutDebounce(!1))):(this.listOfOpenedNzSubMenuComponent.forEach(t=>t.setOpenStateWithoutDebounce(!0)),this.listOfOpenedNzSubMenuComponent=[]))}constructor(t,i,r,s){this.nzMenuService=t,this.isMenuInsideDropDown=i,this.cdr=r,this.directionality=s,this.nzInlineIndent=24,this.nzTheme="light",this.nzMode="vertical",this.nzInlineCollapsed=!1,this.nzSelectable=!this.isMenuInsideDropDown,this.nzClick=new O,this.actualMode="vertical",this.dir="ltr",this.inlineCollapsed$=new ct(this.nzInlineCollapsed),this.mode$=new ct(this.nzMode),this.destroy$=new J,this.listOfOpenedNzSubMenuComponent=[]}ngOnInit(){Fn([this.inlineCollapsed$,this.mode$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{this.actualMode=t?"vertical":i,this.nzMenuService.setMode(this.actualMode),this.cdr.markForCheck()}),this.nzMenuService.descendantMenuItemClick$.pipe(F(this.destroy$)).subscribe(t=>{this.nzClick.emit(t),this.nzSelectable&&!t.nzMatchRouter&&this.listOfNzMenuItemDirective.forEach(i=>i.setSelectedState(i===t))}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.nzMenuService.setMode(this.actualMode),this.cdr.markForCheck()})}ngAfterContentInit(){this.inlineCollapsed$.pipe(F(this.destroy$)).subscribe(()=>{this.updateInlineCollapse(),this.cdr.markForCheck()})}ngOnChanges(t){let{nzInlineCollapsed:i,nzInlineIndent:r,nzTheme:s,nzMode:a}=t;i&&this.inlineCollapsed$.next(this.nzInlineCollapsed),r&&this.nzMenuService.setInlineIndent(this.nzInlineIndent),s&&this.nzMenuService.setTheme(this.nzTheme),a&&(this.mode$.next(this.nzMode),!t.nzMode.isFirstChange()&&this.listOfNzSubMenuComponent&&this.listOfNzSubMenuComponent.forEach(l=>l.setOpenStateWithoutDebounce(!1)))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(so),w(ao),w(fe),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-menu",""]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,co,5),Ft(s,Jp,5)),i&2){let a;ce(a=ue())&&(r.listOfNzMenuItemDirective=a),ce(a=ue())&&(r.listOfNzSubMenuComponent=a)}},hostVars:34,hostBindings:function(i,r){i&2&&k("ant-dropdown-menu",r.isMenuInsideDropDown)("ant-dropdown-menu-root",r.isMenuInsideDropDown)("ant-dropdown-menu-light",r.isMenuInsideDropDown&&r.nzTheme==="light")("ant-dropdown-menu-dark",r.isMenuInsideDropDown&&r.nzTheme==="dark")("ant-dropdown-menu-vertical",r.isMenuInsideDropDown&&r.actualMode==="vertical")("ant-dropdown-menu-horizontal",r.isMenuInsideDropDown&&r.actualMode==="horizontal")("ant-dropdown-menu-inline",r.isMenuInsideDropDown&&r.actualMode==="inline")("ant-dropdown-menu-inline-collapsed",r.isMenuInsideDropDown&&r.nzInlineCollapsed)("ant-menu",!r.isMenuInsideDropDown)("ant-menu-root",!r.isMenuInsideDropDown)("ant-menu-light",!r.isMenuInsideDropDown&&r.nzTheme==="light")("ant-menu-dark",!r.isMenuInsideDropDown&&r.nzTheme==="dark")("ant-menu-vertical",!r.isMenuInsideDropDown&&r.actualMode==="vertical")("ant-menu-horizontal",!r.isMenuInsideDropDown&&r.actualMode==="horizontal")("ant-menu-inline",!r.isMenuInsideDropDown&&r.actualMode==="inline")("ant-menu-inline-collapsed",!r.isMenuInsideDropDown&&r.nzInlineCollapsed)("ant-menu-rtl",r.dir==="rtl")},inputs:{nzInlineIndent:"nzInlineIndent",nzTheme:"nzTheme",nzMode:"nzMode",nzInlineCollapsed:"nzInlineCollapsed",nzSelectable:"nzSelectable"},outputs:{nzClick:"nzClick"},exportAs:["nzMenu"],standalone:!0,features:[Ve([{provide:xb,useClass:so},{provide:so,useFactory:XF},{provide:ao,useFactory:ZF}]),oe]});let o=n;return N([W()],o.prototype,"nzInlineCollapsed",void 0),N([W()],o.prototype,"nzSelectable",void 0),o})();function JF(){return ae(ao,{optional:!0,skipSelf:!0})??!1}var e1=(()=>{let n=class n{constructor(t,i,r){this.elementRef=t,this.renderer=i,this.isMenuInsideDropDown=r;let s=this.isMenuInsideDropDown?"ant-dropdown-menu-item-group":"ant-menu-item-group";this.renderer.addClass(t.nativeElement,s)}ngAfterViewInit(){let t=this.titleElement.nativeElement.nextElementSibling;if(t){let i=this.isMenuInsideDropDown?"ant-dropdown-menu-item-group-list":"ant-menu-item-group-list";this.renderer.addClass(t,i)}}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(ao))},n.\u0275cmp=j({type:n,selectors:[["","nz-menu-group",""]],viewQuery:function(i,r){if(i&1&&xe(BF,5),i&2){let s;ce(s=ue())&&(r.titleElement=s.first)}},inputs:{nzTitle:"nzTitle"},exportAs:["nzMenuGroup"],standalone:!0,features:[Ve([{provide:ao,useFactory:JF}]),K],attrs:$F,ngContentSelectors:KF,decls:5,vars:6,consts:[["titleElement",""],[4,"nzStringTemplateOutlet"],[4,"ngIf"]],template:function(i,r){i&1&&(Pe(UF),C(0,"div",null,0),_(2,jF,2,1,"ng-container",1)(3,WF,1,0,"ng-content",2),S(),Ie(4)),i&2&&(k("ant-menu-item-group-title",!r.isMenuInsideDropDown)("ant-dropdown-menu-item-group-title",r.isMenuInsideDropDown),f(2),h("nzStringTemplateOutlet",r.nzTitle),f(),h("ngIf",!r.nzTitle))},dependencies:[Ye,Ue,we],encapsulation:2,changeDetection:0});let o=n;return o})(),Ob=(()=>{let n=class n{constructor(t){this.elementRef=t}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275dir=Se({type:n,selectors:[["","nz-menu-divider",""]],hostAttrs:[1,"ant-dropdown-menu-item-divider"],exportAs:["nzMenuDivider"],standalone:!0});let o=n;return o})(),ec=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Jp,e1,zb]});let o=n;return o})();function t1(o,n){if(o&1){let e=Q();C(0,"div",0),A("@slideMotion.done",function(i){I(e);let r=m();return P(r.onAnimationEvent(i))})("mouseenter",function(){I(e);let i=m();return P(i.setMouseState(!0))})("mouseleave",function(){I(e);let i=m();return P(i.setMouseState(!1))}),Ie(1),S()}if(o&2){let e=m();k("ant-dropdown-rtl",e.dir==="rtl"),h("ngClass",e.nzOverlayClassName)("ngStyle",e.nzOverlayStyle)("@slideMotion",void 0)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)}}var n1=["*"],i1="dropDown",r1=[bt.bottomLeft,bt.bottomRight,bt.topRight,bt.topLeft],yr=(()=>{let n=class n{setDropdownMenuValue(t,i){this.nzDropdownMenu&&this.nzDropdownMenu.setValue(t,i)}constructor(t,i,r,s,a,l){this.nzConfigService=t,this.elementRef=i,this.overlay=r,this.renderer=s,this.viewContainerRef=a,this.platform=l,this._nzModuleName=i1,this.overlayRef=null,this.destroy$=new J,this.positionStrategy=this.overlay.position().flexibleConnectedTo(this.elementRef.nativeElement).withLockedPosition().withTransformOriginOn(".ant-dropdown"),this.inputVisible$=new ct(!1),this.nzTrigger$=new ct("hover"),this.overlayClose$=new J,this.nzDropdownMenu=null,this.nzTrigger="hover",this.nzMatchWidthElement=null,this.nzBackdrop=!1,this.nzClickHide=!0,this.nzDisabled=!1,this.nzVisible=!1,this.nzOverlayClassName="",this.nzOverlayStyle={},this.nzPlacement="bottomLeft",this.nzVisibleChange=new O}ngAfterViewInit(){if(this.nzDropdownMenu){let t=this.elementRef.nativeElement,i=_t(Ke(t,"mouseenter").pipe(Tl(!0)),Ke(t,"mouseleave").pipe(Tl(!1))),r=this.nzDropdownMenu.mouseState$,s=_t(r,i),a=Ke(t,"click").pipe(We(()=>!this.nzVisible)),l=this.nzTrigger$.pipe(on(p=>p==="hover"?s:p==="click"?a:xs)),c=this.nzDropdownMenu.descendantMenuItemClick$.pipe(Qe(()=>this.nzClickHide),Tl(!1)),u=_t(l,c,this.overlayClose$).pipe(Qe(()=>!this.nzDisabled)),d=_t(this.inputVisible$,u);Fn([d,this.nzDropdownMenu.isChildSubMenuOpen$]).pipe(We(([p,g])=>p||g),zs(150),Bt(),Qe(()=>this.platform.isBrowser),F(this.destroy$)).subscribe(p=>{let v=(this.nzMatchWidthElement?this.nzMatchWidthElement.nativeElement:t).getBoundingClientRect().width;if(this.nzVisible!==p&&this.nzVisibleChange.emit(p),this.nzVisible=p,p){if(!this.overlayRef)this.overlayRef=this.overlay.create({positionStrategy:this.positionStrategy,minWidth:v,disposeOnNavigation:!0,hasBackdrop:this.nzBackdrop&&this.nzTrigger==="click",scrollStrategy:this.overlay.scrollStrategies.reposition()}),_t(this.overlayRef.backdropClick(),this.overlayRef.detachments(),this.overlayRef.outsidePointerEvents().pipe(Qe(y=>!this.elementRef.nativeElement.contains(y.target))),this.overlayRef.keydownEvents().pipe(Qe(y=>y.keyCode===27&&!Nl(y)))).pipe(F(this.destroy$)).subscribe(()=>{this.overlayClose$.next(!1)});else{let y=this.overlayRef.getConfig();y.minWidth=v}this.positionStrategy.withPositions([bt[this.nzPlacement],...r1]),(!this.portal||this.portal.templateRef!==this.nzDropdownMenu.templateRef)&&(this.portal=new au(this.nzDropdownMenu.templateRef,this.viewContainerRef)),this.overlayRef.attach(this.portal)}else this.overlayRef&&this.overlayRef.detach()}),this.nzDropdownMenu.animationStateChange$.pipe(F(this.destroy$)).subscribe(p=>{p.toState==="void"&&(this.overlayRef&&this.overlayRef.dispose(),this.overlayRef=null)})}}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete(),this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}ngOnChanges(t){let{nzVisible:i,nzDisabled:r,nzOverlayClassName:s,nzOverlayStyle:a,nzTrigger:l}=t;if(l&&this.nzTrigger$.next(this.nzTrigger),i&&this.inputVisible$.next(this.nzVisible),r){let c=this.elementRef.nativeElement;this.nzDisabled?(this.renderer.setAttribute(c,"disabled",""),this.inputVisible$.next(!1)):this.renderer.removeAttribute(c,"disabled")}s&&this.setDropdownMenuValue("nzOverlayClassName",this.nzOverlayClassName),a&&this.setDropdownMenuValue("nzOverlayStyle",this.nzOverlayStyle)}};n.\u0275fac=function(i){return new(i||n)(w(st),w(de),w(ss),w(He),w(Tn),w(gn))},n.\u0275dir=Se({type:n,selectors:[["","nz-dropdown",""]],hostAttrs:[1,"ant-dropdown-trigger"],inputs:{nzDropdownMenu:"nzDropdownMenu",nzTrigger:"nzTrigger",nzMatchWidthElement:"nzMatchWidthElement",nzBackdrop:"nzBackdrop",nzClickHide:"nzClickHide",nzDisabled:"nzDisabled",nzVisible:"nzVisible",nzOverlayClassName:"nzOverlayClassName",nzOverlayStyle:"nzOverlayStyle",nzPlacement:"nzPlacement"},outputs:{nzVisibleChange:"nzVisibleChange"},exportAs:["nzDropdown"],standalone:!0,features:[oe]});let o=n;return N([De(),W()],o.prototype,"nzBackdrop",void 0),N([W()],o.prototype,"nzClickHide",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzVisible",void 0),o})(),Db=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})(),Rb=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["a","nz-dropdown",""]],hostAttrs:[1,"ant-dropdown-link"],standalone:!0});let o=n;return o})();var us=(()=>{let n=class n{onAnimationEvent(t){this.animationStateChange$.emit(t)}setMouseState(t){this.mouseState$.next(t)}setValue(t,i){this[t]=i,this.cdr.markForCheck()}constructor(t,i,r,s,a,l,c){this.cdr=t,this.elementRef=i,this.renderer=r,this.viewContainerRef=s,this.nzMenuService=a,this.directionality=l,this.noAnimation=c,this.mouseState$=new ct(!1),this.isChildSubMenuOpen$=this.nzMenuService.isChildSubMenuOpen$,this.descendantMenuItemClick$=this.nzMenuService.descendantMenuItemClick$,this.animationStateChange$=new O,this.nzOverlayClassName="",this.nzOverlayStyle={},this.dir="ltr",this.destroy$=new J}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterContentInit(){this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(de),w(He),w(Tn),w(so),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-dropdown-menu"]],viewQuery:function(i,r){if(i&1&&xe(En,7),i&2){let s;ce(s=ue())&&(r.templateRef=s.first)}},exportAs:["nzDropdownMenu"],standalone:!0,features:[Ve([so,{provide:ao,useValue:!0}]),K],ngContentSelectors:n1,decls:1,vars:0,consts:[[1,"ant-dropdown",3,"ngClass","ngStyle","nzNoAnimation","mouseenter","mouseleave"]],template:function(i,r){i&1&&(Pe(),_(0,t1,2,7,"ng-template"))},dependencies:[St,Zt,ft],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return o})(),Lr=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Db,ec]});let o=n;return o})(),o1=[new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"top"}),new ln({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"}),new ln({originX:"start",originY:"top"},{overlayX:"end",overlayY:"bottom"}),new ln({originX:"start",originY:"top"},{overlayX:"end",overlayY:"top"})],Ib=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.overlay=i,this.overlayRef=null,this.closeSubscription=lr.EMPTY}create(t,i){this.close(!0);let{x:r,y:s}=t;t instanceof MouseEvent&&t.preventDefault();let a=this.overlay.position().flexibleConnectedTo({x:r,y:s}).withPositions(o1).withTransformOriginOn(".ant-dropdown");return this.overlayRef=this.overlay.create({positionStrategy:a,disposeOnNavigation:!0,scrollStrategy:this.overlay.scrollStrategies.close()}),this.closeSubscription=new lr,this.closeSubscription.add(i.descendantMenuItemClick$.subscribe(()=>this.close())),this.closeSubscription.add(this.ngZone.runOutsideAngular(()=>_t(Ke(document,"click").pipe(Qe(l=>!!this.overlayRef&&!this.overlayRef.overlayElement.contains(l.target)),Qe(l=>l.button!==2)),Ke(document,"keydown").pipe(Qe(l=>l.key==="Escape"))).pipe(xl()).subscribe(()=>this.ngZone.run(()=>this.close())))),this.overlayRef.attach(new au(i.templateRef,i.viewContainerRef))}close(t=!1){this.overlayRef&&(this.overlayRef.detach(),t&&this.overlayRef.dispose(),this.overlayRef=null,this.closeSubscription.unsubscribe())}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(ss))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:Db});let o=n;return o})();function s1(o,n){if(o&1&&(H(0),R(1,"img",5),B()),o&2){let e=m(2);f(),h("src",e.nzNotFoundImage,Do)("alt",e.isContentString?e.nzNotFoundContent:"empty")}}function a1(o,n){if(o&1&&(H(0),_(1,s1,2,2,"ng-container",4),B()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzNotFoundImage)}}function l1(o,n){o&1&&R(0,"nz-empty-default")}function c1(o,n){o&1&&R(0,"nz-empty-simple")}function u1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.isContentString?e.nzNotFoundContent:e.locale.description," ")}}function d1(o,n){if(o&1&&(C(0,"p",6),_(1,u1,2,1,"ng-container",4),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzNotFoundContent)}}function p1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.nzNotFoundFooter," ")}}function h1(o,n){if(o&1&&(C(0,"div",7),_(1,p1,2,1,"ng-container",4),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzNotFoundFooter)}}function f1(o,n){o&1&&R(0,"nz-empty",6),o&2&&h("nzNotFoundImage","simple")}function g1(o,n){o&1&&R(0,"nz-empty",7),o&2&&h("nzNotFoundImage","simple")}function m1(o,n){o&1&&R(0,"nz-empty")}function v1(o,n){if(o&1&&(H(0,2),_(1,f1,1,1,"nz-empty",3)(2,g1,1,1,"nz-empty",4)(3,m1,1,0,"nz-empty",5),B()),o&2){let e=m();h("ngSwitch",e.size),f(),h("ngSwitchCase","normal"),f(),h("ngSwitchCase","small")}}function y1(o,n){}function C1(o,n){if(o&1&&_(0,y1,0,0,"ng-template",8),o&2){let e=m(2);h("cdkPortalOutlet",e.contentPortal)}}function _1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.content," ")}}function S1(o,n){if(o&1&&(H(0),_(1,C1,1,1,null,1)(2,_1,2,1,"ng-container",1),B()),o&2){let e=m();f(),h("ngIf",e.contentType!=="string"),f(),h("ngIf",e.contentType==="string")}}var w1=new hn("nz-empty-component-name"),b1=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-empty-default"]],exportAs:["nzEmptyDefault"],standalone:!0,features:[K],decls:12,vars:0,consts:[["width","184","height","152","viewBox","0 0 184 152","xmlns","http://www.w3.org/2000/svg",1,"ant-empty-img-default"],["fill","none","fill-rule","evenodd"],["transform","translate(24 31.67)"],["cx","67.797","cy","106.89","rx","67.797","ry","12.668",1,"ant-empty-img-default-ellipse"],["d","M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",1,"ant-empty-img-default-path-1"],["d","M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z","transform","translate(13.56)",1,"ant-empty-img-default-path-2"],["d","M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",1,"ant-empty-img-default-path-3"],["d","M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",1,"ant-empty-img-default-path-4"],["d","M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",1,"ant-empty-img-default-path-5"],["transform","translate(149.65 15.383)",1,"ant-empty-img-default-g"],["cx","20.654","cy","3.167","rx","2.849","ry","2.815"],["d","M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"]],template:function(i,r){i&1&&(Oo(),C(0,"svg",0)(1,"g",1)(2,"g",2),R(3,"ellipse",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7),S(),R(8,"path",8),C(9,"g",9),R(10,"ellipse",10)(11,"path",11),S()()())},encapsulation:2,changeDetection:0});let o=n;return o})(),T1=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-empty-simple"]],exportAs:["nzEmptySimple"],standalone:!0,features:[K],decls:6,vars:0,consts:[["width","64","height","41","viewBox","0 0 64 41","xmlns","http://www.w3.org/2000/svg",1,"ant-empty-img-simple"],["transform","translate(0 1)","fill","none","fill-rule","evenodd"],["cx","32","cy","33","rx","32","ry","7",1,"ant-empty-img-simple-ellipse"],["fill-rule","nonzero",1,"ant-empty-img-simple-g"],["d","M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"],["d","M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",1,"ant-empty-img-simple-path"]],template:function(i,r){i&1&&(Oo(),C(0,"svg",0)(1,"g",1),R(2,"ellipse",2),C(3,"g",3),R(4,"path",4)(5,"path",5),S()()())},encapsulation:2,changeDetection:0});let o=n;return o})(),E1=["default","simple"],Pb=(()=>{let n=class n{constructor(t,i){this.i18n=t,this.cdr=i,this.nzNotFoundImage="default",this.isContentString=!1,this.isImageBuildIn=!0,this.destroy$=new J}ngOnChanges(t){let{nzNotFoundContent:i,nzNotFoundImage:r}=t;if(i){let s=i.currentValue;this.isContentString=typeof s=="string"}if(r){let s=r.currentValue||"default";this.isImageBuildIn=E1.findIndex(a=>a===s)>-1}}ngOnInit(){this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Empty"),this.cdr.markForCheck()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Di),w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-empty"]],hostAttrs:[1,"ant-empty"],inputs:{nzNotFoundImage:"nzNotFoundImage",nzNotFoundContent:"nzNotFoundContent",nzNotFoundFooter:"nzNotFoundFooter"},exportAs:["nzEmpty"],standalone:!0,features:[oe,K],decls:6,vars:5,consts:[[1,"ant-empty-image"],[4,"ngIf"],["class","ant-empty-description",4,"ngIf"],["class","ant-empty-footer",4,"ngIf"],[4,"nzStringTemplateOutlet"],[3,"src","alt"],[1,"ant-empty-description"],[1,"ant-empty-footer"]],template:function(i,r){i&1&&(C(0,"div",0),_(1,a1,2,1,"ng-container",1)(2,l1,1,0,"nz-empty-default",1)(3,c1,1,0,"nz-empty-simple",1),S(),_(4,d1,2,1,"p",2)(5,h1,2,1,"div",3)),i&2&&(f(),h("ngIf",!r.isImageBuildIn),f(),h("ngIf",r.isImageBuildIn&&r.nzNotFoundImage!=="simple"),f(),h("ngIf",r.isImageBuildIn&&r.nzNotFoundImage==="simple"),f(),h("ngIf",r.nzNotFoundContent!==null),f(),h("ngIf",r.nzNotFoundFooter))},dependencies:[we,Ye,Ue,b1,T1],encapsulation:2,changeDetection:0});let o=n;return o})();function x1(o){switch(o){case"table":case"list":return"normal";case"select":case"tree-select":case"cascader":case"transfer":return"small";default:return""}}var Tu=(()=>{let n=class n{constructor(t,i,r,s){this.configService=t,this.viewContainerRef=i,this.cdr=r,this.injector=s,this.contentType="string",this.size="",this.destroy$=new J}ngOnChanges(t){t.nzComponentName&&(this.size=x1(t.nzComponentName.currentValue)),t.specificContent&&!t.specificContent.isFirstChange()&&(this.content=t.specificContent.currentValue,this.renderEmpty())}ngOnInit(){this.subscribeDefaultEmptyContentChange()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}renderEmpty(){let t=this.content;if(typeof t=="string")this.contentType="string";else if(t instanceof En){let i={$implicit:this.nzComponentName};this.contentType="template",this.contentPortal=new au(t,this.viewContainerRef,i)}else if(t instanceof wS){let i=$n.create({parent:this.injector,providers:[{provide:w1,useValue:this.nzComponentName}]});this.contentType="component",this.contentPortal=new kl(t,this.viewContainerRef,i)}else this.contentType="string",this.contentPortal=void 0;this.cdr.detectChanges()}subscribeDefaultEmptyContentChange(){this.configService.getConfigChangeEventForComponent("empty").pipe(Ot(!0),F(this.destroy$)).subscribe(()=>{this.content=this.specificContent||this.getUserDefaultEmptyContent(),this.renderEmpty()})}getUserDefaultEmptyContent(){return(this.configService.getConfigForComponent("empty")||{}).nzDefaultEmptyContent}};n.\u0275fac=function(i){return new(i||n)(w(st),w(Tn),w(fe),w($n))},n.\u0275cmp=j({type:n,selectors:[["nz-embed-empty"]],inputs:{nzComponentName:"nzComponentName",specificContent:"specificContent"},exportAs:["nzEmbedEmpty"],standalone:!0,features:[oe,K],decls:2,vars:2,consts:[[3,"ngSwitch",4,"ngIf"],[4,"ngIf"],[3,"ngSwitch"],["class","ant-empty-normal",3,"nzNotFoundImage",4,"ngSwitchCase"],["class","ant-empty-small",3,"nzNotFoundImage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"ant-empty-normal",3,"nzNotFoundImage"],[1,"ant-empty-small",3,"nzNotFoundImage"],[3,"cdkPortalOutlet"]],template:function(i,r){i&1&&_(0,v1,4,3,"ng-container",0)(1,S1,3,2,"ng-container",1),i&2&&(h("ngIf",!r.content&&r.specificContent!==null),f(),h("ngIf",r.content))},dependencies:[Pb,we,jn,Wn,Gi,sw,ow],encapsulation:2,changeDetection:0});let o=n;return o})(),nh=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Pb,Tu]});let o=n;return o})();var Fb=["*"];function O1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.nzLabel)}}function D1(o,n){}function R1(o,n){if(o&1&&_(0,D1,0,0,"ng-template",4),o&2){let e=m();h("ngTemplateOutlet",e.template)}}function I1(o,n){if(o&1&&Y(0),o&2){let e=m();ye(e.label)}}function P1(o,n){o&1&&R(0,"span",7)}function M1(o,n){if(o&1&&(C(0,"div",5),_(1,P1,1,0,"span",6),S()),o&2){let e=m();f(),h("ngIf",!e.icon)("ngIfElse",e.icon)}}function F1(o,n){if(o&1&&(C(0,"div",4),R(1,"nz-embed-empty",5),S()),o&2){let e=m();f(),h("specificContent",e.notFoundContent)}}function A1(o,n){if(o&1&&R(0,"nz-option-item-group",9),o&2){let e=m().$implicit;h("nzLabel",e.groupLabel)}}function N1(o,n){if(o&1){let e=Q();C(0,"nz-option-item",10),A("itemHover",function(i){I(e);let r=m(2);return P(r.onItemHover(i))})("itemClick",function(i){I(e);let r=m(2);return P(r.onItemClick(i))}),S()}if(o&2){let e=m().$implicit,t=m();h("icon",t.menuItemSelectedIcon)("customContent",e.nzCustomContent)("template",e.template)("grouped",!!e.groupLabel)("disabled",e.nzDisabled)("showState",t.mode==="tags"||t.mode==="multiple")("title",e.nzTitle)("label",e.nzLabel)("compareWith",t.compareWith)("activatedValue",t.activatedValue)("listOfSelectedValue",t.listOfSelectedValue)("value",e.nzValue)}}function L1(o,n){if(o&1&&(H(0,6),_(1,A1,1,1,"nz-option-item-group",7)(2,N1,1,12,"nz-option-item",8),B()),o&2){let e=n.$implicit;h("ngSwitch",e.type),f(),h("ngSwitchCase","group"),f(),h("ngSwitchCase","item")}}function k1(o,n){}function V1(o,n){o&1&&Ie(0)}function G1(o,n){o&1&&R(0,"span",3)}function H1(o,n){o&1&&R(0,"span",8)}function B1(o,n){o&1&&R(0,"span",9)}function $1(o,n){if(o&1&&(H(0),_(1,H1,1,0,"span",6)(2,B1,1,0,"span",7),B()),o&2){let e=m(2);f(),h("ngIf",!e.search),f(),h("ngIf",e.search)}}function j1(o,n){if(o&1&&R(0,"span",11),o&2){let e=m().$implicit;h("nzType",e)}}function W1(o,n){if(o&1&&(H(0),_(1,j1,1,1,"span",10),B()),o&2){let e=n.$implicit;f(),h("ngIf",e)}}function U1(o,n){if(o&1&&_(0,W1,2,1,"ng-container",2),o&2){let e=m(2);h("nzStringTemplateOutlet",e.suffixIcon)}}function K1(o,n){if(o&1&&_(0,$1,3,2,"ng-container",4)(1,U1,1,1,"ng-template",null,5,_e),o&2){let e=te(2),t=m();h("ngIf",t.showArrow&&!t.suffixIcon)("ngIfElse",e)}}function q1(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.feedbackIcon)}}function Y1(o,n){o&1&&R(0,"span",1)}function Q1(o,n){if(o&1&&(C(0,"div",4),Y(1),S()),o&2){let e=m(2);f(),ye(e.label)}}function X1(o,n){if(o&1&&Y(0),o&2){let e=m(2);ye(e.label)}}function Z1(o,n){if(o&1&&(H(0),_(1,Q1,2,1,"div",2)(2,X1,1,1,"ng-template",null,3,_e),B()),o&2){let e=te(3),t=m();f(),h("ngIf",t.deletable)("ngIfElse",e)}}function J1(o,n){o&1&&R(0,"span",7)}function eA(o,n){if(o&1){let e=Q();C(0,"span",5),A("click",function(i){I(e);let r=m();return P(r.onDelete(i))}),_(1,J1,1,0,"span",6),S()}if(o&2){let e=m();f(),h("ngIf",!e.removeIcon)("ngIfElse",e.removeIcon)}}var tA=o=>({$implicit:o});function nA(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),Ne(" ",e.placeholder," ")}}var iA=["inputElement"],rA=["mirrorElement"];function oA(o,n){o&1&&R(0,"span",3,4)}function sA(o,n){if(o&1&&R(0,"nz-select-item",6),o&2){let e=m(2);h("deletable",!1)("disabled",!1)("removeIcon",e.removeIcon)("label",e.listOfTopItem[0].nzLabel)("contentTemplateOutlet",e.customTemplate)("contentTemplateOutletContext",e.listOfTopItem[0])}}function aA(o,n){if(o&1){let e=Q();H(0),C(1,"nz-select-search",4),A("isComposingChange",function(i){I(e);let r=m();return P(r.isComposingChange(i))})("valueChange",function(i){I(e);let r=m();return P(r.onInputValueChange(i))}),S(),_(2,sA,1,6,"nz-select-item",5),B()}if(o&2){let e=m();f(),h("nzId",e.nzId)("disabled",e.disabled)("value",e.inputValue)("showInput",e.showSearch)("mirrorSync",!1)("autofocus",e.autofocus)("focusTrigger",e.open),f(),h("ngIf",e.isShowSingleLabel)}}function lA(o,n){if(o&1){let e=Q();C(0,"nz-select-item",9),A("delete",function(){let r=I(e).$implicit,s=m(2);return P(s.onDeleteItem(r.contentTemplateOutletContext))}),S()}if(o&2){let e=n.$implicit,t=m(2);h("removeIcon",t.removeIcon)("label",e.nzLabel)("disabled",e.nzDisabled||t.disabled)("contentTemplateOutlet",e.contentTemplateOutlet)("deletable",!0)("contentTemplateOutletContext",e.contentTemplateOutletContext)}}function cA(o,n){if(o&1){let e=Q();H(0),_(1,lA,1,6,"nz-select-item",7),C(2,"nz-select-search",8),A("isComposingChange",function(i){I(e);let r=m();return P(r.isComposingChange(i))})("valueChange",function(i){I(e);let r=m();return P(r.onInputValueChange(i))}),S(),B()}if(o&2){let e=m();f(),h("ngForOf",e.listOfSlicedItem)("ngForTrackBy",e.trackValue),f(),h("nzId",e.nzId)("disabled",e.disabled)("value",e.inputValue)("autofocus",e.autofocus)("showInput",!0)("mirrorSync",!0)("focusTrigger",e.open)}}function uA(o,n){if(o&1&&R(0,"nz-select-placeholder",10),o&2){let e=m();h("placeholder",e.placeHolder)}}function dA(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",8),o&2){let e=m(3);h("status",e.status)}}function pA(o,n){if(o&1&&_(0,dA,1,1,"nz-form-item-feedback-icon",7),o&2){let e=m(2);h("ngIf",e.hasFeedback&&!!e.status)}}function hA(o,n){if(o&1&&(C(0,"nz-select-arrow",5),_(1,pA,1,1,"ng-template",null,6,_e),S()),o&2){let e=te(2),t=m();h("showArrow",t.nzShowArrow)("loading",t.nzLoading)("search",t.nzOpen&&t.nzShowSearch)("suffixIcon",t.nzSuffixIcon)("feedbackIcon",e)}}function fA(o,n){if(o&1){let e=Q();C(0,"nz-select-clear",9),A("clear",function(){I(e);let i=m();return P(i.onClearSelection())}),S()}if(o&2){let e=m();h("clearIcon",e.nzClearIcon)}}function gA(o,n){if(o&1){let e=Q();C(0,"nz-option-container",10),A("keydown",function(i){I(e);let r=m();return P(r.onKeyDown(i))})("itemClick",function(i){I(e);let r=m();return P(r.onItemClick(i))})("scrollToBottom",function(){I(e);let i=m();return P(i.nzScrollToBottom.emit())}),S()}if(o&2){let e=m();k("ant-select-dropdown-placement-bottomLeft",e.dropDownPosition==="bottomLeft")("ant-select-dropdown-placement-topLeft",e.dropDownPosition==="topLeft")("ant-select-dropdown-placement-bottomRight",e.dropDownPosition==="bottomRight")("ant-select-dropdown-placement-topRight",e.dropDownPosition==="topRight"),h("ngStyle",e.nzDropdownStyle)("itemSize",e.nzOptionHeightPx)("maxItemLength",e.nzOptionOverflowSize)("matchWidth",e.nzDropdownMatchSelectWidth)("@slideMotion","enter")("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("listOfContainerItem",e.listOfContainerItem)("menuItemSelectedIcon",e.nzMenuItemSelectedIcon)("notFoundContent",e.nzNotFoundContent)("activatedValue",e.activatedValue)("listOfSelectedValue",e.listOfValue)("dropdownRender",e.nzDropdownRender)("compareWith",e.compareWith)("mode",e.nzMode)}}var Eu=(()=>{let n=class n{constructor(){this.nzLabel=null,this.changes=new J}ngOnChanges(){this.changes.next()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-option-group"]],inputs:{nzLabel:"nzLabel"},exportAs:["nzOptionGroup"],standalone:!0,features:[oe,K],ngContentSelectors:Fb,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Ab=(()=>{let n=class n{constructor(){this.nzLabel=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-option-item-group"]],hostAttrs:[1,"ant-select-item","ant-select-item-group"],inputs:{nzLabel:"nzLabel"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,O1,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.nzLabel)},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Nb=(()=>{let n=class n{constructor(t,i,r){this.elementRef=t,this.ngZone=i,this.destroy$=r,this.selected=!1,this.activated=!1,this.grouped=!1,this.customContent=!1,this.template=null,this.disabled=!1,this.showState=!1,this.label=null,this.value=null,this.activatedValue=null,this.listOfSelectedValue=[],this.icon=null,this.itemClick=new O,this.itemHover=new O}ngOnChanges(t){let{value:i,activatedValue:r,listOfSelectedValue:s}=t;(i||s)&&(this.selected=this.listOfSelectedValue.some(a=>this.compareWith(a,this.value))),(i||r)&&(this.activated=this.compareWith(this.activatedValue,this.value))}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(()=>{this.disabled||this.ngZone.run(()=>this.itemClick.emit(this.value))}),Ke(this.elementRef.nativeElement,"mouseenter").pipe(F(this.destroy$)).subscribe(()=>{this.disabled||this.ngZone.run(()=>this.itemHover.emit(this.value))})})}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-option-item"]],hostAttrs:[1,"ant-select-item","ant-select-item-option"],hostVars:9,hostBindings:function(i,r){i&2&&(ze("title",r.title),k("ant-select-item-option-grouped",r.grouped)("ant-select-item-option-selected",r.selected&&!r.disabled)("ant-select-item-option-disabled",r.disabled)("ant-select-item-option-active",r.activated&&!r.disabled))},inputs:{grouped:"grouped",customContent:"customContent",template:"template",disabled:"disabled",showState:"showState",title:"title",label:"label",value:"value",activatedValue:"activatedValue",listOfSelectedValue:"listOfSelectedValue",icon:"icon",compareWith:"compareWith"},outputs:{itemClick:"itemClick",itemHover:"itemHover"},standalone:!0,features:[Ve([Pt]),oe,K],decls:5,vars:3,consts:[[1,"ant-select-item-option-content"],[3,"ngIf","ngIfElse"],["noCustomContent",""],["class","ant-select-item-option-state","style","user-select: none","unselectable","on",4,"ngIf"],[3,"ngTemplateOutlet"],["unselectable","on",1,"ant-select-item-option-state",2,"user-select","none"],["nz-icon","","nzType","check","class","ant-select-selected-icon",4,"ngIf","ngIfElse"],["nz-icon","","nzType","check",1,"ant-select-selected-icon"]],template:function(i,r){if(i&1&&(C(0,"div",0),_(1,R1,1,1,"ng-template",1)(2,I1,1,1,"ng-template",null,2,_e),S(),_(4,M1,2,2,"div",3)),i&2){let s=te(3);f(),h("ngIf",r.customContent)("ngIfElse",s),f(3),h("ngIf",r.showState&&r.selected)}},dependencies:[we,Be,Ge,Fe],encapsulation:2,changeDetection:0});let o=n;return o})(),Lb=(()=>{let n=class n{constructor(){this.notFoundContent=void 0,this.menuItemSelectedIcon=null,this.dropdownRender=null,this.activatedValue=null,this.listOfSelectedValue=[],this.mode="default",this.matchWidth=!0,this.itemSize=32,this.maxItemLength=8,this.listOfContainerItem=[],this.itemClick=new O,this.scrollToBottom=new O,this.scrolledIndex=0,this.ngZone=ae($e),this.platformId=ae(bS)}onItemClick(t){this.itemClick.emit(t)}onItemHover(t){this.activatedValue=t}trackValue(t,i){return i.key}onScrolledIndexChange(t){this.scrolledIndex=t,t===this.listOfContainerItem.length-this.maxItemLength&&this.scrollToBottom.emit()}scrollToActivatedValue(){let t=this.listOfContainerItem.findIndex(i=>this.compareWith(i.key,this.activatedValue));(t=this.scrolledIndex+this.maxItemLength)&&this.cdkVirtualScrollViewport.scrollToIndex(t||0)}ngOnChanges(t){let{listOfContainerItem:i,activatedValue:r}=t;(i||r)&&this.scrollToActivatedValue()}ngAfterViewInit(){AS(this.platformId)&&this.ngZone.runOutsideAngular(()=>setTimeout(()=>this.scrollToActivatedValue()))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-option-container"]],viewQuery:function(i,r){if(i&1&&xe(ur,7),i&2){let s;ce(s=ue())&&(r.cdkVirtualScrollViewport=s.first)}},hostAttrs:[1,"ant-select-dropdown"],inputs:{notFoundContent:"notFoundContent",menuItemSelectedIcon:"menuItemSelectedIcon",dropdownRender:"dropdownRender",activatedValue:"activatedValue",listOfSelectedValue:"listOfSelectedValue",compareWith:"compareWith",mode:"mode",matchWidth:"matchWidth",itemSize:"itemSize",maxItemLength:"maxItemLength",listOfContainerItem:"listOfContainerItem"},outputs:{itemClick:"itemClick",scrollToBottom:"scrollToBottom"},exportAs:["nzOptionContainer"],standalone:!0,features:[oe,K],decls:5,vars:14,consts:[["class","ant-select-item-empty",4,"ngIf"],[3,"itemSize","maxBufferPx","minBufferPx","scrolledIndexChange"],["cdkVirtualFor","",3,"cdkVirtualForOf","cdkVirtualForTrackBy","cdkVirtualForTemplateCacheSize"],[3,"ngTemplateOutlet"],[1,"ant-select-item-empty"],["nzComponentName","select",3,"specificContent"],[3,"ngSwitch"],[3,"nzLabel",4,"ngSwitchCase"],[3,"icon","customContent","template","grouped","disabled","showState","title","label","compareWith","activatedValue","listOfSelectedValue","value","itemHover","itemClick",4,"ngSwitchCase"],[3,"nzLabel"],[3,"icon","customContent","template","grouped","disabled","showState","title","label","compareWith","activatedValue","listOfSelectedValue","value","itemHover","itemClick"]],template:function(i,r){i&1&&(C(0,"div"),_(1,F1,2,1,"div",0),C(2,"cdk-virtual-scroll-viewport",1),A("scrolledIndexChange",function(a){return r.onScrolledIndexChange(a)}),_(3,L1,3,3,"ng-template",2),S(),_(4,k1,0,0,"ng-template",3),S()),i&2&&(f(),h("ngIf",r.listOfContainerItem.length===0),f(),Re("height",r.listOfContainerItem.length*r.itemSize,"px")("max-height",r.itemSize*r.maxItemLength,"px"),k("full-width",!r.matchWidth),h("itemSize",r.itemSize)("maxBufferPx",r.itemSize*r.maxItemLength)("minBufferPx",r.itemSize*r.maxItemLength),f(),h("cdkVirtualForOf",r.listOfContainerItem)("cdkVirtualForTrackBy",r.trackValue)("cdkVirtualForTemplateCacheSize",0),f(),h("ngTemplateOutlet",r.dropdownRender))},dependencies:[nh,Tu,we,jn,Ab,Wn,Nb,Be,Fr,Fl,Al,ur,vr],encapsulation:2,changeDetection:0});let o=n;return o})(),zu=(()=>{let n=class n{constructor(t,i){this.nzOptionGroupComponent=t,this.destroy$=i,this.changes=new J,this.groupLabel=null,this.nzLabel=null,this.nzValue=null,this.nzDisabled=!1,this.nzHide=!1,this.nzCustomContent=!1}ngOnInit(){this.nzOptionGroupComponent&&this.nzOptionGroupComponent.changes.pipe(Ot(!0),F(this.destroy$)).subscribe(()=>{this.groupLabel=this.nzOptionGroupComponent.nzLabel})}ngOnChanges(){this.changes.next()}};n.\u0275fac=function(i){return new(i||n)(w(Eu,8),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-option"]],viewQuery:function(i,r){if(i&1&&xe(En,7),i&2){let s;ce(s=ue())&&(r.template=s.first)}},inputs:{nzTitle:"nzTitle",nzLabel:"nzLabel",nzValue:"nzValue",nzKey:"nzKey",nzDisabled:"nzDisabled",nzHide:"nzHide",nzCustomContent:"nzCustomContent"},exportAs:["nzOption"],standalone:!0,features:[Ve([Pt]),oe,K],ngContentSelectors:Fb,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),_(0,V1,1,0,"ng-template"))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzHide",void 0),N([W()],o.prototype,"nzCustomContent",void 0),o})(),kb=(()=>{let n=class n{constructor(){this.loading=!1,this.search=!1,this.showArrow=!1,this.suffixIcon=null,this.feedbackIcon=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-arrow"]],hostAttrs:[1,"ant-select-arrow"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-select-arrow-loading",r.loading)},inputs:{loading:"loading",search:"search",showArrow:"showArrow",suffixIcon:"suffixIcon",feedbackIcon:"feedbackIcon"},standalone:!0,features:[K],decls:4,vars:3,consts:[["nz-icon","","nzType","loading",4,"ngIf","ngIfElse"],["defaultArrow",""],[4,"nzStringTemplateOutlet"],["nz-icon","","nzType","loading"],[4,"ngIf","ngIfElse"],["suffixTemplate",""],["nz-icon","","nzType","down",4,"ngIf"],["nz-icon","","nzType","search",4,"ngIf"],["nz-icon","","nzType","down"],["nz-icon","","nzType","search"],["nz-icon","",3,"nzType",4,"ngIf"],["nz-icon","",3,"nzType"]],template:function(i,r){if(i&1&&_(0,G1,1,0,"span",0)(1,K1,3,2,"ng-template",null,1,_e)(3,q1,2,1,"ng-container",2),i&2){let s=te(2);h("ngIf",r.loading)("ngIfElse",s),f(3),h("nzStringTemplateOutlet",r.feedbackIcon)}},dependencies:[Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Vb=(()=>{let n=class n{constructor(){this.clearIcon=null,this.clear=new O}onClick(t){t.preventDefault(),t.stopPropagation(),this.clear.emit(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-clear"]],hostAttrs:[1,"ant-select-clear"],hostBindings:function(i,r){i&1&&A("click",function(a){return r.onClick(a)})},inputs:{clearIcon:"clearIcon"},outputs:{clear:"clear"},standalone:!0,features:[K],decls:1,vars:2,consts:[["nz-icon","","nzType","close-circle","nzTheme","fill","class","ant-select-close-icon",4,"ngIf","ngIfElse"],["nz-icon","","nzType","close-circle","nzTheme","fill",1,"ant-select-close-icon"]],template:function(i,r){i&1&&_(0,Y1,1,0,"span",0),i&2&&h("ngIf",!r.clearIcon)("ngIfElse",r.clearIcon)},dependencies:[Ge,Fe,we],encapsulation:2,changeDetection:0});let o=n;return o})(),Gb=(()=>{let n=class n{constructor(){this.disabled=!1,this.label=null,this.deletable=!1,this.removeIcon=null,this.contentTemplateOutletContext=null,this.contentTemplateOutlet=null,this.delete=new O}onDelete(t){t.preventDefault(),t.stopPropagation(),this.disabled||this.delete.next(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-item"]],hostAttrs:[1,"ant-select-selection-item"],hostVars:3,hostBindings:function(i,r){i&2&&(ze("title",r.label),k("ant-select-selection-item-disabled",r.disabled))},inputs:{disabled:"disabled",label:"label",deletable:"deletable",removeIcon:"removeIcon",contentTemplateOutletContext:"contentTemplateOutletContext",contentTemplateOutlet:"contentTemplateOutlet"},outputs:{delete:"delete"},standalone:!0,features:[K],decls:2,vars:5,consts:[[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["class","ant-select-selection-item-remove",3,"click",4,"ngIf"],["class","ant-select-selection-item-content",4,"ngIf","ngIfElse"],["labelTemplate",""],[1,"ant-select-selection-item-content"],[1,"ant-select-selection-item-remove",3,"click"],["nz-icon","","nzType","close",4,"ngIf","ngIfElse"],["nz-icon","","nzType","close"]],template:function(i,r){i&1&&_(0,Z1,4,2,"ng-container",0)(1,eA,2,2,"span",1),i&2&&(h("nzStringTemplateOutlet",r.contentTemplateOutlet)("nzStringTemplateOutletContext",yt(3,tA,r.contentTemplateOutletContext)),f(),h("ngIf",r.deletable&&!r.disabled))},dependencies:[Ye,Ue,we,Ge,Fe],encapsulation:2,changeDetection:0});let o=n;return o})(),Hb=(()=>{let n=class n{constructor(){this.placeholder=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-select-placeholder"]],hostAttrs:[1,"ant-select-selection-placeholder"],inputs:{placeholder:"placeholder"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,nA,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.placeholder)},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),$m=(()=>{let n=class n{setCompositionState(t){this.isComposingChange.next(t)}onValueChange(t){this.value=t,this.valueChange.next(t),this.mirrorSync&&this.syncMirrorWidth()}clearInputValue(){let t=this.inputElement.nativeElement;t.value="",this.onValueChange("")}syncMirrorWidth(){let t=this.mirrorElement.nativeElement,i=this.elementRef.nativeElement,r=this.inputElement.nativeElement;this.renderer.removeStyle(i,"width"),this.renderer.setProperty(t,"textContent",`${r.value}\xA0`),this.renderer.setStyle(i,"width",`${t.scrollWidth}px`)}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r){this.elementRef=t,this.renderer=i,this.focusMonitor=r,this.nzId=null,this.disabled=!1,this.mirrorSync=!1,this.showInput=!0,this.focusTrigger=!1,this.value="",this.autofocus=!1,this.valueChange=new O,this.isComposingChange=new O}ngOnChanges(t){let i=this.inputElement.nativeElement,{focusTrigger:r,showInput:s}=t;s&&(this.showInput?this.renderer.removeAttribute(i,"readonly"):this.renderer.setAttribute(i,"readonly","readonly")),r&&r.currentValue===!0&&r.previousValue===!1&&i.focus()}ngAfterViewInit(){this.mirrorSync&&this.syncMirrorWidth(),this.autofocus&&this.focus()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(Oi))},n.\u0275cmp=j({type:n,selectors:[["nz-select-search"]],viewQuery:function(i,r){if(i&1&&(xe(iA,7),xe(rA,5)),i&2){let s;ce(s=ue())&&(r.inputElement=s.first),ce(s=ue())&&(r.mirrorElement=s.first)}},hostAttrs:[1,"ant-select-selection-search"],inputs:{nzId:"nzId",disabled:"disabled",mirrorSync:"mirrorSync",showInput:"showInput",focusTrigger:"focusTrigger",value:"value",autofocus:"autofocus"},outputs:{valueChange:"valueChange",isComposingChange:"isComposingChange"},standalone:!0,features:[Ve([{provide:Cm,useValue:!1}]),oe,K],decls:3,vars:7,consts:[["autocomplete","off",1,"ant-select-selection-search-input",3,"ngModel","disabled","ngModelChange","compositionstart","compositionend"],["inputElement",""],["class","ant-select-selection-search-mirror",4,"ngIf"],[1,"ant-select-selection-search-mirror"],["mirrorElement",""]],template:function(i,r){i&1&&(C(0,"input",0,1),A("ngModelChange",function(a){return r.onValueChange(a)})("compositionstart",function(){return r.setCompositionState(!0)})("compositionend",function(){return r.setCompositionState(!1)}),S(),_(2,oA,2,0,"span",2)),i&2&&(Re("opacity",r.showInput?null:0),h("ngModel",r.value)("disabled",r.disabled),ze("id",r.nzId)("autofocus",r.autofocus?"autofocus":null),f(2),h("ngIf",r.mirrorSync))},dependencies:[nn,Ii,Kt,Rt,we],encapsulation:2,changeDetection:0});let o=n;return o})(),ih=(()=>{let n=class n{updateTemplateVariable(){let t=this.listOfTopItem.length===0;this.isShowPlaceholder=t&&!this.isComposing&&!this.inputValue,this.isShowSingleLabel=!t&&!this.isComposing&&!this.inputValue}isComposingChange(t){this.isComposing=t,this.updateTemplateVariable()}onInputValueChange(t){t!==this.inputValue&&(this.inputValue=t,this.updateTemplateVariable(),this.inputValueChange.emit(t),this.tokenSeparate(t,this.tokenSeparators))}tokenSeparate(t,i){let r=(a,l)=>{for(let c=0;c0)return!0;return!1},s=(a,l)=>{let c=new RegExp(`[${l.join()}]`),u=a.split(c).filter(d=>d);return[...new Set(u)]};if(t&&t.length&&i.length&&this.mode!=="default"&&r(t,i)){let a=s(t,i);this.tokenize.next(a)}}clearInputValue(){this.nzSelectSearchComponent&&this.nzSelectSearchComponent.clearInputValue()}focus(){this.nzSelectSearchComponent&&this.nzSelectSearchComponent.focus()}blur(){this.nzSelectSearchComponent&&this.nzSelectSearchComponent.blur()}trackValue(t,i){return i.nzValue}onDeleteItem(t){!this.disabled&&!t.nzDisabled&&this.deleteItem.next(t)}constructor(t,i,r){this.elementRef=t,this.ngZone=i,this.noAnimation=r,this.nzId=null,this.showSearch=!1,this.placeHolder=null,this.open=!1,this.maxTagCount=1/0,this.autofocus=!1,this.disabled=!1,this.mode="default",this.customTemplate=null,this.maxTagPlaceholder=null,this.removeIcon=null,this.listOfTopItem=[],this.tokenSeparators=[],this.tokenize=new O,this.inputValueChange=new O,this.deleteItem=new O,this.listOfSlicedItem=[],this.isShowPlaceholder=!0,this.isShowSingleLabel=!1,this.isComposing=!1,this.inputValue=null,this.destroy$=new J}ngOnChanges(t){let{listOfTopItem:i,maxTagCount:r,customTemplate:s,maxTagPlaceholder:a}=t;if(i&&this.updateTemplateVariable(),i||r||s||a){let l=this.listOfTopItem.slice(0,this.maxTagCount).map(c=>({nzLabel:c.nzLabel,nzValue:c.nzValue,nzDisabled:c.nzDisabled,contentTemplateOutlet:this.customTemplate,contentTemplateOutletContext:c}));if(this.listOfTopItem.length>this.maxTagCount){let c=`+ ${this.listOfTopItem.length-this.maxTagCount} ...`,u=this.listOfTopItem.map(p=>p.nzValue),d={nzLabel:c,nzValue:"$$__nz_exceeded_item",nzDisabled:!0,contentTemplateOutlet:this.maxTagPlaceholder,contentTemplateOutletContext:u.slice(this.maxTagCount)};l.push(d)}this.listOfSlicedItem=l}}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.target!==this.nzSelectSearchComponent.inputElement.nativeElement&&this.nzSelectSearchComponent.focus()}),Ke(this.elementRef.nativeElement,"keydown").pipe(F(this.destroy$)).subscribe(t=>{if(t.target instanceof HTMLInputElement){let i=t.target.value;t.keyCode===8&&this.mode!=="default"&&!i&&this.listOfTopItem.length>0&&(t.preventDefault(),this.ngZone.run(()=>this.onDeleteItem(this.listOfTopItem[this.listOfTopItem.length-1])))}})})}ngOnDestroy(){this.destroy$.next()}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-select-top-control"]],viewQuery:function(i,r){if(i&1&&xe($m,5),i&2){let s;ce(s=ue())&&(r.nzSelectSearchComponent=s.first)}},hostAttrs:[1,"ant-select-selector"],inputs:{nzId:"nzId",showSearch:"showSearch",placeHolder:"placeHolder",open:"open",maxTagCount:"maxTagCount",autofocus:"autofocus",disabled:"disabled",mode:"mode",customTemplate:"customTemplate",maxTagPlaceholder:"maxTagPlaceholder",removeIcon:"removeIcon",listOfTopItem:"listOfTopItem",tokenSeparators:"tokenSeparators"},outputs:{tokenize:"tokenize",inputValueChange:"inputValueChange",deleteItem:"deleteItem"},exportAs:["nzSelectTopControl"],standalone:!0,features:[oe,K],decls:4,vars:3,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"placeholder",4,"ngIf"],[3,"nzId","disabled","value","showInput","mirrorSync","autofocus","focusTrigger","isComposingChange","valueChange"],[3,"deletable","disabled","removeIcon","label","contentTemplateOutlet","contentTemplateOutletContext",4,"ngIf"],[3,"deletable","disabled","removeIcon","label","contentTemplateOutlet","contentTemplateOutletContext"],[3,"removeIcon","label","disabled","contentTemplateOutlet","deletable","contentTemplateOutletContext","delete",4,"ngFor","ngForOf","ngForTrackBy"],[3,"nzId","disabled","value","autofocus","showInput","mirrorSync","focusTrigger","isComposingChange","valueChange"],[3,"removeIcon","label","disabled","contentTemplateOutlet","deletable","contentTemplateOutletContext","delete"],[3,"placeholder"]],template:function(i,r){i&1&&(H(0,0),_(1,aA,3,8,"ng-container",1)(2,cA,3,9,"ng-container",2),B(),_(3,uA,1,1,"nz-select-placeholder",3)),i&2&&(h("ngSwitch",r.mode),f(),h("ngSwitchCase","default"),f(2),h("ngIf",r.isShowPlaceholder))},dependencies:[jn,$m,Wn,Gb,we,Gi,lt,Hb],encapsulation:2,changeDetection:0});let o=n;return o})(),mA=(o,n)=>n&&n.nzLabel?n.nzLabel.toString().toLowerCase().indexOf(o.toLowerCase())>-1:!1,vA="select",Ou=(()=>{let n=class n{set nzShowArrow(t){this._nzShowArrow=t}get nzShowArrow(){return this._nzShowArrow===void 0?this.nzMode==="default":this._nzShowArrow}generateTagItem(t){return{nzValue:t,nzLabel:t,type:"item"}}onItemClick(t){if(this.activatedValue=t,this.nzMode==="default")(this.listOfValue.length===0||!this.compareWith(this.listOfValue[0],t))&&this.updateListOfValue([t]),this.setOpenState(!1);else{let i=this.listOfValue.findIndex(r=>this.compareWith(r,t));if(i!==-1){let r=this.listOfValue.filter((s,a)=>a!==i);this.updateListOfValue(r)}else if(this.listOfValue.length!this.compareWith(r,t.nzValue));this.updateListOfValue(i),this.clearInput()}updateListOfContainerItem(){let t=this.listOfTagAndTemplateItem.filter(s=>!s.nzHide).filter(s=>!this.nzServerSearch&&this.searchValue?this.nzFilterOption(this.searchValue,s):!0);if(this.nzMode==="tags"&&this.searchValue){let s=this.listOfTagAndTemplateItem.find(a=>a.nzLabel===this.searchValue);if(s)this.activatedValue=s.nzValue;else{let a=this.generateTagItem(this.searchValue);t=[a,...t],this.activatedValue=a.nzValue}}let i=t.find(s=>s.nzLabel===this.searchValue)||t.find(s=>this.compareWith(s.nzValue,this.activatedValue))||t.find(s=>this.compareWith(s.nzValue,this.listOfValue[0]))||t[0];this.activatedValue=i&&i.nzValue||null;let r=[];this.isReactiveDriven?r=[...new Set(this.nzOptions.filter(s=>s.groupLabel).map(s=>s.groupLabel))]:this.listOfNzOptionGroupComponent&&(r=this.listOfNzOptionGroupComponent.map(s=>s.nzLabel)),r.forEach(s=>{let a=t.findIndex(l=>s===l.groupLabel);if(a>-1){let l={groupLabel:s,type:"group",key:s};t.splice(a,0,l)}}),this.listOfContainerItem=[...t],this.updateCdkConnectedOverlayPositions()}clearInput(){this.nzSelectTopControlComponent.clearInputValue()}updateListOfValue(t){let r=((s,a)=>a==="default"?s.length>0?s[0]:null:s)(t,this.nzMode);this.value!==r&&(this.listOfValue=t,this.listOfValue$.next(t),this.value=r,this.onChange(this.value))}onTokenSeparate(t){let i=this.listOfTagAndTemplateItem.filter(r=>t.findIndex(s=>s===r.nzLabel)!==-1).map(r=>r.nzValue).filter(r=>this.listOfValue.findIndex(s=>this.compareWith(s,r))===-1);if(this.nzMode==="multiple")this.updateListOfValue([...this.listOfValue,...i]);else if(this.nzMode==="tags"){let r=t.filter(s=>this.listOfTagAndTemplateItem.findIndex(a=>a.nzLabel===s)===-1);this.updateListOfValue([...this.listOfValue,...i,...r])}this.clearInput()}onKeyDown(t){if(this.nzDisabled)return;let i=this.listOfContainerItem.filter(s=>s.type==="item").filter(s=>!s.nzDisabled),r=i.findIndex(s=>this.compareWith(s.nzValue,this.activatedValue));switch(t.keyCode){case 38:if(t.preventDefault(),this.nzOpen&&i.length>0){let s=r>0?r-1:i.length-1;this.activatedValue=i[s].nzValue}break;case 40:if(t.preventDefault(),this.nzOpen&&i.length>0){let s=r{this.triggerWidth=this.originElement.nativeElement.getBoundingClientRect().width,t!==this.triggerWidth&&this.cdr.detectChanges()})}}updateCdkConnectedOverlayPositions(){to(()=>{this.cdkConnectedOverlay?.overlayRef?.updatePosition()})}constructor(t,i,r,s,a,l,c,u,d,p,g,v){this.ngZone=t,this.destroy$=i,this.nzConfigService=r,this.cdr=s,this.host=a,this.renderer=l,this.platform=c,this.focusMonitor=u,this.directionality=d,this.noAnimation=p,this.nzFormStatusService=g,this.nzFormNoStatusService=v,this._nzModuleName=vA,this.nzId=null,this.nzSize="default",this.nzStatus="",this.nzOptionHeightPx=32,this.nzOptionOverflowSize=8,this.nzDropdownClassName=null,this.nzDropdownMatchSelectWidth=!0,this.nzDropdownStyle=null,this.nzNotFoundContent=void 0,this.nzPlaceHolder=null,this.nzPlacement=null,this.nzMaxTagCount=1/0,this.nzDropdownRender=null,this.nzCustomTemplate=null,this.nzSuffixIcon=null,this.nzClearIcon=null,this.nzRemoveIcon=null,this.nzMenuItemSelectedIcon=null,this.nzTokenSeparators=[],this.nzMaxTagPlaceholder=null,this.nzMaxMultipleCount=1/0,this.nzMode="default",this.nzFilterOption=mA,this.compareWith=(y,x)=>y===x,this.nzAllowClear=!1,this.nzBorderless=!1,this.nzShowSearch=!1,this.nzLoading=!1,this.nzAutoFocus=!1,this.nzAutoClearSearchValue=!0,this.nzServerSearch=!1,this.nzDisabled=!1,this.nzOpen=!1,this.nzSelectOnTab=!1,this.nzBackdrop=!1,this.nzOptions=[],this.nzOnSearch=new O,this.nzScrollToBottom=new O,this.nzOpenChange=new O,this.nzBlur=new O,this.nzFocus=new O,this.listOfValue$=new ct([]),this.listOfTemplateItem$=new ct([]),this.listOfTagAndTemplateItem=[],this.searchValue="",this.isReactiveDriven=!1,this.requestId=-1,this.isNzDisableFirstChange=!0,this.onChange=()=>{},this.onTouched=()=>{},this.dropDownPosition="bottomLeft",this.triggerWidth=null,this.listOfContainerItem=[],this.listOfTopItem=[],this.activatedValue=null,this.listOfValue=[],this.focused=!1,this.dir="ltr",this.positions=[],this.prefixCls="ant-select",this.statusCls={},this.status="",this.hasFeedback=!1}writeValue(t){if(this.value!==t){this.value=t;let r=((s,a)=>s==null?[]:a==="default"?[s]:s)(t,this.nzMode);this.listOfValue=r,this.listOfValue$.next(r),this.cdr.markForCheck()}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.nzDisabled&&this.setOpenState(!1),this.cdr.markForCheck()}ngOnChanges(t){let{nzOpen:i,nzDisabled:r,nzOptions:s,nzStatus:a,nzPlacement:l}=t;if(i&&this.onOpenChange(),r&&this.nzDisabled&&this.setOpenState(!1),s){this.isReactiveDriven=!0;let u=(this.nzOptions||[]).map(d=>({template:d.label instanceof En?d.label:null,nzTitle:this.getTitle(d.title,d.label),nzLabel:typeof d.label=="string"||typeof d.label=="number"?d.label:null,nzValue:d.value,nzDisabled:d.disabled||!1,nzHide:d.hide||!1,nzCustomContent:d.label instanceof En,groupLabel:d.groupLabel||null,type:"item",key:d.key===void 0?d.value:d.key}));this.listOfTemplateItem$.next(u)}if(a&&this.setStatusStyles(this.nzStatus,this.hasFeedback),l){let{currentValue:c}=l;this.dropDownPosition=c;let u=["bottomLeft","topLeft","bottomRight","topRight"];c&&u.includes(c)?this.positions=[bt[c]]:this.positions=u.map(d=>bt[d])}}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),zl(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:Mn(!1)),We(([{status:t,hasFeedback:i},r])=>({status:r?"":t,hasFeedback:i})),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.host,!0).pipe(F(this.destroy$)).subscribe(t=>{t?(this.focused=!0,this.cdr.markForCheck(),this.nzFocus.emit()):(this.focused=!1,this.cdr.markForCheck(),this.nzBlur.emit(),Promise.resolve().then(()=>{this.onTouched()}))}),Fn([this.listOfValue$,this.listOfTemplateItem$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{let r=t.filter(()=>this.nzMode==="tags").filter(s=>i.findIndex(a=>this.compareWith(a.nzValue,s))===-1).map(s=>this.listOfTopItem.find(a=>this.compareWith(a.nzValue,s))||this.generateTagItem(s));this.listOfTagAndTemplateItem=[...i,...r],this.listOfTopItem=this.listOfValue.map(s=>[...this.listOfTagAndTemplateItem,...this.listOfTopItem].find(a=>this.compareWith(s,a.nzValue))).filter(s=>!!s),this.updateListOfContainerItem()}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.nzConfigService.getConfigChangeEventForComponent("select").pipe(F(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>Ke(this.host.nativeElement,"click").pipe(F(this.destroy$)).subscribe(()=>{this.nzOpen&&this.nzShowSearch||this.nzDisabled||this.ngZone.run(()=>this.setOpenState(!this.nzOpen))})),this.cdkConnectedOverlay.overlayKeydown.pipe(F(this.destroy$)).subscribe(t=>{t.keyCode===27&&this.setOpenState(!1)})}ngAfterContentInit(){this.isReactiveDriven||_t(this.listOfNzOptionGroupComponent.changes,this.listOfNzOptionComponent.changes).pipe(Ot(!0),on(()=>_t(this.listOfNzOptionComponent.changes,this.listOfNzOptionGroupComponent.changes,...this.listOfNzOptionComponent.map(t=>t.changes),...this.listOfNzOptionGroupComponent.map(t=>t.changes)).pipe(Ot(!0))),F(this.destroy$)).subscribe(()=>{let t=this.listOfNzOptionComponent.toArray().map(i=>{let{template:r,nzLabel:s,nzValue:a,nzKey:l,nzDisabled:c,nzHide:u,nzCustomContent:d,groupLabel:p}=i;return{template:r,nzLabel:s,nzValue:a,nzDisabled:c,nzHide:u,nzCustomContent:d,groupLabel:p,nzTitle:this.getTitle(i.nzTitle,i.nzLabel),type:"item",key:l===void 0?a:l}});this.listOfTemplateItem$.next(t),this.cdr.markForCheck()})}ngOnDestroy(){sm(this.requestId),this.focusMonitor.stopMonitoring(this.host)}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.host.nativeElement,r):this.renderer.removeClass(this.host.nativeElement,r)})}getTitle(t,i){let r;return t===void 0?(typeof i=="string"||typeof i=="number")&&(r=i.toString()):(typeof t=="string"||typeof t=="number")&&(r=t.toString()),r}};n.\u0275fac=function(i){return new(i||n)(w($e),w(Pt),w(st),w(fe),w(de),w(He),w(gn),w(Oi),w(Me,8),w(ft,9),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-select"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,zu,5),Ft(s,Eu,5)),i&2){let a;ce(a=ue())&&(r.listOfNzOptionComponent=a),ce(a=ue())&&(r.listOfNzOptionGroupComponent=a)}},viewQuery:function(i,r){if(i&1&&(xe(dr,7,de),xe(oi,7),xe(ih,7),xe(Eu,7,de),xe(ih,7,de)),i&2){let s;ce(s=ue())&&(r.originElement=s.first),ce(s=ue())&&(r.cdkConnectedOverlay=s.first),ce(s=ue())&&(r.nzSelectTopControlComponent=s.first),ce(s=ue())&&(r.nzOptionGroupComponentElement=s.first),ce(s=ue())&&(r.nzSelectTopControlComponentElement=s.first)}},hostAttrs:[1,"ant-select"],hostVars:26,hostBindings:function(i,r){i&2&&k("ant-select-in-form-item",!!r.nzFormStatusService)("ant-select-lg",r.nzSize==="large")("ant-select-sm",r.nzSize==="small")("ant-select-show-arrow",r.nzShowArrow)("ant-select-disabled",r.nzDisabled)("ant-select-show-search",(r.nzShowSearch||r.nzMode!=="default")&&!r.nzDisabled)("ant-select-allow-clear",r.nzAllowClear)("ant-select-borderless",r.nzBorderless)("ant-select-open",r.nzOpen)("ant-select-focused",r.nzOpen||r.focused)("ant-select-single",r.nzMode==="default")("ant-select-multiple",r.nzMode!=="default")("ant-select-rtl",r.dir==="rtl")},inputs:{nzId:"nzId",nzSize:"nzSize",nzStatus:"nzStatus",nzOptionHeightPx:"nzOptionHeightPx",nzOptionOverflowSize:"nzOptionOverflowSize",nzDropdownClassName:"nzDropdownClassName",nzDropdownMatchSelectWidth:"nzDropdownMatchSelectWidth",nzDropdownStyle:"nzDropdownStyle",nzNotFoundContent:"nzNotFoundContent",nzPlaceHolder:"nzPlaceHolder",nzPlacement:"nzPlacement",nzMaxTagCount:"nzMaxTagCount",nzDropdownRender:"nzDropdownRender",nzCustomTemplate:"nzCustomTemplate",nzSuffixIcon:"nzSuffixIcon",nzClearIcon:"nzClearIcon",nzRemoveIcon:"nzRemoveIcon",nzMenuItemSelectedIcon:"nzMenuItemSelectedIcon",nzTokenSeparators:"nzTokenSeparators",nzMaxTagPlaceholder:"nzMaxTagPlaceholder",nzMaxMultipleCount:"nzMaxMultipleCount",nzMode:"nzMode",nzFilterOption:"nzFilterOption",compareWith:"compareWith",nzAllowClear:"nzAllowClear",nzBorderless:"nzBorderless",nzShowSearch:"nzShowSearch",nzLoading:"nzLoading",nzAutoFocus:"nzAutoFocus",nzAutoClearSearchValue:"nzAutoClearSearchValue",nzServerSearch:"nzServerSearch",nzDisabled:"nzDisabled",nzOpen:"nzOpen",nzSelectOnTab:"nzSelectOnTab",nzBackdrop:"nzBackdrop",nzOptions:"nzOptions",nzShowArrow:"nzShowArrow"},outputs:{nzOnSearch:"nzOnSearch",nzScrollToBottom:"nzScrollToBottom",nzOpenChange:"nzOpenChange",nzBlur:"nzBlur",nzFocus:"nzFocus"},exportAs:["nzSelect"],standalone:!0,features:[Ve([Pt,{provide:zn,useExisting:pn(()=>n),multi:!0}]),oe,K],decls:5,vars:25,consts:[["cdkOverlayOrigin","",3,"nzId","open","disabled","mode","nzNoAnimation","maxTagPlaceholder","removeIcon","placeHolder","maxTagCount","customTemplate","tokenSeparators","showSearch","autofocus","listOfTopItem","inputValueChange","tokenize","deleteItem","keydown"],["origin","cdkOverlayOrigin"],[3,"showArrow","loading","search","suffixIcon","feedbackIcon",4,"ngIf"],[3,"clearIcon","clear",4,"ngIf"],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayMinWidth","cdkConnectedOverlayWidth","cdkConnectedOverlayOrigin","cdkConnectedOverlayTransformOriginOn","cdkConnectedOverlayPanelClass","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","overlayOutsideClick","detach","positionChange"],[3,"showArrow","loading","search","suffixIcon","feedbackIcon"],["feedbackIconTpl",""],[3,"status",4,"ngIf"],[3,"status"],[3,"clearIcon","clear"],[3,"ngStyle","itemSize","maxItemLength","matchWidth","nzNoAnimation","listOfContainerItem","menuItemSelectedIcon","notFoundContent","activatedValue","listOfSelectedValue","dropdownRender","compareWith","mode","keydown","itemClick","scrollToBottom"]],template:function(i,r){if(i&1&&(C(0,"nz-select-top-control",0,1),A("inputValueChange",function(a){return r.onInputValueChange(a)})("tokenize",function(a){return r.onTokenSeparate(a)})("deleteItem",function(a){return r.onItemDelete(a)})("keydown",function(a){return r.onKeyDown(a)}),S(),_(2,hA,3,5,"nz-select-arrow",2)(3,fA,1,1,"nz-select-clear",3)(4,gA,1,23,"ng-template",4),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.setOpenState(!1)})("positionChange",function(a){return r.onPositionChange(a)})),i&2){let s=te(1);h("nzId",r.nzId)("open",r.nzOpen)("disabled",r.nzDisabled)("mode",r.nzMode)("@.disabled",!!(r.noAnimation!=null&&r.noAnimation.nzNoAnimation))("nzNoAnimation",r.noAnimation==null?null:r.noAnimation.nzNoAnimation)("maxTagPlaceholder",r.nzMaxTagPlaceholder)("removeIcon",r.nzRemoveIcon)("placeHolder",r.nzPlaceHolder)("maxTagCount",r.nzMaxTagCount)("customTemplate",r.nzCustomTemplate)("tokenSeparators",r.nzTokenSeparators)("showSearch",r.nzShowSearch)("autofocus",r.nzAutoFocus)("listOfTopItem",r.listOfTopItem),f(2),h("ngIf",r.nzShowArrow||r.hasFeedback&&!!r.status),f(),h("ngIf",r.nzAllowClear&&!r.nzDisabled&&r.listOfValue.length),f(),h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayMinWidth",r.nzDropdownMatchSelectWidth?null:r.triggerWidth)("cdkConnectedOverlayWidth",r.nzDropdownMatchSelectWidth?r.triggerWidth:null)("cdkConnectedOverlayOrigin",s)("cdkConnectedOverlayTransformOriginOn",".ant-select-dropdown")("cdkConnectedOverlayPanelClass",r.nzDropdownClassName)("cdkConnectedOverlayOpen",r.nzOpen)("cdkConnectedOverlayPositions",r.positions)}},dependencies:[ih,dr,ft,kb,we,ro,mr,Vb,oi,vr,Nr,Lb,Zt],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return N([De()],o.prototype,"nzSuffixIcon",void 0),N([W()],o.prototype,"nzAllowClear",void 0),N([De(),W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzShowSearch",void 0),N([W()],o.prototype,"nzLoading",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzAutoClearSearchValue",void 0),N([W()],o.prototype,"nzServerSearch",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzOpen",void 0),N([W()],o.prototype,"nzSelectOnTab",void 0),N([De(),W()],o.prototype,"nzBackdrop",void 0),o})(),Ls=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Ou,Lb,Nb,ih,$m,Gb,Vb,kb,Hb,Ab]});let o=n;return o})();var yA=["nz-pagination-item",""];function CA(o,n){if(o&1&&(C(0,"a"),Y(1),S()),o&2){let e=m().page;f(),ye(e)}}function _A(o,n){o&1&&R(0,"span",9)}function SA(o,n){o&1&&R(0,"span",10)}function wA(o,n){if(o&1&&(C(0,"button",6),H(1,2),_(2,_A,1,0,"span",7)(3,SA,1,0,"span",8),B(),S()),o&2){let e=m(2);h("disabled",e.disabled),f(),h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function bA(o,n){o&1&&R(0,"span",10)}function TA(o,n){o&1&&R(0,"span",9)}function EA(o,n){if(o&1&&(C(0,"button",6),H(1,2),_(2,bA,1,0,"span",11)(3,TA,1,0,"span",12),B(),S()),o&2){let e=m(2);h("disabled",e.disabled),f(),h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function xA(o,n){o&1&&R(0,"span",20)}function zA(o,n){o&1&&R(0,"span",21)}function OA(o,n){if(o&1&&(H(0,2),_(1,xA,1,0,"span",18)(2,zA,1,0,"span",19),B()),o&2){let e=m(4);h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function DA(o,n){o&1&&R(0,"span",21)}function RA(o,n){o&1&&R(0,"span",20)}function IA(o,n){if(o&1&&(H(0,2),_(1,DA,1,0,"span",22)(2,RA,1,0,"span",23),B()),o&2){let e=m(4);h("ngSwitch",e.direction),f(),h("ngSwitchCase","rtl")}}function PA(o,n){if(o&1&&(C(0,"div",15),H(1,2),_(2,OA,3,2,"ng-container",16)(3,IA,3,2,"ng-container",16),B(),C(4,"span",17),Y(5,"\u2022\u2022\u2022"),S()()),o&2){let e=m(2).$implicit;f(),h("ngSwitch",e),f(),h("ngSwitchCase","prev_5"),f(),h("ngSwitchCase","next_5")}}function MA(o,n){if(o&1&&(H(0),C(1,"a",13),_(2,PA,6,3,"div",14),S(),B()),o&2){let e=m().$implicit;f(),h("ngSwitch",e)}}function FA(o,n){if(o&1&&(H(0,2),_(1,CA,2,1,"a",3)(2,wA,4,3,"button",4)(3,EA,4,3,"button",4)(4,MA,3,1,"ng-container",5),B()),o&2){let e=n.$implicit;h("ngSwitch",e),f(),h("ngSwitchCase","page"),f(),h("ngSwitchCase","prev"),f(),h("ngSwitchCase","next")}}function AA(o,n){}var NA=(o,n)=>({$implicit:o,page:n}),LA=["nz-pagination-options",""];function kA(o,n){if(o&1&&R(0,"nz-option",4),o&2){let e=n.$implicit;h("nzLabel",e.label)("nzValue",e.value)}}function VA(o,n){if(o&1){let e=Q();C(0,"nz-select",2),A("ngModelChange",function(i){I(e);let r=m();return P(r.onPageSizeChange(i))}),_(1,kA,1,2,"nz-option",3),S()}if(o&2){let e=m();h("nzDisabled",e.disabled)("nzSize",e.nzSize)("ngModel",e.pageSize),f(),h("ngForOf",e.listOfPageSizeOption)("ngForTrackBy",e.trackByOption)}}function GA(o,n){if(o&1){let e=Q();C(0,"div",5),Y(1),C(2,"input",6),A("keydown.enter",function(i){I(e);let r=m();return P(r.jumpToPageViaInput(i))}),S(),Y(3),S()}if(o&2){let e=m();f(),Ne(" ",e.locale.jump_to," "),f(),h("disabled",e.disabled),f(),Ne(" ",e.locale.page," ")}}var Bb=["containerTemplate"];function HA(o,n){}var BA=(o,n)=>({$implicit:o,range:n});function $A(o,n){if(o&1&&(C(0,"li",4),_(1,HA,0,0,"ng-template",5),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.showTotal)("ngTemplateOutletContext",ri(2,BA,e.total,e.ranges))}}function jA(o,n){if(o&1){let e=Q();C(0,"li",6),A("gotoIndex",function(i){I(e);let r=m(2);return P(r.jumpPage(i))})("diffIndex",function(i){I(e);let r=m(2);return P(r.jumpDiff(i))}),S()}if(o&2){let e=n.$implicit,t=m(2);h("locale",t.locale)("type",e.type)("index",e.index)("disabled",!!e.disabled)("itemRender",t.itemRender)("active",t.pageIndex===e.index)("direction",t.dir)}}function WA(o,n){if(o&1){let e=Q();C(0,"li",7),A("pageIndexChange",function(i){I(e);let r=m(2);return P(r.onPageIndexChange(i))})("pageSizeChange",function(i){I(e);let r=m(2);return P(r.onPageSizeChange(i))}),S()}if(o&2){let e=m(2);h("total",e.total)("locale",e.locale)("disabled",e.disabled)("nzSize",e.nzSize)("showSizeChanger",e.showSizeChanger)("showQuickJumper",e.showQuickJumper)("pageIndex",e.pageIndex)("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)}}function UA(o,n){if(o&1&&(C(0,"ul"),_(1,$A,2,5,"li",1)(2,jA,1,7,"li",2)(3,WA,1,9,"li",3),S()),o&2){let e=m();f(),h("ngIf",e.showTotal),f(),h("ngForOf",e.listOfPageItem)("ngForTrackBy",e.trackByPageItem),f(),h("ngIf",e.showQuickJumper||e.showSizeChanger)}}function KA(o,n){if(o&1){let e=Q();C(0,"ul")(1,"li",1),A("click",function(){I(e);let i=m();return P(i.prePage())}),S(),C(2,"li",2)(3,"input",3),A("keydown.enter",function(i){I(e);let r=m();return P(r.jumpToPageViaInput(i))}),S(),C(4,"span",4),Y(5,"/"),S(),Y(6),S(),C(7,"li",5),A("click",function(){I(e);let i=m();return P(i.nextPage())}),S()()}if(o&2){let e=m();f(),h("disabled",e.isFirstIndex)("direction",e.dir)("itemRender",e.itemRender),ze("title",e.locale.prev_page),f(),ze("title",e.pageIndex+"/"+e.lastIndex),f(),h("disabled",e.disabled)("value",e.pageIndex),f(3),Ne(" ",e.lastIndex," "),f(),h("disabled",e.isLastIndex)("direction",e.dir)("itemRender",e.itemRender),ze("title",e.locale==null?null:e.locale.next_page)}}function qA(o,n){}function YA(o,n){if(o&1&&(H(0),_(1,qA,0,0,"ng-template",6),B()),o&2){m(2);let e=te(2);f(),h("ngTemplateOutlet",e.template)}}function QA(o,n){if(o&1&&(H(0),_(1,YA,2,1,"ng-container",5),B()),o&2){let e=m(),t=te(4);f(),h("ngIf",e.nzSimple)("ngIfElse",t.template)}}var Wm=(()=>{let n=class n{constructor(){this.active=!1,this.index=null,this.disabled=!1,this.direction="ltr",this.type=null,this.itemRender=null,this.diffIndex=new O,this.gotoIndex=new O,this.title=null}clickItem(){this.disabled||(this.type==="page"?this.gotoIndex.emit(this.index):this.diffIndex.emit({next:1,prev:-1,prev_5:-5,next_5:5}[this.type]))}ngOnChanges(t){let{locale:i,index:r,type:s}=t;(i||r||s)&&(this.title={page:`${this.index}`,next:this.locale?.next_page,prev:this.locale?.prev_page,prev_5:this.locale?.prev_5,next_5:this.locale?.next_5}[this.type])}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["li","nz-pagination-item",""]],hostVars:19,hostBindings:function(i,r){i&1&&A("click",function(){return r.clickItem()}),i&2&&(ze("title",r.title),k("ant-pagination-prev",r.type==="prev")("ant-pagination-next",r.type==="next")("ant-pagination-item",r.type==="page")("ant-pagination-jump-prev",r.type==="prev_5")("ant-pagination-jump-prev-custom-icon",r.type==="prev_5")("ant-pagination-jump-next",r.type==="next_5")("ant-pagination-jump-next-custom-icon",r.type==="next_5")("ant-pagination-disabled",r.disabled)("ant-pagination-item-active",r.active))},inputs:{active:"active",locale:"locale",index:"index",disabled:"disabled",direction:"direction",type:"type",itemRender:"itemRender"},outputs:{diffIndex:"diffIndex",gotoIndex:"gotoIndex"},standalone:!0,features:[oe,K],attrs:yA,decls:3,vars:5,consts:[["renderItemTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],[4,"ngSwitchCase"],["type","button","class","ant-pagination-item-link",3,"disabled",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["type","button",1,"ant-pagination-item-link",3,"disabled"],["nz-icon","","nzType","right",4,"ngSwitchCase"],["nz-icon","","nzType","left",4,"ngSwitchDefault"],["nz-icon","","nzType","right"],["nz-icon","","nzType","left"],["nz-icon","","nzType","left",4,"ngSwitchCase"],["nz-icon","","nzType","right",4,"ngSwitchDefault"],[1,"ant-pagination-item-link",3,"ngSwitch"],["class","ant-pagination-item-container",4,"ngSwitchDefault"],[1,"ant-pagination-item-container"],[3,"ngSwitch",4,"ngSwitchCase"],[1,"ant-pagination-item-ellipsis"],["nz-icon","","nzType","double-right","class","ant-pagination-item-link-icon",4,"ngSwitchCase"],["nz-icon","","nzType","double-left","class","ant-pagination-item-link-icon",4,"ngSwitchDefault"],["nz-icon","","nzType","double-right",1,"ant-pagination-item-link-icon"],["nz-icon","","nzType","double-left",1,"ant-pagination-item-link-icon"],["nz-icon","","nzType","double-left","class","ant-pagination-item-link-icon",4,"ngSwitchCase"],["nz-icon","","nzType","double-right","class","ant-pagination-item-link-icon",4,"ngSwitchDefault"]],template:function(i,r){if(i&1&&_(0,FA,5,4,"ng-template",null,0,_e)(2,AA,0,0,"ng-template",1),i&2){let s=te(1);f(2),h("ngTemplateOutlet",r.itemRender||s)("ngTemplateOutletContext",ri(2,NA,r.type,r.index))}},dependencies:[jn,Wn,Ge,Fe,Gi,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),$b=(()=>{let n=class n{constructor(){this.nzSize="default",this.disabled=!1,this.showSizeChanger=!1,this.showQuickJumper=!1,this.total=0,this.pageIndex=1,this.pageSize=10,this.pageSizeOptions=[],this.pageIndexChange=new O,this.pageSizeChange=new O,this.listOfPageSizeOption=[]}onPageSizeChange(t){this.pageSize!==t&&this.pageSizeChange.next(t)}jumpToPageViaInput(t){let i=t.target,r=Math.floor(em(i.value,this.pageIndex));this.pageIndexChange.next(r),i.value=""}trackByOption(t,i){return i.value}ngOnChanges(t){let{pageSize:i,pageSizeOptions:r,locale:s}=t;(i||r||s)&&(this.listOfPageSizeOption=[...new Set([...this.pageSizeOptions,this.pageSize])].map(a=>({value:a,label:`${a} ${this.locale.items_per_page}`})))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["li","nz-pagination-options",""]],hostAttrs:[1,"ant-pagination-options"],inputs:{nzSize:"nzSize",disabled:"disabled",showSizeChanger:"showSizeChanger",showQuickJumper:"showQuickJumper",locale:"locale",total:"total",pageIndex:"pageIndex",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions"},outputs:{pageIndexChange:"pageIndexChange",pageSizeChange:"pageSizeChange"},standalone:!0,features:[oe,K],attrs:LA,decls:2,vars:2,consts:[["class","ant-pagination-options-size-changer",3,"nzDisabled","nzSize","ngModel","ngModelChange",4,"ngIf"],["class","ant-pagination-options-quick-jumper",4,"ngIf"],[1,"ant-pagination-options-size-changer",3,"nzDisabled","nzSize","ngModel","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf","ngForTrackBy"],[3,"nzLabel","nzValue"],[1,"ant-pagination-options-quick-jumper"],[3,"disabled","keydown.enter"]],template:function(i,r){i&1&&_(0,VA,2,5,"nz-select",0)(1,GA,4,3,"div",1),i&2&&(h("ngIf",r.showSizeChanger),f(),h("ngIf",r.showQuickJumper))},dependencies:[Ls,zu,Ou,we,nn,Kt,Rt,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),jb=(()=>{let n=class n{constructor(t,i,r,s){this.cdr=t,this.renderer=i,this.elementRef=r,this.directionality=s,this.nzSize="default",this.itemRender=null,this.showTotal=null,this.disabled=!1,this.showSizeChanger=!1,this.showQuickJumper=!1,this.total=0,this.pageIndex=1,this.pageSize=10,this.pageSizeOptions=[10,20,30,40],this.pageIndexChange=new O,this.pageSizeChange=new O,this.ranges=[0,0],this.listOfPageItem=[],this.dir="ltr",this.destroy$=new J,i.removeChild(i.parentNode(r.nativeElement),r.nativeElement)}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.updateRtlStyle(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.updateRtlStyle()}updateRtlStyle(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-pagination-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-pagination-rtl")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}jumpPage(t){this.onPageIndexChange(t)}jumpDiff(t){this.jumpPage(this.pageIndex+t)}trackByPageItem(t,i){return`${i.type}-${i.index}`}onPageIndexChange(t){this.pageIndexChange.next(t)}onPageSizeChange(t){this.pageSizeChange.next(t)}getLastIndex(t,i){return Math.ceil(t/i)}buildIndexes(){let t=this.getLastIndex(this.total,this.pageSize);this.listOfPageItem=this.getListOfPageItem(this.pageIndex,t)}getListOfPageItem(t,i){let r=a=>{let l={type:"prev",disabled:t===1},c={type:"next",disabled:t===i};return[l,...a,c]},s=(a,l)=>{let c=[];for(let u=a;u<=l;u++)c.push({index:u,type:"page"});return c};return i<=9?r(s(1,i)):r(((l,c)=>{let u=[],d={type:"prev_5"},p={type:"next_5"},g=s(1,1),v=s(i,i);if(l<5)u=[...s(2,l===4?6:5),p];else if(l{let n=class n{constructor(t,i,r,s){this.cdr=t,this.renderer=i,this.elementRef=r,this.directionality=s,this.itemRender=null,this.disabled=!1,this.total=0,this.pageIndex=1,this.pageSize=10,this.pageIndexChange=new O,this.lastIndex=0,this.isFirstIndex=!1,this.isLastIndex=!1,this.dir="ltr",this.destroy$=new J,i.removeChild(i.parentNode(r.nativeElement),r.nativeElement)}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.updateRtlStyle(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.updateRtlStyle()}updateRtlStyle(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-pagination-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-pagination-rtl")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}jumpToPageViaInput(t){let i=t.target,r=em(i.value,this.pageIndex);this.onPageIndexChange(r),i.value=`${this.pageIndex}`}prePage(){this.onPageIndexChange(this.pageIndex-1)}nextPage(){this.onPageIndexChange(this.pageIndex+1)}onPageIndexChange(t){this.pageIndexChange.next(t)}updateBindingValue(){this.lastIndex=Math.ceil(this.total/this.pageSize),this.isFirstIndex=this.pageIndex===1,this.isLastIndex=this.pageIndex===this.lastIndex}ngOnChanges(t){let{pageIndex:i,total:r,pageSize:s}=t;(i||r||s)&&this.updateBindingValue()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(He),w(de),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-pagination-simple"]],viewQuery:function(i,r){if(i&1&&xe(Bb,7),i&2){let s;ce(s=ue())&&(r.template=s.first)}},inputs:{itemRender:"itemRender",disabled:"disabled",locale:"locale",total:"total",pageIndex:"pageIndex",pageSize:"pageSize"},outputs:{pageIndexChange:"pageIndexChange"},standalone:!0,features:[oe,K],decls:2,vars:0,consts:[["containerTemplate",""],["nz-pagination-item","","type","prev",3,"disabled","direction","itemRender","click"],[1,"ant-pagination-simple-pager"],["size","3",3,"disabled","value","keydown.enter"],[1,"ant-pagination-slash"],["nz-pagination-item","","type","next",3,"disabled","direction","itemRender","click"]],template:function(i,r){i&1&&_(0,KA,8,12,"ng-template",null,0,_e)},dependencies:[Wm],encapsulation:2,changeDetection:0});let o=n;return o})(),XA="pagination",Um=(()=>{let n=class n{validatePageIndex(t,i){return t>i?i:t<1?1:t}onPageIndexChange(t){let i=this.getLastIndex(this.nzTotal,this.nzPageSize),r=this.validatePageIndex(t,i);r!==this.nzPageIndex&&!this.nzDisabled&&(this.nzPageIndex=r,this.nzPageIndexChange.emit(this.nzPageIndex))}onPageSizeChange(t){this.nzPageSize=t,this.nzPageSizeChange.emit(t);let i=this.getLastIndex(this.nzTotal,this.nzPageSize);this.nzPageIndex>i&&this.onPageIndexChange(i)}onTotalChange(t){let i=this.getLastIndex(t,this.nzPageSize);this.nzPageIndex>i&&Promise.resolve().then(()=>{this.onPageIndexChange(i),this.cdr.markForCheck()})}getLastIndex(t,i){return Math.ceil(t/i)}constructor(t,i,r,s,a){this.i18n=t,this.cdr=i,this.breakpointService=r,this.nzConfigService=s,this.directionality=a,this._nzModuleName=XA,this.nzPageSizeChange=new O,this.nzPageIndexChange=new O,this.nzShowTotal=null,this.nzItemRender=null,this.nzSize="default",this.nzPageSizeOptions=[10,20,30,40],this.nzShowSizeChanger=!1,this.nzShowQuickJumper=!1,this.nzSimple=!1,this.nzDisabled=!1,this.nzResponsive=!1,this.nzHideOnSinglePage=!1,this.nzTotal=0,this.nzPageIndex=1,this.nzPageSize=10,this.showPagination=!0,this.size="default",this.dir="ltr",this.destroy$=new J,this.total$=new tn(1)}ngOnInit(){this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Pagination"),this.cdr.markForCheck()}),this.total$.pipe(F(this.destroy$)).subscribe(t=>{this.onTotalChange(t)}),this.breakpointService.subscribe(xa).pipe(F(this.destroy$)).subscribe(t=>{this.nzResponsive&&(this.size=t===Rp.xs?"small":"default",this.cdr.markForCheck())}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngOnChanges(t){let{nzHideOnSinglePage:i,nzTotal:r,nzPageSize:s,nzSize:a}=t;r&&this.total$.next(this.nzTotal),(i||r||s)&&(this.showPagination=this.nzHideOnSinglePage&&this.nzTotal>this.nzPageSize||this.nzTotal>0&&!this.nzHideOnSinglePage),a&&(this.size=a.currentValue)}};n.\u0275fac=function(i){return new(i||n)(w(Di),w(fe),w(Ip),w(st),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-pagination"]],hostAttrs:[1,"ant-pagination"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-pagination-simple",r.nzSimple)("ant-pagination-disabled",r.nzDisabled)("mini",!r.nzSimple&&r.size==="small")("ant-pagination-rtl",r.dir==="rtl")},inputs:{nzShowTotal:"nzShowTotal",nzItemRender:"nzItemRender",nzSize:"nzSize",nzPageSizeOptions:"nzPageSizeOptions",nzShowSizeChanger:"nzShowSizeChanger",nzShowQuickJumper:"nzShowQuickJumper",nzSimple:"nzSimple",nzDisabled:"nzDisabled",nzResponsive:"nzResponsive",nzHideOnSinglePage:"nzHideOnSinglePage",nzTotal:"nzTotal",nzPageIndex:"nzPageIndex",nzPageSize:"nzPageSize"},outputs:{nzPageSizeChange:"nzPageSizeChange",nzPageIndexChange:"nzPageIndexChange"},exportAs:["nzPagination"],standalone:!0,features:[oe,K],decls:5,vars:18,consts:[[4,"ngIf"],[3,"disabled","itemRender","locale","pageSize","total","pageIndex","pageIndexChange"],["simplePagination",""],[3,"nzSize","itemRender","showTotal","disabled","locale","showSizeChanger","showQuickJumper","total","pageIndex","pageSize","pageSizeOptions","pageIndexChange","pageSizeChange"],["defaultPagination",""],[4,"ngIf","ngIfElse"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(_(0,QA,2,2,"ng-container",0),C(1,"nz-pagination-simple",1,2),A("pageIndexChange",function(a){return r.onPageIndexChange(a)}),S(),C(3,"nz-pagination-default",3,4),A("pageIndexChange",function(a){return r.onPageIndexChange(a)})("pageSizeChange",function(a){return r.onPageSizeChange(a)}),S()),i&2&&(h("ngIf",r.showPagination),f(),h("disabled",r.nzDisabled)("itemRender",r.nzItemRender)("locale",r.locale)("pageSize",r.nzPageSize)("total",r.nzTotal)("pageIndex",r.nzPageIndex),f(2),h("nzSize",r.size)("itemRender",r.nzItemRender)("showTotal",r.nzShowTotal)("disabled",r.nzDisabled)("locale",r.locale)("showSizeChanger",r.nzShowSizeChanger)("showQuickJumper",r.nzShowQuickJumper)("total",r.nzTotal)("pageIndex",r.nzPageIndex)("pageSize",r.nzPageSize)("pageSizeOptions",r.nzPageSizeOptions))},dependencies:[we,Be,Wb,jb],encapsulation:2,changeDetection:0});let o=n;return N([De()],o.prototype,"nzSize",void 0),N([De()],o.prototype,"nzPageSizeOptions",void 0),N([De(),W()],o.prototype,"nzShowSizeChanger",void 0),N([De(),W()],o.prototype,"nzShowQuickJumper",void 0),N([De(),W()],o.prototype,"nzSimple",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzResponsive",void 0),N([W()],o.prototype,"nzHideOnSinglePage",void 0),N([ci()],o.prototype,"nzTotal",void 0),N([ci()],o.prototype,"nzPageIndex",void 0),N([ci()],o.prototype,"nzPageSize",void 0),o})(),Ub=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Um,Wb,$b,Wm,jb]});let o=n;return o})();function JA(o,n){o&1&&(C(0,"span",3),R(1,"i",4)(2,"i",4)(3,"i",4)(4,"i",4),S())}function eN(o,n){}function tN(o,n){if(o&1&&(C(0,"div",8),Y(1),S()),o&2){let e=m(2);f(),ye(e.nzTip)}}function nN(o,n){if(o&1&&(C(0,"div")(1,"div",5),_(2,eN,0,0,"ng-template",6)(3,tN,2,1,"div",7),S()()),o&2){let e=m(),t=te(1);f(),k("ant-spin-rtl",e.dir==="rtl")("ant-spin-spinning",e.isLoading)("ant-spin-lg",e.nzSize==="large")("ant-spin-sm",e.nzSize==="small")("ant-spin-show-text",e.nzTip),f(),h("ngTemplateOutlet",e.nzIndicator||t),f(),h("ngIf",e.nzTip)}}function iN(o,n){if(o&1&&(C(0,"div",9),Ie(1),S()),o&2){let e=m();k("ant-spin-blur",e.isLoading)}}var rN=["*"],Kb="spin",qb=(()=>{let n=class n{constructor(t,i,r){this.nzConfigService=t,this.cdr=i,this.directionality=r,this._nzModuleName=Kb,this.nzIndicator=null,this.nzSize="default",this.nzTip=null,this.nzDelay=0,this.nzSimple=!1,this.nzSpinning=!0,this.destroy$=new J,this.spinning$=new ct(this.nzSpinning),this.delay$=new tn(1),this.isLoading=!1,this.dir="ltr"}ngOnInit(){this.delay$.pipe(Ot(this.nzDelay),Bt(),on(i=>i===0?this.spinning$:this.spinning$.pipe(mS(r=>nu(r?i:0)))),F(this.destroy$)).subscribe(i=>{this.isLoading=i,this.cdr.markForCheck()}),this.nzConfigService.getConfigChangeEventForComponent(Kb).pipe(F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.directionality.change?.pipe(F(this.destroy$)).subscribe(i=>{this.dir=i,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzSpinning:i,nzDelay:r}=t;i&&this.spinning$.next(this.nzSpinning),r&&this.delay$.next(this.nzDelay)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-spin"]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-spin-nested-loading",!r.nzSimple)},inputs:{nzIndicator:"nzIndicator",nzSize:"nzSize",nzTip:"nzTip",nzDelay:"nzDelay",nzSimple:"nzSimple",nzSpinning:"nzSpinning"},exportAs:["nzSpin"],standalone:!0,features:[oe,K],ngContentSelectors:rN,decls:4,vars:2,consts:[["defaultTemplate",""],[4,"ngIf"],["class","ant-spin-container",3,"ant-spin-blur",4,"ngIf"],[1,"ant-spin-dot","ant-spin-dot-spin"],[1,"ant-spin-dot-item"],[1,"ant-spin"],[3,"ngTemplateOutlet"],["class","ant-spin-text",4,"ngIf"],[1,"ant-spin-text"],[1,"ant-spin-container"]],template:function(i,r){i&1&&(Pe(),_(0,JA,5,0,"ng-template",null,0,_e)(2,nN,4,12,"div",1)(3,iN,2,2,"div",2)),i&2&&(f(2),h("ngIf",r.isLoading),f(),h("ngIf",!r.nzSimple))},dependencies:[we,Be],encapsulation:2});let o=n;return N([De()],o.prototype,"nzIndicator",void 0),N([ci()],o.prototype,"nzDelay",void 0),N([W()],o.prototype,"nzSimple",void 0),N([W()],o.prototype,"nzSpinning",void 0),o})(),ah=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var sN=(()=>{let n=class n{create(t){return typeof ResizeObserver>"u"?null:new ResizeObserver(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),ds=(()=>{let n=class n{constructor(t){this.nzResizeObserverFactory=t,this.observedElements=new Map}ngOnDestroy(){this.observedElements.forEach((t,i)=>this.cleanupObserver(i))}observe(t){let i=YS(t);return new sp(r=>{let a=this.observeElement(i).subscribe(r);return()=>{a.unsubscribe(),this.unobserveElement(i)}})}observeElement(t){if(this.observedElements.has(t))this.observedElements.get(t).count++;else{let i=new J,r=this.nzResizeObserverFactory.create(s=>i.next(s));r&&r.observe(t),this.observedElements.set(t,{observer:r,stream:i,count:1})}return this.observedElements.get(t).stream}unobserveElement(t){this.observedElements.has(t)&&(this.observedElements.get(t).count--,this.observedElements.get(t).count||this.cleanupObserver(t))}cleanupObserver(t){if(this.observedElements.has(t)){let{observer:i,stream:r}=this.observedElements.get(t);i&&i.disconnect(),r.complete(),this.observedElements.delete(t)}}};n.\u0275fac=function(i){return new(i||n)(nt(sN))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var ks=["*"];function aN(o,n){}function lN(o,n){if(o&1){let e=Q();C(0,"label",15),A("ngModelChange",function(){I(e);let i=m().$implicit,r=m(2);return P(r.check(i))}),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked)}}function cN(o,n){if(o&1){let e=Q();C(0,"label",16),A("ngModelChange",function(){I(e);let i=m().$implicit,r=m(2);return P(r.check(i))}),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked)}}function uN(o,n){if(o&1){let e=Q();C(0,"li",12),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.check(r))}),_(1,lN,1,1,"label",13)(2,cN,1,1,"label",14),C(3,"span"),Y(4),S()()}if(o&2){let e=n.$implicit,t=m(2);h("nzSelected",e.checked),f(),h("ngIf",!t.filterMultiple),f(),h("ngIf",t.filterMultiple),f(2),ye(e.text)}}function dN(o,n){if(o&1){let e=Q();H(0),C(1,"nz-filter-trigger",3),A("nzVisibleChange",function(i){I(e);let r=m();return P(r.onVisibleChange(i))}),R(2,"span",4),S(),C(3,"nz-dropdown-menu",null,5)(5,"div",6)(6,"ul",7),_(7,uN,5,4,"li",8),S(),C(8,"div",9)(9,"button",10),A("click",function(){I(e);let i=m();return P(i.reset())}),Y(10),S(),C(11,"button",11),A("click",function(){I(e);let i=m();return P(i.confirm())}),Y(12),S()()()(),B()}if(o&2){let e=te(4),t=m();f(),h("nzVisible",t.isVisible)("nzActive",t.isChecked)("nzDropdownMenu",e),f(6),h("ngForOf",t.listOfParsedFilter)("ngForTrackBy",t.trackByValue),f(2),h("disabled",!t.isChecked),f(),Ne(" ",t.locale.filterReset," "),f(2),ye(t.locale.filterConfirm)}}function pN(o,n){if(o&1){let e=Q();C(0,"label",2),A("ngModelChange",function(i){I(e);let r=m();return P(r.onCheckedChange(i))}),S()}if(o&2){let e=m();k("ant-table-selection-select-all-custom",e.showRowSelection),h("ngModel",e.checked)("nzDisabled",e.disabled)("nzIndeterminate",e.indeterminate),ze("aria-label",e.label)}}function hN(o,n){if(o&1){let e=Q();C(0,"li",9),A("click",function(){let r=I(e).$implicit;return P(r.onSelect())}),Y(1),S()}if(o&2){let e=n.$implicit;f(),Ne(" ",e.text," ")}}function fN(o,n){if(o&1&&(C(0,"div",3)(1,"span",4),R(2,"span",5),S(),C(3,"nz-dropdown-menu",null,6)(5,"ul",7),_(6,hN,2,1,"li",8),S()()()),o&2){let e=te(4),t=m();f(),h("nzDropdownMenu",e),f(5),h("ngForOf",t.listOfSelections)}}function gN(o,n){}function mN(o,n){if(o&1&&R(0,"span",6),o&2){let e=m();k("active",e.sortOrder==="ascend")}}function vN(o,n){if(o&1&&R(0,"span",7),o&2){let e=m();k("active",e.sortOrder==="descend")}}var yN=["nzChecked",""];function CN(o,n){if(o&1){let e=Q();C(0,"button",5),A("expandChange",function(i){I(e);let r=m(2);return P(r.onExpandChange(i))}),S()}if(o&2){let e=m(2);h("expand",e.nzExpand)("spaceMode",!e.nzShowExpand)}}function _N(o,n){}function SN(o,n){if(o&1&&(H(0),_(1,_N,0,0,"ng-template",6),B()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.nzExpandIcon)}}function wN(o,n){if(o&1&&(H(0),R(1,"nz-row-indent",2),_(2,CN,1,2,"ng-template",null,3,_e)(4,SN,2,1,"ng-container",4),B()),o&2){let e=te(3),t=m();f(),h("indentSize",t.nzIndentSize),f(3),h("ngIf",t.nzExpandIcon)("ngIfElse",e)}}function bN(o,n){if(o&1){let e=Q();C(0,"label",7),A("ngModelChange",function(i){I(e);let r=m();return P(r.onCheckedChange(i))}),S()}if(o&2){let e=m();h("nzDisabled",e.nzDisabled)("ngModel",e.nzChecked)("nzIndeterminate",e.nzIndeterminate),ze("aria-label",e.nzLabel)}}var TN=["nzColumnKey",""];function EN(o,n){if(o&1){let e=Q();C(0,"nz-table-filter",5),A("filterChange",function(i){I(e);let r=m();return P(r.onFilterValueChange(i))}),S()}if(o&2){let e=m(),t=te(2),i=te(4);h("contentTemplate",t)("extraTemplate",i)("customFilter",e.nzCustomFilter)("filterMultiple",e.nzFilterMultiple)("listOfFilter",e.nzFilters)}}function xN(o,n){}function zN(o,n){if(o&1&&_(0,xN,0,0,"ng-template",6),o&2){let e=m(),t=te(6),i=te(8);h("ngTemplateOutlet",e.nzShowSort?t:i)}}function ON(o,n){o&1&&(Ie(0),Ie(1,1))}function DN(o,n){if(o&1&&R(0,"nz-table-sorters",7),o&2){let e=m(),t=te(8);h("sortOrder",e.sortOrder)("sortDirections",e.sortDirections)("contentTemplate",t)}}function RN(o,n){o&1&&Ie(0,2)}var IN=[[["","nz-th-extra",""]],[["nz-filter-trigger"]],"*"],PN=["[nz-th-extra]","nz-filter-trigger","*"],MN=["nzSelections",""],FN=["nz-table-content",""];function AN(o,n){if(o&1&&R(0,"col"),o&2){let e=n.$implicit;Re("width",e)("min-width",e)}}function NN(o,n){}function LN(o,n){if(o&1&&(C(0,"thead",3),_(1,NN,0,0,"ng-template",2),S()),o&2){let e=m();f(),h("ngTemplateOutlet",e.theadTemplate)}}function kN(o,n){}var Qb=["tdElement"],VN=["nz-table-fixed-row",""];function GN(o,n){}function HN(o,n){if(o&1&&(C(0,"div",4),Xn(1,"async"),_(2,GN,0,0,"ng-template",5),S()),o&2){let e=m(),t=te(5);Re("width",Vi(1,3,e.hostWidth$),"px"),f(2),h("ngTemplateOutlet",t)}}function BN(o,n){o&1&&Ie(0)}var $N=["tableHeaderElement"],jN=["tableBodyElement"];function WN(o,n){if(o&1&&(C(0,"div",7,8),R(2,"table",9),S()),o&2){let e=m(2);h("ngStyle",e.bodyStyleMap),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth)("contentTemplate",e.contentTemplate)}}function UN(o,n){}var KN=(o,n)=>({$implicit:o,index:n});function qN(o,n){if(o&1&&(H(0),_(1,UN,0,0,"ng-template",13),B()),o&2){let e=n.$implicit,t=n.index,i=m(3);f(),h("ngTemplateOutlet",i.virtualTemplate)("ngTemplateOutletContext",ri(2,KN,e,t))}}function YN(o,n){if(o&1&&(C(0,"cdk-virtual-scroll-viewport",10,8)(2,"table",11)(3,"tbody"),_(4,qN,2,5,"ng-container",12),S()()()),o&2){let e=m(2);Re("height",e.data.length?e.scrollY:e.noDateVirtualHeight),h("itemSize",e.virtualItemSize)("maxBufferPx",e.virtualMaxBufferPx)("minBufferPx",e.virtualMinBufferPx),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth),f(2),h("cdkVirtualForOf",e.data)("cdkVirtualForTrackBy",e.virtualForTrackBy)}}function QN(o,n){if(o&1&&(H(0),C(1,"div",2,3),R(3,"table",4),S(),_(4,WN,3,4,"div",5)(5,YN,5,9,"cdk-virtual-scroll-viewport",6),B()),o&2){let e=m();f(),h("ngStyle",e.headerStyleMap),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth)("theadTemplate",e.theadTemplate),f(),h("ngIf",!e.virtualTemplate),f(),h("ngIf",e.virtualTemplate)}}function XN(o,n){if(o&1&&(C(0,"div",14,8),R(2,"table",15),S()),o&2){let e=m();h("ngStyle",e.bodyStyleMap),f(2),h("scrollX",e.scrollX)("listOfColWidth",e.listOfColWidth)("theadTemplate",e.theadTemplate)("contentTemplate",e.contentTemplate)}}function ZN(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.title)}}function JN(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.footer)}}function eL(o,n){}function tL(o,n){if(o&1&&(H(0),_(1,eL,0,0,"ng-template",10),B()),o&2){m();let e=te(11);f(),h("ngTemplateOutlet",e)}}function nL(o,n){if(o&1&&R(0,"nz-table-title-footer",11),o&2){let e=m();h("title",e.nzTitle)}}function iL(o,n){if(o&1&&R(0,"nz-table-inner-scroll",12),o&2){let e=m(),t=te(13),i=te(3);h("data",e.data)("scrollX",e.scrollX)("scrollY",e.scrollY)("contentTemplate",t)("listOfColWidth",e.listOfAutoColWidth)("theadTemplate",e.theadTemplate)("verticalScrollBarWidth",e.verticalScrollBarWidth)("virtualTemplate",e.nzVirtualScrollDirective?e.nzVirtualScrollDirective.templateRef:null)("virtualItemSize",e.nzVirtualItemSize)("virtualMaxBufferPx",e.nzVirtualMaxBufferPx)("virtualMinBufferPx",e.nzVirtualMinBufferPx)("tableMainElement",i)("virtualForTrackBy",e.nzVirtualForTrackBy)}}function rL(o,n){if(o&1&&R(0,"nz-table-inner-default",13),o&2){let e=m(),t=te(13);h("tableLayout",e.nzTableLayout)("listOfColWidth",e.listOfManualColWidth)("theadTemplate",e.theadTemplate)("contentTemplate",t)}}function oL(o,n){if(o&1&&R(0,"nz-table-title-footer",14),o&2){let e=m();h("footer",e.nzFooter)}}function sL(o,n){}function aL(o,n){if(o&1&&(H(0),_(1,sL,0,0,"ng-template",10),B()),o&2){m();let e=te(11);f(),h("ngTemplateOutlet",e)}}function lL(o,n){if(o&1){let e=Q();C(0,"nz-pagination",16),A("nzPageSizeChange",function(i){I(e);let r=m(2);return P(r.onPageSizeChange(i))})("nzPageIndexChange",function(i){I(e);let r=m(2);return P(r.onPageIndexChange(i))}),S()}if(o&2){let e=m(2);h("hidden",!e.showPagination)("nzShowSizeChanger",e.nzShowSizeChanger)("nzPageSizeOptions",e.nzPageSizeOptions)("nzItemRender",e.nzItemRender)("nzShowQuickJumper",e.nzShowQuickJumper)("nzHideOnSinglePage",e.nzHideOnSinglePage)("nzShowTotal",e.nzShowTotal)("nzSize",e.nzPaginationType==="small"?"small":e.nzSize==="default"?"default":"small")("nzPageSize",e.nzPageSize)("nzTotal",e.nzTotal)("nzSimple",e.nzSimple)("nzPageIndex",e.nzPageIndex)}}function cL(o,n){if(o&1&&_(0,lL,1,12,"nz-pagination",15),o&2){let e=m();h("ngIf",e.nzShowPagination&&e.data.length)}}function uL(o,n){o&1&&Ie(0)}var dL=["nz-table-measure-row",""];function pL(o,n){o&1&&R(0,"td",1,2)}function hL(o,n){if(o&1){let e=Q();C(0,"tr",3),A("listOfAutoWidth",function(i){I(e);let r=m(2);return P(r.onListOfAutoWidthChange(i))}),S()}if(o&2){let e=m().ngIf;h("listOfMeasureColumn",e)}}function fL(o,n){if(o&1&&(H(0),_(1,hL,1,1,"tr",2),B()),o&2){let e=n.ngIf,t=m();f(),h("ngIf",t.isInsideTable&&e.length)}}function gL(o,n){if(o&1&&(C(0,"tr",4),R(1,"nz-embed-empty",5),Xn(2,"async"),S()),o&2){let e=m();f(),h("specificContent",Vi(2,1,e.noResult$))}}var mL=["contentTemplate"];function vL(o,n){o&1&&Ie(0)}function yL(o,n){}function CL(o,n){if(o&1&&(H(0),_(1,yL,0,0,"ng-template",2),B()),o&2){m();let e=te(1);f(),h("ngTemplateOutlet",e)}}var _L="filterTrigger",Xb=(()=>{let n=class n{onVisibleChange(t){this.nzVisible=t,this.nzVisibleChange.next(t)}hide(){this.nzVisible=!1,this.cdr.markForCheck()}show(){this.nzVisible=!0,this.cdr.markForCheck()}constructor(t,i,r,s){this.nzConfigService=t,this.ngZone=i,this.cdr=r,this.destroy$=s,this._nzModuleName=_L,this.nzActive=!1,this.nzVisible=!1,this.nzBackdrop=!1,this.nzVisibleChange=new O}ngOnInit(){this.ngZone.runOutsideAngular(()=>{Ke(this.nzDropdown.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.stopPropagation()})})}};n.\u0275fac=function(i){return new(i||n)(w(st),w($e),w(fe),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-filter-trigger"]],viewQuery:function(i,r){if(i&1&&xe(yr,7,de),i&2){let s;ce(s=ue())&&(r.nzDropdown=s.first)}},inputs:{nzActive:"nzActive",nzDropdownMenu:"nzDropdownMenu",nzVisible:"nzVisible",nzBackdrop:"nzBackdrop"},outputs:{nzVisibleChange:"nzVisibleChange"},exportAs:["nzFilterTrigger"],standalone:!0,features:[Ve([Pt]),K],ngContentSelectors:ks,decls:2,vars:8,consts:[["nz-dropdown","","nzTrigger","click","nzPlacement","bottomRight",1,"ant-table-filter-trigger",3,"nzBackdrop","nzClickHide","nzDropdownMenu","nzVisible","nzVisibleChange"]],template:function(i,r){i&1&&(Pe(),C(0,"span",0),A("nzVisibleChange",function(a){return r.onVisibleChange(a)}),Ie(1),S()),i&2&&(k("active",r.nzActive)("ant-table-filter-open",r.nzVisible),h("nzBackdrop",r.nzBackdrop)("nzClickHide",!1)("nzDropdownMenu",r.nzDropdownMenu)("nzVisible",r.nzVisible))},dependencies:[Lr,yr],encapsulation:2,changeDetection:0});let o=n;return N([De(),W()],o.prototype,"nzBackdrop",void 0),o})(),Zb=(()=>{let n=class n{trackByValue(t,i){return i.value}check(t){this.filterMultiple?(this.listOfParsedFilter=this.listOfParsedFilter.map(i=>i===t?ot(V({},i),{checked:!t.checked}):i),t.checked=!t.checked):this.listOfParsedFilter=this.listOfParsedFilter.map(i=>ot(V({},i),{checked:i===t})),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter)}confirm(){this.isVisible=!1,this.emitFilterData()}reset(){this.isVisible=!1,this.listOfParsedFilter=this.parseListOfFilter(this.listOfFilter,!0),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter),this.emitFilterData()}onVisibleChange(t){this.isVisible=t,t?this.listOfChecked=this.listOfParsedFilter.filter(i=>i.checked).map(i=>i.value):this.emitFilterData()}emitFilterData(){let t=this.listOfParsedFilter.filter(i=>i.checked).map(i=>i.value);QS(this.listOfChecked,t)||(this.filterMultiple?this.filterChange.emit(t):this.filterChange.emit(t.length>0?t[0]:null))}parseListOfFilter(t,i){return t.map(r=>{let s=i?!1:!!r.byDefault;return{text:r.text,value:r.value,checked:s}})}getCheckedStatus(t){return t.some(i=>i.checked)}constructor(t,i){this.cdr=t,this.i18n=i,this.contentTemplate=null,this.customFilter=!1,this.extraTemplate=null,this.filterMultiple=!0,this.listOfFilter=[],this.filterChange=new O,this.destroy$=new J,this.isChecked=!1,this.isVisible=!1,this.listOfParsedFilter=[],this.listOfChecked=[]}ngOnInit(){this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>{this.locale=this.i18n.getLocaleData("Table"),this.cdr.markForCheck()})}ngOnChanges(t){let{listOfFilter:i}=t;i&&this.listOfFilter&&this.listOfFilter.length&&(this.listOfParsedFilter=this.parseListOfFilter(this.listOfFilter),this.isChecked=this.getCheckedStatus(this.listOfParsedFilter))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Di))},n.\u0275cmp=j({type:n,selectors:[["nz-table-filter"]],hostAttrs:[1,"ant-table-filter-column"],inputs:{contentTemplate:"contentTemplate",customFilter:"customFilter",extraTemplate:"extraTemplate",filterMultiple:"filterMultiple",listOfFilter:"listOfFilter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[oe,K],decls:3,vars:3,consts:[[1,"ant-table-column-title"],[3,"ngTemplateOutlet"],[4,"ngIf","ngIfElse"],[3,"nzVisible","nzActive","nzDropdownMenu","nzVisibleChange"],["nz-icon","","nzType","filter","nzTheme","fill"],["filterMenu","nzDropdownMenu"],[1,"ant-table-filter-dropdown"],["nz-menu",""],["nz-menu-item","",3,"nzSelected","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ant-table-filter-dropdown-btns"],["nz-button","","nzType","link","nzSize","small",3,"disabled","click"],["nz-button","","nzType","primary","nzSize","small",3,"click"],["nz-menu-item","",3,"nzSelected","click"],["nz-radio","",3,"ngModel","ngModelChange",4,"ngIf"],["nz-checkbox","",3,"ngModel","ngModelChange",4,"ngIf"],["nz-radio","",3,"ngModel","ngModelChange"],["nz-checkbox","",3,"ngModel","ngModelChange"]],template:function(i,r){i&1&&(C(0,"span",0),_(1,aN,0,0,"ng-template",1),S(),_(2,dN,13,8,"ng-container",2)),i&2&&(f(),h("ngTemplateOutlet",r.contentTemplate),f(),h("ngIf",!r.customFilter)("ngIfElse",r.extraTemplate))},dependencies:[Be,we,Xb,Ge,Fe,Lr,cs,co,us,lt,ls,$i,Bi,nn,Kt,Rt,Hi,eo,yi,hr],encapsulation:2,changeDetection:0});let o=n;return o})(),SL=(()=>{let n=class n{constructor(){this.expand=!1,this.spaceMode=!1,this.expandChange=new O}onHostClick(){this.spaceMode||(this.expand=!this.expand,this.expandChange.next(this.expand))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["button","nz-row-expand-button",""]],hostAttrs:[1,"ant-table-row-expand-icon"],hostVars:7,hostBindings:function(i,r){i&1&&A("click",function(){return r.onHostClick()}),i&2&&(Ug("type","button"),k("ant-table-row-expand-icon-expanded",!r.spaceMode&&r.expand===!0)("ant-table-row-expand-icon-collapsed",!r.spaceMode&&r.expand===!1)("ant-table-row-expand-icon-spaced",r.spaceMode))},inputs:{expand:"expand",spaceMode:"spaceMode"},outputs:{expandChange:"expandChange"},standalone:!0});let o=n;return o})(),wL=(()=>{let n=class n{constructor(){this.indentSize=0}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["nz-row-indent"]],hostAttrs:[1,"ant-table-row-indent"],hostVars:2,hostBindings:function(i,r){i&2&&Re("padding-left",r.indentSize,"px")},inputs:{indentSize:"indentSize"},standalone:!0});let o=n;return o})(),Jb=(()=>{let n=class n{constructor(){this.listOfSelections=[],this.checked=!1,this.disabled=!1,this.indeterminate=!1,this.label=null,this.showCheckbox=!1,this.showRowSelection=!1,this.checkedChange=new O}onCheckedChange(t){this.checked=t,this.checkedChange.emit(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-selection"]],hostAttrs:[1,"ant-table-selection"],inputs:{listOfSelections:"listOfSelections",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",label:"label",showCheckbox:"showCheckbox",showRowSelection:"showRowSelection"},outputs:{checkedChange:"checkedChange"},standalone:!0,features:[K],decls:2,vars:2,consts:[["nz-checkbox","",3,"ant-table-selection-select-all-custom","ngModel","nzDisabled","nzIndeterminate","ngModelChange",4,"ngIf"],["class","ant-table-selection-extra",4,"ngIf"],["nz-checkbox","",3,"ngModel","nzDisabled","nzIndeterminate","ngModelChange"],[1,"ant-table-selection-extra"],["nz-dropdown","","nzPlacement","bottomLeft",1,"ant-table-selection-down",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["selectionMenu","nzDropdownMenu"],["nz-menu","",1,"ant-table-selection-menu"],["nz-menu-item","",3,"click",4,"ngFor","ngForOf"],["nz-menu-item","",3,"click"]],template:function(i,r){i&1&&_(0,pN,1,6,"label",0)(1,fN,7,2,"div",1),i&2&&(h("ngIf",r.showCheckbox),f(),h("ngIf",r.showRowSelection))},dependencies:[we,nn,Kt,Rt,$i,Bi,Lr,cs,co,yr,us,Ge,Fe,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),eT=(()=>{let n=class n{constructor(){this.sortDirections=["ascend","descend",null],this.sortOrder=null,this.contentTemplate=null,this.isUp=!1,this.isDown=!1}ngOnChanges(t){let{sortDirections:i}=t;i&&(this.isUp=this.sortDirections.indexOf("ascend")!==-1,this.isDown=this.sortDirections.indexOf("descend")!==-1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-sorters"]],hostAttrs:[1,"ant-table-column-sorters"],inputs:{sortDirections:"sortDirections",sortOrder:"sortOrder",contentTemplate:"contentTemplate"},standalone:!0,features:[oe,K],decls:6,vars:5,consts:[[1,"ant-table-column-title"],[3,"ngTemplateOutlet"],[1,"ant-table-column-sorter"],[1,"ant-table-column-sorter-inner"],["nz-icon","","nzType","caret-up","class","ant-table-column-sorter-up",3,"active",4,"ngIf"],["nz-icon","","nzType","caret-down","class","ant-table-column-sorter-down",3,"active",4,"ngIf"],["nz-icon","","nzType","caret-up",1,"ant-table-column-sorter-up"],["nz-icon","","nzType","caret-down",1,"ant-table-column-sorter-down"]],template:function(i,r){i&1&&(C(0,"span",0),_(1,gN,0,0,"ng-template",1),S(),C(2,"span",2)(3,"span",3),_(4,mN,1,2,"span",4)(5,vN,1,2,"span",5),S()()),i&2&&(f(),h("ngTemplateOutlet",r.contentTemplate),f(),k("ant-table-column-sorter-full",r.isDown&&r.isUp),f(2),h("ngIf",r.isUp),f(),h("ngIf",r.isDown))},dependencies:[Ge,Fe,Be,we],encapsulation:2,changeDetection:0});let o=n;return o})(),Ym=(()=>{let n=class n{setAutoLeftWidth(t){this.renderer.setStyle(this.elementRef.nativeElement,"left",t)}setAutoRightWidth(t){this.renderer.setStyle(this.elementRef.nativeElement,"right",t)}setIsFirstRight(t){this.setFixClass(t,"ant-table-cell-fix-right-first")}setIsLastLeft(t){this.setFixClass(t,"ant-table-cell-fix-left-last")}setFixClass(t,i){this.renderer.removeClass(this.elementRef.nativeElement,i),t&&this.renderer.addClass(this.elementRef.nativeElement,i)}constructor(t,i){this.renderer=t,this.elementRef=i,this.nzRight=!1,this.nzLeft=!1,this.colspan=null,this.colSpan=null,this.changes$=new J,this.isAutoLeft=!1,this.isAutoRight=!1,this.isFixedLeft=!1,this.isFixedRight=!1,this.isFixed=!1}ngOnChanges(){this.setIsFirstRight(!1),this.setIsLastLeft(!1),this.isAutoLeft=this.nzLeft===""||this.nzLeft===!0,this.isAutoRight=this.nzRight===""||this.nzRight===!0,this.isFixedLeft=this.nzLeft!==!1,this.isFixedRight=this.nzRight!==!1,this.isFixed=this.isFixedLeft||this.isFixedRight;let t=i=>typeof i=="string"&&i!==""?i:null;this.setAutoLeftWidth(t(this.nzLeft)),this.setAutoRightWidth(t(this.nzRight)),this.changes$.next()}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275dir=Se({type:n,selectors:[["td","nzRight",""],["th","nzRight",""],["td","nzLeft",""],["th","nzLeft",""]],hostVars:6,hostBindings:function(i,r){i&2&&(Re("position",r.isFixed?"sticky":null),k("ant-table-cell-fix-right",r.isFixedRight)("ant-table-cell-fix-left",r.isFixedLeft))},inputs:{nzRight:"nzRight",nzLeft:"nzLeft",colspan:"colspan",colSpan:"colSpan"},standalone:!0,features:[oe]});let o=n;return o})(),Ma=(()=>{let n=class n{setTheadTemplate(t){this.theadTemplate$.next(t)}setHasFixLeft(t){this.hasFixLeft$.next(t)}setHasFixRight(t){this.hasFixRight$.next(t)}setTableWidthConfig(t){this.tableWidthConfigPx$.next(t)}setListOfTh(t){let i=0;t.forEach(s=>{i+=s.colspan&&+s.colspan||s.colSpan&&+s.colSpan||1});let r=t.map(s=>s.nzWidth);this.columnCount$.next(i),this.listOfThWidthConfigPx$.next(r)}setListOfMeasureColumn(t){let i=[];t.forEach(r=>{let s=r.colspan&&+r.colspan||r.colSpan&&+r.colSpan||1;for(let a=0;a`${i}px`))}setShowEmpty(t){this.showEmpty$.next(t)}setNoResult(t){this.noResult$.next(t)}setScroll(t,i){let r=!!(t||i);r||this.setListOfAutoWidth([]),this.enableAutoMeasure$.next(r)}constructor(){this.theadTemplate$=new tn(1),this.hasFixLeft$=new tn(1),this.hasFixRight$=new tn(1),this.hostWidth$=new tn(1),this.columnCount$=new tn(1),this.showEmpty$=new tn(1),this.noResult$=new tn(1),this.listOfThWidthConfigPx$=new ct([]),this.tableWidthConfigPx$=new ct([]),this.manualWidthConfigPx$=Fn([this.tableWidthConfigPx$,this.listOfThWidthConfigPx$]).pipe(We(([t,i])=>t.length?t:i)),this.listOfAutoWidthPx$=new tn(1),this.listOfListOfThWidthPx$=_t(this.manualWidthConfigPx$,Fn([this.listOfAutoWidthPx$,this.manualWidthConfigPx$]).pipe(We(([t,i])=>t.length===i.length?t.map((r,s)=>r==="0px"?i[s]||null:i[s]||r):i))),this.listOfMeasureColumn$=new tn(1),this.listOfListOfThWidth$=this.listOfAutoWidthPx$.pipe(We(t=>t.map(i=>parseInt(i,10)))),this.enableAutoMeasure$=new tn(1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),tT=(()=>{let n=class n{constructor(t){this.isInsideTable=!1,this.isInsideTable=!!t}};n.\u0275fac=function(i){return new(i||n)(w(Ma,8))},n.\u0275dir=Se({type:n,selectors:[["th",9,"nz-disable-th",3,"mat-cell",""],["td",9,"nz-disable-td",3,"mat-cell",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-table-cell",r.isInsideTable)},standalone:!0});let o=n;return o})(),Km=(()=>{let n=class n{updatePageSize(t){this.pageSize$.next(t)}updateFrontPagination(t){this.frontPagination$.next(t)}updatePageIndex(t){this.pageIndex$.next(t)}updateListOfData(t){this.listOfData$.next(t)}updateListOfCustomColumn(t){this.listOfCustomColumn$.next(t)}constructor(){this.destroy$=new J,this.pageIndex$=new ct(1),this.frontPagination$=new ct(!0),this.pageSize$=new ct(10),this.listOfData$=new ct([]),this.listOfCustomColumn$=new ct([]),this.pageIndexDistinct$=this.pageIndex$.pipe(Bt()),this.pageSizeDistinct$=this.pageSize$.pipe(Bt()),this.listOfCalcOperator$=new ct([]),this.queryParams$=Fn([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfCalcOperator$]).pipe(Sa(0),yS(1),We(([t,i,r])=>({pageIndex:t,pageSize:i,sort:r.filter(s=>s.sortFn).map(s=>({key:s.key,value:s.sortOrder})),filter:r.filter(s=>s.filterFn).map(s=>({key:s.key,value:s.filterValue}))}))),this.listOfDataAfterCalc$=Fn([this.listOfData$,this.listOfCalcOperator$]).pipe(We(([t,i])=>{let r=[...t],s=i.filter(l=>{let{filterValue:c,filterFn:u}=l;return!(c==null||Array.isArray(c)&&c.length===0)&&typeof u=="function"});for(let l of s){let{filterFn:c,filterValue:u}=l;r=r.filter(d=>c(u,d))}let a=i.filter(l=>l.sortOrder!==null&&typeof l.sortFn=="function").sort((l,c)=>+c.sortPriority-+l.sortPriority);return i.length&&r.sort((l,c)=>{for(let u of a){let{sortFn:d,sortOrder:p}=u;if(d&&p){let g=d(l,c,p);if(g!==0)return p==="ascend"?g:-g}}return 0}),r})),this.listOfFrontEndCurrentPageData$=Fn([this.pageIndexDistinct$,this.pageSizeDistinct$,this.listOfDataAfterCalc$]).pipe(F(this.destroy$),Qe(t=>{let[i,r,s]=t,a=Math.ceil(s.length/r)||1;return i<=a}),We(([t,i,r])=>r.slice((t-1)*i,t*i))),this.listOfCurrentPageData$=this.frontPagination$.pipe(on(t=>t?this.listOfFrontEndCurrentPageData$:this.listOfDataAfterCalc$)),this.total$=this.frontPagination$.pipe(on(t=>t?this.listOfDataAfterCalc$:this.listOfData$),We(t=>t.length),Bt())}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var Qm=(()=>{let n=class n{constructor(){this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzLabel=null,this.nzIndentSize=0,this.nzShowExpand=!1,this.nzShowCheckbox=!1,this.nzExpand=!1,this.nzExpandIcon=null,this.nzCheckedChange=new O,this.nzExpandChange=new O,this.isNzShowExpandChanged=!1,this.isNzShowCheckboxChanged=!1}onCheckedChange(t){this.nzChecked=t,this.nzCheckedChange.emit(t)}onExpandChange(t){this.nzExpand=t,this.nzExpandChange.emit(t)}ngOnChanges(t){let i=c=>c&&c.firstChange&&c.currentValue!==void 0,{nzExpand:r,nzChecked:s,nzShowExpand:a,nzShowCheckbox:l}=t;a&&(this.isNzShowExpandChanged=!0),l&&(this.isNzShowCheckboxChanged=!0),i(r)&&!this.isNzShowExpandChanged&&(this.nzShowExpand=!0),i(s)&&!this.isNzShowCheckboxChanged&&(this.nzShowCheckbox=!0)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["td","nzChecked",""],["td","nzDisabled",""],["td","nzIndeterminate",""],["td","nzIndentSize",""],["td","nzExpand",""],["td","nzShowExpand",""],["td","nzShowCheckbox",""]],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-cell-with-append",r.nzShowExpand||r.nzIndentSize>0)("ant-table-selection-column",r.nzShowCheckbox)},inputs:{nzChecked:"nzChecked",nzDisabled:"nzDisabled",nzIndeterminate:"nzIndeterminate",nzLabel:"nzLabel",nzIndentSize:"nzIndentSize",nzShowExpand:"nzShowExpand",nzShowCheckbox:"nzShowCheckbox",nzExpand:"nzExpand",nzExpandIcon:"nzExpandIcon"},outputs:{nzCheckedChange:"nzCheckedChange",nzExpandChange:"nzExpandChange"},standalone:!0,features:[oe,K],attrs:yN,ngContentSelectors:ks,decls:3,vars:2,consts:[[4,"ngIf"],["nz-checkbox","",3,"nzDisabled","ngModel","nzIndeterminate","ngModelChange",4,"ngIf"],[3,"indentSize"],["rowExpand",""],[4,"ngIf","ngIfElse"],["nz-row-expand-button","",3,"expand","spaceMode","expandChange"],[3,"ngTemplateOutlet"],["nz-checkbox","",3,"nzDisabled","ngModel","nzIndeterminate","ngModelChange"]],template:function(i,r){i&1&&(Pe(),_(0,wN,5,3,"ng-container",0)(1,bN,1,4,"label",1),Ie(2)),i&2&&(h("ngIf",r.nzShowExpand||r.nzIndentSize>0),f(),h("ngIf",r.nzShowCheckbox))},dependencies:[wL,SL,we,Be,$i,Bi,nn,Kt,Rt],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowExpand",void 0),N([W()],o.prototype,"nzShowCheckbox",void 0),N([W()],o.prototype,"nzExpand",void 0),o})(),uh=(()=>{let n=class n{getNextSortDirection(t,i){let r=t.indexOf(i);return r===t.length-1?t[0]:t[r+1]}setSortOrder(t){this.sortOrderChange$.next(t)}clearSortOrder(){this.sortOrder!==null&&this.setSortOrder(null)}onFilterValueChange(t){this.nzFilterChange.emit(t),this.nzFilterValue=t,this.updateCalcOperator()}updateCalcOperator(){this.calcOperatorChange$.next()}constructor(t,i,r,s){this.host=t,this.cdr=i,this.ngZone=r,this.destroy$=s,this.manualClickOrder$=new J,this.calcOperatorChange$=new J,this.nzFilterValue=null,this.sortOrder=null,this.sortDirections=["ascend","descend",null],this.sortOrderChange$=new J,this.isNzShowSortChanged=!1,this.isNzShowFilterChanged=!1,this.nzFilterMultiple=!0,this.nzSortOrder=null,this.nzSortPriority=!1,this.nzSortDirections=["ascend","descend",null],this.nzFilters=[],this.nzSortFn=null,this.nzFilterFn=null,this.nzShowSort=!1,this.nzShowFilter=!1,this.nzCustomFilter=!1,this.nzCheckedChange=new O,this.nzSortOrderChange=new O,this.nzFilterChange=new O}ngOnInit(){this.ngZone.runOutsideAngular(()=>Ke(this.host.nativeElement,"click").pipe(Qe(()=>this.nzShowSort),F(this.destroy$)).subscribe(()=>{let t=this.getNextSortDirection(this.sortDirections,this.sortOrder);this.ngZone.run(()=>{this.setSortOrder(t),this.manualClickOrder$.next(this)})})),this.sortOrderChange$.pipe(F(this.destroy$)).subscribe(t=>{this.sortOrder!==t&&(this.sortOrder=t,this.nzSortOrderChange.emit(t)),this.updateCalcOperator(),this.cdr.markForCheck()})}ngOnChanges(t){let{nzSortDirections:i,nzFilters:r,nzSortOrder:s,nzSortFn:a,nzFilterFn:l,nzSortPriority:c,nzFilterMultiple:u,nzShowSort:d,nzShowFilter:p}=t;i&&this.nzSortDirections&&this.nzSortDirections.length&&(this.sortDirections=this.nzSortDirections),s&&(this.sortOrder=this.nzSortOrder,this.setSortOrder(this.nzSortOrder)),d&&(this.isNzShowSortChanged=!0),p&&(this.isNzShowFilterChanged=!0);let g=v=>v&&v.firstChange&&v.currentValue!==void 0;if((g(s)||g(a))&&!this.isNzShowSortChanged&&(this.nzShowSort=!0),g(r)&&!this.isNzShowFilterChanged&&(this.nzShowFilter=!0),(r||u)&&this.nzShowFilter){let v=this.nzFilters.filter(y=>y.byDefault).map(y=>y.value);this.nzFilterValue=this.nzFilterMultiple?v:v[0]||null}(a||l||c||r)&&this.updateCalcOperator()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(fe),w($e),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["th","nzColumnKey",""],["th","nzSortFn",""],["th","nzSortOrder",""],["th","nzFilters",""],["th","nzShowSort",""],["th","nzShowFilter",""],["th","nzCustomFilter",""]],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-column-has-sorters",r.nzShowSort)("ant-table-column-sort",r.sortOrder==="descend"||r.sortOrder==="ascend")},inputs:{nzColumnKey:"nzColumnKey",nzFilterMultiple:"nzFilterMultiple",nzSortOrder:"nzSortOrder",nzSortPriority:"nzSortPriority",nzSortDirections:"nzSortDirections",nzFilters:"nzFilters",nzSortFn:"nzSortFn",nzFilterFn:"nzFilterFn",nzShowSort:"nzShowSort",nzShowFilter:"nzShowFilter",nzCustomFilter:"nzCustomFilter"},outputs:{nzCheckedChange:"nzCheckedChange",nzSortOrderChange:"nzSortOrderChange",nzFilterChange:"nzFilterChange"},standalone:!0,features:[Ve([Pt]),oe,K],attrs:TN,ngContentSelectors:PN,decls:9,vars:2,consts:[[3,"contentTemplate","extraTemplate","customFilter","filterMultiple","listOfFilter","filterChange",4,"ngIf","ngIfElse"],["notFilterTemplate",""],["extraTemplate",""],["sortTemplate",""],["contentTemplate",""],[3,"contentTemplate","extraTemplate","customFilter","filterMultiple","listOfFilter","filterChange"],[3,"ngTemplateOutlet"],[3,"sortOrder","sortDirections","contentTemplate"]],template:function(i,r){if(i&1&&(Pe(IN),_(0,EN,1,5,"nz-table-filter",0)(1,zN,1,1,"ng-template",null,1,_e)(3,ON,2,0,"ng-template",null,2,_e)(5,DN,1,3,"ng-template",null,3,_e)(7,RN,1,0,"ng-template",null,4,_e)),i&2){let s=te(2);h("ngIf",r.nzShowFilter||r.nzCustomFilter)("ngIfElse",s)}},dependencies:[Zb,we,Be,eT],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowSort",void 0),N([W()],o.prototype,"nzShowFilter",void 0),N([W()],o.prototype,"nzCustomFilter",void 0),o})(),Xm=(()=>{let n=class n{constructor(t,i){this.renderer=t,this.elementRef=i,this.changes$=new J,this.nzWidth=null,this.colspan=null,this.colSpan=null,this.rowspan=null,this.rowSpan=null}ngOnChanges(t){let{nzWidth:i,colspan:r,rowspan:s,colSpan:a,rowSpan:l}=t;if(r||a){let c=this.colspan||this.colSpan;Ml(c)?this.renderer.removeAttribute(this.elementRef.nativeElement,"colspan"):this.renderer.setAttribute(this.elementRef.nativeElement,"colspan",`${c}`)}if(s||l){let c=this.rowspan||this.rowSpan;Ml(c)?this.renderer.removeAttribute(this.elementRef.nativeElement,"rowspan"):this.renderer.setAttribute(this.elementRef.nativeElement,"rowspan",`${c}`)}(i||r)&&this.changes$.next()}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275dir=Se({type:n,selectors:[["th"]],inputs:{nzWidth:"nzWidth",colspan:"colspan",colSpan:"colSpan",rowspan:"rowspan",rowSpan:"rowSpan"},standalone:!0,features:[oe]});let o=n;return o})(),bL=(()=>{let n=class n{constructor(){this.nzSelections=[],this.nzChecked=!1,this.nzDisabled=!1,this.nzIndeterminate=!1,this.nzLabel=null,this.nzShowCheckbox=!1,this.nzShowRowSelection=!1,this.nzCheckedChange=new O,this.isNzShowExpandChanged=!1,this.isNzShowCheckboxChanged=!1}onCheckedChange(t){this.nzChecked=t,this.nzCheckedChange.emit(t)}ngOnChanges(t){let i=c=>c&&c.firstChange&&c.currentValue!==void 0,{nzChecked:r,nzSelections:s,nzShowExpand:a,nzShowCheckbox:l}=t;a&&(this.isNzShowExpandChanged=!0),l&&(this.isNzShowCheckboxChanged=!0),i(s)&&!this.isNzShowExpandChanged&&(this.nzShowRowSelection=!0),i(r)&&!this.isNzShowCheckboxChanged&&(this.nzShowCheckbox=!0)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["th","nzSelections",""],["th","nzChecked",""],["th","nzShowCheckbox",""],["th","nzShowRowSelection",""]],hostAttrs:[1,"ant-table-selection-column"],inputs:{nzSelections:"nzSelections",nzChecked:"nzChecked",nzDisabled:"nzDisabled",nzIndeterminate:"nzIndeterminate",nzLabel:"nzLabel",nzShowCheckbox:"nzShowCheckbox",nzShowRowSelection:"nzShowRowSelection"},outputs:{nzCheckedChange:"nzCheckedChange"},standalone:!0,features:[oe,K],attrs:MN,ngContentSelectors:ks,decls:2,vars:7,consts:[[3,"checked","disabled","indeterminate","label","listOfSelections","showCheckbox","showRowSelection","checkedChange"]],template:function(i,r){i&1&&(Pe(),C(0,"nz-table-selection",0),A("checkedChange",function(a){return r.onCheckedChange(a)}),S(),Ie(1)),i&2&&h("checked",r.nzChecked)("disabled",r.nzDisabled)("indeterminate",r.nzIndeterminate)("label",r.nzLabel)("listOfSelections",r.nzSelections)("showCheckbox",r.nzShowCheckbox)("showRowSelection",r.nzShowRowSelection)},dependencies:[Jb],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowCheckbox",void 0),N([W()],o.prototype,"nzShowRowSelection",void 0),o})();var nT=(()=>{let n=class n{constructor(){this.tableLayout="auto",this.theadTemplate=null,this.contentTemplate=null,this.listOfColWidth=[],this.scrollX=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["table","nz-table-content",""]],hostVars:8,hostBindings:function(i,r){i&2&&(Re("table-layout",r.tableLayout)("width",r.scrollX)("min-width",r.scrollX?"100%":null),k("ant-table-fixed",r.scrollX))},inputs:{tableLayout:"tableLayout",theadTemplate:"theadTemplate",contentTemplate:"contentTemplate",listOfColWidth:"listOfColWidth",scrollX:"scrollX"},standalone:!0,features:[K],attrs:FN,ngContentSelectors:ks,decls:4,vars:3,consts:[[3,"width","minWidth",4,"ngFor","ngForOf"],["class","ant-table-thead",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"ant-table-thead"]],template:function(i,r){i&1&&(Pe(),_(0,AN,1,4,"col",0)(1,LN,2,1,"thead",1)(2,kN,0,0,"ng-template",2),Ie(3)),i&2&&(h("ngForOf",r.listOfColWidth),f(),h("ngIf",r.theadTemplate),f(),h("ngTemplateOutlet",r.contentTemplate))},dependencies:[Be,we,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),Zm=(()=>{let n=class n{constructor(t,i){this.nzTableStyleService=t,this.renderer=i,this.hostWidth$=new ct(null),this.enableAutoMeasure$=new ct(!1),this.destroy$=new J}ngOnInit(){if(this.nzTableStyleService){let{enableAutoMeasure$:t,hostWidth$:i}=this.nzTableStyleService;t.pipe(F(this.destroy$)).subscribe(this.enableAutoMeasure$),i.pipe(F(this.destroy$)).subscribe(this.hostWidth$)}}ngAfterViewInit(){this.nzTableStyleService.columnCount$.pipe(F(this.destroy$)).subscribe(t=>{this.renderer.setAttribute(this.tdElement.nativeElement,"colspan",`${t}`)})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Ma),w(He))},n.\u0275cmp=j({type:n,selectors:[["tr","nz-table-fixed-row",""],["tr","nzExpand",""]],viewQuery:function(i,r){if(i&1&&xe(Qb,7),i&2){let s;ce(s=ue())&&(r.tdElement=s.first)}},standalone:!0,features:[K],attrs:VN,ngContentSelectors:ks,decls:6,vars:4,consts:[[1,"nz-disable-td","ant-table-cell"],["tdElement",""],["class","ant-table-expanded-row-fixed","style","position: sticky; left: 0px; overflow: hidden;",3,"width",4,"ngIf","ngIfElse"],["contentTemplate",""],[1,"ant-table-expanded-row-fixed",2,"position","sticky","left","0px","overflow","hidden"],[3,"ngTemplateOutlet"]],template:function(i,r){if(i&1&&(Pe(),C(0,"td",0,1),_(2,HN,3,5,"div",2),Xn(3,"async"),S(),_(4,BN,1,0,"ng-template",null,3,_e)),i&2){let s=te(5);f(2),h("ngIf",Vi(3,2,r.enableAutoMeasure$))("ngIfElse",s)}},dependencies:[we,ru,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),TL=(()=>{let n=class n{constructor(){this.tableLayout="auto",this.listOfColWidth=[],this.theadTemplate=null,this.contentTemplate=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-inner-default"]],hostAttrs:[1,"ant-table-container"],inputs:{tableLayout:"tableLayout",listOfColWidth:"listOfColWidth",theadTemplate:"theadTemplate",contentTemplate:"contentTemplate"},standalone:!0,features:[K],decls:2,vars:4,consts:[[1,"ant-table-content"],["nz-table-content","",3,"contentTemplate","tableLayout","listOfColWidth","theadTemplate"]],template:function(i,r){i&1&&(C(0,"div",0),R(1,"table",1),S()),i&2&&(f(),h("contentTemplate",r.contentTemplate)("tableLayout",r.tableLayout)("listOfColWidth",r.listOfColWidth)("theadTemplate",r.theadTemplate))},dependencies:[nT],encapsulation:2,changeDetection:0});let o=n;return o})(),qm=(()=>{let n=class n{setScrollPositionClassName(t=!1){let{scrollWidth:i,scrollLeft:r,clientWidth:s}=this.tableBodyElement.nativeElement,a="ant-table-ping-left",l="ant-table-ping-right";i===s&&i!==0||t?(this.renderer.removeClass(this.tableMainElement,a),this.renderer.removeClass(this.tableMainElement,l)):r===0?(this.renderer.removeClass(this.tableMainElement,a),this.renderer.addClass(this.tableMainElement,l)):i===r+s?(this.renderer.removeClass(this.tableMainElement,l),this.renderer.addClass(this.tableMainElement,a)):(this.renderer.addClass(this.tableMainElement,a),this.renderer.addClass(this.tableMainElement,l))}constructor(t,i,r,s){this.renderer=t,this.ngZone=i,this.platform=r,this.resizeService=s,this.data=[],this.scrollX=null,this.scrollY=null,this.contentTemplate=null,this.widthConfig=[],this.listOfColWidth=[],this.theadTemplate=null,this.virtualTemplate=null,this.virtualItemSize=0,this.virtualMaxBufferPx=200,this.virtualMinBufferPx=100,this.virtualForTrackBy=a=>a,this.headerStyleMap={},this.bodyStyleMap={},this.verticalScrollBarWidth=0,this.noDateVirtualHeight="182px",this.data$=new J,this.scroll$=new J,this.destroy$=new J}ngOnChanges(t){let{scrollX:i,scrollY:r,data:s}=t;if(i||r){let a=this.verticalScrollBarWidth!==0;this.headerStyleMap={overflowX:"hidden",overflowY:this.scrollY&&a?"scroll":"hidden"},this.bodyStyleMap={overflowY:this.scrollY?"scroll":"hidden",overflowX:this.scrollX?"auto":null,maxHeight:this.scrollY},this.ngZone.runOutsideAngular(()=>this.scroll$.next())}s&&this.ngZone.runOutsideAngular(()=>this.data$.next())}ngAfterViewInit(){this.platform.isBrowser&&this.ngZone.runOutsideAngular(()=>{let t=this.scroll$.pipe(Ot(null),Os(0),on(()=>Ke(this.tableBodyElement.nativeElement,"scroll").pipe(Ot(!0))),F(this.destroy$)),i=this.resizeService.subscribe().pipe(F(this.destroy$)),r=this.data$.pipe(F(this.destroy$));_t(t,i,r,this.scroll$).pipe(Ot(!0),Os(0),F(this.destroy$)).subscribe(()=>this.setScrollPositionClassName()),t.pipe(Qe(()=>!!this.scrollY)).subscribe(()=>this.tableHeaderElement.nativeElement.scrollLeft=this.tableBodyElement.nativeElement.scrollLeft)})}ngOnDestroy(){this.setScrollPositionClassName(!0),this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(He),w($e),w(gn),w(uu))},n.\u0275cmp=j({type:n,selectors:[["nz-table-inner-scroll"]],viewQuery:function(i,r){if(i&1&&(xe($N,5,de),xe(jN,5,de),xe(ur,5,ur)),i&2){let s;ce(s=ue())&&(r.tableHeaderElement=s.first),ce(s=ue())&&(r.tableBodyElement=s.first),ce(s=ue())&&(r.cdkVirtualScrollViewport=s.first)}},hostAttrs:[1,"ant-table-container"],inputs:{data:"data",scrollX:"scrollX",scrollY:"scrollY",contentTemplate:"contentTemplate",widthConfig:"widthConfig",listOfColWidth:"listOfColWidth",theadTemplate:"theadTemplate",virtualTemplate:"virtualTemplate",virtualItemSize:"virtualItemSize",virtualMaxBufferPx:"virtualMaxBufferPx",virtualMinBufferPx:"virtualMinBufferPx",tableMainElement:"tableMainElement",virtualForTrackBy:"virtualForTrackBy",verticalScrollBarWidth:"verticalScrollBarWidth"},standalone:!0,features:[oe,K],decls:2,vars:2,consts:[[4,"ngIf"],["class","ant-table-content",3,"ngStyle",4,"ngIf"],[1,"ant-table-header","nz-table-hide-scrollbar",3,"ngStyle"],["tableHeaderElement",""],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth","theadTemplate"],["class","ant-table-body",3,"ngStyle",4,"ngIf"],[3,"itemSize","maxBufferPx","minBufferPx","height",4,"ngIf"],[1,"ant-table-body",3,"ngStyle"],["tableBodyElement",""],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth","contentTemplate"],[3,"itemSize","maxBufferPx","minBufferPx"],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-table-content",3,"ngStyle"],["nz-table-content","","tableLayout","fixed",3,"scrollX","listOfColWidth","theadTemplate","contentTemplate"]],template:function(i,r){i&1&&_(0,QN,6,6,"ng-container",0)(1,XN,3,5,"div",1),i&2&&(h("ngIf",r.scrollY),f(),h("ngIf",!r.scrollY))},dependencies:[nT,we,Zt,JS,Fl,Al,ur,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),Jm=(()=>{let n=class n{constructor(t){this.templateRef=t}static ngTemplateContextGuard(t,i){return!0}};n.\u0275fac=function(i){return new(i||n)(w(En))},n.\u0275dir=Se({type:n,selectors:[["","nz-virtual-scroll",""]],exportAs:["nzVirtualScroll"],standalone:!0});let o=n;return o})(),iT=(()=>{let n=class n{constructor(){this.title=null,this.footer=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-table-title-footer"]],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-title",r.title!==null)("ant-table-footer",r.footer!==null)},inputs:{title:"title",footer:"footer"},standalone:!0,features:[K],decls:2,vars:2,consts:[[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,ZN,2,1,"ng-container",0)(1,JN,2,1,"ng-container",0),i&2&&(h("nzStringTemplateOutlet",r.title),f(),h("nzStringTemplateOutlet",r.footer))},dependencies:[Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Yb="table",ev=(()=>{let n=class n{onPageSizeChange(t){this.nzTableDataService.updatePageSize(t)}onPageIndexChange(t){this.nzTableDataService.updatePageIndex(t)}constructor(t,i,r,s,a,l,c){this.elementRef=t,this.nzResizeObserver=i,this.nzConfigService=r,this.cdr=s,this.nzTableStyleService=a,this.nzTableDataService=l,this.directionality=c,this._nzModuleName=Yb,this.nzTableLayout="auto",this.nzShowTotal=null,this.nzItemRender=null,this.nzTitle=null,this.nzFooter=null,this.nzNoResult=void 0,this.nzPageSizeOptions=[10,20,30,40,50],this.nzVirtualItemSize=0,this.nzVirtualMaxBufferPx=200,this.nzVirtualMinBufferPx=100,this.nzVirtualForTrackBy=u=>u,this.nzLoadingDelay=0,this.nzPageIndex=1,this.nzPageSize=10,this.nzTotal=0,this.nzWidthConfig=[],this.nzData=[],this.nzCustomColumn=[],this.nzPaginationPosition="bottom",this.nzScroll={x:null,y:null},this.nzPaginationType="default",this.nzFrontPagination=!0,this.nzTemplateMode=!1,this.nzShowPagination=!0,this.nzLoading=!1,this.nzOuterBordered=!1,this.nzLoadingIndicator=null,this.nzBordered=!1,this.nzSize="default",this.nzShowSizeChanger=!1,this.nzHideOnSinglePage=!1,this.nzShowQuickJumper=!1,this.nzSimple=!1,this.nzPageSizeChange=new O,this.nzPageIndexChange=new O,this.nzQueryParams=new O,this.nzCurrentPageDataChange=new O,this.nzCustomColumnChange=new O,this.data=[],this.scrollX=null,this.scrollY=null,this.theadTemplate=null,this.listOfAutoColWidth=[],this.listOfManualColWidth=[],this.hasFixLeft=!1,this.hasFixRight=!1,this.showPagination=!0,this.destroy$=new J,this.templateMode$=new ct(!1),this.dir="ltr",this.verticalScrollBarWidth=0,this.nzConfigService.getConfigChangeEventForComponent(Yb).pipe(F(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){let{pageIndexDistinct$:t,pageSizeDistinct$:i,listOfCurrentPageData$:r,total$:s,queryParams$:a,listOfCustomColumn$:l}=this.nzTableDataService,{theadTemplate$:c,hasFixLeft$:u,hasFixRight$:d}=this.nzTableStyleService;this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(p=>{this.dir=p,this.cdr.detectChanges()}),a.pipe(F(this.destroy$)).subscribe(this.nzQueryParams),t.pipe(F(this.destroy$)).subscribe(p=>{p!==this.nzPageIndex&&(this.nzPageIndex=p,this.nzPageIndexChange.next(p))}),i.pipe(F(this.destroy$)).subscribe(p=>{p!==this.nzPageSize&&(this.nzPageSize=p,this.nzPageSizeChange.next(p))}),s.pipe(F(this.destroy$),Qe(()=>this.nzFrontPagination)).subscribe(p=>{p!==this.nzTotal&&(this.nzTotal=p,this.cdr.markForCheck())}),r.pipe(F(this.destroy$)).subscribe(p=>{this.data=p,this.nzCurrentPageDataChange.next(p),this.cdr.markForCheck()}),l.pipe(F(this.destroy$)).subscribe(p=>{this.nzCustomColumn=p,this.nzCustomColumnChange.next(p),this.cdr.markForCheck()}),c.pipe(F(this.destroy$)).subscribe(p=>{this.theadTemplate=p,this.cdr.markForCheck()}),u.pipe(F(this.destroy$)).subscribe(p=>{this.hasFixLeft=p,this.cdr.markForCheck()}),d.pipe(F(this.destroy$)).subscribe(p=>{this.hasFixRight=p,this.cdr.markForCheck()}),Fn([s,this.templateMode$]).pipe(We(([p,g])=>p===0&&!g),F(this.destroy$)).subscribe(p=>{this.nzTableStyleService.setShowEmpty(p)}),this.verticalScrollBarWidth=XS("vertical"),this.nzTableStyleService.listOfListOfThWidthPx$.pipe(F(this.destroy$)).subscribe(p=>{this.listOfAutoColWidth=p,this.cdr.markForCheck()}),this.nzTableStyleService.manualWidthConfigPx$.pipe(F(this.destroy$)).subscribe(p=>{this.listOfManualColWidth=p,this.cdr.markForCheck()})}ngOnChanges(t){let{nzScroll:i,nzPageIndex:r,nzPageSize:s,nzFrontPagination:a,nzData:l,nzCustomColumn:c,nzWidthConfig:u,nzNoResult:d,nzTemplateMode:p}=t;r&&this.nzTableDataService.updatePageIndex(this.nzPageIndex),s&&this.nzTableDataService.updatePageSize(this.nzPageSize),l&&(this.nzData=this.nzData||[],this.nzTableDataService.updateListOfData(this.nzData)),c&&(this.nzCustomColumn=this.nzCustomColumn||[],this.nzTableDataService.updateListOfCustomColumn(this.nzCustomColumn)),a&&this.nzTableDataService.updateFrontPagination(this.nzFrontPagination),i&&this.setScrollOnChanges(),u&&this.nzTableStyleService.setTableWidthConfig(this.nzWidthConfig),p&&this.templateMode$.next(this.nzTemplateMode),d&&this.nzTableStyleService.setNoResult(this.nzNoResult),this.updateShowPagination()}ngAfterViewInit(){this.nzResizeObserver.observe(this.elementRef).pipe(We(([t])=>{let{width:i}=t.target.getBoundingClientRect(),r=this.scrollY?this.verticalScrollBarWidth:0;return Math.floor(i-r)}),F(this.destroy$)).subscribe(this.nzTableStyleService.hostWidth$),this.nzTableInnerScrollComponent&&this.nzTableInnerScrollComponent.cdkVirtualScrollViewport&&(this.cdkVirtualScrollViewport=this.nzTableInnerScrollComponent.cdkVirtualScrollViewport)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setScrollOnChanges(){this.scrollX=this.nzScroll&&this.nzScroll.x||null,this.scrollY=this.nzScroll&&this.nzScroll.y||null,this.nzTableStyleService.setScroll(this.scrollX,this.scrollY)}updateShowPagination(){this.showPagination=this.nzHideOnSinglePage&&this.nzData.length>this.nzPageSize||this.nzData.length>0&&!this.nzHideOnSinglePage||!this.nzFrontPagination&&this.nzTotal>this.nzPageSize}};n.\u0275fac=function(i){return new(i||n)(w(de),w(ds),w(st),w(fe),w(Ma),w(Km),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-table"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Jm,5),i&2){let a;ce(a=ue())&&(r.nzVirtualScrollDirective=a.first)}},viewQuery:function(i,r){if(i&1&&xe(qm,5),i&2){let s;ce(s=ue())&&(r.nzTableInnerScrollComponent=s.first)}},hostAttrs:[1,"ant-table-wrapper"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-table-wrapper-rtl",r.dir==="rtl")("ant-table-custom-column",r.nzCustomColumn.length)},inputs:{nzTableLayout:"nzTableLayout",nzShowTotal:"nzShowTotal",nzItemRender:"nzItemRender",nzTitle:"nzTitle",nzFooter:"nzFooter",nzNoResult:"nzNoResult",nzPageSizeOptions:"nzPageSizeOptions",nzVirtualItemSize:"nzVirtualItemSize",nzVirtualMaxBufferPx:"nzVirtualMaxBufferPx",nzVirtualMinBufferPx:"nzVirtualMinBufferPx",nzVirtualForTrackBy:"nzVirtualForTrackBy",nzLoadingDelay:"nzLoadingDelay",nzPageIndex:"nzPageIndex",nzPageSize:"nzPageSize",nzTotal:"nzTotal",nzWidthConfig:"nzWidthConfig",nzData:"nzData",nzCustomColumn:"nzCustomColumn",nzPaginationPosition:"nzPaginationPosition",nzScroll:"nzScroll",nzPaginationType:"nzPaginationType",nzFrontPagination:"nzFrontPagination",nzTemplateMode:"nzTemplateMode",nzShowPagination:"nzShowPagination",nzLoading:"nzLoading",nzOuterBordered:"nzOuterBordered",nzLoadingIndicator:"nzLoadingIndicator",nzBordered:"nzBordered",nzSize:"nzSize",nzShowSizeChanger:"nzShowSizeChanger",nzHideOnSinglePage:"nzHideOnSinglePage",nzShowQuickJumper:"nzShowQuickJumper",nzSimple:"nzSimple"},outputs:{nzPageSizeChange:"nzPageSizeChange",nzPageIndexChange:"nzPageIndexChange",nzQueryParams:"nzQueryParams",nzCurrentPageDataChange:"nzCurrentPageDataChange",nzCustomColumnChange:"nzCustomColumnChange"},exportAs:["nzTable"],standalone:!0,features:[Ve([Ma,Km]),oe,K],ngContentSelectors:ks,decls:14,vars:27,consts:[[3,"nzDelay","nzSpinning","nzIndicator"],[4,"ngIf"],[1,"ant-table"],["tableMainElement",""],[3,"title",4,"ngIf"],[3,"data","scrollX","scrollY","contentTemplate","listOfColWidth","theadTemplate","verticalScrollBarWidth","virtualTemplate","virtualItemSize","virtualMaxBufferPx","virtualMinBufferPx","tableMainElement","virtualForTrackBy",4,"ngIf","ngIfElse"],["defaultTemplate",""],[3,"footer",4,"ngIf"],["paginationTemplate",""],["contentTemplate",""],[3,"ngTemplateOutlet"],[3,"title"],[3,"data","scrollX","scrollY","contentTemplate","listOfColWidth","theadTemplate","verticalScrollBarWidth","virtualTemplate","virtualItemSize","virtualMaxBufferPx","virtualMinBufferPx","tableMainElement","virtualForTrackBy"],[3,"tableLayout","listOfColWidth","theadTemplate","contentTemplate"],[3,"footer"],["class","ant-table-pagination ant-table-pagination-right",3,"hidden","nzShowSizeChanger","nzPageSizeOptions","nzItemRender","nzShowQuickJumper","nzHideOnSinglePage","nzShowTotal","nzSize","nzPageSize","nzTotal","nzSimple","nzPageIndex","nzPageSizeChange","nzPageIndexChange",4,"ngIf"],[1,"ant-table-pagination","ant-table-pagination-right",3,"hidden","nzShowSizeChanger","nzPageSizeOptions","nzItemRender","nzShowQuickJumper","nzHideOnSinglePage","nzShowTotal","nzSize","nzPageSize","nzTotal","nzSimple","nzPageIndex","nzPageSizeChange","nzPageIndexChange"]],template:function(i,r){if(i&1&&(Pe(),C(0,"nz-spin",0),_(1,tL,2,1,"ng-container",1),C(2,"div",2,3),_(4,nL,1,1,"nz-table-title-footer",4)(5,iL,1,13,"nz-table-inner-scroll",5)(6,rL,1,4,"ng-template",null,6,_e)(8,oL,1,1,"nz-table-title-footer",7),S(),_(9,aL,2,1,"ng-container",1),S(),_(10,cL,1,1,"ng-template",null,8,_e)(12,uL,1,0,"ng-template",null,9,_e)),i&2){let s=te(7);h("nzDelay",r.nzLoadingDelay)("nzSpinning",r.nzLoading)("nzIndicator",r.nzLoadingIndicator),f(),h("ngIf",r.nzPaginationPosition==="both"||r.nzPaginationPosition==="top"),f(),k("ant-table-rtl",r.dir==="rtl")("ant-table-fixed-header",r.nzData.length&&r.scrollY)("ant-table-fixed-column",r.scrollX)("ant-table-has-fix-left",r.hasFixLeft)("ant-table-has-fix-right",r.hasFixRight)("ant-table-bordered",r.nzBordered)("nz-table-out-bordered",r.nzOuterBordered&&!r.nzBordered)("ant-table-middle",r.nzSize==="middle")("ant-table-small",r.nzSize==="small"),f(2),h("ngIf",r.nzTitle),f(),h("ngIf",r.scrollY||r.scrollX)("ngIfElse",s),f(3),h("ngIf",r.nzFooter),f(),h("ngIf",r.nzPaginationPosition==="both"||r.nzPaginationPosition==="bottom")}},dependencies:[qb,we,Be,iT,qm,TL,Ub,Um],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzFrontPagination",void 0),N([W()],o.prototype,"nzTemplateMode",void 0),N([W()],o.prototype,"nzShowPagination",void 0),N([W()],o.prototype,"nzLoading",void 0),N([W()],o.prototype,"nzOuterBordered",void 0),N([De()],o.prototype,"nzLoadingIndicator",void 0),N([De(),W()],o.prototype,"nzBordered",void 0),N([De()],o.prototype,"nzSize",void 0),N([De(),W()],o.prototype,"nzShowSizeChanger",void 0),N([De(),W()],o.prototype,"nzHideOnSinglePage",void 0),N([De(),W()],o.prototype,"nzShowQuickJumper",void 0),N([De(),W()],o.prototype,"nzSimple",void 0),o})(),EL=(()=>{let n=class n{constructor(t,i){this.nzResizeObserver=t,this.ngZone=i,this.listOfMeasureColumn=[],this.listOfAutoWidth=new O,this.destroy$=new J}trackByFunc(t,i){return i}ngAfterViewInit(){this.listOfTdElement.changes.pipe(Ot(this.listOfTdElement)).pipe(on(t=>Fn(t.toArray().map(i=>this.nzResizeObserver.observe(i).pipe(We(([r])=>{let{width:s}=r.target.getBoundingClientRect();return Math.floor(s)}))))),Sa(16),F(this.destroy$)).subscribe(t=>{this.ngZone instanceof $e&&$e.isInAngularZone()?this.listOfAutoWidth.next(t):this.ngZone.run(()=>this.listOfAutoWidth.next(t))})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(ds),w($e))},n.\u0275cmp=j({type:n,selectors:[["tr","nz-table-measure-row",""]],viewQuery:function(i,r){if(i&1&&xe(Qb,5),i&2){let s;ce(s=ue())&&(r.listOfTdElement=s)}},hostAttrs:[1,"ant-table-measure-now"],inputs:{listOfMeasureColumn:"listOfMeasureColumn"},outputs:{listOfAutoWidth:"listOfAutoWidth"},standalone:!0,features:[K],attrs:dL,decls:1,vars:2,consts:[["class","nz-disable-td","style","padding: 0px; border: 0px; height: 0px;",4,"ngFor","ngForOf","ngForTrackBy"],[1,"nz-disable-td",2,"padding","0px","border","0px","height","0px"],["tdElement",""]],template:function(i,r){i&1&&_(0,pL,2,0,"td",0),i&2&&h("ngForOf",r.listOfMeasureColumn)("ngForTrackBy",r.trackByFunc)},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),tv=(()=>{let n=class n{constructor(t){if(this.nzTableStyleService=t,this.isInsideTable=!1,this.showEmpty$=new ct(!1),this.noResult$=new ct(void 0),this.listOfMeasureColumn$=new ct([]),this.destroy$=new J,this.isInsideTable=!!this.nzTableStyleService,this.nzTableStyleService){let{showEmpty$:i,noResult$:r,listOfMeasureColumn$:s}=this.nzTableStyleService;r.pipe(F(this.destroy$)).subscribe(this.noResult$),s.pipe(F(this.destroy$)).subscribe(this.listOfMeasureColumn$),i.pipe(F(this.destroy$)).subscribe(this.showEmpty$)}}onListOfAutoWidthChange(t){this.nzTableStyleService.setListOfAutoWidth(t)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Ma,8))},n.\u0275cmp=j({type:n,selectors:[["tbody"]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-table-tbody",r.isInsideTable)},standalone:!0,features:[K],ngContentSelectors:ks,decls:5,vars:6,consts:[[4,"ngIf"],["class","ant-table-placeholder","nz-table-fixed-row","",4,"ngIf"],["nz-table-measure-row","",3,"listOfMeasureColumn","listOfAutoWidth",4,"ngIf"],["nz-table-measure-row","",3,"listOfMeasureColumn","listOfAutoWidth"],["nz-table-fixed-row","",1,"ant-table-placeholder"],["nzComponentName","table",3,"specificContent"]],template:function(i,r){i&1&&(Pe(),_(0,fL,2,1,"ng-container",0),Xn(1,"async"),Ie(2),_(3,gL,3,3,"tr",1),Xn(4,"async")),i&2&&(h("ngIf",Vi(1,2,r.listOfMeasureColumn$)),f(3),h("ngIf",Vi(4,4,r.showEmpty$)))},dependencies:[we,ru,EL,Zm,nh,Tu],encapsulation:2,changeDetection:0});let o=n;return o})(),nv=(()=>{let n=class n{constructor(t){this.nzTableStyleService=t,this.destroy$=new J,this.listOfFixedColumns$=new tn(1),this.listOfColumns$=new tn(1),this.listOfFixedColumnsChanges$=this.listOfFixedColumns$.pipe(on(i=>_t(this.listOfFixedColumns$,...i.map(r=>r.changes$)).pipe(zo(()=>this.listOfFixedColumns$))),F(this.destroy$)),this.listOfFixedLeftColumnChanges$=this.listOfFixedColumnsChanges$.pipe(We(i=>i.filter(r=>r.nzLeft!==!1))),this.listOfFixedRightColumnChanges$=this.listOfFixedColumnsChanges$.pipe(We(i=>i.filter(r=>r.nzRight!==!1))),this.listOfColumnsChanges$=this.listOfColumns$.pipe(on(i=>_t(this.listOfColumns$,...i.map(r=>r.changes$)).pipe(zo(()=>this.listOfColumns$))),F(this.destroy$)),this.isInsideTable=!1,this.isInsideTable=!!t}ngAfterContentInit(){this.nzTableStyleService&&(this.listOfCellFixedDirective.changes.pipe(Ot(this.listOfCellFixedDirective),F(this.destroy$)).subscribe(this.listOfFixedColumns$),this.listOfNzThDirective.changes.pipe(Ot(this.listOfNzThDirective),F(this.destroy$)).subscribe(this.listOfColumns$),this.listOfFixedLeftColumnChanges$.subscribe(t=>{t.forEach(i=>i.setIsLastLeft(i===t[t.length-1]))}),this.listOfFixedRightColumnChanges$.subscribe(t=>{t.forEach(i=>i.setIsFirstRight(i===t[0]))}),Fn([this.nzTableStyleService.listOfListOfThWidth$,this.listOfFixedLeftColumnChanges$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{i.forEach((r,s)=>{if(r.isAutoLeft){let l=i.slice(0,s).reduce((u,d)=>u+(d.colspan||d.colSpan||1),0),c=t.slice(0,l).reduce((u,d)=>u+d,0);r.setAutoLeftWidth(`${c}px`)}})}),Fn([this.nzTableStyleService.listOfListOfThWidth$,this.listOfFixedRightColumnChanges$]).pipe(F(this.destroy$)).subscribe(([t,i])=>{i.forEach((r,s)=>{let a=i[i.length-s-1];if(a.isAutoRight){let c=i.slice(i.length-s,i.length).reduce((d,p)=>d+(p.colspan||p.colSpan||1),0),u=t.slice(t.length-c,t.length).reduce((d,p)=>d+p,0);a.setAutoRightWidth(`${u}px`)}})}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Ma,8))},n.\u0275dir=Se({type:n,selectors:[["tr",3,"mat-row","",3,"mat-header-row","",3,"nz-table-measure-row","",3,"nzExpand","",3,"nz-table-fixed-row",""]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,Xm,4),Ft(s,Ym,4)),i&2){let a;ce(a=ue())&&(r.listOfNzThDirective=a),ce(a=ue())&&(r.listOfCellFixedDirective=a)}},hostVars:2,hostBindings:function(i,r){i&2&&k("ant-table-row",r.isInsideTable)},standalone:!0});let o=n;return o})(),rT=(()=>{let n=class n{constructor(t,i,r,s){this.elementRef=t,this.renderer=i,this.nzTableStyleService=r,this.nzTableDataService=s,this.destroy$=new J,this.isInsideTable=!1,this.nzSortOrderChange=new O,this.isInsideTable=!!this.nzTableStyleService}ngOnInit(){this.nzTableStyleService&&this.nzTableStyleService.setTheadTemplate(this.templateRef)}ngAfterContentInit(){if(this.nzTableStyleService){let t=this.listOfNzTrDirective.changes.pipe(Ot(this.listOfNzTrDirective),We(a=>a&&a.first)),i=t.pipe(on(a=>a?a.listOfColumnsChanges$:xs),F(this.destroy$));i.subscribe(a=>this.nzTableStyleService.setListOfTh(a)),this.nzTableStyleService.enableAutoMeasure$.pipe(on(a=>a?i:Mn([]))).pipe(F(this.destroy$)).subscribe(a=>this.nzTableStyleService.setListOfMeasureColumn(a));let r=t.pipe(on(a=>a?a.listOfFixedLeftColumnChanges$:xs),F(this.destroy$)),s=t.pipe(on(a=>a?a.listOfFixedRightColumnChanges$:xs),F(this.destroy$));r.subscribe(a=>{this.nzTableStyleService.setHasFixLeft(a.length!==0)}),s.subscribe(a=>{this.nzTableStyleService.setHasFixRight(a.length!==0)})}if(this.nzTableDataService){let t=this.listOfNzThAddOnComponent.changes.pipe(Ot(this.listOfNzThAddOnComponent));t.pipe(on(()=>_t(...this.listOfNzThAddOnComponent.map(s=>s.manualClickOrder$))),F(this.destroy$)).subscribe(s=>{let a={key:s.nzColumnKey,value:s.sortOrder};this.nzSortOrderChange.emit(a),s.nzSortFn&&s.nzSortPriority===!1&&this.listOfNzThAddOnComponent.filter(l=>l!==s).forEach(l=>l.clearSortOrder())}),t.pipe(on(s=>_t(t,...s.map(a=>a.calcOperatorChange$)).pipe(zo(()=>t))),We(s=>s.filter(a=>!!a.nzSortFn||!!a.nzFilterFn).map(a=>{let{nzSortFn:l,sortOrder:c,nzFilterFn:u,nzFilterValue:d,nzSortPriority:p,nzColumnKey:g}=a;return{key:g,sortFn:l,sortPriority:p,sortOrder:c,filterFn:u,filterValue:d}})),Os(0),F(this.destroy$)).subscribe(s=>{this.nzTableDataService.listOfCalcOperator$.next(s)})}}ngAfterViewInit(){this.nzTableStyleService&&this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement),this.elementRef.nativeElement)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(Ma,8),w(Km,8))},n.\u0275cmp=j({type:n,selectors:[["thead",9,"ant-table-thead"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,nv,5),Ft(s,uh,5)),i&2){let a;ce(a=ue())&&(r.listOfNzTrDirective=a),ce(a=ue())&&(r.listOfNzThAddOnComponent=a)}},viewQuery:function(i,r){if(i&1&&xe(mL,7),i&2){let s;ce(s=ue())&&(r.templateRef=s.first)}},outputs:{nzSortOrderChange:"nzSortOrderChange"},standalone:!0,features:[K],ngContentSelectors:ks,decls:3,vars:1,consts:[["contentTemplate",""],[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),_(0,vL,1,0,"ng-template",null,0,_e)(2,CL,2,1,"ng-container",1)),i&2&&(f(2),h("ngIf",!r.isInsideTable))},dependencies:[we,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),oT=(()=>{let n=class n{constructor(){this.nzExpand=!0}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["tr","nzExpand",""]],hostAttrs:[1,"ant-table-expanded-row"],hostVars:1,hostBindings:function(i,r){i&2&&Ug("hidden",!r.nzExpand)},inputs:{nzExpand:"nzExpand"},standalone:!0});let o=n;return o})(),nc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ev,uh,Qm,tv,iT,qm,eT,Zb,Jb,Xb,bL]});let o=n;return o})();var xL=["nz-input-group-slot",""];function zL(o,n){if(o&1&&R(0,"span",2),o&2){let e=m();h("nzType",e.icon)}}function OL(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.template)}}var aT=["*"];function DL(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(2);h("icon",e.nzAddOnBeforeIcon)("template",e.nzAddOnBefore)}}function RL(o,n){}function IL(o,n){if(o&1&&(C(0,"span",8),_(1,RL,0,0,"ng-template",9),S()),o&2){let e=m(2),t=te(4);k("ant-input-affix-wrapper-disabled",e.disabled)("ant-input-affix-wrapper-sm",e.isSmall)("ant-input-affix-wrapper-lg",e.isLarge)("ant-input-affix-wrapper-focused",e.focused),h("ngClass",e.affixInGroupStatusCls),f(),h("ngTemplateOutlet",t)}}function PL(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(2);h("icon",e.nzAddOnAfterIcon)("template",e.nzAddOnAfter)}}function ML(o,n){if(o&1&&(C(0,"span",4),_(1,DL,1,2,"span",5)(2,IL,2,10,"span",6)(3,PL,1,2,"span",5),S()),o&2){let e=m(),t=te(6);f(),h("ngIf",e.nzAddOnBefore||e.nzAddOnBeforeIcon),f(),h("ngIf",e.isAffix||e.hasFeedback)("ngIfElse",t),f(),h("ngIf",e.nzAddOnAfter||e.nzAddOnAfterIcon)}}function FL(o,n){}function AL(o,n){if(o&1&&_(0,FL,0,0,"ng-template",9),o&2){m(2);let e=te(4);h("ngTemplateOutlet",e)}}function NL(o,n){if(o&1&&_(0,AL,1,1,"ng-template",10),o&2){let e=m(),t=te(6);h("ngIf",e.isAffix)("ngIfElse",t)}}function LL(o,n){if(o&1&&R(0,"span",13),o&2){let e=m(2);h("icon",e.nzPrefixIcon)("template",e.nzPrefix)}}function kL(o,n){}function VL(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",16),o&2){let e=m(3);h("status",e.status)}}function GL(o,n){if(o&1&&(C(0,"span",14),_(1,VL,1,1,"nz-form-item-feedback-icon",15),S()),o&2){let e=m(2);h("icon",e.nzSuffixIcon)("template",e.nzSuffix),f(),h("ngIf",e.isFeedback)}}function HL(o,n){if(o&1&&_(0,LL,1,2,"span",11)(1,kL,0,0,"ng-template",9)(2,GL,2,3,"span",12),o&2){let e=m(),t=te(6);h("ngIf",e.nzPrefix||e.nzPrefixIcon),f(),h("ngTemplateOutlet",t),f(),h("ngIf",e.nzSuffix||e.nzSuffixIcon||e.isFeedback)}}function BL(o,n){if(o&1&&(C(0,"span",18),R(1,"nz-form-item-feedback-icon",16),S()),o&2){let e=m(2);f(),h("status",e.status)}}function $L(o,n){if(o&1&&(Ie(0),_(1,BL,2,1,"span",17)),o&2){let e=m();f(),h("ngIf",!e.isAddOn&&!e.isAffix&&e.isFeedback)}}var jL=[[["textarea","nz-input",""]]],WL=["textarea[nz-input]"],lT=(()=>{let n=class n{constructor(){this.icon=null,this.type=null,this.template=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["","nz-input-group-slot",""]],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-input-group-addon",r.type==="addon")("ant-input-prefix",r.type==="prefix")("ant-input-suffix",r.type==="suffix")},inputs:{icon:"icon",type:"type",template:"template"},standalone:!0,features:[K],attrs:xL,ngContentSelectors:aT,decls:3,vars:2,consts:[["nz-icon","",3,"nzType",4,"ngIf"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType"]],template:function(i,r){i&1&&(Pe(),_(0,zL,1,1,"span",0)(1,OL,2,1,"ng-container",1),Ie(2)),i&2&&(h("ngIf",r.icon),f(),h("nzStringTemplateOutlet",r.template))},dependencies:[Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),Fa=(()=>{let n=class n{get disabled(){return this.ngControl&&this.ngControl.disabled!==null?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=t!=null&&`${t}`!="false"}constructor(t,i,r,s,a,l,c){this.ngControl=t,this.renderer=i,this.elementRef=r,this.hostView=s,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=c,this.nzBorderless=!1,this.nzSize="default",this.nzStepperless=!0,this.nzStatus="",this._disabled=!1,this.disabled$=new J,this.dir="ltr",this.prefixCls="ant-input",this.status="",this.statusCls={},this.hasFeedback=!1,this.feedbackRef=null,this.components=[],this.destroy$=new J}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.ngControl&&this.ngControl.statusChanges?.pipe(Qe(()=>this.ngControl.disabled!==null),F(this.destroy$)).subscribe(()=>{this.disabled$.next(this.ngControl.disabled)}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnChanges(t){let{disabled:i,nzStatus:r}=t;i&&this.disabled$.next(this.disabled),r&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.renderFeedbackIcon(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.elementRef.nativeElement,r):this.renderer.removeClass(this.elementRef.nativeElement,r)})}renderFeedbackIcon(){if(!this.status||!this.hasFeedback||this.nzFormNoStatusService){this.hostView.clear(),this.feedbackRef=null;return}this.feedbackRef=this.feedbackRef||this.hostView.createComponent(mr),this.feedbackRef.location.nativeElement.classList.add("ant-input-suffix"),this.feedbackRef.instance.status=this.status,this.feedbackRef.instance.updateIcon()}};n.\u0275fac=function(i){return new(i||n)(w(Ri,10),w(He),w(de),w(Tn),w(Me,8),w(cn,8),w(_i,8))},n.\u0275dir=Se({type:n,selectors:[["input","nz-input",""],["textarea","nz-input",""]],hostAttrs:[1,"ant-input"],hostVars:13,hostBindings:function(i,r){i&2&&(ze("disabled",r.disabled||null),k("ant-input-disabled",r.disabled)("ant-input-borderless",r.nzBorderless)("ant-input-lg",r.nzSize==="large")("ant-input-sm",r.nzSize==="small")("ant-input-rtl",r.dir==="rtl")("ant-input-stepperless",r.nzStepperless))},inputs:{nzBorderless:"nzBorderless",nzSize:"nzSize",nzStepperless:"nzStepperless",nzStatus:"nzStatus",disabled:"disabled"},exportAs:["nzInput"],standalone:!0,features:[oe]});let o=n;return N([W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzStepperless",void 0),o})(),cT=(()=>{let n=class n{constructor(t){this.elementRef=t}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275dir=Se({type:n,selectors:[["nz-input-group","nzSuffix",""],["nz-input-group","nzPrefix",""]],standalone:!0});let o=n;return o})(),iv=(()=>{let n=class n{constructor(t,i,r,s,a,l,c){this.focusMonitor=t,this.elementRef=i,this.renderer=r,this.cdr=s,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=c,this.nzAddOnBeforeIcon=null,this.nzAddOnAfterIcon=null,this.nzPrefixIcon=null,this.nzSuffixIcon=null,this.nzStatus="",this.nzSize="default",this.nzSearch=!1,this.nzCompact=!1,this.isLarge=!1,this.isSmall=!1,this.isAffix=!1,this.isAddOn=!1,this.isFeedback=!1,this.focused=!1,this.disabled=!1,this.dir="ltr",this.prefixCls="ant-input",this.affixStatusCls={},this.groupStatusCls={},this.affixInGroupStatusCls={},this.status="",this.hasFeedback=!1,this.destroy$=new J}updateChildrenInputSize(){this.listOfNzInputDirective&&this.listOfNzInputDirective.forEach(t=>t.nzSize=this.nzSize)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{this.focused=!!t,this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngAfterContentInit(){this.updateChildrenInputSize();let t=this.listOfNzInputDirective.changes.pipe(Ot(this.listOfNzInputDirective));t.pipe(on(i=>_t(t,...i.map(r=>r.disabled$))),zo(()=>t),We(i=>i.some(r=>r.disabled)),F(this.destroy$)).subscribe(i=>{this.disabled=i,this.cdr.markForCheck()})}ngOnChanges(t){let{nzSize:i,nzSuffix:r,nzPrefix:s,nzPrefixIcon:a,nzSuffixIcon:l,nzAddOnAfter:c,nzAddOnBefore:u,nzAddOnAfterIcon:d,nzAddOnBeforeIcon:p,nzStatus:g}=t;i&&(this.updateChildrenInputSize(),this.isLarge=this.nzSize==="large",this.isSmall=this.nzSize==="small"),(r||s||a||l)&&(this.isAffix=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon)),(c||u||d||p)&&(this.isAddOn=!!(this.nzAddOnAfter||this.nzAddOnBefore||this.nzAddOnAfterIcon||this.nzAddOnBeforeIcon),this.nzFormNoStatusService?.noFormStatus?.next(this.isAddOn)),g&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.isFeedback=!!t&&i;let r=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon);this.isAffix=r||!this.isAddOn&&i,this.affixInGroupStatusCls=this.isAffix||this.isFeedback?this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,t,i):{},this.cdr.markForCheck(),this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,this.isAddOn?"":t,this.isAddOn?!1:i),this.groupStatusCls=vi(`${this.prefixCls}-group-wrapper`,this.isAddOn?t:"",this.isAddOn?i:!1);let s=V(V({},this.affixStatusCls),this.groupStatusCls);Object.keys(s).forEach(a=>{s[a]?this.renderer.addClass(this.elementRef.nativeElement,a):this.renderer.removeClass(this.elementRef.nativeElement,a)})}};n.\u0275fac=function(i){return new(i||n)(w(Oi),w(de),w(He),w(fe),w(Me,8),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-input-group"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Fa,4),i&2){let a;ce(a=ue())&&(r.listOfNzInputDirective=a)}},hostVars:40,hostBindings:function(i,r){i&2&&k("ant-input-group-compact",r.nzCompact)("ant-input-search-enter-button",r.nzSearch)("ant-input-search",r.nzSearch)("ant-input-search-rtl",r.dir==="rtl")("ant-input-search-sm",r.nzSearch&&r.isSmall)("ant-input-search-large",r.nzSearch&&r.isLarge)("ant-input-group-wrapper",r.isAddOn)("ant-input-group-wrapper-rtl",r.dir==="rtl")("ant-input-group-wrapper-lg",r.isAddOn&&r.isLarge)("ant-input-group-wrapper-sm",r.isAddOn&&r.isSmall)("ant-input-affix-wrapper",r.isAffix&&!r.isAddOn)("ant-input-affix-wrapper-rtl",r.dir==="rtl")("ant-input-affix-wrapper-focused",r.isAffix&&r.focused)("ant-input-affix-wrapper-disabled",r.isAffix&&r.disabled)("ant-input-affix-wrapper-lg",r.isAffix&&!r.isAddOn&&r.isLarge)("ant-input-affix-wrapper-sm",r.isAffix&&!r.isAddOn&&r.isSmall)("ant-input-group",!r.isAffix&&!r.isAddOn)("ant-input-group-rtl",r.dir==="rtl")("ant-input-group-lg",!r.isAffix&&!r.isAddOn&&r.isLarge)("ant-input-group-sm",!r.isAffix&&!r.isAddOn&&r.isSmall)},inputs:{nzAddOnBeforeIcon:"nzAddOnBeforeIcon",nzAddOnAfterIcon:"nzAddOnAfterIcon",nzPrefixIcon:"nzPrefixIcon",nzSuffixIcon:"nzSuffixIcon",nzAddOnBefore:"nzAddOnBefore",nzAddOnAfter:"nzAddOnAfter",nzPrefix:"nzPrefix",nzStatus:"nzStatus",nzSuffix:"nzSuffix",nzSize:"nzSize",nzSearch:"nzSearch",nzCompact:"nzCompact"},exportAs:["nzInputGroup"],standalone:!0,features:[Ve([_i]),oe,K],ngContentSelectors:aT,decls:7,vars:2,consts:[["class","ant-input-wrapper ant-input-group",4,"ngIf","ngIfElse"],["noAddOnTemplate",""],["affixTemplate",""],["contentTemplate",""],[1,"ant-input-wrapper","ant-input-group"],["nz-input-group-slot","","type","addon",3,"icon","template",4,"ngIf"],["class","ant-input-affix-wrapper",3,"ant-input-affix-wrapper-disabled","ant-input-affix-wrapper-sm","ant-input-affix-wrapper-lg","ant-input-affix-wrapper-focused","ngClass",4,"ngIf","ngIfElse"],["nz-input-group-slot","","type","addon",3,"icon","template"],[1,"ant-input-affix-wrapper",3,"ngClass"],[3,"ngTemplateOutlet"],[3,"ngIf","ngIfElse"],["nz-input-group-slot","","type","prefix",3,"icon","template",4,"ngIf"],["nz-input-group-slot","","type","suffix",3,"icon","template",4,"ngIf"],["nz-input-group-slot","","type","prefix",3,"icon","template"],["nz-input-group-slot","","type","suffix",3,"icon","template"],[3,"status",4,"ngIf"],[3,"status"],["nz-input-group-slot","","type","suffix",4,"ngIf"],["nz-input-group-slot","","type","suffix"]],template:function(i,r){if(i&1&&(Pe(),_(0,ML,4,4,"span",0)(1,NL,1,2,"ng-template",null,1,_e)(3,HL,3,3,"ng-template",null,2,_e)(5,$L,2,1,"ng-template",null,3,_e)),i&2){let s=te(2);h("ngIf",r.isAddOn)("ngIfElse",s)}},dependencies:[we,lT,St,Be,ro,mr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzSearch",void 0),N([W()],o.prototype,"nzCompact",void 0),o})(),uT=(()=>{let n=class n{set nzAutosize(t){typeof t=="string"||t===!0?this.autosize=!0:(r=>typeof r!="string"&&typeof r!="boolean"&&(!!r.maxRows||!!r.minRows))(t)&&(this.autosize=!0,this.minRows=t.minRows,this.maxRows=t.maxRows,this.maxHeight=this.setMaxHeight(),this.minHeight=this.setMinHeight())}resizeToFitContent(t=!1){if(this.cacheTextareaLineHeight(),!this.cachedLineHeight)return;let i=this.el,r=i.value;if(!t&&this.minRows===this.previousMinRows&&r===this.previousValue)return;let s=i.placeholder;i.classList.add("nz-textarea-autosize-measuring"),i.placeholder="";let a=Math.round((i.scrollHeight-this.inputGap)/this.cachedLineHeight)*this.cachedLineHeight+this.inputGap;this.maxHeight!==null&&a>this.maxHeight&&(a=this.maxHeight),this.minHeight!==null&&arequestAnimationFrame(()=>{let{selectionStart:l,selectionEnd:c}=i;!this.destroy$.isStopped&&document.activeElement===i&&i.setSelectionRange(l,c)})),this.previousValue=r,this.previousMinRows=this.minRows}cacheTextareaLineHeight(){if(this.cachedLineHeight>=0||!this.el.parentNode)return;let t=this.el.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this.el.parentNode.appendChild(t),this.cachedLineHeight=t.clientHeight-this.inputGap,this.el.parentNode.removeChild(t),this.maxHeight=this.setMaxHeight(),this.minHeight=this.setMinHeight()}setMinHeight(){let t=this.minRows&&this.cachedLineHeight?this.minRows*this.cachedLineHeight+this.inputGap:null;return t!==null&&(this.el.style.minHeight=`${t}px`),t}setMaxHeight(){let t=this.maxRows&&this.cachedLineHeight?this.maxRows*this.cachedLineHeight+this.inputGap:null;return t!==null&&(this.el.style.maxHeight=`${t}px`),t}noopInputHandler(){}constructor(t,i,r,s){this.elementRef=t,this.ngZone=i,this.platform=r,this.resizeService=s,this.autosize=!1,this.el=this.elementRef.nativeElement,this.maxHeight=null,this.minHeight=null,this.destroy$=new J,this.inputGap=10}ngAfterViewInit(){this.autosize&&this.platform.isBrowser&&(this.resizeToFitContent(),this.resizeService.subscribe().pipe(F(this.destroy$)).subscribe(()=>this.resizeToFitContent(!0)))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}ngDoCheck(){this.autosize&&this.platform.isBrowser&&this.resizeToFitContent()}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(gn),w(uu))},n.\u0275dir=Se({type:n,selectors:[["textarea","nzAutosize",""]],hostAttrs:["rows","1"],hostBindings:function(i,r){i&1&&A("input",function(){return r.noopInputHandler()})},inputs:{nzAutosize:"nzAutosize"},exportAs:["nzAutosize"],standalone:!0});let o=n;return o})(),dT=(()=>{let n=class n{constructor(t,i){this.renderer=t,this.elementRef=i,this.nzMaxCharacterCount=0,this.nzComputeCharacterCount=r=>r.length,this.nzFormatter=(r,s)=>`${r}${s>0?`/${s}`:""}`,this.configChange$=new J,this.destroy$=new J}ngAfterContentInit(){if(!this.nzInputDirective&&PS())throw new Error("[nz-textarea-count]: Could not find matching textarea[nz-input] child.");if(this.nzInputDirective.ngControl){let t=this.nzInputDirective.ngControl.valueChanges||xs;_t(t,this.configChange$).pipe(F(this.destroy$),We(()=>this.nzInputDirective.ngControl.value),Ot(this.nzInputDirective.ngControl.value)).subscribe(i=>{this.setDataCount(i)})}}setDataCount(t){let i=ht(t)?String(t):"",r=this.nzComputeCharacterCount(i),s=this.nzFormatter(r,this.nzMaxCharacterCount);this.renderer.setAttribute(this.elementRef.nativeElement,"data-count",s)}ngOnDestroy(){this.configChange$.complete(),this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(He),w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-textarea-count"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Fa,7),i&2){let a;ce(a=ue())&&(r.nzInputDirective=a.first)}},hostAttrs:[1,"ant-input-textarea-show-count"],inputs:{nzMaxCharacterCount:"nzMaxCharacterCount",nzComputeCharacterCount:"nzComputeCharacterCount",nzFormatter:"nzFormatter"},standalone:!0,features:[K],ngContentSelectors:WL,decls:1,vars:0,template:function(i,r){i&1&&(Pe(jL),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Vs=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[iv,lT]});let o=n;return o})();var UL=["upHandler"],KL=["downHandler"],qL=["inputElement"];function YL(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",11),o&2){let e=m();h("status",e.status)}}var QL=["nz-input-number-group-slot",""];function XL(o,n){if(o&1&&R(0,"span",2),o&2){let e=m();h("nzType",e.icon)}}function ZL(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.template)}}var pT=["*"];function JL(o,n){if(o&1&&R(0,"div",7),o&2){let e=m(2);h("icon",e.nzAddOnBeforeIcon)("template",e.nzAddOnBefore)}}function ek(o,n){}function tk(o,n){if(o&1&&(C(0,"div",8),_(1,ek,0,0,"ng-template",9),S()),o&2){let e=m(2),t=te(4);k("ant-input-number-affix-wrapper-disabled",e.disabled)("ant-input-number-affix-wrapper-sm",e.isSmall)("ant-input-number-affix-wrapper-lg",e.isLarge)("ant-input-number-affix-wrapper-focused",e.focused),h("ngClass",e.affixInGroupStatusCls),f(),h("ngTemplateOutlet",t)}}function nk(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(2);h("icon",e.nzAddOnAfterIcon)("template",e.nzAddOnAfter)}}function ik(o,n){if(o&1&&(C(0,"span",4),_(1,JL,1,2,"div",5)(2,tk,2,10,"div",6)(3,nk,1,2,"span",5),S()),o&2){let e=m(),t=te(6);f(),h("ngIf",e.nzAddOnBefore||e.nzAddOnBeforeIcon),f(),h("ngIf",e.isAffix||e.hasFeedback)("ngIfElse",t),f(),h("ngIf",e.nzAddOnAfter||e.nzAddOnAfterIcon)}}function rk(o,n){}function ok(o,n){if(o&1&&_(0,rk,0,0,"ng-template",9),o&2){m(2);let e=te(4);h("ngTemplateOutlet",e)}}function sk(o,n){if(o&1&&_(0,ok,1,1,"ng-template",10),o&2){let e=m(),t=te(6);h("ngIf",e.isAffix)("ngIfElse",t)}}function ak(o,n){if(o&1&&R(0,"span",13),o&2){let e=m(2);h("icon",e.nzPrefixIcon)("template",e.nzPrefix)}}function lk(o,n){}function ck(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",16),o&2){let e=m(3);h("status",e.status)}}function uk(o,n){if(o&1&&(C(0,"span",14),_(1,ck,1,1,"nz-form-item-feedback-icon",15),S()),o&2){let e=m(2);h("icon",e.nzSuffixIcon)("template",e.nzSuffix),f(),h("ngIf",e.isFeedback)}}function dk(o,n){if(o&1&&_(0,ak,1,2,"span",11)(1,lk,0,0,"ng-template",9)(2,uk,2,3,"span",12),o&2){let e=m(),t=te(6);h("ngIf",e.nzPrefix||e.nzPrefixIcon),f(),h("ngTemplateOutlet",t),f(),h("ngIf",e.nzSuffix||e.nzSuffixIcon||e.isFeedback)}}function pk(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",16),o&2){let e=m(3);h("status",e.status)}}function hk(o,n){if(o&1&&(C(0,"span",18),_(1,pk,1,1,"nz-form-item-feedback-icon",15),S()),o&2){let e=m(2);f(),h("ngIf",e.isFeedback)}}function fk(o,n){if(o&1&&(Ie(0),_(1,hk,2,1,"span",17)),o&2){let e=m();f(),h("ngIf",!e.isAddOn&&!e.isAffix&&e.isFeedback)}}var ic=(()=>{let n=class n{onModelChange(t){this.parsedValue=this.nzParser(t),this.inputElement.nativeElement.value=`${this.parsedValue}`;let i=this.getCurrentValidValue(this.parsedValue);this.setValue(i)}getCurrentValidValue(t){let i=t;return i===""?i="":this.isNotCompleteNumber(i)?i=this.value:i=`${this.getValidValue(i)}`,this.toNumber(i)}isNotCompleteNumber(t){return isNaN(t)||t===""||t===null||!!(t&&t.toString().indexOf(".")===t.toString().length-1)}getValidValue(t){let i=parseFloat(t);return isNaN(i)?t:(ithis.nzMax&&(i=this.nzMax),i)}toNumber(t){if(this.isNotCompleteNumber(t))return t;let i=String(t);if(i.indexOf(".")>=0&&ht(this.nzPrecision)){if(typeof this.nzPrecisionMode=="function")return this.nzPrecisionMode(t,this.nzPrecision);if(this.nzPrecisionMode==="cut"){let r=i.split(".");return r[1]=r[1].slice(0,this.nzPrecision),Number(r.join("."))}return Number(Number(t).toFixed(this.nzPrecision))}return Number(t)}getRatio(t){let i=1;return t.metaKey||t.ctrlKey?i=.1:t.shiftKey&&(i=10),i}down(t,i){this.isFocused||this.focus(),this.step("down",t,i)}up(t,i){this.isFocused||this.focus(),this.step("up",t,i)}getPrecision(t){let i=t.toString();if(i.indexOf("e-")>=0)return parseInt(i.slice(i.indexOf("e-")+2),10);let r=0;return i.indexOf(".")>=0&&(r=i.length-i.indexOf(".")-1),r}getMaxPrecision(t,i){if(ht(this.nzPrecision))return this.nzPrecision;let r=this.getPrecision(i),s=this.getPrecision(this.nzStep),a=this.getPrecision(t);return t?Math.max(a,r+s):r+s}getPrecisionFactor(t,i){let r=this.getMaxPrecision(t,i);return Math.pow(10,r)}upStep(t,i){let r=this.getPrecisionFactor(t,i),s=Math.abs(this.getMaxPrecision(t,i)),a;return typeof t=="number"?a=((r*t+r*this.nzStep*i)/r).toFixed(s):a=this.nzMin===-1/0?this.nzStep:this.nzMin,this.toNumber(a)}downStep(t,i){let r=this.getPrecisionFactor(t,i),s=Math.abs(this.getMaxPrecision(t,i)),a;return typeof t=="number"?a=((r*t-r*this.nzStep*i)/r).toFixed(s):a=this.nzMin===-1/0?-this.nzStep:this.nzMin,this.toNumber(a)}step(t,i,r=1){if(this.stop(),i.preventDefault(),this.nzDisabled)return;let s=this.getCurrentValidValue(this.parsedValue)||0,a=0;t==="up"?a=this.upStep(s,r):t==="down"&&(a=this.downStep(s,r));let l=a>this.nzMax||athis.nzMax?a=this.nzMax:a{this[t](i,r)},300))}stop(){this.autoStepTimer&&clearTimeout(this.autoStepTimer)}setValue(t){if(`${this.value}`!=`${t}`&&this.onChange(t),this.value=t,this.parsedValue=t,this.disabledUp=this.disabledDown=!1,t||t===0){let i=Number(t);i>=this.nzMax&&(this.disabledUp=!0),i<=this.nzMin&&(this.disabledDown=!0)}}updateDisplayValue(t){let i=ht(this.nzFormatter(t))?this.nzFormatter(t):"";this.displayValue=i,this.inputElement.nativeElement.value=`${i}`}writeValue(t){this.value=t,this.setValue(t),this.updateDisplayValue(t),this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.disabled$.next(this.nzDisabled),this.cdr.markForCheck()}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(t,i,r,s,a,l,c,u,d){this.ngZone=t,this.elementRef=i,this.cdr=r,this.focusMonitor=s,this.renderer=a,this.directionality=l,this.destroy$=c,this.nzFormStatusService=u,this.nzFormNoStatusService=d,this.isNzDisableFirstChange=!0,this.isFocused=!1,this.disabled$=new J,this.disabledUp=!1,this.disabledDown=!1,this.dir="ltr",this.prefixCls="ant-input-number",this.status="",this.statusCls={},this.hasFeedback=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzBlur=new O,this.nzFocus=new O,this.nzSize="default",this.nzMin=-1/0,this.nzMax=1/0,this.nzParser=p=>p.trim().replace(/。/g,".").replace(/[^\w\.-]+/g,""),this.nzPrecisionMode="toFixed",this.nzPlaceHolder="",this.nzStatus="",this.nzStep=1,this.nzInputMode="decimal",this.nzId=null,this.nzDisabled=!1,this.nzReadOnly=!1,this.nzAutoFocus=!1,this.nzBorderless=!1,this.nzFormatter=p=>p}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{t?(this.isFocused=!0,this.nzFocus.emit()):(this.isFocused=!1,this.updateDisplayValue(this.value),this.nzBlur.emit(),Promise.resolve().then(()=>this.onTouched()))}),this.dir=this.directionality.value,this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t}),this.setupHandlersListeners(),this.ngZone.runOutsideAngular(()=>{Ke(this.inputElement.nativeElement,"keyup").pipe(F(this.destroy$)).subscribe(()=>this.stop()),Ke(this.inputElement.nativeElement,"keydown").pipe(F(this.destroy$)).subscribe(t=>{let{keyCode:i}=t;i!==38&&i!==40&&i!==13||this.ngZone.run(()=>{if(i===38){let r=this.getRatio(t);this.up(t,r),this.stop()}else if(i===40){let r=this.getRatio(t);this.down(t,r),this.stop()}else this.updateDisplayValue(this.value);this.cdr.markForCheck()})})})}ngOnChanges(t){let{nzStatus:i,nzDisabled:r}=t;if(t.nzFormatter&&!t.nzFormatter.isFirstChange()){let s=this.getCurrentValidValue(this.parsedValue);this.setValue(s),this.updateDisplayValue(s)}r&&this.disabled$.next(this.nzDisabled),i&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef)}setupHandlersListeners(){this.ngZone.runOutsideAngular(()=>{_t(Ke(this.upHandler.nativeElement,"mouseup"),Ke(this.upHandler.nativeElement,"mouseleave"),Ke(this.downHandler.nativeElement,"mouseup"),Ke(this.downHandler.nativeElement,"mouseleave")).pipe(F(this.destroy$)).subscribe(()=>this.stop())})}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.elementRef.nativeElement,r):this.renderer.removeClass(this.elementRef.nativeElement,r)})}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de),w(fe),w(Oi),w(He),w(Me,8),w(Pt),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-input-number"]],viewQuery:function(i,r){if(i&1&&(xe(UL,7),xe(KL,7),xe(qL,7)),i&2){let s;ce(s=ue())&&(r.upHandler=s.first),ce(s=ue())&&(r.downHandler=s.first),ce(s=ue())&&(r.inputElement=s.first)}},hostAttrs:[1,"ant-input-number"],hostVars:16,hostBindings:function(i,r){i&2&&k("ant-input-number-in-form-item",!!r.nzFormStatusService)("ant-input-number-focused",r.isFocused)("ant-input-number-lg",r.nzSize==="large")("ant-input-number-sm",r.nzSize==="small")("ant-input-number-disabled",r.nzDisabled)("ant-input-number-readonly",r.nzReadOnly)("ant-input-number-rtl",r.dir==="rtl")("ant-input-number-borderless",r.nzBorderless)},inputs:{nzSize:"nzSize",nzMin:"nzMin",nzMax:"nzMax",nzParser:"nzParser",nzPrecision:"nzPrecision",nzPrecisionMode:"nzPrecisionMode",nzPlaceHolder:"nzPlaceHolder",nzStatus:"nzStatus",nzStep:"nzStep",nzInputMode:"nzInputMode",nzId:"nzId",nzDisabled:"nzDisabled",nzReadOnly:"nzReadOnly",nzAutoFocus:"nzAutoFocus",nzBorderless:"nzBorderless",nzFormatter:"nzFormatter"},outputs:{nzBlur:"nzBlur",nzFocus:"nzFocus"},exportAs:["nzInputNumber"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0},Pt]),oe,K],decls:11,vars:15,consts:[[1,"ant-input-number-handler-wrap"],["unselectable","unselectable",1,"ant-input-number-handler","ant-input-number-handler-up",3,"mousedown"],["upHandler",""],["nz-icon","","nzType","up",1,"ant-input-number-handler-up-inner"],["unselectable","unselectable",1,"ant-input-number-handler","ant-input-number-handler-down",3,"mousedown"],["downHandler",""],["nz-icon","","nzType","down",1,"ant-input-number-handler-down-inner"],[1,"ant-input-number-input-wrap"],["autocomplete","off",1,"ant-input-number-input",3,"disabled","placeholder","readOnly","ngModel","ngModelChange"],["inputElement",""],["class","ant-input-number-suffix",3,"status",4,"ngIf"],[1,"ant-input-number-suffix",3,"status"]],template:function(i,r){i&1&&(C(0,"div",0)(1,"span",1,2),A("mousedown",function(a){return r.up(a)}),R(3,"span",3),S(),C(4,"span",4,5),A("mousedown",function(a){return r.down(a)}),R(6,"span",6),S()(),C(7,"div",7)(8,"input",8,9),A("ngModelChange",function(a){return r.onModelChange(a)}),S()(),_(10,YL,1,1,"nz-form-item-feedback-icon",10)),i&2&&(f(),k("ant-input-number-handler-up-disabled",r.disabledUp),f(3),k("ant-input-number-handler-down-disabled",r.disabledDown),f(4),h("disabled",r.nzDisabled)("placeholder",r.nzPlaceHolder)("readOnly",r.nzReadOnly)("ngModel",r.displayValue),ze("id",r.nzId)("autofocus",r.nzAutoFocus?"autofocus":null)("min",r.nzMin)("max",r.nzMax)("step",r.nzStep)("inputmode",r.nzInputMode),f(2),h("ngIf",r.hasFeedback&&!!r.status&&!r.nzFormNoStatusService))},dependencies:[Ge,Fe,nn,Ii,Kt,Rt,ro,mr,we],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzReadOnly",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzBorderless",void 0),o})(),hT=(()=>{let n=class n{constructor(){this.icon=null,this.type=null,this.template=null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["","nz-input-number-group-slot",""]],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-input-number-group-addon",r.type==="addon")("ant-input-number-prefix",r.type==="prefix")("ant-input-number-suffix",r.type==="suffix")},inputs:{icon:"icon",type:"type",template:"template"},standalone:!0,features:[K],attrs:QL,ngContentSelectors:pT,decls:3,vars:2,consts:[["nz-icon","",3,"nzType",4,"ngIf"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType"]],template:function(i,r){i&1&&(Pe(),_(0,XL,1,1,"span",0)(1,ZL,2,1,"ng-container",1),Ie(2)),i&2&&(h("ngIf",r.icon),f(),h("nzStringTemplateOutlet",r.template))},dependencies:[Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})();var gk=(()=>{let n=class n{constructor(t,i,r,s,a,l,c){this.focusMonitor=t,this.elementRef=i,this.renderer=r,this.cdr=s,this.directionality=a,this.nzFormStatusService=l,this.nzFormNoStatusService=c,this.nzAddOnBeforeIcon=null,this.nzAddOnAfterIcon=null,this.nzPrefixIcon=null,this.nzSuffixIcon=null,this.nzStatus="",this.nzSize="default",this.nzCompact=!1,this.isLarge=!1,this.isSmall=!1,this.isAffix=!1,this.isAddOn=!1,this.isFeedback=!1,this.focused=!1,this.disabled=!1,this.dir="ltr",this.prefixCls="ant-input-number",this.affixStatusCls={},this.groupStatusCls={},this.affixInGroupStatusCls={},this.status="",this.hasFeedback=!1,this.destroy$=new J}updateChildrenInputSize(){this.listOfNzInputNumberComponent&&this.listOfNzInputNumberComponent.forEach(t=>t.nzSize=this.nzSize)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.focusMonitor.monitor(this.elementRef,!0).pipe(F(this.destroy$)).subscribe(t=>{this.focused=!!t,this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngAfterContentInit(){this.updateChildrenInputSize();let t=this.listOfNzInputNumberComponent.changes.pipe(Ot(this.listOfNzInputNumberComponent));t.pipe(on(i=>_t(t,...i.map(r=>r.disabled$))),zo(()=>t),We(i=>i.some(r=>r.nzDisabled)),F(this.destroy$)).subscribe(i=>{this.disabled=i,this.cdr.markForCheck()})}ngOnChanges(t){let{nzSize:i,nzSuffix:r,nzPrefix:s,nzPrefixIcon:a,nzSuffixIcon:l,nzAddOnAfter:c,nzAddOnBefore:u,nzAddOnAfterIcon:d,nzAddOnBeforeIcon:p,nzStatus:g}=t;i&&(this.updateChildrenInputSize(),this.isLarge=this.nzSize==="large",this.isSmall=this.nzSize==="small"),(r||s||a||l)&&(this.isAffix=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon)),(c||u||d||p)&&(this.isAddOn=!!(this.nzAddOnAfter||this.nzAddOnBefore||this.nzAddOnAfterIcon||this.nzAddOnBeforeIcon),this.nzFormNoStatusService?.noFormStatus?.next(this.isAddOn)),g&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef),this.destroy$.next(),this.destroy$.complete()}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.isFeedback=!!t&&i;let r=!!(this.nzSuffix||this.nzPrefix||this.nzPrefixIcon||this.nzSuffixIcon);this.isAffix=r||!this.isAddOn&&i,this.affixInGroupStatusCls=this.isAffix||this.isFeedback?this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,t,i):{},this.cdr.markForCheck(),this.affixStatusCls=vi(`${this.prefixCls}-affix-wrapper`,this.isAddOn?"":t,this.isAddOn?!1:i),this.groupStatusCls=vi(`${this.prefixCls}-group-wrapper`,this.isAddOn?t:"",this.isAddOn?i:!1);let s=V(V({},this.affixStatusCls),this.groupStatusCls);Object.keys(s).forEach(a=>{s[a]?this.renderer.addClass(this.elementRef.nativeElement,a):this.renderer.removeClass(this.elementRef.nativeElement,a)})}};n.\u0275fac=function(i){return new(i||n)(w(Oi),w(de),w(He),w(fe),w(Me,8),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-input-number-group"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,ic,5),i&2){let a;ce(a=ue())&&(r.listOfNzInputNumberComponent=a)}},hostVars:24,hostBindings:function(i,r){i&2&&k("ant-input-number-group",r.nzCompact)("ant-input-number-group-compact",r.nzCompact)("ant-input-number-group-wrapper",r.isAddOn)("ant-input-number-group-wrapper-rtl",r.isAddOn&&r.dir==="rtl")("ant-input-number-group-wrapper-lg",r.isAddOn&&r.isLarge)("ant-input-number-group-wrapper-sm",r.isAddOn&&r.isSmall)("ant-input-number-affix-wrapper",!r.isAddOn&&r.isAffix)("ant-input-number-affix-wrapper-rtl",!r.isAddOn&&r.dir==="rtl")("ant-input-number-affix-wrapper-focused",!r.isAddOn&&r.isAffix&&r.focused)("ant-input-number-affix-wrapper-disabled",!r.isAddOn&&r.isAffix&&r.disabled)("ant-input-number-affix-wrapper-lg",!r.isAddOn&&r.isAffix&&r.isLarge)("ant-input-number-affix-wrapper-sm",!r.isAddOn&&r.isAffix&&r.isSmall)},inputs:{nzAddOnBeforeIcon:"nzAddOnBeforeIcon",nzAddOnAfterIcon:"nzAddOnAfterIcon",nzPrefixIcon:"nzPrefixIcon",nzSuffixIcon:"nzSuffixIcon",nzAddOnBefore:"nzAddOnBefore",nzAddOnAfter:"nzAddOnAfter",nzPrefix:"nzPrefix",nzStatus:"nzStatus",nzSuffix:"nzSuffix",nzSize:"nzSize",nzCompact:"nzCompact"},exportAs:["nzInputNumberGroup"],standalone:!0,features:[Ve([_i]),oe,K],ngContentSelectors:pT,decls:7,vars:2,consts:[["class","ant-input-number-wrapper ant-input-number-group",4,"ngIf","ngIfElse"],["noAddOnTemplate",""],["affixTemplate",""],["contentTemplate",""],[1,"ant-input-number-wrapper","ant-input-number-group"],["nz-input-number-group-slot","","type","addon",3,"icon","template",4,"ngIf"],["class","ant-input-number-affix-wrapper",3,"ant-input-number-affix-wrapper-disabled","ant-input-number-affix-wrapper-sm","ant-input-number-affix-wrapper-lg","ant-input-number-affix-wrapper-focused","ngClass",4,"ngIf","ngIfElse"],["nz-input-number-group-slot","","type","addon",3,"icon","template"],[1,"ant-input-number-affix-wrapper",3,"ngClass"],[3,"ngTemplateOutlet"],[3,"ngIf","ngIfElse"],["nz-input-number-group-slot","","type","prefix",3,"icon","template",4,"ngIf"],["nz-input-number-group-slot","","type","suffix",3,"icon","template",4,"ngIf"],["nz-input-number-group-slot","","type","prefix",3,"icon","template"],["nz-input-number-group-slot","","type","suffix",3,"icon","template"],[3,"status",4,"ngIf"],[3,"status"],["nz-input-number-group-slot","","type","suffix",4,"ngIf"],["nz-input-number-group-slot","","type","suffix"]],template:function(i,r){if(i&1&&(Pe(),_(0,ik,4,4,"span",0)(1,sk,1,2,"ng-template",null,1,_e)(3,dk,3,3,"ng-template",null,2,_e)(5,fk,2,1,"ng-template",null,3,_e)),i&2){let s=te(2);h("ngIf",r.isAddOn)("ngIfElse",s)}},dependencies:[we,hT,St,Be,ro,mr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzCompact",void 0),o})(),Gs=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ic,gk,hT]});let o=n;return o})();var mk=["hourListElement"],vk=["minuteListElement"],yk=["secondListElement"],Ck=["use12HoursListElement"];function _k(o,n){if(o&1&&(C(0,"div",4)(1,"div",5),Y(2),S()()),o&2){let e=m();f(2),ye(e.dateHelper.format(e.time==null?null:e.time.value,e.format)||"\xA0")}}function Sk(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){I(e);let i=m().$implicit,r=m(2);return P(r.selectHour(i))}),C(1,"div",11),Y(2),Xn(3,"number"),S()()}if(o&2){let e=m().$implicit,t=m(2);k("ant-picker-time-panel-cell-selected",t.isSelectedHour(e))("ant-picker-time-panel-cell-disabled",e.disabled),f(2),ye(up(3,5,e.index,"2.0-0"))}}function wk(o,n){if(o&1&&(H(0),_(1,Sk,4,8,"li",9),B()),o&2){let e=n.$implicit,t=m(2);f(),h("ngIf",!(t.nzHideDisabledOptions&&e.disabled))}}function bk(o,n){if(o&1&&(C(0,"ul",6,7),_(2,wk,2,1,"ng-container",8),S()),o&2){let e=m();f(2),h("ngForOf",e.hourRange)("ngForTrackBy",e.trackByFn)}}function Tk(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){I(e);let i=m().$implicit,r=m(2);return P(r.selectMinute(i))}),C(1,"div",11),Y(2),Xn(3,"number"),S()()}if(o&2){let e=m().$implicit,t=m(2);k("ant-picker-time-panel-cell-selected",t.isSelectedMinute(e))("ant-picker-time-panel-cell-disabled",e.disabled),f(2),ye(up(3,5,e.index,"2.0-0"))}}function Ek(o,n){if(o&1&&(H(0),_(1,Tk,4,8,"li",9),B()),o&2){let e=n.$implicit,t=m(2);f(),h("ngIf",!(t.nzHideDisabledOptions&&e.disabled))}}function xk(o,n){if(o&1&&(C(0,"ul",6,12),_(2,Ek,2,1,"ng-container",8),S()),o&2){let e=m();f(2),h("ngForOf",e.minuteRange)("ngForTrackBy",e.trackByFn)}}function zk(o,n){if(o&1){let e=Q();C(0,"li",10),A("click",function(){I(e);let i=m().$implicit,r=m(2);return P(r.selectSecond(i))}),C(1,"div",11),Y(2),Xn(3,"number"),S()()}if(o&2){let e=m().$implicit,t=m(2);k("ant-picker-time-panel-cell-selected",t.isSelectedSecond(e))("ant-picker-time-panel-cell-disabled",e.disabled),f(2),ye(up(3,5,e.index,"2.0-0"))}}function Ok(o,n){if(o&1&&(H(0),_(1,zk,4,8,"li",9),B()),o&2){let e=n.$implicit,t=m(2);f(),h("ngIf",!(t.nzHideDisabledOptions&&e.disabled))}}function Dk(o,n){if(o&1&&(C(0,"ul",6,13),_(2,Ok,2,1,"ng-container",8),S()),o&2){let e=m();f(2),h("ngForOf",e.secondRange)("ngForTrackBy",e.trackByFn)}}function Rk(o,n){if(o&1){let e=Q();H(0),C(1,"li",10),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.select12Hours(r))}),C(2,"div",11),Y(3),S()(),B()}if(o&2){let e=n.$implicit,t=m(2);f(),k("ant-picker-time-panel-cell-selected",t.isSelected12Hours(e)),f(2),ye(e.value)}}function Ik(o,n){if(o&1&&(C(0,"ul",6,14),_(2,Rk,4,3,"ng-container",15),S()),o&2){let e=m();f(2),h("ngForOf",e.use12HoursRange)}}function Pk(o,n){}function Mk(o,n){if(o&1&&(C(0,"div",23),_(1,Pk,0,0,"ng-template",24),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.nzAddOn)}}function Fk(o,n){if(o&1){let e=Q();C(0,"div",16),_(1,Mk,2,1,"div",17),C(2,"ul",18)(3,"li",19)(4,"a",20),A("click",function(){I(e);let i=m();return P(i.onClickNow())}),Y(5),Xn(6,"nzI18n"),S()(),C(7,"li",21)(8,"button",22),A("click",function(){I(e);let i=m();return P(i.onClickOk())}),Y(9),Xn(10,"nzI18n"),S()()()()}if(o&2){let e=m();f(),h("ngIf",e.nzAddOn),f(4),Ne(" ",e.nzNowText||Vi(6,3,"Calendar.lang.now")," "),f(4),Ne(" ",e.nzOkText||Vi(10,5,"Calendar.lang.ok")," ")}}var Ak=["inputElement"];function Nk(o,n){if(o&1&&(H(0),R(1,"span",8),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function Lk(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",9),o&2){let e=m();h("status",e.status)}}function kk(o,n){if(o&1){let e=Q();C(0,"span",10),A("click",function(i){I(e);let r=m();return P(r.onClickClearBtn(i))}),R(1,"span",11),S()}if(o&2){let e=m();f(),ze("aria-label",e.nzClearText)("title",e.nzClearText)}}function Vk(o,n){if(o&1){let e=Q();C(0,"div",12)(1,"div",13)(2,"div",14)(3,"nz-time-picker-panel",15),A("ngModelChange",function(i){I(e);let r=m();return P(r.value=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.onPanelValueChange(i))})("closePanel",function(){I(e);let i=m();return P(i.closePanel())}),Xn(4,"async"),S()()()()}if(o&2){let e=m();h("@slideMotion","enter"),f(3),h("ngClass",e.nzPopupClassName)("format",e.nzFormat)("nzHourStep",e.nzHourStep)("nzMinuteStep",e.nzMinuteStep)("nzSecondStep",e.nzSecondStep)("nzDisabledHours",e.nzDisabledHours)("nzDisabledMinutes",e.nzDisabledMinutes)("nzDisabledSeconds",e.nzDisabledSeconds)("nzPlaceHolder",e.nzPlaceHolder||Vi(4,19,e.i18nPlaceHolder$))("nzHideDisabledOptions",e.nzHideDisabledOptions)("nzUse12Hours",e.nzUse12Hours)("nzDefaultOpenValue",e.nzDefaultOpenValue)("nzAddOn",e.nzAddOn)("nzClearText",e.nzClearText)("nzNowText",e.nzNowText)("nzOkText",e.nzOkText)("nzAllowEmpty",e.nzAllowEmpty)("ngModel",e.value)}}var av=class{setMinutes(n,e){return e||(this.initValue(),this.value.setMinutes(n),this.update()),this}setHours(n,e){return e||(this.initValue(),this._use12Hours?this.selected12Hours==="PM"&&n!==12?this.value.setHours(n+12):this.selected12Hours==="AM"&&n===12?this.value.setHours(0):this.value.setHours(n):this.value.setHours(n),this.update()),this}setSeconds(n,e){return e||(this.initValue(),this.value.setSeconds(n),this.update()),this}setUse12Hours(n){return this._use12Hours=n,this}get changes(){return this._changes.asObservable()}setValue(n,e){return ht(e)&&(this._use12Hours=e),n!==this.value&&(this._value=n,ht(this.value)?this._use12Hours&&ht(this.hours)&&(this.selected12Hours=this.hours>=12?"PM":"AM"):this._clear()),this}initValue(){Ml(this.value)&&this.setValue(new Date,this._use12Hours)}clear(){this._clear(),this.update()}get isEmpty(){return!(ht(this.hours)||ht(this.minutes)||ht(this.seconds))}_clear(){this._value=void 0,this.selected12Hours=void 0}update(){this.isEmpty?this._value=void 0:(ht(this.hours)&&this.value.setHours(this.hours),ht(this.minutes)&&this.value.setMinutes(this.minutes),ht(this.seconds)&&this.value.setSeconds(this.seconds),this._use12Hours&&(this.selected12Hours==="PM"&&this.hours<12&&this.value.setHours(this.hours+12),this.selected12Hours==="AM"&&this.hours>=12&&this.value.setHours(this.hours-12))),this.changed()}changed(){this._changes.next(this.value)}get viewHours(){return this._use12Hours&&ht(this.hours)?this.calculateViewHour(this.hours):this.hours}setSelected12Hours(n){n.toUpperCase()!==this.selected12Hours&&(this.selected12Hours=n.toUpperCase(),this.update())}get value(){return this._value||this._defaultOpenValue}get hours(){return this.value?.getHours()}get minutes(){return this.value?.getMinutes()}get seconds(){return this.value?.getSeconds()}setDefaultOpenValue(n){return this._defaultOpenValue=n,this}constructor(){this.selected12Hours=void 0,this._use12Hours=!1,this._changes=new J}calculateViewHour(n){let e=this.selected12Hours;return e==="PM"&&n>12?n-12:e==="AM"&&n===0?12:n}};function sv(o,n=1,e=0){return new Array(Math.ceil(o/n)).fill(0).map((t,i)=>(i+e)*n)}var dh=(()=>{let n=class n{set nzAllowEmpty(t){ht(t)&&(this._allowEmpty=t)}get nzAllowEmpty(){return this._allowEmpty}set nzDisabledHours(t){this._disabledHours=t,this._disabledHours&&this.buildHours()}get nzDisabledHours(){return this._disabledHours}set nzDisabledMinutes(t){ht(t)&&(this._disabledMinutes=t,this.buildMinutes())}get nzDisabledMinutes(){return this._disabledMinutes}set nzDisabledSeconds(t){ht(t)&&(this._disabledSeconds=t,this.buildSeconds())}get nzDisabledSeconds(){return this._disabledSeconds}set format(t){if(ht(t)){this._format=t,this.enabledColumns=0;let i=new Set(t);this.hourEnabled=i.has("H")||i.has("h"),this.minuteEnabled=i.has("m"),this.secondEnabled=i.has("s"),this.hourEnabled&&this.enabledColumns++,this.minuteEnabled&&this.enabledColumns++,this.secondEnabled&&this.enabledColumns++,this.nzUse12Hours&&this.build12Hours()}}get format(){return this._format}set nzHourStep(t){ht(t)&&(this._nzHourStep=t,this.buildHours())}get nzHourStep(){return this._nzHourStep}set nzMinuteStep(t){ht(t)&&(this._nzMinuteStep=t,this.buildMinutes())}get nzMinuteStep(){return this._nzMinuteStep}set nzSecondStep(t){ht(t)&&(this._nzSecondStep=t,this.buildSeconds())}get nzSecondStep(){return this._nzSecondStep}trackByFn(t){return t}buildHours(){let t=24,i=this.nzDisabledHours?.(),r=0;if(this.nzUse12Hours&&(t=12,i&&(this.time.selected12Hours==="PM"?i=i.filter(s=>s>=12).map(s=>s>12?s-12:s):i=i.filter(s=>s<12||s===24).map(s=>s===24||s===0?12:s)),r=1),this.hourRange=sv(t,this.nzHourStep,r).map(s=>({index:s,disabled:!!i&&i.indexOf(s)!==-1})),this.nzUse12Hours&&this.hourRange[this.hourRange.length-1].index===12){let s=[...this.hourRange];s.unshift(s[s.length-1]),s.splice(s.length-1,1),this.hourRange=s}}buildMinutes(){this.minuteRange=sv(60,this.nzMinuteStep).map(t=>({index:t,disabled:!!this.nzDisabledMinutes&&this.nzDisabledMinutes(this.time.hours).indexOf(t)!==-1}))}buildSeconds(){this.secondRange=sv(60,this.nzSecondStep).map(t=>({index:t,disabled:!!this.nzDisabledSeconds&&this.nzDisabledSeconds(this.time.hours,this.time.minutes).indexOf(t)!==-1}))}build12Hours(){let t=this._format.includes("A");this.use12HoursRange=[{index:0,value:t?"AM":"am"},{index:1,value:t?"PM":"pm"}]}buildTimes(){this.buildHours(),this.buildMinutes(),this.buildSeconds(),this.build12Hours()}scrollToTime(t=0){if(this.hourEnabled&&this.hourListElement&&this.scrollToSelected(this.hourListElement.nativeElement,this.time.viewHours,t,"hour"),this.minuteEnabled&&this.minuteListElement&&this.scrollToSelected(this.minuteListElement.nativeElement,this.time.minutes,t,"minute"),this.secondEnabled&&this.secondListElement&&this.scrollToSelected(this.secondListElement.nativeElement,this.time.seconds,t,"second"),this.nzUse12Hours&&this.use12HoursListElement){let r=this.time.selected12Hours==="AM"?0:1;this.scrollToSelected(this.use12HoursListElement.nativeElement,r,t,"12-hour")}}selectHour(t){this.time.setHours(t.index,t.disabled),this._disabledMinutes&&this.buildMinutes(),(this._disabledSeconds||this._disabledMinutes)&&this.buildSeconds()}selectMinute(t){this.time.setMinutes(t.index,t.disabled),this._disabledSeconds&&this.buildSeconds()}selectSecond(t){this.time.setSeconds(t.index,t.disabled)}select12Hours(t){this.time.setSelected12Hours(t.value),this._disabledHours&&this.buildHours(),this._disabledMinutes&&this.buildMinutes(),this._disabledSeconds&&this.buildSeconds()}scrollToSelected(t,i,r=0,s){if(!t)return;let a=this.translateIndex(i,s),l=t.children[a]||t.children[0];this.scrollTo(t,l.offsetTop,r)}translateIndex(t,i){return i==="hour"?this.calcIndex(this.nzDisabledHours?.(),this.hourRange.map(r=>r.index).indexOf(t)):i==="minute"?this.calcIndex(this.nzDisabledMinutes?.(this.time.hours),this.minuteRange.map(r=>r.index).indexOf(t)):i==="second"?this.calcIndex(this.nzDisabledSeconds?.(this.time.hours,this.time.minutes),this.secondRange.map(r=>r.index).indexOf(t)):this.calcIndex([],this.use12HoursRange.map(r=>r.index).indexOf(t))}scrollTo(t,i,r){if(r<=0){t.scrollTop=i;return}let a=(i-t.scrollTop)/r*10;this.ngZone.runOutsideAngular(()=>{to(()=>{t.scrollTop=t.scrollTop+a,t.scrollTop!==i&&this.scrollTo(t,i,r-10)})})}calcIndex(t,i){return t?.length&&this.nzHideDisabledOptions?i-t.reduce((r,s)=>r+(s-1||(this.nzDisabledMinutes?.(i).indexOf(r)??-1)>-1||(this.nzDisabledSeconds?.(i,r).indexOf(s)??-1)>-1}onClickNow(){let t=new Date;this.timeDisabled(t)||(this.time.setValue(t),this.changed(),this.closePanel.emit())}onClickOk(){this.time.setValue(this.time.value,this.nzUse12Hours),this.changed(),this.closePanel.emit()}isSelectedHour(t){return t.index===this.time.viewHours}isSelectedMinute(t){return t.index===this.time.minutes}isSelectedSecond(t){return t.index===this.time.seconds}isSelected12Hours(t){return t.value.toUpperCase()===this.time.selected12Hours}constructor(t,i,r,s){this.ngZone=t,this.cdr=i,this.dateHelper=r,this.elementRef=s,this._nzHourStep=1,this._nzMinuteStep=1,this._nzSecondStep=1,this.unsubscribe$=new J,this._format="HH:mm:ss",this._disabledHours=()=>[],this._disabledMinutes=()=>[],this._disabledSeconds=()=>[],this._allowEmpty=!0,this.time=new av,this.hourEnabled=!0,this.minuteEnabled=!0,this.secondEnabled=!0,this.firstScrolled=!1,this.enabledColumns=3,this.nzInDatePicker=!1,this.nzHideDisabledOptions=!1,this.nzUse12Hours=!1,this.closePanel=new O}ngOnInit(){this.time.changes.pipe(F(this.unsubscribe$)).subscribe(()=>{this.changed(),this.touched(),this.scrollToTime(120)}),this.buildTimes(),this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.scrollToTime(),this.firstScrolled=!0}),Ke(this.elementRef.nativeElement,"mousedown").pipe(F(this.unsubscribe$)).subscribe(t=>{t.preventDefault()})})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnChanges(t){let{nzUse12Hours:i,nzDefaultOpenValue:r}=t;!i?.previousValue&&i?.currentValue&&(this.build12Hours(),this.enabledColumns++),r?.currentValue&&this.time.setDefaultOpenValue(this.nzDefaultOpenValue||new Date)}writeValue(t){this.time.setValue(t,this.nzUse12Hours),this.buildTimes(),t&&this.firstScrolled&&this.scrollToTime(120),this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouch=t}};n.\u0275fac=function(i){return new(i||n)(w($e),w(fe),w(no),w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-time-picker-panel"]],viewQuery:function(i,r){if(i&1&&(xe(mk,5),xe(vk,5),xe(yk,5),xe(Ck,5)),i&2){let s;ce(s=ue())&&(r.hourListElement=s.first),ce(s=ue())&&(r.minuteListElement=s.first),ce(s=ue())&&(r.secondListElement=s.first),ce(s=ue())&&(r.use12HoursListElement=s.first)}},hostAttrs:[1,"ant-picker-time-panel"],hostVars:12,hostBindings:function(i,r){i&2&&k("ant-picker-time-panel-column-0",r.enabledColumns===0&&!r.nzInDatePicker)("ant-picker-time-panel-column-1",r.enabledColumns===1&&!r.nzInDatePicker)("ant-picker-time-panel-column-2",r.enabledColumns===2&&!r.nzInDatePicker)("ant-picker-time-panel-column-3",r.enabledColumns===3&&!r.nzInDatePicker)("ant-picker-time-panel-narrow",r.enabledColumns<3)("ant-picker-time-panel-placement-bottomLeft",!r.nzInDatePicker)},inputs:{nzInDatePicker:"nzInDatePicker",nzAddOn:"nzAddOn",nzHideDisabledOptions:"nzHideDisabledOptions",nzClearText:"nzClearText",nzNowText:"nzNowText",nzOkText:"nzOkText",nzPlaceHolder:"nzPlaceHolder",nzUse12Hours:"nzUse12Hours",nzDefaultOpenValue:"nzDefaultOpenValue",nzAllowEmpty:"nzAllowEmpty",nzDisabledHours:"nzDisabledHours",nzDisabledMinutes:"nzDisabledMinutes",nzDisabledSeconds:"nzDisabledSeconds",format:"format",nzHourStep:"nzHourStep",nzMinuteStep:"nzMinuteStep",nzSecondStep:"nzSecondStep"},outputs:{closePanel:"closePanel"},exportAs:["nzTimePickerPanel"],standalone:!0,features:[Ve([{provide:zn,useExisting:n,multi:!0}]),oe,K],decls:7,vars:6,consts:[["class","ant-picker-header",4,"ngIf"],[1,"ant-picker-content"],["class","ant-picker-time-panel-column","style","position: relative;",4,"ngIf"],["class","ant-picker-footer",4,"ngIf"],[1,"ant-picker-header"],[1,"ant-picker-header-view"],[1,"ant-picker-time-panel-column",2,"position","relative"],["hourListElement",""],[4,"ngFor","ngForOf","ngForTrackBy"],["class","ant-picker-time-panel-cell",3,"ant-picker-time-panel-cell-selected","ant-picker-time-panel-cell-disabled","click",4,"ngIf"],[1,"ant-picker-time-panel-cell",3,"click"],[1,"ant-picker-time-panel-cell-inner"],["minuteListElement",""],["secondListElement",""],["use12HoursListElement",""],[4,"ngFor","ngForOf"],[1,"ant-picker-footer"],["class","ant-picker-footer-extra",4,"ngIf"],[1,"ant-picker-ranges"],[1,"ant-picker-now"],[3,"click"],[1,"ant-picker-ok"],["nz-button","","type","button","nzSize","small","nzType","primary",3,"click"],[1,"ant-picker-footer-extra"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(_(0,_k,3,1,"div",0),C(1,"div",1),_(2,bk,3,2,"ul",2)(3,xk,3,2,"ul",2)(4,Dk,3,2,"ul",2)(5,Ik,3,1,"ul",2),S(),_(6,Fk,11,7,"div",3)),i&2&&(h("ngIf",r.nzInDatePicker),f(2),h("ngIf",r.hourEnabled),f(),h("ngIf",r.minuteEnabled),f(),h("ngIf",r.secondEnabled),f(),h("ngIf",r.nzUse12Hours),f(),h("ngIf",!r.nzInDatePicker))},dependencies:[we,lt,Rl,Be,bp,wp,Hi,eo,yi,hr],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzUse12Hours",void 0),o})(),Gk="timePicker",Hk=(()=>{let n=class n{emitValue(t){this.setValue(t,!0),this._onChange&&this._onChange(this.value),this._onTouched&&this._onTouched()}setValue(t,i=!1){i&&(this.preValue=lu(t)?new Date(t):null),this.value=lu(t)?new Date(t):null,this.inputValue=this.dateHelper.format(t,this.nzFormat),this.cdr.markForCheck()}open(){this.nzDisabled||this.nzOpen||(this.focus(),this.nzOpen=!0,this.nzOpenChange.emit(this.nzOpen))}close(){this.nzOpen=!1,this.cdr.markForCheck(),this.nzOpenChange.emit(this.nzOpen)}updateAutoFocus(){this.isInit&&!this.nzDisabled&&(this.nzAutoFocus?this.renderer.setAttribute(this.inputRef.nativeElement,"autofocus","autofocus"):this.renderer.removeAttribute(this.inputRef.nativeElement,"autofocus"))}onClickClearBtn(t){t.stopPropagation(),this.emitValue(null)}onClickOutside(t){this.element.nativeElement.contains(t.target)||this.setCurrentValueAndClose()}onFocus(t){this.focused=t,t||(this.checkTimeValid(this.value)?this.setCurrentValueAndClose():(this.setValue(this.preValue),this.close()))}focus(){this.inputRef.nativeElement&&this.inputRef.nativeElement.focus()}blur(){this.inputRef.nativeElement&&this.inputRef.nativeElement.blur()}onKeyupEsc(){this.setValue(this.preValue)}onKeyupEnter(){this.nzOpen&&lu(this.value)?this.setCurrentValueAndClose():this.nzOpen||this.open()}onInputChange(t){!this.platform.TRIDENT&&document.activeElement===this.inputRef.nativeElement&&(this.open(),this.parseTimeString(t))}onPanelValueChange(t){this.setValue(t),this.focus()}closePanel(){this.inputRef.nativeElement.blur()}setCurrentValueAndClose(){this.emitValue(this.value),this.close()}constructor(t,i,r,s,a,l,c,u,d,p){this.nzConfigService=t,this.i18n=i,this.element=r,this.renderer=s,this.cdr=a,this.dateHelper=l,this.platform=c,this.directionality=u,this.nzFormStatusService=d,this.nzFormNoStatusService=p,this._nzModuleName=Gk,this.destroy$=new J,this.isNzDisableFirstChange=!0,this.isInit=!1,this.focused=!1,this.inputValue="",this.value=null,this.preValue=null,this.i18nPlaceHolder$=Mn(void 0),this.overlayPositions=[{offsetY:3,originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{offsetY:-3,originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{offsetY:3,originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{offsetY:-3,originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}],this.dir="ltr",this.prefixCls="ant-picker",this.statusCls={},this.status="",this.hasFeedback=!1,this.nzId=null,this.nzSize=null,this.nzStatus="",this.nzHourStep=1,this.nzMinuteStep=1,this.nzSecondStep=1,this.nzClearText="clear",this.nzNowText="",this.nzOkText="",this.nzPopupClassName="",this.nzPlaceHolder="",this.nzFormat="HH:mm:ss",this.nzOpen=!1,this.nzUse12Hours=!1,this.nzSuffixIcon="clock-circle",this.nzOpenChange=new O,this.nzHideDisabledOptions=!1,this.nzAllowEmpty=!0,this.nzDisabled=!1,this.nzAutoFocus=!1,this.nzBackdrop=!1,this.nzBorderless=!1,this.nzInputReadOnly=!1}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),zl(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:Mn(!1)),We(([{status:t,hasFeedback:i},r])=>({status:r?"":t,hasFeedback:i})),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.inputSize=Math.max(8,this.nzFormat.length)+2,this.origin=new dr(this.element),this.i18nPlaceHolder$=this.i18n.localeChange.pipe(We(t=>t.TimePicker.placeholder)),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngOnChanges(t){let{nzUse12Hours:i,nzFormat:r,nzDisabled:s,nzAutoFocus:a,nzStatus:l}=t;if(i&&!i.previousValue&&i.currentValue&&!r&&(this.nzFormat="h:mm:ss a"),s){let c=s.currentValue,u=this.inputRef.nativeElement;c?this.renderer.setAttribute(u,"disabled",""):this.renderer.removeAttribute(u,"disabled")}a&&this.updateAutoFocus(),l&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}parseTimeString(t){let i=this.dateHelper.parseTime(t,this.nzFormat)||null;lu(i)&&(this.value=i,this.cdr.markForCheck())}ngAfterViewInit(){this.isInit=!0,this.updateAutoFocus()}writeValue(t){let i;t instanceof Date?i=t:Ml(t)?i=null:(qS('Non-Date type is not recommended for time-picker, use "Date" type.'),i=new Date(t)),this.setValue(i,!0)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}checkTimeValid(t){if(!t)return!0;let i=this.nzDisabledHours?.(),r=this.nzDisabledMinutes?.(t.getHours()),s=this.nzDisabledSeconds?.(t.getHours(),t.getMinutes());return!(i?.includes(t.getHours())||r?.includes(t.getMinutes())||s?.includes(t.getSeconds()))}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)})}};n.\u0275fac=function(i){return new(i||n)(w(st),w(Di),w(de),w(He),w(fe),w(no),w(gn),w(Me,8),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-time-picker"]],viewQuery:function(i,r){if(i&1&&xe(Ak,7),i&2){let s;ce(s=ue())&&(r.inputRef=s.first)}},hostAttrs:[1,"ant-picker"],hostVars:12,hostBindings:function(i,r){i&1&&A("click",function(){return r.open()}),i&2&&k("ant-picker-large",r.nzSize==="large")("ant-picker-small",r.nzSize==="small")("ant-picker-disabled",r.nzDisabled)("ant-picker-focused",r.focused)("ant-picker-rtl",r.dir==="rtl")("ant-picker-borderless",r.nzBorderless)},inputs:{nzId:"nzId",nzSize:"nzSize",nzStatus:"nzStatus",nzHourStep:"nzHourStep",nzMinuteStep:"nzMinuteStep",nzSecondStep:"nzSecondStep",nzClearText:"nzClearText",nzNowText:"nzNowText",nzOkText:"nzOkText",nzPopupClassName:"nzPopupClassName",nzPlaceHolder:"nzPlaceHolder",nzAddOn:"nzAddOn",nzDefaultOpenValue:"nzDefaultOpenValue",nzDisabledHours:"nzDisabledHours",nzDisabledMinutes:"nzDisabledMinutes",nzDisabledSeconds:"nzDisabledSeconds",nzFormat:"nzFormat",nzOpen:"nzOpen",nzUse12Hours:"nzUse12Hours",nzSuffixIcon:"nzSuffixIcon",nzHideDisabledOptions:"nzHideDisabledOptions",nzAllowEmpty:"nzAllowEmpty",nzDisabled:"nzDisabled",nzAutoFocus:"nzAutoFocus",nzBackdrop:"nzBackdrop",nzBorderless:"nzBorderless",nzInputReadOnly:"nzInputReadOnly"},outputs:{nzOpenChange:"nzOpenChange"},exportAs:["nzTimePicker"],standalone:!0,features:[Ve([{provide:zn,useExisting:n,multi:!0}]),oe,K],decls:9,vars:16,consts:[[1,"ant-picker-input"],["type","text","autocomplete","off",3,"size","placeholder","ngModel","disabled","readOnly","ngModelChange","focus","blur","keyup.enter","keyup.escape"],["inputElement",""],[1,"ant-picker-suffix"],[4,"nzStringTemplateOutlet"],[3,"status",4,"ngIf"],["class","ant-picker-clear",3,"click",4,"ngIf"],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayPositions","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayTransformOriginOn","detach","overlayOutsideClick"],["nz-icon","",3,"nzType"],[3,"status"],[1,"ant-picker-clear",3,"click"],["nz-icon","","nzType","close-circle","nzTheme","fill"],[1,"ant-picker-dropdown",2,"position","relative"],[1,"ant-picker-panel-container"],["tabindex","-1",1,"ant-picker-panel"],[3,"ngClass","format","nzHourStep","nzMinuteStep","nzSecondStep","nzDisabledHours","nzDisabledMinutes","nzDisabledSeconds","nzPlaceHolder","nzHideDisabledOptions","nzUse12Hours","nzDefaultOpenValue","nzAddOn","nzClearText","nzNowText","nzOkText","nzAllowEmpty","ngModel","ngModelChange","closePanel"]],template:function(i,r){i&1&&(C(0,"div",0)(1,"input",1,2),A("ngModelChange",function(a){return r.inputValue=a})("focus",function(){return r.onFocus(!0)})("blur",function(){return r.onFocus(!1)})("keyup.enter",function(){return r.onKeyupEnter()})("keyup.escape",function(){return r.onKeyupEsc()})("ngModelChange",function(a){return r.onInputChange(a)}),Xn(3,"async"),S(),C(4,"span",3),_(5,Nk,2,1,"ng-container",4)(6,Lk,1,1,"nz-form-item-feedback-icon",5),S(),_(7,kk,2,2,"span",6),S(),_(8,Vk,5,21,"ng-template",7),A("detach",function(){return r.close()})("overlayOutsideClick",function(a){return r.onClickOutside(a)})),i&2&&(f(),h("size",r.inputSize)("placeholder",r.nzPlaceHolder||Vi(3,14,r.i18nPlaceHolder$))("ngModel",r.inputValue)("disabled",r.nzDisabled)("readOnly",r.nzInputReadOnly),ze("id",r.nzId),f(4),h("nzStringTemplateOutlet",r.nzSuffixIcon),f(),h("ngIf",r.hasFeedback&&!!r.status),f(),h("ngIf",r.nzAllowEmpty&&!r.nzDisabled&&r.value),f(),h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayPositions",r.overlayPositions)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayOpen",r.nzOpen)("cdkConnectedOverlayTransformOriginOn",".ant-picker-dropdown"))},dependencies:[ru,nn,Ii,Kt,Rt,Ye,Ue,Ge,Fe,ro,mr,we,dh,St,vr,Nr,Fr,oi],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return N([De()],o.prototype,"nzHourStep",void 0),N([De()],o.prototype,"nzMinuteStep",void 0),N([De()],o.prototype,"nzSecondStep",void 0),N([De()],o.prototype,"nzClearText",void 0),N([De()],o.prototype,"nzNowText",void 0),N([De()],o.prototype,"nzOkText",void 0),N([De()],o.prototype,"nzPopupClassName",void 0),N([De()],o.prototype,"nzFormat",void 0),N([De(),W()],o.prototype,"nzUse12Hours",void 0),N([De()],o.prototype,"nzSuffixIcon",void 0),N([W()],o.prototype,"nzHideDisabledOptions",void 0),N([De(),W()],o.prototype,"nzAllowEmpty",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([De()],o.prototype,"nzBackdrop",void 0),N([W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzInputReadOnly",void 0),o})(),fT=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Hk,dh]});let o=n;return o})();function $k(o,n){o&1&&Xt(0)}function jk(o,n){if(o&1&&(H(0),_(1,$k,1,0,"ng-container",4),B()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.extraFooter)}}function Wk(o,n){if(o&1&&(H(0),R(1,"span",5),B()),o&2){let e=m(2);f(),h("innerHTML",e.extraFooter,Dt)}}function Uk(o,n){if(o&1&&(C(0,"div"),H(1,2),_(2,jk,2,1,"ng-container",3)(3,Wk,2,1,"ng-container",3),B(),S()),o&2){let e=m();Ae("",e.prefixCls,"-footer-extra"),f(),h("ngSwitch",!0),f(),h("ngSwitchCase",e.isTemplateRef(e.extraFooter)),f(),h("ngSwitchCase",e.isNonEmptyString(e.extraFooter))}}function Kk(o,n){if(o&1){let e=Q();C(0,"a",6),A("click",function(){I(e);let i=m();return P(i.isTodayDisabled?null:i.onClickToday())}),Y(1),S()}if(o&2){let e=m();Dl("",e.prefixCls,"-today-btn ",e.isTodayDisabled?e.prefixCls+"-today-btn-disabled":"",""),Vt("title",e.todayTitle),f(),Ne(" ",e.locale.today," ")}}function qk(o,n){o&1&&Xt(0)}function Yk(o,n){if(o&1){let e=Q();C(0,"li")(1,"a",7),A("click",function(){I(e);let i=m(2);return P(i.isTodayDisabled?null:i.onClickToday())}),Y(2),S()()}if(o&2){let e=m(2);Ae("",e.prefixCls,"-now"),f(),Ae("",e.prefixCls,"-now-btn"),f(),Ne(" ",e.locale.now," ")}}function Qk(o,n){if(o&1){let e=Q();C(0,"li")(1,"button",8),A("click",function(){I(e);let i=m(2);return P(i.okDisabled?null:i.clickOk.emit())}),Y(2),S()()}if(o&2){let e=m(2);Ae("",e.prefixCls,"-ok"),f(),h("disabled",e.okDisabled),f(),Ne(" ",e.locale.ok," ")}}function Xk(o,n){if(o&1&&(C(0,"ul"),_(1,qk,1,0,"ng-container",4)(2,Yk,3,7,"li",0)(3,Qk,3,5,"li",0),S()),o&2){let e=m();Ae("",e.prefixCls,"-ranges"),f(),h("ngTemplateOutlet",e.rangeQuickSelector),f(),h("ngIf",e.showNow),f(),h("ngIf",e.hasTimePicker)}}function Zk(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function Jk(o,n){o&1&&R(0,"th",6)}function eV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function tV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,Jk,1,0,"th",4)(3,eV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function nV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function iV(o,n){o&1&&Xt(0)}var kr=o=>({$implicit:o});function rV(o,n){if(o&1&&(H(0),_(1,iV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function oV(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function sV(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function aV(o,n){if(o&1&&(H(0)(1,13),_(2,rV,2,4,"ng-container",14)(3,oV,2,1,"ng-container",14)(4,sV,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function lV(o,n){o&1&&Xt(0)}function cV(o,n){if(o&1&&(H(0),_(1,lV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function uV(o,n){o&1&&Xt(0)}function dV(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,uV,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function pV(o,n){if(o&1&&(H(0),C(1,"div"),_(2,cV,2,4,"ng-container",18)(3,dV,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function hV(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,aV,5,3,"ng-container",14)(3,pV,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function fV(o,n){if(o&1&&(C(0,"tr",8),_(1,nV,2,4,"td",9)(2,hV,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function gV(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function mV(o,n){o&1&&R(0,"th",6)}function vV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function yV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,mV,1,0,"th",4)(3,vV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function CV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function _V(o,n){o&1&&Xt(0)}function SV(o,n){if(o&1&&(H(0),_(1,_V,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function wV(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function bV(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function TV(o,n){if(o&1&&(H(0)(1,13),_(2,SV,2,4,"ng-container",14)(3,wV,2,1,"ng-container",14)(4,bV,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function EV(o,n){o&1&&Xt(0)}function xV(o,n){if(o&1&&(H(0),_(1,EV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function zV(o,n){o&1&&Xt(0)}function OV(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,zV,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function DV(o,n){if(o&1&&(H(0),C(1,"div"),_(2,xV,2,4,"ng-container",18)(3,OV,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function RV(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,TV,5,3,"ng-container",14)(3,DV,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function IV(o,n){if(o&1&&(C(0,"tr",8),_(1,CV,2,4,"td",9)(2,RV,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function PV(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function MV(o,n){o&1&&R(0,"th",6)}function FV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function AV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,MV,1,0,"th",4)(3,FV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function NV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function LV(o,n){o&1&&Xt(0)}function kV(o,n){if(o&1&&(H(0),_(1,LV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function VV(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function GV(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function HV(o,n){if(o&1&&(H(0)(1,13),_(2,kV,2,4,"ng-container",14)(3,VV,2,1,"ng-container",14)(4,GV,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function BV(o,n){o&1&&Xt(0)}function $V(o,n){if(o&1&&(H(0),_(1,BV,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function jV(o,n){o&1&&Xt(0)}function WV(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,jV,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function UV(o,n){if(o&1&&(H(0),C(1,"div"),_(2,$V,2,4,"ng-container",18)(3,WV,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function KV(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,HV,5,3,"ng-container",14)(3,UV,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function qV(o,n){if(o&1&&(C(0,"tr",8),_(1,NV,2,4,"td",9)(2,KV,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function YV(o,n){if(o&1){let e=Q();H(0),C(1,"button",6),A("click",function(){let r=I(e).$implicit;return P(r.onClick())}),Y(2),S(),B()}if(o&2){let e=n.$implicit;f(),cr(e.className),Vt("title",e.title||null),f(),Ne(" ",e.label," ")}}function QV(o,n){o&1&&R(0,"th",6)}function XV(o,n){if(o&1&&(C(0,"th",7),Y(1),S()),o&2){let e=n.$implicit;Vt("title",e.title),f(),Ne(" ",e.content," ")}}function ZV(o,n){if(o&1&&(C(0,"thead")(1,"tr",3),_(2,QV,1,0,"th",4)(3,XV,2,2,"th",5),S()()),o&2){let e=m();f(2),h("ngIf",e.showWeek),f(),h("ngForOf",e.headRow)}}function JV(o,n){if(o&1&&(C(0,"td",11),Y(1),S()),o&2){let e=m().$implicit,t=m();Ae("",t.prefixCls,"-cell-week"),f(),Ne(" ",e.weekNum," ")}}function e2(o,n){o&1&&Xt(0)}function t2(o,n){if(o&1&&(H(0),_(1,e2,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function n2(o,n){if(o&1&&(H(0),R(1,"span",17),B()),o&2){let e=m(2).$implicit;f(),h("innerHTML",e.cellRender,Dt)}}function i2(o,n){if(o&1&&(H(0),C(1,"div"),Y(2),S(),B()),o&2){let e=m(2).$implicit,t=m(2);f(),Ae("",t.prefixCls,"-cell-inner"),ze("aria-selected",e.isSelected)("aria-disabled",e.isDisabled),f(),Ne(" ",e.content," ")}}function r2(o,n){if(o&1&&(H(0)(1,13),_(2,t2,2,4,"ng-container",14)(3,n2,2,1,"ng-container",14)(4,i2,3,6,"ng-container",15),B()()),o&2){let e=m().$implicit,t=m(2);f(),h("ngSwitch",!0),f(),h("ngSwitchCase",t.isTemplateRef(e.cellRender)),f(),h("ngSwitchCase",t.isNonEmptyString(e.cellRender))}}function o2(o,n){o&1&&Xt(0)}function s2(o,n){if(o&1&&(H(0),_(1,o2,1,0,"ng-container",16),B()),o&2){let e=m(2).$implicit;f(),h("ngTemplateOutlet",e.fullCellRender)("ngTemplateOutletContext",yt(2,kr,e.value))}}function a2(o,n){o&1&&Xt(0)}function l2(o,n){if(o&1&&(C(0,"div"),Y(1),S(),C(2,"div"),_(3,a2,1,0,"ng-container",16),S()),o&2){let e=m(2).$implicit,t=m(2);Ae("",t.prefixCls,"-date-value"),f(),ye(e.content),f(),Ae("",t.prefixCls,"-date-content"),f(),h("ngTemplateOutlet",e.cellRender)("ngTemplateOutletContext",yt(9,kr,e.value))}}function c2(o,n){if(o&1&&(H(0),C(1,"div"),_(2,s2,2,4,"ng-container",18)(3,l2,4,11,"ng-template",null,19,_e),S(),B()),o&2){let e=te(4),t=m().$implicit,i=m(2);f(),Ae("",i.prefixCls,"-date ant-picker-cell-inner"),k("ant-picker-calendar-date-today",t.isToday),f(),h("ngIf",t.fullCellRender)("ngIfElse",e)}}function u2(o,n){if(o&1){let e=Q();C(0,"td",12),A("click",function(){let r=I(e).$implicit;return P(r.isDisabled?null:r.onClick())})("mouseenter",function(){let r=I(e).$implicit;return P(r.onMouseEnter())}),H(1,13),_(2,r2,5,3,"ng-container",14)(3,c2,5,7,"ng-container",14),B(),S()}if(o&2){let e=n.$implicit,t=m(2);Vt("title",e.title),h("ngClass",e.classMap),f(),h("ngSwitch",t.prefixCls),f(),h("ngSwitchCase","ant-picker"),f(),h("ngSwitchCase","ant-picker-calendar")}}function d2(o,n){if(o&1&&(C(0,"tr",8),_(1,JV,2,4,"td",9)(2,u2,4,5,"td",10),S()),o&2){let e=n.$implicit,t=m();h("ngClass",e.classMap),f(),h("ngIf",e.weekNum),f(),h("ngForOf",e.dateCells)("ngForTrackBy",t.trackByBodyColumn)}}function p2(o,n){if(o&1){let e=Q();H(0),C(1,"decade-header",4),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"decade-table",5),A("valueChange",function(i){I(e);let r=m();return P(r.onChooseDecade(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.enablePrevNext("prev","decade"))("showSuperNextBtn",e.enablePrevNext("next","decade"))("showNextBtn",!1)("showPreBtn",!1),f(),Ae("",e.prefixCls,"-body"),f(),h("activeDate",e.activeDate)("value",e.value)("locale",e.locale)("disabledDate",e.disabledDate)}}function h2(o,n){if(o&1){let e=Q();H(0),C(1,"year-header",4),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"year-table",6),A("valueChange",function(i){I(e);let r=m();return P(r.onChooseYear(i))})("cellHover",function(i){I(e);let r=m();return P(r.cellHover.emit(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.enablePrevNext("prev","year"))("showSuperNextBtn",e.enablePrevNext("next","year"))("showNextBtn",!1)("showPreBtn",!1),f(),Ae("",e.prefixCls,"-body"),f(),h("activeDate",e.activeDate)("value",e.value)("locale",e.locale)("disabledDate",e.disabledDate)("selectedValue",e.selectedValue)("hoverValue",e.hoverValue)}}function f2(o,n){if(o&1){let e=Q();H(0),C(1,"month-header",4),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"month-table",7),A("valueChange",function(i){I(e);let r=m();return P(r.onChooseMonth(i))})("cellHover",function(i){I(e);let r=m();return P(r.cellHover.emit(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.enablePrevNext("prev","month"))("showSuperNextBtn",e.enablePrevNext("next","month"))("showNextBtn",!1)("showPreBtn",!1),f(),Ae("",e.prefixCls,"-body"),f(),h("value",e.value)("activeDate",e.activeDate)("locale",e.locale)("disabledDate",e.disabledDate)("selectedValue",e.selectedValue)("hoverValue",e.hoverValue)}}function g2(o,n){if(o&1){let e=Q();H(0),C(1,"date-header",8),A("valueChange",function(i){I(e);let r=m();return P(r.activeDate=i)})("panelModeChange",function(i){I(e);let r=m();return P(r.panelModeChange.emit(i))})("valueChange",function(i){I(e);let r=m();return P(r.headerChange.emit(i))}),S(),C(2,"div")(3,"date-table",9),A("valueChange",function(i){I(e);let r=m();return P(r.onSelectDate(i))})("cellHover",function(i){I(e);let r=m();return P(r.cellHover.emit(i))}),S()(),B()}if(o&2){let e=m();f(),h("value",e.activeDate)("locale",e.locale)("showSuperPreBtn",e.panelMode==="week"?e.enablePrevNext("prev","week"):e.enablePrevNext("prev","date"))("showSuperNextBtn",e.panelMode==="week"?e.enablePrevNext("next","week"):e.enablePrevNext("next","date"))("showPreBtn",e.panelMode==="week"?e.enablePrevNext("prev","week"):e.enablePrevNext("prev","date"))("showNextBtn",e.panelMode==="week"?e.enablePrevNext("next","week"):e.enablePrevNext("next","date")),f(),Ae("",e.prefixCls,"-body"),f(),h("locale",e.locale)("showWeek",e.showWeek)("value",e.value)("activeDate",e.activeDate)("disabledDate",e.disabledDate)("cellRender",e.dateRender)("selectedValue",e.selectedValue)("hoverValue",e.hoverValue)("canSelectWeek",e.panelMode==="week")}}function m2(o,n){if(o&1){let e=Q();H(0),C(1,"nz-time-picker-panel",10),A("ngModelChange",function(i){I(e);let r=m();return P(r.onSelectTime(i))}),S(),B()}if(o&2){let e=m();f(),h("nzInDatePicker",!0)("ngModel",e.value==null?null:e.value.nativeDate)("format",e.timeOptions.nzFormat)("nzHourStep",e.timeOptions.nzHourStep)("nzMinuteStep",e.timeOptions.nzMinuteStep)("nzSecondStep",e.timeOptions.nzSecondStep)("nzDisabledHours",e.timeOptions.nzDisabledHours)("nzDisabledMinutes",e.timeOptions.nzDisabledMinutes)("nzDisabledSeconds",e.timeOptions.nzDisabledSeconds)("nzHideDisabledOptions",!!e.timeOptions.nzHideDisabledOptions)("nzDefaultOpenValue",e.timeOptions.nzDefaultOpenValue)("nzUse12Hours",!!e.timeOptions.nzUse12Hours)("nzAddOn",e.timeOptions.nzAddOn)}}function v2(o,n){o&1&&Xt(0)}var y2=o=>({partType:o});function C2(o,n){if(o&1&&(H(0),_(1,v2,1,0,"ng-container",7),B()),o&2){let e=m(2),t=te(4);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,y2,e.datePickerService.activeInput))}}function _2(o,n){o&1&&Xt(0)}function S2(o,n){o&1&&Xt(0)}var gT=()=>({partType:"left"}),mT=()=>({partType:"right"});function w2(o,n){if(o&1&&_(0,_2,1,0,"ng-container",7)(1,S2,1,0,"ng-container",7),o&2){m(2);let e=te(4);h("ngTemplateOutlet",e)("ngTemplateOutletContext",ii(4,gT)),f(),h("ngTemplateOutlet",e)("ngTemplateOutletContext",ii(5,mT))}}function b2(o,n){o&1&&Xt(0)}function T2(o,n){if(o&1&&(H(0),C(1,"div"),R(2,"div"),C(3,"div")(4,"div"),_(5,C2,2,4,"ng-container",0)(6,w2,2,6,"ng-template",null,5,_e),S(),_(8,b2,1,0,"ng-container",6),S()(),B()),o&2){let e=te(7),t=m(),i=te(6);f(),Dl("",t.prefixCls,"-range-wrapper ",t.prefixCls,"-date-range-wrapper"),f(),Ol(t.arrowPosition),Ae("",t.prefixCls,"-range-arrow"),f(),Dl("",t.prefixCls,"-panel-container ",t.showWeek?t.prefixCls+"-week-number":"",""),f(),Ae("",t.prefixCls,"-panels"),f(),h("ngIf",t.hasTimePicker)("ngIfElse",e),f(3),h("ngTemplateOutlet",i)}}function E2(o,n){o&1&&Xt(0)}function x2(o,n){o&1&&Xt(0)}function z2(o,n){if(o&1&&(C(0,"div")(1,"div",8),_(2,E2,1,0,"ng-container",6)(3,x2,1,0,"ng-container",6),S()()),o&2){let e=m(),t=te(4),i=te(6);xS("",e.prefixCls,"-panel-container ",e.showWeek?e.prefixCls+"-week-number":""," ",e.hasTimePicker?e.prefixCls+"-time":""," ",e.isRange?e.prefixCls+"-range":"",""),f(),Ae("",e.prefixCls,"-panel"),k("ant-picker-panel-rtl",e.dir==="rtl"),f(),h("ngTemplateOutlet",t),f(),h("ngTemplateOutlet",i)}}function O2(o,n){if(o&1){let e=Q();C(0,"div")(1,"inner-popup",9),A("panelModeChange",function(i){let s=I(e).partType,a=m();return P(a.onPanelModeChange(i,s))})("cellHover",function(i){I(e);let r=m();return P(r.onCellHover(i))})("selectDate",function(i){I(e);let r=m();return P(r.changeValueFromSelect(i,!r.showTime))})("selectTime",function(i){let s=I(e).partType,a=m();return P(a.onSelectTime(i,s))})("headerChange",function(i){let s=I(e).partType,a=m();return P(a.onActiveDateChange(i,s))}),S()()}if(o&2){let e=n.partType,t=m();Ae("",t.prefixCls,"-panel"),k("ant-picker-panel-rtl",t.dir==="rtl"),f(),h("showWeek",t.showWeek)("endPanelMode",t.getPanelMode(t.endPanelMode,e))("partType",e)("locale",t.locale)("showTimePicker",t.hasTimePicker)("timeOptions",t.getTimeOptions(e))("panelMode",t.getPanelMode(t.panelMode,e))("activeDate",t.getActiveDate(e))("value",t.getValue(e))("disabledDate",t.disabledDate)("dateRender",t.dateRender)("selectedValue",t.datePickerService==null?null:t.datePickerService.value)("hoverValue",t.hoverValue)}}function D2(o,n){if(o&1){let e=Q();C(0,"calendar-footer",11),A("clickOk",function(){I(e);let i=m(2);return P(i.onClickOk())})("clickToday",function(i){I(e);let r=m(2);return P(r.onClickToday(i))}),S()}if(o&2){let e=m(2),t=te(8);h("locale",e.locale)("isRange",e.isRange)("showToday",e.showToday)("showNow",e.showNow)("hasTimePicker",e.hasTimePicker)("okDisabled",!e.isAllowed(e.datePickerService==null?null:e.datePickerService.value))("extraFooter",e.extraFooter)("rangeQuickSelector",e.ranges?t:null)}}function R2(o,n){if(o&1&&_(0,D2,1,8,"calendar-footer",10),o&2){let e=m();h("ngIf",e.hasFooter)}}function I2(o,n){if(o&1){let e=Q();C(0,"li",13),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.onClickPresetRange(s.ranges[r]))})("mouseenter",function(){let r=I(e).$implicit,s=m(2);return P(s.onHoverPresetRange(s.ranges[r]))})("mouseleave",function(){I(e);let i=m(2);return P(i.onPresetRangeMouseLeave())}),C(1,"span",14),Y(2),S()()}if(o&2){let e=n.$implicit,t=m(2);Ae("",t.prefixCls,"-preset"),f(2),ye(e)}}function P2(o,n){if(o&1&&_(0,I2,3,4,"li",12),o&2){let e=m();h("ngForOf",e.getObjectKeys(e.ranges))}}var M2=["separatorElement"],F2=["pickerInput"],A2=["rangePickerInput"];function N2(o,n){o&1&&Xt(0)}function L2(o,n){if(o&1){let e=Q();C(0,"div")(1,"input",7,8),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.inputValue=i)})("focus",function(i){I(e);let r=m(2);return P(r.onFocus(i))})("focusout",function(i){I(e);let r=m(2);return P(r.onFocusout(i))})("ngModelChange",function(i){I(e);let r=m(2);return P(r.onInputChange(i))})("keyup.enter",function(i){I(e);let r=m(2);return P(r.onKeyupEnter(i))}),S(),_(3,N2,1,0,"ng-container",9),S()}if(o&2){let e=m(2),t=te(4);Ae("",e.prefixCls,"-input"),f(),k("ant-input-disabled",e.nzDisabled),Vt("placeholder",e.getPlaceholder()),h("disabled",e.nzDisabled)("readOnly",e.nzInputReadOnly)("ngModel",e.inputValue)("size",e.inputSize),ze("id",e.nzId),f(2),h("ngTemplateOutlet",t)}}function k2(o,n){o&1&&Xt(0)}function V2(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(4);f(),ye(e.nzSeparator)}}function G2(o,n){o&1&&R(0,"span",14)}function H2(o,n){if(o&1&&(H(0),_(1,V2,2,1,"ng-container",0)(2,G2,1,0,"ng-template",null,13,_e),B()),o&2){let e=te(3),t=m(3);f(),h("ngIf",t.nzSeparator)("ngIfElse",e)}}function B2(o,n){o&1&&Xt(0)}function $2(o,n){o&1&&Xt(0)}function j2(o,n){if(o&1&&(H(0),C(1,"div"),_(2,k2,1,0,"ng-container",10),S(),C(3,"div",null,11)(5,"span"),_(6,H2,4,2,"ng-container",12),S()(),C(7,"div"),_(8,B2,1,0,"ng-container",10),S(),_(9,$2,1,0,"ng-container",9),B()),o&2){let e=m(2),t=te(2),i=te(4);f(),Ae("",e.prefixCls,"-input"),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",ii(18,gT)),f(),Ae("",e.prefixCls,"-range-separator"),f(2),Ae("",e.prefixCls,"-separator"),f(),h("nzStringTemplateOutlet",e.nzSeparator),f(),Ae("",e.prefixCls,"-input"),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",ii(19,mT)),f(),h("ngTemplateOutlet",i)}}function W2(o,n){if(o&1&&(H(0),_(1,L2,4,12,"div",5)(2,j2,10,20,"ng-container",6),B()),o&2){let e=m();f(),h("ngIf",!e.isRange),f(),h("ngIf",e.isRange)}}function U2(o,n){if(o&1){let e=Q();C(0,"input",15,16),A("click",function(i){I(e);let r=m();return P(r.onClickInputBox(i))})("focusout",function(i){I(e);let r=m();return P(r.onFocusout(i))})("focus",function(i){let s=I(e).partType,a=m();return P(a.onFocus(i,s))})("keyup.enter",function(i){I(e);let r=m();return P(r.onKeyupEnter(i))})("ngModelChange",function(i){let s=I(e).partType,a=m();return P(a.inputValue[a.datePickerService.getActiveIndex(s)]=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.onInputChange(i))}),S()}if(o&2){let e=n.partType,t=m();Vt("placeholder",t.getPlaceholder(e)),h("disabled",t.nzDisabled)("readOnly",t.nzInputReadOnly)("size",t.inputSize)("ngModel",t.inputValue[t.datePickerService.getActiveIndex(e)]),ze("id",t.nzId)}}function K2(o,n){if(o&1){let e=Q();C(0,"span",20),A("click",function(i){I(e);let r=m(2);return P(r.onClickClear(i))}),R(1,"span",21),S()}if(o&2){let e=m(2);Ae("",e.prefixCls,"-clear")}}function q2(o,n){if(o&1&&(H(0),R(1,"span",22),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function Y2(o,n){if(o&1&&R(0,"nz-form-item-feedback-icon",23),o&2){let e=m(2);h("status",e.status)}}function Q2(o,n){if(o&1&&(R(0,"div",17),_(1,K2,2,3,"span",18),C(2,"span"),_(3,q2,2,1,"ng-container",12)(4,Y2,1,1,"nz-form-item-feedback-icon",19),S()),o&2){let e=m();Ae("",e.prefixCls,"-active-bar"),h("ngStyle",e.activeBarStyle),f(),h("ngIf",e.showClear()),f(),Ae("",e.prefixCls,"-suffix"),f(),h("nzStringTemplateOutlet",e.nzSuffixIcon),f(),h("ngIf",e.hasFeedback&&!!e.status)}}function X2(o,n){if(o&1){let e=Q();C(0,"div",17)(1,"date-range-popup",24),A("panelModeChange",function(i){I(e);let r=m();return P(r.onPanelModeChange(i))})("calendarChange",function(i){I(e);let r=m();return P(r.onCalendarChange(i))})("resultOk",function(){I(e);let i=m();return P(i.onResultOk())}),S()()}if(o&2){let e=m();Dl("",e.prefixCls,"-dropdown ",e.nzDropdownClassName,""),k("ant-picker-dropdown-rtl",e.dir==="rtl")("ant-picker-dropdown-placement-bottomLeft",e.currentPositionY==="bottom"&&e.currentPositionX==="start")("ant-picker-dropdown-placement-topLeft",e.currentPositionY==="top"&&e.currentPositionX==="start")("ant-picker-dropdown-placement-bottomRight",e.currentPositionY==="bottom"&&e.currentPositionX==="end")("ant-picker-dropdown-placement-topRight",e.currentPositionY==="top"&&e.currentPositionX==="end")("ant-picker-dropdown-range",e.isRange)("ant-picker-active-left",e.datePickerService.activeInput==="left")("ant-picker-active-right",e.datePickerService.activeInput==="right"),h("ngStyle",e.nzPopupStyle),f(),h("isRange",e.isRange)("inline",e.nzInline)("defaultPickerValue",e.nzDefaultPickerValue)("showWeek",e.nzShowWeekNumber||e.nzMode==="week")("panelMode",e.panelMode)("locale",e.nzLocale==null?null:e.nzLocale.lang)("showToday",e.nzMode==="date"&&e.nzShowToday&&!e.isRange&&!e.nzShowTime)("showNow",e.nzMode==="date"&&e.nzShowNow&&!e.isRange&&!!e.nzShowTime)("showTime",e.nzShowTime)("dateRender",e.nzDateRender)("disabledDate",e.nzDisabledDate)("disabledTime",e.nzDisabledTime)("extraFooter",e.extraFooter)("ranges",e.nzRanges)("dir",e.dir)}}function Z2(o,n){o&1&&Xt(0)}function J2(o,n){if(o&1&&(C(0,"div",25),_(1,Z2,1,0,"ng-container",9),S()),o&2){let e=m(),t=te(6);h("nzNoAnimation",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("@slideMotion","enter"),f(),h("ngTemplateOutlet",t)}}var hh="ant-picker",eG={nzDisabledHours(){return[]},nzDisabledMinutes(){return[]},nzDisabledSeconds(){return[]}};function vT(o,n){let e=n?n(o&&o.nativeDate):{};return e=V(V({},eG),e),e}function tG(o,n){let e=!1;if(o){let t=o.getHours(),i=o.getMinutes(),r=o.getSeconds();n.nzDisabledHours().indexOf(t)===-1&&n.nzDisabledMinutes(t).indexOf(i)===-1?e=n.nzDisabledSeconds(t,i).indexOf(r)!==-1:e=!0}return!e}function nG(o,n){let e=vT(o,n);return tG(o,e)}function ph(o,n,e){return!(!o||n&&n(o.nativeDate)||e&&!nG(o,e))}function fh(o){return o&&o.replace(/Y/g,"y").replace(/D/g,"d")}var yT=(()=>{let n=class n{constructor(t){this.dateHelper=t,this.showToday=!1,this.showNow=!1,this.hasTimePicker=!1,this.isRange=!1,this.okDisabled=!1,this.rangeQuickSelector=null,this.clickOk=new O,this.clickToday=new O,this.prefixCls=hh,this.isTemplateRef=Jg,this.isNonEmptyString=Zg,this.isTodayDisabled=!1,this.todayTitle=""}ngOnChanges(t){let i=new Date;if(t.disabledDate&&(this.isTodayDisabled=!!(this.disabledDate&&this.disabledDate(i))),t.locale){let r=fh(this.locale.dateFormat);this.todayTitle=this.dateHelper.format(i,r)}}onClickToday(){let t=new Ln;this.clickToday.emit(t.clone())}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["calendar-footer"]],inputs:{locale:"locale",showToday:"showToday",showNow:"showNow",hasTimePicker:"hasTimePicker",isRange:"isRange",okDisabled:"okDisabled",disabledDate:"disabledDate",extraFooter:"extraFooter",rangeQuickSelector:"rangeQuickSelector"},outputs:{clickOk:"clickOk",clickToday:"clickToday"},exportAs:["calendarFooter"],standalone:!0,features:[oe,K],decls:4,vars:6,consts:[[3,"class",4,"ngIf"],["role","button",3,"class","title","click",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngTemplateOutlet"],[3,"innerHTML"],["role","button",3,"title","click"],[3,"click"],["nz-button","","type","button","nzType","primary","nzSize","small",3,"disabled","click"]],template:function(i,r){i&1&&(C(0,"div"),_(1,Uk,4,6,"div",0)(2,Kk,2,6,"a",1)(3,Xk,4,6,"ul",0),S()),i&2&&(Ae("",r.prefixCls,"-footer"),f(),h("ngIf",r.extraFooter),f(),h("ngIf",r.showToday),f(),h("ngIf",r.hasTimePicker||r.rangeQuickSelector))},dependencies:[we,jn,Wn,Be,Hi,eo,yi,hr],encapsulation:2,changeDetection:0});let o=n;return o})(),cv=(()=>{let n=class n{constructor(){this.activeInput="left",this.arrowLeft=0,this.isRange=!1,this.valueChange$=new tn(1),this.emitValue$=new J,this.inputPartChange$=new J}initValue(t=!1){t&&(this.initialValue=this.isRange?[]:null),this.setValue(this.initialValue)}hasValue(t=this.value){return Array.isArray(t)?!!t[0]||!!t[1]:!!t}makeValue(t){return this.isRange?t?t.map(i=>new Ln(i)):[]:t?new Ln(t):null}setActiveDate(t,i=!1,r="month"){let s={date:"month",month:"year",year:"decade"};this.isRange?this.activeDate=cw(t,i,s[r],this.activeInput):this.activeDate=Vl(t)}setValue(t){this.value=t,this.valueChange$.next(this.value)}getActiveIndex(t=this.activeInput){return{left:0,right:1}[t]}ngOnDestroy(){this.valueChange$.complete(),this.emitValue$.complete(),this.inputPartChange$.complete()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),gh=(()=>{let n=class n{constructor(){this.prefixCls="ant-picker-header",this.selectors=[],this.showSuperPreBtn=!0,this.showSuperNextBtn=!0,this.showPreBtn=!0,this.showNextBtn=!0,this.panelModeChange=new O,this.valueChange=new O}superPreviousTitle(){return this.locale.previousYear}previousTitle(){return this.locale.previousMonth}superNextTitle(){return this.locale.nextYear}nextTitle(){return this.locale.nextMonth}superPrevious(){this.changeValue(this.value.addYears(-1))}superNext(){this.changeValue(this.value.addYears(1))}previous(){this.changeValue(this.value.addMonths(-1))}next(){this.changeValue(this.value.addMonths(1))}changeValue(t){this.value!==t&&(this.value=t,this.valueChange.emit(this.value),this.render())}changeMode(t){this.panelModeChange.emit(t)}render(){this.value&&(this.selectors=this.getSelectors())}ngOnInit(){this.value||(this.value=new Ln),this.selectors=this.getSelectors()}ngOnChanges(t){(t.value||t.locale)&&this.render()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,inputs:{value:"value",locale:"locale",showSuperPreBtn:"showSuperPreBtn",showSuperNextBtn:"showSuperNextBtn",showPreBtn:"showPreBtn",showNextBtn:"showNextBtn"},outputs:{panelModeChange:"panelModeChange",valueChange:"valueChange"},features:[oe]});let o=n;return o})(),iG=(()=>{let n=class n extends gh{previous(){}next(){}get startYear(){return parseInt(`${this.value.getYear()/100}`,10)*100}get endYear(){return this.startYear+99}superPrevious(){this.changeValue(this.value.addYears(-100))}superNext(){this.changeValue(this.value.addYears(100))}getSelectors(){return[{className:`${this.prefixCls}-decade-btn`,title:"",onClick:()=>{},label:`${this.startYear}-${this.endYear}`}]}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["decade-header"]],exportAs:["decadeHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,Zk,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),mh=(()=>{let n=class n{constructor(){this.isTemplateRef=Jg,this.isNonEmptyString=Zg,this.headRow=[],this.bodyRows=[],this.MAX_ROW=6,this.MAX_COL=7,this.prefixCls="ant-picker",this.activeDate=new Ln,this.showWeek=!1,this.selectedValue=[],this.hoverValue=[],this.canSelectWeek=!1,this.valueChange=new O,this.cellHover=new O}render(){this.activeDate&&(this.headRow=this.makeHeadRow(),this.bodyRows=this.makeBodyRows())}trackByBodyRow(t,i){return i.trackByIndex}trackByBodyColumn(t,i){return i.trackByIndex}hasRangeValue(){return this.selectedValue?.length>0||this.hoverValue?.length>0}getClassMap(t){return{"ant-picker-cell":!0,"ant-picker-cell-in-view":!0,"ant-picker-cell-selected":t.isSelected,"ant-picker-cell-disabled":t.isDisabled,"ant-picker-cell-in-range":!!t.isInSelectedRange,"ant-picker-cell-range-start":!!t.isSelectedStart,"ant-picker-cell-range-end":!!t.isSelectedEnd,"ant-picker-cell-range-start-single":!!t.isStartSingle,"ant-picker-cell-range-end-single":!!t.isEndSingle,"ant-picker-cell-range-hover":!!t.isInHoverRange,"ant-picker-cell-range-hover-start":!!t.isHoverStart,"ant-picker-cell-range-hover-end":!!t.isHoverEnd,"ant-picker-cell-range-hover-edge-start":!!t.isFirstCellInPanel,"ant-picker-cell-range-hover-edge-end":!!t.isLastCellInPanel,"ant-picker-cell-range-start-near-hover":!!t.isRangeStartNearHover,"ant-picker-cell-range-end-near-hover":!!t.isRangeEndNearHover}}ngOnInit(){this.render()}ngOnChanges(t){t.activeDate&&!t.activeDate.currentValue&&(this.activeDate=new Ln),(t.disabledDate||t.locale||t.showWeek||t.selectWeek||this.isDateRealChange(t.activeDate)||this.isDateRealChange(t.value)||this.isDateRealChange(t.selectedValue)||this.isDateRealChange(t.hoverValue))&&this.render()}isDateRealChange(t){if(t){let i=t.previousValue,r=t.currentValue;return Array.isArray(r)?!Array.isArray(i)||r.length!==i.length||r.some((s,a)=>{let l=i[a];return l instanceof Ln?l.isSameDay(s):l!==s}):!this.isSameDate(i,r)}return!1}isSameDate(t,i){return!t&&!i||t&&i&&i.isSameDay(t)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,inputs:{prefixCls:"prefixCls",value:"value",locale:"locale",activeDate:"activeDate",showWeek:"showWeek",selectedValue:"selectedValue",hoverValue:"hoverValue",disabledDate:"disabledDate",cellRender:"cellRender",fullCellRender:"fullCellRender",canSelectWeek:"canSelectWeek"},outputs:{valueChange:"valueChange",cellHover:"cellHover"},features:[oe]});let o=n;return o})(),rG=4,oG=3,sG=(()=>{let n=class n extends mh{get startYear(){return parseInt(`${this.activeDate.getYear()/100}`,10)*100}get endYear(){return this.startYear+99}makeHeadRow(){return[]}makeBodyRows(){let t=[],i=this.value&&this.value.getYear(),r=this.startYear,s=this.endYear,a=r-10,l=0;for(let c=0;c=p&&i<=g,isLowerThanStart:gs,classMap:{},onClick(){},onMouseEnter(){}};y.classMap=this.getClassMap(y),y.onClick=()=>this.chooseDecade(p),l++,u.dateCells.push(y)}t.push(u)}return t}getClassMap(t){return{[`${this.prefixCls}-cell`]:!0,[`${this.prefixCls}-cell-in-view`]:!t.isBiggerThanEnd&&!t.isLowerThanStart,[`${this.prefixCls}-cell-selected`]:t.isSelected,[`${this.prefixCls}-cell-disabled`]:t.isDisabled}}chooseDecade(t){this.value=this.activeDate.setYear(t),this.valueChange.emit(this.value)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["decade-table"]],exportAs:["decadeTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,tV,4,2,"thead",1),C(2,"tbody"),_(3,fV,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),aG=(()=>{let n=class n extends gh{get startYear(){return parseInt(`${this.value.getYear()/10}`,10)*10}get endYear(){return this.startYear+9}superPrevious(){this.changeValue(this.value.addYears(-10))}superNext(){this.changeValue(this.value.addYears(10))}getSelectors(){return[{className:`${this.prefixCls}-year-btn`,title:"",onClick:()=>this.changeMode("decade"),label:`${this.startYear}-${this.endYear}`}]}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["year-header"]],exportAs:["yearHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,gV,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),lG=(()=>{let n=class n extends mh{constructor(t){super(),this.dateHelper=t,this.MAX_ROW=4,this.MAX_COL=3}makeHeadRow(){return[]}makeBodyRows(){let t=this.activeDate&&this.activeDate.getYear(),i=parseInt(`${t/10}`,10)*10,r=i+9,s=i-1,a=[],l=0;for(let c=0;c=i&&p<=r,isSelected:p===(this.value&&this.value.getYear()),content:v,title:v,classMap:{},isLastCellInPanel:g.getYear()===r,isFirstCellInPanel:g.getYear()===i,cellRender:Ds(this.cellRender,g),fullCellRender:Ds(this.fullCellRender,g),onClick:()=>this.chooseYear(x.value.getFullYear()),onMouseEnter:()=>this.cellHover.emit(g)};this.addCellProperty(x,g),u.dateCells.push(x),l++}a.push(u)}return a}getClassMap(t){return ot(V({},super.getClassMap(t)),{"ant-picker-cell-in-view":!!t.isSameDecade})}isDisabledYear(t){if(!this.disabledDate)return!1;let i=t.setMonth(0).setDate(1);for(let r=i;r.getYear()===t.getYear();r=r.addDays(1))if(!this.disabledDate(r.nativeDate))return!1;return!0}addCellProperty(t,i){if(this.hasRangeValue()){let[r,s]=this.hoverValue,[a,l]=this.selectedValue;a?.isSameYear(i)&&(t.isSelectedStart=!0,t.isSelected=!0),l?.isSameYear(i)&&(t.isSelectedEnd=!0,t.isSelected=!0),r&&s&&(t.isHoverStart=r.isSameYear(i),t.isHoverEnd=s.isSameYear(i),t.isInHoverRange=r.isBeforeYear(i)&&i.isBeforeYear(s)),t.isStartSingle=a&&!l,t.isEndSingle=!a&&l,t.isInSelectedRange=a?.isBeforeYear(i)&&i?.isBeforeYear(l),t.isRangeStartNearHover=a&&t.isInHoverRange,t.isRangeEndNearHover=l&&t.isInHoverRange}else i.isSameYear(this.value)&&(t.isSelected=!0);t.classMap=this.getClassMap(t)}chooseYear(t){this.value=this.activeDate.setYear(t),this.valueChange.emit(this.value),this.render()}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["year-table"]],exportAs:["yearTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,yV,4,2,"thead",1),C(2,"tbody"),_(3,IV,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),cG=(()=>{let n=class n extends gh{constructor(t){super(),this.dateHelper=t}getSelectors(){return[{className:`${this.prefixCls}-month-btn`,title:this.locale.yearSelect,onClick:()=>this.changeMode("year"),label:this.dateHelper.format(this.value.nativeDate,fh(this.locale.yearFormat))}]}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["month-header"]],exportAs:["monthHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,PV,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),uG=(()=>{let n=class n extends mh{constructor(t){super(),this.dateHelper=t,this.MAX_ROW=4,this.MAX_COL=3}makeHeadRow(){return[]}makeBodyRows(){let t=[],i=0;for(let r=0;rthis.chooseMonth(d.value.getMonth()),onMouseEnter:()=>this.cellHover.emit(l)};this.addCellProperty(d,l),s.dateCells.push(d),i++}t.push(s)}return t}isDisabledMonth(t){if(!this.disabledDate)return!1;let i=t.setDate(1);for(let r=i;r.getMonth()===t.getMonth();r=r.addDays(1))if(!this.disabledDate(r.nativeDate))return!1;return!0}addCellProperty(t,i){if(this.hasRangeValue()){let[r,s]=this.hoverValue,[a,l]=this.selectedValue;a?.isSameMonth(i)&&(t.isSelectedStart=!0,t.isSelected=!0),l?.isSameMonth(i)&&(t.isSelectedEnd=!0,t.isSelected=!0),r&&s&&(t.isHoverStart=r.isSameMonth(i),t.isHoverEnd=s.isSameMonth(i),t.isLastCellInPanel=i.getMonth()===11,t.isFirstCellInPanel=i.getMonth()===0,t.isInHoverRange=r.isBeforeMonth(i)&&i.isBeforeMonth(s)),t.isStartSingle=a&&!l,t.isEndSingle=!a&&l,t.isInSelectedRange=a?.isBeforeMonth(i)&&i?.isBeforeMonth(l),t.isRangeStartNearHover=a&&t.isInHoverRange,t.isRangeEndNearHover=l&&t.isInHoverRange}else i.isSameMonth(this.value)&&(t.isSelected=!0);t.classMap=this.getClassMap(t)}chooseMonth(t){this.value=this.activeDate.setMonth(t),this.valueChange.emit(this.value)}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["month-table"]],exportAs:["monthTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,AV,4,2,"thead",1),C(2,"tbody"),_(3,qV,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),dG=(()=>{let n=class n extends gh{constructor(t){super(),this.dateHelper=t}getSelectors(){return[{className:`${this.prefixCls}-year-btn`,title:this.locale.yearSelect,onClick:()=>this.changeMode("year"),label:this.dateHelper.format(this.value.nativeDate,fh(this.locale.yearFormat))},{className:`${this.prefixCls}-month-btn`,title:this.locale.monthSelect,onClick:()=>this.changeMode("month"),label:this.dateHelper.format(this.value.nativeDate,this.locale.monthFormat||"MMM")}]}};n.\u0275fac=function(i){return new(i||n)(w(no))},n.\u0275cmp=j({type:n,selectors:[["date-header"]],exportAs:["dateHeader"],standalone:!0,features:[Xe,K],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(i,r){i&1&&(C(0,"div")(1,"button",0),A("click",function(){return r.superPrevious()}),R(2,"span",1),S(),C(3,"button",0),A("click",function(){return r.previous()}),R(4,"span",2),S(),C(5,"div"),_(6,YV,3,5,"ng-container",3),S(),C(7,"button",0),A("click",function(){return r.next()}),R(8,"span",4),S(),C(9,"button",0),A("click",function(){return r.superNext()}),R(10,"span",5),S()()),i&2&&(cr(r.prefixCls),f(),Ae("",r.prefixCls,"-super-prev-btn"),Re("visibility",r.showSuperPreBtn?"visible":"hidden"),Vt("title",r.superPreviousTitle()),f(2),Ae("",r.prefixCls,"-prev-btn"),Re("visibility",r.showPreBtn?"visible":"hidden"),Vt("title",r.previousTitle()),f(2),Ae("",r.prefixCls,"-view"),f(),h("ngForOf",r.selectors),f(),Ae("",r.prefixCls,"-next-btn"),Re("visibility",r.showNextBtn?"visible":"hidden"),Vt("title",r.nextTitle()),f(2),Ae("",r.prefixCls,"-super-next-btn"),Re("visibility",r.showSuperNextBtn?"visible":"hidden"),Vt("title",r.superNextTitle()))},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),pG=(()=>{let n=class n extends mh{constructor(t,i){super(),this.i18n=t,this.dateHelper=i}changeValueFromInside(t){this.activeDate=this.activeDate.setYear(t.getYear()).setMonth(t.getMonth()).setDate(t.getDate()),this.valueChange.emit(this.activeDate),this.activeDate.isSameMonth(this.value)||this.render()}makeHeadRow(){let t=[],i=this.activeDate.calendarStart({weekStartsOn:this.dateHelper.getFirstDayOfWeek()});for(let r=0;rthis.changeValueFromInside(c),onMouseEnter:()=>this.cellHover.emit(c)};this.addCellProperty(g,c),this.showWeek&&!a.weekNum&&(a.weekNum=this.dateHelper.getISOWeek(c.nativeDate)),c.isSameDay(this.value)&&(a.isActive=c.isSameDay(this.value)),a.dateCells.push(g)}a.classMap={"ant-picker-week-panel-row":this.canSelectWeek,"ant-picker-week-panel-row-selected":this.canSelectWeek&&a.isActive},t.push(a)}return t}addCellProperty(t,i){if(this.hasRangeValue()&&!this.canSelectWeek){let[r,s]=this.hoverValue,[a,l]=this.selectedValue;a?.isSameDay(i)&&(t.isSelectedStart=!0,t.isSelected=!0),l?.isSameDay(i)&&(t.isSelectedEnd=!0,t.isSelected=!0),r&&s&&(t.isHoverStart=r.isSameDay(i),t.isHoverEnd=s.isSameDay(i),t.isLastCellInPanel=i.isLastDayOfMonth(),t.isFirstCellInPanel=i.isFirstDayOfMonth(),t.isInHoverRange=r.isBeforeDay(i)&&i.isBeforeDay(s)),t.isStartSingle=a&&!l,t.isEndSingle=!a&&l,t.isInSelectedRange=a?.isBeforeDay(i)&&i.isBeforeDay(l),t.isRangeStartNearHover=a&&t.isInHoverRange,t.isRangeEndNearHover=l&&t.isInHoverRange}t.isToday=i.isToday(),t.isSelected=i.isSameDay(this.value),t.isDisabled=!!this.disabledDate?.(i.nativeDate),t.classMap=this.getClassMap(t)}getClassMap(t){let i=new Ln(t.value);return ot(V({},super.getClassMap(t)),{"ant-picker-cell-today":!!t.isToday,"ant-picker-cell-in-view":i.isSameMonth(this.activeDate)})}};n.\u0275fac=function(i){return new(i||n)(w(Di),w(no))},n.\u0275cmp=j({type:n,selectors:[["date-table"]],inputs:{locale:"locale"},exportAs:["dateTable"],standalone:!0,features:[Xe,K],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(i,r){i&1&&(C(0,"table",0),_(1,ZV,4,2,"thead",1),C(2,"tbody"),_(3,d2,3,4,"tr",2),S()()),i&2&&(f(),h("ngIf",r.headRow&&r.headRow.length>0),f(2),h("ngForOf",r.bodyRows)("ngForTrackBy",r.trackByBodyRow))},dependencies:[we,lt,St,jn,Wn,Be,Gi],encapsulation:2,changeDetection:0});let o=n;return o})(),hG=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})(),CT=(()=>{let n=class n{constructor(){this.panelModeChange=new O,this.headerChange=new O,this.selectDate=new O,this.selectTime=new O,this.cellHover=new O,this.prefixCls=hh}enablePrevNext(t,i){return!(!this.showTimePicker&&i===this.endPanelMode&&(this.partType==="left"&&t==="next"||this.partType==="right"&&t==="prev"))}onSelectTime(t){this.selectTime.emit(new Ln(t))}onSelectDate(t){let i=t instanceof Ln?t:new Ln(t),r=this.timeOptions&&this.timeOptions.nzDefaultOpenValue;!this.value&&r&&i.setHms(r.getHours(),r.getMinutes(),r.getSeconds()),this.selectDate.emit(i)}onChooseMonth(t){this.activeDate=this.activeDate.setMonth(t.getMonth()),this.endPanelMode==="month"?(this.value=t,this.selectDate.emit(t)):(this.headerChange.emit(t),this.panelModeChange.emit(this.endPanelMode))}onChooseYear(t){this.activeDate=this.activeDate.setYear(t.getYear()),this.endPanelMode==="year"?(this.value=t,this.selectDate.emit(t)):(this.headerChange.emit(t),this.panelModeChange.emit(this.endPanelMode))}onChooseDecade(t){this.activeDate=this.activeDate.setYear(t.getYear()),this.endPanelMode==="decade"?(this.value=t,this.selectDate.emit(t)):(this.headerChange.emit(t),this.panelModeChange.emit("year"))}ngOnChanges(t){t.activeDate&&!t.activeDate.currentValue&&(this.activeDate=new Ln),t.panelMode&&t.panelMode.currentValue==="time"&&(this.panelMode="date")}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["inner-popup"]],inputs:{activeDate:"activeDate",endPanelMode:"endPanelMode",panelMode:"panelMode",showWeek:"showWeek",locale:"locale",showTimePicker:"showTimePicker",timeOptions:"timeOptions",disabledDate:"disabledDate",dateRender:"dateRender",selectedValue:"selectedValue",hoverValue:"hoverValue",value:"value",partType:"partType"},outputs:{panelModeChange:"panelModeChange",headerChange:"headerChange",selectDate:"selectDate",selectTime:"selectTime",cellHover:"cellHover"},exportAs:["innerPopup"],standalone:!0,features:[oe,K],decls:8,vars:11,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngIf"],[3,"value","locale","showSuperPreBtn","showSuperNextBtn","showNextBtn","showPreBtn","valueChange","panelModeChange"],[3,"activeDate","value","locale","disabledDate","valueChange"],[3,"activeDate","value","locale","disabledDate","selectedValue","hoverValue","valueChange","cellHover"],[3,"value","activeDate","locale","disabledDate","selectedValue","hoverValue","valueChange","cellHover"],[3,"value","locale","showSuperPreBtn","showSuperNextBtn","showPreBtn","showNextBtn","valueChange","panelModeChange"],[3,"locale","showWeek","value","activeDate","disabledDate","cellRender","selectedValue","hoverValue","canSelectWeek","valueChange","cellHover"],[3,"nzInDatePicker","ngModel","format","nzHourStep","nzMinuteStep","nzSecondStep","nzDisabledHours","nzDisabledMinutes","nzDisabledSeconds","nzHideDisabledOptions","nzDefaultOpenValue","nzUse12Hours","nzAddOn","ngModelChange"]],template:function(i,r){i&1&&(C(0,"div")(1,"div"),H(2,0),_(3,p2,4,13,"ng-container",1)(4,h2,4,15,"ng-container",1)(5,f2,4,15,"ng-container",1)(6,g2,4,18,"ng-container",2),B(),S(),_(7,m2,2,13,"ng-container",3),S()),i&2&&(k("ant-picker-datetime-panel",r.showTimePicker),f(),Dl("",r.prefixCls,"-",r.panelMode,"-panel"),f(),h("ngSwitch",r.panelMode),f(),h("ngSwitchCase","decade"),f(),h("ngSwitchCase","year"),f(),h("ngSwitchCase","month"),f(2),h("ngIf",r.showTimePicker&&r.timeOptions))},dependencies:[jn,Wn,hG,dG,pG,iG,sG,cG,uG,aG,lG,Gi,we,fT,dh,nn,Kt,Rt],encapsulation:2,changeDetection:0});let o=n;return o})(),uv=(()=>{let n=class n{get hasTimePicker(){return!!this.showTime}get hasFooter(){return this.showToday||this.hasTimePicker||!!this.extraFooter||!!this.ranges}get arrowPosition(){return this.dir==="rtl"?{right:`${this.datePickerService?.arrowLeft}px`}:{left:`${this.datePickerService?.arrowLeft}px`}}constructor(t,i,r,s){this.datePickerService=t,this.cdr=i,this.ngZone=r,this.host=s,this.inline=!1,this.dir="ltr",this.panelModeChange=new O,this.calendarChange=new O,this.resultOk=new O,this.prefixCls=hh,this.endPanelMode="date",this.timeOptions=null,this.hoverValue=[],this.checkedPartArr=[!1,!1],this.destroy$=new J,this.disabledStartTime=a=>this.disabledTime&&this.disabledTime(a,"start"),this.disabledEndTime=a=>this.disabledTime&&this.disabledTime(a,"end")}ngOnInit(){_t(this.datePickerService.valueChange$,this.datePickerService.inputPartChange$).pipe(F(this.destroy$)).subscribe(()=>{this.updateActiveDate(),this.cdr.markForCheck()}),this.ngZone.runOutsideAngular(()=>{Ke(this.host.nativeElement,"mousedown").pipe(F(this.destroy$)).subscribe(t=>t.preventDefault())})}ngOnChanges(t){(t.showTime||t.disabledTime)&&this.showTime&&this.buildTimeOptions(),t.panelMode&&(this.endPanelMode=this.panelMode),t.defaultPickerValue&&this.updateActiveDate()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}updateActiveDate(){let t=this.datePickerService.hasValue()?this.datePickerService.value:this.datePickerService.makeValue(this.defaultPickerValue);this.datePickerService.setActiveDate(t,this.hasTimePicker,this.getPanelMode(this.endPanelMode))}onClickOk(){let t={left:0,right:1}[this.datePickerService.activeInput],i=this.isRange?this.datePickerService.value[t]:this.datePickerService.value;this.changeValueFromSelect(i),this.resultOk.emit()}onClickToday(t){this.changeValueFromSelect(t,!this.showTime)}onCellHover(t){if(!this.isRange)return;let i={left:1,right:0}[this.datePickerService.activeInput],r=this.datePickerService.value[i];r&&(r.isBeforeDay(t)?this.hoverValue=[r,t]:this.hoverValue=[t,r])}onPanelModeChange(t,i){this.isRange?this.datePickerService.getActiveIndex(i)===0?this.panelMode=[t,this.panelMode[1]]:this.panelMode=[this.panelMode[0],t]:this.panelMode=t,this.panelModeChange.emit(this.panelMode)}onActiveDateChange(t,i){if(this.isRange){let r=[];r[this.datePickerService.getActiveIndex(i)]=t,this.datePickerService.setActiveDate(r,this.hasTimePicker,this.getPanelMode(this.endPanelMode,i))}else this.datePickerService.setActiveDate(t)}onSelectTime(t,i){if(this.isRange){let r=Vl(this.datePickerService.value),s=this.datePickerService.getActiveIndex(i);r[s]=this.overrideHms(t,r[s]),this.datePickerService.setValue(r)}else{let r=this.overrideHms(t,this.datePickerService.value);this.datePickerService.setValue(r)}this.datePickerService.inputPartChange$.next(null),this.buildTimeOptions()}changeValueFromSelect(t,i=!0){if(this.isRange){let r=Vl(this.datePickerService.value),s=this.datePickerService.activeInput,a=s;r[this.datePickerService.getActiveIndex(s)]=t,this.checkedPartArr[this.datePickerService.getActiveIndex(s)]=!0,this.hoverValue=r,i?this.inline?(a=this.reversedPart(s),a==="right"&&(r[this.datePickerService.getActiveIndex(a)]=null,this.checkedPartArr[this.datePickerService.getActiveIndex(a)]=!1),this.datePickerService.setValue(r),this.calendarChange.emit(r),this.isBothAllowed(r)&&this.checkedPartArr[0]&&this.checkedPartArr[1]&&(this.clearHoverValue(),this.datePickerService.emitValue$.next())):(am(r)&&(a=this.reversedPart(s),r[this.datePickerService.getActiveIndex(a)]=null,this.checkedPartArr[this.datePickerService.getActiveIndex(a)]=!1),this.datePickerService.setValue(r),this.isBothAllowed(r)&&this.checkedPartArr[0]&&this.checkedPartArr[1]?(this.calendarChange.emit(r),this.clearHoverValue(),this.datePickerService.emitValue$.next()):this.isAllowed(r)&&(a=this.reversedPart(s),this.calendarChange.emit([t.clone()]))):this.datePickerService.setValue(r),this.datePickerService.inputPartChange$.next(a)}else this.datePickerService.setValue(t),this.datePickerService.inputPartChange$.next(null),i&&this.isAllowed(t)&&this.datePickerService.emitValue$.next();this.buildTimeOptions()}reversedPart(t){return t==="left"?"right":"left"}getPanelMode(t,i){return this.isRange?t[this.datePickerService.getActiveIndex(i)]:t}getValue(t){return this.isRange?(this.datePickerService.value||[])[this.datePickerService.getActiveIndex(t)]:this.datePickerService.value}getActiveDate(t){return this.isRange?this.datePickerService.activeDate[this.datePickerService.getActiveIndex(t)]:this.datePickerService.activeDate}isOneAllowed(t){let i=this.datePickerService.getActiveIndex(),r=[this.disabledStartTime,this.disabledEndTime];return ph(t[i],this.disabledDate,r[i])}isBothAllowed(t){return ph(t[0],this.disabledDate,this.disabledStartTime)&&ph(t[1],this.disabledDate,this.disabledEndTime)}isAllowed(t,i=!1){return this.isRange?i?this.isBothAllowed(t):this.isOneAllowed(t):ph(t,this.disabledDate,this.disabledTime)}getTimeOptions(t){return this.showTime&&this.timeOptions?this.timeOptions instanceof Array?this.timeOptions[this.datePickerService.getActiveIndex(t)]:this.timeOptions:null}onClickPresetRange(t){let i=typeof t=="function"?t():t;i&&(this.datePickerService.setValue([new Ln(i[0]),new Ln(i[1])]),this.datePickerService.emitValue$.next())}onPresetRangeMouseLeave(){this.clearHoverValue()}onHoverPresetRange(t){typeof t!="function"&&(this.hoverValue=[new Ln(t[0]),new Ln(t[1])])}getObjectKeys(t){return t?Object.keys(t):[]}show(t){return!(this.showTime&&this.isRange&&this.datePickerService.activeInput!==t)}clearHoverValue(){this.hoverValue=[]}buildTimeOptions(){if(this.showTime){let t=typeof this.showTime=="object"?this.showTime:{};if(this.isRange){let i=this.datePickerService.value;this.timeOptions=[this.overrideTimeOptions(t,i[0],"start"),this.overrideTimeOptions(t,i[1],"end")]}else this.timeOptions=this.overrideTimeOptions(t,this.datePickerService.value)}else this.timeOptions=null}overrideTimeOptions(t,i,r){let s;return r?s=r==="start"?this.disabledStartTime:this.disabledEndTime:s=this.disabledTime,V(V({},t),vT(i,s))}overrideHms(t,i){return t=t||new Ln,i=i||new Ln,i.setHms(t.getHours(),t.getMinutes(),t.getSeconds())}};n.\u0275fac=function(i){return new(i||n)(w(cv),w(fe),w($e),w(de))},n.\u0275cmp=j({type:n,selectors:[["date-range-popup"]],inputs:{isRange:"isRange",inline:"inline",showWeek:"showWeek",locale:"locale",disabledDate:"disabledDate",disabledTime:"disabledTime",showToday:"showToday",showNow:"showNow",showTime:"showTime",extraFooter:"extraFooter",ranges:"ranges",dateRender:"dateRender",panelMode:"panelMode",defaultPickerValue:"defaultPickerValue",dir:"dir"},outputs:{panelModeChange:"panelModeChange",calendarChange:"calendarChange",resultOk:"resultOk"},exportAs:["dateRangePopup"],standalone:!0,features:[oe,K],decls:9,vars:2,consts:[[4,"ngIf","ngIfElse"],["singlePanel",""],["tplInnerPopup",""],["tplFooter",""],["tplRangeQuickSelector",""],["noTimePicker",""],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["tabindex","-1"],[3,"showWeek","endPanelMode","partType","locale","showTimePicker","timeOptions","panelMode","activeDate","value","disabledDate","dateRender","selectedValue","hoverValue","panelModeChange","cellHover","selectDate","selectTime","headerChange"],[3,"locale","isRange","showToday","showNow","hasTimePicker","okDisabled","extraFooter","rangeQuickSelector","clickOk","clickToday",4,"ngIf"],[3,"locale","isRange","showToday","showNow","hasTimePicker","okDisabled","extraFooter","rangeQuickSelector","clickOk","clickToday"],[3,"class","click","mouseenter","mouseleave",4,"ngFor","ngForOf"],[3,"click","mouseenter","mouseleave"],[1,"ant-tag","ant-tag-blue"]],template:function(i,r){if(i&1&&_(0,T2,9,19,"ng-container",0)(1,z2,4,13,"ng-template",null,1,_e)(3,O2,2,18,"ng-template",null,2,_e)(5,R2,1,1,"ng-template",null,3,_e)(7,P2,1,1,"ng-template",null,4,_e),i&2){let s=te(2);h("ngIf",r.isRange)("ngIfElse",s)}},dependencies:[CT,Be,we,yT,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),lv={position:"relative"},fG="datePicker",ps=(()=>{let n=class n{get nzShowTime(){return this.showTime}set nzShowTime(t){this.showTime=typeof t=="object"?t:os(t)}get realOpenState(){return this.isOpenHandledByUser()?!!this.nzOpen:this.overlayOpen}ngAfterViewInit(){this.nzAutoFocus&&this.focus(),this.isRange&&this.platform.isBrowser&&this.nzResizeObserver.observe(this.elementRef).pipe(F(this.destroy$)).subscribe(()=>{this.updateInputWidthAndArrowLeft()}),this.datePickerService.inputPartChange$.pipe(F(this.destroy$)).subscribe(t=>{t&&(this.datePickerService.activeInput=t),this.focus(),this.updateInputWidthAndArrowLeft()}),this.platform.isBrowser&&this.ngZone.runOutsideAngular(()=>Ke(this.elementRef.nativeElement,"mousedown").pipe(F(this.destroy$)).subscribe(t=>{t.target.tagName.toLowerCase()!=="input"&&t.preventDefault()}))}updateInputWidthAndArrowLeft(){this.inputWidth=this.rangePickerInputs?.first?.nativeElement.offsetWidth||0;let t={position:"absolute",width:`${this.inputWidth}px`};this.datePickerService.arrowLeft=this.datePickerService.activeInput==="left"?0:this.inputWidth+this.separatorElement?.nativeElement.offsetWidth||0,this.dir==="rtl"?this.activeBarStyle=ot(V({},t),{right:`${this.datePickerService.arrowLeft}px`}):this.activeBarStyle=ot(V({},t),{left:`${this.datePickerService.arrowLeft}px`}),this.cdr.markForCheck()}getInput(t){if(!this.nzInline)return this.isRange?t==="left"?this.rangePickerInputs?.first.nativeElement:this.rangePickerInputs?.last.nativeElement:this.pickerInput.nativeElement}focus(){let t=this.getInput(this.datePickerService.activeInput);this.document.activeElement!==t&&t?.focus()}onFocus(t,i){t.preventDefault(),i&&this.datePickerService.inputPartChange$.next(i),this.renderClass(!0)}onFocusout(t){t.preventDefault(),this.onTouchedFn(),this.elementRef.nativeElement.contains(t.relatedTarget)||this.checkAndClose(),this.renderClass(!1)}open(){this.nzInline||!this.realOpenState&&!this.nzDisabled&&(this.updateInputWidthAndArrowLeft(),this.overlayOpen=!0,this.nzOnOpenChange.emit(!0),this.focus(),this.cdr.markForCheck())}close(){this.nzInline||this.realOpenState&&(this.overlayOpen=!1,this.nzOnOpenChange.emit(!1))}showClear(){return!this.nzDisabled&&!this.isEmptyValue(this.datePickerService.value)&&this.nzAllowClear}checkAndClose(){if(this.realOpenState)if(this.panel.isAllowed(this.datePickerService.value,!0)){if(Array.isArray(this.datePickerService.value)&&am(this.datePickerService.value)){let t=this.datePickerService.getActiveIndex(),i=this.datePickerService.value[t];this.panel.changeValueFromSelect(i,!0);return}this.updateInputValue(),this.datePickerService.emitValue$.next()}else this.datePickerService.setValue(this.datePickerService.initialValue),this.close()}onClickInputBox(t){t.stopPropagation(),this.focus(),this.isOpenHandledByUser()||this.open()}onOverlayKeydown(t){t.keyCode===27&&this.datePickerService.initValue()}onPositionChange(t){this.currentPositionX=t.connectionPair.originX,this.currentPositionY=t.connectionPair.originY,this.cdr.detectChanges()}onClickClear(t){t.preventDefault(),t.stopPropagation(),this.datePickerService.initValue(!0),this.datePickerService.emitValue$.next()}updateInputValue(){let t=this.datePickerService.value;this.isRange?this.inputValue=t?t.map(i=>this.formatValue(i)):["",""]:this.inputValue=this.formatValue(t),this.cdr.markForCheck()}formatValue(t){return this.dateHelper.format(t&&t.nativeDate,this.nzFormat)}onInputChange(t,i=!1){if(!this.platform.TRIDENT&&this.document.activeElement===this.getInput(this.datePickerService.activeInput)&&!this.realOpenState){this.open();return}let r=this.checkValidDate(t);r&&this.realOpenState&&this.panel.changeValueFromSelect(r,i)}onKeyupEnter(t){this.onInputChange(t.target.value,!0)}checkValidDate(t){let i=new Ln(this.dateHelper.parseDate(t,this.nzFormat));return!i.isValid()||t!==this.dateHelper.format(i.nativeDate,this.nzFormat)?null:i}getPlaceholder(t){return this.isRange?this.nzPlaceHolder[this.datePickerService.getActiveIndex(t)]:this.nzPlaceHolder}isEmptyValue(t){return t===null?!0:this.isRange?!t||!Array.isArray(t)||t.every(i=>!i):!t}isOpenHandledByUser(){return this.nzOpen!==void 0}constructor(t,i,r,s,a,l,c,u,d,p,g,v,y,x,E,z){this.nzConfigService=t,this.datePickerService=i,this.i18n=r,this.cdr=s,this.renderer=a,this.ngZone=l,this.elementRef=c,this.dateHelper=u,this.nzResizeObserver=d,this.platform=p,this.destroy$=g,this.directionality=y,this.noAnimation=x,this.nzFormStatusService=E,this.nzFormNoStatusService=z,this._nzModuleName=fG,this.isRange=!1,this.dir="ltr",this.statusCls={},this.status="",this.hasFeedback=!1,this.panelMode="date",this.isCustomPlaceHolder=!1,this.isCustomFormat=!1,this.showTime=!1,this.isNzDisableFirstChange=!0,this.nzAllowClear=!0,this.nzAutoFocus=!1,this.nzDisabled=!1,this.nzBorderless=!1,this.nzInputReadOnly=!1,this.nzInline=!1,this.nzPlaceHolder="",this.nzPopupStyle=lv,this.nzSize="default",this.nzStatus="",this.nzShowToday=!0,this.nzMode="date",this.nzShowNow=!0,this.nzDefaultPickerValue=null,this.nzSeparator=void 0,this.nzSuffixIcon="calendar",this.nzBackdrop=!1,this.nzId=null,this.nzPlacement="bottomLeft",this.nzShowWeekNumber=!1,this.nzOnPanelChange=new O,this.nzOnCalendarChange=new O,this.nzOnOk=new O,this.nzOnOpenChange=new O,this.inputSize=12,this.prefixCls=hh,this.activeBarStyle={},this.overlayOpen=!1,this.overlayPositions=[...Fm],this.currentPositionX="start",this.currentPositionY="bottom",this.onChangeFn=()=>{},this.onTouchedFn=()=>{},this.document=v,this.origin=new dr(this.elementRef)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe(Bt((t,i)=>t.status===i.status&&t.hasFeedback===i.hasFeedback),zl(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:Mn(!1)),We(([{status:t,hasFeedback:i},r])=>({status:r?"":t,hasFeedback:i})),F(this.destroy$)).subscribe(({status:t,hasFeedback:i})=>{this.setStatusStyles(t,i)}),this.nzLocale||this.i18n.localeChange.pipe(F(this.destroy$)).subscribe(()=>this.setLocale()),this.datePickerService.isRange=this.isRange,this.datePickerService.initValue(!0),this.datePickerService.emitValue$.pipe(F(this.destroy$)).subscribe(()=>{let t=this.showTime?"second":"day",i=this.datePickerService.value,r=this.datePickerService.initialValue;if(!this.isRange&&i?.isSame(r?.nativeDate,t))return this.onTouchedFn(),this.close();if(this.isRange){let[s,a]=r,[l,c]=i;if(s?.isSame(l?.nativeDate,t)&&a?.isSame(c?.nativeDate,t))return this.onTouchedFn(),this.close()}if(this.datePickerService.initialValue=Vl(i),this.isRange){let s=i;s.length?this.onChangeFn([s[0]?.nativeDate??null,s[1]?.nativeDate??null]):this.onChangeFn([])}else i?this.onChangeFn(i.nativeDate):this.onChangeFn(null);this.onTouchedFn(),this.close()}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.inputValue=this.isRange?["",""]:"",this.setModeAndFormat(),this.datePickerService.valueChange$.pipe(F(this.destroy$)).subscribe(()=>{this.updateInputValue()})}ngOnChanges(t){let{nzStatus:i,nzPlacement:r}=t;t.nzPopupStyle&&(this.nzPopupStyle=this.nzPopupStyle?V(V({},this.nzPopupStyle),lv):lv),t.nzPlaceHolder?.currentValue&&(this.isCustomPlaceHolder=!0),t.nzFormat?.currentValue&&(this.isCustomFormat=!0),t.nzLocale&&this.setDefaultPlaceHolder(),t.nzRenderExtraFooter&&(this.extraFooter=Ds(this.nzRenderExtraFooter)),t.nzMode&&(this.setDefaultPlaceHolder(),this.setModeAndFormat()),i&&this.setStatusStyles(this.nzStatus,this.hasFeedback),r&&this.setPlacement(this.nzPlacement)}setModeAndFormat(){let t={year:"yyyy",month:"yyyy-MM",week:"YYYY-ww",date:this.nzShowTime?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd"};this.nzMode||(this.nzMode="date"),this.panelMode=this.isRange?[this.nzMode,this.nzMode]:this.nzMode,this.isCustomFormat||(this.nzFormat=t[this.nzMode]),this.inputSize=Math.max(10,this.nzFormat.length)+2,this.updateInputValue()}onOpenChange(t){this.nzOnOpenChange.emit(t)}writeValue(t){this.setValue(t),this.cdr.markForCheck()}registerOnChange(t){this.onChangeFn=t}registerOnTouched(t){this.onTouchedFn=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.cdr.markForCheck(),this.isNzDisableFirstChange=!1}setLocale(){this.nzLocale=this.i18n.getLocaleData("DatePicker",{}),this.setDefaultPlaceHolder(),this.cdr.markForCheck()}setDefaultPlaceHolder(){if(!this.isCustomPlaceHolder&&this.nzLocale){let t={year:this.getPropertyOfLocale("yearPlaceholder"),month:this.getPropertyOfLocale("monthPlaceholder"),week:this.getPropertyOfLocale("weekPlaceholder"),date:this.getPropertyOfLocale("placeholder")},i={year:this.getPropertyOfLocale("rangeYearPlaceholder"),month:this.getPropertyOfLocale("rangeMonthPlaceholder"),week:this.getPropertyOfLocale("rangeWeekPlaceholder"),date:this.getPropertyOfLocale("rangePlaceholder")};this.nzPlaceHolder=this.isRange?i[this.nzMode]:t[this.nzMode]}}getPropertyOfLocale(t){return this.nzLocale.lang[t]||this.i18n.getLocaleData(`DatePicker.lang.${t}`)}setValue(t){let i=this.datePickerService.makeValue(t);this.datePickerService.setValue(i),this.datePickerService.initialValue=Vl(i),this.cdr.detectChanges()}renderClass(t){t?this.renderer.addClass(this.elementRef.nativeElement,"ant-picker-focused"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-picker-focused")}onPanelModeChange(t){this.nzOnPanelChange.emit(t)}onCalendarChange(t){if(this.isRange&&Array.isArray(t)){let i=t.filter(r=>r instanceof Ln).map(r=>r.nativeDate);this.nzOnCalendarChange.emit(i)}}onResultOk(){if(this.isRange){let t=this.datePickerService.value;t.length?this.nzOnOk.emit([t[0]?.nativeDate||null,t[1]?.nativeDate||null]):this.nzOnOk.emit([])}else this.datePickerService.value?this.nzOnOk.emit(this.datePickerService.value.nativeDate):this.nzOnOk.emit(null)}setStatusStyles(t,i){this.status=t,this.hasFeedback=i,this.cdr.markForCheck(),this.statusCls=vi(this.prefixCls,t,i),Object.keys(this.statusCls).forEach(r=>{this.statusCls[r]?this.renderer.addClass(this.elementRef.nativeElement,r):this.renderer.removeClass(this.elementRef.nativeElement,r)})}setPlacement(t){let i=ql[t];this.overlayPositions=[i,...Fm],this.currentPositionX=i.originX,this.currentPositionY=i.originY}};n.\u0275fac=function(i){return new(i||n)(w(st),w(cv),w(Di),w(fe),w(He),w($e),w(de),w(no),w(ds),w(gn),w(Pt),w(gi),w(Me,8),w(ft,9),w(cn,8),w(_i,8))},n.\u0275cmp=j({type:n,selectors:[["nz-date-picker"],["nz-week-picker"],["nz-month-picker"],["nz-year-picker"],["nz-range-picker"]],viewQuery:function(i,r){if(i&1&&(xe(oi,5),xe(uv,5),xe(M2,5),xe(F2,5),xe(A2,5)),i&2){let s;ce(s=ue())&&(r.cdkConnectedOverlay=s.first),ce(s=ue())&&(r.panel=s.first),ce(s=ue())&&(r.separatorElement=s.first),ce(s=ue())&&(r.pickerInput=s.first),ce(s=ue())&&(r.rangePickerInputs=s)}},hostVars:16,hostBindings:function(i,r){i&1&&A("click",function(a){return r.onClickInputBox(a)}),i&2&&k("ant-picker",!0)("ant-picker-range",r.isRange)("ant-picker-large",r.nzSize==="large")("ant-picker-small",r.nzSize==="small")("ant-picker-disabled",r.nzDisabled)("ant-picker-rtl",r.dir==="rtl")("ant-picker-borderless",r.nzBorderless)("ant-picker-inline",r.nzInline)},inputs:{nzAllowClear:"nzAllowClear",nzAutoFocus:"nzAutoFocus",nzDisabled:"nzDisabled",nzBorderless:"nzBorderless",nzInputReadOnly:"nzInputReadOnly",nzInline:"nzInline",nzOpen:"nzOpen",nzDisabledDate:"nzDisabledDate",nzLocale:"nzLocale",nzPlaceHolder:"nzPlaceHolder",nzPopupStyle:"nzPopupStyle",nzDropdownClassName:"nzDropdownClassName",nzSize:"nzSize",nzStatus:"nzStatus",nzFormat:"nzFormat",nzDateRender:"nzDateRender",nzDisabledTime:"nzDisabledTime",nzRenderExtraFooter:"nzRenderExtraFooter",nzShowToday:"nzShowToday",nzMode:"nzMode",nzShowNow:"nzShowNow",nzRanges:"nzRanges",nzDefaultPickerValue:"nzDefaultPickerValue",nzSeparator:"nzSeparator",nzSuffixIcon:"nzSuffixIcon",nzBackdrop:"nzBackdrop",nzId:"nzId",nzPlacement:"nzPlacement",nzShowWeekNumber:"nzShowWeekNumber",nzShowTime:"nzShowTime"},outputs:{nzOnPanelChange:"nzOnPanelChange",nzOnCalendarChange:"nzOnCalendarChange",nzOnOk:"nzOnOk",nzOnOpenChange:"nzOnOpenChange"},exportAs:["nzDatePicker"],standalone:!0,features:[Ve([Pt,cv,{provide:zn,multi:!0,useExisting:pn(()=>n)}]),oe,K],decls:8,vars:7,consts:[[4,"ngIf","ngIfElse"],["tplRangeInput",""],["tplRightRest",""],["inlineMode",""],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayTransformOriginOn","positionChange","detach","overlayKeydown"],[3,"class",4,"ngIf"],[4,"ngIf"],["autocomplete","off",3,"disabled","readOnly","ngModel","placeholder","size","ngModelChange","focus","focusout","keyup.enter"],["pickerInput",""],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["separatorElement",""],[4,"nzStringTemplateOutlet"],["defaultSeparator",""],["nz-icon","","nzType","swap-right","nzTheme","outline"],["autocomplete","off",3,"disabled","readOnly","size","ngModel","placeholder","click","focusout","focus","keyup.enter","ngModelChange"],["rangePickerInput",""],[3,"ngStyle"],[3,"class","click",4,"ngIf"],[3,"status",4,"ngIf"],[3,"click"],["nz-icon","","nzType","close-circle","nzTheme","fill"],["nz-icon","",3,"nzType"],[3,"status"],[3,"isRange","inline","defaultPickerValue","showWeek","panelMode","locale","showToday","showNow","showTime","dateRender","disabledDate","disabledTime","extraFooter","ranges","dir","panelModeChange","calendarChange","resultOk"],[1,"ant-picker-wrapper",2,"position","relative",3,"nzNoAnimation"]],template:function(i,r){if(i&1&&(_(0,W2,3,2,"ng-container",0)(1,U2,2,6,"ng-template",null,1,_e)(3,Q2,5,10,"ng-template",null,2,_e)(5,X2,2,36,"ng-template",null,3,_e)(7,J2,2,3,"ng-template",4),A("positionChange",function(a){return r.onPositionChange(a)})("detach",function(){return r.close()})("overlayKeydown",function(a){return r.onOverlayKeydown(a)})),i&2){let s=te(6);h("ngIf",!r.nzInline)("ngIfElse",s),f(7),h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayOpen",r.realOpenState)("cdkConnectedOverlayPositions",r.overlayPositions)("cdkConnectedOverlayTransformOriginOn",".ant-picker-wrapper")}},dependencies:[we,nn,Ii,Kt,Rt,Be,Ye,Ue,Ge,Fe,Zt,ro,mr,uv,oi,vr,Nr,ft],encapsulation:2,data:{animation:[Mo]},changeDetection:0});let o=n;return N([W()],o.prototype,"nzAllowClear",void 0),N([W()],o.prototype,"nzAutoFocus",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzBorderless",void 0),N([W()],o.prototype,"nzInputReadOnly",void 0),N([W()],o.prototype,"nzInline",void 0),N([W()],o.prototype,"nzOpen",void 0),N([W()],o.prototype,"nzShowToday",void 0),N([W()],o.prototype,"nzShowNow",void 0),N([De()],o.prototype,"nzSeparator",void 0),N([De()],o.prototype,"nzSuffixIcon",void 0),N([De()],o.prototype,"nzBackdrop",void 0),N([W()],o.prototype,"nzShowWeekNumber",void 0),o})(),_T=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.nzMode="month"}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-month-picker"]],exportAs:["nzMonthPicker"],standalone:!0});let o=n;return o})(),vh=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.isRange=!0}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-range-picker"]],exportAs:["nzRangePicker"],standalone:!0});let o=n;return o})(),ST=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.nzMode="week"}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-week-picker"]],exportAs:["nzWeekPicker"],standalone:!0});let o=n;return o})(),wT=(()=>{let n=class n{constructor(t){this.datePicker=t,this.datePicker.nzMode="year"}};n.\u0275fac=function(i){return new(i||n)(w(ps,9))},n.\u0275dir=Se({type:n,selectors:[["nz-year-picker"]],exportAs:["nzYearPicker"],standalone:!0});let o=n;return o})(),Hs=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[ps,yT,CT,uv]});let o=n;return o})();var gG=["okBtn"],mG=["cancelBtn"];function vG(o,n){o&1&&(C(0,"div",15),R(1,"span",16),S())}function yG(o,n){if(o&1&&(H(0),R(1,"span",18),B()),o&2){let e=n.$implicit;f(),h("nzType",e||"exclamation-circle")}}function CG(o,n){if(o&1&&(H(0),_(1,yG,2,1,"ng-container",8),C(2,"div",17),Y(3),S(),B()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzIcon),f(2),ye(e.nzTitle)}}function _G(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzCancelText)}}function SG(o,n){o&1&&(H(0),Y(1),Xn(2,"nzI18n"),B()),o&2&&(f(),ye(Vi(2,1,"Modal.cancelText")))}function wG(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzOkText)}}function bG(o,n){o&1&&(H(0),Y(1),Xn(2,"nzI18n"),B()),o&2&&(f(),ye(Vi(2,1,"Modal.okText")))}function TG(o,n){if(o&1){let e=Q();C(0,"div",2)(1,"div",3),_(2,vG,2,0,"div",4),C(3,"div",5)(4,"div")(5,"div",6)(6,"div",7),_(7,CG,4,2,"ng-container",8),S(),C(8,"div",9)(9,"button",10,11),A("click",function(){I(e);let i=m();return P(i.onCancel())}),_(11,_G,2,1,"ng-container",12)(12,SG,3,3,"ng-container",12),S(),C(13,"button",13,14),A("click",function(){I(e);let i=m();return P(i.onConfirm())}),_(15,wG,2,1,"ng-container",12)(16,bG,3,3,"ng-container",12),S()()()()()()()}if(o&2){let e=m();k("ant-popover-rtl",e.dir==="rtl"),h("cdkTrapFocusAutoCapture",e.nzAutoFocus!==null)("ngClass",e._classMap)("ngStyle",e.nzOverlayStyle)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),f(2),h("ngIf",e.nzPopconfirmShowArrow),f(5),h("nzStringTemplateOutlet",e.nzTitle),f(2),h("nzSize","small"),ze("cdkFocusInitial",e.nzAutoFocus==="cancel"||null),f(2),h("ngIf",e.nzCancelText),f(),h("ngIf",!e.nzCancelText),f(),h("nzSize","small")("nzType",e.nzOkType!=="danger"?e.nzOkType:"primary")("nzDanger",e.nzOkDanger||e.nzOkType==="danger")("nzLoading",e.confirmLoading),ze("cdkFocusInitial",e.nzAutoFocus==="ok"||null),f(2),h("ngIf",e.nzOkText),f(),h("ngIf",!e.nzOkText)}}var EG="popconfirm",bT=(()=>{let n=class n extends Su{getProxyPropertyMap(){return V({nzOkText:["nzOkText",()=>this.nzOkText],nzOkType:["nzOkType",()=>this.nzOkType],nzOkDanger:["nzOkDanger",()=>this.nzOkDanger],nzCancelText:["nzCancelText",()=>this.nzCancelText],nzBeforeConfirm:["nzBeforeConfirm",()=>this.nzBeforeConfirm],nzCondition:["nzCondition",()=>this.nzCondition],nzIcon:["nzIcon",()=>this.nzIcon],nzPopconfirmShowArrow:["nzPopconfirmShowArrow",()=>this.nzPopconfirmShowArrow],nzPopconfirmBackdrop:["nzBackdrop",()=>this.nzPopconfirmBackdrop],nzAutoFocus:["nzAutoFocus",()=>this.nzAutofocus]},super.getProxyPropertyMap())}constructor(t,i,r,s,a){super(t,i,r,s,a),this._nzModuleName=EG,this.trigger="click",this.placement="top",this.nzCondition=!1,this.nzPopconfirmShowArrow=!0,this.nzPopconfirmBackdrop=!1,this.nzAutofocus=null,this.visibleChange=new O,this.nzOnCancel=new O,this.nzOnConfirm=new O,this.componentRef=this.hostView.createComponent(TT)}createComponent(){super.createComponent(),this.component.nzOnCancel.pipe(F(this.destroy$)).subscribe(()=>{this.nzOnCancel.emit()}),this.component.nzOnConfirm.pipe(F(this.destroy$)).subscribe(()=>{this.nzOnConfirm.emit()})}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft,9),w(st))},n.\u0275dir=Se({type:n,selectors:[["","nz-popconfirm",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-popover-open",r.visible)},inputs:{arrowPointAtCenter:[le.None,"nzPopconfirmArrowPointAtCenter","arrowPointAtCenter"],title:[le.None,"nzPopconfirmTitle","title"],directiveTitle:[le.None,"nz-popconfirm","directiveTitle"],trigger:[le.None,"nzPopconfirmTrigger","trigger"],placement:[le.None,"nzPopconfirmPlacement","placement"],origin:[le.None,"nzPopconfirmOrigin","origin"],mouseEnterDelay:[le.None,"nzPopconfirmMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[le.None,"nzPopconfirmMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[le.None,"nzPopconfirmOverlayClassName","overlayClassName"],overlayStyle:[le.None,"nzPopconfirmOverlayStyle","overlayStyle"],visible:[le.None,"nzPopconfirmVisible","visible"],nzOkText:"nzOkText",nzOkType:"nzOkType",nzOkDanger:"nzOkDanger",nzCancelText:"nzCancelText",nzBeforeConfirm:"nzBeforeConfirm",nzIcon:"nzIcon",nzCondition:"nzCondition",nzPopconfirmShowArrow:"nzPopconfirmShowArrow",nzPopconfirmBackdrop:"nzPopconfirmBackdrop",nzAutofocus:"nzAutofocus"},outputs:{visibleChange:"nzPopconfirmVisibleChange",nzOnCancel:"nzOnCancel",nzOnConfirm:"nzOnConfirm"},exportAs:["nzPopconfirm"],standalone:!0,features:[Xe]});let o=n;return N([W()],o.prototype,"arrowPointAtCenter",void 0),N([W()],o.prototype,"nzOkDanger",void 0),N([W()],o.prototype,"nzCondition",void 0),N([W()],o.prototype,"nzPopconfirmShowArrow",void 0),N([De()],o.prototype,"nzPopconfirmBackdrop",void 0),N([De()],o.prototype,"nzAutofocus",void 0),o})(),TT=(()=>{let n=class n extends Ql{constructor(t,i,r,s,a){super(t,r,a),this.elementRef=i,this.nzCondition=!1,this.nzPopconfirmShowArrow=!0,this.nzOkType="primary",this.nzOkDanger=!1,this.nzAutoFocus=null,this.nzBeforeConfirm=null,this.nzOnCancel=new J,this.nzOnConfirm=new J,this._trigger="click",this.elementFocusedBeforeModalWasOpened=null,this._prefix="ant-popover",this.confirmLoading=!1,this.document=s}ngOnDestroy(){super.ngOnDestroy(),this.nzOnCancel.complete(),this.nzOnConfirm.complete()}show(){this.nzCondition?this.onConfirm():(this.capturePreviouslyFocusedElement(),super.show())}hide(){super.hide(),this.restoreFocus()}handleConfirm(){this.nzOnConfirm.next(),super.hide()}onCancel(){this.nzOnCancel.next(),super.hide()}onConfirm(){if(this.nzBeforeConfirm){let t=mp(this.nzBeforeConfirm()).pipe(xl());this.confirmLoading=!0,t.pipe(El(()=>{this.confirmLoading=!1,this.cdr.markForCheck()}),F(this.nzVisibleChange),F(this.destroy$)).subscribe(i=>{i&&this.handleConfirm()})}else this.handleConfirm()}capturePreviouslyFocusedElement(){this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement)}restoreFocus(){let t=this.elementFocusedBeforeModalWasOpened;if(t&&typeof t.focus=="function"){let i=this.document.activeElement,r=this.elementRef.nativeElement;(!i||i===this.document.body||i===r||r.contains(i))&&t.focus()}}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(de),w(Me,8),w(gi,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-popconfirm"]],viewQuery:function(i,r){if(i&1&&(xe(gG,5,de),xe(mG,5,de)),i&2){let s;ce(s=ue())&&(r.okBtn=s),ce(s=ue())&&(r.cancelBtn=s)}},exportAs:["nzPopconfirmComponent"],standalone:!0,features:[Xe,K],decls:2,vars:6,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],["cdkTrapFocus","",1,"ant-popover",3,"cdkTrapFocusAutoCapture","ngClass","ngStyle","nzNoAnimation"],[1,"ant-popover-content"],["class","ant-popover-arrow",4,"ngIf"],[1,"ant-popover-inner"],[1,"ant-popover-inner-content"],[1,"ant-popover-message"],[4,"nzStringTemplateOutlet"],[1,"ant-popover-buttons"],["nz-button","",3,"nzSize","click"],["cancelBtn",""],[4,"ngIf"],["nz-button","",3,"nzSize","nzType","nzDanger","nzLoading","click"],["okBtn",""],[1,"ant-popover-arrow"],[1,"ant-popover-arrow-content"],[1,"ant-popover-message-title"],["nz-icon","","nzTheme","fill",3,"nzType"]],template:function(i,r){i&1&&(_(0,TG,17,21,"ng-template",0,1,_e),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.hide()})("positionChange",function(a){return r.onPositionChange(a)})),i&2&&h("cdkConnectedOverlayHasBackdrop",r.nzBackdrop)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayOpen",r._visible)("cdkConnectedOverlayPush",r.cdkConnectedOverlayPush)("nzArrowPointAtCenter",r.nzArrowPointAtCenter)},dependencies:[Fr,oi,vr,Nr,Cp,tw,St,Zt,ft,we,Ye,Ue,Ge,Fe,Hi,eo,yi,hr,bp,wp],encapsulation:2,data:{animation:[Is]},changeDetection:0});let o=n;return o})(),rc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[TT]});let o=n;return o})();function xG(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzText)}}function zG(o,n){if(o&1&&(C(0,"span",1),_(1,xG,2,1,"ng-container",2),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzText)}}var pv=(()=>{let n=class n{constructor(){this.nzType="horizontal",this.nzOrientation="center",this.nzDashed=!1,this.nzPlain=!1}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-divider"]],hostAttrs:[1,"ant-divider"],hostVars:16,hostBindings:function(i,r){i&2&&k("ant-divider-horizontal",r.nzType==="horizontal")("ant-divider-vertical",r.nzType==="vertical")("ant-divider-with-text",r.nzText)("ant-divider-plain",r.nzPlain)("ant-divider-with-text-left",r.nzText&&r.nzOrientation==="left")("ant-divider-with-text-right",r.nzText&&r.nzOrientation==="right")("ant-divider-with-text-center",r.nzText&&r.nzOrientation==="center")("ant-divider-dashed",r.nzDashed)},inputs:{nzText:"nzText",nzType:"nzType",nzOrientation:"nzOrientation",nzDashed:"nzDashed",nzPlain:"nzPlain"},exportAs:["nzDivider"],standalone:!0,features:[K],decls:1,vars:1,consts:[["class","ant-divider-inner-text",4,"ngIf"],[1,"ant-divider-inner-text"],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&_(0,zG,2,1,"span",0),i&2&&h("ngIf",r.nzText)},dependencies:[we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzDashed",void 0),N([W()],o.prototype,"nzPlain",void 0),o})(),oc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[pv]});let o=n;return o})();function zT(o){if(!o)return!1;for(var n=0,e=o.length;n=194&&o[n]<=223)if(o[n+1]>>6===2){n+=2;continue}else return!1;if((o[n]===224&&o[n+1]>=160&&o[n+1]<=191||o[n]===237&&o[n+1]>=128&&o[n+1]<=159)&&o[n+2]>>6===2){n+=3;continue}if((o[n]>=225&&o[n]<=236||o[n]>=238&&o[n]<=239)&&o[n+1]>>6===2&&o[n+2]>>6===2){n+=3;continue}if((o[n]===240&&o[n+1]>=144&&o[n+1]<=191||o[n]>=241&&o[n]<=243&&o[n+1]>>6===2||o[n]===244&&o[n+1]>=128&&o[n+1]<=143)&&o[n+2]>>6===2&&o[n+3]>>6===2){n+=4;continue}return!1}return!0}function OG(o,n){return(e,t,i)=>{let r=i.value;return i.value=function(...s){let l=this[n?.ngZoneName||"ngZone"];if(!l)return r.call(this,...s);let c;return l[o](()=>{c=r.call(this,...s)}),c},i}}function hv(o){return OG("runOutsideAngular",o)}var OT=(()=>{let n=class n{constructor(t){this.http=ae(NS),this.lazy=ae(HS),this.ngZone=ae($e),this.cog=t.merge("xlsx",{url:"https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js",modules:["https://cdn.jsdelivr.net/npm/xlsx/dist/cpexcel.js"]})}init(){return typeof XLSX<"u"?Promise.resolve([]):this.lazy.load([this.cog.url].concat(this.cog.modules))}read(t){let{read:i,utils:{sheet_to_json:r}}=XLSX,s={},a=new Uint8Array(t),l="array";if(!zT(a))try{t=cptable.utils.decode(936,a),l="string"}catch{}let c=i(t,{type:l});return c.SheetNames.forEach(u=>{let d=c.Sheets[u];s[u]=r(d,{header:1})}),s}import(t){return new Promise((i,r)=>{let s=a=>this.ngZone.run(()=>i(this.read(a)));this.init().then(()=>{if(typeof t=="string"){this.http.request("GET",t,{responseType:"arraybuffer"}).subscribe({next:l=>s(new Uint8Array(l)),error:l=>r(l)});return}let a=new FileReader;a.onload=l=>s(l.target.result),a.onerror=l=>r(l),a.readAsArrayBuffer(t)}).catch(()=>r("Unable to load xlsx.js"))})}export(t){return xo(this,null,function*(){return new Promise((i,r)=>{this.init().then(()=>{t=V({format:"xlsx"},t);let{writeFile:s,utils:{book_new:a,aoa_to_sheet:l,book_append_sheet:c}}=XLSX,u=a();Array.isArray(t.sheets)?t.sheets.forEach((p,g)=>{let v=l(p.data);c(u,v,p.name||`Sheet${g+1}`)}):(u.SheetNames=Object.keys(t.sheets),u.Sheets=t.sheets),t.callback&&t.callback(u);let d=t.filename||`export.${t.format}`;s(u,d,V({bookType:t.format,bookSST:!1,type:"array"},t.opts)),i({filename:d,wb:u})}).catch(s=>r(s))})})}numberToSchema(t){let r="";do--t,r=String.fromCharCode(65+t%26)+r,t=t/26>>0;while(t>0);return r}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return N([hv()],o.prototype,"read",null),N([hv()],o.prototype,"export",null),o})();var fv=class{constructor(n){this.dir=n}get $implicit(){return this.dir.let}get let(){return this.dir.let}},DT=(()=>{let n=class n{constructor(t,i){t.createEmbeddedView(i,new fv(this))}static ngTemplateContextGuard(t,i){return!0}};n.\u0275fac=function(i){return new(i||n)(w(Tn),w(En))},n.\u0275dir=Se({type:n,selectors:[["","let",""]],inputs:{let:"let"},standalone:!0});let o=n;return o})();var RT=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var RG=["*"];function IT(o){return tm(o)?o.touches[0]||o.changedTouches[0]:o}var gv=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.listeners=new Map,this.handleMouseDownOutsideAngular$=new J,this.documentMouseUpOutsideAngular$=new J,this.documentMouseMoveOutsideAngular$=new J,this.mouseEnteredOutsideAngular$=new J,this.document=i}startResizing(t){let i=tm(t);this.clearListeners();let r=i?"touchmove":"mousemove",s=i?"touchend":"mouseup",a=c=>{this.documentMouseMoveOutsideAngular$.next(c)},l=c=>{this.documentMouseUpOutsideAngular$.next(c),this.clearListeners()};this.listeners.set(r,a),this.listeners.set(s,l),this.ngZone.runOutsideAngular(()=>{this.listeners.forEach((c,u)=>{this.document.addEventListener(u,c)})})}clearListeners(){this.listeners.forEach((t,i)=>{this.document.removeEventListener(i,t)}),this.listeners.clear()}ngOnDestroy(){this.handleMouseDownOutsideAngular$.complete(),this.documentMouseUpOutsideAngular$.complete(),this.documentMouseMoveOutsideAngular$.complete(),this.mouseEnteredOutsideAngular$.complete(),this.clearListeners()}};n.\u0275fac=function(i){return new(i||n)(nt($e),nt(gi))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),MT=(()=>{let n=class n{constructor(t,i,r,s,a,l){this.elementRef=t,this.renderer=i,this.nzResizableService=r,this.platform=s,this.ngZone=a,this.destroy$=l,this.nzBounds="parent",this.nzMinHeight=40,this.nzMinWidth=40,this.nzGridColumnCount=-1,this.nzMaxColumn=-1,this.nzMinColumn=-1,this.nzLockAspectRatio=!1,this.nzPreview=!1,this.nzDisabled=!1,this.nzResize=new O,this.nzResizeEnd=new O,this.nzResizeStart=new O,this.resizing=!1,this.currentHandleEvent=null,this.ghostElement=null,this.sizeCache=null,this.nzResizableService.handleMouseDownOutsideAngular$.pipe(F(this.destroy$)).subscribe(c=>{this.nzDisabled||(this.resizing=!0,this.nzResizableService.startResizing(c.mouseEvent),this.currentHandleEvent=c,this.nzResizeStart.observers.length&&this.ngZone.run(()=>this.nzResizeStart.emit({mouseEvent:c.mouseEvent,direction:c.direction})),this.elRect=this.el.getBoundingClientRect())}),this.nzResizableService.documentMouseUpOutsideAngular$.pipe(F(this.destroy$),Qe(Boolean)).subscribe(c=>{this.resizing&&(this.resizing=!1,this.nzResizableService.documentMouseUpOutsideAngular$.next(null),this.endResize(c))}),this.nzResizableService.documentMouseMoveOutsideAngular$.pipe(F(this.destroy$)).subscribe(c=>{this.resizing&&this.resize(c)})}setPosition(){let t=getComputedStyle(this.el).position;(t==="static"||!t)&&this.renderer.setStyle(this.el,"position","relative")}calcSize(t,i,r){let s,a,l,c,u=0,d=0,p=this.nzMinWidth,g=1/0,v=1/0;if(this.nzBounds==="parent"){let y=this.renderer.parentNode(this.el);if(y instanceof HTMLElement){let x=y.getBoundingClientRect();g=x.width,v=x.height}}else if(this.nzBounds==="window")typeof window<"u"&&(g=window.innerWidth,v=window.innerHeight);else if(this.nzBounds&&this.nzBounds.nativeElement&&this.nzBounds.nativeElement instanceof HTMLElement){let y=this.nzBounds.nativeElement.getBoundingClientRect();g=y.width,v=y.height}return l=im(this.nzMaxWidth,g),c=im(this.nzMaxHeight,v),this.nzGridColumnCount!==-1&&(d=l/this.nzGridColumnCount,p=this.nzMinColumn!==-1?d*this.nzMinColumn:p,l=this.nzMaxColumn!==-1?d*this.nzMaxColumn:l),r!==-1?/(left|right)/i.test(this.currentHandleEvent.direction)?(s=Math.min(Math.max(t,p),l),a=Math.min(Math.max(s/r,this.nzMinHeight),c),(a>=c||a<=this.nzMinHeight)&&(s=Math.min(Math.max(a*r,p),l))):(a=Math.min(Math.max(i,this.nzMinHeight),c),s=Math.min(Math.max(a*r,p),l),(s>=l||s<=p)&&(a=Math.min(Math.max(s/r,this.nzMinHeight),c))):(s=Math.min(Math.max(t,p),l),a=Math.min(Math.max(i,this.nzMinHeight),c)),this.nzGridColumnCount!==-1&&(u=Math.round(s/d),s=u*d),{col:u,width:s,height:a}}resize(t){let i=this.elRect,r=IT(t),s=IT(this.currentHandleEvent.mouseEvent),a=i.width,l=i.height,c=this.nzLockAspectRatio?a/l:-1;switch(this.currentHandleEvent.direction){case"bottomRight":a=r.clientX-i.left,l=r.clientY-i.top;break;case"bottomLeft":a=i.width+s.clientX-r.clientX,l=r.clientY-i.top;break;case"topRight":a=r.clientX-i.left,l=i.height+s.clientY-r.clientY;break;case"topLeft":a=i.width+s.clientX-r.clientX,l=i.height+s.clientY-r.clientY;break;case"top":l=i.height+s.clientY-r.clientY;break;case"right":a=r.clientX-i.left;break;case"bottom":l=r.clientY-i.top;break;case"left":a=i.width+s.clientX-r.clientX}let u=this.calcSize(a,l,c);this.sizeCache=V({},u),this.nzResize.observers.length&&this.ngZone.run(()=>{this.nzResize.emit(ot(V({},u),{mouseEvent:t,direction:this.currentHandleEvent.direction}))}),this.nzPreview&&this.previewResize(u)}endResize(t){this.removeGhostElement();let i=this.sizeCache?V({},this.sizeCache):{width:this.elRect.width,height:this.elRect.height};this.nzResizeEnd.observers.length&&this.ngZone.run(()=>{this.nzResizeEnd.emit(ot(V({},i),{mouseEvent:t,direction:this.currentHandleEvent.direction}))}),this.sizeCache=null,this.currentHandleEvent=null}previewResize({width:t,height:i}){this.createGhostElement(),this.renderer.setStyle(this.ghostElement,"width",`${t}px`),this.renderer.setStyle(this.ghostElement,"height",`${i}px`)}createGhostElement(){this.ghostElement||(this.ghostElement=this.renderer.createElement("div"),this.renderer.setAttribute(this.ghostElement,"class","nz-resizable-preview")),this.renderer.appendChild(this.el,this.ghostElement)}removeGhostElement(){this.ghostElement&&this.renderer.removeChild(this.el,this.ghostElement)}ngAfterViewInit(){this.platform.isBrowser&&(this.el=this.elementRef.nativeElement,this.setPosition(),this.ngZone.runOutsideAngular(()=>{Ke(this.el,"mouseenter").pipe(F(this.destroy$)).subscribe(()=>{this.nzResizableService.mouseEnteredOutsideAngular$.next(!0)}),Ke(this.el,"mouseleave").pipe(F(this.destroy$)).subscribe(()=>{this.nzResizableService.mouseEnteredOutsideAngular$.next(!1)})}))}ngOnDestroy(){this.ghostElement=null,this.sizeCache=null}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(gv),w(gn),w($e),w(Pt))},n.\u0275dir=Se({type:n,selectors:[["","nz-resizable",""]],hostAttrs:[1,"nz-resizable"],hostVars:4,hostBindings:function(i,r){i&2&&k("nz-resizable-resizing",r.resizing)("nz-resizable-disabled",r.nzDisabled)},inputs:{nzBounds:"nzBounds",nzMaxHeight:"nzMaxHeight",nzMaxWidth:"nzMaxWidth",nzMinHeight:"nzMinHeight",nzMinWidth:"nzMinWidth",nzGridColumnCount:"nzGridColumnCount",nzMaxColumn:"nzMaxColumn",nzMinColumn:"nzMinColumn",nzLockAspectRatio:"nzLockAspectRatio",nzPreview:"nzPreview",nzDisabled:"nzDisabled"},outputs:{nzResize:"nzResize",nzResizeEnd:"nzResizeEnd",nzResizeStart:"nzResizeStart"},exportAs:["nzResizable"],standalone:!0,features:[Ve([gv,Pt])]});let o=n;return N([W()],o.prototype,"nzLockAspectRatio",void 0),N([W()],o.prototype,"nzPreview",void 0),N([W()],o.prototype,"nzDisabled",void 0),o})(),mv=class{constructor(n,e){this.direction=n,this.mouseEvent=e}},PT=BS({passive:!0}),FT=(()=>{let n=class n{constructor(t,i,r,s,a){this.ngZone=t,this.nzResizableService=i,this.renderer=r,this.host=s,this.destroy$=a,this.nzDirection="bottomRight",this.nzCursorType="window",this.nzMouseDown=new O}ngOnInit(){this.nzResizableService.mouseEnteredOutsideAngular$.pipe(F(this.destroy$)).subscribe(t=>{t?this.renderer.addClass(this.host.nativeElement,"nz-resizable-handle-box-hover"):this.renderer.removeClass(this.host.nativeElement,"nz-resizable-handle-box-hover")}),this.ngZone.runOutsideAngular(()=>{_t(Ke(this.host.nativeElement,"mousedown",PT),Ke(this.host.nativeElement,"touchstart",PT)).pipe(F(this.destroy$)).subscribe(t=>{this.nzResizableService.handleMouseDownOutsideAngular$.next(new mv(this.nzDirection,t))})})}onPointerDown(t){t.target.setPointerCapture(t.pointerId)}onPointerUp(t){t.target.releasePointerCapture(t.pointerId)}};n.\u0275fac=function(i){return new(i||n)(w($e),w(gv),w(He),w(de),w(Pt))},n.\u0275cmp=j({type:n,selectors:[["nz-resize-handle"],["","nz-resize-handle",""]],hostAttrs:[1,"nz-resizable-handle"],hostVars:20,hostBindings:function(i,r){i&1&&A("pointerdown",function(a){return r.onPointerDown(a)})("pointerup",function(a){return r.onPointerUp(a)}),i&2&&k("nz-resizable-handle-top",r.nzDirection==="top")("nz-resizable-handle-right",r.nzDirection==="right")("nz-resizable-handle-bottom",r.nzDirection==="bottom")("nz-resizable-handle-left",r.nzDirection==="left")("nz-resizable-handle-topRight",r.nzDirection==="topRight")("nz-resizable-handle-bottomRight",r.nzDirection==="bottomRight")("nz-resizable-handle-bottomLeft",r.nzDirection==="bottomLeft")("nz-resizable-handle-topLeft",r.nzDirection==="topLeft")("nz-resizable-handle-cursor-type-grid",r.nzCursorType==="grid")("nz-resizable-handle-cursor-type-window",r.nzCursorType==="window")},inputs:{nzDirection:"nzDirection",nzCursorType:"nzCursorType"},outputs:{nzMouseDown:"nzMouseDown"},exportAs:["nzResizeHandle"],standalone:!0,features:[Ve([Pt]),K],ngContentSelectors:RG,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})();var AT=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();function MG(o,n){if(o&1){let e=Q();C(0,"div",5)(1,"input",6),A("ngModelChange",function(i){I(e);let r=m();return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.n.emit(i))})("keyup.enter",function(){I(e);let i=m();return P(i.confirm())}),S()()}if(o&2){let e=m();f(),h("ngModel",e.f.menus[0].value),ze("placeholder",e.f.placeholder)}}function FG(o,n){if(o&1){let e=Q();C(0,"div",7)(1,"nz-input-number",8),A("ngModelChange",function(i){I(e);let r=m();return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m();return P(r.n.emit(i))}),S()()}if(o&2){let e=m();f(),h("ngModel",e.f.menus[0].value)("nzMin",e.f.number.min)("nzMax",e.f.number.max)("nzStep",e.f.number.step)("nzPrecision",e.f.number.precision)("nzPlaceHolder",e.f.placeholder)}}function AG(o,n){if(o&1){let e=Q();C(0,"nz-range-picker",11),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m(2);return P(r.n.emit(i))}),S()}if(o&2){let e=m(2);h("nzMode",e.f.date.mode)("ngModel",e.f.menus[0].value)("nzShowNow",e.f.date.showNow)("nzShowToday",e.f.date.showToday)("nzDisabledDate",e.f.date.disabledDate)("nzDisabledTime",e.f.date.disabledTime)}}function NG(o,n){if(o&1){let e=Q();C(0,"nz-date-picker",11),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.f.menus[0].value=i)})("ngModelChange",function(i){I(e);let r=m(2);return P(r.n.emit(i))}),S()}if(o&2){let e=m(2);h("nzMode",e.f.date.mode)("ngModel",e.f.menus[0].value)("nzShowNow",e.f.date.showNow)("nzShowToday",e.f.date.showToday)("nzDisabledDate",e.f.date.disabledDate)("nzDisabledTime",e.f.date.disabledTime)}}function LG(o,n){if(o&1&&(C(0,"div",9),_(1,AG,1,6,"nz-range-picker",10)(2,NG,1,6),S()),o&2){let e=m();f(),ie(1,e.f.date.range?1:2)}}function kG(o,n){}var VG=(o,n,e)=>({$implicit:o,col:n,handle:e});function GG(o,n){if(o&1&&(C(0,"div",12),_(1,kG,0,0,"ng-template",13),S()),o&2){let e=m();f(),h("ngTemplateOutlet",e.f.custom)("ngTemplateOutletContext",iu(2,VG,e.f,e.col,e))}}function HG(o,n){if(o&1){let e=Q();C(0,"label",17),A("ngModelChange",function(i){I(e);let r=m().$implicit;return P(r.checked=i)})("ngModelChange",function(){I(e);let i=m(3);return P(i.checkboxChange())}),Y(1),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked),f(),Ne(" ",e.text," ")}}function BG(o,n){if(o&1){let e=Q();C(0,"label",18),A("ngModelChange",function(){I(e);let i=m().$implicit,r=m(2);return P(r.radioChange(i))}),Y(1),S()}if(o&2){let e=m().$implicit;h("ngModel",e.checked),f(),Ne(" ",e.text," ")}}function $G(o,n){if(o&1&&(C(0,"li",15),_(1,HG,2,2,"label",16)(2,BG,2,2),S()),o&2){let e=m(2);f(),ie(1,e.f.multiple?1:2)}}function jG(o,n){if(o&1&&(C(0,"ul",14),Cn(1,$G,3,1,"li",15,yn),S()),o&2){let e=m();f(),_n(e.f.menus)}}function WG(o,n){if(o&1){let e=Q();C(0,"div",19)(1,"a",20),A("click",function(){I(e);let i=m();return P(i.confirm())}),C(2,"span"),Y(3),S()(),C(4,"a",21),A("click",function(){I(e);let i=m();return P(i.reset())}),C(5,"span"),Y(6),S()()()}if(o&2){let e=m();f(3),ye(e.f.confirmText||e.locale.filterConfirm),f(3),ye(e.f.clearText||e.locale.filterReset)}}var UG=["table"],KG=["contextmenuTpl"];function qG(o,n){if(o&1&&R(0,"small",14),o&2){let e=m().$implicit;h("innerHTML",e.optional,Dt)}}function YG(o,n){if(o&1&&R(0,"i",15),o&2){let e=m().$implicit;h("nzTooltipTitle",e.optionalHelp)}}function QG(o,n){if(o&1&&(R(0,"span",11),_(1,qG,1,1,"small",12)(2,YG,1,1,"i",13)),o&2){let e=n.$implicit;h("innerHTML",e._text,Dt),f(),ie(1,e.optional?1:-1),f(),ie(2,e.optionalHelp?2:-1)}}function XG(o,n){if(o&1){let e=Q();C(0,"label",16),A("ngModelChange",function(i){I(e);let r=m();return P(r._allChecked=i)})("ngModelChange",function(){I(e);let i=m();return P(i.checkAll())}),S()}if(o&2){let e=n.$implicit,t=m();k("ant-table-selection-select-all-custom",e),h("nzDisabled",t._allCheckedDisabled)("ngModel",t._allChecked)("nzIndeterminate",t._indeterminate)}}function ZG(o,n){if(o&1&&R(0,"th",17),o&2){let e=m(3);h("rowSpan",e._headers.length)}}function JG(o,n){o&1&&(C(0,"nz-resize-handle",20),R(1,"i"),S())}function eH(o,n){}var yh=(o,n)=>({$implicit:o,index:n});function tH(o,n){if(o&1&&_(0,eH,0,0,"ng-template",5),o&2){let e=m().let,t=m(),i=t.$implicit,r=t.$index;h("ngTemplateOutlet",e.__renderTitle)("ngTemplateOutletContext",ri(2,yh,i.column,r))}}function nH(o,n){}var iH=()=>({$implicit:!1});function rH(o,n){if(o&1&&_(0,nH,0,0,"ng-template",5),o&2){m(7);let e=te(3);h("ngTemplateOutlet",e)("ngTemplateOutletContext",ii(2,iH))}}function oH(o,n){}function sH(o,n){if(o&1&&(C(0,"div",26)(1,"div",27),R(2,"i",28),S()()),o&2){m();let e=te(4);f(),h("nzDropdownMenu",e)}}function aH(o,n){if(o&1){let e=Q();C(0,"li",29),A("click",function(){let r=I(e).$implicit,s=m(8);return P(s._rowSelection(r))}),S()}if(o&2){let e=n.$implicit;h("innerHTML",e.text,Dt)}}var lH=()=>({$implicit:!0});function cH(o,n){if(o&1&&(C(0,"div",22),_(1,oH,0,0,"ng-template",5)(2,sH,3,1,"div",23),C(3,"nz-dropdown-menu",null,24)(5,"ul",25),Cn(6,aH,1,1,"li",30,yn),S()()()),o&2){let e=m(3).let;m(4);let t=te(3);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",ii(3,lH)),f(),ie(2,e.selections.length?2:-1),f(4),_n(e.selections)}}function uH(o,n){if(o&1&&_(0,rH,1,3,null,5)(1,cH,8,4),o&2){let e=m(2).let;ie(0,e.selections.length===0?0:1)}}function dH(o,n){}var Bs=o=>({$implicit:o});function pH(o,n){if(o&1&&_(0,dH,0,0,"ng-template",5),o&2){let e=m(2).let;m(4);let t=te(1);h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,Bs,e.title))}}function hH(o,n){if(o&1&&_(0,uH,2,1)(1,pH,1,4),o&2){let e=m().let,t;ie(0,(t=e.type)==="checkbox"?0:1)}}function fH(o,n){if(o&1){let e=Q();C(0,"st-filter",31),A("n",function(i){I(e);let r=m(5);return P(r.handleFilterNotify(i))})("handle",function(i){I(e);let r=m().let,s=m(4);return P(s._handleFilter(r,i))}),S()}if(o&2){let e=m().let,t=m().$implicit,i=m(3);h("col",t.column)("f",e.filter)("locale",i.locale)}}function gH(o,n){if(o&1){let e=Q();C(0,"th",19),A("nzSortOrderChange",function(i){let s=I(e).let,a=m().$index,l=m(3);return P(l.sort(s,a,i))})("nzResizeEnd",function(i){let s=I(e).let,a=m(4);return P(a.colResize(i,s))}),_(1,JG,2,0,"nz-resize-handle",20)(2,tH,1,5,null,5)(3,hH,2,1)(4,fH,1,3,"st-filter",21),S()}if(o&2){let e=n.let,t=m(),i=t.$implicit,r=t.$index,s=t.$count,a=t.$index;k("st__has-filter",e.filter),h("colSpan",i.colSpan)("rowSpan",i.rowSpan)("nzWidth",e.width)("nzLeft",e._left)("nzRight",e._right)("ngClass",e._className)("nzShowSort",e._sort.enabled)("nzSortOrder",e._sort.default)("nzCustomFilter",!!e.filter)("nzDisabled",r===s-1||e.resizable.disabled)("nzMaxWidth",e.resizable.maxWidth)("nzMinWidth",e.resizable.minWidth)("nzBounds",e.resizable.bounds)("nzPreview",e.resizable.preview),ze("data-col",e.indexKey)("data-col-index",a),f(),ie(1,r!==s-1&&!e.resizable.disabled?1:-1),f(),ie(2,e.__renderTitle?2:3),f(2),ie(4,e.filter?4:-1)}}function mH(o,n){if(o&1&&_(0,gH,5,21,"th",18),o&2){let e=n.$implicit;h("let",e.column)}}function vH(o,n){if(o&1&&(C(0,"tr"),_(1,ZG,1,1,"th",17),Cn(2,mH,1,1,"th",32,yn),S()),o&2){let e=n.$implicit,t=n.$index,i=m(2);f(),ie(1,t===0&&i.expand?1:-1),f(),_n(e)}}function yH(o,n){if(o&1&&(C(0,"thead"),Cn(1,vH,4,1,"tr",null,yn),S()),o&2){let e=m();f(),_n(e._headers)}}function CH(o,n){}function _H(o,n){if(o&1&&_(0,CH,0,0,"ng-template",5),o&2){let e=m();h("ngTemplateOutlet",e.bodyHeader)("ngTemplateOutletContext",yt(2,Bs,e._statistical))}}function SH(o,n){if(o&1){let e=Q();C(0,"td",36),A("nzExpandChange",function(i){I(e);let r=m().$implicit,s=m();return P(s._expandChange(r,i))})("click",function(i){I(e);let r=m(2);return P(r._stopPropagation(i))}),S()}if(o&2){let e=m().$implicit,t=m();h("nzShowExpand",t.expand&&e.showExpand!==!1)("nzExpand",e.expand)}}function wH(o,n){}function bH(o,n){if(o&1&&(C(0,"span",40),_(1,wH,0,0,"ng-template",5),S()),o&2){let e=m(2).$implicit;m(2);let t=te(1);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,Bs,e.title))}}function TH(o,n){if(o&1){let e=Q();C(0,"td",37),_(1,bH,2,4,"span",38),C(2,"st-td",39),A("n",function(i){I(e);let r=m(3);return P(r._handleTd(i))}),S()()}if(o&2){let e=m(),t=e.$implicit,i=e.$index,r=m(),s=r.$implicit,a=r.index,l=m();h("nzLeft",!!t._left)("nzRight",!!t._right)("ngClass",t._className),ze("data-col-index",i)("colspan",(s._values[i].props==null?null:s._values[i].props.colSpan)===1||s._values[i].props==null?null:s._values[i].props.colSpan)("rowspan",(s._values[i].props==null?null:s._values[i].props.rowSpan)===1||s._values[i].props==null?null:s._values[i].props.rowSpan),f(),ie(1,l.responsive?1:-1),f(),h("data",l._data)("i",s)("index",a)("c",t)("cIdx",i)}}function EH(o,n){if(o&1&&_(0,TH,3,12,"td",37),o&2){let e=n.$index,t=m().$implicit;ie(0,(t._values[e].props==null?null:t._values[e].props.colSpan)>0&&(t._values[e].props==null?null:t._values[e].props.rowSpan)>0?0:-1)}}function xH(o,n){}function zH(o,n){if(o&1){let e=Q();C(0,"tr",33),A("click",function(i){let r=I(e),s=r.$implicit,a=r.index,l=m();return P(l._rowClick(i,s,a,!1))})("dblclick",function(i){let r=I(e),s=r.$implicit,a=r.index,l=m();return P(l._rowClick(i,s,a,!0))}),_(1,SH,1,2,"td",34),Cn(2,EH,1,1,null,null,yn),S(),C(4,"tr",35),_(5,xH,0,0,"ng-template",5),S()}if(o&2){let e=n.$implicit,t=n.index,i=m();h("ngClass",e._rowClassName),ze("data-index",t),f(),ie(1,i.expand?1:-1),f(),_n(i._columns),f(2),h("nzExpand",e.expand),f(),h("ngTemplateOutlet",i.expand)("ngTemplateOutletContext",ri(6,yh,e,t))}}function OH(o,n){}function DH(o,n){if(o&1&&_(0,OH,0,0,"ng-template",5),o&2){let e=n.$implicit,t=n.index;m(2);let i=te(10);h("ngTemplateOutlet",i)("ngTemplateOutletContext",ri(2,yh,e,t))}}function RH(o,n){o&1&&_(0,DH,1,5,"ng-template",7)}function IH(o,n){}function PH(o,n){if(o&1&&_(0,IH,0,0,"ng-template",5),o&2){let e=n.$implicit,t=n.$index;m(2);let i=te(10);h("ngTemplateOutlet",i)("ngTemplateOutletContext",ri(2,yh,e,t))}}function MH(o,n){if(o&1&&Cn(0,PH,1,5,null,5,yn),o&2){let e=m();_n(e._data)}}function FH(o,n){}function AH(o,n){if(o&1&&_(0,FH,0,0,"ng-template",5),o&2){let e=m();h("ngTemplateOutlet",e.body)("ngTemplateOutletContext",yt(2,Bs,e._statistical))}}function NH(o,n){if(o&1&&Y(0),o&2){let e=n.range,t=n.$implicit,i=m();ye(i.renderTotal(t,e))}}function LH(o,n){if(o&1){let e=Q();C(0,"li",29),A("click",function(){I(e);let i=m().$implicit;return P(i.fn(i))}),S()}if(o&2){let e=m().$implicit;h("innerHTML",e.text,Dt)}}function kH(o,n){if(o&1){let e=Q();C(0,"li",29),A("click",function(){let r=I(e).$implicit;return P(r.fn(r))}),S()}if(o&2){let e=n.$implicit;h("innerHTML",e.text,Dt)}}function VH(o,n){if(o&1&&(C(0,"li",41)(1,"ul"),Cn(2,kH,1,1,"li",30,yn),S()()),o&2){let e=m().$implicit;h("nzTitle",e.text),f(2),_n(e.children)}}function GH(o,n){if(o&1&&_(0,LH,1,1,"li",30)(1,VH,4,1),o&2){let e=n.$implicit;ie(0,e.children.length===0?0:1)}}function HH(o,n){}function BH(o,n){if(o&1&&(C(0,"span",5),_(1,HH,0,0,"ng-template",3),S()),o&2){let e=m(),t=e.child,i=e.$implicit;m();let r=te(3);k("d-block",t)("width-100",t),h("nzTooltipTitle",i.tooltip),f(),h("ngTemplateOutlet",r)("ngTemplateOutletContext",yt(7,Bs,i))}}function $H(o,n){}function jH(o,n){if(o&1&&_(0,$H,0,0,"ng-template",3),o&2){let e=m().$implicit;m();let t=te(3);h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,Bs,e))}}function WH(o,n){if(o&1&&_(0,BH,2,9,"span",4)(1,jH,1,4),o&2){let e=n.$implicit;ie(0,e.tooltip?0:1)}}function UH(o,n){}function KH(o,n){if(o&1){let e=Q();C(0,"a",7),A("nzOnConfirm",function(){I(e);let i=m().$implicit,r=m();return P(r._btn(i))})("click",function(i){I(e);let r=m(2);return P(r._stopPropagation(i))}),_(1,UH,0,0,"ng-template",3),S()}if(o&2){let e=m().$implicit;m();let t=te(5);h("nzPopconfirmTitle",e.pop.title)("nzIcon",e.pop.icon)("nzCondition",e.pop.condition(e))("nzCancelText",e.pop.cancelText)("nzOkText",e.pop.okText)("nzOkType",e.pop.okType)("ngClass",e._className),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(9,Bs,e))}}function qH(o,n){}function YH(o,n){if(o&1){let e=Q();C(0,"a",8),A("click",function(i){I(e);let r=m().$implicit,s=m();return P(s._btn(r,i))}),_(1,qH,0,0,"ng-template",3),S()}if(o&2){let e=m().$implicit;m();let t=te(5);h("ngClass",e._className),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(3,Bs,e))}}function QH(o,n){if(o&1&&_(0,KH,2,11,"a",6)(1,YH,2,5),o&2){let e=n.$implicit;ie(0,e.pop?0:1)}}function XH(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(2).$implicit;h("nzIconfont",e._icon.iconfont)}}function ZH(o,n){if(o&1&&R(0,"i",11),o&2){let e=m(2).$implicit;h("nzType",e._icon.type)("nzTheme",e._icon.theme)("nzSpin",e._icon.spin)("nzTwotoneColor",e._icon.twoToneColor)}}function JH(o,n){if(o&1&&_(0,XH,1,1,"i",10)(1,ZH,1,4),o&2){let e=m().$implicit;ie(0,e._icon.iconfont?0:1)}}var e3=o=>({"pl-xs":o});function t3(o,n){if(o&1&&(_(0,JH,2,1),R(1,"span",9)),o&2){let e=n.$implicit;ie(0,e._icon?0:-1),f(),h("innerHTML",e._text,Dt)("ngClass",yt(3,e3,e._icon))}}function n3(o,n){}var i3=(o,n,e)=>({$implicit:o,index:n,column:e});function r3(o,n){if(o&1&&_(0,n3,0,0,"ng-template",3),o&2){let e=m();h("ngTemplateOutlet",e.c.__render)("ngTemplateOutletContext",iu(2,i3,e.i,e.index,e.c))}}function o3(o,n){if(o&1){let e=Q();C(0,"label",12),A("ngModelChange",function(i){I(e);let r=m(2);return P(r._checkbox(i))}),S()}if(o&2){let e=m(2);h("nzDisabled",e.i.disabled)("ngModel",e.i.checked)}}function s3(o,n){if(o&1){let e=Q();C(0,"label",13),A("ngModelChange",function(){I(e);let i=m(2);return P(i._radio())}),S()}if(o&2){let e=m(2);h("nzDisabled",e.i.disabled)("ngModel",e.i.checked)}}function a3(o,n){if(o&1){let e=Q();C(0,"a",14),A("click",function(i){I(e);let r=m(2);return P(r._link(i))}),S()}if(o&2){let e=m(2);h("innerHTML",e.i._values[e.cIdx]._text,Dt),ze("title",e.i._values[e.cIdx].text)}}function l3(o,n){if(o&1&&(C(0,"nz-tag",15),R(1,"span",16),S()),o&2){let e=m(2);h("nzColor",e.i._values[e.cIdx].color)("nz-tooltip",e.i._values[e.cIdx].tooltip),f(),h("innerHTML",e.i._values[e.cIdx]._text,Dt)}}function c3(o,n){if(o&1&&R(0,"nz-badge",17),o&2){let e=m(2);h("nzStatus",e.i._values[e.cIdx].color)("nzText",e.i._values[e.cIdx].text)("nz-tooltip",e.i._values[e.cIdx].tooltip)}}function u3(o,n){if(o&1&&R(0,"cell",18),o&2){let e=m(2),t;h("value",e.i._values[e.cIdx].text)("options",(t=e.i._values[e.cIdx].cell)!==null&&t!==void 0?t:e.c.cell)}}function d3(o,n){}function p3(o,n){if(o&1&&_(0,d3,0,0,"ng-template",19),o&2){let e=m(2);h("record",e.i)("column",e.c)}}function h3(o,n){if(o&1&&R(0,"span",20),o&2){let e=m(3);h("innerText",e.i._values[e.cIdx]._text),ze("title",e.c._isTruncate?e.i._values[e.cIdx].text:null)}}function f3(o,n){if(o&1&&R(0,"span",16),o&2){let e=m(3);h("innerHTML",e.i._values[e.cIdx]._text,Dt),ze("title",e.c._isTruncate?e.i._values[e.cIdx].text:null)}}function g3(o,n){if(o&1&&_(0,h3,1,2,"span",20)(1,f3,1,2),o&2){let e=m(2);ie(0,e.c.safeType==="text"?0:1)}}function m3(o,n){o&1&&R(0,"li",26)}function v3(o,n){}var y3=o=>({$implicit:o,child:!0});function C3(o,n){if(o&1&&(C(0,"li",27),_(1,v3,0,0,"ng-template",3),S()),o&2){let e=m().$implicit;m(4);let t=te(1);k("st__btn-disabled",e._disabled),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(4,y3,e))}}function _3(o,n){if(o&1&&_(0,m3,1,0,"li",26)(1,C3,2,6),o&2){let e=n.$implicit;ie(0,e.type==="divider"?0:1)}}function S3(o,n){if(o&1&&(C(0,"a",22),R(1,"span",16)(2,"i",23),S(),C(3,"nz-dropdown-menu",null,24)(5,"ul",25),Cn(6,_3,2,1,null,null,yn),S()()),o&2){let e=te(4),t=m().$implicit;h("nzDropdownMenu",e),f(),h("innerHTML",t._text,Dt),f(5),_n(t.children)}}function w3(o,n){}var b3=o=>({$implicit:o,child:!1});function T3(o,n){if(o&1&&(C(0,"span"),_(1,w3,0,0,"ng-template",3),S()),o&2){let e=m().$implicit;m(2);let t=te(1);k("st__btn-disabled",e._disabled),f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(4,b3,e))}}function E3(o,n){o&1&&R(0,"nz-divider",21)}function x3(o,n){if(o&1&&_(0,S3,8,2)(1,T3,2,6)(2,E3,1,0,"nz-divider",21),o&2){let e=n.$implicit,t=n.$index,i=n.$count;ie(0,e.children.length>0?0:1),f(2),ie(2,t!==i-1?2:-1)}}function z3(o,n){if(o&1&&(_(0,o3,1,2)(1,s3,1,2)(2,a3,1,2)(3,l3,2,3)(4,c3,1,3)(5,u3,1,2)(6,p3,1,2)(7,g3,2,1),Cn(8,x3,3,2,null,null,yn)),o&2){let e=m(),t;ie(0,(t=e.c.type)==="checkbox"?0:t==="radio"?1:t==="link"?2:t==="tag"?3:t==="badge"?4:t==="cell"?5:t==="widget"?6:7),f(8),_n(e.i._values[e.cIdx].buttons)}}var VT=(()=>{let n=class n{constructor(){this.titles={},this.rows={}}add(t,i,r){this[t==="title"?"titles":"rows"][i]=r}getTitle(t){return this.titles[t]}getRow(t){return this.rows[t]}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var vv=(()=>{let n=class n{constructor(){this._widgets={}}get widgets(){return this._widgets}register(t,i){this._widgets[t]=i}has(t){return this._widgets.hasOwnProperty(t)}get(t){return this._widgets[t]}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),NT=(()=>{let n=class n{constructor(t,i,r,s,a){this.dom=t,this.rowSource=i,this.acl=r,this.i18nSrv=s,this.stWidgetRegistry=a}setCog(t){this.cog=t}fixPop(t,i){if(t.pop==null||t.pop===!1){t.pop=!1;return}let r=V({},i);typeof t.pop=="string"?r.title=t.pop:typeof t.pop=="object"&&(r=V(V({},r),t.pop)),typeof r.condition!="function"&&(r.condition=()=>!1),t.pop=r}btnCoerce(t){if(!t)return[];let i=[],{modal:r,drawer:s,pop:a,btnIcon:l}=this.cog;for(let c of t)this.acl&&c.acl&&!this.acl.can(c.acl)||((c.type==="modal"||c.type==="static")&&(c.modal==null||c.modal.component==null?c.type="none":c.modal=V(V({paramsName:"record",size:"lg"},r),c.modal)),c.type==="drawer"&&(c.drawer==null||c.drawer.component==null?c.type="none":c.drawer=V(V({paramsName:"record",size:"lg"},s),c.drawer)),c.type==="del"&&typeof c.pop>"u"&&(c.pop=!0),this.fixPop(c,a),typeof c.icon!="function"&&(c.icon=V(V({},l),typeof c.icon=="string"?{type:c.icon}:c.icon)),c.children=c.children&&c.children.length>0?this.btnCoerce(c.children):[],c.i18n&&this.i18nSrv&&(c.text=this.i18nSrv.fanyi(c.i18n)),i.push(c));return this.btnCoerceIf(i),i}btnCoerceIf(t){for(let i of t)i.iifBehavior=i.iifBehavior||this.cog.iifBehavior,i.children&&i.children.length>0?this.btnCoerceIf(i.children):i.children=[]}fixedCoerce(t){let i=(r,s)=>r+ +s.width.toString().replace("px","");t.filter(r=>r.fixed&&r.fixed==="left"&&r.width).forEach((r,s)=>r._left=`${t.slice(0,s).reduce(i,0)}px`),t.filter(r=>r.fixed&&r.fixed==="right"&&r.width).reverse().forEach((r,s)=>r._right=`${s>0?t.slice(-s).reduce(i,0):0}px`)}sortCoerce(t){let i=this.fixSortCoerce(t);return i.reName=V(V({},this.cog.sortReName),i.reName),i}fixSortCoerce(t){if(typeof t.sort>"u")return{enabled:!1};let i={};return typeof t.sort=="string"?i.key=t.sort:typeof t.sort!="boolean"?i=t.sort:typeof t.sort=="boolean"&&(i.compare=(r,s)=>r[t.indexKey]-s[t.indexKey]),i.key||(i.key=t.indexKey),i.enabled=!0,i}filterCoerce(t){if(t.filter==null)return null;let i=t.filter;i.type=i.type||"default",i.showOPArea=i.showOPArea!==!1;let r="filter",s="fill",a=!0,l;switch(i.type){case"keyword":r="search",s="outline";break;case"number":r="search",s="outline",i.number=V({step:1,min:-1/0,max:1/0},i.number);break;case"date":r="calendar",s="outline",i.date=V({range:!1,mode:"date",showToday:!0,showNow:!1},i.date);break;case"custom":break;default:a=!1;break}if(a&&(i.menus==null||i.menus.length===0)&&(i.menus=[{value:l}]),i.menus?.length===0)return null;typeof i.multiple>"u"&&(i.multiple=!0),i.confirmText=i.confirmText||this.cog.filterConfirmText,i.clearText=i.clearText||this.cog.filterClearText,i.key=i.key||t.indexKey,i.icon=i.icon||r;let c={type:r,theme:s};return typeof i.icon=="string"?i.icon=ot(V({},c),{type:i.icon}):i.icon=V(V({},c),i.icon),this.updateDefault(i),this.acl&&(i.menus=i.menus?.filter(u=>this.acl.can(u.acl))),i.menus?.length===0?null:i}restoreRender(t){t.renderTitle&&(t.__renderTitle=typeof t.renderTitle=="string"?this.rowSource.getTitle(t.renderTitle):t.renderTitle),t.render&&(t.__render=typeof t.render=="string"?this.rowSource.getRow(t.render):t.render)}widgetCoerce(t){t.type==="widget"&&(t.widget==null||!this.stWidgetRegistry.has(t.widget.type))&&delete t.type}genHeaders(t){let i=[],r=[],s=(l,c,u=0)=>{i[u]=i[u]||[];let d=c;return l.map(g=>{let v={column:g,colStart:d,hasSubColumns:!1},y=1,x=g.children;return Array.isArray(x)&&x.length>0?(y=s(x,d,u+1).reduce((E,z)=>E+z,0),v.hasSubColumns=!0):r.push(v.column.width||""),"colSpan"in g&&(y=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=y,v.colEnd=v.colStart+y-1,i[u].push(v),d+=y,y})};s(t,0);let a=i.length;for(let l=0;l{!("rowSpan"in c)&&!c.hasSubColumns&&(c.rowSpan=a-l)});return{headers:i,headerWidths:a>1?r:null}}cleanCond(t){let i=[],r=Jr(t);for(let s of r)typeof s.iif=="function"&&!s.iif(s)||this.acl&&s.acl&&!this.acl.can(s.acl)||(Array.isArray(s.children)&&s.children.length>0&&(s.children=this.cleanCond(s.children)),i.push(s));return i}mergeClass(t){let i=[];t._isTruncate&&i.push("text-truncate");let r=t.className;if(!r){let l={number:"text-right",currency:"text-right",date:"text-center"}[t.type];l&&i.push(l),t._className=i;return}let s=Array.isArray(r);if(!s&&typeof r=="object"){let l=r;i.forEach(c=>l[c]=!0),t._className=l;return}let a=s?Array.from(r):[r];a.splice(0,0,...i),t._className=[...new Set(a)].filter(l=>!!l)}process(t,i){if(!t||t.length===0)return{columns:[],headers:[],headerWidths:null};let{noIndex:r}=this.cog,s=0,a=0,l=0,c=[],u=g=>{g.index&&(Array.isArray(g.index)||(g.index=g.index.toString().split(".")),g.indexKey=g.index.join("."));let v=(typeof g.title=="string"?{text:g.title}:g.title)||{};return v.i18n&&this.i18nSrv&&(v.text=this.i18nSrv.fanyi(v.i18n)),v.text&&(v._text=this.dom.bypassSecurityTrustHtml(v.text)),g.title=v,g.type==="no"&&(g.noIndex=g.noIndex==null?r:g.noIndex),g.selections==null&&(g.selections=[]),g.type==="checkbox"&&(++s,g.width||(g.width=`${g.selections.length>0?62:50}px`)),this.acl&&(g.selections=g.selections.filter(y=>this.acl.can(y.acl))),g.type==="radio"&&(++a,g.selections=[],g.width||(g.width="50px")),g.cell!=null&&(g.type="cell"),g.type==="yn"&&(g.yn=V(V({truth:!0},this.cog.yn),g.yn)),g.type==="date"&&(g.dateFormat=g.dateFormat||this.cog.date?.format),(g.type==="link"&&typeof g.click!="function"||g.type==="badge"&&g.badge==null||g.type==="tag"&&g.tag==null||g.type==="enum"&&g.enum==null)&&(g.type=""),g._isTruncate=!!g.width&&i.widthMode.strictBehavior==="truncate"&&g.type!=="img",this.mergeClass(g),typeof g.width=="number"&&(g._width=g.width,g.width=`${g.width}px`),g._left=!1,g._right=!1,g.safeType=g.safeType??i.safeType,g._sort=this.sortCoerce(g),g.filter=this.filterCoerce(g),g.buttons=this.btnCoerce(g.buttons),this.widgetCoerce(g),this.restoreRender(g),g.resizable=V(V({disabled:!0,bounds:"window",minWidth:60,maxWidth:360,preview:!0},i.resizable),typeof g.resizable=="boolean"?{disabled:!g.resizable}:g.resizable),g.__point=l++,g},d=g=>{for(let v of g)c.push(u(v)),Array.isArray(v.children)&&d(v.children)},p=this.cleanCond(t);if(d(p),s>1)throw new Error("[st]: just only one column checkbox");if(a>1)throw new Error("[st]: just only one column radio");return this.fixedCoerce(c),V({columns:c.filter(g=>!Array.isArray(g.children)||g.children.length===0)},this.genHeaders(p))}restoreAllRender(t){t.forEach(i=>this.restoreRender(i))}updateDefault(t){return t.menus==null?this:(t.type==="default"?t.default=t.menus.findIndex(i=>i.checked)!==-1:t.default=!!t.menus[0].value,this)}cleanFilter(t){let i=t.filter;return i.default=!1,i.type==="default"?i.menus.forEach(r=>r.checked=!1):i.menus[0].value=void 0,this}};n.\u0275fac=function(i){return new(i||n)(nt(Ro),nt(VT,1),nt(pp,8),nt(Rs,8),nt(vv))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),LT=(()=>{let n=class n{constructor(t,i,r,s,a,l){this.http=t,this.datePipe=i,this.ynPipe=r,this.numberPipe=s,this.currencySrv=a,this.dom=l,this.sortTick=0}setCog(t){this.cog=t}process(t){let i,r=!1,{data:s,res:a,total:l,page:c,pi:u,ps:d,paginator:p,columns:g}=t,v,y,x,E,z,M=c.show;return typeof s=="string"?(r=!0,i=this.getByRemote(s,t).pipe(We(G=>{z=G;let U;if(Array.isArray(G))U=G,v=U.length,y=v,M=!1;else{let se=a.reName;if(typeof se=="function"){let ve=se(G,{pi:u,ps:d,total:l});U=ve.list,v=ve.total}else{U=ou(G,se.list,[]),(U==null||!Array.isArray(U))&&(U=[]);let ve=se.total&&ou(G,se.total,null);v=ve==null?l||0:+ve}}return Jr(U)}))):s==null||Array.isArray(s)?i=Mn(s??[]):i=s,r||(i=i.pipe(We(G=>{z=G;let U=Jr(G),se=this.getSorterFn(g);return se&&(U=U.sort(se)),U}),We(G=>(g.filter(U=>U.filter).forEach(U=>{let se=U.filter,ve=this.getFilteredData(se);if(ve.length===0)return;let he=se.fn;typeof he=="function"&&(G=G.filter(be=>ve.some(Ee=>he(Ee,be))))}),G)),We(G=>{if(p&&c.front){let U=Math.ceil(G.length/d);if(E=Math.max(1,u>U?U:u),v=G.length,c.show===!0)return G.slice((E-1)*d,E*d)}return G}))),typeof a.process=="function"&&(i=i.pipe(We(G=>a.process(G,z)))),i=i.pipe(We(G=>this.optimizeData({result:G,columns:g,rowClassName:t.rowClassName}))),i.pipe(We(G=>{x=G;let U=v||l,se=y||d;return{pi:E,ps:y,total:v,list:x,statistical:this.genStatistical(g,x,z),pageShow:typeof M>"u"?U>se:M}}))}get(t,i,r){try{let s=i.safeType==="safeHtml";if(i.format){let d=i.format(t,i,r)||"";return{text:d,_text:s?this.dom.bypassSecurityTrustHtml(d):d,org:d,safeType:i.safeType}}let a=ou(t,i.index,i.default),l=a,c,u;switch(i.type){case"no":l=this.getNoIndex(t,i,r);break;case"img":l=a?``:"";break;case"number":l=this.numberPipe.transform(a,i.numberDigits);break;case"currency":l=this.currencySrv.format(a,i.currency?.format);break;case"date":l=a===i.default?i.default:this.datePipe.transform(a,i.dateFormat);break;case"yn":l=this.ynPipe.transform(a===i.yn.truth,i.yn.yes,i.yn.no,i.yn.mode,!1);break;case"enum":l=i.enum[a];break;case"tag":case"badge":let d=i.type==="tag"?i.tag:i.badge;if(d&&d[l]){let p=d[l];l=p.text,c=p.color,u=p.tooltip}else l="";break}return l==null&&(l=""),{text:l,_text:s?this.dom.bypassSecurityTrustHtml(l):l,org:a,color:c,tooltip:u,safeType:i.safeType,buttons:[]}}catch(s){let a="INVALID DATA";return console.error("Failed to get data",t,i,s),{text:a,_text:a,org:a,buttons:[],safeType:"text"}}}getByRemote(t,i){let{req:r,page:s,paginator:a,pi:l,ps:c,singleSort:u,multiSort:d,columns:p}=i,g=(r.method||"GET").toUpperCase(),v={},y=r.reName;a&&(r.type==="page"?v={[y.pi]:s.zeroIndexed?l-1:l,[y.ps]:c}:v={[y.skip]:(l-1)*c,[y.limit]:c}),v=V(V(V(V({},v),r.params),this.getReqSortMap(u,d,p)),this.getReqFilterMap(p)),i.req.ignoreParamNull==!0&&Object.keys(v).forEach(E=>{v[E]==null&&delete v[E]});let x={params:v,body:r.body,headers:r.headers};return g==="POST"&&r.allInBody===!0&&(x={body:V(V({},r.body),v),headers:r.headers}),typeof r.process=="function"&&(x=r.process(x)),x.params instanceof Yg||(x.params=new Yg({fromObject:x.params})),typeof i.customRequest=="function"?i.customRequest({method:g,url:t,options:x}):this.http.request(g,t,x)}getCell(t,i,r){let s=typeof t.onCell=="function"?t.onCell(i,r):null,a=s?.colSpan??1,l=s?.rowSpan??1;return{colSpan:a<=0?null:a,rowSpan:l<=0?null:l}}optimizeData(t){let{result:i,columns:r,rowClassName:s}=t;for(let a=0,l=i.length;a{let u=this.getCell(c,i[a],a);if(Array.isArray(c.buttons)&&c.buttons.length>0)return{buttons:this.genButtons(c.buttons,i[a],c),_text:"",props:u};let d;return typeof c.cell=="function"&&(d=c.cell(i[a],c)),ot(V({},this.get(i[a],c,a)),{props:u,cell:d})}),i[a]._rowClassName=[s?s(i[a],a):null,i[a].className].filter(c=>!!c).join(" ");return i}getNoIndex(t,i,r){return typeof i.noIndex=="function"?i.noIndex(t,i,r):i.noIndex+r}genButtons(t,i,r){let s=c=>Jr(c).filter(u=>{let d=typeof u.iif=="function"?u.iif(i,u,r):!0,p=u.iifBehavior==="disabled";return u._result=d,u._disabled=!d&&p,u.children?.length&&(u.children=s(u.children)),d||p}),a=s(t),l=c=>{for(let u of c)u._text=typeof u.text=="function"?u.text(i,u):u.text||"",u._className=typeof u.className=="function"?u.className(i,u):u.className,u._icon=typeof u.icon=="function"?u.icon(i,u):u.icon,u.children?.length&&(u.children=l(u.children));return c};return this.fixMaxMultiple(l(a),r)}fixMaxMultiple(t,i){let r=i.maxMultipleButton,s=t.length;if(r==null||s<=0)return t;let a=V(V({},this.cog.maxMultipleButton),typeof r=="number"?{count:r}:r);if(a.count>=s)return t;let l=t.slice(0,a.count);return l.push({_text:a.text,children:t.slice(a.count)}),l}getValidSort(t){return t.filter(i=>i._sort&&i._sort.enabled&&i._sort.default).map(i=>i._sort)}getSorterFn(t){let i=this.getValidSort(t);if(i.length===0)return;let r=i[0];if(r.compare!==null&&typeof r.compare=="function")return(s,a)=>{let l=r.compare(s,a);return l!==0?r.default==="descend"?-l:l:0}}get nextSortTick(){return++this.sortTick}getReqSortMap(t,i,r){let s={},a=this.getValidSort(r);if(i){let d=V({key:"sort",separator:"-",nameSeparator:".",keepEmptyKey:!0,arrayParam:!1},i),p=a.sort((g,v)=>g.tick-v.tick).map(g=>g.key+d.nameSeparator+((g.reName||{})[g.default]||g.default));return s={[d.key]:d.arrayParam?p:p.join(d.separator)},p.length===0&&d.keepEmptyKey===!1?{}:s}if(a.length===0)return s;let l=a[0],c=l.key,u=(a[0].reName||{})[l.default]||l.default;return t&&(u=c+(t.nameSeparator||".")+u,c=t.key||"sort"),s[c]=u,s}getFilteredData(t){return t.type==="default"?t.menus.filter(i=>i.checked===!0):t.menus.slice(0,1)}getReqFilterMap(t){let i={};return t.filter(r=>r.filter&&r.filter.default===!0).forEach(r=>{let s=r.filter,a=this.getFilteredData(s),l={};s.reName?l=s.reName(s.menus,r):l[s.key]=a.map(c=>c.value).join(","),i=V(V({},i),l)}),i}genStatistical(t,i,r){let s={};return t.forEach((a,l)=>{s[a.key||a.indexKey||l]=a.statistical==null?{}:this.getStatistical(a,l,i,r)}),s}getStatistical(t,i,r,s){let a=t.statistical,l=V({digits:2,currency:void 0},typeof a=="string"?{type:a}:a),c={value:0},u=!1;if(typeof l.type=="function")c=l.type(this.getValues(i,r),t,r,s),u=!0;else switch(l.type){case"count":c.value=r.length;break;case"distinctCount":c.value=this.getValues(i,r).filter((d,p,g)=>g.indexOf(d)===p).length;break;case"sum":c.value=this.toFixed(this.getSum(i,r),l.digits),u=!0;break;case"average":c.value=this.toFixed(this.getSum(i,r)/r.length,l.digits),u=!0;break;case"max":c.value=Math.max(...this.getValues(i,r)),u=!0;break;case"min":c.value=Math.min(...this.getValues(i,r)),u=!0;break}return l.currency===!0||l.currency==null&&u===!0?c.text=this.currencySrv.format(c.value,t.currency?.format):c.text=String(c.value),c}toFixed(t,i){return isNaN(t)||!isFinite(t)?0:parseFloat(t.toFixed(i))}getValues(t,i){return i.map(r=>r._values[t].org).map(r=>r===""||r==null?0:r)}getSum(t,i){return this.getValues(t,i).reduce((r,s)=>r+=parseFloat(String(s)),0)}};n.\u0275fac=function(i){return new(i||n)(nt(mw),nt(Hl,1),nt(Op,1),nt(Rl,1),nt(Zp),nt(Ro))},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),kT=(()=>{let n=class n{constructor(){this.xlsxSrv=ae(OT,{optional:!0})}_stGet(t,i,r,s){let a={t:"s",v:""};if(i.format)a.v=i.format(t,i,r);else{let l=t._values?t._values[s].text:ou(t,i.index,"");if(a.v=l,l!=null)switch(i.type){case"currency":a.t="n";break;case"date":`${l}`.length>0&&(a.t="d",a.z=i.dateFormat);break;case"yn":let c=i.yn;a.v=l===c.truth?c.yes:c.no;break}}return a.v=a.v??"",a}genSheet(t){let i={},r=i[t.sheetname||"Sheet1"]={},s=t.data.length,a=t.columens,l=0,c=!1,u=d=>d.exported===!1||!d.index||!(!d.buttons||d.buttons.length===0);for(let[d,p]of a.entries()){if(u(p))continue;!c&&p._width!=null&&(c=!0),++l;let g=this.xlsxSrv.numberToSchema(l);r[`${g}1`]={t:"s",v:typeof p.title=="object"?p.title.text:p.title};for(let v=0;v!u(d)).map(d=>({wpx:d._width}))),l>0&&s>0&&(r["!ref"]=`A1:${this.xlsxSrv.numberToSchema(l)}${s+1}`),i}export(t){return xo(this,null,function*(){if(this.xlsxSrv==null)return Promise.reject();let i=this.genSheet(t);return this.xlsxSrv.export({sheets:i,filename:t.filename,callback:t.callback})})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),O3=(()=>{let n=class n{constructor(){this.stWidgetRegistry=ae(vv),this.viewContainerRef=ae(Tn)}ngOnInit(){let t=this.column.widget,i=this.stWidgetRegistry.get(t.type);this.viewContainerRef.clear();let r=this.viewContainerRef.createComponent(i),{record:s,column:a}=this,l=t.params?t.params({record:s,column:a}):{record:s};Object.keys(l).forEach(c=>{r.instance[c]=l[c]})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","st-widget-host",""]],inputs:{record:"record",column:"column"}});let o=n;return o})(),D3={pi:1,ps:10,size:"default",responsive:!0,responsiveHideHeaderFooter:!1,req:{type:"page",method:"GET",allInBody:!1,lazyLoad:!1,ignoreParamNull:!1,reName:{pi:"pi",ps:"ps",skip:"skip",limit:"limit"}},res:{reName:{list:["list"],total:["total"]}},page:{front:!0,zeroIndexed:!1,position:"bottom",placement:"right",show:!0,showSize:!1,pageSizes:[10,20,30,40,50],showQuickJumper:!1,total:!0,toTop:!0,toTopOffset:100,itemRender:null,simple:!1},modal:{paramsName:"record",size:"lg",exact:!0},drawer:{paramsName:"record",size:"md",footer:!0,footerHeight:55},pop:{title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",trigger:"click",placement:"top"},btnIcon:{theme:"outline",spin:!1},noIndex:1,expandRowByClick:!1,expandAccordion:!1,widthMode:{type:"default",strictBehavior:"truncate"},virtualItemSize:54,virtualMaxBufferPx:200,virtualMinBufferPx:100,iifBehavior:"hide",loadingDelay:0,safeType:"safeHtml",date:{format:"yyyy-MM-dd HH:mm"},yn:{truth:!0,yes:"\u662F",mode:"icon"},maxMultipleButton:{text:"\u66F4\u591A",count:2}},R3=(()=>{let n=class n{constructor(){this.cdr=ae(fe),this.visible=!1,this.locale={},this.n=new O,this.handle=new O}get icon(){return this.f.icon}stopPropagation(t){t.stopPropagation()}checkboxChange(){this.n.emit(this.f.menus?.filter(t=>t.checked))}radioChange(t){this.f.menus.forEach(i=>i.checked=!1),t.checked=!t.checked,this.n.emit(t)}close(t){t!=null&&this.handle.emit(t),this.visible=!1,this.cdr.detectChanges()}confirm(){return this.handle.emit(!0),this}reset(){return this.handle.emit(!1),this}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["st-filter"]],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-table-filter-trigger-container",!0)("st__filter",!0)("ant-table-filter-trigger-container-open",r.visible)},inputs:{col:"col",locale:"locale",f:"f"},outputs:{n:"n",handle:"handle"},decls:11,vars:9,consts:[["nz-dropdown","","nzTrigger","click","nzOverlayClassName","st__filter-wrap",1,"ant-table-filter-trigger",3,"nzDropdownMenu","nzClickHide","nzVisible","nzVisibleChange","click"],["nz-icon","",3,"nzType","nzTheme"],["filterMenu","nzDropdownMenu"],[1,"ant-table-filter-dropdown"],["class","ant-table-filter-dropdown-btns"],[1,"st__filter-keyword"],["type","text","nz-input","",3,"ngModel","ngModelChange","keyup.enter"],[1,"p-sm","st__filter-number"],[1,"width-100",3,"ngModel","nzMin","nzMax","nzStep","nzPrecision","nzPlaceHolder","ngModelChange"],[1,"p-sm","st__filter-date"],["nzInline","",3,"nzMode","ngModel","nzShowNow","nzShowToday","nzDisabledDate","nzDisabledTime"],["nzInline","",3,"nzMode","ngModel","nzShowNow","nzShowToday","nzDisabledDate","nzDisabledTime","ngModelChange"],[1,"st__filter-custom"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-menu",""],["nz-menu-item",""],["nz-checkbox","",3,"ngModel"],["nz-checkbox","",3,"ngModel","ngModelChange"],["nz-radio","",3,"ngModel","ngModelChange"],[1,"ant-table-filter-dropdown-btns"],[1,"ant-table-filter-dropdown-link","confirm",3,"click"],[1,"ant-table-filter-dropdown-link","clear",3,"click"]],template:function(i,r){if(i&1&&(C(0,"span",0),A("nzVisibleChange",function(a){return r.visible=a})("click",function(a){return r.stopPropagation(a)}),R(1,"i",1),S(),C(2,"nz-dropdown-menu",null,2)(4,"div",3),_(5,MG,2,2)(6,FG,2,6)(7,LG,3,1)(8,GG,2,6)(9,jG,3,0)(10,WG,7,2,"div",4),S()()),i&2){let s=te(3),a;k("active",r.visible||r.f.default),h("nzDropdownMenu",s)("nzClickHide",!1)("nzVisible",r.visible),f(),h("nzType",r.icon.type)("nzTheme",r.icon.theme),f(4),ie(5,(a=r.f.type)==="keyword"?5:a==="number"?6:a==="date"?7:a==="custom"?8:9),f(5),ie(10,r.f.showOPArea?10:-1)}},dependencies:[Be,Ii,Kt,Rt,Fe,Bi,cs,co,yr,us,ls,Fa,ic,ps,vh],encapsulation:2,changeDetection:0});let o=n;return o})(),I3=(()=>{let n=class n{get req(){return this._req}set req(t){this._req=Pl({},!0,this.cog.req,t)}get res(){return this._res}set res(t){let i=this._res=Pl({},!0,this.cog.res,t),r=i.reName;typeof r!="function"&&(Array.isArray(r.list)||(r.list=r.list.split(".")),Array.isArray(r.total)||(r.total=r.total.split("."))),this._res=i}get page(){return this._page}set page(t){this._page=V(V({},this.cog.page),t),this.updateTotalTpl()}get multiSort(){return this._multiSort}set multiSort(t){if(typeof t=="boolean"&&!it(t)||typeof t=="object"&&Object.keys(t).length===0){this._multiSort=void 0;return}this._multiSort=V({},typeof t=="object"?t:{})}set widthMode(t){this._widthMode=V(V({},this.cog.widthMode),t)}get widthMode(){return this._widthMode}set widthConfig(t){this._widthConfig=t,this.customWidthConfig=t&&t.length>0}set resizable(t){this._resizable=typeof t=="object"?t:{disabled:!it(t)}}get count(){return this._data.length}get list(){return this._data}get noColumns(){return this.columns==null}constructor(t){this.i18nSrv=ae(Rs,{optional:!0}),this.el=ae(de).nativeElement,this.cdr=ae(fe),this.doc=ae(gi),this.exportSrv=ae(kT),this.columnSource=ae(NT),this.dataSource=ae(LT),this.delonI18n=ae(cu),this.cms=ae(Ib),this.destroy$=ae(rs),this.totalTpl="",this.inied=!1,this.customWidthConfig=!1,this._widthConfig=[],this.locale={},this._loading=!1,this._data=[],this._statistical={},this._isPagination=!0,this._allChecked=!1,this._allCheckedDisabled=!1,this._indeterminate=!1,this._headers=[],this._columns=[],this.contextmenuList=[],this.ps=10,this.pi=1,this.total=0,this.loading=null,this.loadingDelay=0,this.loadingIndicator=null,this.bordered=!1,this.scroll={x:null,y:null},this.showHeader=!0,this.expandRowByClick=!1,this.expandAccordion=!1,this.expand=null,this.responsive=!0,this.error=new O,this.change=new O,this.virtualScroll=!1,this.virtualItemSize=54,this.virtualMaxBufferPx=200,this.virtualMinBufferPx=100,this.virtualForTrackBy=i=>i,this.delonI18n.change.pipe(li()).subscribe(()=>{this.locale=this.delonI18n.getData("st"),this._columns.length>0&&(this.updateTotalTpl(),this.cd())}),this.i18nSrv?.change.pipe(li(),Qe(()=>this._columns.length>0)).subscribe(()=>this.refreshColumns()),this.setCog(t.merge("st",D3))}setCog(t){let i=V({},t.multiSort);delete t.multiSort,this.cog=t,Object.assign(this,t),i.global!==!1&&(this.multiSort=i),this.columnSource.setCog(t),this.dataSource.setCog(t)}cd(){return this.cdr.detectChanges(),this}refreshData(){return this._data=[...this._data],this.cd()}renderTotal(t,i){return this.totalTpl?this.totalTpl.replace("{{total}}",t).replace("{{range[0]}}",i[0]).replace("{{range[1]}}",i[1]):""}changeEmit(t,i){let r={type:t,pi:this.pi,ps:this.ps,total:this.total};i!=null&&(r[t]=i),this.change.emit(r)}get filteredData(){return this.loadData({paginator:!1}).pipe(We(t=>t.list))}updateTotalTpl(){let{total:t}=this.page;typeof t=="string"&&t.length?this.totalTpl=t:it(t)?this.totalTpl=this.locale.total:this.totalTpl=""}setLoading(t){this.loading==null&&(this._loading=t,this.cdr.detectChanges())}loadData(t){let{pi:i,ps:r,data:s,req:a,res:l,page:c,total:u,singleSort:d,multiSort:p,rowClassName:g}=this;return this.dataSource.process(V({pi:i,ps:r,total:u,data:s,req:a,res:l,page:c,columns:this._columns,singleSort:d,multiSort:p,rowClassName:g,paginator:!0,customRequest:this.customRequest||this.cog.customRequest},t)).pipe(li(this.destroy$))}loadPageData(){return this.setLoading(!0),this.loadData().pipe(El(()=>this.setLoading(!1)),lp(t=>(this.error.emit({type:"req",error:t}),pS(()=>t))),We(t=>{let i="undefined";return typeof t.pi!==i&&(this.pi=t.pi),typeof t.ps!==i&&(this.ps=t.ps),typeof t.total!==i&&(this.total=t.total),typeof t.pageShow!==i&&(this._isPagination=t.pageShow),this._data=t.list??[],this._statistical=t.statistical,this.cdkVirtualScrollViewport!=null&&Promise.resolve().then(()=>this.cdkVirtualScrollViewport?.checkViewportSize()),this._refCheck(),this.changeEmit("loaded",t.list),this}))}clear(t=!0){return t&&this.clearStatus(),this._data=[],this.cd()}clearStatus(){return this.clearCheck().clearRadio().clearFilter().clearSort()}load(t=1,i,r){return t!==-1&&(this.pi=t),typeof i<"u"&&(this.req.params=r&&r.merge?V(V({},this.req.params),i):i),this._change("pi",r),this}reload(t,i){return this.load(-1,t,i)}reset(t,i){return this.clearStatus().load(1,t,i),this}_toTop(t){if(!(t??this.page.toTop))return;let i=this.el;i.scrollIntoView(),this.doc.documentElement.scrollTop-=this.page.toTopOffset,this.scroll&&(this.cdkVirtualScrollViewport?this.cdkVirtualScrollViewport.scrollTo({top:0,left:0}):i.querySelector(".ant-table-body, .ant-table-content")?.scrollTo(0,0))}_change(t,i){(t==="pi"||t==="ps"&&this.pi<=Math.ceil(this.total/this.ps))&&this.loadPageData().subscribe(()=>this._toTop(i?.toTop)),this.changeEmit(t)}closeOtherExpand(t){this.expandAccordion!==!1&&this._data.filter(i=>i!==t).forEach(i=>i.expand=!1)}_rowClick(t,i,r,s){let a=t.target;if(a.nodeName==="INPUT")return;let{expand:l,expandRowByClick:c}=this;if(l&&i.showExpand!==!1&&c){i.expand=!i.expand,this.closeOtherExpand(i),this.changeEmit("expand",i);return}let u={e:t,item:i,index:r};s?this.changeEmit("dblClick",u):(this._clickRowClassName(a,i,r),this.changeEmit("click",u))}_clickRowClassName(t,i,r){let s=this.clickRowClassName;if(s==null)return;let a=V({exclusive:!1},typeof s=="string"?{fn:()=>s}:s),l=a.fn(i,r),c=t.closest("tr");a.exclusive&&c.parentElement.querySelectorAll("tr").forEach(u=>u.classList.remove(l)),c.classList.contains(l)?c.classList.remove(l):c.classList.add(l)}_expandChange(t,i){t.expand=i,this.closeOtherExpand(t),this.changeEmit("expand",t)}_stopPropagation(t){t.stopPropagation()}_refColAndData(){return this._columns.forEach(t=>{this._data.forEach((i,r)=>{let s=i._values;if(t.type==="no"){let a=`${this.dataSource.getNoIndex(i,t,r)}`;s[t.__point]={text:a,_text:a,org:r,safeType:"text"}}s[t.__point].props=this.dataSource.getCell(t,i,r)})}),this.refreshData()}addRow(t,i){return Array.isArray(t)||(t=[t]),this._data.splice(i?.index??0,0,...t),this.optimizeData()._refColAndData()}removeRow(t){if(typeof t=="number")this._data.splice(t,1);else{Array.isArray(t)||(t=[t]);let r=this._data;for(var i=r.length;i--;)t.indexOf(r[i])!==-1&&r.splice(i,1)}return this._refCheck()._refColAndData()}setRow(t,i,r){return r=V({refreshSchema:!1,emitReload:!1},r),typeof t!="number"&&(t=this._data.indexOf(t)),this._data[t]=Pl(this._data[t],!1,i),this.optimizeData(),r.refreshSchema?(this.resetColumns({emitReload:r.emitReload}),this):this.refreshData()}sort(t,i,r){this.multiSort?(t._sort.default=r,t._sort.tick=this.dataSource.nextSortTick):this._columns.forEach((s,a)=>s._sort.default=a===i?r:null),this.cdr.detectChanges(),this.loadPageData().subscribe(()=>{let s={value:r,map:this.dataSource.getReqSortMap(this.singleSort,this.multiSort,this._columns),column:t};this.changeEmit("sort",s)})}clearSort(){return this._columns.forEach(t=>t._sort.default=null),this}_handleFilter(t,i){i||this.columnSource.cleanFilter(t),this.pi=1,this.columnSource.updateDefault(t.filter),this.loadPageData().subscribe(()=>this.changeEmit("filter",t))}handleFilterNotify(t){this.changeEmit("filterChange",t)}clearFilter(){return this._columns.filter(t=>t.filter&&t.filter.default===!0).forEach(t=>this.columnSource.cleanFilter(t)),this}clearCheck(){return this.checkAll(!1)}_refCheck(){let t=this._data.filter(s=>!s.disabled),i=t.filter(s=>s.checked===!0);this._allChecked=i.length>0&&i.length===t.length;let r=t.every(s=>!s.checked);return this._indeterminate=!this._allChecked&&!r,this._allCheckedDisabled=this._data.length===this._data.filter(s=>s.disabled).length,this.cd()}checkAll(t){return t=typeof t>"u"?this._allChecked:t,this._data.filter(i=>!i.disabled).forEach(i=>i.checked=t),this._refCheck()._checkNotify().refreshData()}_rowSelection(t){return t.select(this._data),this._refCheck()._checkNotify()}_checkNotify(){let t=this._data.filter(i=>!i.disabled&&i.checked===!0);return this.changeEmit("checkbox",t),this}clearRadio(){return this._data.filter(t=>t.checked).forEach(t=>t.checked=!1),this.changeEmit("radio",null),this.refreshData()}_handleTd(t){switch(t.type){case"checkbox":this._refCheck()._checkNotify();break;case"radio":this.changeEmit("radio",t.item),this.refreshData();break}}export(t,i){let r=Array.isArray(t)?this.dataSource.optimizeData({columns:this._columns,result:t}):this._data;(t===!0?this.filteredData:Mn(r)).subscribe(s=>this.exportSrv.export(ot(V({columens:this._columns},i),{data:s})))}colResize({width:t},i){i.width=`${t}px`,this.changeEmit("resize",i)}onContextmenu(t){if(!this.contextmenu)return;t.preventDefault(),t.stopPropagation();let i=t.target.closest("[data-col-index]");if(!i)return;let r=Number(i.dataset.colIndex),s=Number(i.closest("tr").dataset.index),a=isNaN(s),l=this.contextmenu({event:t,type:a?"head":"body",rowIndex:a?null:s,colIndex:r,data:a?null:this.list[s],column:this._columns[r]});(hS(l)?l:Mn(l)).pipe(li(this.destroy$),Qe(c=>c.length>0)).subscribe(c=>{this.contextmenuList=c.map(u=>(Array.isArray(u.children)||(u.children=[]),u)),this.cdr.detectChanges(),this.cms.create(t,this.contextmenuTpl)})}get cdkVirtualScrollViewport(){return this.orgTable?.cdkVirtualScrollViewport}_resetColumns(t){return t=V({emitReload:!0,preClearData:!1},t),typeof t.columns<"u"&&(this.columns=t.columns),typeof t.pi<"u"&&(this.pi=t.pi),typeof t.ps<"u"&&(this.ps=t.ps),t.emitReload&&(t.preClearData=!0),t.preClearData&&(this._data=[]),this.refreshColumns(),t.emitReload?this.loadPageData():(this.cd(),Mn(this))}resetColumns(t){return fS(this._resetColumns(t))}refreshColumns(){let t=this.columnSource.process(this.columns,{widthMode:this.widthMode,resizable:this._resizable,safeType:this.cog.safeType});return this._columns=t.columns,this._headers=t.headers,this.customWidthConfig===!1&&t.headerWidths!=null&&(this._widthConfig=t.headerWidths),this}optimizeData(){return this._data=this.dataSource.optimizeData({columns:this._columns,result:this._data,rowClassName:this.rowClassName}),this}pureItem(t){if(typeof t=="number"&&(t=this._data[t]),!t)return null;let i=Jr(t);return["_values","_rowClassName"].forEach(r=>delete i[r]),i}ngAfterViewInit(){this.refreshColumns(),this.req.lazyLoad||this.loadPageData().subscribe(),this.inied=!0}ngOnChanges(t){t.loading&&(this._loading=t.loading.currentValue),this.inied&&(t.columns&&this.refreshColumns().optimizeData(),t.data&&this.loadPageData().subscribe())}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["st"]],viewQuery:function(i,r){if(i&1&&(xe(UG,5),xe(KG,5)),i&2){let s;ce(s=ue())&&(r.orgTable=s.first),ce(s=ue())&&(r.contextmenuTpl=s.first)}},hostVars:14,hostBindings:function(i,r){i&2&&k("st",!0)("st__p-left",r.page.placement==="left")("st__p-center",r.page.placement==="center")("st__width-strict",r.widthMode.type==="strict")("st__row-class",r.rowClassName)("ant-table-rep",r.responsive)("ant-table-rep__hide-header-footer",r.responsiveHideHeaderFooter)},inputs:{req:"req",res:"res",page:"page",data:"data",columns:"columns",contextmenu:"contextmenu",ps:[le.HasDecoratorInputTransform,"ps","ps",t=>fn(t,10)],pi:[le.HasDecoratorInputTransform,"pi","pi",t=>fn(t,1)],total:[le.HasDecoratorInputTransform,"total","total",t=>fn(t,0)],loading:"loading",loadingDelay:[le.HasDecoratorInputTransform,"loadingDelay","loadingDelay",fn],loadingIndicator:"loadingIndicator",bordered:[le.HasDecoratorInputTransform,"bordered","bordered",it],size:"size",scroll:"scroll",singleSort:"singleSort",multiSort:"multiSort",rowClassName:"rowClassName",clickRowClassName:"clickRowClassName",widthMode:"widthMode",widthConfig:"widthConfig",resizable:"resizable",header:"header",showHeader:[le.HasDecoratorInputTransform,"showHeader","showHeader",it],footer:"footer",bodyHeader:"bodyHeader",body:"body",expandRowByClick:[le.HasDecoratorInputTransform,"expandRowByClick","expandRowByClick",it],expandAccordion:[le.HasDecoratorInputTransform,"expandAccordion","expandAccordion",it],expand:"expand",noResult:"noResult",responsive:[le.HasDecoratorInputTransform,"responsive","responsive",it],responsiveHideHeaderFooter:[le.HasDecoratorInputTransform,"responsiveHideHeaderFooter","responsiveHideHeaderFooter",it],virtualScroll:[le.HasDecoratorInputTransform,"virtualScroll","virtualScroll",it],virtualItemSize:[le.HasDecoratorInputTransform,"virtualItemSize","virtualItemSize",fn],virtualMaxBufferPx:[le.HasDecoratorInputTransform,"virtualMaxBufferPx","virtualMaxBufferPx",fn],virtualMinBufferPx:[le.HasDecoratorInputTransform,"virtualMinBufferPx","virtualMinBufferPx",fn],customRequest:"customRequest",virtualForTrackBy:"virtualForTrackBy"},outputs:{error:"error",change:"change"},exportAs:["st"],features:[Ve([LT,VT,NT,kT,Hl,Op,Rl]),fi,oe],decls:21,vars:34,consts:[["titleTpl",""],["chkAllTpl",""],[3,"nzData","nzPageIndex","nzPageSize","nzTotal","nzShowPagination","nzFrontPagination","nzBordered","nzSize","nzLoading","nzLoadingDelay","nzLoadingIndicator","nzTitle","nzFooter","nzScroll","nzVirtualItemSize","nzVirtualMaxBufferPx","nzVirtualMinBufferPx","nzVirtualForTrackBy","nzNoResult","nzPageSizeOptions","nzShowQuickJumper","nzShowSizeChanger","nzPaginationPosition","nzPaginationType","nzItemRender","nzSimple","nzShowTotal","nzWidthConfig","nzPageIndexChange","nzPageSizeChange","contextmenu"],["table",""],[1,"st__body"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["bodyTpl",""],["nz-virtual-scroll",""],["totalTpl",""],["contextmenuTpl","nzDropdownMenu"],["nz-menu","",1,"st__contextmenu"],[3,"innerHTML"],["class","st__head-optional",3,"innerHTML"],["class","st__head-tip","nz-tooltip","","nz-icon","","nzType","question-circle",3,"nzTooltipTitle"],[1,"st__head-optional",3,"innerHTML"],["nz-tooltip","","nz-icon","","nzType","question-circle",1,"st__head-tip",3,"nzTooltipTitle"],["nz-checkbox","",1,"st__checkall",3,"nzDisabled","ngModel","nzIndeterminate","ngModelChange"],["nzWidth","50px",3,"rowSpan"],["nz-resizable","",3,"colSpan","rowSpan","nzWidth","nzLeft","nzRight","ngClass","nzShowSort","nzSortOrder","nzCustomFilter","st__has-filter","nzDisabled","nzMaxWidth","nzMinWidth","nzBounds","nzPreview","nzSortOrderChange","nzResizeEnd",4,"let"],["nz-resizable","",3,"colSpan","rowSpan","nzWidth","nzLeft","nzRight","ngClass","nzShowSort","nzSortOrder","nzCustomFilter","nzDisabled","nzMaxWidth","nzMinWidth","nzBounds","nzPreview","nzSortOrderChange","nzResizeEnd"],["nzDirection","right"],["nz-th-extra","",3,"col","f","locale"],[1,"ant-table-selection"],["class","ant-table-selection-extra"],["selectionMenu","nzDropdownMenu"],["nz-menu","",1,"ant-table-selection-menu"],[1,"ant-table-selection-extra"],["nz-dropdown","","nzPlacement","bottomLeft",1,"ant-table-selection-down","st__checkall-selection",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["nz-menu-item","",3,"innerHTML","click"],["nz-menu-item","",3,"innerHTML"],["nz-th-extra","",3,"col","f","locale","n","handle"],["nz-resizable","",3,"colSpan","rowSpan","nzWidth","nzLeft","nzRight","ngClass","nzShowSort","nzSortOrder","nzCustomFilter","st__has-filter","nzDisabled","nzMaxWidth","nzMinWidth","nzBounds","nzPreview"],[3,"ngClass","click","dblclick"],["nzWidth","50px",3,"nzShowExpand","nzExpand"],[3,"nzExpand"],["nzWidth","50px",3,"nzShowExpand","nzExpand","nzExpandChange","click"],[3,"nzLeft","nzRight","ngClass"],["class","ant-table-rep__title"],[3,"data","i","index","c","cIdx","n"],[1,"ant-table-rep__title"],["nz-submenu","",3,"nzTitle"]],template:function(i,r){if(i&1&&(_(0,QG,3,3,"ng-template",null,0,_e)(2,XG,1,5,"ng-template",null,1,_e),C(4,"nz-table",2,3),A("nzPageIndexChange",function(a){return r.pi=a})("nzPageIndexChange",function(){return r._change("pi")})("nzPageSizeChange",function(a){return r.ps=a})("nzPageSizeChange",function(){return r._change("ps")})("contextmenu",function(a){return r.onContextmenu(a)}),_(6,yH,3,0,"thead"),C(7,"tbody",4),_(8,_H,1,4,null,5)(9,zH,6,9,"ng-template",null,6,_e)(11,RH,1,0,null,7)(12,MH,2,0)(13,AH,1,4,null,5),S(),_(14,NH,1,1,"ng-template",null,8,_e),S(),C(16,"nz-dropdown-menu",null,9)(18,"ul",10),Cn(19,GH,2,1,null,null,yn),S()()),i&2){let s=te(15);f(4),k("st__no-column",r.noColumns),h("nzData",r._data)("nzPageIndex",r.pi)("nzPageSize",r.ps)("nzTotal",r.total)("nzShowPagination",r._isPagination)("nzFrontPagination",!1)("nzBordered",r.bordered)("nzSize",r.size)("nzLoading",r.noColumns||r._loading)("nzLoadingDelay",r.loadingDelay)("nzLoadingIndicator",r.loadingIndicator)("nzTitle",r.header)("nzFooter",r.footer)("nzScroll",r.scroll)("nzVirtualItemSize",r.virtualItemSize)("nzVirtualMaxBufferPx",r.virtualMaxBufferPx)("nzVirtualMinBufferPx",r.virtualMinBufferPx)("nzVirtualForTrackBy",r.virtualForTrackBy)("nzNoResult",r.noResult)("nzPageSizeOptions",r.page.pageSizes)("nzShowQuickJumper",r.page.showQuickJumper)("nzShowSizeChanger",r.page.showSize)("nzPaginationPosition",r.page.position)("nzPaginationType",r.page.type)("nzItemRender",r.page.itemRender)("nzSimple",r.page.simple)("nzShowTotal",s)("nzWidthConfig",r._widthConfig),f(2),ie(6,r.showHeader?6:-1),f(2),ie(8,r._loading?-1:8),f(3),ie(11,r.virtualScroll?11:12),f(2),ie(13,r._loading?-1:13),f(6),_n(r.contextmenuList)}},dependencies:()=>[St,Be,Kt,Rt,DT,ev,uh,tT,Xm,Qm,rT,tv,nv,Jm,Ym,oT,Zm,Fe,Bi,cs,co,Jp,yr,us,Si,MT,FT,R3,P3],encapsulation:2,changeDetection:0});let o=n;return o})(),P3=(()=>{let n=class n{constructor(){this.stComp=ae(I3,{host:!0}),this.router=ae(mi),this.modalHelper=ae(fw),this.drawerHelper=ae(gw),this.n=new O}get routerState(){let{pi:t,ps:i,total:r}=this.stComp;return{pi:t,ps:i,total:r}}report(t){this.n.emit({type:t,item:this.i,col:this.c})}_checkbox(t){this.i.checked=t,this.report("checkbox")}_radio(){this.data.filter(t=>!t.disabled).forEach(t=>t.checked=!1),this.i.checked=!0,this.report("radio")}_link(t){this._stopPropagation(t);let i=this.c.click(this.i,this.stComp);return typeof i=="string"&&this.router.navigateByUrl(i,{state:this.routerState}),!1}_stopPropagation(t){t.preventDefault(),t.stopPropagation()}_btn(t,i){i?.stopPropagation();let r=this.stComp.cog,s=this.i;if(t.type==="modal"||t.type==="static"){r.modal.pureRecoard===!0&&(s=this.stComp.pureItem(s));let a=t.modal,l={[a.paramsName]:s};this.modalHelper[t.type==="modal"?"create":"createStatic"](a.component,V(V({},l),a.params&&a.params(s)),Pl({},!0,r.modal,a)).pipe(Qe(c=>typeof c<"u")).subscribe(c=>this.btnCallback(s,t,c));return}else if(t.type==="drawer"){r.drawer.pureRecoard===!0&&(s=this.stComp.pureItem(s));let a=t.drawer,l={[a.paramsName]:s};this.drawerHelper.create(a.title,a.component,V(V({},l),a.params&&a.params(s)),Pl({},!0,r.drawer,a)).pipe(Qe(c=>typeof c<"u")).subscribe(c=>this.btnCallback(s,t,c));return}else if(t.type==="link"){let a=this.btnCallback(s,t);typeof a=="string"&&this.router.navigateByUrl(a,{state:this.routerState});return}this.btnCallback(s,t)}btnCallback(t,i,r){if(i.click)if(typeof i.click=="string")switch(i.click){case"load":this.stComp.load();break;case"reload":this.stComp.reload();break}else return i.click(t,r,this.stComp)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["st-td"]],inputs:{c:"c",cIdx:"cIdx",data:"data",i:"i",index:"index"},outputs:{n:"n"},decls:8,vars:1,consts:[["btnTpl",""],["btnItemTpl",""],["btnTextTpl",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["nz-tooltip","",3,"nzTooltipTitle","d-block","width-100"],["nz-tooltip","",3,"nzTooltipTitle"],["nz-popconfirm","","class","st__btn-text",3,"nzPopconfirmTitle","nzIcon","nzCondition","nzCancelText","nzOkText","nzOkType","ngClass"],["nz-popconfirm","",1,"st__btn-text",3,"nzPopconfirmTitle","nzIcon","nzCondition","nzCancelText","nzOkText","nzOkType","ngClass","nzOnConfirm","click"],[1,"st__btn-text",3,"ngClass","click"],[3,"innerHTML","ngClass"],["nz-icon","",3,"nzIconfont"],["nz-icon","",3,"nzType","nzTheme","nzSpin","nzTwotoneColor"],["nz-checkbox","",3,"nzDisabled","ngModel","ngModelChange"],["nz-radio","",3,"nzDisabled","ngModel","ngModelChange"],[3,"innerHTML","click"],[3,"nzColor","nz-tooltip"],[3,"innerHTML"],[3,"nzStatus","nzText","nz-tooltip"],[3,"value","options"],["st-widget-host","",3,"record","column"],[3,"innerText"],["nzType","vertical"],["nz-dropdown","","nzOverlayClassName","st__btn-sub",3,"nzDropdownMenu"],["nz-icon","","nzType","down"],["btnMenu","nzDropdownMenu"],["nz-menu",""],["nz-menu-divider",""],["nz-menu-item",""]],template:function(i,r){i&1&&_(0,WH,2,1,"ng-template",null,0,_e)(2,QH,2,1,"ng-template",null,1,_e)(4,t3,2,5,"ng-template",null,2,_e)(6,r3,1,6,null,3)(7,z3,10,1),i&2&&(f(6),ie(6,r.c.__render?6:7))},dependencies:[St,Be,Kt,Rt,Hm,bT,Fe,_u,Bi,pv,cs,co,Ob,yr,Rb,us,ls,bu,Si,O3],encapsulation:2,changeDetection:0});let o=n;return o})();var Ch=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,nn,su,RT,bb,rc,nc,Ge,Up,$i,oc,Lr,ec,Jl,Xp,Vs,ji,AT,Gs,Hs]});let o=n;return o})();function ome(...o){return ba([{provide:wa,multi:!0,useValue:()=>{let n=ae(vv);o.forEach(e=>n.register(e.KEY,e.type))}}])}var Aa=(()=>{let n=class n{getGutter(){let t=[null,null],i=this.nzGutter||0;return(Array.isArray(i)?i:[i,null]).forEach((s,a)=>{typeof s=="object"&&s!==null?(t[a]=null,Object.keys(xa).map(l=>{let c=l;this.mediaMatcher.matchMedia(xa[c]).matches&&s[c]&&(t[a]=s[c])})):t[a]=Number(s)||null}),t}setGutterStyle(){let[t,i]=this.getGutter();this.actualGutter$.next([t,i]);let r=(s,a)=>{let l=this.elementRef.nativeElement;a!==null&&this.renderer.setStyle(l,s,`-${a/2}px`)};r("margin-left",t),r("margin-right",t),r("margin-top",i),r("margin-bottom",i)}constructor(t,i,r,s,a,l,c){this.elementRef=t,this.renderer=i,this.mediaMatcher=r,this.ngZone=s,this.platform=a,this.breakpointService=l,this.directionality=c,this.nzAlign=null,this.nzJustify=null,this.nzGutter=null,this.actualGutter$=new tn(1),this.dir="ltr",this.destroy$=new J}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t}),this.setGutterStyle()}ngOnChanges(t){t.nzGutter&&this.setGutterStyle()}ngAfterViewInit(){this.platform.isBrowser&&this.breakpointService.subscribe(xa).pipe(F(this.destroy$)).subscribe(()=>{this.setGutterStyle()})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(He),w(yp),w($e),w(gn),w(Ip),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-row",""],["nz-row"],["nz-form-item"]],hostAttrs:[1,"ant-row"],hostVars:20,hostBindings:function(i,r){i&2&&k("ant-row-top",r.nzAlign==="top")("ant-row-middle",r.nzAlign==="middle")("ant-row-bottom",r.nzAlign==="bottom")("ant-row-start",r.nzJustify==="start")("ant-row-end",r.nzJustify==="end")("ant-row-center",r.nzJustify==="center")("ant-row-space-around",r.nzJustify==="space-around")("ant-row-space-between",r.nzJustify==="space-between")("ant-row-space-evenly",r.nzJustify==="space-evenly")("ant-row-rtl",r.dir==="rtl")},inputs:{nzAlign:"nzAlign",nzJustify:"nzJustify",nzGutter:"nzGutter"},exportAs:["nzRow"],standalone:!0,features:[oe]});let o=n;return o})(),sc=(()=>{let n=class n{setHostClassMap(){let t=V({"ant-col":!0,[`ant-col-${this.nzSpan}`]:ht(this.nzSpan),[`ant-col-order-${this.nzOrder}`]:ht(this.nzOrder),[`ant-col-offset-${this.nzOffset}`]:ht(this.nzOffset),[`ant-col-pull-${this.nzPull}`]:ht(this.nzPull),[`ant-col-push-${this.nzPush}`]:ht(this.nzPush),"ant-col-rtl":this.dir==="rtl"},this.generateClass());for(let i in this.classMap)this.classMap.hasOwnProperty(i)&&this.renderer.removeClass(this.elementRef.nativeElement,i);this.classMap=V({},t);for(let i in this.classMap)this.classMap.hasOwnProperty(i)&&this.classMap[i]&&this.renderer.addClass(this.elementRef.nativeElement,i)}setHostFlexStyle(){this.hostFlexStyle=this.parseFlex(this.nzFlex)}parseFlex(t){return typeof t=="number"?`${t} ${t} auto`:typeof t=="string"&&/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?`0 0 ${t}`:t}generateClass(){let t=["nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],i={};return t.forEach(r=>{let s=r.replace("nz","").toLowerCase();if(ht(this[r]))if(typeof this[r]=="number"||typeof this[r]=="string")i[`ant-col-${s}-${this[r]}`]=!0;else{let a=this[r];["span","pull","push","offset","order"].forEach(c=>{let u=c==="span"?"-":`-${c}-`;i[`ant-col-${s}${u}${a[c]}`]=a&&ht(a[c])})}}),i}constructor(t,i,r,s){this.elementRef=t,this.nzRowDirective=i,this.renderer=r,this.directionality=s,this.classMap={},this.destroy$=new J,this.hostFlexStyle=null,this.dir="ltr",this.nzFlex=null,this.nzSpan=null,this.nzOrder=null,this.nzOffset=null,this.nzPush=null,this.nzPull=null,this.nzXs=null,this.nzSm=null,this.nzMd=null,this.nzLg=null,this.nzXl=null,this.nzXXl=null}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.setHostClassMap()}),this.setHostClassMap(),this.setHostFlexStyle()}ngOnChanges(t){this.setHostClassMap();let{nzFlex:i}=t;i&&this.setHostFlexStyle()}ngAfterViewInit(){this.nzRowDirective&&this.nzRowDirective.actualGutter$.pipe(F(this.destroy$)).subscribe(([t,i])=>{let r=(s,a)=>{let l=this.elementRef.nativeElement;a!==null&&this.renderer.setStyle(l,s,`${a/2}px`)};r("padding-left",t),r("padding-right",t),r("padding-top",i),r("padding-bottom",i)})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Aa,9),w(He),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-col",""],["nz-col"],["nz-form-control"],["nz-form-label"]],hostVars:2,hostBindings:function(i,r){i&2&&Re("flex",r.hostFlexStyle)},inputs:{nzFlex:"nzFlex",nzSpan:"nzSpan",nzOrder:"nzOrder",nzOffset:"nzOffset",nzPush:"nzPush",nzPull:"nzPull",nzXs:"nzXs",nzSm:"nzSm",nzMd:"nzMd",nzLg:"nzLg",nzXl:"nzXl",nzXXl:"nzXXl"},exportAs:["nzCol"],standalone:!0,features:[oe]});let o=n;return o})(),$s=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var yv=["*"];function F3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.innerTip)}}var A3=o=>[o],N3=o=>({$implicit:o});function L3(o,n){if(o&1&&(C(0,"div",4)(1,"div",5),_(2,F3,2,1,"ng-container",6),S()()),o&2){let e=m();h("@helpMotion",void 0),f(),h("ngClass",yt(4,A3,"ant-form-item-explain-"+e.status)),f(),h("nzStringTemplateOutlet",e.innerTip)("nzStringTemplateOutletContext",yt(6,N3,e.validateControl))}}function k3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzExtra)}}function V3(o,n){if(o&1&&(C(0,"div",7),_(1,k3,2,1,"ng-container",8),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzExtra)}}function G3(o,n){if(o&1&&(H(0),R(1,"span",3),B()),o&2){let e=n.$implicit,t=m(2);f(),h("nzType",e)("nzTheme",t.tooltipIcon.theme)}}function H3(o,n){if(o&1&&(C(0,"span",1),_(1,G3,2,2,"ng-container",2),S()),o&2){let e=m();h("nzTooltipTitle",e.nzTooltipTitle),f(),h("nzStringTemplateOutlet",e.tooltipIcon.type)}}var Na=(()=>{let n=class n{setWithHelpViaTips(t){this.withHelpClass=t,this.cdr.markForCheck()}setStatus(t){this.status=t,this.cdr.markForCheck()}setHasFeedback(t){this.hasFeedback=t,this.cdr.markForCheck()}constructor(t){this.cdr=t,this.status="",this.hasFeedback=!1,this.withHelpClass=!1,this.destroy$=new J}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-form-item"]],hostAttrs:[1,"ant-form-item"],hostVars:12,hostBindings:function(i,r){i&2&&k("ant-form-item-has-success",r.status==="success")("ant-form-item-has-warning",r.status==="warning")("ant-form-item-has-error",r.status==="error")("ant-form-item-is-validating",r.status==="validating")("ant-form-item-has-feedback",r.hasFeedback&&r.status)("ant-form-item-with-help",r.withHelpClass)},exportAs:["nzFormItem"],standalone:!0,features:[K],ngContentSelectors:yv,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),B3="form",Cv={type:"question-circle",theme:"outline"},_h=(()=>{let n=class n{getInputObservable(t){return this.inputChanges$.pipe(Qe(i=>t in i),We(i=>i[t]))}constructor(t,i){this.nzConfigService=t,this.directionality=i,this._nzModuleName=B3,this.nzLayout="horizontal",this.nzNoColon=!1,this.nzAutoTips={},this.nzDisableAutoTips=!1,this.nzTooltipIcon=Cv,this.nzLabelAlign="right",this.nzLabelWrap=!1,this.dir="ltr",this.destroy$=new J,this.inputChanges$=new J,this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(r=>{this.dir=r})}ngOnChanges(t){this.inputChanges$.next(t)}ngOnDestroy(){this.inputChanges$.complete(),this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(Me,8))},n.\u0275dir=Se({type:n,selectors:[["","nz-form",""]],hostAttrs:[1,"ant-form"],hostVars:8,hostBindings:function(i,r){i&2&&k("ant-form-horizontal",r.nzLayout==="horizontal")("ant-form-vertical",r.nzLayout==="vertical")("ant-form-inline",r.nzLayout==="inline")("ant-form-rtl",r.dir==="rtl")},inputs:{nzLayout:"nzLayout",nzNoColon:"nzNoColon",nzAutoTips:"nzAutoTips",nzDisableAutoTips:"nzDisableAutoTips",nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:"nzLabelWrap"},exportAs:["nzForm"],standalone:!0,features:[oe]});let o=n;return N([De(),W()],o.prototype,"nzNoColon",void 0),N([De()],o.prototype,"nzAutoTips",void 0),N([W()],o.prototype,"nzDisableAutoTips",void 0),N([De()],o.prototype,"nzTooltipIcon",void 0),N([De(),W()],o.prototype,"nzLabelWrap",void 0),o})(),_v=(()=>{let n=class n{get disableAutoTips(){return this.nzDisableAutoTips!=="default"?os(this.nzDisableAutoTips):this.nzFormDirective?.nzDisableAutoTips}set nzHasFeedback(t){this._hasFeedback=os(t),this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this._hasFeedback}),this.nzFormItemComponent&&this.nzFormItemComponent.setHasFeedback(this._hasFeedback)}get nzHasFeedback(){return this._hasFeedback}set nzValidateStatus(t){t instanceof Ms||t instanceof Rt?(this.validateControl=t,this.validateString=null,this.watchControl()):t instanceof yu?(this.validateControl=t.control,this.validateString=null,this.watchControl()):(this.validateString=t,this.validateControl=null,this.setStatus())}watchControl(){this.validateChanges.unsubscribe(),this.validateControl&&this.validateControl.statusChanges&&(this.validateChanges=this.validateControl.statusChanges.pipe(Ot(null),F(this.destroyed$)).subscribe(()=>{this.disableAutoTips||this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck()}))}setStatus(){this.status=this.getControlStatus(this.validateString),this.innerTip=this.getInnerTip(this.status),this.nzFormStatusService.formStatusChanges.next({status:this.status,hasFeedback:this.nzHasFeedback}),this.nzFormItemComponent&&(this.nzFormItemComponent.setWithHelpViaTips(!!this.innerTip),this.nzFormItemComponent.setStatus(this.status))}getControlStatus(t){let i;return t==="warning"||this.validateControlStatus("INVALID","warning")?i="warning":t==="error"||this.validateControlStatus("INVALID")?i="error":t==="validating"||t==="pending"||this.validateControlStatus("PENDING")?i="validating":t==="success"||this.validateControlStatus("VALID")?i="success":i="",i}validateControlStatus(t,i){if(this.validateControl){let{dirty:r,touched:s,status:a}=this.validateControl;return(!!r||!!s)&&(i?this.validateControl.hasError(i):a===t)}else return!1}getInnerTip(t){switch(t){case"error":return!this.disableAutoTips&&this.autoErrorTip||this.nzErrorTip||null;case"validating":return this.nzValidatingTip||null;case"success":return this.nzSuccessTip||null;case"warning":return this.nzWarningTip||null;default:return null}}updateAutoErrorTip(){if(this.validateControl){let t=this.validateControl.errors||{},i="";for(let r in t)if(t.hasOwnProperty(r)&&(i=t[r]?.[this.localeId]??this.nzAutoTips?.[this.localeId]?.[r]??this.nzAutoTips.default?.[r]??this.nzFormDirective?.nzAutoTips?.[this.localeId]?.[r]??this.nzFormDirective?.nzAutoTips.default?.[r]),i)break;this.autoErrorTip=i}}subscribeAutoTips(t){t?.pipe(F(this.destroyed$)).subscribe(()=>{this.disableAutoTips||(this.updateAutoErrorTip(),this.setStatus(),this.cdr.markForCheck())})}constructor(t,i,r,s,a){this.nzFormItemComponent=t,this.cdr=i,this.nzFormDirective=s,this.nzFormStatusService=a,this._hasFeedback=!1,this.validateChanges=lr.EMPTY,this.validateString=null,this.destroyed$=new J,this.status="",this.validateControl=null,this.innerTip=null,this.nzAutoTips={},this.nzDisableAutoTips="default",this.subscribeAutoTips(r.localeChange.pipe(CS(l=>this.localeId=l.locale))),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzAutoTips")),this.subscribeAutoTips(this.nzFormDirective?.getInputObservable("nzDisableAutoTips").pipe(Qe(()=>this.nzDisableAutoTips==="default")))}ngOnChanges(t){let{nzDisableAutoTips:i,nzAutoTips:r,nzSuccessTip:s,nzWarningTip:a,nzErrorTip:l,nzValidatingTip:c}=t;i||r?(this.updateAutoErrorTip(),this.setStatus()):(s||a||l||c)&&this.setStatus()}ngOnInit(){this.setStatus()}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}ngAfterContentInit(){!this.validateControl&&!this.validateString&&(this.defaultValidateControl instanceof Dm?this.nzValidateStatus=this.defaultValidateControl.control:this.nzValidateStatus=this.defaultValidateControl)}};n.\u0275fac=function(i){return new(i||n)(w(Na,9),w(fe),w(Di),w(_h,8),w(cn))},n.\u0275cmp=j({type:n,selectors:[["nz-form-control"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Ri,5),i&2){let a;ce(a=ue())&&(r.defaultValidateControl=a.first)}},hostAttrs:[1,"ant-form-item-control"],inputs:{nzSuccessTip:"nzSuccessTip",nzWarningTip:"nzWarningTip",nzErrorTip:"nzErrorTip",nzValidatingTip:"nzValidatingTip",nzExtra:"nzExtra",nzAutoTips:"nzAutoTips",nzDisableAutoTips:"nzDisableAutoTips",nzHasFeedback:"nzHasFeedback",nzValidateStatus:"nzValidateStatus"},exportAs:["nzFormControl"],standalone:!0,features:[Ve([cn]),oe,K],ngContentSelectors:yv,decls:5,vars:2,consts:[[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],["class","ant-form-item-explain ant-form-item-explain-connected",4,"ngIf"],["class","ant-form-item-extra",4,"ngIf"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],["role","alert",3,"ngClass"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[1,"ant-form-item-extra"],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0)(1,"div",1),Ie(2),S()(),_(3,L3,3,8,"div",2)(4,V3,2,1,"div",3)),i&2&&(f(3),h("ngIf",r.innerTip),f(),h("ngIf",r.nzExtra))},dependencies:[St,Ye,Ue,we],encapsulation:2,data:{animation:[jl]},changeDetection:0});let o=n;return o})();function HT(o){let n=typeof o=="string"?{type:o}:o;return V(V({},Cv),n)}var $3=(()=>{let n=class n{set nzNoColon(t){this.noColon=os(t)}get nzNoColon(){return this.noColon!=="default"?this.noColon:this.nzFormDirective?.nzNoColon}set nzTooltipIcon(t){this._tooltipIcon=HT(t)}get tooltipIcon(){return this._tooltipIcon!=="default"?this._tooltipIcon:HT(this.nzFormDirective?.nzTooltipIcon||Cv)}set nzLabelAlign(t){this.labelAlign=t}get nzLabelAlign(){return this.labelAlign!=="default"?this.labelAlign:this.nzFormDirective?.nzLabelAlign||"right"}set nzLabelWrap(t){this.labelWrap=os(t)}get nzLabelWrap(){return this.labelWrap!=="default"?this.labelWrap:this.nzFormDirective?.nzLabelWrap}constructor(t,i){this.cdr=t,this.nzFormDirective=i,this.nzRequired=!1,this.noColon="default",this._tooltipIcon="default",this.labelAlign="default",this.labelWrap="default",this.destroy$=new J,this.nzFormDirective&&(this.nzFormDirective.getInputObservable("nzNoColon").pipe(Qe(()=>this.noColon==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzTooltipIcon").pipe(Qe(()=>this._tooltipIcon==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelAlign").pipe(Qe(()=>this.labelAlign==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()),this.nzFormDirective.getInputObservable("nzLabelWrap").pipe(Qe(()=>this.labelWrap==="default"),F(this.destroy$)).subscribe(()=>this.cdr.markForCheck()))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(_h,12))},n.\u0275cmp=j({type:n,selectors:[["nz-form-label"]],hostAttrs:[1,"ant-form-item-label"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-form-item-label-left",r.nzLabelAlign==="left")("ant-form-item-label-wrap",r.nzLabelWrap)},inputs:{nzFor:"nzFor",nzRequired:"nzRequired",nzNoColon:"nzNoColon",nzTooltipTitle:"nzTooltipTitle",nzTooltipIcon:"nzTooltipIcon",nzLabelAlign:"nzLabelAlign",nzLabelWrap:"nzLabelWrap"},exportAs:["nzFormLabel"],standalone:!0,features:[K],ngContentSelectors:yv,decls:3,vars:6,consts:[["class","ant-form-item-tooltip","nz-tooltip","",3,"nzTooltipTitle",4,"ngIf"],["nz-tooltip","",1,"ant-form-item-tooltip",3,"nzTooltipTitle"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType","nzTheme"]],template:function(i,r){i&1&&(Pe(),C(0,"label"),Ie(1),_(2,H3,2,2,"span",0),S()),i&2&&(k("ant-form-item-no-colon",r.nzNoColon)("ant-form-item-required",r.nzRequired),ze("for",r.nzFor),f(2),h("ngIf",r.nzTooltipTitle))},dependencies:[we,Ye,Ue,Si,Ge,Fe],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzRequired",void 0),o})();var ac=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[$3,_v,$s]});let o=n;return o})();var j3=["switchElement"];function W3(o,n){o&1&&R(0,"span",8)}function U3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzCheckedChildren)}}function K3(o,n){if(o&1&&(H(0),_(1,U3,2,1,"ng-container",9),B()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzCheckedChildren)}}function q3(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzUnCheckedChildren)}}function Y3(o,n){if(o&1&&_(0,q3,2,1,"ng-container",9),o&2){let e=m();h("nzStringTemplateOutlet",e.nzUnCheckedChildren)}}var Q3="switch",wv=(()=>{let n=class n{updateValue(t){this.isChecked!==t&&(this.isChecked=t,this.onChange(this.isChecked))}focus(){this.focusMonitor.focusVia(this.switchElement.nativeElement,"keyboard")}blur(){this.switchElement.nativeElement.blur()}constructor(t,i,r,s,a,l){this.nzConfigService=t,this.host=i,this.ngZone=r,this.cdr=s,this.focusMonitor=a,this.directionality=l,this._nzModuleName=Q3,this.isChecked=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzLoading=!1,this.nzDisabled=!1,this.nzControl=!1,this.nzCheckedChildren=null,this.nzUnCheckedChildren=null,this.nzSize="default",this.nzId=null,this.dir="ltr",this.destroy$=new J,this.isNzDisableFirstChange=!0}ngOnInit(){this.directionality.change.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{Ke(this.host.nativeElement,"click").pipe(F(this.destroy$)).subscribe(t=>{t.preventDefault(),!(this.nzControl||this.nzDisabled||this.nzLoading)&&this.ngZone.run(()=>{this.updateValue(!this.isChecked),this.cdr.markForCheck()})}),Ke(this.switchElement.nativeElement,"keydown").pipe(F(this.destroy$)).subscribe(t=>{if(this.nzControl||this.nzDisabled||this.nzLoading)return;let{keyCode:i}=t;i!==37&&i!==39&&i!==32&&i!==13||(t.preventDefault(),this.ngZone.run(()=>{i===37?this.updateValue(!1):i===39?this.updateValue(!0):(i===32||i===13)&&this.updateValue(!this.isChecked),this.cdr.markForCheck()}))})})}ngAfterViewInit(){this.focusMonitor.monitor(this.switchElement.nativeElement,!0).pipe(F(this.destroy$)).subscribe(t=>{t||Promise.resolve().then(()=>this.onTouched())})}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.switchElement.nativeElement),this.destroy$.next(),this.destroy$.complete()}writeValue(t){this.isChecked=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(de),w($e),w(fe),w(Oi),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-switch"]],viewQuery:function(i,r){if(i&1&&xe(j3,7),i&2){let s;ce(s=ue())&&(r.switchElement=s.first)}},inputs:{nzLoading:"nzLoading",nzDisabled:"nzDisabled",nzControl:"nzControl",nzCheckedChildren:"nzCheckedChildren",nzUnCheckedChildren:"nzUnCheckedChildren",nzSize:"nzSize",nzId:"nzId"},exportAs:["nzSwitch"],standalone:!0,features:[Ve([{provide:zn,useExisting:pn(()=>n),multi:!0}]),K],decls:9,vars:16,consts:[["nz-wave","","type","button",1,"ant-switch",3,"disabled","nzWaveExtraNode"],["switchElement",""],[1,"ant-switch-handle"],["nz-icon","","nzType","loading","class","ant-switch-loading-icon",4,"ngIf"],[1,"ant-switch-inner"],[4,"ngIf","ngIfElse"],["uncheckTemplate",""],[1,"ant-click-animating-node"],["nz-icon","","nzType","loading",1,"ant-switch-loading-icon"],[4,"nzStringTemplateOutlet"]],template:function(i,r){if(i&1&&(C(0,"button",0,1)(2,"span",2),_(3,W3,1,0,"span",3),S(),C(4,"span",4),_(5,K3,2,1,"ng-container",5)(6,Y3,1,1,"ng-template",null,6,_e),S(),R(8,"div",7),S()),i&2){let s=te(7);k("ant-switch-checked",r.isChecked)("ant-switch-loading",r.nzLoading)("ant-switch-disabled",r.nzDisabled)("ant-switch-small",r.nzSize==="small")("ant-switch-rtl",r.dir==="rtl"),h("disabled",r.nzDisabled)("nzWaveExtraNode",!0),ze("id",r.nzId),f(3),h("ngIf",r.nzLoading),f(2),h("ngIf",r.isChecked)("ngIfElse",s)}},dependencies:[lw,hr,Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzLoading",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzControl",void 0),N([De()],o.prototype,"nzSize",void 0),o})(),lc=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[wv]});let o=n;return o})();var xz=cS(nC(),1),zz=cS(_z(),1);var bc=class o{get treeService(){return this.service||this.parentNode&&this.parentNode.treeService}constructor(n,e=null,t=null){if(this._title="",this.level=0,this.parentNode=null,this._icon="",this._children=[],this._isLeaf=!1,this._isChecked=!1,this._isSelectable=!1,this._isDisabled=!1,this._isDisableCheckbox=!1,this._isExpanded=!1,this._isHalfChecked=!1,this._isSelected=!1,this._isLoading=!1,this.canHide=!1,this.isMatched=!1,this.service=null,n instanceof o)return n;this.service=t||null,this.origin=n,this.key=n.key,this.parentNode=e,this._title=n.title||"---",this._icon=n.icon||"",this._isLeaf=n.isLeaf||!1,this._children=[],this._isChecked=n.checked||!1,this._isSelectable=n.disabled||n.selectable!==!1,this._isDisabled=n.disabled||!1,this._isDisableCheckbox=n.disableCheckbox||!1,this._isExpanded=n.isLeaf?!1:n.expanded||!1,this._isHalfChecked=!1,this._isSelected=!n.disabled&&n.selected||!1,this._isLoading=!1,this.isMatched=!1,e?this.level=e.level+1:this.level=0,typeof n.children<"u"&&n.children!==null&&n.children.forEach(i=>{let r=this.treeService;r&&!r.isCheckStrictly&&n.checked&&!n.disabled&&!i.disabled&&!i.disableCheckbox&&(i.checked=n.checked),this._children.push(new o(i,this))})}get title(){return this._title}set title(n){this._title=n,this.update()}get icon(){return this._icon}set icon(n){this._icon=n,this.update()}get children(){return this._children}set children(n){this._children=n,this.update()}get isLeaf(){return this._isLeaf}set isLeaf(n){this._isLeaf=n,this.update()}get isChecked(){return this._isChecked}set isChecked(n){this._isChecked=n,this.origin.checked=n,this.afterValueChange("isChecked")}get isHalfChecked(){return this._isHalfChecked}set isHalfChecked(n){this._isHalfChecked=n,this.afterValueChange("isHalfChecked")}get isSelectable(){return this._isSelectable}set isSelectable(n){this._isSelectable=n,this.update()}get isDisabled(){return this._isDisabled}set isDisabled(n){this._isDisabled=n,this.update()}get isDisableCheckbox(){return this._isDisableCheckbox}set isDisableCheckbox(n){this._isDisableCheckbox=n,this.update()}get isExpanded(){return this._isExpanded}set isExpanded(n){this._isExpanded=n,this.origin.expanded=n,this.afterValueChange("isExpanded"),this.afterValueChange("reRender")}get isSelected(){return this._isSelected}set isSelected(n){this._isSelected=n,this.origin.selected=n,this.afterValueChange("isSelected")}get isLoading(){return this._isLoading}set isLoading(n){this._isLoading=n,this.update()}setSyncChecked(n=!1,e=!1){this.setChecked(n,e),this.treeService&&!this.treeService.isCheckStrictly&&this.treeService.conduct(this)}setChecked(n=!1,e=!1){this.origin.checked=n,this.isChecked=n,this.isHalfChecked=e}setExpanded(n){this._isExpanded=n,this.origin.expanded=n,this.afterValueChange("isExpanded")}getParentNode(){return this.parentNode}getChildren(){return this.children}addChildren(n,e=-1){this.isLeaf||(n.forEach(t=>{let i=s=>{s.getChildren().forEach(a=>{a.level=a.getParentNode().level+1,a.origin.level=a.level,i(a)})},r=t;r instanceof o?r.parentNode=this:r=new o(t,this),r.level=this.level+1,r.origin.level=r.level,i(r);try{e===-1?this.children.push(r):this.children.splice(e,0,r)}catch{}}),this.origin.children=this.getChildren().map(t=>t.origin),this.isLoading=!1),this.afterValueChange("addChildren"),this.afterValueChange("reRender")}clearChildren(){this.afterValueChange("clearChildren"),this.children=[],this.origin.children=[],this.afterValueChange("reRender")}remove(){let n=this.getParentNode();n&&(n.children=n.getChildren().filter(e=>e.key!==this.key),n.origin.children=n.origin.children.filter(e=>e.key!==this.key),this.afterValueChange("remove"),this.afterValueChange("reRender"))}afterValueChange(n){if(this.treeService)switch(n){case"isChecked":this.treeService.setCheckedNodeList(this);break;case"isHalfChecked":this.treeService.setHalfCheckedNodeList(this);break;case"isExpanded":this.treeService.setExpandedNodeList(this);break;case"isSelected":this.treeService.setNodeActive(this);break;case"clearChildren":this.treeService.afterRemove(this.getChildren());break;case"remove":this.treeService.afterRemove([this]);break;case"reRender":this.treeService.flattenTreeData(this.treeService.rootNodes,this.treeService.getExpandedNodeList().map(e=>e.key));break}this.update()}update(){this.component&&this.component.markForCheck()}};function cC(o){let{isDisabled:n,isDisableCheckbox:e}=o;return!!(n||e)}function Sz(o,n){return n.length>0&&n.indexOf(o)>-1}function u4(o,n){return`${o}-${n}`}function d4(o,n){return o??n}function uC(o=[],n=[]){let e=new Set(n===!0?[]:n),t=[];function i(r,s=null){return r.map((a,l)=>{let c=u4(s?s.pos:"0",l),u=d4(a.key,c);a.isStart=[...s?s.isStart:[],l===0],a.isEnd=[...s?s.isEnd:[],l===r.length-1];let d={parent:s,pos:c,children:[],data:a,isStart:[...s?s.isStart:[],l===0],isEnd:[...s?s.isEnd:[],l===r.length-1]};return t.push(d),n===!0||e.has(u)||a.isExpanded?d.children=i(a.children||[],d):d.children=[],d})}return i(o),t}var Tc=(()=>{let n=class n{constructor(){this.DRAG_SIDE_RANGE=.25,this.DRAG_MIN_GAP=2,this.isCheckStrictly=!1,this.isMultiple=!1,this.rootNodes=[],this.flattenNodes$=new ct([]),this.selectedNodeList=[],this.expandedNodeList=[],this.checkedNodeList=[],this.halfCheckedNodeList=[],this.matchedNodeList=[]}initTree(t){this.rootNodes=t,this.expandedNodeList=[],this.selectedNodeList=[],this.halfCheckedNodeList=[],this.checkedNodeList=[],this.matchedNodeList=[]}flattenTreeData(t,i=[]){this.flattenNodes$.next(uC(t,i).map(r=>r.data))}getSelectedNode(){return this.selectedNode}getSelectedNodeList(){return this.conductNodeState("select")}getCheckedNodeKeys(){let t=[],i=this.getCheckedNodeList(),r=s=>{s.forEach(a=>{t.push(a.key),!(a.children.length<1)&&r(a.children)})};return r(i),t}getCheckedNodeList(){return this.conductNodeState("check")}getHalfCheckedNodeList(){return this.conductNodeState("halfCheck")}getExpandedNodeList(){return this.conductNodeState("expand")}getMatchedNodeList(){return this.conductNodeState("match")}isArrayOfNzTreeNode(t){return t.every(i=>i instanceof bc)}setSelectedNode(t){this.selectedNode=t}setNodeActive(t){!this.isMultiple&&t.isSelected&&(this.selectedNodeList.forEach(i=>{t.key!==i.key&&(i.isSelected=!1)}),this.selectedNodeList=[]),this.setSelectedNodeList(t,this.isMultiple)}setSelectedNodeList(t,i=!1){let r=this.getIndexOfArray(this.selectedNodeList,t.key);i?t.isSelected&&r===-1&&this.selectedNodeList.push(t):t.isSelected&&r===-1&&(this.selectedNodeList=[t]),t.isSelected||(this.selectedNodeList=this.selectedNodeList.filter(s=>s.key!==t.key))}setHalfCheckedNodeList(t){let i=this.getIndexOfArray(this.halfCheckedNodeList,t.key);t.isHalfChecked&&i===-1?this.halfCheckedNodeList.push(t):!t.isHalfChecked&&i>-1&&(this.halfCheckedNodeList=this.halfCheckedNodeList.filter(r=>t.key!==r.key))}setCheckedNodeList(t){let i=this.getIndexOfArray(this.checkedNodeList,t.key);t.isChecked&&i===-1?this.checkedNodeList.push(t):!t.isChecked&&i>-1&&(this.checkedNodeList=this.checkedNodeList.filter(r=>t.key!==r.key))}conductNodeState(t="check"){let i=[];switch(t){case"select":i=this.selectedNodeList;break;case"expand":i=this.expandedNodeList;break;case"match":i=this.matchedNodeList;break;case"check":i=this.checkedNodeList;let r=s=>{let a=s.getParentNode();return a?this.checkedNodeList.findIndex(l=>l.key===a.key)>-1?!0:r(a):!1};this.isCheckStrictly||(i=this.checkedNodeList.filter(s=>!r(s)));break;case"halfCheck":this.isCheckStrictly||(i=this.halfCheckedNodeList);break}return i}setExpandedNodeList(t){if(t.isLeaf)return;let i=this.getIndexOfArray(this.expandedNodeList,t.key);t.isExpanded&&i===-1?this.expandedNodeList.push(t):!t.isExpanded&&i>-1&&this.expandedNodeList.splice(i,1)}setMatchedNodeList(t){let i=this.getIndexOfArray(this.matchedNodeList,t.key);t.isMatched&&i===-1?this.matchedNodeList.push(t):!t.isMatched&&i>-1&&this.matchedNodeList.splice(i,1)}refreshCheckState(t=!1){t||this.checkedNodeList.forEach(i=>{this.conduct(i,t)})}conduct(t,i=!1){let r=t.isChecked;t&&!i&&(this.conductUp(t),this.conductDown(t,r))}conductUp(t){let i=t.getParentNode();i&&(cC(i)||(i.children.every(r=>cC(r)||!r.isHalfChecked&&r.isChecked)?(i.isChecked=!0,i.isHalfChecked=!1):i.children.some(r=>r.isHalfChecked||r.isChecked)?(i.isChecked=!1,i.isHalfChecked=!0):(i.isChecked=!1,i.isHalfChecked=!1)),this.setCheckedNodeList(i),this.setHalfCheckedNodeList(i),this.conductUp(i))}conductDown(t,i){cC(t)||(t.isChecked=i,t.isHalfChecked=!1,this.setCheckedNodeList(t),this.setHalfCheckedNodeList(t),t.children.forEach(r=>{this.conductDown(r,i)}))}afterRemove(t){let i=r=>{this.selectedNodeList=this.selectedNodeList.filter(s=>s.key!==r.key),this.expandedNodeList=this.expandedNodeList.filter(s=>s.key!==r.key),this.checkedNodeList=this.checkedNodeList.filter(s=>s.key!==r.key),r.children&&r.children.forEach(s=>{i(s)})};t.forEach(r=>{i(r)}),this.refreshCheckState(this.isCheckStrictly)}refreshDragNode(t){t.children.length===0?this.conductUp(t):t.children.forEach(i=>{this.refreshDragNode(i)})}resetNodeLevel(t){let i=t.getParentNode();i?t.level=i.level+1:t.level=0;for(let r of t.children)this.resetNodeLevel(r)}calcDropPosition(t){let{clientY:i}=t,{top:r,bottom:s,height:a}=t.target.getBoundingClientRect(),l=Math.max(a*this.DRAG_SIDE_RANGE,this.DRAG_MIN_GAP);return i<=r+l?-1:i>=s-l?1:0}dropAndApply(t,i=-1){if(!t||i>1)return;let r=t.treeService,s=t.getParentNode(),a=this.selectedNode.getParentNode();switch(a?a.children=a.children.filter(l=>l.key!==this.selectedNode.key):this.rootNodes=this.rootNodes.filter(l=>l.key!==this.selectedNode.key),i){case 0:t.addChildren([this.selectedNode]),this.resetNodeLevel(t);break;case-1:case 1:let l=i===1?1:0;if(s){s.addChildren([this.selectedNode],s.children.indexOf(t)+l);let c=this.selectedNode.getParentNode();c&&this.resetNodeLevel(c)}else{let c=this.rootNodes.indexOf(t)+l;this.rootNodes.splice(c,0,this.selectedNode),this.rootNodes[c].parentNode=null,this.resetNodeLevel(this.rootNodes[c])}break}this.rootNodes.forEach(l=>{l.treeService||(l.service=r),this.refreshDragNode(l)})}formatEvent(t,i,r){let s={eventName:t,node:i,event:r};switch(t){case"dragstart":case"dragenter":case"dragover":case"dragleave":case"drop":case"dragend":Object.assign(s,{dragNode:this.getSelectedNode()});break;case"click":case"dblclick":Object.assign(s,{selectedKeys:this.selectedNodeList}),Object.assign(s,{nodes:this.selectedNodeList}),Object.assign(s,{keys:this.selectedNodeList.map(l=>l.key)});break;case"check":let a=this.getCheckedNodeList();Object.assign(s,{checkedKeys:a}),Object.assign(s,{nodes:a}),Object.assign(s,{keys:a.map(l=>l.key)});break;case"search":Object.assign(s,{matchedKeys:this.getMatchedNodeList()}),Object.assign(s,{nodes:this.getMatchedNodeList()}),Object.assign(s,{keys:this.getMatchedNodeList().map(l=>l.key)});break;case"expand":Object.assign(s,{nodes:this.expandedNodeList}),Object.assign(s,{keys:this.expandedNodeList.map(l=>l.key)});break}return s}getIndexOfArray(t,i){return t.findIndex(r=>r.key===i)}conductCheck(t,i){this.checkedNodeList=[],this.halfCheckedNodeList=[];let r=s=>{s.forEach(a=>{t===null?a.isChecked=!!a.origin.checked:Sz(a.key,t||[])?(a.isChecked=!0,a.isHalfChecked=!1):(a.isChecked=!1,a.isHalfChecked=!1),a.children.length>0&&r(a.children)})};r(this.rootNodes),this.refreshCheckState(i)}conductExpandedKeys(t=[]){let i=new Set(t===!0?[]:t);this.expandedNodeList=[];let r=s=>{s.forEach(a=>{a.setExpanded(t===!0||i.has(a.key)||a.isExpanded===!0),a.isExpanded&&this.setExpandedNodeList(a),a.children.length>0&&r(a.children)})};r(this.rootNodes)}conductSelectedKeys(t,i){this.selectedNodeList.forEach(s=>s.isSelected=!1),this.selectedNodeList=[];let r=s=>s.every(a=>{if(Sz(a.key,t)){if(a.isSelected=!0,this.setSelectedNodeList(a),!i)return!1}else a.isSelected=!1;return a.children.length>0?r(a.children):!0});r(this.rootNodes)}expandNodeAllParentBySearch(t){let i=r=>{if(r&&(r.canHide=!1,r.setExpanded(!0),this.setExpandedNodeList(r),r.getParentNode()))return i(r.getParentNode())};i(t.getParentNode())}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),wz=new hn("NzTreeHigherOrder"),nf=class{constructor(n){this.nzTreeService=n}coerceTreeNodes(n){let e=[];return this.nzTreeService.isArrayOfNzTreeNode(n)?e=n.map(t=>(t.service=this.nzTreeService,t)):e=n.map(t=>new bc(t,null,this.nzTreeService)),e}getTreeNodes(){return this.nzTreeService.rootNodes}getTreeNodeByKey(n){let e=[],t=i=>{e.push(i),i.getChildren().forEach(r=>{t(r)})};return this.getTreeNodes().forEach(i=>{t(i)}),e.find(i=>i.key===n)||null}getCheckedNodeList(){return this.nzTreeService.getCheckedNodeList()}getSelectedNodeList(){return this.nzTreeService.getSelectedNodeList()}getHalfCheckedNodeList(){return this.nzTreeService.getHalfCheckedNodeList()}getExpandedNodeList(){return this.nzTreeService.getExpandedNodeList()}getMatchedNodeList(){return this.nzTreeService.getMatchedNodeList()}};var bz=(()=>{let n=class n{constructor(t){this.c=t.merge("utilArray",{deepMapName:"deep",parentMapName:"parent",idMapName:"id",parentIdMapName:"parent_id",childrenMapName:"children",titleMapName:"title",checkedMapname:"checked",selectedMapname:"selected",expandedMapname:"expanded",disabledMapname:"disabled"})}treeToArr(t,i){let r=V({deepMapName:this.c.deepMapName,parentMapName:this.c.parentMapName,childrenMapName:this.c.childrenMapName,clearChildren:!0,cb:null},i),s=[],a=(l,c,u=0)=>{for(let d of l){d[r.deepMapName]=u,d[r.parentMapName]=c,r.cb&&r.cb(d,c,u),s.push(d);let p=d[r.childrenMapName];p!=null&&Array.isArray(p)&&p.length>0&&a(p,d,u+1),r.clearChildren&&delete d[r.childrenMapName]}};return a(t,null),s}arrToTree(t,i){if(!Array.isArray(t)||t.length===0)return[];let r=V({idMapName:this.c.idMapName,parentIdMapName:this.c.parentIdMapName,childrenMapName:this.c.childrenMapName,cb:null},i),s=[],a={},l=r.rootParentIdValue,c=t;if(!l){let u=c.map(p=>p[r.parentIdMapName]),d=u.findIndex(p=>p==null);l=d!==-1?u[d]:u.sort()[0]}for(let u of c){let d=u[r.idMapName],p=u[r.parentIdMapName];a[d]=a[d]||[],u[r.childrenMapName]=a[d],r.cb&&r.cb(u),p!==l?(a[p]=a[p]||[],a[p].push(u)):s.push(u)}return s}arrToTreeNode(t,i){let r=V({idMapName:this.c.idMapName,parentIdMapName:this.c.parentIdMapName,titleMapName:this.c.titleMapName,isLeafMapName:"isLeaf",checkedMapname:this.c.checkedMapname,selectedMapname:this.c.selectedMapname,expandedMapname:this.c.expandedMapname,disabledMapname:this.c.disabledMapname,cb:null},i),s=this.arrToTree(t,{idMapName:r.idMapName,parentIdMapName:r.parentIdMapName,childrenMapName:"children"});return this.visitTree(s,(a,l,c)=>{a.key=a[r.idMapName],a.title=a[r.titleMapName],a.checked=a[r.checkedMapname],a.selected=a[r.selectedMapname],a.expanded=a[r.expandedMapname],a.disabled=a[r.disabledMapname],a[r.isLeafMapName]==null?a.isLeaf=a.children.length===0:a.isLeaf=a[r.isLeafMapName],r.cb&&r.cb(a,l,c)}),s.map(a=>new bc(a))}visitTree(t,i,r){r=V({childrenMapName:this.c.childrenMapName},r);let s=(a,l,c)=>{for(let u of a){i(u,l,c);let d=u[r.childrenMapName];Array.isArray(d)&&d.length>0&&s(d,u,c+1)}};s(t,null,1)}findTree(t,i,r){let s;return this.visitTree(t,a=>{s===void 0&&i(a)&&(s=a)},r),s}getKeysByTreeNode(t,i){let r=V({includeHalfChecked:!0},i),s=[];return this.visitTree(t,(a,l,c)=>{(a.isChecked||r.includeHalfChecked&&a.isHalfChecked)&&s.push(r.cb?r.cb(a,l,c):r.keyMapName?a.origin[r.keyMapName]:a.key)}),s}baseFlat(t,i,r=[]){let s=-1;for(;++s0&&Array.isArray(a))if(i>1)this.baseFlat(a,i-1,r);else{let l=-1,c=r.length;for(;++l{let a=i(s);return Object.prototype.hasOwnProperty.call(r,a)?r[a].push(s):r[a]=[s],r},{}):{}}uniq(t,i){return Array.from(t.reduce((r,s)=>{let a=i?typeof i=="string"?s[i]:i(s):s;return r.has(a)||r.set(a,s),r},new Map).values())}};n.\u0275fac=function(i){return new(i||n)(nt(In))},n.\u0275prov=qe({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var f4=["target"];function g4(o,n){}function m4(o,n){o&1&&Xt(0)}function v4(o,n){o&1&&Ie(0)}function y4(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(5);h("nzType",e._btn.submit_icon.type)("nzTheme",e._btn.submit_icon.theme)("nzTwotoneColor",e._btn.submit_icon.twoToneColor)("nzIconfont",e._btn.submit_icon.iconfont)}}function C4(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(6);h("nzType",e._btn.reset_icon.type)("nzTheme",e._btn.reset_icon.theme)("nzTwotoneColor",e._btn.reset_icon.twoToneColor)("nzIconfont",e._btn.reset_icon.iconfont)}}function _4(o,n){if(o&1){let e=Q();C(0,"button",12),A("click",function(){I(e);let i=m(5);return P(i.reset(!0))}),_(1,C4,1,4,"i",10),Y(2),S()}if(o&2){let e=m(5);h("nzType",e._btn.reset_type)("nzSize",e._btn.render.size)("disabled",e.loading),f(),ie(1,e._btn.reset_icon?1:-1),f(),Ne(" ",e._btn.reset," ")}}function S4(o,n){if(o&1&&(C(0,"button",9),_(1,y4,1,4,"i",10),Y(2),S(),_(3,_4,3,5,"button",11)),o&2){let e=m(4);h("nzType",e._btn.submit_type)("nzSize",e._btn.render.size)("nzLoading",e.loading)("disabled",e.liveValidate&&!e.valid),f(),ie(1,e._btn.submit_icon?1:-1),f(),Ne(" ",e._btn.submit," "),f(),ie(3,e._btn.reset?3:-1)}}function w4(o,n){}function b4(o,n){if(o&1&&_(0,w4,0,0,"ng-template",13),o&2){m(4);let e=te(1);h("ngTemplateOutlet",e)}}function T4(o,n){if(o&1&&(C(0,"nz-form-item",5)(1,"div",6)(2,"div",7)(3,"div",8),_(4,S4,4,7)(5,b4,1,1),S()()()()),o&2){let e=m(3);h("ngClass",e._btn.render.class)("fixed-label",e._btn.render.spanLabelFixed),f(),h("nzSpan",e.btnGrid.span)("nzOffset",e.btnGrid.offset)("nzXs",e.btnGrid.xs)("nzSm",e.btnGrid.sm)("nzMd",e.btnGrid.md)("nzLg",e.btnGrid.lg)("nzXl",e.btnGrid.xl)("nzXXl",e.btnGrid.xxl),f(3),ie(4,e.button?4:5)}}function E4(o,n){if(o&1&&_(0,T4,6,11,"nz-form-item",4),o&2){let e=m(2);ie(0,e._btn&&e._btn.render?0:-1)}}function x4(o,n){}function z4(o,n){if(o&1&&_(0,x4,0,0,"ng-template",13),o&2){m(2);let e=te(1);h("ngTemplateOutlet",e)}}function O4(o,n){if(o&1&&_(0,E4,1,1)(1,z4,1,1),o&2){let e=m();ie(0,e.button!=="none"?0:1)}}function D4(o,n){if(o&1&&R(0,"sf-item",3),o&2){let e=m(),t=te(3);h("formProperty",e.rootProperty)("footer",t)}}var Oz=["*"];function R4(o,n){if(o&1&&R(0,"i",11),o&2){let e=m(4);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipColor",e.oh.bgColor)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function I4(o,n){if(o&1&&(C(0,"span",10),Y(1),_(2,R4,1,9,"i",11),S()),o&2){let e=m(3);f(),Ne(" ",e.ui.optional," "),f(),ie(2,e.oh?2:-1)}}function P4(o,n){if(o&1&&(C(0,"label")(1,"span",8),Y(2),S(),_(3,I4,3,2,"span",9),S()),o&2){let e=m(2);k("ant-form-item-required",e.ui._required),ze("for",e.id),f(2),ye(e.t),f(),ie(3,e.ui.optional||e.oh?3:-1)}}function M4(o,n){if(o&1&&(C(0,"div",6),_(1,P4,4,5,"label",7),S()),o&2){let e=m();h("nzSpan",e.ui.spanLabel),f(),ie(1,e.t?1:-1)}}function F4(o,n){if(o&1&&(C(0,"div",12)(1,"div",13),Y(2),S()()),o&2){let e=m();h("@helpMotion",void 0),f(2),Ne(" ",e.error," ")}}function A4(o,n){if(o&1&&R(0,"div",14),o&2){let e=m();h("innerHTML",e.ui._description,Dt)}}function N4(o,n){if(o&1&&R(0,"i",9),o&2){let e=m(2);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function L4(o,n){if(o&1){let e=Q();C(0,"div",7)(1,"label"),Y(2),C(3,"span",8),Y(4),_(5,N4,1,8,"i",9),S()(),C(6,"div",10)(7,"button",11),A("click",function(){I(e);let i=m();return P(i.addItem())}),S()()()}if(o&2){let e=m();h("nzSpan",e.ui.spanLabel),f(),k("ant-form-item-required",e.ui.required),f(),Ne(" ",e.schema.title," "),f(2),Ne(" ",e.ui.optional," "),f(),ie(5,e.oh?5:-1),f(2),h("nzType",e.addType)("disabled",e.addDisabled)("innerHTML",e.addTitle,Dt)}}function k4(o,n){if(o&1){let e=Q();C(0,"span",16),A("click",function(){I(e);let i=m(2).index,r=m();return P(r.removeItem(i))}),R(1,"i",17),S()}if(o&2){let e=m(3);ze("title",e.removeTitle)}}function V4(o,n){if(o&1&&(C(0,"div",13)(1,"nz-card"),R(2,"sf-item",14),_(3,k4,2,1,"span",15),S()()),o&2){let e=m(),t=e.index,i=e.$implicit,r=m();h("nzSpan",r.arraySpan),ze("data-index",t),f(2),h("formProperty",i),f(),ie(3,r.showRemove?3:-1)}}function G4(o,n){if(o&1&&(H(0),_(1,V4,4,4,"div",12),B()),o&2){let e=n.$implicit;f(),ie(1,e.visible&&!e.ui.hidden?1:-1)}}function H4(o,n){if(o&1&&(C(0,"div",18),Y(1),S()),o&2){let e=m();f(),ye(e.error)}}function B4(o,n){if(o&1&&R(0,"div",19),o&2){let e=m();h("innerHTML",e.ui._description,Dt)}}function $4(o,n){if(o&1){let e=Q();C(0,"label",3),A("ngModelChange",function(i){I(e);let r=m(2);return P(r.allChecked=i)})("ngModelChange",function(){I(e);let i=m(2);return P(i.onAllChecked())}),Y(1),S()}if(o&2){let e=m(2);h("ngModel",e.allChecked)("nzIndeterminate",e.indeterminate),f(),Ne(" ",e.ui.checkAllText||e.l.checkAllText," ")}}function j4(o,n){if(o&1&&_(0,$4,2,3,"label",2),o&2){let e=m();ie(0,e.ui.checkAll?0:-1)}}function W4(o,n){if(o&1&&R(0,"i",7),o&2){let e=m(3);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function U4(o,n){if(o&1){let e=Q();C(0,"label",5),A("ngModelChange",function(i){I(e);let r=m(2);return P(r._setValue(i))}),Y(1),C(2,"span",6),Y(3),_(4,W4,1,8,"i",7),S()()}if(o&2){let e=m(2);h("nzDisabled",e.disabled)("ngModel",e.value),f(),Ne(" ",e.schema.title," "),f(2),Ne(" ",e.ui.optional," "),f(),ie(4,e.oh?4:-1)}}function K4(o,n){}function q4(o,n){if(o&1){let e=Q();_(0,K4,0,0,"ng-template",8),C(1,"nz-checkbox-group",9),A("ngModelChange",function(){I(e);let i=m(3);return P(i.notifySet())}),S()}if(o&2){let e=m(3),t=te(1);h("ngTemplateOutlet",t),f(),h("ngModel",e.data)}}function Y4(o,n){}function Q4(o,n){if(o&1&&(C(0,"div",12),_(1,Y4,0,0,"ng-template",8),S()),o&2){let e=m(4),t=te(1);h("nzSpan",e.grid_span),f(),h("ngTemplateOutlet",t)}}function X4(o,n){if(o&1&&(C(0,"div",12)(1,"label",13),Y(2),S()()),o&2){let e=n.$implicit,t=m(4);h("nzSpan",t.grid_span),f(),h("nzValue",e.value)("ngModel",e.checked)("nzDisabled",e.disabled),f(),Ne(" ",e.label," ")}}function Z4(o,n){if(o&1){let e=Q();C(0,"nz-checkbox-wrapper",10),A("nzOnChange",function(i){I(e);let r=m(3);return P(r.groupInGridChange(i))}),C(1,"div",11),_(2,Q4,2,2,"div",12),Cn(3,X4,3,5,"div",12,yn),S()()}if(o&2){let e=m(3);f(2),ie(2,e.ui.checkAll?2:-1),f(),_n(e.data)}}function J4(o,n){if(o&1&&_(0,q4,2,2)(1,Z4,5,1),o&2){let e=m(2);ie(0,e.grid_span===0?0:1)}}function e5(o,n){if(o&1&&_(0,U4,5,5,"label",4)(1,J4,2,1),o&2){let e=m();ie(0,e.data.length===0?0:1)}}function t5(o,n){}var n5=(o,n,e)=>({$implicit:o,schema:n,ui:e});function i5(o,n){if(o&1){let e=Q();C(0,"nz-year-picker",1),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function r5(o,n){if(o&1){let e=Q();C(0,"nz-month-picker",1),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function o5(o,n){if(o&1){let e=Q();C(0,"nz-week-picker",2),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function s5(o,n){if(o&1){let e=Q();C(0,"nz-range-picker",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))})("nzOnOk",function(i){I(e);let r=m();return P(r._ok(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzDisabledTime",e.ui.disabledTime)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzRanges",e.ui.ranges)("nzShowTime",e.ui.showTime)("nzSeparator",e.ui.separator)("nzShowWeekNumber",e.ui.showWeekNumber||!1)("nzMode",e.ui.rangeMode)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}function a5(o,n){if(o&1){let e=Q();C(0,"nz-date-picker",4),A("ngModelChange",function(i){I(e);let r=m();return P(r.displayValue=i)})("ngModelChange",function(i){I(e);let r=m();return P(r._change(i))})("nzOnOpenChange",function(i){I(e);let r=m();return P(r._openChange(i))})("nzOnOk",function(i){I(e);let r=m();return P(r._ok(i))}),S()}if(o&2){let e=m();h("nzId",e.id)("nzDisabled",e.disabled)("nzSize",e.ui.size)("nzFormat",e.displayFormat)("ngModel",e.displayValue)("nzAllowClear",e.i.allowClear)("ngClass",e.ui.className)("nzDisabledDate",e.ui.disabledDate)("nzLocale",e.ui.locale)("nzPlaceHolder",e.ui.placeholder)("nzPopupStyle",e.ui.popupStyle)("nzDropdownClassName",e.ui.dropdownClassName)("nzDisabledTime",e.ui.disabledTime)("nzRenderExtraFooter",e.ui.renderExtraFooter)("nzShowTime",e.ui.showTime)("nzShowToday",e.i.showToday)("nzShowWeekNumber",e.ui.showWeekNumber||!1)("nzInputReadOnly",e.ui.inputReadOnly)("nzInline",e.ui.inline)}}var l5=o=>({"ant-input-number__hide-step":o});function c5(o,n){if(o&1&&(C(0,"div",4),Y(1),S()),o&2){let e=m(2);f(),ye(e.title)}}function u5(o,n){if(o&1&&(C(0,"div",5),R(1,"sf-item",6),S()),o&2){let e=m().$implicit;h("nzSpan",e.grid.span)("nzOffset",e.grid.offset)("nzXs",e.grid.xs)("nzSm",e.grid.sm)("nzMd",e.grid.md)("nzLg",e.grid.lg)("nzXl",e.grid.xl)("nzXXl",e.grid.xxl),f(),h("formProperty",e.property)("fixed-label",e.spanLabelFixed)}}function d5(o,n){if(o&1&&_(0,u5,2,10,"div",5),o&2){let e=n.$implicit;ie(0,e.property.visible&&e.show?0:-1)}}function p5(o,n){if(o&1&&(C(0,"div",3),Cn(1,d5,1,1,null,null,yn),S()),o&2){let e=m(2);h("nzGutter",e.grid.gutter),f(),_n(e.list)}}function h5(o,n){if(o&1&&R(0,"sf-item",6),o&2){let e=m().$implicit;h("formProperty",e.property)("fixed-label",e.spanLabelFixed)}}function f5(o,n){if(o&1&&_(0,h5,1,2,"sf-item",6),o&2){let e=n.$implicit;ie(0,e.property.visible&&e.show?0:-1)}}function g5(o,n){if(o&1&&Cn(0,f5,1,1,null,null,yn),o&2){let e=m(2);_n(e.list)}}function m5(o,n){if(o&1&&_(0,c5,2,1,"div",2)(1,p5,3,1,"div",3)(2,g5,2,0),o&2){let e=n.$implicit,t=m();ie(0,!e&&t.title?0:-1),f(),ie(1,t.grid?1:2)}}function v5(o,n){if(o&1&&R(0,"i",13),o&2){let e=m(3);h("nzType",e.expand?"down":"up")}}function y5(o,n){if(o&1&&R(0,"i",15),o&2){let e=m(4);h("nzTooltipTitle",e.oh.text)("nzTooltipPlacement",e.oh.placement)("nzTooltipTrigger",e.oh.trigger)("nzTooltipColor",e.oh.bgColor)("nzTooltipOverlayClassName",e.oh.overlayClassName)("nzTooltipOverlayStyle",e.oh.overlayStyle)("nzTooltipMouseEnterDelay",e.oh.mouseEnterDelay)("nzTooltipMouseLeaveDelay",e.oh.mouseLeaveDelay)("nzType",e.oh.icon)}}function C5(o,n){if(o&1&&(C(0,"span",14),Y(1),_(2,y5,1,9,"i",15),S()),o&2){let e=m(3);f(),Ne(" ",e.ui.optional," "),f(),ie(2,e.oh?2:-1)}}function _5(o,n){if(o&1){let e=Q();C(0,"div",10),A("click",function(){I(e);let i=m(2);return P(i.changeExpand())}),_(1,v5,1,1,"i",11),Y(2),_(3,C5,3,2,"span",12),S()}if(o&2){let e=m(2);k("point",e.showExpand),f(),ie(1,e.showExpand?1:-1),f(),Ne(" ",e.title," "),f(),ie(3,e.ui.optional||e.oh?3:-1)}}function S5(o,n){}var w5=()=>[],b5=()=>({$implicit:!0});function T5(o,n){if(o&1&&(C(0,"nz-card",7),_(1,_5,4,5,"ng-template",null,8,_e)(3,S5,0,0,"ng-template",9),S()),o&2){let e=te(2),t=m(),i=te(1);k("sf__object-card-fold",!t.expand),h("nzTitle",e)("nzExtra",t.ui.cardExtra)("nzSize",t.ui.cardSize||"small")("nzActions",t.ui.cardActions||ii(11,w5))("nzBodyStyle",t.ui.cardBodyStyle)("nzBordered",t.ui.cardBordered||!0)("nzBorderless",t.ui.cardBorderless||!1),f(3),h("ngTemplateOutlet",i)("ngTemplateOutletContext",ii(12,b5))}}function E5(o,n){}function x5(o,n){if(o&1&&_(0,E5,0,0,"ng-template",16),o&2){m();let e=te(1);h("ngTemplateOutlet",e)}}function z5(o,n){if(o&1&&(C(0,"label",2),R(1,"span",3),S()),o&2){let e=n.$implicit,t=m(2);h("nzValue",e.value)("nzDisabled",t.disabled||e.disabled),f(),h("innerHTML",e.label,Dt)}}function O5(o,n){if(o&1&&Cn(0,z5,2,3,"label",2,yn),o&2){let e=m();_n(e.data)}}function D5(o,n){if(o&1&&(C(0,"label",4),R(1,"span",3),S()),o&2){let e=n.$implicit,t=m(2);h("nzValue",e.value)("nzDisabled",t.disabled||e.disabled),f(),h("innerHTML",e.label,Dt)}}function R5(o,n){if(o&1&&Cn(0,D5,2,3,"label",4,yn),o&2){let e=m();_n(e.data)}}function I5(o,n){if(o&1&&R(0,"nz-option",3),o&2){let e=n.$implicit;h("nzLabel",e.label)("nzValue",e.value)("nzHide",e.hide)("nzDisabled",e.disabled)}}function P5(o,n){if(o&1&&Cn(0,I5,1,4,"nz-option",3,yn),o&2){let e=m();_n(e.data)}}function M5(o,n){if(o&1&&R(0,"nz-option",5),o&2){let e=n.$implicit;h("nzLabel",e.label)("nzValue",e.value)("nzDisabled",e.disabled)("nzHide",e.hide)}}function F5(o,n){if(o&1&&(C(0,"nz-option-group",4),Cn(1,M5,1,4,"nz-option",5,yn),S()),o&2){let e=n.$implicit;h("nzLabel",e.label),f(),_n(e.children)}}function A5(o,n){if(o&1&&Cn(0,F5,3,1,"nz-option-group",4,yn),o&2){let e=m();_n(e.data)}}function N5(o,n){if(o&1&&(C(0,"nz-option",2),R(1,"i",6),Y(2),S()),o&2){let e=m();f(2),Ne(" ",e.ui.searchLoadingText," ")}}function L5(o,n){if(o&1){let e=Q();C(0,"input",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.change(i))})("keyup.enter",function(i){I(e);let r=m();return P(r.enter(i))})("focus",function(i){I(e);let r=m();return P(r.focus(i))})("blur",function(i){I(e);let r=m();return P(r.blur(i))}),S()}if(o&2){let e=m();h("disabled",e.disabled)("nzSize",e.ui.size)("nzBorderless",e.ui.borderless)("ngModel",e.value),ze("id",e.id)("disabled",e.disabled)("maxLength",e.schema.maxLength||null)("type",e.ui.type||"text")("placeholder",e.ui.placeholder)("autocomplete",e.ui.autocomplete)("autoFocus",e.ui.autofocus)}}function k5(o,n){}function V5(o,n){if(o&1&&(C(0,"nz-input-group",2),_(1,k5,0,0,"ng-template",4),S()),o&2){let e=m(),t=te(2);h("nzAddOnBefore",e.ui.addOnBefore)("nzAddOnAfter",e.ui.addOnAfter)("nzAddOnBeforeIcon",e.ui.addOnBeforeIcon)("nzAddOnAfterIcon",e.ui.addOnAfterIcon)("nzPrefix",e.ui.prefix)("nzPrefixIcon",e.ui.prefixIcon)("nzSuffix",e.ui.suffix)("nzSuffixIcon",e.ui.suffixIcon),f(),h("ngTemplateOutlet",t)}}function G5(o,n){}function H5(o,n){if(o&1&&_(0,G5,0,0,"ng-template",4),o&2){m();let e=te(2);h("ngTemplateOutlet",e)}}function B5(o,n){if(o&1&&R(0,"span",1),o&2){let e=m();h("innerHTML",e.text,Dt)}}function $5(o,n){if(o&1&&R(0,"span",2),o&2){let e=m();h("innerText",e.text)}}function j5(o,n){if(o&1){let e=Q();C(0,"textarea",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.change(i))})("focus",function(i){I(e);let r=m();return P(r.focus(i))})("blur",function(i){I(e);let r=m();return P(r.blur(i))}),Y(1," "),S()}if(o&2){let e=m();h("disabled",e.disabled)("nzSize",e.ui.size)("ngModel",e.value)("nzAutosize",e.autosize)("nzBorderless",e.ui.borderless),ze("id",e.id)("disabled",e.disabled)("maxLength",e.schema.maxLength||null)("placeholder",e.ui.placeholder)}}function W5(o,n){if(o&1){let e=Q();C(0,"nz-textarea-count",2)(1,"textarea",3),A("ngModelChange",function(i){I(e);let r=m();return P(r.change(i))})("focus",function(i){I(e);let r=m();return P(r.focus(i))})("blur",function(i){I(e);let r=m();return P(r.blur(i))}),Y(2," "),S()()}if(o&2){let e=m();h("nzMaxCharacterCount",e.ui.maxCharacterCount)("nzComputeCharacterCount",e.ui.computeCharacterCount),f(),h("disabled",e.disabled)("nzSize",e.ui.size)("ngModel",e.value)("nzAutosize",e.autosize)("nzBorderless",e.ui.borderless),ze("id",e.id)("disabled",e.disabled)("maxLength",e.schema.maxLength||null)("placeholder",e.ui.placeholder)}}function U5(o,n){}function K5(o,n){if(o&1&&_(0,U5,0,0,"ng-template",4),o&2){m();let e=te(2);h("ngTemplateOutlet",e)}}var q5={formatMap:{"date-time":{widget:"date",showTime:!0,format:"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"},date:{widget:"date",format:"yyyy-MM-dd"},"full-date":{widget:"date",format:"yyyy-MM-dd"},time:{widget:"time",format:"HH:mm:ss.SSSxxx"},"full-time":{widget:"time"},week:{widget:"date",mode:"week",format:"yyyy-ww"},month:{widget:"date",mode:"month",format:"yyyy-MM"},uri:{widget:"upload"},email:{widget:"autocomplete",type:"email"},color:{widget:"string",type:"color"},"":{widget:"string"}},ingoreKeywords:["type","enum"],liveValidate:!0,autocomplete:null,firstVisual:!1,onlyVisual:!1,errors:{},ui:{},button:{submit_type:"primary",reset_type:"default"},uiDateStringFormat:"yyyy-MM-dd HH:mm:ss",uiDateNumberFormat:"T",uiTimeStringFormat:"HH:mm:ss",uiTimeNumberFormat:"T",uiEmailSuffixes:["qq.com","163.com","gmail.com","126.com","aliyun.com"],delay:!1};function gC(o){return o.merge("sf",q5)}var Vo="/";function Dz(o){return o==null}function mo(o,n){return o==null?n:`${o}`!="false"}function rf(o,...n){}function Y5(o,n){let e=/^#\/definitions\/(.*)$/.exec(o);if(e&&e[1]){let t=e[1].split(Vo),i=n;for(let r of t)if(r=r.replace(/~1/g,Vo).replace(/~0/g,"~"),i.hasOwnProperty(r))i=i[r];else throw new Error(`Could not find a definition for ${o}.`);return i}throw new Error(`Could not find a definition for ${o}.`)}function mC(o,n={}){if(o.hasOwnProperty("$ref")){let t=Y5(o.$ref,n),e=o,{$ref:i}=e,r=op(e,["$ref"]);return mC(V(V({},t),r),n)}return o}function Q5(o,n){let e=(t,i)=>{X5(t,i),Object.keys(t.properties).forEach(r=>{let s=t.properties[r],a=`$${r}`;s.items&&e(s.items,i[a].$items),s.properties&&e(s,i[a])})};e(o,n)}function X5(o,n){if(!(o.hasOwnProperty("if")&&o.hasOwnProperty("then")))return null;if(!o.if.properties)throw new Error("if: does not contain 'properties'");let e=Object.keys(o.properties),t=Object.keys(o.if.properties);dC(e,t),dC(e,o.then.required),o.required=o.required.concat(o.then.required);let i=o.hasOwnProperty("else");i&&(dC(e,o.else.required),o.required=o.required.concat(o.else.required));let r={},s={};return t.forEach(a=>{let l=o.if.properties[a].enum;r[a]=l,i&&(s[a]=c=>!l.includes(c))}),o.then.required.forEach(a=>n[`$${a}`].visibleIf=r),i&&o.else.required.forEach(a=>n[`$${a}`].visibleIf=s),o}function dC(o,n){n.forEach(e=>{if(!o.includes(e))throw new Error(`if: properties does not contain '${e}'`)})}function Z5(o,n){if(!Array.isArray(n))return o;let e=u=>u.reduce((d,p)=>(d[p]=!0,d),{}),t=u=>`property [${u.join("', '")}]`,i=e(o),r=e(n),s=n.filter(u=>u!=="*"&&!i[u]);if(s.length)throw new Error(`ui schema order list contains extraneous ${t(s)}`);let a=o.filter(u=>!r[u]),l=n.indexOf("*");if(l===-1){if(a.length)throw new Error(`ui schema order list does not contain ${t(a)}`);return n}if(l!==n.lastIndexOf("*"))throw new Error("ui schema order list contains more than one wildcard item");let c=[...n];return c.splice(l,1,...a),c}function Rz(o,n,e){return Dz(o)||!Array.isArray(o)||o.length===0?[]:(typeof o[0]!="object"&&(o=o.map(t=>({label:t,value:t}))),n&&(Array.isArray(n)||(n=[n]),o.forEach(t=>{~n.indexOf(t.value)&&(t.checked=!0)})),e&&o.forEach(t=>t.disabled=!0),o)}function J5(o,n,e){return Rz(Jr(o||[]),n,e)}function vC(o,n,e,t){return typeof n.asyncData=="function"?n.asyncData(t).pipe(We(i=>Rz(i,e,o.readOnly))):Mn(J5(o.enum,e,o.readOnly))}var of=class{constructor(n,e,t,i,r,s,a,l){this.injector=n,this._options=l,this._errors=null,this._valueChanges=new ct({path:null,pathValue:null,value:null}),this._errorsChanges=new ct(null),this._visible=!0,this._visibilityChanges=new ct(!0),this._objErrors={},this._value=null,this.schema=t,this.ui=i,this.schemaValidator=e.createValidatorFn(t,{ingoreKeywords:this.ui.ingoreKeywords,debug:i.debug}),this.formData=r||t.default,this._parent=s,s?this._root=s.root:this._root=this,this.path=a}get valueChanges(){return this._valueChanges}get errorsChanges(){return this._errorsChanges}get type(){return this.schema.type}get parent(){return this._parent}get root(){return this._root}get value(){return this._value}get errors(){return this._errors}get visible(){return this._visible}get valid(){return this._errors===null||this._errors.length===0}get options(){return this._options}cd(n=!1){this.widget?.detectChanges(n)}updateValueAndValidity(n){n=V({onlySelf:!1,emitValidator:!0,emitValueEvent:!0,updatePath:"",updateValue:null},n),this._updateValue(),n.emitValueEvent&&(n.updatePath=n.updatePath||this.path,n.updateValue=n.updateValue==null?this.value:n.updateValue,this.valueChanges.next({value:this.value,path:n.updatePath,pathValue:n.updateValue})),n.emitValidator&&this.ui.liveValidate===!0&&this._runValidation(),this.parent&&!n.onlySelf&&this.parent.updateValueAndValidity(ot(V({},n),{emitValidator:!1}))}searchProperty(n){let e=this,t=null,i=null;if(n[0]===Vo)t=this.findRoot(),i=t.getProperty(n.substring(1));else for(;i===null&&e.parent!==null;)e=t=e.parent,i=t.getProperty(n);return i}findRoot(){let n=this;for(;n.parent!==null;)n=n.parent;return n}isEmptyData(n){if(Dz(n))return!0;switch(this.type){case"string":return`${n}`.length===0}return!1}_runValidation(){let n,e=this.isEmptyData(this._value);e&&this.ui._required?n=[{keyword:"required"}]:e?n=[]:n=this.schemaValidator(this._value)||[];let t=this.ui.validator;if(typeof t=="function"){let i=t(this.value,this,this.findRoot());if(i instanceof sp){i.subscribe(r=>{this.setCustomErrors(n,r),this.cd(!1)});return}this.setCustomErrors(n,i);return}this._errors=n,this.setErrors(this._errors)}setCustomErrors(n,e){let t=Array.isArray(e)&&e.length>0;t&&e.forEach(i=>{if(!i.message)throw new Error("The custom validator must contain a 'message' attribute to viewed error text");i.keyword=null}),this._errors=t?n.concat(...e):n,this.setErrors(this._errors)}setErrors(n=[],e=!0){let t=Array.isArray(n)?n:[n];if(e&&t&&!this.ui.onlyVisual){let i=this.widget&&this.widget.l.error||{};t=t.map(r=>{let s=r.keyword==null&&r.message?r.message:(this.ui.errors||{})[r.keyword]||this._options.errors[r.keyword]||i[r.keyword]||"";return s&&typeof s=="function"&&(s=s(r)),s&&(~s.indexOf("{")&&r.params&&(s=s.replace(/{([\.a-zA-Z0-9]+)}/g,(a,l)=>r.params[l]||"")),r.message=s),r})}this._errors=t,this._errorsChanges.next(t),this._parent&&this._parent.setParentAndPlatErrors(t,this.path)}setParentAndPlatErrors(n,e){this._objErrors[e]=n;let t=[];Object.keys(this._objErrors).forEach(i=>{let r=this.searchProperty(i);r&&!r.visible||t.push(...this._objErrors[i])}),this.setErrors(t,!1)}setVisible(n){return this._visible=n,this._visibilityChanges.next(n),n&&this.injector.get($e).onStable.pipe(Zr(1)).subscribe(()=>{this.resetValue(this.value,!0)}),this}_bindVisibility(){let n=this.ui.visibleIf;if(typeof n=="object"&&Object.keys(n).length===0)this.setVisible(!1);else if(n!=null){let e=[];for(let t in n)if(n.hasOwnProperty(t)){let i=this.searchProperty(t);if(i){let r=i.valueChanges.pipe(We(l=>{let c=n[t];if(typeof c=="function"){let u=c(l.value,i);if(typeof u=="object"){let d=V({show:!1,required:!1},u),p=this.parent?.schema.required;if(p&&this.propertyId){let g=p.findIndex(v=>v===this.propertyId);d.required?g===-1&&p.push(this.propertyId):g!==-1&&p.splice(g,1),this.ui._required=d.required}return d.show}return u}return c.indexOf("$ANY$")!==-1?l.value&&l.value.length>0:c.indexOf(l.value)!==-1})),s=i._visibilityChanges,a=Fn([r,s]).pipe(We(l=>l[0]&&l[1]));e.push(a)}}Fn(e).pipe(We(t=>this.ui.visibleIfLogical==="and"?t.every(i=>i):t.some(i=>i)),Bt()).subscribe(t=>this.setVisible(t))}}updateFeedback(n=""){this.ui.feedback=n,this.widget?.injector.get(cn).formStatusChanges.next({status:n,hasFeedback:!!n}),this.cd(!0)}},Ec=class o extends of{constructor(){super(...arguments),this.properties=null}getProperty(n){let e=n.indexOf(Vo),t=e!==-1?n.substring(0,e):n,i=this.properties[t];if(i!==null&&e!==-1&&i instanceof o){let r=n.substring(e+1);i=i.getProperty(r)}return i}forEachChild(n){for(let e in this.properties)if(this.properties.hasOwnProperty(e)){let t=this.properties[e];n(t,e)}}forEachChildRecursive(n){this.forEachChild(e=>{n(e),e instanceof o&&e.forEachChildRecursive(n)})}_bindVisibility(){super._bindVisibility(),this._bindVisibilityRecursive()}_bindVisibilityRecursive(){this.forEachChildRecursive(n=>{n._bindVisibility()})}isRoot(){return this===this.root}},sf=class extends Ec{get propertiesId(){return this._propertiesId}constructor(n,e,t,i,r,s,a,l,c){super(n,t,i,r,s,a,l,c),this.formPropertyFactory=e,this._propertiesId=[],this.createProperties()}createProperties(){this.properties={},this._propertiesId=[];let n;try{n=Z5(Object.keys(this.schema.properties),this.ui.order)}catch(e){console.error(`Invalid ${this.schema.title||"root"} object field configuration:`,e)}n.forEach(e=>{this.properties[e]=this.formPropertyFactory.createProperty(this.schema.properties[e],this.ui[`$${e}`],(this.formData||{})[e],this,e),this._propertiesId.push(e)})}setValue(n,e){let t=this.properties;for(let i in n)n.hasOwnProperty(i)&&t[i]&&t[i].setValue(n[i],!0);this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}resetValue(n,e){n=n||this.schema.default||{};let t=this.properties;for(let i in this.schema.properties)this.schema.properties.hasOwnProperty(i)&&t[i].resetValue(n[i],!0);this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}_hasValue(){return this.value!=null&&!!Object.keys(this.value).length}_updateValue(){let n={};this.forEachChild((e,t)=>{e.visible&&e._hasValue()&&(n[t]=e.value)}),this._value=n}},af=class extends Ec{constructor(n,e,t,i,r,s,a,l,c){super(n,t,i,r,s,a,l,c),this.formPropertyFactory=e,this.properties=[]}getProperty(n){let e=n.indexOf(Vo),t=+(e!==-1?n.substring(0,e):n),i=this.properties;if(isNaN(t)||t>=i.length)return;let r=n.substring(e+1);return i[t].getProperty(r)}setValue(n,e){this.properties=[],this.clearErrors(),this.resetProperties(n),this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}resetValue(n,e){this._value=n||this.schema.default||[],this.setValue(this._value,e)}_hasValue(){return!0}_updateValue(){let n=[];this.forEachChild(e=>{e.visible&&n.push(V(V({},this.widget?.cleanValue?null:e.formData),e.value))}),this._value=n}addProperty(n){let e=this.formPropertyFactory.createProperty(Jr(this.schema.items),Jr(this.ui.$items),n,this);return this.properties.push(e),e}resetProperties(n){for(let e of n)this.addProperty(e).resetValue(e,!0)}clearErrors(n){(n||this)._objErrors={}}add(n){let e=this.addProperty(n);return e.resetValue(n,!1),e}remove(n){let e=this.properties;this.clearErrors(),e.splice(n,1),e.forEach((t,i)=>{t.path=[t.parent.path,i].join(Vo),this.clearErrors(t),t instanceof sf&&t.forEachChild(r=>{r.updateValueAndValidity()})}),e.length===0&&this.updateValueAndValidity()}},nd=class extends of{setValue(n,e){this._value=n,this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}resetValue(n,e){n==null&&(n=this.schema.default!==void 0?this.schema.default:this.fallbackValue()),this._value=n,this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0}),this.widget&&(this.widget.reset(n),this.cd(e))}_hasValue(){return this.fallbackValue()!==this.value}_updateValue(){}},pC=class extends nd{fallbackValue(){return null}},hC=class extends nd{fallbackValue(){return null}setValue(n,e){typeof n=="string"&&(n.length?n=n.indexOf(".")>-1?parseFloat(n):parseInt(n,10):n=void 0),this._value=n,this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}},fC=class extends nd{fallbackValue(){return null}setValue(n,e){this._value=n??"",this.cd(e),this.updateValueAndValidity({onlySelf:e,emitValueEvent:!0})}},id=class{constructor(n,e,t){this.injector=n,this.schemaValidatorFactory=e,this.options=gC(t)}createProperty(n,e,t,i=null,r){let s=null,a="";if(i)switch(a+=i.path,i.parent!==null&&(a+=Vo),i.type){case"object":a+=r;break;case"array":a+=i.properties.length;break;default:throw new Error(`Instanciation of a FormProperty with an unknown parent type: ${i.type}`)}else a=Vo;if(n.$ref){let l=mC(n,i.root.schema.definitions);s=this.createProperty(l,e,t,i,a)}else switch((r&&i.schema.required.indexOf(r.split(Vo).pop())!==-1||e.showRequired===!0)&&(e._required=!0),n.title==null&&(n.title=r),(n.type==="string"||n.type==="number")&&!n.format&&!e.format?e.widget==="date"?e._format=n.type==="string"?this.options.uiDateStringFormat:this.options.uiDateNumberFormat:e.widget==="time"&&(e._format=n.type==="string"?this.options.uiTimeStringFormat:this.options.uiTimeNumberFormat):e._format=e.format,n.type){case"integer":case"number":s=new hC(this.injector,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"string":s=new fC(this.injector,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"boolean":s=new pC(this.injector,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"object":s=new sf(this.injector,this,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;case"array":s=new af(this.injector,this,this.schemaValidatorFactory,n,e,t,i,a,this.options);break;default:throw new TypeError(`Undefined type ${n.type}`)}return s.propertyId=r,s instanceof Ec&&this.initializeRoot(s),s}initializeRoot(n){n._bindVisibility()}},rd=class{constructor(){this.onDestroy=new J}destroy(){this.onDestroy.next(!0)}},cf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),Iz=(()=>{let n=class n extends cf{constructor(){if(super(),this.ngZone=ae($e),this.cogSrv=ae(In),!(typeof document=="object"&&document))return;this.options=gC(this.cogSrv);let t=this.options.ajv||{};this.ngZone.runOutsideAngular(()=>{this.ajv=new xz.default(ot(V({allErrors:!0,loopEnum:50},t),{formats:V({"data-url":/^data:([a-z]+\/[a-z0-9-+.]+)?;name=(.*);base64,(.*)$/,color:oo.color,mobile:oo.mobile,"id-card":oo.idCard},t.formats)})),(0,zz.default)(this.ajv)})}createValidatorFn(t,i){let r=[...this.options.ingoreKeywords,...i.ingoreKeywords||[]];return s=>{try{this.ngZone.runOutsideAngular(()=>this.ajv.validate(t,s))}catch{}let a=this.ajv.errors;return this.options&&r&&a&&(a=a.filter(l=>r.indexOf(l.keyword)===-1)),a}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),Wa=class{constructor(){this._widgets={}}get widgets(){return this._widgets}setDefault(n){this.defaultWidget=n}register(n,e){this._widgets[n]=e}has(n){return this._widgets.hasOwnProperty(n)}getType(n){return this.has(n)?this._widgets[n]:this.defaultWidget}},Pz=(()=>{let n=class n{constructor(){this.registry=ae(Wa)}createWidget(t,i){this.registry.has(i);let r=this.registry.getType(i);return t.createComponent(r)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})(),e6=0,uf=(()=>{let n=class n{constructor(){this.widgetFactory=ae(Pz),this.terminator=ae(rd),this.destroy$=new J,this.widget=null,this.footer=null}onWidgetInstanciated(t){this.widget=t;let i=`_sf-${e6++}`,r=this.formProperty.ui;this.widget.formProperty=this.formProperty,this.widget.schema=this.formProperty.schema,this.widget.ui=r,this.widget.id=i,this.formProperty.widget=t}ngOnInit(){this.terminator.onDestroy.subscribe(()=>this.ngOnDestroy())}ngOnChanges(){let t=this.formProperty;this.ref=this.widgetFactory.createWidget(this.container,t.ui.widget||t.schema.type),this.onWidgetInstanciated(this.ref.instance)}ngOnDestroy(){let{destroy$:t}=this;t.next(),t.complete(),this.ref.destroy()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sf-item"]],viewQuery:function(i,r){if(i&1&&xe(f4,7,Tn),i&2){let s;ce(s=ue())&&(r.container=s.first)}},hostVars:2,hostBindings:function(i,r){i&2&&k("sf__item",!0)},inputs:{formProperty:"formProperty",footer:"footer"},exportAs:["sfItem"],features:[Ve([cn]),oe],decls:3,vars:1,consts:[["target",""],[4,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,g4,0,0,"ng-template",null,0,_e)(2,m4,1,0,"ng-container",1),i&2&&(f(2),h("ngTemplateOutlet",r.footer))},dependencies:[Be],encapsulation:2});let o=n;return o})(),Mz=(()=>{let n=class n{constructor(){this.el=ae(de).nativeElement,this.render=ae(He),this._inited=!1}init(){if(!this._inited||this.num==null||this.num<=0)return;let t=this.el,i=t.querySelector(".ant-row")||t;this.render.addClass(i,"sf__fixed");let r=i.querySelector(".ant-form-item-label"),s=i.querySelector(".ant-form-item-control-wrapper,.ant-form-item-control"),a=`${this.num}px`;r?(this.render.setStyle(r,"flex",`0 0 ${a}`),this.render.setStyle(s,"max-width",`calc(100% - ${a})`)):this.render.setStyle(s,"margin-left",a)}ngAfterViewInit(){this._inited=!0,this.init()}ngOnChanges(){this._inited&&this.init()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","fixed-label",""]],inputs:{num:[le.HasDecoratorInputTransform,"fixed-label","num",t=>fn(t,0)]},features:[fi,oe]});let o=n;return o})();function t6(o,n,e){return new id(o,n,e)}var n6=(()=>{let n=class n{get btnGrid(){return this._btn.render.grid}set mode(t){switch(t){case"search":this.layout="inline",this.firstVisual=!1,this.liveValidate=!1,this._btn&&(this._btn.submit=this._btn.search);break;case"edit":this.layout="horizontal",this.firstVisual=!1,this.liveValidate=!0,this._btn&&(this._btn.submit=this._btn.edit);break}this._mode=t}get mode(){return this._mode}get valid(){return this._valid}get value(){return this._item}getProperty(t){return this.rootProperty?.searchProperty(t)}getValue(t){return this.getProperty(t)?.value}setValue(t,i){let r=this.getProperty(t);if(!r)throw new Error(`Invalid path: ${t}`);return r.resetValue(i,!1),this}setDisabled(t,i){let r=this.getProperty(t);if(!r)throw new Error(`Invalid path: ${t}`);return r.schema.readOnly=i,r.widget.detectChanges(),this}setRequired(t,i){let r=this.getProperty(t);if(!r)throw new Error(`Invalid path: ${t}`);let s=t.split(Vo).pop(),a=r.parent?.schema.required||[],l=a.findIndex(c=>c===s);return i?l===-1&&a.push(s):l!==-1&&a.splice(l,1),r.parent.schema.required=a,r.ui._required=i,r.widget.detectChanges(),this.validator({onlyRoot:!1}),this}updateFeedback(t,i=""){return this.getProperty(t)?.updateFeedback(i),this}onSubmit(t){t.preventDefault(),t.stopPropagation(),this.liveValidate||this.validator(),this.valid&&this.formSubmit.emit(this.value)}constructor(t){this.formPropertyFactory=ae(id),this.terminator=ae(rd),this.dom=ae(Ro),this.cdr=ae(fe),this.localeSrv=ae(cu),this.aclSrv=ae(pp,{optional:!0}),this.i18nSrv=ae(Rs,{optional:!0}),this.platform=ae(gn),this._renders=new Map,this._valid=!0,this._inited=!1,this.locale={},this.rootProperty=null,this.layout="horizontal",this.button={},this.liveValidate=!0,this.firstVisual=!0,this.onlyVisual=!1,this.compact=!1,this.loading=!1,this.disabled=!1,this.noColon=!1,this.cleanValue=!1,this.delay=!1,this.formValueChange=new O,this.formChange=new O,this.formSubmit=new O,this.formReset=new O,this.formError=new O,this.options=gC(t),this.liveValidate=this.options.liveValidate,this.firstVisual=this.options.firstVisual,this.autocomplete=this.options.autocomplete,this.delay=this.options.delay,this.localeSrv.change.pipe(li()).subscribe(()=>{this.locale=this.localeSrv.getData("sf"),this._inited&&(this.validator({emitError:!1,onlyRoot:!1}),this.coverButtonProperty(),this.cdr.markForCheck())});let i=[this.aclSrv?this.aclSrv.change:null,this.i18nSrv?this.i18nSrv.change:null].filter(r=>r!=null);i.length>0&&_t(...i).pipe(Qe(()=>this._inited),li()).subscribe(()=>this.refreshSchema())}fanyi(t){return(this.i18nSrv?this.i18nSrv.fanyi(t):"")||t}inheritUI(t){["optionalHelp"].filter(i=>!!this._defUi[i]).forEach(i=>t[i]=V(V({},this._defUi[i]),t[i]))}coverProperty(){let t=this.layout==="horizontal",i=Jr(this.schema),{definitions:r}=i,s=(a,l,c,u,d)=>{Array.isArray(a.required)||(a.required=[]),Object.keys(a.properties).forEach(p=>{let g="$",v=g+p,y=mC(a.properties[p],r),x=V(V({},y.ui),c[v]),E=V(V(V(V(ot(V(V({},this._defUi),u),{visibleIf:void 0,hidden:void 0,optional:void 0,optionalHelp:void 0,widget:y.type}),y.format&&this.options.formatMap[y.format]),typeof y.ui=="string"?{widget:y.ui}:null),!y.format&&!y.ui&&Array.isArray(y.enum)&&y.enum.length>0?{widget:"select"}:null),x);if(Object.keys(E).filter(z=>z.startsWith(g)).forEach(z=>delete E[z]),t?u.spanLabelFixed?x.spanLabelFixed||(E.spanLabelFixed=u.spanLabelFixed):(E.spanLabel||(E.spanLabel=typeof u.spanLabel>"u"?5:u.spanLabel),E.spanControl||(E.spanControl=typeof u.spanControl>"u"?19:u.spanControl),E.offsetControl||(E.offsetControl=typeof u.offsetControl>"u"?null:u.offsetControl)):(E.spanLabel=null,E.spanControl=null,E.offsetControl=null),this.layout==="inline"&&delete E.grid,this.layout!=="horizontal"&&(E.spanLabelFixed=null),E.spanLabelFixed!=null&&E.spanLabelFixed>0&&(E.spanLabel=null,E.spanControl=null),E.widget==="date"&&E.end!=null){let z=a.properties[E.end];z?z.ui=ot(V({},z.ui),{widget:E.widget,hidden:!0}):E.end=null}if(this.inheritUI(E),E.optionalHelp){typeof E.optionalHelp=="string"&&(E.optionalHelp={text:E.optionalHelp});let z=E.optionalHelp=V({text:"",icon:"question-circle",placement:"top",trigger:"hover",mouseEnterDelay:.15,mouseLeaveDelay:.1},E.optionalHelp);z.i18n&&(z.text=this.fanyi(z.i18n)),z.text||(E.optionalHelp=void 0)}if(E.i18n&&(y.title=this.fanyi(E.i18n)),E.descriptionI18n&&(y.description=this.fanyi(E.descriptionI18n)),y.description&&(E._description=this.dom.bypassSecurityTrustHtml(y.description)),E.hidden=typeof E.hidden=="boolean"?E.hidden:!1,E.hidden===!1&&E.acl&&this.aclSrv&&!this.aclSrv.can(E.acl)&&(E.hidden=!0),d[v]=E,delete y.ui,E.hidden===!0){let z=a.required.indexOf(p);z!==-1&&a.required.splice(z,1)}y.items&&(E.$items=V(V(V({},y.items.ui),c[v]),E.$items),s(y.items,y.items,c[v]?.$items??{},E.$items,E.$items)),y.properties&&Object.keys(y.properties).length&&s(y,a,c[v]||{},E,E)})};this.ui==null&&(this.ui={}),this._defUi=V(V(V({onlyVisual:this.options.onlyVisual,size:this.options.size,liveValidate:this.liveValidate},this.options.ui),i.ui),this.ui["*"]),this.onlyVisual===!0&&(this._defUi.onlyVisual=!0),this.layout==="inline"&&delete this._defUi.grid,this._ui=V({},this._defUi),s(i,i,this.ui,this.ui,this._ui),Q5(i,this._ui),this._schema=i,delete i.ui,rf(this._ui,"cover schema & ui",this._ui,i)}coverButtonProperty(){this._btn=V(V(V({render:{size:"default"}},this.locale),this.options.button),this.button);let t=Object.keys(this._ui).find(r=>r.startsWith("$")),i=this._btn.render;if(this.layout==="horizontal"){let r=t?this._ui[t]:this._defUi;i.grid||(i.grid={offset:r.spanLabel,span:r.spanControl}),i.spanLabelFixed==null&&(i.spanLabelFixed=r.spanLabelFixed),!i.class&&typeof r.spanLabelFixed=="number"&&r.spanLabelFixed>0&&(i.class="text-center")}else i.grid={};this._mode&&(this.mode=this._mode),rf(this._ui,"button property",this._btn)}ngOnInit(){this.platform.isBrowser&&(this.validator(),this._inited=!0)}ngOnChanges(t){if(!this.platform.isBrowser)return;let i=["disabled","loading"];if(Object.keys(t).every(r=>i.includes(r))){this.cdr.detectChanges();return}this.delay||this.refreshSchema()}_addTpl(t,i){this._inited&&(this._renders.has(t)||(this._renders.set(t,i),this.attachCustomRender()))}attachCustomRender(){this._renders.forEach((t,i)=>{let r=this.rootProperty?.searchProperty(i);r!=null&&(r.ui._render=t)})}validator(t={emitError:!0,onlyRoot:!0}){if(this.rootProperty==null||!this.platform.isBrowser)return!1;let i=s=>{s._runValidation(),!(!(s instanceof Ec)||!s.properties)&&(Array.isArray(s.properties)?s.properties.forEach(a=>i(a)):Object.keys(s.properties).forEach(a=>i(s.properties[a])))};t.onlyRoot?this.rootProperty._runValidation():i(this.rootProperty);let r=this.rootProperty.errors;return this._valid=!(r&&r.length),t.emitError&&!this._valid&&this.formError.emit(r),this.cdr.detectChanges(),this._valid}refreshSchema(t,i){if(!this.platform.isBrowser)return this;if(t&&(this.schema=t),i&&(this.ui=i),!this.schema||typeof this.schema.properties>"u")throw new Error("Invalid Schema");if(this.schema.ui&&typeof this.schema.ui=="string")throw new Error("Don't support string with root ui property");this.schema.type="object",this._formData=V({},this.formData),this._inited&&this.terminator.destroy(),this.cleanRootSub(),this.coverProperty(),this.coverButtonProperty(),this.rootProperty=this.formPropertyFactory.createProperty(this._schema,this._ui,this.formData),this.attachCustomRender(),this.cdr.detectChanges(),this.reset();let r=!0;return this.rootProperty.valueChanges.subscribe(s=>{if(this._item=V(V({},this.cleanValue?null:this.formData),s.value),r){r=!1;return}this.formChange.emit(this._item),this.formValueChange.emit({value:this._item,path:s.path,pathValue:s.pathValue})}),this.rootProperty.errorsChanges.subscribe(s=>{this._valid=!(s&&s.length),this.formError.emit(s),this.cdr.detectChanges()}),this}reset(t=!1){return this.rootProperty==null||!this.platform.isBrowser?this:(this.rootProperty.resetValue(this.formData,!1),Promise.resolve().then(()=>this.cdr.detectChanges()),t&&this.formReset.emit(this.value),this)}cleanRootSub(){this.rootProperty&&(this.rootProperty.errorsChanges.unsubscribe(),this.rootProperty.valueChanges.unsubscribe())}ngOnDestroy(){this.cleanRootSub(),this.terminator.destroy()}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["sf"],["","sf",""]],hostVars:16,hostBindings:function(i,r){i&2&&k("sf",!0)("sf__inline",r.layout==="inline")("sf__horizontal",r.layout==="horizontal")("sf__search",r.mode==="search")("sf__edit",r.mode==="edit")("sf__no-error",r.onlyVisual)("sf__no-colon",r.noColon)("sf__compact",r.compact)},inputs:{layout:"layout",schema:"schema",ui:"ui",formData:"formData",button:"button",liveValidate:[le.HasDecoratorInputTransform,"liveValidate","liveValidate",it],autocomplete:"autocomplete",firstVisual:[le.HasDecoratorInputTransform,"firstVisual","firstVisual",it],onlyVisual:[le.HasDecoratorInputTransform,"onlyVisual","onlyVisual",it],compact:[le.HasDecoratorInputTransform,"compact","compact",it],mode:"mode",loading:[le.HasDecoratorInputTransform,"loading","loading",it],disabled:[le.HasDecoratorInputTransform,"disabled","disabled",it],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",it],cleanValue:[le.HasDecoratorInputTransform,"cleanValue","cleanValue",it],delay:[le.HasDecoratorInputTransform,"delay","delay",it]},outputs:{formValueChange:"formValueChange",formChange:"formChange",formSubmit:"formSubmit",formReset:"formReset",formError:"formError"},exportAs:["sf"],features:[Ve([Pz,{provide:id,useFactory:t6,deps:[$n,cf,In]},rd]),fi,oe],ngContentSelectors:Oz,decls:6,vars:3,consts:[["con",""],["btnTpl",""],["nz-form","",3,"nzLayout","submit"],[3,"formProperty","footer"],["class","sf-btns",3,"ngClass","fixed-label"],[1,"sf-btns",3,"ngClass","fixed-label"],["nz-col","",1,"ant-form-item-control",3,"nzSpan","nzOffset","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],["type","submit","nz-button","","data-type","submit",3,"nzType","nzSize","nzLoading","disabled"],["nz-icon","",3,"nzType","nzTheme","nzTwotoneColor","nzIconfont"],["type","button","nz-button","","data-type","reset",3,"nzType","nzSize","disabled"],["type","button","nz-button","","data-type","reset",3,"nzType","nzSize","disabled","click"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),_(0,v4,1,0,"ng-template",null,0,_e)(2,O4,2,1,"ng-template",null,1,_e),C(4,"form",2),A("submit",function(a){return r.onSubmit(a)}),_(5,D4,1,2,"sf-item",3),S()),i&2&&(f(4),h("nzLayout",r.layout),ze("autocomplete",r.autocomplete),f(),ie(5,r.rootProperty?5:-1))},dependencies:[St,Be,ob,Zw,zm,eo,yi,hr,sc,Aa,_h,Na,Fe,uf,Mz],encapsulation:2,changeDetection:0});let o=n;return o})(),$r=(()=>{let n=class n{constructor(){this.statusSrv=ae(cn),this._showTitle=!1,this.title=null}set showTitle(t){this._showTitle=!!t}get t(){return this.title===null?this.schema.title:this.title}get oh(){return this.ui.optionalHelp}ngOnChanges(){let t=!!this.error;this.statusSrv.formStatusChanges.next({status:t?"error":"",hasFeedback:!!this.ui.feedback})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sf-item-wrap"]],inputs:{id:"id",schema:"schema",ui:"ui",showError:"showError",error:"error",showTitle:"showTitle",title:"title"},features:[oe],ngContentSelectors:Oz,decls:8,vars:21,consts:[["nz-col","","class","ant-form-item-label",3,"nzSpan"],["nz-col","",1,"ant-form-item-control",3,"nzSpan","nzOffset"],[1,"ant-form-item-control-input"],[1,"ant-form-item-control-input-content"],["class","ant-form-item-explain ant-form-item-explain-connected"],["class","ant-form-item-extra",3,"innerHTML"],["nz-col","",1,"ant-form-item-label",3,"nzSpan"],[3,"ant-form-item-required"],[1,"sf__label-text"],["class","sf__optional"],[1,"sf__optional"],["nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipColor","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],["role","alert",1,"ant-form-item-explain-error"],[1,"ant-form-item-extra",3,"innerHTML"]],template:function(i,r){i&1&&(Pe(),C(0,"nz-form-item"),_(1,M4,2,2,"div",0),C(2,"div",1)(3,"div",2)(4,"div",3),Ie(5),S()(),_(6,F4,3,2,"div",4)(7,A4,1,1,"div",5),S()()),i&2&&(Re("width",r.ui.width,"px"),k("ant-form-item-has-error",r.showError)("ant-form-item-with-help",r.showError)("ant-form-item-has-success",r.ui.feedback==="success")("ant-form-item-has-warning",r.ui.feedback==="warning")("ant-form-item-has-error",r.ui.feedback==="error")("ant-form-item-is-validating",r.ui.feedback==="validating")("ant-form-item-has-feedback",r.ui.feedback),f(),ie(1,r._showTitle?1:-1),f(),h("nzSpan",r.ui.spanControl)("nzOffset",r.ui.offsetControl),f(4),ie(6,!r.ui.onlyVisual&&r.showError?6:-1),f(),ie(7,r.schema.description?7:-1))},dependencies:[yi,sc,Aa,Na,Fe,Si],encapsulation:2,data:{animation:[jl]}});let o=n;return o})();var df=(()=>{let n=class n{constructor(){this.cd=ae(fe),this.injector=ae($n),this.sfItemComp=ae(uf),this.sfComp=ae(n6),this.showError=!1,this.id=""}get cls(){return this.ui.class||""}get disabled(){return!!(this.schema.readOnly===!0||this.sfComp.disabled)}get l(){return this.formProperty.root.widget.sfComp.locale}get oh(){return this.ui.optionalHelp}get dom(){return this.injector.get(Ro)}get cleanValue(){return this.sfComp?.cleanValue}ngAfterViewInit(){this.formProperty.errorsChanges.pipe(F(this.sfItemComp.destroy$)).subscribe(t=>{if(t==null)return;rf(this.ui,"errorsChanges",this.formProperty.path,t);let i=this.sfComp?.firstVisual;(i||!i&&this.sfComp?._inited)&&(this.showError=t.length>0,this.error=this.showError?t[0].message:"",this.cd.detectChanges())}),this.afterViewInit()}setValue(t){this.formProperty.setValue(t,!1),rf(this.ui,"valueChanges",this.formProperty.path,this.formProperty)}get value(){return this.formProperty.value}detectChanges(t=!1){t?this.cd.markForCheck():this.formProperty.root.widget?.cd.markForCheck()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,hostVars:2,hostBindings:function(i,r){i&2&&cr(r.cls)}});let o=n;return o})(),Fz=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),Go=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),i6=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}ngAfterViewInit(){this.formProperty.errorsChanges.pipe(F(this.sfItemComp.destroy$)).subscribe(()=>this.cd.detectChanges())}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),r6=(()=>{let n=class n extends df{reset(t){}afterViewInit(){}ngAfterViewInit(){this.formProperty.errorsChanges.pipe(F(this.sfItemComp.destroy$)).subscribe(()=>this.cd.detectChanges())}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275dir=Se({type:n,features:[Xe]});let o=n;return o})(),o6=(()=>{let n=class n extends i6{constructor(){super(...arguments),this.arraySpan=8}get addDisabled(){return this.disabled||this.schema.maxItems!=null&&this.formProperty.properties.length>=this.schema.maxItems}get showRemove(){return!(this.disabled||!this.removeTitle||this.schema.minItems!=null&&this.formProperty.properties.length<=this.schema.minItems)}ngOnInit(){let{grid:t,addTitle:i,addType:r,removable:s,removeTitle:a}=this.ui;t&&t.arraySpan&&(this.arraySpan=t.arraySpan),this.addTitle=this.dom.bypassSecurityTrustHtml(i||this.l.addText),this.addType=r||"dashed",this.removeTitle=s===!1?null:a||this.l.removeText}reValid(){this.formProperty.updateValueAndValidity({onlySelf:!1,emitValueEvent:!1,emitValidator:!0})}addItem(){let t=this.formProperty.add({});this.reValid(),this.ui.add?.(t)}removeItem(t){this.formProperty.remove(t),this.reValid(),this.ui.remove?.(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-array"]],hostVars:2,hostBindings:function(i,r){i&2&&k("sf__array",!0)},features:[Xe],decls:8,vars:10,consts:[["nz-col","","class","ant-form-item-label",3,"nzSpan"],["nz-col","",1,"ant-form-item-control-wrapper",3,"nzSpan","nzOffset"],[1,"ant-form-item-control"],["nz-row","",1,"sf__array-container"],[4,"ngFor","ngForOf"],["class","ant-form-explain"],["class","ant-form-extra",3,"innerHTML"],["nz-col","",1,"ant-form-item-label",3,"nzSpan"],[1,"sf__optional"],["nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[1,"sf__array-add"],["type","button","nz-button","",3,"nzType","disabled","innerHTML","click"],["nz-col","","class","sf__array-item",3,"nzSpan"],["nz-col","",1,"sf__array-item",3,"nzSpan"],[3,"formProperty"],["class","sf__array-remove"],[1,"sf__array-remove",3,"click"],["nz-icon","","nzType","delete"],[1,"ant-form-explain"],[1,"ant-form-extra",3,"innerHTML"]],template:function(i,r){i&1&&(C(0,"nz-form-item"),_(1,L4,8,9,"div",0),C(2,"div",1)(3,"div",2)(4,"div",3),_(5,G4,2,1,"ng-container",4),S(),_(6,H4,2,1,"div",5)(7,B4,1,1,"div",6),S()()()),i&2&&(k("ant-form-item-with-help",r.showError),f(),ie(1,r.schema.title?1:-1),f(),h("nzSpan",r.ui.spanControl)("nzOffset",r.ui.offsetControl),f(),k("has-error",r.showError),f(2),h("ngForOf",r.formProperty.properties),f(),ie(6,!r.ui.onlyVisual&&r.showError?6:-1),f(),ie(7,r.schema.description?7:-1))},dependencies:[lt,eo,yi,hr,um,sc,Aa,Na,Fe,Si,uf],encapsulation:2});let o=n;return o})(),s6=(()=>{let n=class n extends Go{};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-boolean"]],features:[Xe],decls:2,vars:12,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"ngModel","nzDisabled","nzSize","nzCheckedChildren","nzUnCheckedChildren","nzLoading","ngModelChange"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-switch",1),A("ngModelChange",function(a){return r.setValue(a)}),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("ngModel",r.value)("nzDisabled",r.disabled)("nzSize",r.ui.size)("nzCheckedChildren",r.ui.checkedChildren)("nzUnCheckedChildren",r.ui.unCheckedChildren)("nzLoading",r.ui.loading))},dependencies:[Kt,Rt,wv,$r],encapsulation:2});let o=n;return o})(),a6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.data=[],this.allChecked=!1,this.indeterminate=!1,this.labelTitle="",this.inited=!1}reset(t){this.inited=!1,vC(this.schema,this.ui,t).subscribe(i=>{this.data=i,this.allChecked=!1,this.indeterminate=!1,this.labelTitle=i.length===0?"":this.schema.title;let{span:r}=this.ui;this.grid_span=r&&r>0?r:0,this.updateAllChecked(),this.inited=!0,this.detectChanges()})}_setValue(t){this.setValue(t),this.detectChanges(),this.notifyChange(t)}notifySet(){let t=this.data.filter(i=>i.checked);this.updateAllChecked().setValue(t.map(i=>i.value)),this.notifyChange(t)}groupInGridChange(t){this.data.forEach(i=>i.checked=t.indexOf(i.value)!==-1),this.notifySet()}onAllChecked(){this.data.forEach(t=>t.checked=this.allChecked),this.notifySet()}updateAllChecked(){return this.data.every(t=>t.checked!==!0)?(this.allChecked=!1,this.indeterminate=!1):this.data.every(t=>t.checked===!0)?(this.allChecked=!0,this.indeterminate=!1):this.indeterminate=!0,this.detectChanges(),this}notifyChange(t){this.ui.change&&this.ui.change(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-checkbox"]],features:[Xe],decls:4,vars:8,consts:[["all",""],[3,"id","schema","ui","showError","error","showTitle","title"],["nz-checkbox","","class","sf__checkbox-all mr-sm",3,"ngModel","nzIndeterminate"],["nz-checkbox","",1,"sf__checkbox-all","mr-sm",3,"ngModel","nzIndeterminate","ngModelChange"],["nz-checkbox","",3,"nzDisabled","ngModel"],["nz-checkbox","",3,"nzDisabled","ngModel","ngModelChange"],[1,"sf__optional"],["nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[3,"ngTemplateOutlet"],[3,"ngModel","ngModelChange"],[1,"sf__checkbox-list",3,"nzOnChange"],["nz-row",""],["nz-col","",3,"nzSpan"],["nz-checkbox","",3,"nzValue","ngModel","nzDisabled"]],template:function(i,r){i&1&&(_(0,j4,1,1,"ng-template",null,0,_e),C(2,"sf-item-wrap",1),_(3,e5,2,1),S()),i&2&&(f(2),h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",!0)("title",r.labelTitle),f(),ie(3,r.inited?3:-1))},dependencies:[Be,Kt,Rt,yi,Bi,Pm,Im,sc,Aa,Fe,Si,$r],encapsulation:2});let o=n;return o})(),l6=(()=>{let n=class n extends Go{};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-custom"]],features:[Xe],decls:2,vars:12,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,t5,0,0,"ng-template",1),S()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("ngTemplateOutlet",r.ui._render)("ngTemplateOutletContext",iu(8,n5,r,r.schema,r.ui)))},dependencies:[Be,$r],encapsulation:2});let o=n;return o})(),c6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.flatRange=!1,this.displayValue=null}ngOnInit(){let{mode:t,end:i,displayFormat:r,allowClear:s,showToday:a}=this.ui;if(this.mode=t||"date",this.flatRange=i!=null,this.startFormat=this.ui._format,this.flatRange){this.mode="range";let l=this.endProperty.ui;this.endFormat=l.format?l._format:this.startFormat}if(r)this.displayFormat=r;else switch(this.mode){case"year":this.displayFormat="yyyy";break;case"month":this.displayFormat="yyyy-MM";break;case"week":this.displayFormat="yyyy-ww";break}this.i={allowClear:mo(s,!0),showToday:mo(a,!0)}}reset(t){let i={formatString:this.startFormat,defaultValue:null};if(Array.isArray(t)?t=t.map(r=>Ep(r,i)):t=Ep(t,i),this.flatRange){let r=Ep(this.endProperty.formData,{formatString:this.endFormat||this.startFormat,defaultValue:null});this.displayValue=t==null||r==null?[]:[t,r]}else this.displayValue=t;this.detectChanges(),this.displayValue&&setTimeout(()=>this._change(this.displayValue,!1))}_change(t,i=!0){if(i&&this.ui.change&&this.ui.change(t),t==null||Array.isArray(t)&&t.length<2){this.setValue(null),this.setEnd(null);return}let r=Array.isArray(t)?[Sp(t[0],this.startFormat),Sp(t[1],this.endFormat||this.startFormat)]:Sp(t,this.startFormat);this.flatRange?(this.setValue(r[0]),this.setEnd(r[1])):this.setValue(r)}_openChange(t){this.ui.onOpenChange&&this.ui.onOpenChange(t)}_ok(t){this.ui.onOk&&this.ui.onOk(t)}get endProperty(){return this.formProperty.parent.properties[this.ui.end]}setEnd(t){this.flatRange&&(this.endProperty.setValue(t,!0),this.endProperty.updateValueAndValidity())}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-date"]],features:[Xe],decls:6,vars:7,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzRenderExtraFooter","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzDisabledTime","nzRenderExtraFooter","nzRanges","nzShowTime","nzSeparator","nzShowWeekNumber","nzMode","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange","nzOnOk"],[3,"nzId","nzDisabled","nzSize","nzFormat","ngModel","nzAllowClear","ngClass","nzDisabledDate","nzLocale","nzPlaceHolder","nzPopupStyle","nzDropdownClassName","nzDisabledTime","nzRenderExtraFooter","nzShowTime","nzShowToday","nzShowWeekNumber","nzInputReadOnly","nzInline","ngModelChange","nzOnOpenChange","nzOnOk"]],template:function(i,r){if(i&1&&(C(0,"sf-item-wrap",0),_(1,i5,1,15)(2,r5,1,15)(3,o5,1,14)(4,s5,1,21)(5,a5,1,19),S()),i&2){let s;h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),ie(1,(s=r.mode)==="year"?1:s==="month"?2:s==="week"?3:s==="range"?4:5)}},dependencies:[St,Kt,Rt,ps,vh,_T,wT,ST,$r],encapsulation:2});let o=n;return o})(),Tz=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.formatter=t=>t,this.parser=t=>t,this.width=""}ngOnInit(){let{minimum:t,exclusiveMinimum:i,maximum:r,exclusiveMaximum:s,multipleOf:a,type:l}=this.schema;this.step=a||1,typeof t<"u"&&(this.min=i?t+this.step:t),typeof r<"u"&&(this.max=s?r-this.step:r),l==="integer"&&(this.min=Math.trunc(this.min),this.max=Math.trunc(this.max),this.step=Math.trunc(this.step));let c=this.ui;c.prefix!=null&&(c.formatter=u=>u==null?"":`${c.prefix} ${u}`,c.parser=u=>u.replace(`${c.prefix} `,"")),c.unit!=null&&(c.formatter=u=>u==null?"":`${u} ${c.unit}`,c.parser=u=>u.replace(` ${c.unit}`,"")),c.formatter&&(this.formatter=c.formatter),c.parser&&(this.parser=c.parser),this.width=typeof c.widgetWidth=="number"?`${c.widgetWidth}px`:c.widgetWidth??"90px"}_setValue(t){this.setValue(this.schema.type==="integer"?Math.floor(t):t),this.ui.change&&this.ui.change(this.value)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-number"]],features:[Xe],decls:2,vars:22,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzId","ngModel","nzDisabled","nzSize","nzMin","nzMax","nzStep","nzFormatter","nzParser","nzPrecision","nzPlaceHolder","ngClass","ngModelChange"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-input-number",1),A("ngModelChange",function(a){return r._setValue(a)}),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),Re("width",r.width),h("nzId",r.id)("ngModel",r.value)("nzDisabled",r.disabled)("nzSize",r.ui.size)("nzMin",r.min)("nzMax",r.max)("nzStep",r.step)("nzFormatter",r.formatter)("nzParser",r.parser)("nzPrecision",r.ui.precision)("nzPlaceHolder",r.ui.placeholder||"")("ngClass",yt(20,l5,r.ui.hideStep)))},dependencies:[St,Kt,Rt,ic,$r],encapsulation:2});let o=n;return o})(),u6=(()=>{let n=class n extends r6{constructor(){super(...arguments),this.type="default",this.list=[],this.showExpand=!0,this.expand=!0}ngOnInit(){let{formProperty:t,ui:i}=this,{grid:r,showTitle:s,type:a}=i;this.showExpand=mo(i.showExpand,!0),this.expand=mo(i.expand,!0),this.type=a??"default",(this.type==="card"||!t.isRoot()&&!(t.parent instanceof af)&&s===!0)&&(this.title=this.schema.title),this.grid=r;let l=[];for(let c of t.propertiesId){let u=t.properties[c],d={property:u,grid:u.ui.grid||r||{},spanLabelFixed:u.ui.spanLabelFixed,show:u.ui.hidden===!1};l.push(d)}this.list=l}changeExpand(){this.showExpand&&(this.expand=!this.expand,this.detectChanges(!0))}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-object"]],features:[Xe],decls:4,vars:1,consts:[["default",""],["class","sf__object-card",3,"nzTitle","nzExtra","nzSize","nzActions","nzBodyStyle","nzBordered","nzBorderless","sf__object-card-fold"],["class","sf__title"],["nz-row","",3,"nzGutter"],[1,"sf__title"],["nz-col","",3,"nzSpan","nzOffset","nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],[3,"formProperty","fixed-label"],[1,"sf__object-card",3,"nzTitle","nzExtra","nzSize","nzActions","nzBodyStyle","nzBordered","nzBorderless"],["cardTitleTpl",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"click"],["nz-icon","","class","mr-xs text-xs",3,"nzType"],["class","sf__optional"],["nz-icon","",1,"mr-xs","text-xs",3,"nzType"],[1,"sf__optional"],["s","","nz-tooltip","","nz-icon","",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipTrigger","nzTooltipColor","nzTooltipOverlayClassName","nzTooltipOverlayStyle","nzTooltipMouseEnterDelay","nzTooltipMouseLeaveDelay","nzType"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,m5,3,2,"ng-template",null,0,_e)(2,T5,4,13,"nz-card",1)(3,x5,1,1),i&2&&(f(2),ie(2,r.type==="card"?2:3))},dependencies:[Be,yi,um,sc,Aa,Fe,Si,uf,Mz],encapsulation:2});let o=n;return o})(),d6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.data=[]}reset(t){this.styleType=(this.ui.styleType||"default")==="default",vC(this.schema,this.ui,t).subscribe(i=>{this.data=i,this.detectChanges()})}_setValue(t){this.setValue(t),this.ui.change&&this.ui.change(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-radio"]],features:[Xe],decls:4,vars:11,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzSize","nzName","ngModel","nzButtonStyle","ngModelChange"],["nz-radio","",3,"nzValue","nzDisabled"],[3,"innerHTML"],["nz-radio-button","",3,"nzValue","nzDisabled"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-radio-group",1),A("ngModelChange",function(a){return r._setValue(a)}),_(2,O5,2,0)(3,R5,2,0),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("nzSize",r.ui.size)("nzName",r.id)("ngModel",r.value)("nzButtonStyle",r.ui.buttonStyle||"outline"),f(),ie(2,r.styleType?2:3))},dependencies:[Kt,Rt,ls,Vm,yb,$r],encapsulation:2});let o=n;return o})(),p6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.search$=new J,this.data=[],this.hasGroup=!1,this.loading=!1}checkGroup(t){this.hasGroup=(t||[]).filter(i=>i.group===!0).length>0}ngOnInit(){let{autoClearSearchValue:t,borderless:i,autoFocus:r,dropdownMatchSelectWidth:s,serverSearch:a,maxMultipleCount:l,mode:c,showSearch:u,tokenSeparators:d,maxTagCount:p,compareWith:g,optionHeightPx:v,optionOverflowSize:y,showArrow:x}=this.ui;this.i={autoClearSearchValue:mo(t,!0),borderless:mo(i,!1),autoFocus:mo(r,!1),dropdownMatchSelectWidth:mo(s,!0),serverSearch:mo(a,!1),maxMultipleCount:l||1/0,mode:c||"default",showSearch:mo(u,!0),tokenSeparators:d||[],maxTagCount:p||void 0,optionHeightPx:v||32,optionOverflowSize:y||8,showArrow:typeof x!="boolean"?void 0:x,compareWith:g||((z,M)=>z===M)};let E=this.ui.onSearch;E&&this.search$.pipe(F(this.sfItemComp.destroy$),Bt(),Sa(this.ui.searchDebounceTime||300),on(z=>E(z)),lp(()=>[])).subscribe(z=>{this.data=z,this.checkGroup(z),this.loading=!1,this.detectChanges()})}reset(t){let i=this.ui.onSearch;vC(this.schema,this.ui,t).subscribe(r=>{this._value=t,i==null&&(this.data=r),this.checkGroup(r),this.detectChanges()}),t&&i!=null&&this.search$.next(t)}change(t){this.ui.change&&this.ui.change(t,this.getOrgData(t)),this.setValue(t??void 0)}getOrgData(t){let i=this.injector.get(bz);return Array.isArray(t)?t.map(r=>i.findTree(this.data,s=>s.value===r)):i.findTree(this.data,r=>r.value===t)}openChange(t){this.ui.openChange&&this.ui.openChange(t)}scrollToBottom(){this.ui.scrollToBottom&&this.ui.scrollToBottom()}onSearch(t){this.ui.onSearch&&(this.loading=!0,this.search$.next(t))}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-select"]],features:[Xe],decls:5,vars:39,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"nzId","nzDisabled","ngModel","nzSize","nzPlaceHolder","nzNotFoundContent","nzDropdownClassName","nzAllowClear","nzDropdownStyle","nzCustomTemplate","nzSuffixIcon","nzRemoveIcon","nzClearIcon","nzMenuItemSelectedIcon","nzMaxTagPlaceholder","nzDropdownRender","nzAutoClearSearchValue","nzBorderless","nzAutoFocus","nzDropdownMatchSelectWidth","nzServerSearch","nzMaxMultipleCount","nzMode","nzShowSearch","nzShowArrow","nzTokenSeparators","nzMaxTagCount","compareWith","nzOptionHeightPx","nzOptionOverflowSize","ngModelChange","nzOpenChange","nzOnSearch","nzScrollToBottom"],["nzDisabled","","nzCustomContent",""],[3,"nzLabel","nzValue","nzHide","nzDisabled"],[3,"nzLabel"],[3,"nzLabel","nzValue","nzDisabled","nzHide"],["nz-icon","","nzType","loading"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0)(1,"nz-select",1),A("ngModelChange",function(a){return r._value=a})("ngModelChange",function(a){return r.change(a)})("nzOpenChange",function(a){return r.openChange(a)})("nzOnSearch",function(a){return r.onSearch(a)})("nzScrollToBottom",function(){return r.scrollToBottom()}),_(2,P5,2,0)(3,A5,2,0)(4,N5,3,1,"nz-option",2),S()()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),h("nzId",r.id)("nzDisabled",r.disabled)("ngModel",r._value)("nzSize",r.ui.size)("nzPlaceHolder",r.ui.placeholder)("nzNotFoundContent",r.ui.notFoundContent)("nzDropdownClassName",r.ui.dropdownClassName)("nzAllowClear",r.ui.allowClear)("nzDropdownStyle",r.ui.dropdownStyle)("nzCustomTemplate",r.ui.customTemplate)("nzSuffixIcon",r.ui.suffixIcon)("nzRemoveIcon",r.ui.removeIcon)("nzClearIcon",r.ui.clearIcon)("nzMenuItemSelectedIcon",r.ui.menuItemSelectedIcon)("nzMaxTagPlaceholder",r.ui.maxTagPlaceholder)("nzDropdownRender",r.ui.dropdownRender)("nzAutoClearSearchValue",r.i.autoClearSearchValue)("nzBorderless",r.i.borderless)("nzAutoFocus",r.i.autoFocus)("nzDropdownMatchSelectWidth",r.i.dropdownMatchSelectWidth)("nzServerSearch",r.i.serverSearch)("nzMaxMultipleCount",r.i.maxMultipleCount)("nzMode",r.i.mode)("nzShowSearch",r.i.showSearch)("nzShowArrow",r.i.showArrow)("nzTokenSeparators",r.i.tokenSeparators)("nzMaxTagCount",r.i.maxTagCount)("compareWith",r.i.compareWith)("nzOptionHeightPx",r.i.optionHeightPx)("nzOptionOverflowSize",r.i.optionOverflowSize),f(),ie(2,!r.loading&&!r.hasGroup?2:-1),f(),ie(3,!r.loading&&r.hasGroup?3:-1),f(),ie(4,r.loading?4:-1))},dependencies:[Kt,Rt,yi,Fe,zu,Ou,Eu,$r],encapsulation:2});let o=n;return o})(),Ez=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.change$=null}ngOnInit(){let{addOnAfter:t,addOnAfterIcon:i,addOnBefore:r,addOnBeforeIcon:s,prefix:a,prefixIcon:l,suffix:c,suffixIcon:u,autofocus:d}=this.ui;this.type=t||r||i||s||a||l||c||u?"addon":"",d===!0&&setTimeout(()=>{this.injector.get(de).nativeElement.querySelector(`#${this.id}`).focus()},20),this.initChange()}reset(t){!t&&this.schema.format==="color"&&this.setValue("#000000")}initChange(){let t=this.ui.changeDebounceTime,i=this.ui.change;if(t==null||t<=0||i==null)return;this.change$=new ct(this.value);let r=this.change$.asObservable().pipe(Sa(t),F(this.sfItemComp.destroy$));this.ui.changeMap!=null&&(r=r.pipe(on(this.ui.changeMap))),r.subscribe(s=>i(s))}change(t){if(this.setValue(t),this.change$!=null){this.change$.next(t);return}this.ui.change&&this.ui.change(t)}focus(t){this.ui.focus&&this.ui.focus(t)}blur(t){this.ui.blur&&this.ui.blur(t)}enter(t){this.ui.enter&&this.ui.enter(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-string"]],features:[Xe],decls:5,vars:7,consts:[[3,"id","schema","ui","showError","error","showTitle"],["ipt",""],[3,"nzAddOnBefore","nzAddOnAfter","nzAddOnBeforeIcon","nzAddOnAfterIcon","nzPrefix","nzPrefixIcon","nzSuffix","nzSuffixIcon"],["nz-input","",3,"disabled","nzSize","nzBorderless","ngModel","ngModelChange","keyup.enter","focus","blur"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,L5,1,11,"ng-template",null,1,_e)(3,V5,2,9,"nz-input-group",2)(4,H5,1,1),S()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(3),ie(3,r.type==="addon"?3:4))},dependencies:[Be,Ii,Kt,Rt,yi,Fa,iv,cT,$r],encapsulation:2});let o=n;return o})(),h6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.text=""}ngOnInit(){this.ui._required=!1,this.ui.html=mo(this.ui.html,!0)}reset(t){this.text=t||this.ui.defaultText||"-"}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-text"]],features:[Xe],decls:3,vars:9,consts:[[3,"id","schema","ui","showError","error","showTitle"],[3,"innerHTML"],[3,"innerText"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,B5,1,1,"span",1)(2,$5,1,1),S()),i&2&&(k("sf__text-html",r.ui.html),h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(),ie(1,r.ui.html?1:2))},dependencies:[$r],encapsulation:2});let o=n;return o})(),f6=(()=>{let n=class n extends Go{constructor(){super(...arguments),this.autosize=!0}ngOnInit(){this.ui.autosize!=null&&(this.autosize=this.ui.autosize),this.ui.computeCharacterCount==null&&(this.ui.computeCharacterCount=t=>t.length)}change(t){this.setValue(t),this.ui.change&&this.ui.change(t)}focus(t){this.ui.focus&&this.ui.focus(t)}blur(t){this.ui.blur&&this.ui.blur(t)}};n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["sf-textarea"]],features:[Xe],decls:5,vars:7,consts:[[3,"id","schema","ui","showError","error","showTitle"],["ipt",""],[3,"nzMaxCharacterCount","nzComputeCharacterCount"],["nz-input","",3,"disabled","nzSize","ngModel","nzAutosize","nzBorderless","ngModelChange","focus","blur"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),_(1,j5,2,9,"ng-template",null,1,_e)(3,W5,3,11,"nz-textarea-count",2)(4,K5,1,1),S()),i&2&&(h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title),f(3),ie(3,r.ui.maxCharacterCount?3:4))},dependencies:[Be,Ii,Kt,Rt,dT,Fa,uT,$r],encapsulation:2});let o=n;return o})(),lf=class extends Wa{constructor(){super(),this.register("object",u6),this.register("array",o6),this.register("text",h6),this.register("string",Ez),this.register("number",Tz),this.register("integer",Tz),this.register("date",c6),this.register("radio",d6),this.register("checkbox",a6),this.register("boolean",s6),this.register("textarea",f6),this.register("select",p6),this.register("custom",l6),this.setDefault(Ez)}},g6=[Hi,$l,$i,Hs,ac,$s,Ge,Vs,Gs,Gl,Jl,Ls,lc,ji];var vs=(()=>{let n=class n{static forRoot(){return{ngModule:n,providers:[{provide:cf,useClass:Iz,deps:[In,$e]},{provide:Wa,useClass:lf}]}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,nn,lm,g6]});let o=n;return o})();function nCe(o){let n=[{provide:cf,useClass:Iz,deps:[In,$e]},{provide:Wa,useClass:lf}];return o?.widgets&&n.push({provide:wa,multi:!0,useValue:()=>{let e=ae(Wa);o?.widgets?.forEach(t=>e.register(t.KEY,t.type))}}),ba(n)}function m6(o,n){if(o&1&&(H(0),R(1,"span",1),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}function v6(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m().$implicit;f(),Ne(" ",e.tab.label," ")}}var y6=()=>({visible:!1});function C6(o,n){if(o&1){let e=Q();C(0,"li",8),A("click",function(){let r=I(e).$implicit,s=m(2);return P(s.onSelect(r))})("contextmenu",function(i){let s=I(e).$implicit,a=m(2);return P(a.onContextmenu(s,i))}),_(1,v6,2,1,"ng-container",9),S()}if(o&2){let e=n.$implicit;k("ant-tabs-dropdown-menu-item-disabled",e.disabled),h("nzSelected",e.active)("nzDisabled",e.disabled),f(),h("nzStringTemplateOutlet",e.tab.label)("nzStringTemplateOutletContext",ii(6,y6))}}function _6(o,n){if(o&1&&(C(0,"ul",6),_(1,C6,2,7,"li",7),S()),o&2){let e=m();f(),h("ngForOf",e.items)}}function S6(o,n){if(o&1){let e=Q();C(0,"button",10),A("click",function(){I(e);let i=m();return P(i.addClicked.emit())}),S()}if(o&2){let e=m();h("addIcon",e.addIcon)}}var w6=()=>({minWidth:"46px"}),b6=["navWarp"],T6=["navList"];function E6(o,n){if(o&1){let e=Q();C(0,"button",8),A("click",function(){I(e);let i=m();return P(i.addClicked.emit())}),S()}if(o&2){let e=m();h("addIcon",e.addIcon),ze("tabindex",-1)}}function x6(o,n){}function z6(o,n){if(o&1&&(C(0,"div",9),_(1,x6,0,0,"ng-template",10),S()),o&2){let e=m();f(),h("ngTemplateOutlet",e.extraTemplate)}}var O6=["*"],D6=["nz-tab-body",""];function R6(o,n){}function I6(o,n){if(o&1&&(H(0),_(1,R6,0,0,"ng-template",1),B()),o&2){let e=m();f(),h("ngTemplateOutlet",e.content)}}function P6(o,n){if(o&1&&(H(0),R(1,"span",1),B()),o&2){let e=n.$implicit;f(),h("nzType",e)}}var M6=["contentTemplate"];function F6(o,n){o&1&&Ie(0)}function A6(o,n){o&1&&Ie(0,1)}var N6=[[["","nz-tab-link",""]],"*"],L6=["[nz-tab-link]","*"];function k6(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m().$implicit;f(),ye(e.label)}}function V6(o,n){if(o&1){let e=Q();C(0,"button",10),A("click",function(i){I(e);let r=m().index,s=m(2);return P(s.onClose(r,i))}),S()}if(o&2){let e=m().$implicit;h("closeIcon",e.nzCloseIcon)}}var G6=()=>({visible:!0});function H6(o,n){if(o&1){let e=Q();C(0,"div",6),A("click",function(i){let r=I(e),s=r.$implicit,a=r.index,l=m(2);return P(l.clickNavItem(s,a,i))})("contextmenu",function(i){let s=I(e).$implicit,a=m(2);return P(a.contextmenuNavItem(s,i))}),C(1,"button",7),_(2,k6,2,1,"ng-container",8)(3,V6,1,1,"button",9),S()()}if(o&2){let e=n.$implicit,t=n.index,i=m(2);Re("margin-right",i.position==="horizontal"?i.nzTabBarGutter:null,"px")("margin-bottom",i.position==="vertical"?i.nzTabBarGutter:null,"px"),k("ant-tabs-tab-active",i.nzSelectedIndex===t)("ant-tabs-tab-disabled",e.nzDisabled),f(),h("id",i.getTabContentId(t))("disabled",e.nzDisabled)("tab",e)("active",i.nzSelectedIndex===t),ze("tabIndex",i.getTabIndex(e,t))("aria-disabled",e.nzDisabled)("aria-selected",i.nzSelectedIndex===t&&!i.nzHideAll)("aria-controls",i.getTabContentId(t)),f(),h("nzStringTemplateOutlet",e.label)("nzStringTemplateOutletContext",ii(19,G6)),f(),h("ngIf",e.nzClosable&&i.closable&&!e.nzDisabled)}}function B6(o,n){if(o&1){let e=Q();C(0,"nz-tabs-nav",4),A("tabScroll",function(i){I(e);let r=m();return P(r.nzTabListScroll.emit(i))})("selectFocusedIndex",function(i){I(e);let r=m();return P(r.setSelectedIndex(i))})("addClicked",function(){I(e);let i=m();return P(i.onAdd())}),_(1,H6,4,20,"div",5),S()}if(o&2){let e=m();h("ngStyle",e.nzTabBarStyle)("selectedIndex",e.nzSelectedIndex||0)("inkBarAnimated",e.inkBarAnimated)("addable",e.addable)("addIcon",e.nzAddIcon)("hideBar",e.nzHideAll)("position",e.position)("extraTemplate",e.nzTabBarExtraContent),f(),h("ngForOf",e.tabs)}}function $6(o,n){if(o&1&&R(0,"div",11),o&2){let e=n.$implicit,t=n.index,i=m();h("id",i.getTabContentId(t))("active",i.nzSelectedIndex===t&&!i.nzHideAll)("content",e.content)("forceRender",e.nzForceRender)("tabPaneAnimated",i.tabPaneAnimated),ze("aria-labelledby",i.getTabContentId(t))}}var hf=(()=>{let n=class n{constructor(t){this.elementRef=t,this.addIcon="plus",this.element=this.elementRef.nativeElement}getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-tab-add-button"],["button","nz-tab-add-button",""]],hostAttrs:["aria-label","Add tab","type","button",1,"ant-tabs-nav-add"],inputs:{addIcon:"addIcon"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nz-icon","","nzTheme","outline",3,"nzType"]],template:function(i,r){i&1&&_(0,m6,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.addIcon)},dependencies:[Ye,Ue,Ge,Fe],encapsulation:2});let o=n;return o})(),Nz=(()=>{let n=class n{get _animated(){return this.animationMode!=="NoopAnimations"&&this.animated}constructor(t,i,r){this.elementRef=t,this.ngZone=i,this.animationMode=r,this.position="horizontal",this.animated=!0}alignToElement(t){this.ngZone.runOutsideAngular(()=>{to(()=>this.setStyles(t))})}setStyles(t){let i=this.elementRef.nativeElement;this.position==="horizontal"?(i.style.top="",i.style.height="",i.style.left=this.getLeftPosition(t),i.style.width=this.getElementWidth(t)):(i.style.left="",i.style.width="",i.style.top=this.getTopPosition(t),i.style.height=this.getElementHeight(t))}getLeftPosition(t){return t?`${t.offsetLeft||0}px`:"0"}getElementWidth(t){return t?`${t.offsetWidth||0}px`:"0"}getTopPosition(t){return t?`${t.offsetTop||0}px`:"0"}getElementHeight(t){return t?`${t.offsetHeight||0}px`:"0"}};n.\u0275fac=function(i){return new(i||n)(w(de),w($e),w(TS,8))},n.\u0275dir=Se({type:n,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-tabs-ink-bar-animated",r._animated)},inputs:{position:"position",animated:"animated"},standalone:!0});let o=n;return o})(),Gz=(()=>{let n=class n{constructor(t){this.elementRef=t,this.disabled=!1,this.active=!1,this.el=t.nativeElement,this.parentElement=this.el.parentElement}focus(){this.el.focus()}get width(){return this.parentElement.offsetWidth}get height(){return this.parentElement.offsetHeight}get left(){return this.parentElement.offsetLeft}get top(){return this.parentElement.offsetTop}};n.\u0275fac=function(i){return new(i||n)(w(de))},n.\u0275dir=Se({type:n,selectors:[["","nzTabNavItem",""]],inputs:{disabled:"disabled",tab:"tab",active:"active"},standalone:!0});let o=n;return o})(),yC=(()=>{let n=class n{constructor(t,i){this.cdr=t,this.elementRef=i,this.items=[],this.addable=!1,this.addIcon="plus",this.addClicked=new O,this.selected=new O,this.closeAnimationWaitTimeoutId=-1,this.menuOpened=!1,this.element=this.elementRef.nativeElement}onSelect(t){t.disabled||(t.tab.nzClick.emit(),this.selected.emit(t))}onContextmenu(t,i){t.disabled||t.tab.nzContextmenu.emit(i)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(t){t||(this.closeAnimationWaitTimeoutId=setTimeout(()=>{this.menuOpened=!1,this.cdr.markForCheck()},150))}getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}ngOnDestroy(){clearTimeout(this.closeAnimationWaitTimeoutId)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(de))},n.\u0275cmp=j({type:n,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-tabs-nav-operations-hidden",r.items.length===0)},inputs:{items:"items",addable:"addable",addIcon:"addIcon"},outputs:{addClicked:"addClicked",selected:"selected"},exportAs:["nzTabNavOperation"],standalone:!0,features:[K],decls:7,vars:6,consts:[["nz-dropdown","","type","button","tabindex","-1","aria-hidden","true","nzOverlayClassName","nz-tabs-dropdown",1,"ant-tabs-nav-more",3,"nzDropdownMenu","nzOverlayStyle","nzMatchWidthElement","nzVisibleChange","mouseenter"],["dropdownTrigger","nzDropdown"],["nz-icon","","nzType","ellipsis"],["menu","nzDropdownMenu"],["nz-menu","",4,"ngIf"],["nz-tab-add-button","",3,"addIcon","click",4,"ngIf"],["nz-menu",""],["nz-menu-item","","class","ant-tabs-dropdown-menu-item",3,"ant-tabs-dropdown-menu-item-disabled","nzSelected","nzDisabled","click","contextmenu",4,"ngFor","ngForOf"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"nzSelected","nzDisabled","click","contextmenu"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-add-button","",3,"addIcon","click"]],template:function(i,r){if(i&1&&(C(0,"button",0,1),A("nzVisibleChange",function(a){return r.menuVisChange(a)})("mouseenter",function(){return r.showItems()}),R(2,"span",2),S(),C(3,"nz-dropdown-menu",null,3),_(5,_6,2,1,"ul",4),S(),_(6,S6,1,1,"button",5)),i&2){let s=te(4);h("nzDropdownMenu",s)("nzOverlayStyle",ii(5,w6))("nzMatchWidthElement",null),f(5),h("ngIf",r.menuOpened),f(),h("ngIf",r.addable)}},dependencies:[Ge,Fe,we,lt,Ye,Ue,hf,us,ec,cs,co,yr],encapsulation:2,changeDetection:0});let o=n;return o})(),j6=.1,Lz=.01,pf=20,kz=.995**pf,W6=(()=>{let n=class n{constructor(t,i){this.ngZone=t,this.elementRef=i,this.lastWheelDirection=null,this.lastWheelTimestamp=0,this.lastTimestamp=0,this.lastTimeDiff=0,this.lastMixedWheel=0,this.lastWheelPrevent=!1,this.touchPosition=null,this.lastOffset=null,this.motion=-1,this.unsubscribe=()=>{},this.offsetChange=new O,this.tabScroll=new O,this.onTouchEnd=r=>{if(!this.touchPosition)return;let s=this.lastOffset,a=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,s){let l=s.x/a,c=s.y/a,u=Math.abs(l),d=Math.abs(c);if(Math.max(u,d){if(Math.abs(p){if(!this.touchPosition)return;r.preventDefault();let{screenX:s,screenY:a}=r.touches[0],l=s-this.touchPosition.x,c=a-this.touchPosition.y;this.onOffset(l,c,r);let u=Date.now();this.lastTimeDiff=u-this.lastTimestamp,this.lastTimestamp=u,this.lastOffset={x:l,y:c},this.touchPosition={x:s,y:a}},this.onTouchStart=r=>{let{screenX:s,screenY:a}=r.touches[0];this.touchPosition={x:s,y:a},window.clearInterval(this.motion)},this.onWheel=r=>{let{deltaX:s,deltaY:a}=r,l,c=Math.abs(s),u=Math.abs(a);c===u?l=this.lastWheelDirection==="x"?s:a:c>u?(l=s,this.lastWheelDirection="x"):(l=a,this.lastWheelDirection="y");let d=Date.now(),p=Math.abs(l);(d-this.lastWheelTimestamp>100||p-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-l,-l,r),(r.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=d,this.lastMixedWheel=p}}ngOnInit(){this.unsubscribe=this.ngZone.runOutsideAngular(()=>{let t=this.elementRef.nativeElement,i=Ke(t,"wheel"),r=Ke(t,"touchstart"),s=Ke(t,"touchmove"),a=Ke(t,"touchend"),l=new lr;return l.add(this.subscribeWrap("wheel",i,this.onWheel)),l.add(this.subscribeWrap("touchstart",r,this.onTouchStart)),l.add(this.subscribeWrap("touchmove",s,this.onTouchMove)),l.add(this.subscribeWrap("touchend",a,this.onTouchEnd)),()=>{l.unsubscribe()}})}subscribeWrap(t,i,r){return i.subscribe(s=>{this.tabScroll.emit({type:t,event:s}),s.defaultPrevented||r(s)})}onOffset(t,i,r){this.ngZone.run(()=>{this.offsetChange.emit({x:t,y:i,event:r})})}ngOnDestroy(){this.unsubscribe()}};n.\u0275fac=function(i){return new(i||n)(w($e),w(de))},n.\u0275dir=Se({type:n,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"},standalone:!0});let o=n;return o})(),U6=typeof requestAnimationFrame<"u"?uS:ap,Vz=150,CC=(()=>{let n=class n{get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let i=Qg(t);this._selectedIndex!==i&&(this._selectedIndex=t,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(t))}get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(t){!this.isValidIndex(t)||this.focusIndex===t||!this.keyManager||this.keyManager.setActiveItem(t)}get showAddButton(){return this.hiddenItems.length===0&&this.addable}constructor(t,i,r,s,a){this.cdr=t,this.ngZone=i,this.viewportRuler=r,this.nzResizeObserver=s,this.dir=a,this.indexFocused=new O,this.selectFocusedIndex=new O,this.addClicked=new O,this.tabScroll=new O,this.position="horizontal",this.addable=!1,this.hideBar=!1,this.addIcon="plus",this.inkBarAnimated=!0,this.translate=null,this.transformX=0,this.transformY=0,this.pingLeft=!1,this.pingRight=!1,this.pingTop=!1,this.pingBottom=!1,this.hiddenItems=[],this.destroy$=new J,this._selectedIndex=0,this.wrapperWidth=0,this.wrapperHeight=0,this.scrollListWidth=0,this.scrollListHeight=0,this.operationWidth=0,this.operationHeight=0,this.addButtonWidth=0,this.addButtonHeight=0,this.selectedIndexChanged=!1,this.lockAnimationTimeoutId=-1,this.cssTransformTimeWaitingId=-1}ngAfterViewInit(){let t=this.dir?this.dir.change.asObservable():Mn(null),i=this.viewportRuler.change(150),r=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new ew(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),to(r),_t(this.nzResizeObserver.observe(this.navWarpRef),this.nzResizeObserver.observe(this.navListRef)).pipe(F(this.destroy$),zs(16,U6)).subscribe(()=>{r()}),_t(t,i,this.items.changes).pipe(F(this.destroy$)).subscribe(()=>{Promise.resolve().then(r),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe(F(this.destroy$)).subscribe(s=>{this.indexFocused.emit(s),this.setTabFocus(s),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}ngOnDestroy(){clearTimeout(this.lockAnimationTimeoutId),clearTimeout(this.cssTransformTimeWaitingId),this.destroy$.next(),this.destroy$.complete()}onSelectedFromMenu(t){let i=this.items.toArray().findIndex(r=>r===t);i!==-1&&(this.keyManager.updateActiveItem(i),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(t)))}onOffsetChange(t){if(this.position==="horizontal"){if(this.lockAnimationTimeoutId===-1&&(this.transformX>=0&&t.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&t.x<0))return;t.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+t.x),this.setTransform(this.transformX,0)}else{if(this.lockAnimationTimeoutId===-1&&(this.transformY>=0&&t.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&t.y<0))return;t.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+t.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(t){let i=this.navWarpRef.nativeElement.contains(t.target);if(!(Nl(t)||!i))switch(t.keyCode){case 37:case 38:case 39:case 40:this.lockAnimation(),this.keyManager.onKeydown(t);break;case 13:case 32:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(t)}}isValidIndex(t){if(!this.items)return!0;let i=this.items?this.items.toArray()[t]:null;return!!i&&!i.disabled}scrollToTab(t){if(!this.items.find(r=>r===t))return;let i=this.items.toArray();if(this.position==="horizontal"){let r=this.transformX;if(this.getLayoutDirection()==="rtl"){let s=i[0].left+i[0].width-t.left-t.width;sthis.transformX+this.wrapperWidth&&(r=s+t.width-this.wrapperWidth)}else t.left<-this.transformX?r=-t.left:t.left+t.width>-this.transformX+this.wrapperWidth&&(r=-(t.left+t.width-this.wrapperWidth));this.transformX=r,this.transformY=0,this.setTransform(r,0)}else{let r=this.transformY;t.top<-this.transformY?r=-t.top:t.top+t.height>-this.transformY+this.wrapperHeight&&(r=-(t.top+t.height-this.wrapperHeight)),this.transformY=r,this.transformX=0,this.setTransform(0,r)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},Vz)}lockAnimation(){this.lockAnimationTimeoutId===-1&&this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=-1},Vz)})}setTransform(t,i){this.navListRef.nativeElement.style.transform=`translate(${t}px, ${i}px)`}clampTransformX(t){let i=this.wrapperWidth-this.scrollListWidth;return this.getLayoutDirection()==="rtl"?Math.max(Math.min(i,t),0):Math.min(Math.max(i,t),0)}clampTransformY(t){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,t),0)}updateScrollListPosition(){this.resetSizes(),this.transformX=this.clampTransformX(this.transformX),this.transformY=this.clampTransformY(this.transformY),this.setVisibleRange(),this.setPingStatus(),this.keyManager&&(this.keyManager.updateActiveItem(this.keyManager.activeItemIndex),this.keyManager.activeItem&&this.scrollToTab(this.keyManager.activeItem))}resetSizes(){this.addButtonWidth=this.addBtnRef?this.addBtnRef.getElementWidth():0,this.addButtonHeight=this.addBtnRef?this.addBtnRef.getElementHeight():0,this.operationWidth=this.operationRef.getElementWidth(),this.operationHeight=this.operationRef.getElementHeight(),this.wrapperWidth=this.navWarpRef.nativeElement.offsetWidth||0,this.wrapperHeight=this.navWarpRef.nativeElement.offsetHeight||0,this.scrollListHeight=this.navListRef.nativeElement.offsetHeight||0,this.scrollListWidth=this.navListRef.nativeElement.offsetWidth||0}alignInkBarToSelectedTab(){let t=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,i=t?t.elementRef.nativeElement:null;i&&this.inkBar.alignToElement(i.parentElement)}setPingStatus(){let t={top:!1,right:!1,bottom:!1,left:!1},i=this.navWarpRef.nativeElement;this.position==="horizontal"?this.getLayoutDirection()==="rtl"?(t.right=this.transformX>0,t.left=this.transformX+this.wrapperWidth{let s=`ant-tabs-nav-wrap-ping-${r}`;t[r]?i.classList.add(s):i.classList.remove(s)})}setVisibleRange(){let t,i,r,s,a,l,c=this.items.toArray(),u={width:0,height:0,left:0,top:0,right:0},d=z=>{let M,G=c[z]||u;return i==="right"?M=c[0].left+c[0].width-c[z].left-c[z].width:M=G[i],M};this.position==="horizontal"?(t="width",s=this.wrapperWidth,a=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),l=this.addButtonWidth,r=Math.abs(this.transformX),this.getLayoutDirection()==="rtl"?(i="right",this.pingRight=this.transformX>0,this.pingLeft=this.transformX+this.wrapperWidths&&(p=s-l),!c.length){this.hiddenItems=[],this.cdr.markForCheck();return}let g=c.length,v=g;for(let z=0;zr+p){v=z-1;break}}let y=0;for(let z=g-1;z>=0;z-=1)if(d(z){let n=class n{constructor(){this.content=null,this.active=!1,this.tabPaneAnimated=!0,this.forceRender=!1}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:12,hostBindings:function(i,r){i&2&&(ze("tabindex",r.active?0:-1)("aria-hidden",!r.active),Re("visibility",r.tabPaneAnimated?r.active?null:"hidden":null)("height",r.tabPaneAnimated?r.active?null:0:null)("overflow-y",r.tabPaneAnimated?r.active?null:"none":null)("display",r.tabPaneAnimated||r.active?null:"none"),k("ant-tabs-tabpane-active",r.active))},inputs:{content:"content",active:"active",tabPaneAnimated:"tabPaneAnimated",forceRender:"forceRender"},exportAs:["nzTabBody"],standalone:!0,features:[K],attrs:D6,decls:1,vars:1,consts:[[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(i,r){i&1&&_(0,I6,2,1,"ng-container",0),i&2&&h("ngIf",r.active||r.forceRender)},dependencies:[we,Be],encapsulation:2,changeDetection:0});let o=n;return o})(),Hz=(()=>{let n=class n{constructor(){this.closeIcon="close"}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-tab-close-button"],["button","nz-tab-close-button",""]],hostAttrs:["aria-label","Close tab","type","button",1,"ant-tabs-tab-remove"],inputs:{closeIcon:"closeIcon"},standalone:!0,features:[K],decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nz-icon","","nzTheme","outline",3,"nzType"]],template:function(i,r){i&1&&_(0,P6,2,1,"ng-container",0),i&2&&h("nzStringTemplateOutlet",r.closeIcon)},dependencies:[Ye,Ue,Ge,Fe],encapsulation:2});let o=n;return o})(),q6=(()=>{let n=class n{constructor(t){this.templateRef=t}};n.\u0275fac=function(i){return new(i||n)(w(En,1))},n.\u0275dir=Se({type:n,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"],standalone:!0});let o=n;return o})(),Y6=(()=>{let n=class n{constructor(t,i){this.elementRef=t,this.routerLink=i}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Po,10))},n.\u0275dir=Se({type:n,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"],standalone:!0});let o=n;return o})(),Q6=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["","nz-tab",""]],exportAs:["nzTab"],standalone:!0});let o=n;return o})(),Bz=new hn("NZ_TAB_SET"),X6=(()=>{let n=class n{get content(){return this.template||this.contentTemplate}get label(){return this.nzTitle||this.nzTabLinkTemplateDirective?.templateRef}constructor(t){this.closestTabSet=t,this.nzTitle="",this.nzClosable=!1,this.nzCloseIcon="close",this.nzDisabled=!1,this.nzForceRender=!1,this.nzSelect=new O,this.nzDeselect=new O,this.nzClick=new O,this.nzContextmenu=new O,this.template=null,this.isActive=!1,this.position=null,this.origin=null,this.stateChanges=new J}ngOnChanges(t){let{nzTitle:i,nzDisabled:r,nzForceRender:s}=t;(i||r||s)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Bz))},n.\u0275cmp=j({type:n,selectors:[["nz-tab"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,q6,5),Ft(s,Q6,5,En),Ft(s,Y6,5)),i&2){let a;ce(a=ue())&&(r.nzTabLinkTemplateDirective=a.first),ce(a=ue())&&(r.template=a.first),ce(a=ue())&&(r.linkDirective=a.first)}},viewQuery:function(i,r){if(i&1&&xe(M6,7),i&2){let s;ce(s=ue())&&(r.contentTemplate=s.first)}},inputs:{nzTitle:"nzTitle",nzClosable:"nzClosable",nzCloseIcon:"nzCloseIcon",nzDisabled:"nzDisabled",nzForceRender:"nzForceRender"},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],standalone:!0,features:[oe,K],ngContentSelectors:L6,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(i,r){i&1&&(Pe(N6),_(0,F6,1,0,"ng-template",null,0,_e)(2,A6,1,0,"ng-template",null,1,_e))},encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzClosable",void 0),N([W()],o.prototype,"nzDisabled",void 0),N([W()],o.prototype,"nzForceRender",void 0),o})(),_C=class{},Z6="tabs",J6=0,e9=(()=>{let n=class n{get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(t){this.indexToSelect=Qg(t,null)}get position(){return["top","bottom"].indexOf(this.nzTabPosition)===-1?"vertical":"horizontal"}get addable(){return this.nzType==="editable-card"&&!this.nzHideAdd}get closable(){return this.nzType==="editable-card"}get line(){return this.nzType==="line"}get inkBarAnimated(){return this.line&&(typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.inkBar)}get tabPaneAnimated(){return this.position==="horizontal"&&this.line&&(typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.tabPane)}constructor(t,i,r,s,a){this.nzConfigService=t,this.ngZone=i,this.cdr=r,this.directionality=s,this.router=a,this._nzModuleName=Z6,this.nzTabPosition="top",this.nzCanDeactivate=null,this.nzAddIcon="plus",this.nzTabBarStyle=null,this.nzType="line",this.nzSize="default",this.nzAnimated=!0,this.nzTabBarGutter=void 0,this.nzHideAdd=!1,this.nzCentered=!1,this.nzHideAll=!1,this.nzLinkRouter=!1,this.nzLinkExact=!0,this.nzSelectChange=new O(!0),this.nzSelectedIndexChange=new O,this.nzTabListScroll=new O,this.nzClose=new O,this.nzAdd=new O,this.allTabs=new Kg,this.tabs=new Kg,this.dir="ltr",this.destroy$=new J,this.indexToSelect=0,this.selectedIndex=null,this.tabLabelSubscription=lr.EMPTY,this.tabsSubscription=lr.EMPTY,this.canDeactivateSubscription=lr.EMPTY,this.tabSetId=J6++}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.tabs.destroy(),this.tabLabelSubscription.unsubscribe(),this.tabsSubscription.unsubscribe(),this.canDeactivateSubscription.unsubscribe()}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabsSubscription=this.tabs.changes.subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){let i=this.tabs.toArray();for(let r=0;r{this.tabs.forEach((r,s)=>r.isActive=s===t),i||this.nzSelectedIndexChange.emit(t)})}this.tabs.forEach((i,r)=>{i.position=r-t,this.selectedIndex!=null&&i.position===0&&!i.origin&&(i.origin=t-this.selectedIndex)}),this.selectedIndex!==t&&(this.selectedIndex=t,this.cdr.markForCheck())}onClose(t,i){i.preventDefault(),i.stopPropagation(),this.nzClose.emit({index:t})}onAdd(){this.nzAdd.emit()}clampTabIndex(t){return Math.min(this.tabs.length-1,Math.max(t||0,0))}createChangeEvent(t){let i=new _C;return i.index=t,this.tabs&&this.tabs.length&&(i.tab=this.tabs.toArray()[t],this.tabs.forEach((r,s)=>{s!==t&&r.nzDeselect.emit()}),i.tab.nzSelect.emit()),i}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=_t(...this.tabs.map(t=>t.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe(Ot(this.allTabs)).subscribe(t=>{this.tabs.reset(t.filter(i=>i.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(t,i){return typeof this.nzCanDeactivate=="function"?mp(this.nzCanDeactivate(t,i)).pipe(xl(),F(this.destroy$)):Mn(!0)}clickNavItem(t,i,r){t.nzDisabled||(t.nzClick.emit(),this.isRouterLinkClickEvent(i,r)||this.setSelectedIndex(i))}isRouterLinkClickEvent(t,i){let r=i.target;return this.nzLinkRouter?!!this.tabs.toArray()[t]?.linkDirective?.elementRef.nativeElement.contains(r):!1}contextmenuNavItem(t,i){t.nzDisabled||t.nzContextmenu.emit(i)}setSelectedIndex(t){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,t).subscribe(i=>{i&&(this.nzSelectedIndex=t,this.tabNavBarRef.focusIndex=t,this.cdr.markForCheck())})}getTabIndex(t,i){return t.nzDisabled?null:this.selectedIndex===i?0:-1}getTabContentId(t){return`nz-tabs-${this.tabSetId}-tab-${t}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${gp} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);this.router.events.pipe(F(this.destroy$),Qe(t=>t instanceof Io),Ot(!0),Os(0)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router.navigated){let t=this.findShouldActiveTabIndex();t!==this.selectedIndex&&this.setSelectedIndex(t),this.nzHideAll=t===-1}}findShouldActiveTabIndex(){let t=this.tabs.toArray(),i=this.isLinkActive(this.router);return t.findIndex(r=>{let s=r.linkDirective;return s?i(s.routerLink):!1})}isLinkActive(t){return i=>i?t.isActive(i.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"}):!1}getTabContentMarginValue(){return-(this.nzSelectedIndex||0)*100}getTabContentMarginLeft(){return this.tabPaneAnimated&&this.dir!=="rtl"?`${this.getTabContentMarginValue()}%`:""}getTabContentMarginRight(){return this.tabPaneAnimated&&this.dir==="rtl"?`${this.getTabContentMarginValue()}%`:""}};n.\u0275fac=function(i){return new(i||n)(w(st),w($e),w(fe),w(Me,8),w(mi,8))},n.\u0275cmp=j({type:n,selectors:[["nz-tabset"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,X6,5),i&2){let a;ce(a=ue())&&(r.allTabs=a)}},viewQuery:function(i,r){if(i&1&&xe(CC,5),i&2){let s;ce(s=ue())&&(r.tabNavBarRef=s.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(i,r){i&2&&k("ant-tabs-card",r.nzType==="card"||r.nzType==="editable-card")("ant-tabs-editable",r.nzType==="editable-card")("ant-tabs-editable-card",r.nzType==="editable-card")("ant-tabs-centered",r.nzCentered)("ant-tabs-rtl",r.dir==="rtl")("ant-tabs-top",r.nzTabPosition==="top")("ant-tabs-bottom",r.nzTabPosition==="bottom")("ant-tabs-left",r.nzTabPosition==="left")("ant-tabs-right",r.nzTabPosition==="right")("ant-tabs-default",r.nzSize==="default")("ant-tabs-small",r.nzSize==="small")("ant-tabs-large",r.nzSize==="large")},inputs:{nzSelectedIndex:"nzSelectedIndex",nzTabPosition:"nzTabPosition",nzTabBarExtraContent:"nzTabBarExtraContent",nzCanDeactivate:"nzCanDeactivate",nzAddIcon:"nzAddIcon",nzTabBarStyle:"nzTabBarStyle",nzType:"nzType",nzSize:"nzSize",nzAnimated:"nzAnimated",nzTabBarGutter:"nzTabBarGutter",nzHideAdd:"nzHideAdd",nzCentered:"nzCentered",nzHideAll:"nzHideAll",nzLinkRouter:"nzLinkRouter",nzLinkExact:"nzLinkExact"},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabset"],standalone:!0,features:[Ve([{provide:Bz,useExisting:n}]),K],decls:4,vars:16,consts:[[3,"ngStyle","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","tabScroll","selectFocusedIndex","addClicked",4,"ngIf"],[1,"ant-tabs-content-holder"],[1,"ant-tabs-content"],["role","tabpanel","nz-tab-body","",3,"id","active","content","forceRender","tabPaneAnimated",4,"ngFor","ngForOf"],[3,"ngStyle","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","tabScroll","selectFocusedIndex","addClicked"],["class","ant-tabs-tab",3,"margin-right","margin-bottom","ant-tabs-tab-active","ant-tabs-tab-disabled","click","contextmenu",4,"ngFor","ngForOf"],[1,"ant-tabs-tab",3,"click","contextmenu"],["role","tab","nzTabNavItem","","cdkMonitorElementFocus","",1,"ant-tabs-tab-btn",3,"id","disabled","tab","active"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-close-button","",3,"closeIcon","click",4,"ngIf"],["nz-tab-close-button","",3,"closeIcon","click"],["role","tabpanel","nz-tab-body","",3,"id","active","content","forceRender","tabPaneAnimated"]],template:function(i,r){i&1&&(_(0,B6,2,9,"nz-tabs-nav",0),C(1,"div",1)(2,"div",2),_(3,$6,1,6,"div",3),S()()),i&2&&(h("ngIf",r.tabs.length||r.addable),f(2),Re("margin-left",r.getTabContentMarginLeft())("margin-right",r.getTabContentMarginRight()),k("ant-tabs-content-top",r.nzTabPosition==="top")("ant-tabs-content-bottom",r.nzTabPosition==="bottom")("ant-tabs-content-left",r.nzTabPosition==="left")("ant-tabs-content-right",r.nzTabPosition==="right")("ant-tabs-content-animated",r.tabPaneAnimated),f(),h("ngForOf",r.tabs))},dependencies:[CC,we,Zt,lt,Gz,Cp,nw,Ye,Ue,Hz,K6],encapsulation:2});let o=n;return N([De()],o.prototype,"nzType",void 0),N([De()],o.prototype,"nzSize",void 0),N([De()],o.prototype,"nzAnimated",void 0),N([De()],o.prototype,"nzTabBarGutter",void 0),N([W()],o.prototype,"nzHideAdd",void 0),N([W()],o.prototype,"nzCentered",void 0),N([W()],o.prototype,"nzHideAll",void 0),N([W()],o.prototype,"nzLinkRouter",void 0),N([W()],o.prototype,"nzLinkExact",void 0),o})();var ff=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[e9,CC,yC,hf,Hz]});let o=n;return o})();var xc=function(o){return o[o.Menu=0]="Menu",o[o.MenuForce=1]="MenuForce",o[o.URL=2]="URL",o}(xc||{}),n9=new hn("REUSE_TAB_CACHED_MANAGER");var i9=new hn("REUSE_TAB_STORAGE_KEY"),r9=new hn("REUSE_TAB_STORAGE_STATE");var $z=(()=>{let n=class n{get snapshot(){return this.injector.get(dp).snapshot}get inited(){return this._inited}get curUrl(){return this.getUrl(this.snapshot)}set max(t){this._max=Math.min(Math.max(t,2),100);for(let i=this.cached.list.length;i>this._max;i--)this.cached.list.pop()}set keepingScroll(t){this._keepingScroll=t,this.initScroll()}get keepingScroll(){return this._keepingScroll}get items(){return this.cached.list}get count(){return this.cached.list.length}get change(){return this._cachedChange.asObservable()}set title(t){let i=this.curUrl;typeof t=="string"&&(t={text:t}),this.cached.title[i]=t,this.di("update current tag title: ",t),this._cachedChange.next({active:"title",url:i,title:t,list:this.cached.list})}index(t){return this.cached.list.findIndex(i=>i.url===t)}exists(t){return this.index(t)!==-1}get(t){return t&&this.cached.list.find(i=>i.url===t)||null}remove(t,i){let r=typeof t=="string"?this.index(t):t,s=r!==-1?this.cached.list[r]:null;return!s||!i&&!s.closable?!1:(this.destroy(s._handle),this.cached.list.splice(r,1),delete this.cached.title[t],!0)}close(t,i=!1){return this.removeUrlBuffer=t,this.remove(t,i),this._cachedChange.next({active:"close",url:t,list:this.cached.list}),this.di("close tag",t),!0}closeRight(t,i=!1){let r=this.index(t);for(let s=this.count-1;s>r;s--)this.remove(s,i);return this.removeUrlBuffer=null,this._cachedChange.next({active:"closeRight",url:t,list:this.cached.list}),this.di("close right tages",t),!0}clear(t=!1){this.cached.list.forEach(i=>{!t&&i.closable&&this.destroy(i._handle)}),this.cached.list=this.cached.list.filter(i=>!t&&!i.closable),this.removeUrlBuffer=null,this._cachedChange.next({active:"clear",list:this.cached.list}),this.di("clear all catch")}move(t,i){let r=this.cached.list.findIndex(a=>a.url===t);if(r===-1)return;let s=this.cached.list.slice();s.splice(i<0?s.length+i:i,0,s.splice(r,1)[0]),this.cached.list=s,this._cachedChange.next({active:"move",url:t,position:i,list:this.cached.list})}replace(t){let i=this.curUrl;this.injector.get(mi).navigateByUrl(t).then(()=>{this.exists(i)?this.close(i,!0):this.removeUrlBuffer=i})}getTitle(t,i){if(this.cached.title[t])return this.cached.title[t];if(i&&i.data&&(i.data.titleI18n||i.data.title))return{text:i.data.title,i18n:i.data.titleI18n};let r=this.getMenu(t);return r?{text:r.text,i18n:r.i18n}:{text:t}}clearTitleCached(){this.cached.title={}}set closable(t){let i=this.curUrl;this.cached.closable[i]=t,this.di("update current tag closable: ",t),this._cachedChange.next({active:"closable",closable:t,list:this.cached.list})}getClosable(t,i){if(typeof this.cached.closable[t]<"u")return this.cached.closable[t];if(i&&i.data&&typeof i.data.reuseClosable=="boolean")return i.data.reuseClosable;let r=this.mode!==xc.URL?this.getMenu(t):null;return r&&typeof r.reuseClosable=="boolean"?r.reuseClosable:!0}clearClosableCached(){this.cached.closable={}}getTruthRoute(t){let i=t;for(;i.firstChild;)i=i.firstChild;return i}getUrl(t){let i=this.getTruthRoute(t),r=[];for(;i;)r.push(i.url.join("/")),i=i.parent;return`/${r.filter(a=>a).reverse().join("/")}`}can(t){let i=this.getUrl(t);if(i===this.removeUrlBuffer)return!1;if(t.data&&typeof t.data.reuse=="boolean")return t.data.reuse;if(this.mode!==xc.URL){let r=this.getMenu(i);if(!r)return!1;if(this.mode===xc.Menu){if(r.reuse===!1)return!1}else if(!r.reuse||r.reuse!==!0)return!1;return!0}return!this.isExclude(i)}isExclude(t){return this.excludes.findIndex(i=>i.test(t))!==-1}refresh(t){this._cachedChange.next({active:"refresh",data:t})}destroy(t){t&&t.componentRef&&t.componentRef.destroy&&t.componentRef.destroy()}di(...t){}constructor(){this.injector=ae($n),this.menuService=ae(xp),this.cached=ae(n9),this.stateKey=ae(i9),this.stateSrv=ae(r9),this._inited=!1,this._max=10,this._keepingScroll=!1,this._cachedChange=new ct(null),this.removeUrlBuffer=null,this.positionBuffer={},this.debug=!1,this.routeParamMatchMode="strict",this.mode=xc.Menu,this.excludes=[],this.storageState=!1,this.cached==null&&(this.cached={list:[],title:{},closable:{}})}init(){this.initScroll(),this._inited=!0,this.loadState()}loadState(){this.storageState&&(this.cached.list=this.stateSrv.get(this.stateKey).map(t=>({title:{text:t.title},url:t.url,position:t.position})),this._cachedChange.next({active:"loadState"}))}getMenu(t){let i=this.menuService.getPathByUrl(t);return!i||i.length===0?null:i.pop()}runHook(t,i,r="init"){if(typeof i=="number"&&(i=this.cached.list[i]._handle?.componentRef),i==null||!i.instance)return;let s=i.instance,a=s[t];typeof a=="function"&&(t==="_onReuseInit"?a.call(s,r):a.call(s))}hasInValidRoute(t){return!t.routeConfig||!!t.routeConfig.loadChildren||!!t.routeConfig.children}shouldDetach(t){return this.hasInValidRoute(t)?!1:(this.di("#shouldDetach",this.can(t),this.getUrl(t)),this.can(t))}saveCache(t,i,r){let s=this.getTruthRoute(t),a=this.getUrl(t),l=this.index(a),c={title:this.getTitle(a,s),url:a,closable:this.getClosable(a,t),_snapshot:t,_handle:i};if(l<0){if(this.items.splice(r??this.items.length,0,c),this.count>this._max){let u=this.items.findIndex(d=>d.url!==a&&d.closable);if(u!==-1){let d=this.items[u];this.remove(u,!1),nu(1).pipe(Zr(1)).subscribe(()=>this._cachedChange.next({active:"close",url:d.url,list:this.cached.list}))}}}else this.items[l]=c}store(t,i){let r=this.getUrl(t),s=this.index(r);if(s===-1)return;i!=null&&this.saveCache(t,i);let a=this.cached.list,l={title:this.getTitle(r,t),closable:this.getClosable(r,t),position:this.getKeepingScroll(r,t)?this.positionBuffer[r]:null,url:r,_snapshot:t,_handle:i},c=a[s]._handle?.componentRef;i==null&&c!=null&&nu(100).pipe(Zr(1)).subscribe(()=>this.runHook("_onReuseInit",c)),a[s]=l,this.removeUrlBuffer=null,this.di("#store","[override]",r),i&&i.componentRef&&this.runHook("_onReuseDestroy",i.componentRef),this._cachedChange.next({active:"override",item:l,list:a})}shouldAttach(t){if(this.hasInValidRoute(t))return!1;let i=this.getUrl(t),r=this.get(i),s=!!(r&&r._handle);return this.di("#shouldAttach",s,i),s||this._cachedChange.next({active:"add",url:i,list:this.cached.list}),s}retrieve(t){if(this.hasInValidRoute(t))return null;let i=this.getUrl(t),r=this.get(i),s=r&&r._handle||null;return this.di("#retrieve",i,s),s}shouldReuseRoute(t,i){let r=t.routeConfig===i.routeConfig;if(!r)return!1;let s=t.routeConfig&&t.routeConfig.path||"";return s.length>0&&~s.indexOf(":")&&(this.routeParamMatchMode==="strict"?r=this.getUrl(t)===this.getUrl(i):r=s===(i.routeConfig&&i.routeConfig.path||"")),this.di("====================="),this.di("#shouldReuseRoute",r,`${this.getUrl(i)}=>${this.getUrl(t)}`,t,i),r}getKeepingScroll(t,i){if(i&&i.data&&typeof i.data.keepingScroll=="boolean")return i.data.keepingScroll;let r=this.mode!==xc.URL?this.getMenu(t):null;return r&&typeof r.keepingScroll=="boolean"?r.keepingScroll:this.keepingScroll}get isDisabledInRouter(){return this.injector.get(VS,{}).scrollPositionRestoration==="disabled"}get ss(){return this.injector.get(yw)}initScroll(){this._router$&&this._router$.unsubscribe(),this._router$=this.injector.get(mi).events.subscribe(t=>{if(t instanceof kS){let i=this.curUrl;this.getKeepingScroll(i,this.getTruthRoute(this.snapshot))?this.positionBuffer[i]=this.ss.getScrollPosition(this.keepingScrollContainer):delete this.positionBuffer[i]}else if(t instanceof Io){let i=this.curUrl,r=this.get(i);r&&r.position&&this.getKeepingScroll(i,this.getTruthRoute(this.snapshot))&&(this.isDisabledInRouter?this.ss.scrollToPosition(this.keepingScrollContainer,r.position):setTimeout(()=>this.ss.scrollToPosition(this.keepingScrollContainer,r.position),1))}})}ngOnDestroy(){let{_cachedChange:t,_router$:i}=this;this.clear(),this.cached.list=[],t.complete(),i&&i.unsubscribe()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();var o9=["fixedEl"],s9=["*"],SC=function(o){return o.resize="resize",o.scroll="scroll",o.touchstart="touchstart",o.touchmove="touchmove",o.touchend="touchend",o.pageshow="pageshow",o.load="LOAD",o}(SC||{});function a9(o){return typeof window<"u"&&o===window}function jz(o){return a9(o)?{top:0,left:0,bottom:0}:o.getBoundingClientRect()}var l9="affix",zc="ant-affix",c9=20,wC=(()=>{let n=class n{get target(){let t=this.nzTarget;return(typeof t=="string"?this.document.querySelector(t):t)||window}constructor(t,i,r,s,a,l,c,u,d,p){this.nzConfigService=r,this.scrollSrv=s,this.ngZone=a,this.platform=l,this.renderer=c,this.nzResizeObserver=u,this.cdr=d,this.directionality=p,this._nzModuleName=l9,this.nzChange=new O,this.dir="ltr",this.positionChangeSubscription=lr.EMPTY,this.offsetChanged$=new tn(1),this.destroy$=new J,this.placeholderNode=t.nativeElement,this.document=i}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.registerListeners(),this.updatePosition({}),this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(t){let{nzOffsetBottom:i,nzOffsetTop:r,nzTarget:s}=t;(i||r)&&this.offsetChanged$.next(),s&&this.registerListeners()}ngAfterViewInit(){this.registerListeners()}ngOnDestroy(){this.removeListeners()}registerListeners(){if(!this.platform.isBrowser)return;this.removeListeners();let t=this.target===window?this.document.body:this.target;this.positionChangeSubscription=this.ngZone.runOutsideAngular(()=>_t(...Object.keys(SC).map(i=>Ke(this.target,i)),this.offsetChanged$.pipe(We(()=>({}))),this.nzResizeObserver.observe(t)).pipe(_S(c9,void 0,{trailing:!0}),F(this.destroy$)).subscribe(i=>this.updatePosition(i))),this.timeout=setTimeout(()=>this.updatePosition({}))}removeListeners(){clearTimeout(this.timeout),this.positionChangeSubscription.unsubscribe(),this.destroy$.next(!0),this.destroy$.complete()}getOffset(t,i){let r=t.getBoundingClientRect(),s=jz(i),a=this.scrollSrv.getScroll(i,!0),l=this.scrollSrv.getScroll(i,!1),c=this.document.body,u=c.clientTop||0,d=c.clientLeft||0;return{top:r.top-s.top+a-u,left:r.left-s.left+l-d,width:r.width,height:r.height}}setAffixStyle(t,i){let r=this.affixStyle,s=this.target===window;if(t.type==="scroll"&&r&&i&&s||Xg(r,i))return;let a=!!i,l=this.fixedEl.nativeElement;this.renderer.setStyle(l,"cssText",nm(i)),this.affixStyle=i,a?l.classList.add(zc):l.classList.remove(zc),this.updateRtlClass(),(i&&!r||!i&&r)&&this.nzChange.emit(a)}setPlaceholderStyle(t){let i=this.placeholderStyle;Xg(t,i)||(this.renderer.setStyle(this.placeholderNode,"cssText",nm(t)),this.placeholderStyle=t)}syncPlaceholderStyle(t){if(!this.affixStyle)return;this.renderer.setStyle(this.placeholderNode,"cssText",""),this.placeholderStyle=void 0;let i={width:this.placeholderNode.offsetWidth,height:this.fixedEl.nativeElement.offsetHeight};this.setAffixStyle(t,V(V({},this.affixStyle),i)),this.setPlaceholderStyle(i)}updatePosition(t){if(!this.platform.isBrowser)return;let i=this.target,r=this.nzOffsetTop,s=this.scrollSrv.getScroll(i,!0),a=this.getOffset(this.placeholderNode,i),l=this.fixedEl.nativeElement,c={width:l.offsetWidth,height:l.offsetHeight},u={top:!1,bottom:!1};typeof r!="number"&&typeof this.nzOffsetBottom!="number"?(u.top=!0,r=0):(u.top=typeof r=="number",u.bottom=typeof this.nzOffsetBottom=="number");let d=jz(i),p=i.innerHeight||i.clientHeight;if(s>=a.top-r&&u.top){let g=a.width,v=d.top+r;this.setAffixStyle(t,{position:"fixed",top:v,left:d.left+a.left,width:g}),this.setPlaceholderStyle({width:g,height:c.height})}else if(s<=a.top+c.height+this.nzOffsetBottom-p&&u.bottom){let g=i===window?0:window.innerHeight-d.bottom,v=a.width;this.setAffixStyle(t,{position:"fixed",bottom:g+this.nzOffsetBottom,left:d.left+a.left,width:v}),this.setPlaceholderStyle({width:v,height:a.height})}else t.type===SC.resize&&this.affixStyle&&this.affixStyle.position==="fixed"&&this.placeholderNode.offsetWidth?this.setAffixStyle(t,ot(V({},this.affixStyle),{width:this.placeholderNode.offsetWidth})):this.setAffixStyle(t),this.setPlaceholderStyle();t.type==="resize"&&this.syncPlaceholderStyle(t)}updateRtlClass(){let t=this.fixedEl.nativeElement;this.dir==="rtl"?t.classList.contains(zc)?t.classList.add(`${zc}-rtl`):t.classList.remove(`${zc}-rtl`):t.classList.remove(`${zc}-rtl`)}};n.\u0275fac=function(i){return new(i||n)(w(de),w(gi),w(st),w(xw),w($e),w(gn),w(He),w(ds),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-affix"]],viewQuery:function(i,r){if(i&1&&xe(o9,7),i&2){let s;ce(s=ue())&&(r.fixedEl=s.first)}},inputs:{nzTarget:"nzTarget",nzOffsetTop:"nzOffsetTop",nzOffsetBottom:"nzOffsetBottom"},outputs:{nzChange:"nzChange"},exportAs:["nzAffix"],standalone:!0,features:[oe,K],ngContentSelectors:s9,decls:3,vars:0,consts:[["fixedEl",""]],template:function(i,r){i&1&&(Pe(),C(0,"div",null,0),Ie(2),S())},dependencies:[$S,hp],encapsulation:2,changeDetection:0});let o=n;return N([De(),ci(void 0)],o.prototype,"nzOffsetTop",void 0),N([De(),ci(void 0)],o.prototype,"nzOffsetBottom",void 0),o})(),Wz=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[wC]});let o=n;return o})();var bC=["*"];function u9(o,n){}function d9(o,n){if(o&1&&(H(0),C(1,"span",3),_(2,u9,0,0,"ng-template",4),R(3,"span",5),S(),B()),o&2){let e=m(),t=te(2);f(),h("nzDropdownMenu",e.nzOverlay),f(),h("ngTemplateOutlet",t)}}function p9(o,n){o&1&&(C(0,"span",6),Ie(1),S())}function h9(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),Ne(" ",e.nzBreadCrumbComponent.nzSeparator," ")}}function f9(o,n){if(o&1&&(C(0,"nz-breadcrumb-separator"),_(1,h9,2,1,"ng-container",7),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.nzBreadCrumbComponent.nzSeparator)}}function g9(o,n){if(o&1){let e=Q();C(0,"nz-breadcrumb-item")(1,"a",2),A("click",function(i){let s=I(e).$implicit,a=m(2);return P(a.navigate(s.url,i))}),Y(2),S()()}if(o&2){let e=n.$implicit;f(),ze("href",e.url,Do),f(),ye(e.label)}}function m9(o,n){if(o&1&&(H(0),_(1,g9,3,2,"nz-breadcrumb-item",1),B()),o&2){let e=m();f(),h("ngForOf",e.breadcrumbs)}}var v9=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-breadcrumb-separator"]],hostAttrs:[1,"ant-breadcrumb-separator"],exportAs:["nzBreadcrumbSeparator"],standalone:!0,features:[K],ngContentSelectors:bC,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2});let o=n;return o})(),gf=class{},mf=(()=>{let n=class n{constructor(t){this.nzBreadCrumbComponent=t}};n.\u0275fac=function(i){return new(i||n)(w(gf))},n.\u0275cmp=j({type:n,selectors:[["nz-breadcrumb-item"]],inputs:{nzOverlay:"nzOverlay"},exportAs:["nzBreadcrumbItem"],standalone:!0,features:[K],ngContentSelectors:bC,decls:4,vars:3,consts:[[4,"ngIf","ngIfElse"],["noMenuTpl",""],[4,"ngIf"],["nz-dropdown","",1,"ant-breadcrumb-overlay-link",3,"nzDropdownMenu"],[3,"ngTemplateOutlet"],["nz-icon","","nzType","down"],[1,"ant-breadcrumb-link"],[4,"nzStringTemplateOutlet"]],template:function(i,r){if(i&1&&(Pe(),_(0,d9,4,2,"ng-container",0)(1,p9,2,0,"ng-template",null,1,_e)(3,f9,2,1,"nz-breadcrumb-separator",2)),i&2){let s=te(2);h("ngIf",!!r.nzOverlay)("ngIfElse",s),f(3),h("ngIf",r.nzBreadCrumbComponent.nzSeparator)}},dependencies:[we,Be,v9,Lr,yr,Ge,Fe,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),TC=(()=>{let n=class n{constructor(t,i,r,s,a){this.injector=t,this.cdr=i,this.elementRef=r,this.renderer=s,this.directionality=a,this.nzAutoGenerate=!1,this.nzSeparator="/",this.nzRouteLabel="breadcrumb",this.nzRouteLabelFn=l=>l,this.breadcrumbs=[],this.dir="ltr",this.destroy$=new J}ngOnInit(){this.nzAutoGenerate&&this.registerRouterChange(),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.prepareComponentForRtl(),this.cdr.detectChanges()}),this.dir=this.directionality.value,this.prepareComponentForRtl()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}navigate(t,i){i.preventDefault(),this.injector.get(mi).navigateByUrl(t)}registerRouterChange(){try{let t=this.injector.get(mi),i=this.injector.get(dp);t.events.pipe(Qe(r=>r instanceof Io),F(this.destroy$),Ot(!0)).subscribe(()=>{this.breadcrumbs=this.getBreadcrumbs(i.root),this.cdr.markForCheck()})}catch{throw new Error(`${gp} You should import RouterModule if you want to use 'NzAutoGenerate'.`)}}getBreadcrumbs(t,i="",r=[]){let s=t.children;if(s.length===0)return r;for(let a of s)if(a.outlet===LS){let l=a.snapshot.url.map(d=>d.path).filter(d=>d).join("/"),c=l?`${i}/${l}`:i,u=this.nzRouteLabelFn(a.snapshot.data[this.nzRouteLabel]);if(l&&u){let d={label:u,params:a.snapshot.params,url:c};r.push(d)}return this.getBreadcrumbs(a,c,r)}return r}prepareComponentForRtl(){this.dir==="rtl"?this.renderer.addClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-breadcrumb-rtl")}};n.\u0275fac=function(i){return new(i||n)(w($n),w(fe),w(de),w(He),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-breadcrumb"]],hostAttrs:[1,"ant-breadcrumb"],inputs:{nzAutoGenerate:"nzAutoGenerate",nzSeparator:"nzSeparator",nzRouteLabel:"nzRouteLabel",nzRouteLabelFn:"nzRouteLabelFn"},exportAs:["nzBreadcrumb"],standalone:!0,features:[Ve([{provide:gf,useExisting:n}]),K],ngContentSelectors:bC,decls:2,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"click"]],template:function(i,r){i&1&&(Pe(),Ie(0),_(1,m9,2,1,"ng-container",0)),i&2&&(f(),h("ngIf",r.nzAutoGenerate&&r.breadcrumbs.length))},dependencies:[lt,we,mf],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzAutoGenerate",void 0),o})(),Uz=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[TC,mf]});let o=n;return o})();var y9=["nzType","avatar"];function C9(o,n){if(o&1&&(C(0,"div",5),R(1,"nz-skeleton-element",6),S()),o&2){let e=m(2);f(),h("nzSize",e.avatar.size||"default")("nzShape",e.avatar.shape||"circle")}}function _9(o,n){if(o&1&&R(0,"h3",7),o&2){let e=m(2);Re("width",e.toCSSUnit(e.title.width))}}function S9(o,n){if(o&1&&R(0,"li"),o&2){let e=n.index,t=m(3);Re("width",t.toCSSUnit(t.widthList[e]))}}function w9(o,n){if(o&1&&(C(0,"ul",8),_(1,S9,1,2,"li",9),S()),o&2){let e=m(2);f(),h("ngForOf",e.rowsList)}}function b9(o,n){if(o&1&&(H(0),_(1,C9,2,2,"div",1),C(2,"div",2),_(3,_9,1,2,"h3",3)(4,w9,2,1,"ul",4),S(),B()),o&2){let e=m();f(),h("ngIf",!!e.nzAvatar),f(2),h("ngIf",!!e.nzTitle),f(),h("ngIf",!!e.nzParagraph)}}function T9(o,n){o&1&&(H(0),Ie(1),B())}var E9=["*"],x9=(()=>{let n=class n{constructor(){this.nzActive=!1,this.nzBlock=!1}};n.\u0275fac=function(i){return new(i||n)},n.\u0275dir=Se({type:n,selectors:[["nz-skeleton-element"]],hostAttrs:[1,"ant-skeleton","ant-skeleton-element"],hostVars:4,hostBindings:function(i,r){i&2&&k("ant-skeleton-active",r.nzActive)("ant-skeleton-block",r.nzBlock)},inputs:{nzActive:"nzActive",nzType:"nzType",nzBlock:"nzBlock"},standalone:!0});let o=n;return N([W()],o.prototype,"nzBlock",void 0),o})();var z9=(()=>{let n=class n{constructor(){this.nzShape="circle",this.nzSize="default",this.styleMap={}}ngOnChanges(t){if(t.nzSize&&typeof this.nzSize=="number"){let i=`${this.nzSize}px`;this.styleMap={width:i,height:i,"line-height":i}}else this.styleMap={}}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-skeleton-element","nzType","avatar"]],inputs:{nzShape:"nzShape",nzSize:"nzSize"},standalone:!0,features:[oe,K],attrs:y9,decls:1,vars:9,consts:[[1,"ant-skeleton-avatar",3,"ngStyle"]],template:function(i,r){i&1&&R(0,"span",0),i&2&&(k("ant-skeleton-avatar-square",r.nzShape==="square")("ant-skeleton-avatar-circle",r.nzShape==="circle")("ant-skeleton-avatar-lg",r.nzSize==="large")("ant-skeleton-avatar-sm",r.nzSize==="small"),h("ngStyle",r.styleMap))},dependencies:[Zt],encapsulation:2,changeDetection:0});let o=n;return o})();var Kz=(()=>{let n=class n{constructor(t){this.cdr=t,this.nzActive=!1,this.nzLoading=!0,this.nzRound=!1,this.nzTitle=!0,this.nzAvatar=!1,this.nzParagraph=!0,this.rowsList=[],this.widthList=[]}toCSSUnit(t=""){return Ea(t)}getTitleProps(){let t=!!this.nzAvatar,i=!!this.nzParagraph,r="";return!t&&i?r="38%":t&&i&&(r="50%"),V({width:r},this.getProps(this.nzTitle))}getAvatarProps(){let t=this.nzTitle&&!this.nzParagraph?"square":"circle";return V({shape:t,size:"large"},this.getProps(this.nzAvatar))}getParagraphProps(){let t=!!this.nzAvatar,i=!!this.nzTitle,r={};return(!t||!i)&&(r.width="61%"),!t&&i?r.rows=3:r.rows=2,V(V({},r),this.getProps(this.nzParagraph))}getProps(t){return t&&typeof t=="object"?t:{}}getWidthList(){let{width:t,rows:i}=this.paragraph,r=[];return t&&Array.isArray(t)?r=t:t&&!Array.isArray(t)&&(r=[],r[i-1]=t),r}updateProps(){this.title=this.getTitleProps(),this.avatar=this.getAvatarProps(),this.paragraph=this.getParagraphProps(),this.rowsList=[...Array(this.paragraph.rows)],this.widthList=this.getWidthList(),this.cdr.markForCheck()}ngOnInit(){this.updateProps()}ngOnChanges(t){(t.nzTitle||t.nzAvatar||t.nzParagraph)&&this.updateProps()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-skeleton"]],hostAttrs:[1,"ant-skeleton"],hostVars:6,hostBindings:function(i,r){i&2&&k("ant-skeleton-with-avatar",!!r.nzAvatar)("ant-skeleton-active",r.nzActive)("ant-skeleton-round",!!r.nzRound)},inputs:{nzActive:"nzActive",nzLoading:"nzLoading",nzRound:"nzRound",nzTitle:"nzTitle",nzAvatar:"nzAvatar",nzParagraph:"nzParagraph"},exportAs:["nzSkeleton"],standalone:!0,features:[oe,K],ngContentSelectors:E9,decls:2,vars:2,consts:[[4,"ngIf"],["class","ant-skeleton-header",4,"ngIf"],[1,"ant-skeleton-content"],["class","ant-skeleton-title",3,"width",4,"ngIf"],["class","ant-skeleton-paragraph",4,"ngIf"],[1,"ant-skeleton-header"],["nzType","avatar",3,"nzSize","nzShape"],[1,"ant-skeleton-title"],[1,"ant-skeleton-paragraph"],[3,"width",4,"ngFor","ngForOf"]],template:function(i,r){i&1&&(Pe(),_(0,b9,5,3,"ng-container",0)(1,T9,2,0,"ng-container",0)),i&2&&(h("ngIf",r.nzLoading),f(),h("ngIf",!r.nzLoading))},dependencies:[x9,z9,we,lt],encapsulation:2,changeDetection:0});let o=n;return o})(),qz=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();var O9=["conTpl"],D9=["affix"];function R9(o,n){}function I9(o,n){if(o&1&&(C(0,"nz-affix",0,2),_(2,R9,0,0,"ng-template",3),S()),o&2){let e=m(),t=te(3);h("nzOffsetTop",e.fixedOffsetTop),f(2),h("ngTemplateOutlet",t)}}function P9(o,n){}function M9(o,n){if(o&1&&_(0,P9,0,0,"ng-template",3),o&2){m();let e=te(3);h("ngTemplateOutlet",e)}}function F9(o,n){}function A9(o,n){if(o&1&&_(0,F9,0,0,"ng-template",3),o&2){let e=m(2);h("ngTemplateOutlet",e.breadcrumb)}}function N9(o,n){if(o&1&&(C(0,"a",15),Y(1),S()),o&2){let e=m().$implicit;h("routerLink",e.link),f(),ye(e.title)}}function L9(o,n){if(o&1&&Y(0),o&2){let e=m().$implicit;Ne(" ",e.title," ")}}function k9(o,n){if(o&1&&(C(0,"nz-breadcrumb-item"),_(1,N9,2,2,"a",15)(2,L9,1,1),S()),o&2){let e=n.$implicit;f(),ie(1,e.link?1:2)}}function V9(o,n){if(o&1&&(C(0,"nz-breadcrumb"),Cn(1,k9,3,1,"nz-breadcrumb-item",null,yn),S()),o&2){let e=m(3);f(),_n(e.paths)}}function G9(o,n){if(o&1&&_(0,V9,3,0,"nz-breadcrumb"),o&2){let e=m(2);ie(0,e.paths&&e.paths.length>0?0:-1)}}function H9(o,n){}function B9(o,n){if(o&1&&(C(0,"div",16),_(1,H9,0,0,"ng-template",3),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.logo)}}function $9(o,n){}function j9(o,n){if(o&1&&_(0,$9,0,0,"ng-template",3),o&2){let e=m(3);h("ngTemplateOutlet",e._titleTpl)}}function W9(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(5);f(),ye(e.titleSub)}}function U9(o,n){if(o&1&&(C(0,"small"),_(1,W9,2,1,"ng-container",18),S()),o&2){let e=m(4);f(),h("nzStringTemplateOutlet",e.titleSub)}}function K9(o,n){if(o&1&&(Y(0),_(1,U9,2,1,"small")),o&2){let e=m(3);Ne(" ",e._titleVal," "),f(),ie(1,e.titleSub?1:-1)}}function q9(o,n){if(o&1&&(C(0,"h1",17),_(1,j9,1,1,null,3)(2,K9,2,2),S()),o&2){let e=m(2);f(),ie(1,e._titleTpl?1:2)}}function Y9(o,n){}function Q9(o,n){if(o&1&&(C(0,"div",19),_(1,Y9,0,0,"ng-template",3),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.action)}}function X9(o,n){}function Z9(o,n){}function J9(o,n){if(o&1&&(C(0,"div",20),_(1,Z9,0,0,"ng-template",3),S()),o&2){let e=m(2);f(),h("ngTemplateOutlet",e.extra)}}function e8(o,n){}var t8=()=>({rows:3}),n8=()=>({size:"large",shape:"circle"});function i8(o,n){if(o&1){let e=Q();C(0,"div",4)(1,"div")(2,"nz-skeleton",5),_(3,A9,1,1,null,3)(4,G9,1,1),C(5,"div",6),_(6,B9,2,1,"div",7),C(7,"div",8)(8,"div",9),_(9,q9,3,1,"h1",10)(10,Q9,2,1,"div",11),S(),C(11,"div",9)(12,"div",12,13),A("cdkObserveContent",function(){I(e);let i=m();return P(i.checkContent())}),Ie(14),_(15,X9,0,0,"ng-template",3),S(),_(16,J9,2,1,"div",14),S()()(),_(17,e8,0,0,"ng-template",3),S()()()}if(o&2){let e=m();k("page-header-rtl",e.dir==="rtl"),f(),k("page-header__wide",e.wide),f(),h("nzLoading",e.loading)("nzTitle",!1)("nzActive",!0)("nzParagraph",ii(16,t8))("nzAvatar",ii(17,n8)),f(),ie(3,e.breadcrumb?3:4),f(3),ie(6,e.logo?6:-1),f(3),ie(9,e._titleVal||e._titleTpl?9:-1),f(),ie(10,e.action?10:-1),f(5),h("ngTemplateOutlet",e.content),f(),ie(16,e.extra?16:-1),f(),h("ngTemplateOutlet",e.tab)}}var r8=["*"],o8=(()=>{let n=class n{get menus(){return this.menuSrv.getPathByUrl(this.router.url,this.recursiveBreadcrumb)}set title(t){t instanceof En?(this._title=null,this._titleTpl=t,this._titleVal=""):(this._title=t,this._titleVal=this._title)}constructor(t,i,r){this.renderer=ae(He),this.router=ae(mi),this.cdr=ae(fe),this.menuSrv=ae(xp),this.i18nSrv=ae(Rs,{optional:!0}),this.titleSrv=ae(pw,{optional:!0}),this.reuseSrv=ae($z,{optional:!0}),this.directionality=ae(Me,{optional:!0}),this.destroy$=ae(rs),this.inited=!1,this.isBrowser=!0,this.dir="ltr",this._titleVal="",this.paths=[],this._title=null,this._titleTpl=null,this.loading=!1,this.wide=!1,this.breadcrumb=null,this.logo=null,this.action=null,this.content=null,this.extra=null,this.tab=null,this.isBrowser=r.isBrowser,i.attach(this,"pageHeader",{home:"\u9996\u9875",homeLink:"/",autoBreadcrumb:!0,recursiveBreadcrumb:!1,autoTitle:!0,syncTitle:!0,fixed:!1,fixedOffsetTop:64}),t.notify.pipe(li(),Qe(a=>this.affix&&a.type==="layout"&&a.name==="collapsed")).subscribe(()=>this.affix.updatePosition({}));let s=[this.router.events.pipe(Qe(a=>a instanceof Io))];this.menuSrv!=null&&s.push(this.menuSrv.change),this.i18nSrv!=null&&s.push(this.i18nSrv.change),_t(...s).pipe(li(),Qe(()=>this.inited)).subscribe(()=>this.refresh())}refresh(){this.setTitle().genBreadcrumb(),this.cdr.detectChanges()}genBreadcrumb(){if(this.breadcrumb||!this.autoBreadcrumb||this.menus.length<=0){this.paths=[];return}let t=[];this.menus.forEach(i=>{if(typeof i.hideInBreadcrumb<"u"&&i.hideInBreadcrumb)return;let r=i.text;i.i18n&&this.i18nSrv&&(r=this.i18nSrv.fanyi(i.i18n)),t.push({title:r,link:i.link&&[i.link]})}),this.home&&t.splice(0,0,{title:this.homeI18n&&this.i18nSrv&&this.i18nSrv.fanyi(this.homeI18n)||this.home,link:[this.homeLink]}),this.paths=t}setTitle(){if(this._title==null&&this._titleTpl==null&&this.autoTitle&&this.menus.length>0){let t=this.menus[this.menus.length-1],i=t.text;t.i18n&&this.i18nSrv&&(i=this.i18nSrv.fanyi(t.i18n)),this._titleVal=i}return this._titleVal&&this.syncTitle&&(this.titleSrv&&this.titleSrv.setTitle(this._titleVal),!this.inited&&this.reuseSrv&&(this.reuseSrv.title=this._titleVal)),this}checkContent(){Bl(this.conTpl.nativeElement)?this.renderer.setAttribute(this.conTpl.nativeElement,"hidden",""):this.renderer.removeAttribute(this.conTpl.nativeElement,"hidden")}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(li(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.refresh(),this.inited=!0}ngAfterViewInit(){this.checkContent()}ngOnChanges(){this.inited&&this.refresh()}};n.\u0275fac=function(i){return new(i||n)(w(dw),w(In),w(gn))},n.\u0275cmp=j({type:n,selectors:[["page-header"]],viewQuery:function(i,r){if(i&1&&(xe(O9,5),xe(D9,5)),i&2){let s;ce(s=ue())&&(r.conTpl=s.first),ce(s=ue())&&(r.affix=s.first)}},inputs:{title:"title",titleSub:"titleSub",loading:[le.HasDecoratorInputTransform,"loading","loading",it],wide:[le.HasDecoratorInputTransform,"wide","wide",it],home:"home",homeLink:"homeLink",homeI18n:"homeI18n",autoBreadcrumb:[le.HasDecoratorInputTransform,"autoBreadcrumb","autoBreadcrumb",it],autoTitle:[le.HasDecoratorInputTransform,"autoTitle","autoTitle",it],syncTitle:[le.HasDecoratorInputTransform,"syncTitle","syncTitle",it],fixed:[le.HasDecoratorInputTransform,"fixed","fixed",it],fixedOffsetTop:[le.HasDecoratorInputTransform,"fixedOffsetTop","fixedOffsetTop",fn],breadcrumb:"breadcrumb",recursiveBreadcrumb:[le.HasDecoratorInputTransform,"recursiveBreadcrumb","recursiveBreadcrumb",it],logo:"logo",action:"action",content:"content",extra:"extra",tab:"tab"},exportAs:["pageHeader"],standalone:!0,features:[fi,oe,K],ngContentSelectors:r8,decls:4,vars:1,consts:[[3,"nzOffsetTop"],["phTpl",""],["affix",""],[3,"ngTemplateOutlet"],[1,"page-header"],[1,"d-block",3,"nzLoading","nzTitle","nzActive","nzParagraph","nzAvatar"],[1,"page-header__detail"],["class","page-header__logo"],[1,"page-header__main"],[1,"page-header__row"],["class","page-header__title"],["class","page-header__action"],[1,"page-header__desc",3,"cdkObserveContent"],["conTpl",""],["class","page-header__extra"],[3,"routerLink"],[1,"page-header__logo"],[1,"page-header__title"],[4,"nzStringTemplateOutlet"],[1,"page-header__action"],[1,"page-header__extra"]],template:function(i,r){i&1&&(Pe(),_(0,I9,3,2,"nz-affix",0)(1,M9,1,1)(2,i8,18,18,"ng-template",null,1,_e)),i&2&&ie(0,r.isBrowser&&r.fixed?0:1)},dependencies:[wC,Be,Kz,TC,mf,Po,Ue,Ll],encapsulation:2,changeDetection:0});let o=n;return o})(),s8=[o8],vf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,Il,vp,Wz,qz,Uz,Ye,s8]});let o=n;return o})();function l8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m();f(),ye(e.title)}}function c8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.description)}}function u8(o,n){if(o&1&&(C(0,"div",7),_(1,c8,2,1,"ng-container",3),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.description)}}function d8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.extra)}}function p8(o,n){if(o&1&&(C(0,"div",8),_(1,d8,2,1,"ng-container",3),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.extra)}}var h8=["*"],h0e=(()=>{let n=class n{constructor(){this.cdr=ae(fe),this.directionality=ae(Me,{optional:!0}),this.destroy$=ae(rs),this._type="",this._icon="",this.dir="ltr"}set type(t){switch(this._type=t,t){case"success":this._icon="check-circle";break;case"error":this._icon="close-circle";break;default:this._icon=t;break}}ngOnInit(){this.dir=this.directionality?.value,this.directionality?.change.pipe(li(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["result"]],hostVars:4,hostBindings:function(i,r){i&2&&k("result",!0)("result-rtl",r.dir==="rtl")},inputs:{type:"type",title:"title",description:"description",extra:"extra"},exportAs:["result"],standalone:!0,features:[K],ngContentSelectors:h8,decls:8,vars:7,consts:[[1,"result__icon"],["nz-icon","",3,"nzType"],[1,"result__title"],[4,"nzStringTemplateOutlet"],["class","result__desc"],["class","result__extra"],[1,"result__actions"],[1,"result__desc"],[1,"result__extra"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0),R(1,"i",1),S(),C(2,"div",2),_(3,l8,2,1,"ng-container",3),S(),_(4,u8,2,1,"div",4)(5,p8,2,1,"div",5),C(6,"div",6),Ie(7),S()),i&2&&(f(),Ae("result__icon-",r._type,""),h("nzType",r._icon),f(2),h("nzStringTemplateOutlet",r.title),f(),ie(4,r.description?4:-1),f(),ie(5,r.extra?5:-1))},dependencies:[Fe,Ue],encapsulation:2,changeDetection:0});let o=n;return o})();var yf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,Ge,Ye]});let o=n;return o})();var xC=["*"];function g8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.title)}}function m8(o,n){if(o&1&&(C(0,"div",0),_(1,g8,2,1,"ng-container",1),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.title)}}var v8=["contentElement"];function y8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.label)}}function C8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.optional)}}function _8(o,n){if(o&1&&R(0,"i",12),o&2){let e=m(3);h("nzTooltipTitle",e.optionalHelp)("nzTooltipColor",e.optionalHelpColor)}}function S8(o,n){if(o&1&&(C(0,"span",11),_(1,C8,2,1,"ng-container",9)(2,_8,1,2,"i",12),S()),o&2){let e=m(2);k("se__label-optional-no-text",!e.optional),f(),h("nzStringTemplateOutlet",e.optional),f(),ie(2,e.optionalHelp?2:-1)}}var w8=(o,n)=>({"ant-form-item-required":o,"se__no-colon":n});function b8(o,n){if(o&1&&(C(0,"label",7)(1,"span",8),_(2,y8,2,1,"ng-container",9),S(),_(3,S8,3,4,"span",10),S()),o&2){let e=m();h("ngClass",ri(4,w8,e.required,e._noColon)),ze("for",e._id),f(2),h("nzStringTemplateOutlet",e.label),f(),ie(3,e.optional||e.optionalHelp?3:-1)}}function T8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e._error)}}function E8(o,n){if(o&1&&(C(0,"div",13)(1,"div",14),_(2,T8,2,1,"ng-container",9),S()()),o&2){let e=m();h("@helpMotion",void 0),f(2),h("nzStringTemplateOutlet",e._error)}}function x8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.extra)}}function z8(o,n){if(o&1&&(C(0,"div",15),_(1,x8,2,1,"ng-container",9),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.extra)}}var O8=(()=>{let n=class n{constructor(){if(this.parentComp=ae(Yz,{host:!0,optional:!0}),this.el=ae(de).nativeElement,this.ren=ae(He),this.parentComp==null)throw new Error("[se-title] must include 'se-container' component")}setClass(){let{el:t}=this,i=this.parentComp.gutter;this.ren.setStyle(t,"padding-left",`${i/2}px`),this.ren.setStyle(t,"padding-right",`${i/2}px`)}ngOnInit(){this.setClass()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["se-title"],["","se-title",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("se__title",!0)},exportAs:["seTitle"],standalone:!0,features:[K],ngContentSelectors:xC,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Yz=(()=>{let n=class n{get gutter(){return this.nzLayout==="horizontal"?this._gutter:0}set gutter(t){this._gutter=t}get nzLayout(){return this._nzLayout}set nzLayout(t){this._nzLayout=t,t==="inline"&&(this.size="compact")}set errors(t){this.setErrors(t)}get margin(){return-(this.gutter/2)}get errorNotify(){return this.errorNotify$.pipe(Qe(t=>t!=null))}constructor(t){this.errorNotify$=new ct(null),this.noColon=!1,this.line=!1,t.attach(this,"se",{size:"default",nzLayout:"horizontal",gutter:32,col:2,labelWidth:150,firstVisual:!1,ingoreDirty:!1})}setErrors(t){for(let i of t)this.errorNotify$.next(i)}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["se-container"],["","se-container",""]],hostVars:16,hostBindings:function(i,r){i&2&&(Re("margin-left",r.margin,"px")("margin-right",r.margin,"px"),k("ant-row",!0)("se__container",!0)("se__horizontal",r.nzLayout==="horizontal")("se__vertical",r.nzLayout==="vertical")("se__inline",r.nzLayout==="inline")("se__compact",r.size==="compact"))},inputs:{colInCon:[le.HasDecoratorInputTransform,"se-container","colInCon",t=>t==null?null:fn(t)],col:[le.HasDecoratorInputTransform,"col","col",t=>t==null?null:fn(t)],labelWidth:[le.HasDecoratorInputTransform,"labelWidth","labelWidth",t=>t==null?null:fn(t)],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",it],title:"title",gutter:[le.HasDecoratorInputTransform,"gutter","gutter",fn],nzLayout:"nzLayout",size:"size",firstVisual:[le.HasDecoratorInputTransform,"firstVisual","firstVisual",it],ingoreDirty:[le.HasDecoratorInputTransform,"ingoreDirty","ingoreDirty",it],line:[le.HasDecoratorInputTransform,"line","line",it],errors:"errors"},exportAs:["seContainer"],standalone:!0,features:[fi,K],ngContentSelectors:xC,decls:2,vars:1,consts:[["se-title",""],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),_(0,m8,2,1,"div",0),Ie(1)),i&2&&ie(0,r.title?0:-1)},dependencies:[O8,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),EC="se",D8=0,Qz=(()=>{let n=class n{set error(t){this.errorData=typeof t=="string"||t instanceof En?{"":t}:t}set id(t){this._id=t,this._autoId=!1}get paddingValue(){return this.parentComp.gutter/2}get showErr(){return this.invalid&&!!this._error&&!this.compact}get compact(){return this.parentComp.size==="compact"}get ngControl(){return this.ngModel||this.formControlName}constructor(){if(this.parentComp=ae(Yz,{host:!0,optional:!0}),this.el=ae(de).nativeElement,this.rep=ae(zp),this.ren=ae(He),this.cdr=ae(fe),this.statusSrv=ae(cn),this.destroy$=ae(rs),this.clsMap=[],this.inited=!1,this.onceFlag=!1,this.errorData={},this.isBindModel=!1,this.invalid=!1,this._labelWidth=null,this._noColon=null,this.optional=null,this.optionalHelp=null,this.required=!1,this.controlClass="",this.hideLabel=!1,this._id=`_se-${++D8}`,this._autoId=!0,this.parentComp==null)throw new Error("[se] must include 'se-container' component");this.parentComp.errorNotify.pipe(li(),Qe(t=>this.inited&&this.ngControl!=null&&this.ngControl.name===t.name)).subscribe(t=>{this.error=t.error,this.updateStatus(this.ngControl.invalid)})}setClass(){let{el:t,ren:i,clsMap:r,col:s,cdr:a,line:l,labelWidth:c,rep:u,noColon:d}=this,p=this.parentComp;this._noColon=d??p.noColon,this._labelWidth=p.nzLayout==="horizontal"?c??p.labelWidth:null,r.forEach(y=>i.removeClass(t,y)),r.length=0;let g=p.colInCon||p.col,v=p.nzLayout==="horizontal"?u.genCls(s??g,g):[];return r.push("ant-form-item",...v,`${EC}__item`),(l||p.line)&&r.push(`${EC}__line`),r.forEach(y=>i.addClass(t,y)),a.detectChanges(),this}bindModel(){if(!(!this.ngControl||this.isBindModel)){if(this.isBindModel=!0,this.ngControl.statusChanges.pipe(li(this.destroy$)).subscribe(t=>this.updateStatus(t==="INVALID")),this._autoId){let t=this.ngControl.valueAccessor,i=(t?.elementRef||t?._elementRef)?.nativeElement;i&&(i.id?this._id=i.id:i.id=this._id)}if(this.required!==!0){let t=this.ngControl?.control?.hasValidator(Np.required);t!==!0&&(t=(this.ngControl?._rawValidators).find(r=>r instanceof Rm)!=null),this.required=t,this.cdr.detectChanges()}}}updateStatus(t){if(this.ngControl?.disabled||this.ngControl?.isDisabled)return;this.invalid=!this.onceFlag&&t&&this.parentComp.ingoreDirty===!1&&!this.ngControl?.dirty?!1:t;let i=this.ngControl?.errors;if(i!=null&&Object.keys(i).length>0){let r=Object.keys(i)[0]||"",s=this.errorData[r];this._error=s??(this.errorData[""]||"")}this.statusSrv.formStatusChanges.next({status:this.invalid?"error":"",hasFeedback:!1}),this.cdr.detectChanges()}checkContent(){let t=this.contentElement.nativeElement,i=`${EC}__item-empty`;Bl(t)?this.ren.addClass(t,i):this.ren.removeClass(t,i)}ngAfterContentInit(){this.checkContent()}ngOnChanges(){this.onceFlag=this.parentComp.firstVisual,this.inited&&this.setClass().bindModel()}ngAfterViewInit(){this.setClass().bindModel(),this.inited=!0,this.onceFlag&&Promise.resolve().then(()=>{this.updateStatus(this.ngControl?.invalid),this.onceFlag=!1})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["se"]],contentQueries:function(i,r,s){if(i&1&&(Ft(s,Rt,7),Ft(s,yu,7)),i&2){let a;ce(a=ue())&&(r.ngModel=a.first),ce(a=ue())&&(r.formControlName=a.first)}},viewQuery:function(i,r){if(i&1&&xe(v8,7),i&2){let s;ce(s=ue())&&(r.contentElement=s.first)}},hostVars:10,hostBindings:function(i,r){i&2&&(Re("padding-left",r.paddingValue,"px")("padding-right",r.paddingValue,"px"),k("se__hide-label",r.hideLabel)("ant-form-item-has-error",r.invalid)("ant-form-item-with-help",r.showErr))},inputs:{optional:"optional",optionalHelp:"optionalHelp",optionalHelpColor:"optionalHelpColor",error:"error",extra:"extra",label:"label",col:[le.HasDecoratorInputTransform,"col","col",t=>t==null?null:fn(t)],required:[le.HasDecoratorInputTransform,"required","required",it],controlClass:"controlClass",line:[le.HasDecoratorInputTransform,"line","line",t=>t==null?null:it(t)],labelWidth:[le.HasDecoratorInputTransform,"labelWidth","labelWidth",t=>t==null?null:fn(t)],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",t=>t==null?null:it(t)],hideLabel:[le.HasDecoratorInputTransform,"hideLabel","hideLabel",it],id:"id"},exportAs:["se"],standalone:!0,features:[Ve([cn]),fi,oe,K],ngContentSelectors:xC,decls:9,vars:10,consts:[[1,"ant-form-item-label"],["class","se__label",3,"ngClass"],[1,"ant-form-item-control","se__control"],[1,"ant-form-item-control-input-content",3,"cdkObserveContent"],["contentElement",""],["class","ant-form-item-explain ant-form-item-explain-connected"],["class","ant-form-item-extra"],[1,"se__label",3,"ngClass"],[1,"se__label-text"],[4,"nzStringTemplateOutlet"],["class","se__label-optional",3,"se__label-optional-no-text"],[1,"se__label-optional"],["nz-tooltip","","nz-icon","","nzType","question-circle",3,"nzTooltipTitle","nzTooltipColor"],[1,"ant-form-item-explain","ant-form-item-explain-connected"],["role","alert",1,"ant-form-item-explain-error"],[1,"ant-form-item-extra"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0),_(1,b8,4,7,"label",1),S(),C(2,"div",2)(3,"div")(4,"div",3,4),A("cdkObserveContent",function(){return r.checkContent()}),Ie(6),S()(),_(7,E8,3,2,"div",5)(8,z8,2,1,"div",6),S()),i&2&&(Re("width",r._labelWidth,"px"),k("se__nolabel",r.hideLabel||!r.label),f(),ie(1,r.label?1:-1),f(2),Ae("ant-form-item-control-input ",r.controlClass,""),f(4),ie(7,r.showErr?7:-1),f(),ie(8,r.extra&&!r.compact?8:-1))},dependencies:[St,Ue,Si,Fe,Ll],encapsulation:2,data:{animation:[jl]},changeDetection:0});let o=n;return o})();var Cf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,ji,Ge,Ye]});let o=n;return o})();var OC=["*"];function R8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.title)}}function I8(o,n){if(o&1&&(C(0,"sv-title"),_(1,R8,2,1,"ng-container",1),S()),o&2){let e=m();f(),h("nzStringTemplateOutlet",e.title)}}var P8=["conEl"];function M8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.label)}}function F8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.optional)}}function A8(o,n){if(o&1&&R(0,"i",10),o&2){let e=m(3);h("nzTooltipTitle",e.optionalHelp)("nzTooltipColor",e.optionalHelpColor)}}function N8(o,n){if(o&1&&(C(0,"span",9),_(1,F8,2,1,"ng-container",7)(2,A8,1,2,"i",10),S()),o&2){let e=m(2);k("sv__label-optional-no-text",!e.optional),f(),h("nzStringTemplateOutlet",e.optional),f(),ie(2,e.optionalHelp?2:-1)}}function L8(o,n){if(o&1&&(C(0,"div",5)(1,"span",6),_(2,M8,2,1,"ng-container",7),S(),_(3,N8,3,4,"span",8),S()),o&2){let e=m();Re("width",e.labelWidth,"px"),k("sv__label-empty",!e.label)("sv__label-width",e.labelWidth!==null&&e.labelWidth!==void 0)("sv__no-colon",e._noColon),f(2),h("nzStringTemplateOutlet",e.label),f(),ie(3,e.optional||e.optionalHelp?3:-1)}}function k8(o,n){if(o&1&&(C(0,"span",12),Y(1),S()),o&2){let e=m(2);f(),ye(e.unit)}}function V8(o,n){if(o&1&&_(0,k8,2,1,"span",11),o&2){let e=m();h("nzStringTemplateOutlet",e.unit)}}var G8=(()=>{let n=class n{constructor(){if(this.el=ae(de).nativeElement,this.parentComp=ae(Zz,{host:!0,optional:!0}),this.ren=ae(He),this.parentComp==null)throw new Error("[sv-title] must include 'sv-container' component")}setClass(){let t=this.parentComp.gutter,i=this.el;this.ren.setStyle(i,"padding-left",`${t/2}px`),this.ren.setStyle(i,"padding-right",`${t/2}px`)}ngOnInit(){this.setClass()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sv-title"],["","sv-title",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("sv__title",!0)},exportAs:["svTitle"],standalone:!0,features:[K],ngContentSelectors:OC,decls:1,vars:0,template:function(i,r){i&1&&(Pe(),Ie(0))},encapsulation:2,changeDetection:0});let o=n;return o})(),Zz=(()=>{let n=class n{get margin(){return this.bordered?{}:{"margin-left.px":-(this.gutter/2),"margin-right.px":-(this.gutter/2)}}constructor(t){this.noColon=!1,this.bordered=!1,t.attach(this,"sv",{size:"large",gutter:32,layout:"horizontal",col:3,default:!0})}};n.\u0275fac=function(i){return new(i||n)(w(In))},n.\u0275cmp=j({type:n,selectors:[["sv-container"],["","sv-container",""]],hostVars:14,hostBindings:function(i,r){i&2&&k("sv__container",!0)("sv__horizontal",r.layout==="horizontal")("sv__vertical",r.layout==="vertical")("sv__small",r.size==="small")("sv__large",r.size==="large")("sv__bordered",r.bordered)("clearfix",!0)},inputs:{colInCon:[le.HasDecoratorInputTransform,"sv-container","colInCon",t=>t==null?null:fn(t)],title:"title",size:"size",gutter:[le.HasDecoratorInputTransform,"gutter","gutter",fn],layout:"layout",labelWidth:[le.HasDecoratorInputTransform,"labelWidth","labelWidth",fn],col:[le.HasDecoratorInputTransform,"col","col",fn],default:[le.HasDecoratorInputTransform,"default","default",it],noColon:[le.HasDecoratorInputTransform,"noColon","noColon",it],bordered:[le.HasDecoratorInputTransform,"bordered","bordered",it]},exportAs:["svContainer"],standalone:!0,features:[fi,K],ngContentSelectors:OC,decls:3,vars:2,consts:[[1,"ant-row",3,"ngStyle"],[4,"nzStringTemplateOutlet"]],template:function(i,r){i&1&&(Pe(),C(0,"div",0),_(1,I8,2,1,"sv-title"),Ie(2),S()),i&2&&(h("ngStyle",r.margin),f(),ie(1,r.title?1:-1))},dependencies:[Zt,G8,Ue],encapsulation:2,changeDetection:0});let o=n;return o})();var zC="sv",q0e=(()=>{let n=class n{get paddingValue(){return this.parentComp.bordered?null:this.parentComp.gutter/2}get labelWidth(){let{labelWidth:t,layout:i}=this.parentComp;return i==="horizontal"?t:null}constructor(){if(this.el=ae(de).nativeElement,this.parentComp=ae(Zz,{host:!0,optional:!0}),this.rep=ae(zp),this.ren=ae(He),this.clsMap=[],this._noColon=!1,this.hideLabel=!1,this.parentComp==null)throw new Error("[sv] must include 'sv-container' component")}setClass(){let{ren:t,col:i,clsMap:r,type:s,rep:a,noColon:l}=this,c=this.parentComp,u=this.el;this._noColon=c.bordered?!0:l??c.noColon,r.forEach(p=>t.removeClass(u,p)),r.length=0;let d=c.colInCon||c.col;r.push(...a.genCls(i??d,d)),r.push(`${zC}__item`),c.labelWidth&&r.push(`${zC}__item-fixed`),s&&r.push(`${zC}__type-${s}`),r.forEach(p=>t.addClass(u,p))}ngAfterViewInit(){this.setClass(),this.checkContent()}ngOnChanges(){this.setClass()}checkContent(){let{conEl:t}=this,i=this.default;if(!(i??this.parentComp?.default))return;let r=t.nativeElement,s="sv__default";r.classList.contains(s)&&r.classList.remove(s),Bl(r)&&r.classList.add(s)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["sv"],["","sv",""]],viewQuery:function(i,r){if(i&1&&xe(P8,5),i&2){let s;ce(s=ue())&&(r.conEl=s.first)}},hostVars:4,hostBindings:function(i,r){i&2&&Re("padding-left",r.paddingValue,"px")("padding-right",r.paddingValue,"px")},inputs:{optional:"optional",optionalHelp:"optionalHelp",optionalHelpColor:"optionalHelpColor",label:"label",unit:"unit",col:[le.HasDecoratorInputTransform,"col","col",t=>t==null?null:fn(t)],default:[le.HasDecoratorInputTransform,"default","default",t=>t==null?null:it(t)],type:"type",noColon:[le.HasDecoratorInputTransform,"noColon","noColon",t=>t==null?null:it(t)],hideLabel:[le.HasDecoratorInputTransform,"hideLabel","hideLabel",it]},exportAs:["sv"],standalone:!0,features:[fi,oe,K],ngContentSelectors:OC,decls:6,vars:2,consts:[["class","sv__label",3,"sv__label-empty","sv__label-width","sv__no-colon","width"],[1,"sv__detail"],[3,"cdkObserveContent"],["conEl",""],["class","sv__unit"],[1,"sv__label"],[1,"sv__label-text"],[4,"nzStringTemplateOutlet"],["class","sv__label-optional",3,"sv__label-optional-no-text"],[1,"sv__label-optional"],["nz-tooltip","","nz-icon","","nzType","question-circle",3,"nzTooltipTitle","nzTooltipColor"],["class","sv__unit",4,"nzStringTemplateOutlet"],[1,"sv__unit"]],template:function(i,r){i&1&&(Pe(),_(0,L8,4,10,"div",0),C(1,"div",1)(2,"span",2,3),A("cdkObserveContent",function(){return r.checkContent()}),Ie(4),S(),_(5,V8,1,1,"span",4),S()),i&2&&(ie(0,r.hideLabel?-1:0),f(5),ie(5,r.unit?5:-1))},dependencies:[Ue,Si,Fe,Ll],encapsulation:2,changeDetection:0});let o=n;return o})();var _f=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[Zn,vp,ji,Ge,Ye]});let o=n;return o})();function B8(o,n){o&1&&Xt(0)}function $8(o,n){if(o&1&&_(0,B8,1,0,"ng-container",7),o&2){let e=m(3);h("nzStringTemplateOutlet",e.nzIcon)}}function j8(o,n){if(o&1&&R(0,"span",8),o&2){let e=m(3);h("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme)}}function W8(o,n){if(o&1&&(C(0,"div",6),_(1,$8,1,1,"ng-container")(2,j8,1,2),S()),o&2){let e=m(2);f(),ie(1,e.nzIcon?1:2)}}function U8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(4);f(),ye(e.nzMessage)}}function K8(o,n){if(o&1&&(C(0,"span",12),_(1,U8,2,1,"ng-container",7),S()),o&2){let e=m(3);f(),h("nzStringTemplateOutlet",e.nzMessage)}}function q8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(4);f(),ye(e.nzDescription)}}function Y8(o,n){if(o&1&&(C(0,"span",13),_(1,q8,2,1,"ng-container",7),S()),o&2){let e=m(3);f(),h("nzStringTemplateOutlet",e.nzDescription)}}function Q8(o,n){if(o&1&&(C(0,"div",9),_(1,K8,2,1,"span",10)(2,Y8,2,1,"span",11),S()),o&2){let e=m(2);f(),ie(1,e.nzMessage?1:-1),f(),ie(2,e.nzDescription?2:-1)}}function X8(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.nzAction)}}function Z8(o,n){if(o&1&&(C(0,"div",14),_(1,X8,2,1,"ng-container",7),S()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzAction)}}function J8(o,n){if(o&1&&(H(0),C(1,"span",16),Y(2),S(),B()),o&2){let e=m(4);f(2),ye(e.nzCloseText)}}function eK(o,n){if(o&1&&_(0,J8,3,1,"ng-container",7),o&2){let e=m(3);h("nzStringTemplateOutlet",e.nzCloseText)}}function tK(o,n){o&1&&R(0,"span",17)}function nK(o,n){if(o&1){let e=Q();C(0,"button",15),A("click",function(){I(e);let i=m(2);return P(i.closeAlert())}),_(1,eK,1,1,"ng-container")(2,tK,1,0),S()}if(o&2){let e=m(2);f(),ie(1,e.nzCloseText?1:2)}}function iK(o,n){if(o&1){let e=Q();C(0,"div",1),A("@slideAlertMotion.done",function(){I(e);let i=m();return P(i.onFadeAnimationDone())}),_(1,W8,3,1,"div",2)(2,Q8,3,2,"div",3)(3,Z8,2,1,"div",4)(4,nK,3,1,"button",5),S()}if(o&2){let e=m();k("ant-alert-rtl",e.dir==="rtl")("ant-alert-success",e.nzType==="success")("ant-alert-info",e.nzType==="info")("ant-alert-warning",e.nzType==="warning")("ant-alert-error",e.nzType==="error")("ant-alert-no-icon",!e.nzShowIcon)("ant-alert-banner",e.nzBanner)("ant-alert-closable",e.nzCloseable)("ant-alert-with-description",!!e.nzDescription),h("@.disabled",e.nzNoAnimation)("@slideAlertMotion",void 0),f(),ie(1,e.nzShowIcon?1:-1),f(),ie(2,e.nzMessage||e.nzDescription?2:-1),f(),ie(3,e.nzAction?3:-1),f(),ie(4,e.nzCloseable||e.nzCloseText?4:-1)}}var Jz="alert",rK=(()=>{let n=class n{constructor(t,i,r){this.nzConfigService=t,this.cdr=i,this.directionality=r,this._nzModuleName=Jz,this.nzAction=null,this.nzCloseText=null,this.nzIconType=null,this.nzMessage=null,this.nzDescription=null,this.nzType="info",this.nzCloseable=!1,this.nzShowIcon=!1,this.nzBanner=!1,this.nzNoAnimation=!1,this.nzIcon=null,this.nzOnClose=new O,this.closed=!1,this.iconTheme="fill",this.inferredIconType="info-circle",this.dir="ltr",this.isTypeSet=!1,this.isShowIconSet=!1,this.destroy$=new J,this.nzConfigService.getConfigChangeEventForComponent(Jz).pipe(F(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}closeAlert(){this.closed=!0}onFadeAnimationDone(){this.closed&&this.nzOnClose.emit(!0)}ngOnChanges(t){let{nzShowIcon:i,nzDescription:r,nzType:s,nzBanner:a}=t;if(i&&(this.isShowIconSet=!0),s)switch(this.isTypeSet=!0,this.nzType){case"error":this.inferredIconType="close-circle";break;case"success":this.inferredIconType="check-circle";break;case"info":this.inferredIconType="info-circle";break;case"warning":this.inferredIconType="exclamation-circle";break}r&&(this.iconTheme=this.nzDescription?"outline":"fill"),a&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=!0))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(fe),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:"nzCloseable",nzShowIcon:"nzShowIcon",nzBanner:"nzBanner",nzNoAnimation:"nzNoAnimation",nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],standalone:!0,features:[oe,K],decls:1,vars:1,consts:[["class","ant-alert",3,"ant-alert-rtl","ant-alert-success","ant-alert-info","ant-alert-warning","ant-alert-error","ant-alert-no-icon","ant-alert-banner","ant-alert-closable","ant-alert-with-description"],[1,"ant-alert"],["class","ant-alert-icon"],["class","ant-alert-content"],["class","ant-alert-action"],["type","button","tabindex","0","class","ant-alert-close-icon"],[1,"ant-alert-icon"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType","nzTheme"],[1,"ant-alert-content"],["class","ant-alert-message"],["class","ant-alert-description"],[1,"ant-alert-message"],[1,"ant-alert-description"],[1,"ant-alert-action"],["type","button","tabindex","0",1,"ant-alert-close-icon",3,"click"],[1,"ant-alert-close-text"],["nz-icon","","nzType","close"]],template:function(i,r){i&1&&_(0,iK,5,24,"div",0),i&2&&ie(0,r.closed?-1:0)},dependencies:[Ge,Fe,Ye,Ue],encapsulation:2,data:{animation:[Ew]},changeDetection:0});let o=n;return N([De(),W()],o.prototype,"nzCloseable",void 0),N([De(),W()],o.prototype,"nzShowIcon",void 0),N([W()],o.prototype,"nzBanner",void 0),N([W()],o.prototype,"nzNoAnimation",void 0),o})(),Sf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[rK]});let o=n;return o})();var sK=["textEl"];function aK(o,n){if(o&1&&R(0,"span",0),o&2){let e=m();h("nzType",e.nzIcon)}}function lK(o,n){if(o&1){let e=Q();C(0,"img",3),A("error",function(i){I(e);let r=m();return P(r.imgError(i))}),S()}if(o&2){let e=m();h("src",e.nzSrc,Do),ze("srcset",e.nzSrcSet)("alt",e.nzAlt)}}function cK(o,n){if(o&1&&(C(0,"span",4,5),Y(2),S()),o&2){let e=m();f(2),ye(e.nzText)}}var uK="avatar",dK=(()=>{let n=class n{constructor(t,i,r,s,a){this.nzConfigService=t,this.elementRef=i,this.cdr=r,this.platform=s,this.ngZone=a,this._nzModuleName=uK,this.nzShape="circle",this.nzSize="default",this.nzGap=4,this.nzError=new O,this.hasText=!1,this.hasSrc=!0,this.hasIcon=!1,this.classMap={},this.customSize=null,this.el=this.elementRef.nativeElement}imgError(t){this.nzError.emit(t),t.defaultPrevented||(this.hasSrc=!1,this.hasIcon=!1,this.hasText=!1,this.nzIcon?this.hasIcon=!0:this.nzText&&(this.hasText=!0),this.cdr.detectChanges(),this.setSizeStyle(),this.notifyCalc())}ngOnChanges(){this.hasText=!this.nzSrc&&!!this.nzText,this.hasIcon=!this.nzSrc&&!!this.nzIcon,this.hasSrc=!!this.nzSrc,this.setSizeStyle(),this.notifyCalc()}calcStringSize(){if(!this.hasText)return;let t=this.textEl.nativeElement,i=t.offsetWidth,r=this.el.getBoundingClientRect().width,s=this.nzGap*2{setTimeout(()=>{this.calcStringSize()})})}setSizeStyle(){typeof this.nzSize=="number"?this.customSize=`${this.nzSize}px`:this.customSize=null,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(st),w(de),w(fe),w(gn),w($e))},n.\u0275cmp=j({type:n,selectors:[["nz-avatar"]],viewQuery:function(i,r){if(i&1&&xe(sK,5),i&2){let s;ce(s=ue())&&(r.textEl=s.first)}},hostAttrs:[1,"ant-avatar"],hostVars:20,hostBindings:function(i,r){i&2&&(Re("width",r.customSize)("height",r.customSize)("line-height",r.customSize)("font-size",r.hasIcon&&r.customSize?r.nzSize/2:null,"px"),k("ant-avatar-lg",r.nzSize==="large")("ant-avatar-sm",r.nzSize==="small")("ant-avatar-square",r.nzShape==="square")("ant-avatar-circle",r.nzShape==="circle")("ant-avatar-icon",r.nzIcon)("ant-avatar-image",r.hasSrc))},inputs:{nzShape:"nzShape",nzSize:"nzSize",nzGap:"nzGap",nzText:"nzText",nzSrc:"nzSrc",nzSrcSet:"nzSrcSet",nzAlt:"nzAlt",nzIcon:"nzIcon"},outputs:{nzError:"nzError"},exportAs:["nzAvatar"],standalone:!0,features:[oe,K],decls:3,vars:3,consts:[["nz-icon","",3,"nzType"],[3,"src"],["class","ant-avatar-string"],[3,"src","error"],[1,"ant-avatar-string"],["textEl",""]],template:function(i,r){i&1&&_(0,aK,1,1,"span",0)(1,lK,1,3,"img",1)(2,cK,3,1,"span",2),i&2&&(ie(0,r.nzIcon&&r.hasIcon?0:-1),f(),ie(1,r.nzSrc&&r.hasSrc?1:-1),f(),ie(2,r.nzText&&r.hasText?2:-1))},dependencies:[Ge,Fe,hp],encapsulation:2,changeDetection:0});let o=n;return N([De()],o.prototype,"nzShape",void 0),N([De()],o.prototype,"nzSize",void 0),N([De(),ci()],o.prototype,"nzGap",void 0),o})();var wf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[dK]});let o=n;return o})();function hK(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(3);f(),ye(e.nzTitle)}}function fK(o,n){if(o&1&&(C(0,"div",10),_(1,hK,2,1,"ng-container",9),S()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzTitle)}}function gK(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=m(2);f(),ye(e.nzContent)}}function mK(o,n){if(o&1&&(C(0,"div",2)(1,"div",3)(2,"div",4),R(3,"span",5),S(),C(4,"div",6)(5,"div"),_(6,fK,2,1,"div",7),C(7,"div",8),_(8,gK,2,1,"ng-container",9),S()()()()()),o&2){let e=m();k("ant-popover-rtl",e.dir==="rtl"),h("ngClass",e._classMap)("ngStyle",e.nzOverlayStyle)("@.disabled",!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),f(6),h("ngIf",e.nzTitle),f(2),h("nzStringTemplateOutlet",e.nzContent)}}var vK="popover",jSe=(()=>{let n=class n extends Su{getProxyPropertyMap(){return V({nzPopoverBackdrop:["nzBackdrop",()=>this.nzPopoverBackdrop]},super.getProxyPropertyMap())}constructor(t,i,r,s,a){super(t,i,r,s,a),this._nzModuleName=vK,this.trigger="hover",this.placement="top",this.nzPopoverBackdrop=!1,this.visibleChange=new O,this.componentRef=this.hostView.createComponent(eO)}};n.\u0275fac=function(i){return new(i||n)(w(de),w(Tn),w(He),w(ft,9),w(st))},n.\u0275dir=Se({type:n,selectors:[["","nz-popover",""]],hostVars:2,hostBindings:function(i,r){i&2&&k("ant-popover-open",r.visible)},inputs:{arrowPointAtCenter:[le.None,"nzPopoverArrowPointAtCenter","arrowPointAtCenter"],title:[le.None,"nzPopoverTitle","title"],content:[le.None,"nzPopoverContent","content"],directiveTitle:[le.None,"nz-popover","directiveTitle"],trigger:[le.None,"nzPopoverTrigger","trigger"],placement:[le.None,"nzPopoverPlacement","placement"],origin:[le.None,"nzPopoverOrigin","origin"],visible:[le.None,"nzPopoverVisible","visible"],mouseEnterDelay:[le.None,"nzPopoverMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:[le.None,"nzPopoverMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:[le.None,"nzPopoverOverlayClassName","overlayClassName"],overlayStyle:[le.None,"nzPopoverOverlayStyle","overlayStyle"],nzPopoverBackdrop:"nzPopoverBackdrop"},outputs:{visibleChange:"nzPopoverVisibleChange"},exportAs:["nzPopover"],standalone:!0,features:[Xe]});let o=n;return N([W()],o.prototype,"arrowPointAtCenter",void 0),N([De()],o.prototype,"nzPopoverBackdrop",void 0),o})(),eO=(()=>{let n=class n extends Ql{constructor(t,i,r){super(t,i,r),this._prefix="ant-popover"}get hasBackdrop(){return this.nzTrigger==="click"?this.nzBackdrop:!1}isEmpty(){return qp(this.nzTitle)&&qp(this.nzContent)}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-popover"]],exportAs:["nzPopoverComponent"],standalone:!0,features:[Xe,K],decls:2,vars:6,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],[1,"ant-popover",3,"ngClass","ngStyle","nzNoAnimation"],[1,"ant-popover-content"],[1,"ant-popover-arrow"],[1,"ant-popover-arrow-content"],["role","tooltip",1,"ant-popover-inner"],["class","ant-popover-title",4,"ngIf"],[1,"ant-popover-inner-content"],[4,"nzStringTemplateOutlet"],[1,"ant-popover-title"]],template:function(i,r){i&1&&(_(0,mK,9,9,"ng-template",0,1,_e),A("overlayOutsideClick",function(a){return r.onClickOutside(a)})("detach",function(){return r.hide()})("positionChange",function(a){return r.onPositionChange(a)})),i&2&&h("cdkConnectedOverlayHasBackdrop",r.hasBackdrop)("cdkConnectedOverlayOrigin",r.origin)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayOpen",r._visible)("cdkConnectedOverlayPush",r.cdkConnectedOverlayPush)("nzArrowPointAtCenter",r.nzArrowPointAtCenter)},dependencies:[Fr,oi,vr,Nr,St,Zt,ft,we,Ye,Ue],encapsulation:2,data:{animation:[Is]},changeDetection:0});let o=n;return o})(),bf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[eO]});let o=n;return o})();function CK(o,n){if(o&1&&(H(0),R(1,"span",8),B()),o&2){let e=m(3);f(),h("nzType",e.icon)}}function _K(o,n){if(o&1&&(H(0),Y(1),B()),o&2){let e=n.$implicit,t=m(4);f(),Ne(" ",e(t.nzPercent)," ")}}var SK=o=>({$implicit:o});function wK(o,n){if(o&1&&_(0,_K,2,1,"ng-container",9),o&2){let e=m(3);h("nzStringTemplateOutlet",e.formatter)("nzStringTemplateOutletContext",yt(2,SK,e.nzPercent))}}function bK(o,n){if(o&1&&(C(0,"span",5),_(1,CK,2,1,"ng-container",6)(2,wK,1,4,"ng-template",null,7,_e),S()),o&2){let e=te(3),t=m(2);f(),h("ngIf",(t.status==="exception"||t.status==="success")&&!t.nzFormat)("ngIfElse",e)}}function TK(o,n){if(o&1&&_(0,bK,4,2,"span",4),o&2){let e=m();h("ngIf",e.nzShowInfo)}}function EK(o,n){if(o&1&&R(0,"div",17),o&2){let e=m(4);Re("width",e.nzSuccessPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("height",e.strokeWidth,"px")}}function xK(o,n){if(o&1&&(C(0,"div",13)(1,"div",14),R(2,"div",15),_(3,EK,1,6,"div",16),S()()),o&2){let e=m(3);f(2),Re("width",e.nzPercent,"%")("border-radius",e.nzStrokeLinecap==="round"?"100px":"0")("background",e.isGradient?null:e.nzStrokeColor)("background-image",e.isGradient?e.lineGradient:null)("height",e.strokeWidth,"px"),f(),h("ngIf",e.nzSuccessPercent||e.nzSuccessPercent===0)}}function zK(o,n){}function OK(o,n){if(o&1&&(H(0),_(1,xK,4,11,"div",11)(2,zK,0,0,"ng-template",12),B()),o&2){let e=m(2),t=te(1);f(),h("ngIf",!e.isSteps),f(),h("ngTemplateOutlet",t)}}function DK(o,n){if(o&1&&R(0,"div",20),o&2){let e=n.$implicit;h("ngStyle",e)}}function RK(o,n){}function IK(o,n){if(o&1&&(C(0,"div",18),_(1,DK,1,1,"div",19)(2,RK,0,0,"ng-template",12),S()),o&2){let e=m(2),t=te(1);f(),h("ngForOf",e.steps),f(),h("ngTemplateOutlet",t)}}function PK(o,n){if(o&1&&(C(0,"div"),_(1,OK,3,2,"ng-container",2)(2,IK,3,2,"div",10),S()),o&2){let e=m();f(),h("ngIf",!e.isSteps),f(),h("ngIf",e.isSteps)}}function MK(o,n){if(o&1&&(Oo(),R(0,"stop")),o&2){let e=n.$implicit;ze("offset",e.offset)("stop-color",e.color)}}function FK(o,n){if(o&1&&(Oo(),C(0,"defs")(1,"linearGradient",24),_(2,MK,1,2,"stop",25),S()()),o&2){let e=m(2);f(),h("id","gradient-"+e.gradientId),f(),h("ngForOf",e.circleGradient)}}function AK(o,n){if(o&1&&(Oo(),R(0,"path",26)),o&2){let e=n.$implicit,t=m(2);h("ngStyle",e.strokePathStyle),ze("d",t.pathString)("stroke-linecap",t.nzStrokeLinecap)("stroke",e.stroke)("stroke-width",t.nzPercent?t.strokeWidth:0)}}function NK(o,n){o&1&&Oo()}function LK(o,n){if(o&1&&(C(0,"div",14),Oo(),C(1,"svg",21),_(2,FK,3,2,"defs",2),R(3,"path",22),_(4,AK,1,5,"path",23),S(),_(5,NK,0,0,"ng-template",12),S()),o&2){let e=m(),t=te(1);Re("width",e.nzWidth,"px")("height",e.nzWidth,"px")("font-size",e.nzWidth*.15+6,"px"),k("ant-progress-circle-gradient",e.isGradient),f(2),h("ngIf",e.isGradient),f(),h("ngStyle",e.trailPathStyle),ze("stroke-width",e.strokeWidth)("d",e.pathString),f(),h("ngForOf",e.progressCirclePath)("ngForTrackBy",e.trackByFn),f(),h("ngTemplateOutlet",t)}}function kK(o){return+o.replace("%","")}var nO=o=>{let n=[];return Object.keys(o).forEach(e=>{let t=o[e],i=kK(e);isNaN(i)||n.push({key:i,value:t})}),n=n.sort((e,t)=>e.key-t.key),n},VK=o=>nO(o).map(({key:n,value:e})=>({offset:`${n}%`,color:e})),GK=o=>{let r=o,{from:n="#1890ff",to:e="#1890ff",direction:t="to right"}=r,i=op(r,["from","to","direction"]);if(Object.keys(i).length!==0){let s=nO(i).map(({key:a,value:l})=>`${l} ${a}%`).join(", ");return`linear-gradient(${t}, ${s})`}return`linear-gradient(${t}, ${n}, ${e})`},HK=0,tO="progress",BK=new Map([["success","check"],["exception","close"]]),$K=new Map([["normal","#108ee9"],["exception","#ff5500"],["success","#87d068"]]),jK=o=>`${o}%`,WK=(()=>{let n=class n{get formatter(){return this.nzFormat||jK}get status(){return this.nzStatus||this.inferredStatus}get strokeWidth(){return this.nzStrokeWidth||(this.nzType==="line"&&this.nzSize!=="small"?8:6)}get isCircleStyle(){return this.nzType==="circle"||this.nzType==="dashboard"}constructor(t,i,r){this.cdr=t,this.nzConfigService=i,this.directionality=r,this._nzModuleName=tO,this.nzShowInfo=!0,this.nzWidth=132,this.nzStrokeColor=void 0,this.nzSize="default",this.nzPercent=0,this.nzStrokeWidth=void 0,this.nzGapDegree=void 0,this.nzType="line",this.nzGapPosition="top",this.nzStrokeLinecap="round",this.nzSteps=0,this.steps=[],this.lineGradient=null,this.isGradient=!1,this.isSteps=!1,this.gradientId=HK++,this.progressCirclePath=[],this.trailPathStyle=null,this.dir="ltr",this.trackByFn=s=>`${s}`,this.cachedStatus="normal",this.inferredStatus="normal",this.destroy$=new J}ngOnChanges(t){let{nzSteps:i,nzGapPosition:r,nzStrokeLinecap:s,nzStrokeColor:a,nzGapDegree:l,nzType:c,nzStatus:u,nzPercent:d,nzSuccessPercent:p,nzStrokeWidth:g}=t;u&&(this.cachedStatus=this.nzStatus||this.cachedStatus),(d||p)&&(parseInt(this.nzPercent.toString(),10)>=100?(ht(this.nzSuccessPercent)&&this.nzSuccessPercent>=100||this.nzSuccessPercent===void 0)&&(this.inferredStatus="success"):this.inferredStatus=this.cachedStatus),(u||d||p||a)&&this.updateIcon(),a&&this.setStrokeColor(),(r||s||l||c||d||a||a)&&this.getCirclePaths(),(d||i||g)&&(this.isSteps=this.nzSteps>0,this.isSteps&&this.getSteps())}ngOnInit(){this.nzConfigService.getConfigChangeEventForComponent(tO).pipe(F(this.destroy$)).subscribe(()=>{this.updateIcon(),this.setStrokeColor(),this.getCirclePaths()}),this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}updateIcon(){let t=BK.get(this.status);this.icon=t?t+(this.isCircleStyle?"-o":"-circle-fill"):""}getSteps(){let t=Math.floor(this.nzSteps*(this.nzPercent/100)),i=this.nzSize==="small"?2:14,r=[];for(let s=0;s{let v=t.length===2&&g===0;return{stroke:this.isGradient&&!v?`url(#gradient-${this.gradientId})`:null,strokePathStyle:{stroke:this.isGradient?null:v?$K.get("success"):this.nzStrokeColor,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",strokeDasharray:`${(p||0)/100*(s-a)}px ${s}px`,strokeDashoffset:`-${a/2}px`}}}).reverse()}setStrokeColor(){let t=this.nzStrokeColor,i=this.isGradient=!!t&&typeof t!="string";i&&!this.isCircleStyle?this.lineGradient=GK(t):i&&this.isCircleStyle?this.circleGradient=VK(this.nzStrokeColor):(this.lineGradient=null,this.circleGradient=[])}};n.\u0275fac=function(i){return new(i||n)(w(fe),w(st),w(Me,8))},n.\u0275cmp=j({type:n,selectors:[["nz-progress"]],inputs:{nzShowInfo:"nzShowInfo",nzWidth:"nzWidth",nzStrokeColor:"nzStrokeColor",nzSize:"nzSize",nzFormat:"nzFormat",nzSuccessPercent:"nzSuccessPercent",nzPercent:"nzPercent",nzStrokeWidth:"nzStrokeWidth",nzGapDegree:"nzGapDegree",nzStatus:"nzStatus",nzType:"nzType",nzGapPosition:"nzGapPosition",nzStrokeLinecap:"nzStrokeLinecap",nzSteps:"nzSteps"},exportAs:["nzProgress"],standalone:!0,features:[oe,K],decls:5,vars:17,consts:[["progressInfoTemplate",""],[3,"ngClass"],[4,"ngIf"],["class","ant-progress-inner",3,"width","height","fontSize","ant-progress-circle-gradient",4,"ngIf"],["class","ant-progress-text",4,"ngIf"],[1,"ant-progress-text"],[4,"ngIf","ngIfElse"],["formatTemplate",""],["nz-icon","",3,"nzType"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["class","ant-progress-steps-outer",4,"ngIf"],["class","ant-progress-outer",4,"ngIf"],[3,"ngTemplateOutlet"],[1,"ant-progress-outer"],[1,"ant-progress-inner"],[1,"ant-progress-bg"],["class","ant-progress-success-bg",3,"width","border-radius","height",4,"ngIf"],[1,"ant-progress-success-bg"],[1,"ant-progress-steps-outer"],["class","ant-progress-steps-item",3,"ngStyle",4,"ngFor","ngForOf"],[1,"ant-progress-steps-item",3,"ngStyle"],["viewBox","0 0 100 100",1,"ant-progress-circle"],["stroke","#f3f3f3","fill-opacity","0",1,"ant-progress-circle-trail",3,"ngStyle"],["class","ant-progress-circle-path","fill-opacity","0",3,"ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],["x1","100%","y1","0%","x2","0%","y2","0%",3,"id"],[4,"ngFor","ngForOf"],["fill-opacity","0",1,"ant-progress-circle-path",3,"ngStyle"]],template:function(i,r){i&1&&(_(0,TK,1,1,"ng-template",null,0,_e),C(2,"div",1),_(3,PK,3,2,"div",2)(4,LK,6,15,"div",3),S()),i&2&&(f(2),k("ant-progress-line",r.nzType==="line")("ant-progress-small",r.nzSize==="small")("ant-progress-default",r.nzSize==="default")("ant-progress-show-info",r.nzShowInfo)("ant-progress-circle",r.isCircleStyle)("ant-progress-steps",r.isSteps)("ant-progress-rtl",r.dir==="rtl"),h("ngClass","ant-progress ant-progress-status-"+r.status),f(),h("ngIf",r.nzType==="line"),f(),h("ngIf",r.isCircleStyle))},dependencies:[we,Ge,Fe,Ye,Ue,St,Be,lt,Zt],encapsulation:2,changeDetection:0});let o=n;return N([De()],o.prototype,"nzShowInfo",void 0),N([De()],o.prototype,"nzStrokeColor",void 0),N([De()],o.prototype,"nzSize",void 0),N([ci()],o.prototype,"nzSuccessPercent",void 0),N([ci()],o.prototype,"nzPercent",void 0),N([De(),ci()],o.prototype,"nzStrokeWidth",void 0),N([De(),ci()],o.prototype,"nzGapDegree",void 0),N([De()],o.prototype,"nzGapPosition",void 0),N([De()],o.prototype,"nzStrokeLinecap",void 0),N([ci()],o.prototype,"nzSteps",void 0),o})(),Tf=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[WK]});let o=n;return o})();var KK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qK=/([^\#-~ |!])/g;function YK(o){return o.replace(/&/g,"&").replace(KK,n=>{let e=n.charCodeAt(0),t=n.charCodeAt(1);return`&#${(e-55296)*1024+(t-56320)+65536};`}).replace(qK,n=>`&#${n.charCodeAt(0)};`).replace(//g,">")}var iO=(()=>{let n=class n{constructor(){this.UNIQUE_WRAPPERS=["##==-open_tag-==##","##==-close_tag-==##"]}transform(t,i,r,s){if(!i)return t;let a=new RegExp(i.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$&"),r),l=t.replace(a,`${this.UNIQUE_WRAPPERS[0]}$&${this.UNIQUE_WRAPPERS[1]}`);return YK(l).replace(new RegExp(this.UNIQUE_WRAPPERS[0],"g"),s?``:"").replace(new RegExp(this.UNIQUE_WRAPPERS[1],"g"),"")}};n.\u0275fac=function(i){return new(i||n)},n.\u0275pipe=SS({name:"nzHighlight",type:n,pure:!0,standalone:!0});let o=n;return o})(),rO=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({});let o=n;return o})();function XK(o,n){if(o&1&&R(0,"span"),o&2){let e=n.index,t=m();k("ant-tree-indent-unit",!t.nzSelectMode)("ant-select-tree-indent-unit",t.nzSelectMode)("ant-select-tree-indent-unit-start",t.nzSelectMode&&t.nzIsStart[e])("ant-tree-indent-unit-start",!t.nzSelectMode&&t.nzIsStart[e])("ant-select-tree-indent-unit-end",t.nzSelectMode&&t.nzIsEnd[e])("ant-tree-indent-unit-end",!t.nzSelectMode&&t.nzIsEnd[e])}}var oO=["builtin",""];function ZK(o,n){if(o&1&&(H(0),R(1,"span",4),B()),o&2){let e=m(3);f(),k("ant-select-tree-switcher-icon",e.nzSelectMode)("ant-tree-switcher-icon",!e.nzSelectMode)}}var DC=(o,n)=>({$implicit:o,origin:n});function JK(o,n){if(o&1&&(H(0),_(1,ZK,2,4,"ng-container",3),B()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzExpandedIcon)("nzStringTemplateOutletContext",ri(2,DC,e.context,e.context.origin))}}function e7(o,n){if(o&1&&(H(0),_(1,JK,2,5,"ng-container",2),B()),o&2){let e=m(),t=te(3);f(),h("ngIf",!e.isLoading)("ngIfElse",t)}}function t7(o,n){if(o&1&&R(0,"span",7),o&2){let e=m(4);h("nzType",e.isSwitcherOpen?"minus-square":"plus-square")}}function n7(o,n){o&1&&R(0,"span",8)}function i7(o,n){if(o&1&&(H(0),_(1,t7,1,1,"span",5)(2,n7,1,0,"span",6),B()),o&2){let e=m(3);f(),h("ngIf",e.isShowLineIcon),f(),h("ngIf",!e.isShowLineIcon)}}function r7(o,n){if(o&1&&(H(0),_(1,i7,3,2,"ng-container",3),B()),o&2){let e=m(2);f(),h("nzStringTemplateOutlet",e.nzExpandedIcon)("nzStringTemplateOutletContext",ri(2,DC,e.context,e.context.origin))}}function o7(o,n){if(o&1&&(H(0),_(1,r7,2,5,"ng-container",2),B()),o&2){let e=m(),t=te(3);f(),h("ngIf",!e.isLoading)("ngIfElse",t)}}function s7(o,n){o&1&&R(0,"span",9),o&2&&h("nzSpin",!0)}function a7(o,n){}function l7(o,n){if(o&1&&R(0,"span",6),o&2){let e=m(3);h("nzType",e.icon)}}function c7(o,n){if(o&1&&(C(0,"span")(1,"span"),_(2,l7,1,1,"span",5),S()()),o&2){let e=m(2);k("ant-tree-icon__open",e.isSwitcherOpen)("ant-tree-icon__close",e.isSwitcherClose)("ant-tree-icon_loading",e.isLoading)("ant-select-tree-iconEle",e.selectMode)("ant-tree-iconEle",!e.selectMode),f(),k("ant-select-tree-iconEle",e.selectMode)("ant-select-tree-icon__customize",e.selectMode)("ant-tree-iconEle",!e.selectMode)("ant-tree-icon__customize",!e.selectMode),f(),h("ngIf",e.icon)}}function u7(o,n){if(o&1&&(H(0),_(1,c7,3,19,"span",3),R(2,"span",4),Xn(3,"nzHighlight"),B()),o&2){let e=m();f(),h("ngIf",e.icon&&e.showIcon),f(),h("innerHTML",DS(3,2,e.title,e.matchedValue,"i","font-highlight"),Dt)}}function d7(o,n){if(o&1&&R(0,"nz-tree-drop-indicator",7),o&2){let e=m();h("dropPosition",e.dragPosition)("level",e.context.level)}}function p7(o,n){if(o&1){let e=Q();C(0,"nz-tree-node-switcher",4),A("click",function(i){I(e);let r=m();return P(r.clickExpand(i))}),S()}if(o&2){let e=m();h("nzShowExpand",e.nzShowExpand)("nzShowLine",e.nzShowLine)("nzExpandedIcon",e.nzExpandedIcon)("nzSelectMode",e.nzSelectMode)("context",e.nzTreeNode)("isLeaf",e.isLeaf)("isExpanded",e.isExpanded)("isLoading",e.isLoading)}}function h7(o,n){if(o&1){let e=Q();C(0,"nz-tree-node-checkbox",5),A("click",function(i){I(e);let r=m();return P(r.clickCheckBox(i))}),S()}if(o&2){let e=m();h("nzSelectMode",e.nzSelectMode)("isChecked",e.isChecked)("isHalfChecked",e.isHalfChecked)("isDisabled",e.isDisabled)("isDisableCheckbox",e.isDisableCheckbox)}}var f7=["nzTreeTemplate"];function g7(o,n){}var sO=o=>({$implicit:o});function m7(o,n){if(o&1&&(H(0),_(1,g7,0,0,"ng-template",10),B()),o&2){let e=n.$implicit;m(2);let t=te(9);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,sO,e))}}function v7(o,n){if(o&1&&(C(0,"cdk-virtual-scroll-viewport",8),_(1,m7,2,4,"ng-container",9),S()),o&2){let e=m();Re("height",e.nzVirtualHeight),k("ant-select-tree-list-holder-inner",e.nzSelectMode)("ant-tree-list-holder-inner",!e.nzSelectMode),h("itemSize",e.nzVirtualItemSize)("minBufferPx",e.nzVirtualMinBufferPx)("maxBufferPx",e.nzVirtualMaxBufferPx),f(),h("cdkVirtualForOf",e.nzFlattenNodes)("cdkVirtualForTrackBy",e.trackByFlattenNode)}}function y7(o,n){}function C7(o,n){if(o&1&&(H(0),_(1,y7,0,0,"ng-template",10),B()),o&2){let e=n.$implicit;m(2);let t=te(9);f(),h("ngTemplateOutlet",t)("ngTemplateOutletContext",yt(2,sO,e))}}function _7(o,n){if(o&1&&(C(0,"div",11),_(1,C7,2,4,"ng-container",12),S()),o&2){let e=m();k("ant-select-tree-list-holder-inner",e.nzSelectMode)("ant-tree-list-holder-inner",!e.nzSelectMode),h("@.disabled",e.beforeInit||!!(e.noAnimation!=null&&e.noAnimation.nzNoAnimation))("nzNoAnimation",e.noAnimation==null?null:e.noAnimation.nzNoAnimation)("@treeCollapseMotion",e.nzFlattenNodes.length),f(),h("ngForOf",e.nzFlattenNodes)("ngForTrackBy",e.trackByFlattenNode)}}function S7(o,n){if(o&1){let e=Q();C(0,"nz-tree-node",13),A("nzExpandChange",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzClick",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzDblClick",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzContextMenu",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzCheckBoxChange",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzOnDragStart",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzOnDragEnter",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzOnDragOver",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzOnDragLeave",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzOnDragEnd",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))})("nzOnDrop",function(i){I(e);let r=m();return P(r.eventTriggerChanged(i))}),S()}if(o&2){let e=n.$implicit,t=m();h("icon",e.icon)("title",e.title)("isLoading",e.isLoading)("isSelected",e.isSelected)("isDisabled",e.isDisabled)("isMatched",e.isMatched)("isExpanded",e.isExpanded)("isLeaf",e.isLeaf)("isStart",e.isStart)("isEnd",e.isEnd)("isChecked",e.isChecked)("isHalfChecked",e.isHalfChecked)("isDisableCheckbox",e.isDisableCheckbox)("isSelectable",e.isSelectable)("canHide",e.canHide)("nzTreeNode",e)("nzSelectMode",t.nzSelectMode)("nzShowLine",t.nzShowLine)("nzExpandedIcon",t.nzExpandedIcon)("nzDraggable",t.nzDraggable)("nzCheckable",t.nzCheckable)("nzShowExpand",t.nzShowExpand)("nzAsyncData",t.nzAsyncData)("nzSearchValue",t.nzSearchValue)("nzHideUnMatched",t.nzHideUnMatched)("nzBeforeDrop",t.nzBeforeDrop)("nzShowIcon",t.nzShowIcon)("nzTreeTemplate",t.nzTreeTemplate||t.nzTreeTemplateChild)}}var w7=(()=>{let n=class n{constructor(t){this.cdr=t,this.level=1,this.direction="ltr",this.style={}}ngOnChanges(t){this.renderIndicator(this.dropPosition,this.direction)}renderIndicator(t,i="ltr"){let s=i==="ltr"?"left":"right",a=i==="ltr"?"right":"left",l={[s]:"4px",[a]:"0px"};switch(t){case-1:l.top="-3px";break;case 1:l.bottom="-3px";break;case 0:l.bottom="-3px",l[s]="28px";break;default:l.display="none";break}this.style=l,this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-tree-drop-indicator"]],hostVars:4,hostBindings:function(i,r){i&2&&(Ol(r.style),k("ant-tree-drop-indicator",!0))},inputs:{dropPosition:"dropPosition",level:"level",direction:"direction"},exportAs:["NzTreeDropIndicator"],standalone:!0,features:[oe,K],decls:0,vars:0,template:function(i,r){},encapsulation:2,changeDetection:0});let o=n;return o})(),b7=(()=>{let n=class n{constructor(){this.nzTreeLevel=0,this.nzIsStart=[],this.nzIsEnd=[],this.nzSelectMode=!1,this.listOfUnit=[]}ngOnChanges(t){let{nzTreeLevel:i}=t;i&&(this.listOfUnit=[...new Array(i.currentValue||0)])}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-tree-indent"]],hostVars:5,hostBindings:function(i,r){i&2&&(ze("aria-hidden",!0),k("ant-tree-indent",!r.nzSelectMode)("ant-select-tree-indent",r.nzSelectMode))},inputs:{nzTreeLevel:"nzTreeLevel",nzIsStart:"nzIsStart",nzIsEnd:"nzIsEnd",nzSelectMode:"nzSelectMode"},exportAs:["nzTreeIndent"],standalone:!0,features:[oe,K],decls:1,vars:1,consts:[[3,"ant-tree-indent-unit","ant-select-tree-indent-unit","ant-select-tree-indent-unit-start","ant-tree-indent-unit-start","ant-select-tree-indent-unit-end","ant-tree-indent-unit-end",4,"ngFor","ngForOf"]],template:function(i,r){i&1&&_(0,XK,1,12,"span",0),i&2&&h("ngForOf",r.listOfUnit)},dependencies:[lt],encapsulation:2,changeDetection:0});let o=n;return o})(),T7=(()=>{let n=class n{constructor(){this.nzSelectMode=!1}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-tree-node-checkbox","builtin",""]],hostVars:16,hostBindings:function(i,r){i&2&&k("ant-select-tree-checkbox",r.nzSelectMode)("ant-select-tree-checkbox-checked",r.nzSelectMode&&r.isChecked)("ant-select-tree-checkbox-indeterminate",r.nzSelectMode&&r.isHalfChecked)("ant-select-tree-checkbox-disabled",r.nzSelectMode&&(r.isDisabled||r.isDisableCheckbox))("ant-tree-checkbox",!r.nzSelectMode)("ant-tree-checkbox-checked",!r.nzSelectMode&&r.isChecked)("ant-tree-checkbox-indeterminate",!r.nzSelectMode&&r.isHalfChecked)("ant-tree-checkbox-disabled",!r.nzSelectMode&&(r.isDisabled||r.isDisableCheckbox))},inputs:{nzSelectMode:"nzSelectMode",isChecked:"isChecked",isHalfChecked:"isHalfChecked",isDisabled:"isDisabled",isDisableCheckbox:"isDisableCheckbox"},standalone:!0,features:[K],attrs:oO,decls:1,vars:4,template:function(i,r){i&1&&R(0,"span"),i&2&&k("ant-tree-checkbox-inner",!r.nzSelectMode)("ant-select-tree-checkbox-inner",r.nzSelectMode)},encapsulation:2,changeDetection:0});let o=n;return o})(),aO=(()=>{let n=class n{constructor(){this.nzSelectMode=!1}get isShowLineIcon(){return!this.isLeaf&&!!this.nzShowLine}get isShowSwitchIcon(){return!this.isLeaf&&!this.nzShowLine}get isSwitcherOpen(){return!!this.isExpanded&&!this.isLeaf}get isSwitcherClose(){return!this.isExpanded&&!this.isLeaf}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=j({type:n,selectors:[["nz-tree-node-switcher"]],hostVars:16,hostBindings:function(i,r){i&2&&k("ant-select-tree-switcher",r.nzSelectMode)("ant-select-tree-switcher-noop",r.nzSelectMode&&r.isLeaf)("ant-select-tree-switcher_open",r.nzSelectMode&&r.isSwitcherOpen)("ant-select-tree-switcher_close",r.nzSelectMode&&r.isSwitcherClose)("ant-tree-switcher",!r.nzSelectMode)("ant-tree-switcher-noop",!r.nzSelectMode&&r.isLeaf)("ant-tree-switcher_open",!r.nzSelectMode&&r.isSwitcherOpen)("ant-tree-switcher_close",!r.nzSelectMode&&r.isSwitcherClose)},inputs:{nzShowExpand:"nzShowExpand",nzShowLine:"nzShowLine",nzExpandedIcon:"nzExpandedIcon",nzSelectMode:"nzSelectMode",context:"context",isLeaf:"isLeaf",isLoading:"isLoading",isExpanded:"isExpanded"},standalone:!0,features:[K],decls:4,vars:2,consts:[[4,"ngIf"],["loadingTemplate",""],[4,"ngIf","ngIfElse"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-icon","","nzType","caret-down"],["nz-icon","","class","ant-tree-switcher-line-icon",3,"nzType",4,"ngIf"],["nz-icon","","nzType","file","class","ant-tree-switcher-line-icon",4,"ngIf"],["nz-icon","",1,"ant-tree-switcher-line-icon",3,"nzType"],["nz-icon","","nzType","file",1,"ant-tree-switcher-line-icon"],["nz-icon","","nzType","loading",1,"ant-tree-switcher-loading-icon",3,"nzSpin"]],template:function(i,r){i&1&&_(0,e7,2,2,"ng-container",0)(1,o7,2,2,"ng-container",0)(2,s7,1,1,"ng-template",null,1,_e),i&2&&(h("ngIf",r.isShowSwitchIcon),f(),h("ngIf",r.nzShowLine))},dependencies:[Ge,Fe,we,Ye,Ue],encapsulation:2,changeDetection:0});let o=n;return o})(),lO=(()=>{let n=class n{get canDraggable(){return this.draggable&&!this.isDisabled?!0:null}get matchedValue(){return this.isMatched?this.searchValue:""}get isSwitcherOpen(){return this.isExpanded&&!this.isLeaf}get isSwitcherClose(){return!this.isExpanded&&!this.isLeaf}constructor(t){this.cdr=t,this.treeTemplate=null,this.selectMode=!1,this.showIndicator=!0}ngOnChanges(t){let{showIndicator:i,dragPosition:r}=t;(i||r)&&this.cdr.markForCheck()}};n.\u0275fac=function(i){return new(i||n)(w(fe))},n.\u0275cmp=j({type:n,selectors:[["nz-tree-node-title"]],hostVars:21,hostBindings:function(i,r){i&2&&(ze("title",r.title)("draggable",r.canDraggable)("aria-grabbed",r.canDraggable),k("draggable",r.canDraggable)("ant-select-tree-node-content-wrapper",r.selectMode)("ant-select-tree-node-content-wrapper-open",r.selectMode&&r.isSwitcherOpen)("ant-select-tree-node-content-wrapper-close",r.selectMode&&r.isSwitcherClose)("ant-select-tree-node-selected",r.selectMode&&r.isSelected)("ant-tree-node-content-wrapper",!r.selectMode)("ant-tree-node-content-wrapper-open",!r.selectMode&&r.isSwitcherOpen)("ant-tree-node-content-wrapper-close",!r.selectMode&&r.isSwitcherClose)("ant-tree-node-selected",!r.selectMode&&r.isSelected))},inputs:{searchValue:"searchValue",treeTemplate:"treeTemplate",draggable:"draggable",showIcon:"showIcon",selectMode:"selectMode",context:"context",icon:"icon",title:"title",isLoading:"isLoading",isSelected:"isSelected",isDisabled:"isDisabled",isMatched:"isMatched",isExpanded:"isExpanded",isLeaf:"isLeaf",showIndicator:"showIndicator",dragPosition:"dragPosition"},standalone:!0,features:[oe,K],decls:3,vars:7,consts:[[3,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[3,"dropPosition","level",4,"ngIf"],[3,"ant-tree-icon__open","ant-tree-icon__close","ant-tree-icon_loading","ant-select-tree-iconEle","ant-tree-iconEle",4,"ngIf"],[1,"ant-tree-title",3,"innerHTML"],["nz-icon","",3,"nzType",4,"ngIf"],["nz-icon","",3,"nzType"],[3,"dropPosition","level"]],template:function(i,r){i&1&&_(0,a7,0,0,"ng-template",0)(1,u7,4,7,"ng-container",1)(2,d7,1,2,"nz-tree-drop-indicator",2),i&2&&(h("ngTemplateOutlet",r.treeTemplate)("ngTemplateOutletContext",ri(4,DC,r.context,r.context.origin)),f(),h("ngIf",!r.treeTemplate),f(),h("ngIf",r.showIndicator))},dependencies:[Be,we,Ge,Fe,rO,iO,w7],encapsulation:2,changeDetection:0});let o=n;return o})(),cO=(()=>{let n=class n{get displayStyle(){return this.nzSearchValue&&this.nzHideUnMatched&&!this.isMatched&&!this.isExpanded&&this.canHide?"none":""}get isSwitcherOpen(){return this.isExpanded&&!this.isLeaf}get isSwitcherClose(){return!this.isExpanded&&!this.isLeaf}clickExpand(t){t.preventDefault(),!this.isLoading&&!this.isLeaf&&(this.nzAsyncData&&this.nzTreeNode.children.length===0&&!this.isExpanded&&(this.nzTreeNode.isLoading=!0),this.nzTreeNode.setExpanded(!this.isExpanded)),this.nzTreeService.setExpandedNodeList(this.nzTreeNode);let i=this.nzTreeService.formatEvent("expand",this.nzTreeNode,t);this.nzExpandChange.emit(i)}clickSelect(t){t.preventDefault(),this.isSelectable&&!this.isDisabled&&(this.nzTreeNode.isSelected=!this.nzTreeNode.isSelected),this.nzTreeService.setSelectedNodeList(this.nzTreeNode);let i=this.nzTreeService.formatEvent("click",this.nzTreeNode,t);this.nzClick.emit(i)}dblClick(t){t.preventDefault();let i=this.nzTreeService.formatEvent("dblclick",this.nzTreeNode,t);this.nzDblClick.emit(i)}contextMenu(t){t.preventDefault();let i=this.nzTreeService.formatEvent("contextmenu",this.nzTreeNode,t);this.nzContextMenu.emit(i)}clickCheckBox(t){if(t.preventDefault(),this.isDisabled||this.isDisableCheckbox)return;this.nzTreeNode.isChecked=!this.nzTreeNode.isChecked,this.nzTreeNode.isHalfChecked=!1,this.nzTreeService.setCheckedNodeList(this.nzTreeNode);let i=this.nzTreeService.formatEvent("check",this.nzTreeNode,t);this.nzCheckBoxChange.emit(i)}clearDragClass(){["drag-over-gap-top","drag-over-gap-bottom","drag-over","drop-target"].forEach(i=>{this.renderer.removeClass(this.elementRef.nativeElement,i)})}handleDragStart(t){try{t.dataTransfer.setData("text/plain",this.nzTreeNode.key)}catch{}this.nzTreeService.setSelectedNode(this.nzTreeNode),this.draggingKey=this.nzTreeNode.key;let i=this.nzTreeService.formatEvent("dragstart",this.nzTreeNode,t);this.nzOnDragStart.emit(i)}handleDragEnter(t){t.preventDefault(),this.showIndicator=this.nzTreeNode.key!==this.nzTreeService.getSelectedNode()?.key,this.renderIndicator(2),this.ngZone.run(()=>{let i=this.nzTreeService.formatEvent("dragenter",this.nzTreeNode,t);this.nzOnDragEnter.emit(i)})}handleDragOver(t){t.preventDefault();let i=this.nzTreeService.calcDropPosition(t);this.dragPos!==i&&(this.clearDragClass(),this.renderIndicator(i),this.dragPos===0&&this.isLeaf||(this.renderer.addClass(this.elementRef.nativeElement,this.dragPosClass[this.dragPos]),this.renderer.addClass(this.elementRef.nativeElement,"drop-target")));let r=this.nzTreeService.formatEvent("dragover",this.nzTreeNode,t);this.nzOnDragOver.emit(r)}handleDragLeave(t){t.preventDefault(),this.renderIndicator(2),this.clearDragClass();let i=this.nzTreeService.formatEvent("dragleave",this.nzTreeNode,t);this.nzOnDragLeave.emit(i)}handleDragDrop(t){t.preventDefault(),t.stopPropagation(),this.ngZone.run(()=>{this.showIndicator=!1,this.clearDragClass();let i=this.nzTreeService.getSelectedNode();if(!i||i&&i.key===this.nzTreeNode.key||this.dragPos===0&&this.isLeaf)return;let r=this.nzTreeService.formatEvent("drop",this.nzTreeNode,t),s=this.nzTreeService.formatEvent("dragend",this.nzTreeNode,t);this.nzBeforeDrop?this.nzBeforeDrop({dragNode:this.nzTreeService.getSelectedNode(),node:this.nzTreeNode,pos:this.dragPos}).subscribe(a=>{a&&this.nzTreeService.dropAndApply(this.nzTreeNode,this.dragPos),this.nzOnDrop.emit(r),this.nzOnDragEnd.emit(s)}):this.nzTreeNode&&(this.nzTreeService.dropAndApply(this.nzTreeNode,this.dragPos),this.nzOnDrop.emit(r))})}handleDragEnd(t){t.preventDefault(),this.ngZone.run(()=>{if(this.nzBeforeDrop)this.draggingKey=null,this.markForCheck();else{this.draggingKey=null;let i=this.nzTreeService.formatEvent("dragend",this.nzTreeNode,t);this.nzOnDragEnd.emit(i)}})}handDragEvent(){this.ngZone.runOutsideAngular(()=>{if(this.nzDraggable){let t=this.elementRef.nativeElement;this.destroy$=new J,Ke(t,"dragstart").pipe(F(this.destroy$)).subscribe(i=>this.handleDragStart(i)),Ke(t,"dragenter").pipe(F(this.destroy$)).subscribe(i=>this.handleDragEnter(i)),Ke(t,"dragover").pipe(F(this.destroy$)).subscribe(i=>this.handleDragOver(i)),Ke(t,"dragleave").pipe(F(this.destroy$)).subscribe(i=>this.handleDragLeave(i)),Ke(t,"drop").pipe(F(this.destroy$)).subscribe(i=>this.handleDragDrop(i)),Ke(t,"dragend").pipe(F(this.destroy$)).subscribe(i=>this.handleDragEnd(i))}else this.destroy$.next(!0),this.destroy$.complete()})}markForCheck(){this.cdr.markForCheck()}constructor(t,i,r,s,a,l){this.nzTreeService=t,this.ngZone=i,this.renderer=r,this.elementRef=s,this.cdr=a,this.noAnimation=l,this.icon="",this.title="",this.isLoading=!1,this.isSelected=!1,this.isDisabled=!1,this.isMatched=!1,this.isStart=[],this.isEnd=[],this.nzHideUnMatched=!1,this.nzNoAnimation=!1,this.nzSelectMode=!1,this.nzShowIcon=!1,this.nzTreeTemplate=null,this.nzSearchValue="",this.nzDraggable=!1,this.nzClick=new O,this.nzDblClick=new O,this.nzContextMenu=new O,this.nzCheckBoxChange=new O,this.nzExpandChange=new O,this.nzOnDragStart=new O,this.nzOnDragEnter=new O,this.nzOnDragOver=new O,this.nzOnDragLeave=new O,this.nzOnDrop=new O,this.nzOnDragEnd=new O,this.destroy$=new J,this.dragPos=2,this.dragPosClass={0:"drag-over",1:"drag-over-gap-bottom","-1":"drag-over-gap-top"},this.draggingKey=null,this.showIndicator=!1}ngOnInit(){this.nzTreeNode.component=this,this.ngZone.runOutsideAngular(()=>{Ke(this.elementRef.nativeElement,"mousedown").pipe(F(this.destroy$)).subscribe(t=>{this.nzSelectMode&&t.preventDefault()})})}ngOnChanges(t){let{nzDraggable:i}=t;i&&this.handDragEvent()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}renderIndicator(t){this.ngZone.run(()=>{this.showIndicator=t!==2,!(this.nzTreeNode.key===this.nzTreeService.getSelectedNode()?.key||t===0&&this.isLeaf)&&(this.dragPos=t,this.cdr.markForCheck())})}};n.\u0275fac=function(i){return new(i||n)(w(Tc),w($e),w(He),w(de),w(fe),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-tree-node","builtin",""]],hostVars:36,hostBindings:function(i,r){i&2&&(Re("display",r.displayStyle),k("ant-select-tree-treenode",r.nzSelectMode)("ant-select-tree-treenode-disabled",r.nzSelectMode&&r.isDisabled)("ant-select-tree-treenode-switcher-open",r.nzSelectMode&&r.isSwitcherOpen)("ant-select-tree-treenode-switcher-close",r.nzSelectMode&&r.isSwitcherClose)("ant-select-tree-treenode-checkbox-checked",r.nzSelectMode&&r.isChecked)("ant-select-tree-treenode-checkbox-indeterminate",r.nzSelectMode&&r.isHalfChecked)("ant-select-tree-treenode-selected",r.nzSelectMode&&r.isSelected)("ant-select-tree-treenode-loading",r.nzSelectMode&&r.isLoading)("ant-tree-treenode",!r.nzSelectMode)("ant-tree-treenode-disabled",!r.nzSelectMode&&r.isDisabled)("ant-tree-treenode-switcher-open",!r.nzSelectMode&&r.isSwitcherOpen)("ant-tree-treenode-switcher-close",!r.nzSelectMode&&r.isSwitcherClose)("ant-tree-treenode-checkbox-checked",!r.nzSelectMode&&r.isChecked)("ant-tree-treenode-checkbox-indeterminate",!r.nzSelectMode&&r.isHalfChecked)("ant-tree-treenode-selected",!r.nzSelectMode&&r.isSelected)("ant-tree-treenode-loading",!r.nzSelectMode&&r.isLoading)("dragging",r.draggingKey===r.nzTreeNode.key))},inputs:{icon:"icon",title:"title",isLoading:"isLoading",isSelected:"isSelected",isDisabled:"isDisabled",isMatched:"isMatched",isExpanded:"isExpanded",isLeaf:"isLeaf",isChecked:"isChecked",isHalfChecked:"isHalfChecked",isDisableCheckbox:"isDisableCheckbox",isSelectable:"isSelectable",canHide:"canHide",isStart:"isStart",isEnd:"isEnd",nzTreeNode:"nzTreeNode",nzShowLine:"nzShowLine",nzShowExpand:"nzShowExpand",nzCheckable:"nzCheckable",nzAsyncData:"nzAsyncData",nzHideUnMatched:"nzHideUnMatched",nzNoAnimation:"nzNoAnimation",nzSelectMode:"nzSelectMode",nzShowIcon:"nzShowIcon",nzExpandedIcon:"nzExpandedIcon",nzTreeTemplate:"nzTreeTemplate",nzBeforeDrop:"nzBeforeDrop",nzSearchValue:"nzSearchValue",nzDraggable:"nzDraggable"},outputs:{nzClick:"nzClick",nzDblClick:"nzDblClick",nzContextMenu:"nzContextMenu",nzCheckBoxChange:"nzCheckBoxChange",nzExpandChange:"nzExpandChange",nzOnDragStart:"nzOnDragStart",nzOnDragEnter:"nzOnDragEnter",nzOnDragOver:"nzOnDragOver",nzOnDragLeave:"nzOnDragLeave",nzOnDrop:"nzOnDrop",nzOnDragEnd:"nzOnDragEnd"},exportAs:["nzTreeBuiltinNode"],standalone:!0,features:[oe,K],attrs:oO,decls:4,vars:22,consts:[[3,"nzTreeLevel","nzSelectMode","nzIsStart","nzIsEnd"],[3,"nzShowExpand","nzShowLine","nzExpandedIcon","nzSelectMode","context","isLeaf","isExpanded","isLoading","click",4,"ngIf"],["builtin","",3,"nzSelectMode","isChecked","isHalfChecked","isDisabled","isDisableCheckbox","click",4,"ngIf"],[3,"icon","title","isLoading","isSelected","isDisabled","isMatched","isExpanded","isLeaf","searchValue","treeTemplate","draggable","showIcon","selectMode","context","showIndicator","dragPosition","dblclick","click","contextmenu"],[3,"nzShowExpand","nzShowLine","nzExpandedIcon","nzSelectMode","context","isLeaf","isExpanded","isLoading","click"],["builtin","",3,"nzSelectMode","isChecked","isHalfChecked","isDisabled","isDisableCheckbox","click"]],template:function(i,r){i&1&&(R(0,"nz-tree-indent",0),_(1,p7,1,8,"nz-tree-node-switcher",1)(2,h7,1,5,"nz-tree-node-checkbox",2),C(3,"nz-tree-node-title",3),A("dblclick",function(a){return r.dblClick(a)})("click",function(a){return r.clickSelect(a)})("contextmenu",function(a){return r.contextMenu(a)}),S()),i&2&&(h("nzTreeLevel",r.nzTreeNode.level)("nzSelectMode",r.nzSelectMode)("nzIsStart",r.isStart)("nzIsEnd",r.isEnd),f(),h("ngIf",r.nzShowExpand),f(),h("ngIf",r.nzCheckable),f(),h("icon",r.icon)("title",r.title)("isLoading",r.isLoading)("isSelected",r.isSelected)("isDisabled",r.isDisabled)("isMatched",r.isMatched)("isExpanded",r.isExpanded)("isLeaf",r.isLeaf)("searchValue",r.nzSearchValue)("treeTemplate",r.nzTreeTemplate)("draggable",r.nzDraggable)("showIcon",r.nzShowIcon)("selectMode",r.nzSelectMode)("context",r.nzTreeNode)("showIndicator",r.showIndicator)("dragPosition",r.dragPos))},dependencies:[b7,aO,we,T7,lO],encapsulation:2,changeDetection:0});let o=n;return N([W()],o.prototype,"nzShowLine",void 0),N([W()],o.prototype,"nzShowExpand",void 0),N([W()],o.prototype,"nzCheckable",void 0),N([W()],o.prototype,"nzAsyncData",void 0),N([W()],o.prototype,"nzHideUnMatched",void 0),N([W()],o.prototype,"nzNoAnimation",void 0),N([W()],o.prototype,"nzSelectMode",void 0),N([W()],o.prototype,"nzShowIcon",void 0),o})(),uO=(()=>{let n=class n extends Tc{constructor(){super()}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=qe({token:n,factory:n.\u0275fac});let o=n;return o})();function E7(){let o=ae(wz,{skipSelf:!0,optional:!0}),n=ae(uO);return o??n}var x7="tree",z7=(()=>{let n=class n extends nf{writeValue(t){this.handleNzData(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}renderTreeProperties(t){let i=!1,r=!1,{nzData:s,nzExpandedKeys:a,nzSelectedKeys:l,nzCheckedKeys:c,nzCheckStrictly:u,nzExpandAll:d,nzMultiple:p,nzSearchValue:g}=t;d&&(i=!0,r=this.nzExpandAll),p&&(this.nzTreeService.isMultiple=this.nzMultiple),u&&(this.nzTreeService.isCheckStrictly=this.nzCheckStrictly),s&&this.handleNzData(this.nzData),c&&this.handleCheckedKeys(this.nzCheckedKeys),u&&this.handleCheckedKeys(null),(a||d)&&(i=!0,this.handleExpandedKeys(r||this.nzExpandedKeys)),l&&this.handleSelectedKeys(this.nzSelectedKeys,this.nzMultiple),g&&(g.firstChange&&!this.nzSearchValue||(i=!1,this.handleSearchValue(g.currentValue,this.nzSearchFunc),this.nzSearchValueChange.emit(this.nzTreeService.formatEvent("search",null,null))));let v=this.getExpandedNodeList().map(x=>x.key),y=i?r||this.nzExpandedKeys:v;this.handleFlattenNodes(this.nzTreeService.rootNodes,y)}trackByFlattenNode(t,i){return i.key}handleNzData(t){if(Array.isArray(t)){let i=this.coerceTreeNodes(t);this.nzTreeService.initTree(i)}}handleFlattenNodes(t,i=[]){this.nzTreeService.flattenTreeData(t,i)}handleCheckedKeys(t){this.nzTreeService.conductCheck(t,this.nzCheckStrictly)}handleExpandedKeys(t=[]){this.nzTreeService.conductExpandedKeys(t)}handleSelectedKeys(t,i){this.nzTreeService.conductSelectedKeys(t,i)}handleSearchValue(t,i){let r=uC(this.nzTreeService.rootNodes,!0).map(a=>a.data),s=a=>i?i(a.origin):!(!t||!a.title.toLowerCase().includes(t.toLowerCase()));r.forEach(a=>{a.isMatched=s(a),a.canHide=!a.isMatched,a.isMatched?this.nzTreeService.expandNodeAllParentBySearch(a):(a.setExpanded(!1),this.nzTreeService.setExpandedNodeList(a)),this.nzTreeService.setMatchedNodeList(a)})}eventTriggerChanged(t){let i=t.node;switch(t.eventName){case"expand":this.renderTree(),this.nzExpandChange.emit(t);break;case"click":this.nzClick.emit(t);break;case"dblclick":this.nzDblClick.emit(t);break;case"contextmenu":this.nzContextMenu.emit(t);break;case"check":this.nzTreeService.setCheckedNodeList(i),this.nzCheckStrictly||this.nzTreeService.conduct(i);let r=this.nzTreeService.formatEvent("check",i,t.event);this.nzCheckBoxChange.emit(r);let s=this.nzTreeService.getCheckedNodeKeys();this.nzCheckedKeysChange.emit(s);break;case"dragstart":i.isExpanded&&(i.setExpanded(!i.isExpanded),this.renderTree()),this.nzOnDragStart.emit(t);break;case"dragenter":let a=this.nzTreeService.getSelectedNode();a&&a.key!==i.key&&!i.isExpanded&&!i.isLeaf&&(i.setExpanded(!0),this.renderTree()),this.nzOnDragEnter.emit(t);break;case"dragover":this.nzOnDragOver.emit(t);break;case"dragleave":this.nzOnDragLeave.emit(t);break;case"dragend":this.nzOnDragEnd.emit(t);break;case"drop":this.renderTree(),this.nzOnDrop.emit(t);break}}renderTree(){this.handleFlattenNodes(this.nzTreeService.rootNodes,this.getExpandedNodeList().map(t=>t.key)),this.cdr.markForCheck()}constructor(t,i,r,s,a){super(t),this.nzConfigService=i,this.cdr=r,this.directionality=s,this.noAnimation=a,this._nzModuleName=x7,this.nzShowIcon=!1,this.nzHideUnMatched=!1,this.nzBlockNode=!1,this.nzExpandAll=!1,this.nzSelectMode=!1,this.nzCheckStrictly=!1,this.nzShowExpand=!0,this.nzShowLine=!1,this.nzCheckable=!1,this.nzAsyncData=!1,this.nzDraggable=!1,this.nzMultiple=!1,this.nzVirtualItemSize=28,this.nzVirtualMaxBufferPx=500,this.nzVirtualMinBufferPx=28,this.nzVirtualHeight=null,this.nzData=[],this.nzExpandedKeys=[],this.nzSelectedKeys=[],this.nzCheckedKeys=[],this.nzSearchValue="",this.nzFlattenNodes=[],this.beforeInit=!0,this.dir="ltr",this.nzExpandedKeysChange=new O,this.nzSelectedKeysChange=new O,this.nzCheckedKeysChange=new O,this.nzSearchValueChange=new O,this.nzClick=new O,this.nzDblClick=new O,this.nzContextMenu=new O,this.nzCheckBoxChange=new O,this.nzExpandChange=new O,this.nzOnDragStart=new O,this.nzOnDragEnter=new O,this.nzOnDragOver=new O,this.nzOnDragLeave=new O,this.nzOnDrop=new O,this.nzOnDragEnd=new O,this.HIDDEN_STYLE={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},this.HIDDEN_NODE_STYLE={position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"},this.destroy$=new J,this.onChange=()=>null,this.onTouched=()=>null}ngOnInit(){this.nzTreeService.flattenNodes$.pipe(F(this.destroy$)).subscribe(t=>{this.nzFlattenNodes=this.nzVirtualHeight&&this.nzHideUnMatched&&this.nzSearchValue?.length>0?t.filter(i=>!i.canHide):t,this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change?.pipe(F(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()})}ngOnChanges(t){this.renderTreeProperties(t)}ngAfterViewInit(){this.beforeInit=!1}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(i){return new(i||n)(w(Tc),w(st),w(fe),w(Me,8),w(ft,9))},n.\u0275cmp=j({type:n,selectors:[["nz-tree"]],contentQueries:function(i,r,s){if(i&1&&Ft(s,f7,7),i&2){let a;ce(a=ue())&&(r.nzTreeTemplateChild=a.first)}},viewQuery:function(i,r){if(i&1&&xe(ur,5,ur),i&2){let s;ce(s=ue())&&(r.cdkVirtualScrollViewport=s.first)}},hostVars:20,hostBindings:function(i,r){i&2&&k("ant-select-tree",r.nzSelectMode)("ant-select-tree-show-line",r.nzSelectMode&&r.nzShowLine)("ant-select-tree-icon-hide",r.nzSelectMode&&!r.nzShowIcon)("ant-select-tree-block-node",r.nzSelectMode&&r.nzBlockNode)("ant-tree",!r.nzSelectMode)("ant-tree-rtl",r.dir==="rtl")("ant-tree-show-line",!r.nzSelectMode&&r.nzShowLine)("ant-tree-icon-hide",!r.nzSelectMode&&!r.nzShowIcon)("ant-tree-block-node",!r.nzSelectMode&&r.nzBlockNode)("draggable-tree",r.nzDraggable)},inputs:{nzShowIcon:"nzShowIcon",nzHideUnMatched:"nzHideUnMatched",nzBlockNode:"nzBlockNode",nzExpandAll:"nzExpandAll",nzSelectMode:"nzSelectMode",nzCheckStrictly:"nzCheckStrictly",nzShowExpand:"nzShowExpand",nzShowLine:"nzShowLine",nzCheckable:"nzCheckable",nzAsyncData:"nzAsyncData",nzDraggable:"nzDraggable",nzMultiple:"nzMultiple",nzExpandedIcon:"nzExpandedIcon",nzVirtualItemSize:"nzVirtualItemSize",nzVirtualMaxBufferPx:"nzVirtualMaxBufferPx",nzVirtualMinBufferPx:"nzVirtualMinBufferPx",nzVirtualHeight:"nzVirtualHeight",nzTreeTemplate:"nzTreeTemplate",nzBeforeDrop:"nzBeforeDrop",nzData:"nzData",nzExpandedKeys:"nzExpandedKeys",nzSelectedKeys:"nzSelectedKeys",nzCheckedKeys:"nzCheckedKeys",nzSearchValue:"nzSearchValue",nzSearchFunc:"nzSearchFunc"},outputs:{nzExpandedKeysChange:"nzExpandedKeysChange",nzSelectedKeysChange:"nzSelectedKeysChange",nzCheckedKeysChange:"nzCheckedKeysChange",nzSearchValueChange:"nzSearchValueChange",nzClick:"nzClick",nzDblClick:"nzDblClick",nzContextMenu:"nzContextMenu",nzCheckBoxChange:"nzCheckBoxChange",nzExpandChange:"nzExpandChange",nzOnDragStart:"nzOnDragStart",nzOnDragEnter:"nzOnDragEnter",nzOnDragOver:"nzOnDragOver",nzOnDragLeave:"nzOnDragLeave",nzOnDrop:"nzOnDrop",nzOnDragEnd:"nzOnDragEnd"},exportAs:["nzTree"],standalone:!0,features:[Ve([uO,{provide:Tc,useFactory:E7},{provide:zn,useExisting:pn(()=>n),multi:!0}]),Xe,oe,K],decls:10,vars:6,consts:[[3,"ngStyle"],[1,"ant-tree-treenode",3,"ngStyle"],[1,"ant-tree-indent"],[1,"ant-tree-indent-unit"],[1,"ant-tree-list",2,"position","relative"],[3,"ant-select-tree-list-holder-inner","ant-tree-list-holder-inner","itemSize","minBufferPx","maxBufferPx","height",4,"ngIf"],[3,"ant-select-tree-list-holder-inner","ant-tree-list-holder-inner","nzNoAnimation",4,"ngIf"],["nodeTemplate",""],[3,"itemSize","minBufferPx","maxBufferPx"],[4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"nzNoAnimation"],[4,"ngFor","ngForOf","ngForTrackBy"],["builtin","",3,"icon","title","isLoading","isSelected","isDisabled","isMatched","isExpanded","isLeaf","isStart","isEnd","isChecked","isHalfChecked","isDisableCheckbox","isSelectable","canHide","nzTreeNode","nzSelectMode","nzShowLine","nzExpandedIcon","nzDraggable","nzCheckable","nzShowExpand","nzAsyncData","nzSearchValue","nzHideUnMatched","nzBeforeDrop","nzShowIcon","nzTreeTemplate","nzExpandChange","nzClick","nzDblClick","nzContextMenu","nzCheckBoxChange","nzOnDragStart","nzOnDragEnter","nzOnDragOver","nzOnDragLeave","nzOnDragEnd","nzOnDrop"]],template:function(i,r){i&1&&(C(0,"div"),R(1,"input",0),S(),C(2,"div",1)(3,"div",2),R(4,"div",3),S()(),C(5,"div",4),_(6,v7,2,11,"cdk-virtual-scroll-viewport",5)(7,_7,2,9,"div",6),S(),_(8,S7,1,28,"ng-template",null,7,_e)),i&2&&(f(),h("ngStyle",r.HIDDEN_STYLE),f(),h("ngStyle",r.HIDDEN_NODE_STYLE),f(3),k("ant-select-tree-list",r.nzSelectMode),f(),h("ngIf",r.nzVirtualHeight),f(),h("ngIf",!r.nzVirtualHeight))},dependencies:[Zt,ur,Fl,we,Al,Be,ft,lt,cO],encapsulation:2,data:{animation:[Sw]},changeDetection:0});let o=n;return N([W(),De()],o.prototype,"nzShowIcon",void 0),N([W(),De()],o.prototype,"nzHideUnMatched",void 0),N([W(),De()],o.prototype,"nzBlockNode",void 0),N([W()],o.prototype,"nzExpandAll",void 0),N([W()],o.prototype,"nzSelectMode",void 0),N([W()],o.prototype,"nzCheckStrictly",void 0),N([W()],o.prototype,"nzShowExpand",void 0),N([W()],o.prototype,"nzShowLine",void 0),N([W()],o.prototype,"nzCheckable",void 0),N([W()],o.prototype,"nzAsyncData",void 0),N([W()],o.prototype,"nzDraggable",void 0),N([W()],o.prototype,"nzMultiple",void 0),o})(),Ef=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[z7,cO,aO,lO]});let o=n;return o})();function Qo(o){return o==null||o===""?null:o}function ne(o,n){return n===void 0&&(n=!1),o!=null&&(o!==""||n)}function tt(o){return!ne(o)}function Er(o){return o==null||o.length===0}function Gd(o){return o!=null&&typeof o.toString=="function"?o.toString():null}function pa(o){if(o!==void 0){if(o===null||o==="")return null;if(typeof o=="number")return isNaN(o)?void 0:o;var n=parseInt(o,10);return isNaN(n)?void 0:n}}function ig(o){if(o!==void 0)return o===null||o===""?!1:typeof o=="boolean"?o:/true/i.test(o)}function D7(o){if(!(o==null||o===""))return o}function P_(o,n){var e=o?JSON.stringify(o):null,t=n?JSON.stringify(n):null;return e===t}function R7(o,n,e){e===void 0&&(e=!1);var t=o==null,i=n==null;if(o&&o.toNumber&&(o=o.toNumber()),n&&n.toNumber&&(n=n.toNumber()),t&&i)return 0;if(t)return-1;if(i)return 1;function r(s,a){return s>a?1:s=o.length&&(o=void 0),{value:o&&o[t++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},F7=function(o,n){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var t=e.call(o),i,r=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return r};function Ei(o,n){var e,t;if(o!=null){if(Array.isArray(o)){for(var i=0;i=0)){var r=e[i],s=og(r)&&r.constructor===Object;s?t[i]=rg(r):t[i]=r}}),t}}function fa(o){if(!o)return[];var n=Object;if(typeof n.values=="function")return n.values(o);var e=[];for(var t in o)o.hasOwnProperty(t)&&o.propertyIsEnumerable(t)&&e.push(o[t]);return e}function xr(o,n,e,t){e===void 0&&(e=!0),t===void 0&&(t=!1),ne(n)&&Ei(n,function(i,r){var s=o[i];if(s!==r){if(t){var a=s==null&&r!=null;if(a){var l=typeof r=="object"&&r.constructor===Object,c=l;c&&(s={},o[i]=s)}}og(r)&&og(s)&&!Array.isArray(s)?xr(s,r,e,t):(e||r!==void 0)&&(o[i]=r)}})}function Vc(o,n,e){if(!(!n||!o)){if(!e)return o[n];for(var t=n.split("."),i=o,r=0;r=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Vie=function(o){kie(n,o);function n(){var e=o.call(this)||this;return e.descriptionContainer=null,e.announceValue=zr(e.announceValue.bind(e),200),e}return n.prototype.postConstruct=function(){var e=this.gridOptionsService.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),o0(t,"polite"),qD(t,"additions text"),KD(t,!0),this.eGridDiv.appendChild(t)},n.prototype.announceValue=function(e){var t=this;this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(function(){t.descriptionContainer.textContent=e},50))},n.prototype.destroy=function(){o.prototype.destroy.call(this);var e=this.descriptionContainer;e&&(ti(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null},x_([b("eGridDiv")],n.prototype,"eGridDiv",void 0),x_([pe],n.prototype,"postConstruct",null),n=x_([Oe("ariaAnnouncementService")],n),n}(re),vD=function(o,n){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var t=e.call(o),i,r=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return r},yD=function(o,n,e){if(e||arguments.length===2)for(var t=0,i=n.length,r;t"u"?{}:global;Kc.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement;Kc.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement;Kc.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement;Kc.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement;Kc.Node=typeof Node>"u"?{}:Node;Kc.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;var Rd=function(o,n){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var t=e.call(o),i,r=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return r},Id=function(o,n,e){if(e||arguments.length===2)for(var t=0,i=n.length,r;t0;if(t&&this.selectionService.setNodesSelected({newValue:!1,nodes:n,suppressFinishActions:!0,source:e}),this.selectionService.updateGroupsFromChildrenSelections(e),t){var i={type:T.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(i)}},o.prototype.executeAdd=function(n,e){var t=this,i,r=n.add,s=n.addIndex;if(!mt.missingOrEmpty(r)){var a=r.map(function(y){return t.createNode(y,t.rootNode,o.TOP_LEVEL)});if(typeof s=="number"&&s>=0){var l=this.rootNode.allLeafChildren,c=l.length,u=s,d=this.gridOptionsService.get("treeData");if(d&&s>0&&c>0){for(var p=0;p=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Ji=function(o,n){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var t=e.call(o),i,r=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return r},er=function(o,n,e){if(e||arguments.length===2)for(var t=0,i=n.length,r;t0;)i=i.childrenAfterSort[0];return i.rowIndex},n.prototype.getRowBounds=function(e){if(mt.missing(this.rowsToDisplay))return null;var t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null},n.prototype.onRowGroupOpened=function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:zt.MAP,keepRenderedRows:!0,animate:e})},n.prototype.onFilterChanged=function(e){if(!e.afterDataChange){var t=this.gridOptionsService.isAnimateRows(),i=e.columns.length===0||e.columns.some(function(s){return s.isPrimary()}),r=i?zt.FILTER:zt.FILTER_AGGREGATES;this.refreshModel({step:r,keepRenderedRows:!0,animate:t})}},n.prototype.onSortChanged=function(){var e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:zt.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})},n.prototype.getType=function(){return"clientSide"},n.prototype.onValueChanged=function(){this.columnModel.isPivotActive()?this.refreshModel({step:zt.PIVOT}):this.refreshModel({step:zt.AGGREGATE})},n.prototype.createChangePath=function(e){var t=mt.missingOrEmpty(e),i=new Lg(!1,this.rootNode);return(t||this.gridOptionsService.get("treeData"))&&i.setInactive(),i},n.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(e){if(!this.gridOptionsService.get("suppressModelUpdateAfterUpdateTransaction")||e.rowNodeTransactions==null)return!1;var t=e.rowNodeTransactions.filter(function(r){return r.add!=null&&r.add.length>0||r.remove!=null&&r.remove.length>0}),i=t==null||t.length==0;return i},n.prototype.buildRefreshModelParams=function(e){var t=zt.EVERYTHING,i={everything:zt.EVERYTHING,group:zt.EVERYTHING,filter:zt.FILTER,map:zt.MAP,aggregate:zt.AGGREGATE,sort:zt.SORT,pivot:zt.PIVOT};if(mt.exists(e)&&(t=i[e]),mt.missing(t)){console.error("AG Grid: invalid step ".concat(e,", available steps are ").concat(Object.keys(i).join(", ")));return}var r=!this.gridOptionsService.get("suppressAnimationFrame"),s={step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:r};return s},n.prototype.refreshModel=function(e){if(!(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())){var t=typeof e=="object"&&"step"in e?e:this.buildRefreshModelParams(e);if(t&&!this.isSuppressModelUpdateAfterUpdateTransaction(t)){var i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case zt.EVERYTHING:this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case zt.FILTER:this.doFilter(i);case zt.PIVOT:this.doPivot(i);case zt.AGGREGATE:this.doAggregate(i);case zt.FILTER_AGGREGATES:this.doFilterAggregates(i);case zt.SORT:this.doSort(t.rowNodeTransactions,i);case zt.MAP:this.doRowsToDisplay()}var r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,r),this.isRefreshingModel=!1;var s={type:T.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(s)}}},n.prototype.isEmpty=function(){var e=mt.missing(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return mt.missing(this.rootNode)||e||!this.columnModel.isReady()},n.prototype.isRowsToRender=function(){return mt.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0},n.prototype.getNodesInRangeForSelection=function(e,t){var i=!t,r=!1,s=[],a=this.gridOptionsService.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(function(l){if(!r){if(i&&(l===t||l===e)&&(r=!0,l.group&&a)){s.push.apply(s,er([],Ji(l.allLeafChildren),!1));return}if(!i){if(l!==t&&l!==e)return;i=!0}var c=!l.group||!a;if(c){s.push(l);return}}}),s},n.prototype.setDatasource=function(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")},n.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null},n.prototype.getRootNode=function(){return this.rootNode},n.prototype.getRow=function(e){return this.rowsToDisplay[e]},n.prototype.isRowPresent=function(e){return this.rowsToDisplay.indexOf(e)>=0},n.prototype.getRowIndexAtPixel=function(e){if(this.isEmpty()||this.rowsToDisplay.length===0)return-1;var t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;var r=mt.last(this.rowsToDisplay);if(r.rowTop<=e)return this.rowsToDisplay.length-1;for(var s=-1,a=-1;;){var l=Math.floor((t+i)/2),c=this.rowsToDisplay[l];if(this.isRowInPixel(c,e))return l;c.rowTope&&(i=l-1);var u=s===t&&a===i;if(u)return l;s=t,a=i}},n.prototype.isRowInPixel=function(e,t){var i=e.rowTop,r=e.rowTop+e.rowHeight,s=i<=t&&r>t;return s},n.prototype.forEachLeafNode=function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach(function(t,i){return e(t,i)})},n.prototype.forEachNode=function(e,t){t===void 0&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:er([],Ji(this.rootNode.childrenAfterGroup||[]),!1),callback:e,recursionType:Ss.Normal,index:0,includeFooterNodes:t})},n.prototype.forEachNodeAfterFilter=function(e,t){t===void 0&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:er([],Ji(this.rootNode.childrenAfterAggFilter||[]),!1),callback:e,recursionType:Ss.AfterFilter,index:0,includeFooterNodes:t})},n.prototype.forEachNodeAfterFilterAndSort=function(e,t){t===void 0&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:er([],Ji(this.rootNode.childrenAfterSort||[]),!1),callback:e,recursionType:Ss.AfterFilterAndSort,index:0,includeFooterNodes:t})},n.prototype.forEachPivotNode=function(e,t){t===void 0&&(t=!1),this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:Ss.PivotNodes,index:0,includeFooterNodes:t})},n.prototype.recursivelyWalkNodesAndCallback=function(e){for(var t,i=e.nodes,r=e.callback,s=e.recursionType,a=e.includeFooterNodes,l=e.index,c=0;c0&&window.setTimeout(function(){t.forEach(function(a){return a()})},0),i.length>0){var s={type:T.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:i};this.eventService.dispatchEvent(s)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0},n.prototype.updateRowData=function(e,t){this.valueCache.onDataChanged();var i=this.nodeManager.updateRowData(e,t),r=typeof e.addIndex=="number";return this.commonUpdateRowData([i],t,r),i},n.prototype.createRowNodeOrder=function(){var e=this.gridOptionsService.get("suppressMaintainUnsortedOrder");if(!e){var t={};if(this.rootNode&&this.rootNode.allLeafChildren)for(var i=0;i=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Wie=function(o){jie(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.execute=function(e){var t=e.changedPath;this.filterService.filter(t)},CD([b("filterService")],n.prototype,"filterService",void 0),n=CD([Oe("filterStage")],n),n}(re),Uie=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),z_=function(o,n,e,t){var i=arguments.length,r=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,n,e,t);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Kie=function(o){Uie(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.execute=function(e){var t=this,i=this.sortController.getSortOptions(),r=mt.exists(i)&&i.length>0,s=r&&mt.exists(e.rowNodeTransactions)&&this.gridOptionsService.get("deltaSort"),a=i.some(function(l){var c=t.gridOptionsService.isColumnsSortingCoupledToGroup();return c?l.column.isPrimary()&&l.column.isRowGroupActive():!!l.column.getColDef().showRowGroup});this.sortService.sort(i,r,s,e.rowNodeTransactions,e.changedPath,a)},z_([b("sortService")],n.prototype,"sortService",void 0),z_([b("sortController")],n.prototype,"sortController",void 0),n=z_([Oe("sortStage")],n),n}(re),qie=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),O_=function(o,n,e,t){var i=arguments.length,r=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,n,e,t);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Yie=function(o){qie(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.execute=function(e){var t=e.rowNode,i=[],r=this.columnModel.isPivotMode(),s=r&&t.leafGroup,a=s?[t]:t.childrenAfterSort,l=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(l,a,i,r,0);var c=i.length>0,u=!s&&c&&l.groupIncludeTotalFooter;return u&&(t.createFooter(),this.addRowNodeToRowsToDisplay(l,t.sibling,i,0)),i},n.prototype.getFlattenDetails=function(){var e=this.gridOptionsService.get("groupRemoveSingleChildren"),t=!e&&this.gridOptionsService.get("groupRemoveLowestSingleChildren");return{groupRemoveLowestSingleChildren:t,groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gridOptionsService.isGroupMultiAutoColumn(),hideOpenParents:this.gridOptionsService.get("groupHideOpenParents"),groupIncludeTotalFooter:this.gridOptionsService.get("groupIncludeTotalFooter"),getGroupIncludeFooter:this.gridOptionsService.getGroupIncludeFooter()}},n.prototype.recursivelyAddToRowsToDisplay=function(e,t,i,r,s){if(!mt.missingOrEmpty(t))for(var a=0;a=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Xie=function(o){Qie(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.sort=function(e,t,i,r,s,a){var l=this,c=this.gridOptionsService.get("groupMaintainOrder"),u=this.columnModel.getAllGridColumns().some(function(y){return y.isRowGroupActive()}),d={};i&&r&&(d=this.calculateDirtyNodes(r));var p=this.columnModel.isPivotMode(),g=this.gridOptionsService.getCallback("postSortRows"),v=function(y){var x;l.pullDownGroupDataForHideOpenParents(y.childrenAfterAggFilter,!0);var E=p&&y.leafGroup,z=c&&u&&!y.leafGroup&&!a;if(z){var M=(x=l.columnModel.getRowGroupColumns())===null||x===void 0?void 0:x[y.level+1],G=M?.getSort()===null,U=y.childrenAfterAggFilter.slice(0);if(y.childrenAfterSort&&!G){var se={};y.childrenAfterSort.forEach(function(he,be){se[he.id]=be}),U.sort(function(he,be){var Ee,Te;return((Ee=se[he.id])!==null&&Ee!==void 0?Ee:0)-((Te=se[be.id])!==null&&Te!==void 0?Te:0)})}y.childrenAfterSort=U}else!t||E?y.childrenAfterSort=y.childrenAfterAggFilter.slice(0):i?y.childrenAfterSort=l.doDeltaSort(y,d,s,e):y.childrenAfterSort=l.rowNodeSorter.doFullSort(y.childrenAfterAggFilter,e);if(y.sibling&&(y.sibling.childrenAfterSort=y.childrenAfterSort),l.updateChildIndexes(y),g){var ve={nodes:y.childrenAfterSort};g(ve)}};s&&s.forEachChangedNodeDepthFirst(v),this.updateGroupDataForHideOpenParents(s)},n.prototype.calculateDirtyNodes=function(e){var t={},i=function(r){r&&r.forEach(function(s){return t[s.id]=!0})};return e&&e.forEach(function(r){i(r.add),i(r.update),i(r.remove)}),t},n.prototype.doDeltaSort=function(e,t,i,r){var s=this,a=e.childrenAfterAggFilter,l=e.childrenAfterSort;if(!l)return this.rowNodeSorter.doFullSort(a,r);var c={},u=[];a.forEach(function(v){t[v.id]||!i.canSkip(v)?u.push(v):c[v.id]=!0});var d=l.filter(function(v){return c[v.id]}),p=function(v,y){return{currentPos:y,rowNode:v}},g=u.map(p).sort(function(v,y){return s.rowNodeSorter.compareRowNodes(r,v,y)});return this.mergeSortedArrays(r,g,d.map(p)).map(function(v){var y=v.rowNode;return y})},n.prototype.mergeSortedArrays=function(e,t,i){for(var r=[],s=0,a=0;s=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Jie=function(o){Zie(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.filter=function(e){var t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)},n.prototype.filterNodes=function(e,t){var i=this,r=function(c,u){c.hasChildren()&&e&&!u?c.childrenAfterFilter=c.childrenAfterGroup.filter(function(d){var p=d.childrenAfterFilter&&d.childrenAfterFilter.length>0,g=d.data&&i.filterManager.doesRowPassFilter({rowNode:d});return p||g}):c.childrenAfterFilter=c.childrenAfterGroup,c.sibling&&(c.sibling.childrenAfterFilter=c.childrenAfterFilter)};if(this.doingTreeDataFiltering()){var s=function(c,u){if(c.childrenAfterGroup)for(var d=0;d=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},tre=function(o,n){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var t=e.call(o),i,r=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return r},nre=function(o){ere(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.postConstruct=function(){var e=this;this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",function(){return e.onRowDataUpdated()}))},n.prototype.isActive=function(){var e=this.gridOptionsService.exists("getRowId"),t=this.gridOptionsService.get("resetRowDataOnUpdate");return t?!1:e},n.prototype.setRowData=function(e){var t=this.createTransactionForRowData(e);if(t){var i=tre(t,2),r=i[0],s=i[1];this.clientSideRowModel.updateRowData(r,s)}},n.prototype.createTransactionForRowData=function(e){if(mt.missing(this.clientSideRowModel)){console.error("AG Grid: ImmutableService only works with ClientSideRowModel");return}var t=this.gridOptionsService.getCallback("getRowId");if(t==null){console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}var i={remove:[],update:[],add:[]},r=this.clientSideRowModel.getCopyOfNodesMap(),s=this.gridOptionsService.get("suppressMaintainUnsortedOrder"),a=s?void 0:{};return mt.exists(e)&&e.forEach(function(l,c){var u=t({data:l,level:0}),d=r[u];if(a&&(a[u]=c),d){var p=d.data!==l;p&&i.update.push(l),r[u]=void 0}else i.add.push(l)}),mt.iterateObject(r,function(l,c){c&&i.remove.push(c.data)}),[i,a]},n.prototype.onRowDataUpdated=function(){var e=this.gridOptionsService.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))},Pd([b("rowModel")],n.prototype,"rowModel",void 0),Pd([b("rowRenderer")],n.prototype,"rowRenderer",void 0),Pd([b("selectionService")],n.prototype,"selectionService",void 0),Pd([pe],n.prototype,"postConstruct",null),n=Pd([Oe("immutableService")],n),n}(re),ire="31.1.1",rre={version:ire,moduleName:je.ClientSideRowModelModule,rowModel:"clientSide",beans:[$ie,Wie,Kie,Yie,Xie,Jie,nre]},ore=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),R_=function(o,n,e,t){var i=arguments.length,r=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,n,e,t);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},SD=function(o){ore(n,o);function n(e,t,i){var r=o.call(this,e)||this;return r.parentCache=t,r.params=i,r.startRow=e*i.blockSize,r.endRow=r.startRow+i.blockSize,r}return n.prototype.postConstruct=function(){this.createRowNodes()},n.prototype.getBlockStateJson=function(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}},n.prototype.setDataAndId=function(e,t,i){mt.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)},n.prototype.loadFromDatasource=function(){var e=this,t=this.createLoadParams();if(mt.missing(this.params.datasource.getRows)){console.warn("AG Grid: datasource is missing getRows method");return}window.setTimeout(function(){e.params.datasource.getRows(t)},0)},n.prototype.processServerFail=function(){},n.prototype.createLoadParams=function(){var e={startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gridOptionsService.getGridCommonParams().context};return e},n.prototype.forEachNode=function(e,t,i){var r=this;this.rowNodes.forEach(function(s,a){var l=r.startRow+a;l=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,i)},n.prototype.destroyRowNodes=function(){this.rowNodes.forEach(function(e){e.clearRowTopAndRowIndex()})},R_([b("beans")],n.prototype,"beans",void 0),R_([pe],n.prototype,"postConstruct",null),R_([Li],n.prototype,"destroyRowNodes",null),n}(X_),sre=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),Jf=function(o,n,e,t){var i=arguments.length,r=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,n,e,t);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},are=function(o,n){return function(e,t){n(e,t,o)}},lre=function(o){sre(n,o);function n(e){var t=o.call(this)||this;return t.lastRowIndexKnown=!1,t.blocks={},t.blockCount=0,t.rowCount=e.initialRowCount,t.params=e,t}return n.prototype.setBeans=function(e){this.logger=e.create("InfiniteCache")},n.prototype.getRow=function(e,t){t===void 0&&(t=!1);var i=Math.floor(e/this.params.blockSize),r=this.blocks[i];if(!r){if(t)return;r=this.createBlock(i)}return r.getRow(e)},n.prototype.createBlock=function(e){var t=this.createBean(new SD(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t},n.prototype.refreshCache=function(){var e=this.blockCount==0;if(e){this.purgeCache();return}this.getBlocksInOrder().forEach(function(t){return t.setStateWaitingToLoad()}),this.params.rowNodeBlockLoader.checkBlockToLoad()},n.prototype.destroyAllBlocks=function(){var e=this;this.getBlocksInOrder().forEach(function(t){return e.destroyBlock(t)})},n.prototype.getRowCount=function(){return this.rowCount},n.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown},n.prototype.pageLoaded=function(e,t){this.isAlive()&&(this.logger.log("onPageLoaded: page = ".concat(e.getId(),", lastRow = ").concat(t)),this.checkRowCount(e,t),this.onCacheUpdated())},n.prototype.purgeBlocksIfNeeded=function(e){var t=this,i=this.getBlocksInOrder().filter(function(c){return c!=e}),r=function(c,u){return u.getLastAccessed()-c.getLastAccessed()};i.sort(r);var s=this.params.maxBlocksInCache>0,a=s?this.params.maxBlocksInCache-1:null,l=n.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach(function(c,u){var d=c.getState()===SD.STATE_WAITING_TO_LOAD&&u>=l,p=s?u>=a:!1;if(d||p){if(t.isBlockCurrentlyDisplayed(c)||t.isBlockFocused(c))return;t.removeBlockFromCache(c)}})},n.prototype.isBlockFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;var i=e.getStartRow(),r=e.getEndRow(),s=t.rowIndex>=i&&t.rowIndex=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var i=(e.getId()+1)*this.params.blockSize,r=i+this.params.overflowSize;this.rowCount=e.rowCount&&t.push(i)}),t.length>0&&t.forEach(function(i){return e.destroyBlock(i)})},n.prototype.purgeCache=function(){var e=this;this.getBlocksInOrder().forEach(function(t){return e.removeBlockFromCache(t)}),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()},n.prototype.getRowNodesInRange=function(e,t){var i=this,r=[],s=-1,a=!1,l=new Wc;mt.missing(e)&&(a=!0);var c=!1;this.getBlocksInOrder().forEach(function(d){if(!c){if(a&&s+1!==d.getId()){c=!0;return}s=d.getId(),d.forEachNode(function(p){var g=p===e||p===t;(a||g)&&r.push(p),g&&(a=!a)},l,i.rowCount)}});var u=c||a;return u?[]:r},n.MAX_EMPTY_BLOCKS_TO_KEEP=2,Jf([b("rowRenderer")],n.prototype,"rowRenderer",void 0),Jf([b("focusService")],n.prototype,"focusService",void 0),Jf([are(0,Ur("loggerFactory"))],n.prototype,"setBeans",null),Jf([Li],n.prototype,"destroyAllBlocks",null),n}(re),cre=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),sa=function(o,n,e,t){var i=arguments.length,r=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,n,e,t);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},ure=function(o){cre(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},n.prototype.ensureRowHeightsValid=function(e,t,i,r){return!1},n.prototype.init=function(){var e=this;this.gridOptionsService.isRowModelType("infinite")&&(this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(function(){return e.destroyCache()}),this.verifyProps())},n.prototype.verifyProps=function(){this.gridOptionsService.exists("initialGroupOrderComparator")&&mt.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")},n.prototype.start=function(){this.setDatasource(this.gridOptionsService.get("datasource"))},n.prototype.destroyDatasource=function(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)},n.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,T.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,T.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,T.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,T.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",function(){return e.setDatasource(e.gridOptionsService.get("datasource"))}),this.addManagedPropertyListener("cacheBlockSize",function(){return e.resetCache()}),this.addManagedPropertyListener("rowHeight",function(){e.rowHeight=e.gridOptionsService.getRowHeightAsNumber(),e.cacheParams.rowHeight=e.rowHeight,e.updateRowHeights()})},n.prototype.onFilterChanged=function(){this.reset()},n.prototype.onSortChanged=function(){this.reset()},n.prototype.onColumnEverything=function(){var e;this.cacheParams?e=this.isSortModelDifferent():e=!0,e&&this.reset()},n.prototype.isSortModelDifferent=function(){return!mt.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())},n.prototype.getType=function(){return"infinite"},n.prototype.setDatasource=function(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()},n.prototype.isEmpty=function(){return!this.infiniteCache},n.prototype.isRowsToRender=function(){return!!this.infiniteCache},n.prototype.getNodesInRangeForSelection=function(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]},n.prototype.reset=function(){if(this.datasource){var e=this.gridOptionsService.getCallback("getRowId"),t=e!=null;t||this.selectionService.reset("rowDataChanged"),this.resetCache()}},n.prototype.createModelUpdatedEvent=function(){return{type:T.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}},n.prototype.resetCache=function(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gridOptionsService.get("infiniteInitialRowCount"),maxBlocksInCache:this.gridOptionsService.get("maxBlocksInCache"),rowHeight:this.gridOptionsService.getRowHeightAsNumber(),overflowSize:this.gridOptionsService.get("cacheOverflowSize"),blockSize:this.gridOptionsService.get("cacheBlockSize"),lastAccessedSequence:new Wc},this.infiniteCache=this.createBean(new lre(this.cacheParams)),this.eventService.dispatchEventOnce({type:T.EVENT_ROW_COUNT_READY});var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},n.prototype.updateRowHeights=function(){var e=this;this.forEachNode(function(i){i.setRowHeight(e.rowHeight),i.setRowTop(e.rowHeight*i.rowIndex)});var t=this.createModelUpdatedEvent();this.eventService.dispatchEvent(t)},n.prototype.destroyCache=function(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))},n.prototype.onCacheUpdated=function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},n.prototype.getRow=function(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)},n.prototype.getRowNode=function(e){var t;return this.forEachNode(function(i){i.id===e&&(t=i)}),t},n.prototype.forEachNode=function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)},n.prototype.getTopLevelRowCount=function(){return this.getRowCount()},n.prototype.getTopLevelRowDisplayedIndex=function(e){return e},n.prototype.getRowIndexAtPixel=function(e){if(this.rowHeight!==0){var t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0},n.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getRowCount():0},n.prototype.isRowPresent=function(e){var t=this.getRowNode(e.id);return!!t},n.prototype.refreshCache=function(){this.infiniteCache&&this.infiniteCache.refreshCache()},n.prototype.purgeCache=function(){this.infiniteCache&&this.infiniteCache.purgeCache()},n.prototype.isLastRowIndexKnown=function(){return this.infiniteCache?this.infiniteCache.isLastRowIndexKnown():!1},n.prototype.setRowCount=function(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)},sa([b("filterManager")],n.prototype,"filterManager",void 0),sa([b("sortController")],n.prototype,"sortController",void 0),sa([b("selectionService")],n.prototype,"selectionService",void 0),sa([b("rowRenderer")],n.prototype,"rowRenderer",void 0),sa([b("rowNodeBlockLoader")],n.prototype,"rowNodeBlockLoader",void 0),sa([pe],n.prototype,"init",null),sa([Li],n.prototype,"destroyDatasource",null),n=sa([Oe("rowModel")],n),n}(re),dre="31.1.1",pre={version:dre,moduleName:je.InfiniteRowModelModule,rowModel:"infinite",beans:[ure]},hre=function(){function o(){}return o.prototype.setBeans=function(n){this.beans=n},o.prototype.getFileName=function(n){var e=this.getDefaultFileExtension();return(n==null||!n.length)&&(n=this.getDefaultFileName()),n.indexOf(".")===-1?"".concat(n,".").concat(e):n},o.prototype.getData=function(n){var e=this.createSerializingSession(n);return this.beans.gridSerializer.serialize(e,n)},o.prototype.getDefaultFileName=function(){return"export.".concat(this.getDefaultFileExtension())},o}(),fre=function(){function o(n){this.groupColumns=[];var e=n.columnModel,t=n.valueService,i=n.gridOptionsService,r=n.valueFormatterService,s=n.valueParserService,a=n.processCellCallback,l=n.processHeaderCallback,c=n.processGroupHeaderCallback,u=n.processRowGroupCallback;this.columnModel=e,this.valueService=t,this.gridOptionsService=i,this.valueFormatterService=r,this.valueParserService=s,this.processCellCallback=a,this.processHeaderCallback=l,this.processGroupHeaderCallback=c,this.processRowGroupCallback=u}return o.prototype.prepare=function(n){this.groupColumns=n.filter(function(e){return!!e.getColDef().showRowGroup})},o.prototype.extractHeaderValue=function(n){var e=this.getHeaderName(this.processHeaderCallback,n);return e??""},o.prototype.extractRowCellValue=function(n,e,t,i,r){var s=this.gridOptionsService.get("groupHideOpenParents"),a=(!s||r.footer)&&this.shouldRenderGroupSummaryCell(r,n,e)?this.createValueForGroupNode(n,r):this.valueService.getValue(n,r),l=this.processCell({accumulatedRowIndex:t,rowNode:r,column:n,value:a,processCellCallback:this.processCellCallback,type:i});return l},o.prototype.shouldRenderGroupSummaryCell=function(n,e,t){var i,r=n&&n.group;if(!r)return!1;var s=this.groupColumns.indexOf(e);if(s!==-1){if(((i=n.groupData)===null||i===void 0?void 0:i[e.getId()])!=null||this.gridOptionsService.isRowModelType("serverSide")&&n.group)return!0;if(n.footer&&n.level===-1){var a=e.getColDef(),l=a==null||a.showRowGroup===!0;return l||a.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}var c=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());return t===0&&c},o.prototype.getHeaderName=function(n,e){return n?n(this.gridOptionsService.addGridCommonParams({column:e})):this.columnModel.getDisplayNameForColumn(e,"csv",!0)},o.prototype.createValueForGroupNode=function(n,e){var t=this;if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gridOptionsService.addGridCommonParams({column:n,node:e}));var i=this.gridOptionsService.get("treeData"),r=this.gridOptionsService.get("suppressGroupMaintainValueType"),s=function(u){var d,p;if(i||r)return u.key;var g=(d=u.groupData)===null||d===void 0?void 0:d[n.getId()];return!g||!u.rowGroupColumn||u.rowGroupColumn.getColDef().useValueFormatterForExport===!1?g:(p=t.valueFormatterService.formatValue(u.rowGroupColumn,u,g))!==null&&p!==void 0?p:g},a=e.footer,l=[s(e)];if(!this.gridOptionsService.isGroupMultiAutoColumn())for(;e.parent;)e=e.parent,l.push(s(e));var c=l.reverse().join(" -> ");return a?"Total ".concat(c):c},o.prototype.processCell=function(n){var e=this,t,i=n.accumulatedRowIndex,r=n.rowNode,s=n.column,a=n.value,l=n.processCellCallback,c=n.type;return l?{value:(t=l(this.gridOptionsService.addGridCommonParams({accumulatedRowIndex:i,column:s,node:r,value:a,type:c,parseValue:function(u){return e.valueParserService.parseValue(s,r,u,e.valueService.getValue(s,r))},formatValue:function(u){var d;return(d=e.valueFormatterService.formatValue(s,r,u))!==null&&d!==void 0?d:u}})))!==null&&t!==void 0?t:""}:s.getColDef().useValueFormatterForExport!==!1?{value:a??"",valueFormatted:this.valueFormatterService.formatValue(s,r,a)}:{value:a??""}},o}(),gre=function(){function o(){}return o.download=function(n,e){var t=document.defaultView||window;if(!t){console.warn("AG Grid: There is no `window` associated with the current `document`");return}var i=document.createElement("a"),r=t.URL.createObjectURL(e);i.setAttribute("href",r),i.setAttribute("download",n),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:t})),document.body.removeChild(i),t.setTimeout(function(){t.URL.revokeObjectURL(r)},0)},o}(),mre=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),wD=`\r `,vre=function(o){mre(n,o);function n(e){var t=o.call(this,e)||this;t.isFirstLine=!0,t.result="";var i=e.suppressQuotes,r=e.columnSeparator;return t.suppressQuotes=i,t.columnSeparator=r,t}return n.prototype.addCustomContent=function(e){var t=this;e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,wD),this.result+=e):e.forEach(function(i){t.beginNewLine(),i.forEach(function(r,s){s!==0&&(t.result+=t.columnSeparator),t.result+=t.putInQuotes(r.data.value||""),r.mergeAcross&&t.appendEmptyCells(r.mergeAcross)})}))},n.prototype.onNewHeaderGroupingRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},n.prototype.onNewHeaderGroupingRowColumn=function(e,t,i,r){i!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)},n.prototype.appendEmptyCells=function(e){for(var t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")},n.prototype.onNewHeaderRow=function(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}},n.prototype.onNewHeaderRowColumn=function(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))},n.prototype.onNewBodyRow=function(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}},n.prototype.onNewBodyRowColumn=function(e,t,i){var r;t!=0&&(this.result+=this.columnSeparator);var s=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes((r=s.valueFormatted)!==null&&r!==void 0?r:s.value)},n.prototype.putInQuotes=function(e){if(this.suppressQuotes)return e;if(e==null)return'""';var t;typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t="");var i=t.replace(/"/g,'""');return'"'+i+'"'},n.prototype.parse=function(){return this.result},n.prototype.beginNewLine=function(){this.isFirstLine||(this.result+=wD),this.isFirstLine=!1},n}(fre),yre=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),aa=function(o,n,e,t){var i=arguments.length,r=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,n,e,t);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r},Cre=function(o){yre(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})},n.prototype.getMergedParams=function(e){var t=this.gridOptionsService.get("defaultCsvExportParams");return Object.assign({},t,e)},n.prototype.export=function(e){if(this.isExportSuppressed()){console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");return}var t=this.getMergedParams(e),i=this.getData(t),r=new Blob(["\uFEFF",i],{type:"text/plain"}),s=typeof t.fileName=="function"?t.fileName(this.gridOptionsService.getGridCommonParams()):t.fileName;gre.download(this.getFileName(s),r)},n.prototype.exportDataAsCsv=function(e){this.export(e)},n.prototype.getDataAsCsv=function(e,t){t===void 0&&(t=!1);var i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)},n.prototype.getDefaultFileExtension=function(){return"csv"},n.prototype.createSerializingSession=function(e){var t=this,i=t.columnModel,r=t.valueService,s=t.gridOptionsService,a=t.valueFormatterService,l=t.valueParserService,c=e,u=c.processCellCallback,d=c.processHeaderCallback,p=c.processGroupHeaderCallback,g=c.processRowGroupCallback,v=c.suppressQuotes,y=c.columnSeparator;return new vre({columnModel:i,valueService:r,gridOptionsService:s,valueFormatterService:a,valueParserService:l,processCellCallback:u||void 0,processHeaderCallback:d||void 0,processGroupHeaderCallback:p||void 0,processRowGroupCallback:g||void 0,suppressQuotes:v||!1,columnSeparator:y||","})},n.prototype.isExportSuppressed=function(){return this.gridOptionsService.get("suppressCsvExport")},aa([b("columnModel")],n.prototype,"columnModel",void 0),aa([b("valueService")],n.prototype,"valueService",void 0),aa([b("gridSerializer")],n.prototype,"gridSerializer",void 0),aa([b("gridOptionsService")],n.prototype,"gridOptionsService",void 0),aa([b("valueFormatterService")],n.prototype,"valueFormatterService",void 0),aa([b("valueParserService")],n.prototype,"valueParserService",void 0),aa([pe],n.prototype,"postConstruct",null),n=aa([Oe("csvCreator")],n),n}(hre),_re=function(){var o=function(n,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])},o(n,e)};return function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");o(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),la=function(o,n,e,t){var i=arguments.length,r=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,n,e,t);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(i<3?s(r):i>3?s(n,e,r):s(n,e))||r);return i>3&&r&&Object.defineProperty(n,e,r),r};var Sre=function(o){_re(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.serialize=function(e,t){t===void 0&&(t={});var i=t.allColumns,r=t.columnKeys,s=t.skipRowGroups,a=this.getColumnsToExport(i,s,r),l=mt.compose(this.prepareSession(a),this.prependContent(t),this.exportColumnGroups(t,a),this.exportHeaders(t,a),this.processPinnedTopRows(t,a),this.processRows(t,a),this.processPinnedBottomRows(t,a),this.appendContent(t));return l(e).parse()},n.prototype.processRow=function(e,t,i,r){var s=t.shouldRowBeSkipped||function(){return!1},a=this.gridOptionsService.get("groupRemoveSingleChildren"),l=this.gridOptionsService.get("groupRemoveLowestSingleChildren"),c=t.rowPositions!=null,u=c||!!t.onlySelected,d=this.gridOptionsService.get("groupHideOpenParents")&&!u,p=this.columnModel.isPivotMode()?r.leafGroup:!r.group,g=!!r.footer;t.skipRowGroups;var v=l&&r.leafGroup,y=r.allChildrenCount===1&&(a||v);if(!(!p&&!g&&(t.skipRowGroups||y||d)||t.onlySelected&&!r.isSelected()||t.skipPinnedTop&&r.rowPinned==="top"||t.skipPinnedBottom&&r.rowPinned==="bottom")){var x=r.level===-1;if(!(x&&!p&&!g)){var E=s(this.gridOptionsService.addGridCommonParams({node:r}));if(!E){var z=e.onNewBodyRow(r);if(i.forEach(function(G,U){z.onColumn(G,U,r)}),t.getCustomContentBelowRow){var M=t.getCustomContentBelowRow(this.gridOptionsService.addGridCommonParams({node:r}));M&&e.addCustomContent(M)}}}}},n.prototype.appendContent=function(e){return function(t){var i=e.appendContent;return i&&t.addCustomContent(i),t}},n.prototype.prependContent=function(e){return function(t){var i=e.prependContent;return i&&t.addCustomContent(i),t}},n.prototype.prepareSession=function(e){return function(t){return t.prepare(e),t}},n.prototype.exportColumnGroups=function(e,t){var i=this;return function(r){if(!e.skipColumnGroupHeaders){var s=new GD,a=i.displayedGroupCreator.createDisplayedGroups(t,s,null);i.recursivelyAddHeaderGroups(a,r,e.processGroupHeaderCallback)}return r}},n.prototype.exportHeaders=function(e,t){return function(i){if(!e.skipColumnHeaders){var r=i.onNewHeaderRow();t.forEach(function(s,a){r.onColumn(s,a,void 0)})}return i}},n.prototype.processPinnedTopRows=function(e,t){var i=this;return function(r){var s=i.processRow.bind(i,r,e,t);return e.rowPositions?e.rowPositions.filter(function(a){return a.rowPinned==="top"}).sort(function(a,l){return a.rowIndex-l.rowIndex}).map(function(a){return i.pinnedRowModel.getPinnedTopRow(a.rowIndex)}).forEach(s):i.pinnedRowModel.forEachPinnedTopRow(s),r}},n.prototype.processRows=function(e,t){var i=this;return function(r){var s=i.rowModel,a=s.getType(),l=a==="clientSide",c=a==="serverSide",u=!l&&e.onlySelected,d=i.processRow.bind(i,r,e,t),p=e.exportedRows,g=p===void 0?"filteredAndSorted":p;if(e.rowPositions)e.rowPositions.filter(function(y){return y.rowPinned==null}).sort(function(y,x){return y.rowIndex-x.rowIndex}).map(function(y){return s.getRow(y.rowIndex)}).forEach(d);else if(i.columnModel.isPivotMode())l?s.forEachPivotNode(d,!0):c?s.forEachNodeAfterFilterAndSort(d,!0):s.forEachNode(d);else if(e.onlySelectedAllPages||u){var v=i.selectionService.getSelectedNodes();i.replicateSortedOrder(v),v.forEach(d)}else g==="all"?s.forEachNode(d):l||c?s.forEachNodeAfterFilterAndSort(d,!0):s.forEachNode(d);return r}},n.prototype.replicateSortedOrder=function(e){var t=this,i=this.sortController.getSortOptions(),r=function(s,a){var l,c,u,d;return s.rowIndex!=null&&a.rowIndex!=null?s.rowIndex-a.rowIndex:s.level===a.level?((l=s.parent)===null||l===void 0?void 0:l.id)===((c=a.parent)===null||c===void 0?void 0:c.id)?t.rowNodeSorter.compareRowNodes(i,{rowNode:s,currentPos:(u=s.rowIndex)!==null&&u!==void 0?u:-1},{rowNode:a,currentPos:(d=a.rowIndex)!==null&&d!==void 0?d:-1}):r(s.parent,a.parent):s.level>a.level?r(s.parent,a):r(s,a.parent)};e.sort(r)},n.prototype.processPinnedBottomRows=function(e,t){var i=this;return function(r){var s=i.processRow.bind(i,r,e,t);return e.rowPositions?e.rowPositions.filter(function(a){return a.rowPinned==="bottom"}).sort(function(a,l){return a.rowIndex-l.rowIndex}).map(function(a){return i.pinnedRowModel.getPinnedBottomRow(a.rowIndex)}).forEach(s):i.pinnedRowModel.forEachPinnedBottomRow(s),r}},n.prototype.getColumnsToExport=function(e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);var s=this.gridOptionsService.get("treeData"),a=[];return e&&!r?a=this.columnModel.getAllGridColumns():a=this.columnModel.getAllDisplayedColumns(),t&&!s&&(a=a.filter(function(l){return l.getColId()!==Bc})),a},n.prototype.recursivelyAddHeaderGroups=function(e,t,i){var r=[];e.forEach(function(s){var a=s;a.getChildren&&a.getChildren().forEach(function(l){return r.push(l)})}),e.length>0&&e[0]instanceof qn&&this.doAddHeaderHeader(t,e,i),r&&r.length>0&&this.recursivelyAddHeaderGroups(r,t,i)},n.prototype.doAddHeaderHeader=function(e,t,i){var r=this,s=e.onNewHeaderGroupingRow(),a=0;t.forEach(function(l){var c=l,u;i?u=i(r.gridOptionsService.addGridCommonParams({columnGroup:c})):u=r.columnModel.getDisplayNameForColumnGroup(c,"header");var d=c.getLeafColumns().reduce(function(p,g,v,y){var x=mt.last(p),E=g.getColumnGroupShow()==="open";return E?(!x||x[1]!=null)&&(x=[v],p.push(x)):x&&x[1]==null&&(x[1]=v-1),v===y.length-1&&x&&x[1]==null&&(x[1]=v),p},[]);s.onColumn(c,u||"",a++,c.getLeafColumns().length-1,d)})},la([b("displayedGroupCreator")],n.prototype,"displayedGroupCreator",void 0),la([b("columnModel")],n.prototype,"columnModel",void 0),la([b("rowModel")],n.prototype,"rowModel",void 0),la([b("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0),la([b("selectionService")],n.prototype,"selectionService",void 0),la([b("rowNodeSorter")],n.prototype,"rowNodeSorter",void 0),la([b("sortController")],n.prototype,"sortController",void 0),n=la([Oe("gridSerializer")],n),n}(re),wre="31.1.1",bre={version:wre,moduleName:je.CsvExportModule,beans:[Cre,Sre]},eg=`\r -`,Iwe=function(){function o(){}return o.createHeader=function(n){n===void 0&&(n={});var e="",i=["version"];n.version||(n.version="1.0"),n.encoding&&i.push("encoding"),n.standalone&&i.push("standalone");var r=i.map(function(s){return"".concat(s,'="').concat(n[s],'"')}).join(" ");return"".concat(e,"xml ").concat(r," ").concat(t)},o.createXml=function(n,e){var t=this,i="";n.properties&&(n.properties.prefixedAttributes&&n.properties.prefixedAttributes.forEach(function(s){Object.keys(s.map).forEach(function(a){i+=t.returnAttributeIfPopulated(s.prefix+a,s.map[a],e)})}),n.properties.rawMap&&Object.keys(n.properties.rawMap).forEach(function(s){i+=t.returnAttributeIfPopulated(s,n.properties.rawMap[s],e)}));var r="<"+n.name+i;return!n.children&&n.textNode==null?r+"/>"+eg:n.textNode!=null?r+">"+n.textNode+""+eg:(r+=">"+eg,n.children&&n.children.forEach(function(s){r+=t.createXml(s,e)}),r+""+eg)},o.returnAttributeIfPopulated=function(n,e,t){if(!e&&e!==""&&e!==0)return"";var i=e;return typeof e=="boolean"&&t&&(i=t(e))," ".concat(n,'="').concat(i,'"')},o}(),Tre=function(o){var n=o.getHours();return n<<=6,n=n|o.getMinutes(),n<<=5,n=n|o.getSeconds()/2,n},Ere=function(o){var n=o.getFullYear()-1980;return n<<=4,n=n|o.getMonth()+1,n<<=5,n=n|o.getDate(),n};function Ti(o,n){for(var e="",t=0;t>>=8;return e}var bD=function(o){if(!o.length)return 0;for(var n=-1,e=0,t=0,i=0,r=0;r>>8^i;return n^-1},TD=function(o){return o.length?bD(typeof o=="string"?new TextEncoder().encode(o):o):0},xre=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),aI=function(o,n,e,t){function i(r){return r instanceof e?r:new e(function(s){s(r)})}return new(e||(e=Promise))(function(r,s){function a(u){try{c(t.next(u))}catch(d){s(d)}}function l(u){try{c(t.throw(u))}catch(d){s(d)}}function c(u){u.done?r(u.value):i(u.value).then(a,l)}c((t=t.apply(o,n||[])).next())})},lI=function(o,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(t)throw new TypeError("Generator is already executing.");for(;e;)try{if(t=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]0,c?[4,Ore(r)]:[3,2];case 1:u=p.sent(),s=u.content,a=u.size,l=!0,p.label=2;case 2:return d=cI(o,l,n,i,r,a),[2,Uc(Uc({},d),{content:s||r,isCompressed:l})]}})})},Mre=function(o,n){var e=o.content,t=(e?uI(e):{content:Uint8Array.from([])}).content,i=cI(o,!1,n,t.length,t,void 0);return Uc(Uc({},i),{content:t,isCompressed:!1})},cI=function(o,n,e,t,i,r){var s=o.content,a=o.path,l=o.created,c=Tre(l),u=Ere(l),d=TD(i),p=r!==void 0?r:t,g=Ire(a),v=g!==a,y="";if(v){var x=Ti(1,1)+Ti(TD(g),4)+g;y="up"+Ti(x.length,2)+x}var E="\0"+(v?"\0\b":"\0\0")+Ti(n?8:0,2)+Ti(c,2)+Ti(u,2)+Ti(p?d:0,4)+Ti(r??t,4)+Ti(t,4)+Ti(g.length,2)+Ti(y.length,2),z="PK"+E+g+y,M="PK\0"+E+"\0\0\0\0\0\0"+(s?"\0\0\0\0":"\0\0\0")+Ti(e,4)+g+y;return{localFileHeader:Uint8Array.from(z,function(G){return G.charCodeAt(0)}),centralDirectoryHeader:Uint8Array.from(M,function(G){return G.charCodeAt(0)})}},Fre=function(o,n,e){var t="PK\0\0\0\0"+Ti(o,2)+Ti(o,2)+Ti(n,4)+Ti(e,4)+"\0\0";return Uint8Array.from(t,function(i){return i.charCodeAt(0)})},Are=function(o){for(var n=new Uint8Array(o.length),e=0;e0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]=o.length&&(o=void 0),{value:o&&o[t++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},tg=function(o,n){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var t=e.call(o),i,r=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return r},ng=function(o,n,e){if(e||arguments.length===2)for(var t=0,i=n.length,r;t{class o extends H0{constructor(e){super("angular"),this._ngZone=e,this.isRunningWithinTestZone=!1,this.wrapIncoming=(t,i)=>this.runOutside(t,i),this.wrapOutgoing=t=>this.runInsideAngular(t),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this._ngZone?this.isRunningWithinTestZone?this.runOutside=(t,i)=>i==="resize-observer"?this._ngZone.runOutsideAngular(t):t():this.runOutside=t=>this._ngZone.runOutsideAngular(t):this.runOutside=t=>t()}get shouldWrapOutgoing(){return this._ngZone&&$e.isInAngularZone()}isFrameworkComponent(e){if(!e)return!1;let t=e.prototype;return t&&"agInit"in t}runInsideAngular(e){return this._ngZone?this._ngZone.run(e):e()}runOutsideAngular(e,t){return this.runOutside(e,t)}}return o.\u0275fac=function(e){return new(e||o)(nt($e))},o.\u0275prov=qe({token:o,factory:o.\u0275fac}),o})(),pI=(()=>{class o extends sI{setViewContainerRef(e,t){this.viewContainerRef=e,this.angularFrameworkOverrides=t}createWrapper(e,t){let i=this.angularFrameworkOverrides,r=this;class s extends $0{init(c){i.runInsideAngular(()=>{super.init(c),this._componentRef.changeDetectorRef.detectChanges()})}createComponent(){return i.runInsideAngular(()=>r.createComponent(e))}hasMethod(c){return a.getFrameworkComponentInstance()[c]!=null}callMethod(c,u){let d=this.getFrameworkComponentInstance();return i.runInsideAngular(()=>a.getFrameworkComponentInstance()[c].apply(d,u))}addMethod(c,u){a[c]=u}}let a=new s;return a}createComponent(e){return this.viewContainerRef.createComponent(e)}}return o.\u0275fac=(()=>{let n;return function(t){return(n||(n=Ut(o)))(t||o)}})(),o.\u0275prov=qe({token:o,factory:o.\u0275fac}),o})(),$0=class{init(n){this._params=n,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,this._agAwareComponent.agInit(this._params)}getGui(){return this._eGui}getRootElement(){return this._eGui.firstChild}destroy(){this._frameworkComponentInstance&&typeof this._frameworkComponentInstance.destroy=="function"&&this._frameworkComponentInstance.destroy(),this._componentRef&&this._componentRef.destroy()}getFrameworkComponentInstance(){return this._frameworkComponentInstance}},Lre=(()=>{class o{constructor(e,t,i,r){this.viewContainerRef=t,this.angularFrameworkOverrides=i,this.frameworkComponentWrapper=r,this._initialised=!1,this._destroyed=!1,this._fullyReady=Ni.resolve(!0),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterMovesDown=void 0,this.enterMovesDownAfterEdit=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.excludeHiddenColumnsFromQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.advancedFilterModel=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.enableChartToolPanelsButton=void 0,this.suppressChartToolPanelsButton=void 0,this.chartToolPanelsDef=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressParentsInRowNodes=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressAsyncEvents=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.suppressAggAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.enableCellChangeFlash=void 0,this.cellFlashDuration=void 0,this.cellFlashDelay=void 0,this.cellFadeDuration=void 0,this.cellFadeDelay=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.suppressGroupMaintainValueType=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupIncludeFooter=void 0,this.groupIncludeTotalFooter=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.treeData=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideInfiniteScroll=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSideFilterAllLevels=void 0,this.serverSideSortOnServer=void 0,this.serverSideFilterOnServer=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.functionsPassive=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg=void 0,this.isGroupOpenByDefault=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.toolPanelVisibleChanged=new O,this.toolPanelSizeChanged=new O,this.columnMenuVisibleChanged=new O,this.cutStart=new O,this.cutEnd=new O,this.pasteStart=new O,this.pasteEnd=new O,this.columnVisible=new O,this.columnPinned=new O,this.columnResized=new O,this.columnMoved=new O,this.columnValueChanged=new O,this.columnPivotModeChanged=new O,this.columnPivotChanged=new O,this.columnGroupOpened=new O,this.newColumnsLoaded=new O,this.gridColumnsChanged=new O,this.displayedColumnsChanged=new O,this.virtualColumnsChanged=new O,this.columnEverythingChanged=new O,this.columnHeaderMouseOver=new O,this.columnHeaderMouseLeave=new O,this.columnHeaderClicked=new O,this.columnHeaderContextMenu=new O,this.componentStateChanged=new O,this.cellValueChanged=new O,this.cellEditRequest=new O,this.rowValueChanged=new O,this.cellEditingStarted=new O,this.cellEditingStopped=new O,this.rowEditingStarted=new O,this.rowEditingStopped=new O,this.undoStarted=new O,this.undoEnded=new O,this.redoStarted=new O,this.redoEnded=new O,this.rangeDeleteStart=new O,this.rangeDeleteEnd=new O,this.filterOpened=new O,this.filterChanged=new O,this.filterModified=new O,this.advancedFilterBuilderVisibleChanged=new O,this.chartCreated=new O,this.chartRangeSelectionChanged=new O,this.chartOptionsChanged=new O,this.chartDestroyed=new O,this.cellKeyDown=new O,this.gridReady=new O,this.gridPreDestroyed=new O,this.firstDataRendered=new O,this.gridSizeChanged=new O,this.modelUpdated=new O,this.virtualRowRemoved=new O,this.viewportChanged=new O,this.bodyScroll=new O,this.bodyScrollEnd=new O,this.dragStarted=new O,this.dragStopped=new O,this.stateUpdated=new O,this.paginationChanged=new O,this.rowDragEnter=new O,this.rowDragMove=new O,this.rowDragLeave=new O,this.rowDragEnd=new O,this.columnRowGroupChanged=new O,this.rowGroupOpened=new O,this.expandOrCollapseAll=new O,this.pinnedRowDataChanged=new O,this.rowDataUpdated=new O,this.asyncTransactionsFlushed=new O,this.storeRefreshed=new O,this.cellClicked=new O,this.cellDoubleClicked=new O,this.cellFocused=new O,this.cellMouseOver=new O,this.cellMouseOut=new O,this.cellMouseDown=new O,this.rowClicked=new O,this.rowDoubleClicked=new O,this.rowSelected=new O,this.selectionChanged=new O,this.cellContextMenu=new O,this.rangeSelectionChanged=new O,this.tooltipShow=new O,this.tooltipHide=new O,this.sortChanged=new O,this.columnRowGroupChangeRequest=new O,this.columnPivotChangeRequest=new O,this.columnValueChangeRequest=new O,this.columnAggFuncChangeRequest=new O,this._nativeElement=e.nativeElement}ngAfterViewInit(){this.angularFrameworkOverrides.runOutsideAngular(()=>{this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef,this.angularFrameworkOverrides);let e=Yd.combineAttributesAndGridOptions(this.gridOptions,this);this.gridParams={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:this.angularFrameworkOverrides,providedBeanInstances:{frameworkComponentWrapper:this.frameworkComponentWrapper},modules:this.modules||[]};let t=rI(this._nativeElement,e,this.gridParams);t&&(this.api=t,this.columnApi=new ep(t));let i=this.gridPreDestroyed;(i.observed??i.observers.length>0)&&console.warn('AG Grid: gridPreDestroyed event listener registered via (gridPreDestroyed)="method($event)" will be ignored! Please assign via gridOptions.gridPreDestroyed and pass to the grid as [gridOptions]="gridOptions"'),this._initialised=!0,this._fullyReady.resolveNow(null,r=>r)})}ngOnChanges(e){this._initialised&&this.angularFrameworkOverrides.runOutsideAngular(()=>{let t={};Object.entries(e).forEach(([i,r])=>{t[i]=r.currentValue}),Yd.processOnChange(t,this.api)})}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy())}isEmitterUsed(e){let i=this[e],r=i?.observed??i?.observers?.length>0,s=`on${e.charAt(0).toUpperCase()}${e.substring(1)}`,a=!!this.gridOptions&&!!this.gridOptions[s];return r||a}globalEventListener(e,t){if(this._destroyed)return;let i=this[e];if(i&&this.isEmitterUsed(e)){let r=()=>this.angularFrameworkOverrides.runInsideAngular(()=>i.emit(t));e==="gridReady"?this._fullyReady.then(()=>r()):r()}}}return o.\u0275fac=function(e){return new(e||o)(w(de),w(Tn),w(dI),w(pI))},o.\u0275cmp=j({type:o,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:"suppressContextMenu",preventDefaultOnContextMenu:"preventDefaultOnContextMenu",allowContextMenuWithControlKey:"allowContextMenuWithControlKey",columnMenu:"columnMenu",suppressMenuHide:"suppressMenuHide",enableBrowserTooltips:"enableBrowserTooltips",tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:"tooltipMouseTrack",tooltipInteraction:"tooltipInteraction",popupParent:"popupParent",copyHeadersToClipboard:"copyHeadersToClipboard",copyGroupHeadersToClipboard:"copyGroupHeadersToClipboard",clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:"suppressCopyRowsToClipboard",suppressCopySingleCellRanges:"suppressCopySingleCellRanges",suppressLastEmptyLineOnPaste:"suppressLastEmptyLineOnPaste",suppressClipboardPaste:"suppressClipboardPaste",suppressClipboardApi:"suppressClipboardApi",suppressCutToClipboard:"suppressCutToClipboard",columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:"maintainColumnOrder",suppressFieldDotNotation:"suppressFieldDotNotation",headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",allowDragFromColumnsToolPanel:"allowDragFromColumnsToolPanel",suppressMovableColumns:"suppressMovableColumns",suppressColumnMoveAnimation:"suppressColumnMoveAnimation",suppressDragLeaveHidesColumns:"suppressDragLeaveHidesColumns",suppressRowGroupHidesColumns:"suppressRowGroupHidesColumns",colResizeDefault:"colResizeDefault",suppressAutoSize:"suppressAutoSize",autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:"skipHeaderOnAutoSize",autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",singleClickEdit:"singleClickEdit",suppressClickEdit:"suppressClickEdit",readOnlyEdit:"readOnlyEdit",stopEditingWhenCellsLoseFocus:"stopEditingWhenCellsLoseFocus",enterMovesDown:"enterMovesDown",enterMovesDownAfterEdit:"enterMovesDownAfterEdit",enterNavigatesVertically:"enterNavigatesVertically",enterNavigatesVerticallyAfterEdit:"enterNavigatesVerticallyAfterEdit",enableCellEditingOnBackspace:"enableCellEditingOnBackspace",undoRedoCellEditing:"undoRedoCellEditing",undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:"suppressCsvExport",defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:"suppressExcelExport",excelStyles:"excelStyles",quickFilterText:"quickFilterText",cacheQuickFilter:"cacheQuickFilter",excludeHiddenColumnsFromQuickFilter:"excludeHiddenColumnsFromQuickFilter",includeHiddenColumnsInQuickFilter:"includeHiddenColumnsInQuickFilter",quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",excludeChildrenWhenTreeDataFiltering:"excludeChildrenWhenTreeDataFiltering",enableAdvancedFilter:"enableAdvancedFilter",advancedFilterModel:"advancedFilterModel",includeHiddenColumnsInAdvancedFilter:"includeHiddenColumnsInAdvancedFilter",advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",enableCharts:"enableCharts",chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",enableChartToolPanelsButton:"enableChartToolPanelsButton",suppressChartToolPanelsButton:"suppressChartToolPanelsButton",chartToolPanelsDef:"chartToolPanelsDef",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:"masterDetail",keepDetailRows:"keepDetailRows",keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:"detailRowAutoHeight",context:"context",alignedGrids:"alignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:"valueCache",valueCacheNeverExpires:"valueCacheNeverExpires",enableCellExpressions:"enableCellExpressions",suppressParentsInRowNodes:"suppressParentsInRowNodes",suppressTouch:"suppressTouch",suppressFocusAfterRefresh:"suppressFocusAfterRefresh",suppressAsyncEvents:"suppressAsyncEvents",suppressBrowserResizeObserver:"suppressBrowserResizeObserver",suppressPropertyNamesCheck:"suppressPropertyNamesCheck",suppressChangeDetection:"suppressChangeDetection",debug:"debug",overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:"suppressLoadingOverlay",overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:"suppressNoRowsOverlay",pagination:"pagination",paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:"paginationAutoPageSize",paginateChildRows:"paginateChildRows",suppressPaginationPanel:"suppressPaginationPanel",pivotMode:"pivotMode",pivotPanelShow:"pivotPanelShow",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:"pivotSuppressAutoColumn",suppressExpandablePivotGroups:"suppressExpandablePivotGroups",functionsReadOnly:"functionsReadOnly",aggFuncs:"aggFuncs",suppressAggFuncInHeader:"suppressAggFuncInHeader",alwaysAggregateAtRootLevel:"alwaysAggregateAtRootLevel",suppressAggAtRootLevel:"suppressAggAtRootLevel",aggregateOnlyChangedColumns:"aggregateOnlyChangedColumns",suppressAggFilteredOnly:"suppressAggFilteredOnly",removePivotHeaderRowWhenSingleValueColumn:"removePivotHeaderRowWhenSingleValueColumn",animateRows:"animateRows",enableCellChangeFlash:"enableCellChangeFlash",cellFlashDuration:"cellFlashDuration",cellFlashDelay:"cellFlashDelay",cellFadeDuration:"cellFadeDuration",cellFadeDelay:"cellFadeDelay",allowShowChangeAfterFilter:"allowShowChangeAfterFilter",domLayout:"domLayout",ensureDomOrder:"ensureDomOrder",enableRtl:"enableRtl",suppressColumnVirtualisation:"suppressColumnVirtualisation",suppressMaxRenderedRowRestriction:"suppressMaxRenderedRowRestriction",suppressRowVirtualisation:"suppressRowVirtualisation",rowDragManaged:"rowDragManaged",suppressRowDrag:"suppressRowDrag",suppressMoveWhenRowDragging:"suppressMoveWhenRowDragging",rowDragEntireRow:"rowDragEntireRow",rowDragMultiRow:"rowDragMultiRow",rowDragText:"rowDragText",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:"embedFullWidthRows",suppressGroupMaintainValueType:"suppressGroupMaintainValueType",groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:"groupMaintainOrder",groupSelectsChildren:"groupSelectsChildren",groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupIncludeFooter:"groupIncludeFooter",groupIncludeTotalFooter:"groupIncludeTotalFooter",groupSuppressBlankHeader:"groupSuppressBlankHeader",groupSelectsFiltered:"groupSelectsFiltered",showOpenedGroup:"showOpenedGroup",groupRemoveSingleChildren:"groupRemoveSingleChildren",groupRemoveLowestSingleChildren:"groupRemoveLowestSingleChildren",groupHideOpenParents:"groupHideOpenParents",groupAllowUnbalanced:"groupAllowUnbalanced",rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",suppressMakeColumnVisibleAfterUnGroup:"suppressMakeColumnVisibleAfterUnGroup",treeData:"treeData",rowGroupPanelSuppressSort:"rowGroupPanelSuppressSort",suppressGroupRowsSticky:"suppressGroupRowsSticky",pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:"suppressModelUpdateAfterUpdateTransaction",datasource:"datasource",cacheOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideInfiniteScroll:"suppressServerSideInfiniteScroll",cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:"purgeClosedRowNodes",serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:"serverSideSortAllLevels",serverSideEnableClientSideSort:"serverSideEnableClientSideSort",serverSideOnlyRefreshFilteredGroups:"serverSideOnlyRefreshFilteredGroups",serverSideFilterAllLevels:"serverSideFilterAllLevels",serverSideSortOnServer:"serverSideSortOnServer",serverSideFilterOnServer:"serverSideFilterOnServer",serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:"alwaysShowHorizontalScroll",alwaysShowVerticalScroll:"alwaysShowVerticalScroll",debounceVerticalScrollbar:"debounceVerticalScrollbar",suppressHorizontalScroll:"suppressHorizontalScroll",suppressScrollOnNewData:"suppressScrollOnNewData",suppressScrollWhenPopupsAreOpen:"suppressScrollWhenPopupsAreOpen",suppressAnimationFrame:"suppressAnimationFrame",suppressMiddleClickScrolls:"suppressMiddleClickScrolls",suppressPreventDefaultOnMouseWheel:"suppressPreventDefaultOnMouseWheel",scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",rowMultiSelectWithClick:"rowMultiSelectWithClick",suppressRowDeselection:"suppressRowDeselection",suppressRowClickSelection:"suppressRowClickSelection",suppressCellFocus:"suppressCellFocus",suppressHeaderFocus:"suppressHeaderFocus",suppressMultiRangeSelection:"suppressMultiRangeSelection",enableCellTextSelection:"enableCellTextSelection",enableRangeSelection:"enableRangeSelection",enableRangeHandle:"enableRangeHandle",enableFillHandle:"enableFillHandle",fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:"suppressClearOnFillReduction",sortingOrder:"sortingOrder",accentedSort:"accentedSort",unSortIcon:"unSortIcon",suppressMultiSort:"suppressMultiSort",alwaysMultiSort:"alwaysMultiSort",multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:"suppressMaintainUnsortedOrder",icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:"suppressRowHoverHighlight",suppressRowTransform:"suppressRowTransform",columnHoverHighlight:"columnHoverHighlight",gridId:"gridId",deltaSort:"deltaSort",treeDataDisplayType:"treeDataDisplayType",functionsPassive:"functionsPassive",enableGroupEdit:"enableGroupEdit",initialState:"initialState",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:"resetRowDataOnUpdate",processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellValueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",gridPreDestroyed:"gridPreDestroyed",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pinnedRowDataChanged:"pinnedRowDataChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged",columnRowGroupChangeRequest:"columnRowGroupChangeRequest",columnPivotChangeRequest:"columnPivotChangeRequest",columnValueChangeRequest:"columnValueChangeRequest",columnAggFuncChangeRequest:"columnAggFuncChangeRequest"},standalone:!0,features:[Ve([dI,pI]),oe,K],decls:0,vars:0,template:function(e,t){},encapsulation:2}),o})(),j0=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=me({type:o}),o.\u0275inj=ge({imports:[Lre]}),o})();var kre=new hn("AUTO_ERROR_TIP_MAP"),Vre=new hn("AUTO_ERROR_TIP_KEY"),Gre="errorTip",Zwe=(()=>{let n=class n{constructor(t,i,r,s,a){this.nzFormControl=t,this.nzFormItemComponent=i,this.seControl=a,this.errorTipKey=r||Gre,this.errorTipMap=V({},s||{})}ngAfterContentInit(){(this.nzFormControl||this.seControl)&&this.ngControl&&this.ngControl.statusChanges.pipe(Qe(t=>t==="INVALID")).subscribe(()=>{let t=this.ngControl.errors||{};Object.entries(t).some(([i,r])=>{let s=r[this.errorTipKey];return s&&(this.nzFormControl&&(this.nzFormControl.innerTip=s,this.nzFormControl.nzErrorTip=s),this.seControl&&(this.seControl.error=s)),!!s}),this.nzFormControl&&this.nzFormItemComponent&&this.nzFormItemComponent.setWithHelpViaTips(!!this.nzFormControl.innerTip)})}};n.\u0275fac=function(i){return new(i||n)(w(_v,10),w(Na,9),w(Vre,8),w(kre,8),w(Qz,10))},n.\u0275dir=Se({type:n,selectors:[["","autoErrorTip",""]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Ri,5),i&2){let a;ce(a=ue())&&(r.ngControl=a.first)}}});let o=n;return o})();var kg=[vf,Ch,Cf,_f,yf,vs];var Vg=[Fp,Hs,oc,Ef,lc,ac,$s,Hi,Vs,Gs,Sf,Tf,Ls,wf,$l,Lr,rc,nc,bf,Tp,Gl,ff,ji,Ge,$i,ah];var Hre=[];var qbe=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[j0,Zn,nn,Il,Cu,cm,su,vs,kg,Vg,Hre,j0,Zn,nn,Cu,Il,cm,su,vs,vf,Ch,Cf,_f,yf,vs,Fp,Hs,oc,Ef,lc,ac,$s,Hi,Vs,Gs,Sf,Tf,Ls,wf,$l,Lr,rc,nc,bf,Tp,Gl,ff,ji,Ge,$i,ah]});let o=n;return o})();var W0=(()=>{let n=class n extends Fz{ngOnInit(){console.warn("init test widget")}};n.KEY="test",n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["test"]],standalone:!0,features:[Xe,K],decls:2,vars:6,consts:[[3,"id","schema","ui","showError","error","showTitle"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),Y(1," test widget "),S()),i&2&&h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title)},dependencies:[vs,$r],encapsulation:2,changeDetection:0});let o=n;return o})();var Jbe=[{KEY:W0.KEY,type:W0}];var tTe=[];var iTe=[];var pTe=[nn,Cu,Po,Be,St,Zt,hw,Hl,...kg,...Vg];export{Mo as a,Pt as b,Soe as c,woe as d,Fp as e,Hoe as f,zn as g,Ii as h,Np as i,Kt as j,Zw as k,Ul as l,gu as m,Rt as n,ob as o,XP as p,yu as q,nM as r,vm as s,ase as t,nn as u,Cu as v,pb as w,_u as x,Up as y,Bi as z,$i as A,Si as B,ji as C,Sb as D,WM as E,xle as F,zle as G,Ole as H,Dle as I,Rle as J,Ile as K,Ple as L,dce as M,hv as N,co as O,cs as P,Ob as Q,ec as R,yr as S,Rb as T,us as U,Lr as V,Tu as W,nh as X,zu as Y,Ou as Z,Ls as _,Um as $,qb as aa,$b as ba,ah as ca,tT as da,Qm as ea,Xm as fa,ev as ga,tv as ha,nv as ia,rT as ja,nc as ka,Fa as la,cT as ma,iv as na,Vs as oa,ic as pa,Gs as qa,ps as ra,Hs as sa,rc as ta,pv as ua,oc as va,I3 as wa,Ch as xa,ome as ya,Aa as za,sc as Aa,$s as Ba,Na as Ca,_h as Da,_v as Ea,ac as Fa,wv as Ga,lc as Ha,of as Ia,n6 as Ja,vs as Ka,nCe as La,X6 as Ma,e9 as Na,ff as Oa,$z as Pa,o8 as Qa,vf as Ra,h0e as Sa,yf as Ta,Yz as Ua,Qz as Va,Cf as Wa,G8 as Xa,Zz as Ya,q0e as Za,_f as _a,rK as $a,Sf as ab,dK as bb,wf as cb,jSe as db,bf as eb,WK as fb,Tf as gb,z7 as hb,Ef as ib,Lre as jb,Zwe as kb,qbe as lb,Jbe as mb,tTe as nb,iTe as ob}; +`,Iwe=function(){function o(){}return o.createHeader=function(n){n===void 0&&(n={});var e="",i=["version"];n.version||(n.version="1.0"),n.encoding&&i.push("encoding"),n.standalone&&i.push("standalone");var r=i.map(function(s){return"".concat(s,'="').concat(n[s],'"')}).join(" ");return"".concat(e,"xml ").concat(r," ").concat(t)},o.createXml=function(n,e){var t=this,i="";n.properties&&(n.properties.prefixedAttributes&&n.properties.prefixedAttributes.forEach(function(s){Object.keys(s.map).forEach(function(a){i+=t.returnAttributeIfPopulated(s.prefix+a,s.map[a],e)})}),n.properties.rawMap&&Object.keys(n.properties.rawMap).forEach(function(s){i+=t.returnAttributeIfPopulated(s,n.properties.rawMap[s],e)}));var r="<"+n.name+i;return!n.children&&n.textNode==null?r+"/>"+eg:n.textNode!=null?r+">"+n.textNode+""+eg:(r+=">"+eg,n.children&&n.children.forEach(function(s){r+=t.createXml(s,e)}),r+""+eg)},o.returnAttributeIfPopulated=function(n,e,t){if(!e&&e!==""&&e!==0)return"";var i=e;return typeof e=="boolean"&&t&&(i=t(e))," ".concat(n,'="').concat(i,'"')},o}(),Tre=function(o){var n=o.getHours();return n<<=6,n=n|o.getMinutes(),n<<=5,n=n|o.getSeconds()/2,n},Ere=function(o){var n=o.getFullYear()-1980;return n<<=4,n=n|o.getMonth()+1,n<<=5,n=n|o.getDate(),n};function Ti(o,n){for(var e="",t=0;t>>=8;return e}var bD=function(o){if(!o.length)return 0;for(var n=-1,e=0,t=0,i=0,r=0;r>>8^i;return n^-1},TD=function(o){return o.length?bD(typeof o=="string"?new TextEncoder().encode(o):o):0},xre=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),aI=function(o,n,e,t){function i(r){return r instanceof e?r:new e(function(s){s(r)})}return new(e||(e=Promise))(function(r,s){function a(u){try{c(t.next(u))}catch(d){s(d)}}function l(u){try{c(t.throw(u))}catch(d){s(d)}}function c(u){u.done?r(u.value):i(u.value).then(a,l)}c((t=t.apply(o,n||[])).next())})},lI=function(o,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(t)throw new TypeError("Generator is already executing.");for(;e;)try{if(t=1,i&&(r=c[0]&2?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,i=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]0,c?[4,Ore(r)]:[3,2];case 1:u=p.sent(),s=u.content,a=u.size,l=!0,p.label=2;case 2:return d=cI(o,l,n,i,r,a),[2,Uc(Uc({},d),{content:s||r,isCompressed:l})]}})})},Mre=function(o,n){var e=o.content,t=(e?uI(e):{content:Uint8Array.from([])}).content,i=cI(o,!1,n,t.length,t,void 0);return Uc(Uc({},i),{content:t,isCompressed:!1})},cI=function(o,n,e,t,i,r){var s=o.content,a=o.path,l=o.created,c=Tre(l),u=Ere(l),d=TD(i),p=r!==void 0?r:t,g=Ire(a),v=g!==a,y="";if(v){var x=Ti(1,1)+Ti(TD(g),4)+g;y="up"+Ti(x.length,2)+x}var E="\0"+(v?"\0\b":"\0\0")+Ti(n?8:0,2)+Ti(c,2)+Ti(u,2)+Ti(p?d:0,4)+Ti(r??t,4)+Ti(t,4)+Ti(g.length,2)+Ti(y.length,2),z="PK"+E+g+y,M="PK\0"+E+"\0\0\0\0\0\0"+(s?"\0\0\0\0":"\0\0\0")+Ti(e,4)+g+y;return{localFileHeader:Uint8Array.from(z,function(G){return G.charCodeAt(0)}),centralDirectoryHeader:Uint8Array.from(M,function(G){return G.charCodeAt(0)})}},Fre=function(o,n,e){var t="PK\0\0\0\0"+Ti(o,2)+Ti(o,2)+Ti(n,4)+Ti(e,4)+"\0\0";return Uint8Array.from(t,function(i){return i.charCodeAt(0)})},Are=function(o){for(var n=new Uint8Array(o.length),e=0;e0&&r[r.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]=o.length&&(o=void 0),{value:o&&o[t++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},tg=function(o,n){var e=typeof Symbol=="function"&&o[Symbol.iterator];if(!e)return o;var t=e.call(o),i,r=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return r},ng=function(o,n,e){if(e||arguments.length===2)for(var t=0,i=n.length,r;t{class o extends H0{constructor(e){super("angular"),this._ngZone=e,this.isRunningWithinTestZone=!1,this.wrapIncoming=(t,i)=>this.runOutside(t,i),this.wrapOutgoing=t=>this.runInsideAngular(t),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this._ngZone?this.isRunningWithinTestZone?this.runOutside=(t,i)=>i==="resize-observer"?this._ngZone.runOutsideAngular(t):t():this.runOutside=t=>this._ngZone.runOutsideAngular(t):this.runOutside=t=>t()}get shouldWrapOutgoing(){return this._ngZone&&$e.isInAngularZone()}isFrameworkComponent(e){if(!e)return!1;let t=e.prototype;return t&&"agInit"in t}runInsideAngular(e){return this._ngZone?this._ngZone.run(e):e()}runOutsideAngular(e,t){return this.runOutside(e,t)}}return o.\u0275fac=function(e){return new(e||o)(nt($e))},o.\u0275prov=qe({token:o,factory:o.\u0275fac}),o})(),pI=(()=>{class o extends sI{setViewContainerRef(e,t){this.viewContainerRef=e,this.angularFrameworkOverrides=t}createWrapper(e,t){let i=this.angularFrameworkOverrides,r=this;class s extends $0{init(c){i.runInsideAngular(()=>{super.init(c),this._componentRef.changeDetectorRef.detectChanges()})}createComponent(){return i.runInsideAngular(()=>r.createComponent(e))}hasMethod(c){return a.getFrameworkComponentInstance()[c]!=null}callMethod(c,u){let d=this.getFrameworkComponentInstance();return i.runInsideAngular(()=>a.getFrameworkComponentInstance()[c].apply(d,u))}addMethod(c,u){a[c]=u}}let a=new s;return a}createComponent(e){return this.viewContainerRef.createComponent(e)}}return o.\u0275fac=(()=>{let n;return function(t){return(n||(n=Ut(o)))(t||o)}})(),o.\u0275prov=qe({token:o,factory:o.\u0275fac}),o})(),$0=class{init(n){this._params=n,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,this._agAwareComponent.agInit(this._params)}getGui(){return this._eGui}getRootElement(){return this._eGui.firstChild}destroy(){this._frameworkComponentInstance&&typeof this._frameworkComponentInstance.destroy=="function"&&this._frameworkComponentInstance.destroy(),this._componentRef&&this._componentRef.destroy()}getFrameworkComponentInstance(){return this._frameworkComponentInstance}},Lre=(()=>{class o{constructor(e,t,i,r){this.viewContainerRef=t,this.angularFrameworkOverrides=i,this.frameworkComponentWrapper=r,this._initialised=!1,this._destroyed=!1,this._fullyReady=Ni.resolve(!0),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterMovesDown=void 0,this.enterMovesDownAfterEdit=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.excludeHiddenColumnsFromQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.advancedFilterModel=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.enableChartToolPanelsButton=void 0,this.suppressChartToolPanelsButton=void 0,this.chartToolPanelsDef=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressParentsInRowNodes=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressAsyncEvents=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.suppressAggAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.enableCellChangeFlash=void 0,this.cellFlashDuration=void 0,this.cellFlashDelay=void 0,this.cellFadeDuration=void 0,this.cellFadeDelay=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.suppressGroupMaintainValueType=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupIncludeFooter=void 0,this.groupIncludeTotalFooter=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.treeData=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideInfiniteScroll=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSideFilterAllLevels=void 0,this.serverSideSortOnServer=void 0,this.serverSideFilterOnServer=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.functionsPassive=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg=void 0,this.isGroupOpenByDefault=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.toolPanelVisibleChanged=new O,this.toolPanelSizeChanged=new O,this.columnMenuVisibleChanged=new O,this.cutStart=new O,this.cutEnd=new O,this.pasteStart=new O,this.pasteEnd=new O,this.columnVisible=new O,this.columnPinned=new O,this.columnResized=new O,this.columnMoved=new O,this.columnValueChanged=new O,this.columnPivotModeChanged=new O,this.columnPivotChanged=new O,this.columnGroupOpened=new O,this.newColumnsLoaded=new O,this.gridColumnsChanged=new O,this.displayedColumnsChanged=new O,this.virtualColumnsChanged=new O,this.columnEverythingChanged=new O,this.columnHeaderMouseOver=new O,this.columnHeaderMouseLeave=new O,this.columnHeaderClicked=new O,this.columnHeaderContextMenu=new O,this.componentStateChanged=new O,this.cellValueChanged=new O,this.cellEditRequest=new O,this.rowValueChanged=new O,this.cellEditingStarted=new O,this.cellEditingStopped=new O,this.rowEditingStarted=new O,this.rowEditingStopped=new O,this.undoStarted=new O,this.undoEnded=new O,this.redoStarted=new O,this.redoEnded=new O,this.rangeDeleteStart=new O,this.rangeDeleteEnd=new O,this.filterOpened=new O,this.filterChanged=new O,this.filterModified=new O,this.advancedFilterBuilderVisibleChanged=new O,this.chartCreated=new O,this.chartRangeSelectionChanged=new O,this.chartOptionsChanged=new O,this.chartDestroyed=new O,this.cellKeyDown=new O,this.gridReady=new O,this.gridPreDestroyed=new O,this.firstDataRendered=new O,this.gridSizeChanged=new O,this.modelUpdated=new O,this.virtualRowRemoved=new O,this.viewportChanged=new O,this.bodyScroll=new O,this.bodyScrollEnd=new O,this.dragStarted=new O,this.dragStopped=new O,this.stateUpdated=new O,this.paginationChanged=new O,this.rowDragEnter=new O,this.rowDragMove=new O,this.rowDragLeave=new O,this.rowDragEnd=new O,this.columnRowGroupChanged=new O,this.rowGroupOpened=new O,this.expandOrCollapseAll=new O,this.pinnedRowDataChanged=new O,this.rowDataUpdated=new O,this.asyncTransactionsFlushed=new O,this.storeRefreshed=new O,this.cellClicked=new O,this.cellDoubleClicked=new O,this.cellFocused=new O,this.cellMouseOver=new O,this.cellMouseOut=new O,this.cellMouseDown=new O,this.rowClicked=new O,this.rowDoubleClicked=new O,this.rowSelected=new O,this.selectionChanged=new O,this.cellContextMenu=new O,this.rangeSelectionChanged=new O,this.tooltipShow=new O,this.tooltipHide=new O,this.sortChanged=new O,this.columnRowGroupChangeRequest=new O,this.columnPivotChangeRequest=new O,this.columnValueChangeRequest=new O,this.columnAggFuncChangeRequest=new O,this._nativeElement=e.nativeElement}ngAfterViewInit(){this.angularFrameworkOverrides.runOutsideAngular(()=>{this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef,this.angularFrameworkOverrides);let e=Yd.combineAttributesAndGridOptions(this.gridOptions,this);this.gridParams={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:this.angularFrameworkOverrides,providedBeanInstances:{frameworkComponentWrapper:this.frameworkComponentWrapper},modules:this.modules||[]};let t=rI(this._nativeElement,e,this.gridParams);t&&(this.api=t,this.columnApi=new ep(t));let i=this.gridPreDestroyed;(i.observed??i.observers.length>0)&&console.warn('AG Grid: gridPreDestroyed event listener registered via (gridPreDestroyed)="method($event)" will be ignored! Please assign via gridOptions.gridPreDestroyed and pass to the grid as [gridOptions]="gridOptions"'),this._initialised=!0,this._fullyReady.resolveNow(null,r=>r)})}ngOnChanges(e){this._initialised&&this.angularFrameworkOverrides.runOutsideAngular(()=>{let t={};Object.entries(e).forEach(([i,r])=>{t[i]=r.currentValue}),Yd.processOnChange(t,this.api)})}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy())}isEmitterUsed(e){let i=this[e],r=i?.observed??i?.observers?.length>0,s=`on${e.charAt(0).toUpperCase()}${e.substring(1)}`,a=!!this.gridOptions&&!!this.gridOptions[s];return r||a}globalEventListener(e,t){if(this._destroyed)return;let i=this[e];if(i&&this.isEmitterUsed(e)){let r=()=>this.angularFrameworkOverrides.runInsideAngular(()=>i.emit(t));e==="gridReady"?this._fullyReady.then(()=>r()):r()}}}return o.\u0275fac=function(e){return new(e||o)(w(de),w(Tn),w(dI),w(pI))},o.\u0275cmp=j({type:o,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:"suppressContextMenu",preventDefaultOnContextMenu:"preventDefaultOnContextMenu",allowContextMenuWithControlKey:"allowContextMenuWithControlKey",columnMenu:"columnMenu",suppressMenuHide:"suppressMenuHide",enableBrowserTooltips:"enableBrowserTooltips",tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:"tooltipMouseTrack",tooltipInteraction:"tooltipInteraction",popupParent:"popupParent",copyHeadersToClipboard:"copyHeadersToClipboard",copyGroupHeadersToClipboard:"copyGroupHeadersToClipboard",clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:"suppressCopyRowsToClipboard",suppressCopySingleCellRanges:"suppressCopySingleCellRanges",suppressLastEmptyLineOnPaste:"suppressLastEmptyLineOnPaste",suppressClipboardPaste:"suppressClipboardPaste",suppressClipboardApi:"suppressClipboardApi",suppressCutToClipboard:"suppressCutToClipboard",columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:"maintainColumnOrder",suppressFieldDotNotation:"suppressFieldDotNotation",headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",allowDragFromColumnsToolPanel:"allowDragFromColumnsToolPanel",suppressMovableColumns:"suppressMovableColumns",suppressColumnMoveAnimation:"suppressColumnMoveAnimation",suppressDragLeaveHidesColumns:"suppressDragLeaveHidesColumns",suppressRowGroupHidesColumns:"suppressRowGroupHidesColumns",colResizeDefault:"colResizeDefault",suppressAutoSize:"suppressAutoSize",autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:"skipHeaderOnAutoSize",autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",singleClickEdit:"singleClickEdit",suppressClickEdit:"suppressClickEdit",readOnlyEdit:"readOnlyEdit",stopEditingWhenCellsLoseFocus:"stopEditingWhenCellsLoseFocus",enterMovesDown:"enterMovesDown",enterMovesDownAfterEdit:"enterMovesDownAfterEdit",enterNavigatesVertically:"enterNavigatesVertically",enterNavigatesVerticallyAfterEdit:"enterNavigatesVerticallyAfterEdit",enableCellEditingOnBackspace:"enableCellEditingOnBackspace",undoRedoCellEditing:"undoRedoCellEditing",undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:"suppressCsvExport",defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:"suppressExcelExport",excelStyles:"excelStyles",quickFilterText:"quickFilterText",cacheQuickFilter:"cacheQuickFilter",excludeHiddenColumnsFromQuickFilter:"excludeHiddenColumnsFromQuickFilter",includeHiddenColumnsInQuickFilter:"includeHiddenColumnsInQuickFilter",quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",excludeChildrenWhenTreeDataFiltering:"excludeChildrenWhenTreeDataFiltering",enableAdvancedFilter:"enableAdvancedFilter",advancedFilterModel:"advancedFilterModel",includeHiddenColumnsInAdvancedFilter:"includeHiddenColumnsInAdvancedFilter",advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",enableCharts:"enableCharts",chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",enableChartToolPanelsButton:"enableChartToolPanelsButton",suppressChartToolPanelsButton:"suppressChartToolPanelsButton",chartToolPanelsDef:"chartToolPanelsDef",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:"masterDetail",keepDetailRows:"keepDetailRows",keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:"detailRowAutoHeight",context:"context",alignedGrids:"alignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:"valueCache",valueCacheNeverExpires:"valueCacheNeverExpires",enableCellExpressions:"enableCellExpressions",suppressParentsInRowNodes:"suppressParentsInRowNodes",suppressTouch:"suppressTouch",suppressFocusAfterRefresh:"suppressFocusAfterRefresh",suppressAsyncEvents:"suppressAsyncEvents",suppressBrowserResizeObserver:"suppressBrowserResizeObserver",suppressPropertyNamesCheck:"suppressPropertyNamesCheck",suppressChangeDetection:"suppressChangeDetection",debug:"debug",overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:"suppressLoadingOverlay",overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:"suppressNoRowsOverlay",pagination:"pagination",paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:"paginationAutoPageSize",paginateChildRows:"paginateChildRows",suppressPaginationPanel:"suppressPaginationPanel",pivotMode:"pivotMode",pivotPanelShow:"pivotPanelShow",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:"pivotSuppressAutoColumn",suppressExpandablePivotGroups:"suppressExpandablePivotGroups",functionsReadOnly:"functionsReadOnly",aggFuncs:"aggFuncs",suppressAggFuncInHeader:"suppressAggFuncInHeader",alwaysAggregateAtRootLevel:"alwaysAggregateAtRootLevel",suppressAggAtRootLevel:"suppressAggAtRootLevel",aggregateOnlyChangedColumns:"aggregateOnlyChangedColumns",suppressAggFilteredOnly:"suppressAggFilteredOnly",removePivotHeaderRowWhenSingleValueColumn:"removePivotHeaderRowWhenSingleValueColumn",animateRows:"animateRows",enableCellChangeFlash:"enableCellChangeFlash",cellFlashDuration:"cellFlashDuration",cellFlashDelay:"cellFlashDelay",cellFadeDuration:"cellFadeDuration",cellFadeDelay:"cellFadeDelay",allowShowChangeAfterFilter:"allowShowChangeAfterFilter",domLayout:"domLayout",ensureDomOrder:"ensureDomOrder",enableRtl:"enableRtl",suppressColumnVirtualisation:"suppressColumnVirtualisation",suppressMaxRenderedRowRestriction:"suppressMaxRenderedRowRestriction",suppressRowVirtualisation:"suppressRowVirtualisation",rowDragManaged:"rowDragManaged",suppressRowDrag:"suppressRowDrag",suppressMoveWhenRowDragging:"suppressMoveWhenRowDragging",rowDragEntireRow:"rowDragEntireRow",rowDragMultiRow:"rowDragMultiRow",rowDragText:"rowDragText",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:"embedFullWidthRows",suppressGroupMaintainValueType:"suppressGroupMaintainValueType",groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:"groupMaintainOrder",groupSelectsChildren:"groupSelectsChildren",groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupIncludeFooter:"groupIncludeFooter",groupIncludeTotalFooter:"groupIncludeTotalFooter",groupSuppressBlankHeader:"groupSuppressBlankHeader",groupSelectsFiltered:"groupSelectsFiltered",showOpenedGroup:"showOpenedGroup",groupRemoveSingleChildren:"groupRemoveSingleChildren",groupRemoveLowestSingleChildren:"groupRemoveLowestSingleChildren",groupHideOpenParents:"groupHideOpenParents",groupAllowUnbalanced:"groupAllowUnbalanced",rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",suppressMakeColumnVisibleAfterUnGroup:"suppressMakeColumnVisibleAfterUnGroup",treeData:"treeData",rowGroupPanelSuppressSort:"rowGroupPanelSuppressSort",suppressGroupRowsSticky:"suppressGroupRowsSticky",pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:"suppressModelUpdateAfterUpdateTransaction",datasource:"datasource",cacheOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideInfiniteScroll:"suppressServerSideInfiniteScroll",cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:"purgeClosedRowNodes",serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:"serverSideSortAllLevels",serverSideEnableClientSideSort:"serverSideEnableClientSideSort",serverSideOnlyRefreshFilteredGroups:"serverSideOnlyRefreshFilteredGroups",serverSideFilterAllLevels:"serverSideFilterAllLevels",serverSideSortOnServer:"serverSideSortOnServer",serverSideFilterOnServer:"serverSideFilterOnServer",serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:"alwaysShowHorizontalScroll",alwaysShowVerticalScroll:"alwaysShowVerticalScroll",debounceVerticalScrollbar:"debounceVerticalScrollbar",suppressHorizontalScroll:"suppressHorizontalScroll",suppressScrollOnNewData:"suppressScrollOnNewData",suppressScrollWhenPopupsAreOpen:"suppressScrollWhenPopupsAreOpen",suppressAnimationFrame:"suppressAnimationFrame",suppressMiddleClickScrolls:"suppressMiddleClickScrolls",suppressPreventDefaultOnMouseWheel:"suppressPreventDefaultOnMouseWheel",scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",rowMultiSelectWithClick:"rowMultiSelectWithClick",suppressRowDeselection:"suppressRowDeselection",suppressRowClickSelection:"suppressRowClickSelection",suppressCellFocus:"suppressCellFocus",suppressHeaderFocus:"suppressHeaderFocus",suppressMultiRangeSelection:"suppressMultiRangeSelection",enableCellTextSelection:"enableCellTextSelection",enableRangeSelection:"enableRangeSelection",enableRangeHandle:"enableRangeHandle",enableFillHandle:"enableFillHandle",fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:"suppressClearOnFillReduction",sortingOrder:"sortingOrder",accentedSort:"accentedSort",unSortIcon:"unSortIcon",suppressMultiSort:"suppressMultiSort",alwaysMultiSort:"alwaysMultiSort",multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:"suppressMaintainUnsortedOrder",icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:"suppressRowHoverHighlight",suppressRowTransform:"suppressRowTransform",columnHoverHighlight:"columnHoverHighlight",gridId:"gridId",deltaSort:"deltaSort",treeDataDisplayType:"treeDataDisplayType",functionsPassive:"functionsPassive",enableGroupEdit:"enableGroupEdit",initialState:"initialState",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:"resetRowDataOnUpdate",processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellValueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",gridPreDestroyed:"gridPreDestroyed",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pinnedRowDataChanged:"pinnedRowDataChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged",columnRowGroupChangeRequest:"columnRowGroupChangeRequest",columnPivotChangeRequest:"columnPivotChangeRequest",columnValueChangeRequest:"columnValueChangeRequest",columnAggFuncChangeRequest:"columnAggFuncChangeRequest"},standalone:!0,features:[Ve([dI,pI]),oe,K],decls:0,vars:0,template:function(e,t){},encapsulation:2}),o})(),j0=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=me({type:o}),o.\u0275inj=ge({imports:[Lre]}),o})();var kre=new hn("AUTO_ERROR_TIP_MAP"),Vre=new hn("AUTO_ERROR_TIP_KEY"),Gre="errorTip",Zwe=(()=>{let n=class n{constructor(t,i,r,s,a){this.nzFormControl=t,this.nzFormItemComponent=i,this.seControl=a,this.errorTipKey=r||Gre,this.errorTipMap=V({},s||{})}ngAfterContentInit(){(this.nzFormControl||this.seControl)&&this.ngControl&&this.ngControl.statusChanges.pipe(Qe(t=>t==="INVALID")).subscribe(()=>{let t=this.ngControl.errors||{};Object.entries(t).some(([i,r])=>{let s=r[this.errorTipKey];return s&&(this.nzFormControl&&(this.nzFormControl.innerTip=s,this.nzFormControl.nzErrorTip=s),this.seControl&&(this.seControl.error=s)),!!s}),this.nzFormControl&&this.nzFormItemComponent&&this.nzFormItemComponent.setWithHelpViaTips(!!this.nzFormControl.innerTip)})}};n.\u0275fac=function(i){return new(i||n)(w(_v,10),w(Na,9),w(Vre,8),w(kre,8),w(Qz,10))},n.\u0275dir=Se({type:n,selectors:[["","autoErrorTip",""]],contentQueries:function(i,r,s){if(i&1&&Ft(s,Ri,5),i&2){let a;ce(a=ue())&&(r.ngControl=a.first)}}});let o=n;return o})();var kg=[vf,Ch,Cf,_f,yf,vs];var Vg=[Fp,Hs,oc,Ef,lc,ac,$s,Hi,Vs,Gs,Sf,Tf,Ls,wf,$l,Lr,rc,nc,bf,Tp,Gl,ff,ji,Ge,$i,ah];var Hre=[];var qbe=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275mod=me({type:n}),n.\u0275inj=ge({imports:[j0,Zn,nn,Il,Cu,cm,su,vs,kg,Vg,Hre,j0,Zn,nn,Cu,Il,cm,su,vs,vf,Ch,Cf,_f,yf,vs,Fp,Hs,oc,Ef,lc,ac,$s,Hi,Vs,Gs,Sf,Tf,Ls,wf,$l,Lr,rc,nc,bf,Tp,Gl,ff,ji,Ge,$i,ah]});let o=n;return o})();var W0=(()=>{let n=class n extends Fz{ngOnInit(){console.warn("init test widget")}};n.KEY="test",n.\u0275fac=(()=>{let t;return function(r){return(t||(t=Ut(n)))(r||n)}})(),n.\u0275cmp=j({type:n,selectors:[["test"]],standalone:!0,features:[Xe,K],decls:2,vars:6,consts:[[3,"id","schema","ui","showError","error","showTitle"]],template:function(i,r){i&1&&(C(0,"sf-item-wrap",0),Y(1," test widget "),S()),i&2&&h("id",r.id)("schema",r.schema)("ui",r.ui)("showError",r.showError)("error",r.error)("showTitle",r.schema.title)},dependencies:[vs,$r],encapsulation:2,changeDetection:0});let o=n;return o})();var Jbe=[{KEY:W0.KEY,type:W0}];var tTe=[];var iTe=[];var pTe=[nn,Cu,Po,Be,St,Zt,hw,Hl,...kg,...Vg];export{Mo as a,Pt as b,Soe as c,woe as d,Fp as e,Hoe as f,zn as g,Ii as h,Np as i,Kt as j,Zw as k,Ul as l,gu as m,Rt as n,ob as o,XP as p,yu as q,nM as r,vm as s,ase as t,nn as u,Cu as v,pb as w,_u as x,Up as y,Bi as z,$i as A,Si as B,ji as C,Sb as D,WM as E,xle as F,zle as G,Ole as H,Dle as I,Rle as J,Ile as K,Ple as L,dce as M,hv as N,co as O,cs as P,Ob as Q,ec as R,yr as S,Rb as T,us as U,Lr as V,Tu as W,nh as X,zu as Y,Ou as Z,Ls as _,Um as $,Ub as aa,qb as ba,ah as ca,tT as da,Qm as ea,uh as fa,Xm as ga,ev as ha,tv as ia,nv as ja,rT as ka,nc as la,Fa as ma,cT as na,iv as oa,Vs as pa,ic as qa,Gs as ra,ps as sa,Hs as ta,rc as ua,pv as va,oc as wa,I3 as xa,Ch as ya,ome as za,Aa,sc as Ba,$s as Ca,Na as Da,_h as Ea,_v as Fa,ac as Ga,wv as Ha,lc as Ia,of as Ja,n6 as Ka,vs as La,nCe as Ma,X6 as Na,e9 as Oa,ff as Pa,$z as Qa,o8 as Ra,vf as Sa,h0e as Ta,yf as Ua,Yz as Va,Qz as Wa,Cf as Xa,G8 as Ya,Zz as Za,q0e as _a,_f as $a,rK as ab,Sf as bb,dK as cb,wf as db,jSe as eb,bf as fb,WK as gb,Tf as hb,z7 as ib,Ef as jb,Lre as kb,Zwe as lb,qbe as mb,Jbe as nb,tTe as ob,iTe as pb}; diff --git a/dist/himp.platform.angular/browser/index.html b/dist/himp.platform.angular/browser/index.html index ae07177..d4d2d90 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-3JB53C7N.js b/dist/himp.platform.angular/browser/main-3JB53C7N.js deleted file mode 100644 index ee30e6c..0000000 --- a/dist/himp.platform.angular/browser/main-3JB53C7N.js +++ /dev/null @@ -1,2 +0,0 @@ -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/dist/himp.platform.angular/browser/main-RNIBGAQI.js b/dist/himp.platform.angular/browser/main-RNIBGAQI.js new file mode 100644 index 0000000..c8ebb30 --- /dev/null +++ b/dist/himp.platform.angular/browser/main-RNIBGAQI.js @@ -0,0 +1,2 @@ +import{b as qo,c as se}from"./chunk-M4HTTI2X.js";import{a as re,b as wt,c as To,d as ko,f as Io,g as Mt,h as vt,i as Uo}from"./chunk-MRNYEB3J.js";import{$ as Ro,$a as X,A as x,Aa as jo,Ba as Lo,C as P,Ca as V,Ga as R,Ia as j,La as L,M as Fo,Ma as Wo,O as ve,P as ze,Pa as W,Q as Eo,R as Ao,S as Ce,Sa as B,T as Vo,U as Ne,Ua as G,V as M,Xa as $,_ as y,aa as we,bb as q,ca as S,cb as Bo,db as v,e as _,fb as U,hb as Q,jb as Y,kb as ht,la as O,nb as Go,ob as $o,pa as T,pb as Xo,ra as k,ta as I,u as b,ua as F,v as D,wa as E,ya as A,za as Ho}from"./chunk-WD6SV3WH.js";import{a as xo,d as Po,e as yo,f as So,g as Oo}from"./chunk-4FFPI7ZP.js";import{Ab as pe,Ae as uo,Bb as ue,Bc as $t,Be as co,Cb as ce,Ce as fo,Da as Pt,Db as me,Dc as Xt,De as go,Eb as g,Ec as qt,Ee as ho,Fb as pt,Fe as ie,Ga as zt,Gb as K,Gd as Kt,Ge as h,Gf as bo,Ha as st,Hb as kt,Hc as ct,He as ge,Hf as Do,Ja as yt,Jb as f,Jc as fe,Ka as m,Kb as ut,La as ae,Lc as Ut,Le as C,Mc as Qt,Nc as Yt,Nf as H,Oa as St,Ob as It,Oc as Zt,Pc as Jt,Qb as Ft,Qe as Mo,Sb as Et,Se as Nt,Ta as le,Tb as At,Te as ft,Ue as he,Va as p,Ve as Me,We as vo,Xa as it,Za as dt,af as zo,cc as Vt,dc as Rt,gb as a,gf as Co,ha as Dt,hb as l,hc as Ht,hf as N,ib as s,jb as rt,ka as xt,kb as nt,kc as jt,la as d,lf as w,mb as at,na as c,nc as oe,of as No,pe as eo,qb as Z,qe as to,re as oo,rf as wo,sa as tt,sb as z,se as io,ta as ot,tb as Ot,te as ro,tf as gt,ub as Tt,uc as Lt,ue as no,vb as lt,vc as Wt,ve as ao,vf as ee,wb as Ct,wc as Bt,we as lo,xc as Gt,xe as mo,xf as te,ye as so,ze as po,zf as _o}from"./chunk-VDRVUQCF.js";var Qo=new At("17.1.0");var Yo=(()=>{let t=class t{constructor(e,o){this.router=d(fe),this.titleSrv=d(gt),this.modalSrv=d(Co),this.donePreloader=No(),o.setAttribute(e.nativeElement,"ng-alain-version",Do.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:re.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(st),ae(yt))},t.\u0275cmp=c({type:t,selectors:[["app-root"]],standalone:!0,features:[f],decls:1,vars:0,template:function(o,r){o&1&&s(0,"router-outlet")},dependencies:[ct],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 _t(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"}},yi=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=yi;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"},Oi={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}}"},ki={date:ft({formats:Si,defaultWidth:"full"}),time:ft({formats:Oi,defaultWidth:"full"}),dateTime:ft({formats:Ti,defaultWidth:"full"})},Ko=ki;function ei(i,t,n){var e="eeee p";return _t(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"},Fi=function(t,n,e,o){var r=Ii[t];return typeof r=="function"?r(n,e,o):r},ti=Fi;var Ei={narrow:["\u524D","\u516C\u5143"],abbreviated:["\u524D","\u516C\u5143"],wide:["\u516C\u5143\u524D","\u516C\u5143"]},Ai={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"]},Vi={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"]},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"}},ji={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()}},Wi={ordinalNumber:Li,era:he({values:Ei,defaultWidth:"wide"}),quarter:he({values:Ai,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:he({values:Vi,defaultWidth:"wide"}),day:he({values:Ri,defaultWidth:"wide"}),dayPeriod:he({values:Hi,defaultWidth:"wide",formattingValues:ji,defaultFormattingWidth:"wide"})},oi=Wi;var Bi=/^(第\s*)?\d+(日|时|分|秒)?/i,Gi=/\d+/i,$i={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},Xi={any:[/^(前)/i,/^(公元)/i]},qi={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},Ui={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},Qi={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},Yi={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]},Zi={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},Ji={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Ki={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},er={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},tr={ordinalNumber:vo({matchPattern:Bi,parsePattern:Gi,valueCallback:function(t){return parseInt(t,10)}}),era:Me({matchPatterns:$i,defaultMatchWidth:"wide",parsePatterns:Xi,defaultParseWidth:"any"}),quarter:Me({matchPatterns:qi,defaultMatchWidth:"wide",parsePatterns:Ui,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Me({matchPatterns:Qi,defaultMatchWidth:"wide",parsePatterns:Yi,defaultParseWidth:"any"}),day:Me({matchPatterns:Zi,defaultMatchWidth:"wide",parsePatterns:Ji,defaultParseWidth:"any"}),dayPeriod:Me({matchPatterns:Ki,defaultMatchWidth:"any",parsePatterns:er,defaultParseWidth:"any"})},ii=tr;var or={code:"zh-CN",formatDistance:Jo,formatLong:Ko,formatRelative:ti,localize:oi,match:ii,options:{weekStartsOn:1,firstWeekContainsDate:4}},bt=or;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=c({type:t,selectors:[["data-v-date"]],standalone:!0,features:[f],decls:3,vars:4,consts:[[1,"data-container"]],template:function(o,r){o&1&&(a(0,"div",0),g(1),It(2,"date"),l()),o&2&&(m(),K(" ",Ft(2,1,r.currentTime,"yyyy-MM-dd HH:mm:ss")," "))},dependencies:[oe,jt,b,D,B,A,$,X,G,L,_,I,E,Y,j,R,V,C,T,k,q,Q,y,v,H,M,F,O,U,w,N,W,P,h,x,S],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=c({type:t,selectors:[["data-v-fullscreen"]],hostVars:2,hostBindings:function(o,r){o&1&&Z("resize",function(){return r._resize()},!1,Pt)("click",function(){return r._click()}),o&2&&it("flex-1",!0)},standalone:!0,features:[f],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"),m(),K(" ",r.status?"\u9000\u51FA\u5168\u5C4F":"\u8FDB\u5165\u5168\u5C4F"," "))},dependencies:[oe,h,ie],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)(xt(Lt))},t.\u0275prov=Dt({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=z(2).$implicit;Ct("src","assets/",n.icon.includes("svg")?n.icon:n.icon+".svg","",zt),lt("alt",n.text)}}function nr(i,t){if(i&1){let n=at();rt(0),a(1,"a",5),Z("click",function(){tt(n);let o=z().$implicit,r=z();return ot(r.navigate(o))}),le(2,rr,1,2,"img",6),g(3),l(),nt()}if(i&2){let n=z().$implicit,e=z();m(),it("active",e.isActive(!0)),m(),p("ngIf",n.icon),m(),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=at();a(0,"li",15),Z("click",function(){let r=tt(n).$implicit,u=z(4);return ot(u.navigate(r))}),g(1),l()}if(i&2){let n=t.$implicit;m(),K(" ",n.text," ")}}function lr(i,t){if(i&1&&(rt(0),a(1,"a",10),g(2),s(3,"span",11),l(),a(4,"nz-dropdown-menu",null,12)(6,"ul",13),le(7,ar,2,1,"li",14),l()(),nt()),i&2){let n=me(5),e=z(2).$implicit;m(),p("nzDropdownMenu",n),m(),K(" ",e.text," "),m(5),p("ngForOf",e.children)}}function mr(i,t){if(i&1&&s(0,"img",7),i&2){let n=z(3).$implicit;Ct("src","assets/",n.icon.includes("svg")?n.icon:n.icon+".svg","",zt),lt("alt",n.text)}}function sr(i,t){if(i&1){let n=at();a(0,"a",5),Z("click",function(){tt(n);let o=z(2).$implicit,r=z();return ot(r.navigate(o))}),le(1,mr,1,2,"img",6),g(2),l()}if(i&2){let n=z(2).$implicit,e=z();it("active",e.isActive(!0)),m(),p("ngIf",n.icon),m(),K(" ",n.menuCode!="Home"?n.text:""," ")}}function dr(i,t){if(i&1&&(rt(0),le(1,lr,8,3,"ng-container",8)(2,sr,3,4,"ng-template",null,9,Et),nt()),i&2){let n=me(3),e=z().$implicit;m(),p("ngIf",e.children&&e.children.length>0)("ngIfElse",n)}}function pr(i,t){if(i&1){let n=at();rt(0,2),a(1,"li",3),Z("mouseover",function(o){let u=tt(n).$implicit,et=z();return ot(et.menuOver(u,o))}),le(2,nr,4,5,"ng-container",4)(3,dr,4,2,"ng-container",4),l(),nt()}if(i&2){let n=t.$implicit;m(2),p("ngIf",n.childShowType=="menu"),m(),p("ngIf",n.childShowType=="drop-down")}}var di=(()=>{let t=class t{constructor(e){this.menuService=e,this.http=d(te),this.modal=d(ee),this.router=d(fe),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,this.router.navigate([e.link??"/404",e.id],{state:{menu:e.children}})):e.menuCode=="Home"?(e.selected=!0,this.selectedParentMenu=e,this.router.navigateByUrl(e.link??"/404")):(e.selected=!0,console.log("\u8DEF\u7531"),console.log(e.link),this.router.navigate([e.link??"/404",e.id],{state:{menu:e.children}})),this.updateVisibleMenuList()}};t.\u0275fac=function(o){return new(o||t)(ae(li))},t.\u0275cmp=c({type:t,selectors:[["data-v-navigation"]],standalone:!0,features:[f],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),l()()),o&2&&(m(2),p("ngForOf",r.visibleMenuList))},dependencies:[oe,Vt,Rt,b,D,B,A,$,X,G,L,_,I,E,Y,j,R,V,C,ge,T,k,q,Q,y,v,H,M,ze,ve,Ce,Vo,Ne,F,O,U,w,N,W,P,h,ie,x,S],styles:['.navigation-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;margin-top:10px;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"}),pi=(()=>{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=c({type:t,selectors:[["data-v-setting"]],standalone:!0,features:[f],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),l(),a(2,"nz-dropdown-menu",null,2)(4,"div",3)(5,"div",4),s(6,"data-v-fullscreen"),l()()()),o&2){let u=me(3);p("nzDropdownMenu",u),m(),p("ngStyle",ut(2,ur))}},dependencies:[ai,oe,Ht,b,D,B,A,$,X,G,L,_,I,E,Y,j,R,V,C,ge,T,k,q,Q,y,v,H,M,ze,ve,Ce,Ne,F,O,U,w,N,W,P,h,ie,x,S],encapsulation:2});let i=t;return i})();var ui=(()=>{let t=class t{constructor(){this.settings=d(wo),this.router=d(fe),this.tokenService=d(xo)}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=c({type:t,selectors:[["data-v-user"]],standalone:!0,features:[f],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),l(),a(3,"nz-dropdown-menu",null,2)(5,"div",3)(6,"div",4),s(7,"i",5),g(8," \u4E2A\u4EBA\u4E2D\u5FC3 "),l(),a(9,"div",6),s(10,"i",7),g(11," \u4E2A\u4EBA\u8BBE\u7F6E "),l(),a(12,"div",8),s(13,"i",9),g(14," \u89E6\u53D1\u9519\u8BEF "),l(),s(15,"li",10),a(16,"div",11),Z("click",function(){return r.logout()}),s(17,"i",12),g(18," \u9000\u51FA\u767B\u5F55 "),l()()()),o&2){let u=me(4);p("nzDropdownMenu",u),m(),p("nzSrc",r.user.avatar),m(),K(" ",r.user.name,` +`)}},dependencies:[M,ze,ve,Eo,Ce,Ne,Ao,h,ie,v,Bo],encapsulation:2});let i=t;return i})();var ci=(()=>{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=c({type:t,selectors:[["app-data-v-header"]],standalone:!0,features:[f],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),l()())},dependencies:[pi,ui,ni,Mt,b,D,B,A,$,X,G,L,_,I,E,Y,j,R,V,C,T,k,q,Q,y,v,H,M,F,O,U,w,N,W,P,h,x,S],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=c({type:t,selectors:[["app-data-v-home"]],standalone:!0,features:[f],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"),l()())},dependencies:[ci,di,Mt,ct,b,D,B,A,$,X,G,L,_,I,E,Y,j,R,V,C,T,k,q,Q,y,v,H,M,F,O,U,w,N,W,P,h,x,S],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"],gi=(()=>{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=c({type:t,selectors:[["app-ag-grid-component"]],viewQuery:function(o,r){if(o&1&&pe(cr,5),o&2){let u;ue(u=ce())&&(r.grid=u.first)}},inputs:{defaultColDef:"defaultColDef",columnDefs:"columnDefs",rowData:"rowData",gridThemeClass:"gridThemeClass",paginationThemeClass:"paginationThemeClass"},standalone:!0,features:[f],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),l(),a(6,"nz-pagination",4),Z("nzPageSizeChange",function(et){return r.nzPageSizeChange(et)})("nzPageIndexChange",function(et){return r.nzPageIndexChange(et)}),l()()),o&2&&(dt(r.gridThemeClass),p("pagination",!0)("suppressPaginationPanel",!0)("suppressPaginationPanel",!0)("suppressScrollOnNewData",!0)("paginationPageSize",r.pageSize)("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.columnDefs),m(5),K("\u5171 ",r.pageRowTotal," \u9879\u6570\u636E"),m(),p("nzPageIndex",r.pageIndex)("nzPageSize",r.pageSize)("nzTotal",r.pageRowTotal)("className",r.paginationThemeClass))},dependencies:[ht,we,Ro],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 mt=(()=>{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=c({type:t,selectors:[["ng-component"]],standalone:!0,features:[f],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),l()()),o&2&&(m(2),pt(r.cellValue))},styles:[".ag-grid-button-style[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;width:90px;margin:4px;padding:8px 12px;font-weight:800;color:#e0e0e0;text-align:center;text-decoration:none;background-color:#1e4d6b;border:none;transition:background-color .3s,color .3s}.ag-grid-button-style[_ngcontent-%COMP%]:hover{color:#fff;text-decoration:underline;background-color:#3a6d8c}"]});let i=t;return i})();var fr=["*"],hi=(()=>{let t=class t{constructor(){this.showSetting=!1,this.optionsList=[],this.onCheckedItemsChange=new St,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=c({type:t,selectors:[["lj-data-v-card"]],inputs:{showSetting:"showSetting",optionsList:"optionsList",title:"title"},outputs:{onCheckedItemsChange:"onCheckedItemsChange"},standalone:!0,features:[f],ngContentSelectors:fr,decls:7,vars:1,consts:[[1,"card-content"],[1,"card-top-content"],[1,"card-content-title"],[1,"card-content-l"],["nz-icon","","nzType","setting","nzTheme","outline"]],template:function(o,r){o&1&&(Ot(),a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),g(4),l()(),s(5,"span",4),l(),Tt(6),l()),o&2&&(m(4),pt(r.title))},dependencies:[h,ie,oe,M,b,D,B,A,$,X,G,L,_,I,E,Y,j,R,V,C,ge,T,k,q,Q,y,v,H,F,O,U,w,N,W,P,x,S],styles:['.card-content-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;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-top-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:space-between}.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 gr=["myGrid"],Mi=(()=>{let t=class t{constructor(){this.title="",this.showSetting=!0,this.defaultColDef={width:130,editable:!1,headerClass:"ag-header-center",cellStyle:{"font-weight":"bold",textAlign:"center","justify-content":"center","line-height":"38px"}},this.columnDefs=[],this.rowData=[],this.gridThemeClass="ag-theme-quartz",this.paginationThemeClass="ag-theme-quartz",this.tableColumns=[{key:"sort",title:"\u5E8F\u53F7"},{key:"time",title:"\u65F6\u95F4"},{key:"option",title:"\u64CD\u4F5C"},{key:"optionDesc",title:"\u64CD\u4F5C\u63CF\u8FF0"},{key:"optionMan",title:"\u64CD\u4F5C\u4EBA\u5458"},{key:"mark",title:"\u5907\u6CE8"},{key:"edit",title:"\u7F16\u8F91"}],this.tableData=[{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u9501\u5B9A",optionDesc:"\u9501\u5B9A1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"},{sort:"1",time:"2024.1.12 18:23",option:"\u91CA\u653E",optionDesc:"\u91CA\u653E1\u53F7\u78C5",optionMan:"\u5F20\u4E09",mark:"\u65E9\u6668",edit:"\u6309\u94AE"}]}ngOnInit(){console.log("-----\u8868\u683C\u521D\u59CB\u5316-----"),this.title="\u5F85\u529E\u4EFB\u52A1",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=c({type:t,selectors:[["lj-app-ag-grid-component"]],viewQuery:function(o,r){if(o&1&&pe(gr,5),o&2){let u;ue(u=ce())&&(r.grid=u.first)}},inputs:{defaultColDef:"defaultColDef",columnDefs:"columnDefs",rowData:"rowData",gridThemeClass:"gridThemeClass",paginationThemeClass:"paginationThemeClass"},standalone:!0,features:[f],decls:4,vars:12,consts:[["nz-col","","nzSpan","24","nzXs","24","nzSm","24","nzMd","12","nzLg","12","nzXl","12","nzXXl","12",3,"title"],[3,"pagination","suppressPaginationPanel","suppressScrollOnNewData","paginationPageSize","defaultColDef","rowData","columnDefs","rowHeight"],["myGrid",""]],template:function(o,r){o&1&&(a(0,"lj-data-v-card",0),s(1,"ag-grid-angular",1,2)(3,"br"),l()),o&2&&(lt("title",r.title),m(),dt(r.gridThemeClass),p("pagination",!0)("suppressPaginationPanel",!0)("suppressPaginationPanel",!0)("suppressScrollOnNewData",!0)("paginationPageSize",r.pageSize)("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.columnDefs)("rowHeight",38))},dependencies:[ht,we,hi],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 hr=["myGrid"],Mr=()=>[12,12],vi=(()=>{let t=class t{constructor(e){this._mqttService=e,this.http=d(te),this.modal=d(ee),this.elementRef=d(st),this.titleService=d(gt),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,width:120,field:"rwmc"},{headerName:"\u4EFB\u52A1\u63CF\u8FF0",unSortIcon:!0,field:"rwms",width:120},{headerName:"\u5F00\u59CB\u65F6\u95F4",headerClass:"ag-header-center",unSortIcon:!0,field:"kssj",width:180},{headerName:"\u8BA1\u5212\u5B8C\u6210\u65F6\u95F4",unSortIcon:!0,field:"jhwcsj",width:180},{headerName:"\u8D85\u671F",width:70,field:"sfcq"},{headerName:"\u64CD\u4F5C",width:90,autoHeaderHeight:!0,field:"cz",cellRenderer:mt}],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:mt}],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:mt},{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:mt}],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=c({type:t,selectors:[["app-data-v-workstation"]],viewQuery:function(o,r){if(o&1&&pe(hr,5),o&2){let u;ue(u=ce())&&(r.grid=u.first)}},standalone:!0,features:[f],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),l(),a(4,"data-v-card",4),s(5,"app-ag-grid-component",3),l(),a(6,"data-v-card",5),s(7,"app-ag-grid-component",3),l()()),o&2&&(p("nzGutter",ut(14,Mr)),m(),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs1)("gridThemeClass",r.gridThemedClass),m(2),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs2),m(2),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs3),m(2),p("defaultColDef",r.defaultColDef)("rowData",r.rowData)("columnDefs",r.colDefs4))},dependencies:[gi,Mi,we,qo,b,D,B,A,$,X,G,L,_,I,E,Y,j,R,Lo,jo,V,C,T,k,q,Q,y,v,H,M,F,O,U,w,N,W,P,h,x,S],styles:[".ag-header-center[_ngcontent-%COMP%] .ag-header-group-cell-label[_ngcontent-%COMP%], .ag-header-center[_ngcontent-%COMP%] .ag-header-cell-label[_ngcontent-%COMP%]{display:grid;justify-content:center;color:#000;text-align:center;background:#000} .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 zi=[{path:"home",component:Uo,canActivate:[Io,Po],canActivateChild:[yo],data:{},children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"sys",loadChildren:()=>import("./chunk-MU3AQSF6.js").then(i=>i.routes)}]},{path:"",component:fi,children:[{path:"",component:vi},{path:"data-v",loadChildren:()=>import("./chunk-U3NGNWYP.js").then(i=>i.routes)}]},{path:"",loadChildren:()=>import("./chunk-TZPPFKXI.js").then(i=>i.routes)},{path:"exception",loadChildren:()=>import("./chunk-MUTNAUEH.js").then(i=>i.routes)},{path:"**",redirectTo:"exception/404"}];var Ci=[oo];var Ni=[to,io,ro,ao,no,lo,so,mo,po,fo,uo,co,go,ho];var wi={hostname:"127.0.0.1",port:1883,path:"/mqtt",protocol:"ws"},vr={abbr:"zh-CN",ng:Zo,zorro:zo,date:bt,delon:_o},zr={auth:{login_url:"/passport/login"}},Cr={},_i=[Zt(),Jt(),Qt({scrollPositionRestoration:"top"})];re.useHash&&_i.push(Yt());var bi=[Wt(Bt([...re.interceptorFns??[],So,To])),eo(),Ut(zi,..._i),bo({config:zr,defaultLang:vr,icons:[...Ni,...Ci]}),Kt(Cr),Oo(),Fo(...Xo),Ho(...$o),Wo({widgets:[...Go]}),{provide:se,useFactory:()=>new se(wi)},ko(),{provide:se,useFactory:()=>new se(wi)},...re.providers||[]];re.api?.refreshTokenEnabled&&re.api.refreshTokenType==="auth-refresh"&&bi.push(wt());var Di={providers:bi};Gt(Yo,Di).catch(i=>console.error(i));