@ecan-bi/pivot-table 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- /*! @ecan-bi/pivot-table@1.0.20 */
2
- (function(Jt,w){typeof exports=="object"&&typeof module!="undefined"?w(exports,require("vue"),require("lodash-es"),require("ant-design-vue/es/input-number/style"),require("ant-design-vue/es/form/style"),require("ant-design-vue"),require("echarts"),require("vuedraggable"),require("axios")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue/es/input-number/style","ant-design-vue/es/form/style","ant-design-vue","echarts","vuedraggable","axios"],w):(Jt=typeof globalThis!="undefined"?globalThis:Jt||self,w(Jt["@ecan-bi/pivot-table"]={},Jt.vue,Jt.lodashEs,null,null,Jt.antDesignVue,Jt.echarts,Jt.draggable,Jt.axios))})(this,function(Jt,w,ne,_n,lf,nn,af,As,Mo){"use strict";var vK=Object.defineProperty,bK=Object.defineProperties;var CK=Object.getOwnPropertyDescriptors;var rf=Object.getOwnPropertySymbols;var ZM=Object.prototype.hasOwnProperty,JM=Object.prototype.propertyIsEnumerable;var zl=Math.pow,qM=(Jt,w,ne)=>w in Jt?vK(Jt,w,{enumerable:!0,configurable:!0,writable:!0,value:ne}):Jt[w]=ne,Qe=(Jt,w)=>{for(var ne in w||(w={}))ZM.call(w,ne)&&qM(Jt,ne,w[ne]);if(rf)for(var ne of rf(w))JM.call(w,ne)&&qM(Jt,ne,w[ne]);return Jt},Oi=(Jt,w)=>bK(Jt,CK(w));var QM=(Jt,w)=>{var ne={};for(var _n in Jt)ZM.call(Jt,_n)&&w.indexOf(_n)<0&&(ne[_n]=Jt[_n]);if(Jt!=null&&rf)for(var _n of rf(Jt))w.indexOf(_n)<0&&JM.call(Jt,_n)&&(ne[_n]=Jt[_n]);return ne};var Ao=(Jt,w,ne)=>new Promise((_n,lf)=>{var nn=Mo=>{try{As(ne.next(Mo))}catch(Nl){lf(Nl)}},af=Mo=>{try{As(ne.throw(Mo))}catch(Nl){lf(Nl)}},As=Mo=>Mo.done?_n(Mo.value):Promise.resolve(Mo.value).then(nn,af);As((ne=ne.apply(Jt,w)).next())});function Nl(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const iB=Nl(af),nB=i=>(i.install=t=>{t.component(i.name,i)},i);var oB=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},cb={},rB={get exports(){return cb},set exports(i){cb=i}};(function(i,t){(function(e,n){i.exports=n()})(oB,function(){var e=1e3,n=6e4,o=36e5,r="millisecond",s="second",l="minute",a="hour",h="day",d="week",u="month",c="quarter",g="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var P=["th","st","nd","rd"],H=k%100;return"["+k+(P[(H-20)%10]||P[H]||P[0])+"]"}},S=function(k,P,H){var F=String(k);return!F||F.length>=P?k:""+Array(P+1-F.length).join(H)+k},_={s:S,z:function(k){var P=-k.utcOffset(),H=Math.abs(P),F=Math.floor(H/60),I=H%60;return(P<=0?"+":"-")+S(F,2,"0")+":"+S(I,2,"0")},m:function k(P,H){if(P.date()<H.date())return-k(H,P);var F=12*(H.year()-P.year())+(H.month()-P.month()),I=P.clone().add(F,u),L=H-I<0,O=P.clone().add(F+(L?-1:1),u);return+(-(F+(H-I)/(L?I-O:O-I))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:u,y:g,w:d,d:h,D:f,h:a,m:l,s,ms:r,Q:c}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},C="en",y={};y[C]=b;var R="$isDayjsObject",A=function(k){return k instanceof B||!(!k||!k[R])},x=function k(P,H,F){var I;if(!P)return C;if(typeof P=="string"){var L=P.toLowerCase();y[L]&&(I=L),H&&(y[L]=H,I=L);var O=P.split("-");if(!I&&O.length>1)return k(O[0])}else{var D=P.name;y[D]=P,I=D}return!F&&I&&(C=I),I||!F&&C},T=function(k,P){if(A(k))return k.clone();var H=typeof P=="object"?P:{};return H.date=k,H.args=arguments,new B(H)},M=_;M.l=x,M.i=A,M.w=function(k,P){return T(k,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var B=function(){function k(H){this.$L=x(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[R]=!0}var P=k.prototype;return P.parse=function(H){this.$d=function(F){var I=F.date,L=F.utc;if(I===null)return new Date(NaN);if(M.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var O=I.match(m);if(O){var D=O[2]-1||0,W=(O[7]||"0").substring(0,3);return L?new Date(Date.UTC(O[1],D,O[3]||1,O[4]||0,O[5]||0,O[6]||0,W)):new Date(O[1],D,O[3]||1,O[4]||0,O[5]||0,O[6]||0,W)}}return new Date(I)}(H),this.init()},P.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},P.$utils=function(){return M},P.isValid=function(){return this.$d.toString()!==p},P.isSame=function(H,F){var I=T(H);return this.startOf(F)<=I&&I<=this.endOf(F)},P.isAfter=function(H,F){return T(H)<this.startOf(F)},P.isBefore=function(H,F){return this.endOf(F)<T(H)},P.$g=function(H,F,I){return M.u(H)?this[F]:this.set(I,H)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(H,F){var I=this,L=!!M.u(F)||F,O=M.p(H),D=function(J,ot){var ut=M.w(I.$u?Date.UTC(I.$y,ot,J):new Date(I.$y,ot,J),I);return L?ut:ut.endOf(h)},W=function(J,ot){return M.w(I.toDate()[J].apply(I.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(ot)),I)},N=this.$W,V=this.$M,$=this.$D,K="set"+(this.$u?"UTC":"");switch(O){case g:return L?D(1,0):D(31,11);case u:return L?D(1,V):D(0,V+1);case d:var Y=this.$locale().weekStart||0,j=(N<Y?N+7:N)-Y;return D(L?$-j:$+(6-j),V);case h:case f:return W(K+"Hours",0);case a:return W(K+"Minutes",1);case l:return W(K+"Seconds",2);case s:return W(K+"Milliseconds",3);default:return this.clone()}},P.endOf=function(H){return this.startOf(H,!1)},P.$set=function(H,F){var I,L=M.p(H),O="set"+(this.$u?"UTC":""),D=(I={},I[h]=O+"Date",I[f]=O+"Date",I[u]=O+"Month",I[g]=O+"FullYear",I[a]=O+"Hours",I[l]=O+"Minutes",I[s]=O+"Seconds",I[r]=O+"Milliseconds",I)[L],W=L===h?this.$D+(F-this.$W):F;if(L===u||L===g){var N=this.clone().set(f,1);N.$d[D](W),N.init(),this.$d=N.set(f,Math.min(this.$D,N.daysInMonth())).$d}else D&&this.$d[D](W);return this.init(),this},P.set=function(H,F){return this.clone().$set(H,F)},P.get=function(H){return this[M.p(H)]()},P.add=function(H,F){var I,L=this;H=Number(H);var O=M.p(F),D=function(V){var $=T(L);return M.w($.date($.date()+Math.round(V*H)),L)};if(O===u)return this.set(u,this.$M+H);if(O===g)return this.set(g,this.$y+H);if(O===h)return D(1);if(O===d)return D(7);var W=(I={},I[l]=n,I[a]=o,I[s]=e,I)[O]||1,N=this.$d.getTime()+H*W;return M.w(N,this)},P.subtract=function(H,F){return this.add(-1*H,F)},P.format=function(H){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||p;var L=H||"YYYY-MM-DDTHH:mm:ssZ",O=M.z(this),D=this.$H,W=this.$m,N=this.$M,V=I.weekdays,$=I.months,K=I.meridiem,Y=function(ot,ut,bt,Z){return ot&&(ot[ut]||ot(F,L))||bt[ut].slice(0,Z)},j=function(ot){return M.s(D%12||12,ot,"0")},J=K||function(ot,ut,bt){var Z=ot<12?"AM":"PM";return bt?Z.toLowerCase():Z};return L.replace(v,function(ot,ut){return ut||function(bt){switch(bt){case"YY":return String(F.$y).slice(-2);case"YYYY":return M.s(F.$y,4,"0");case"M":return N+1;case"MM":return M.s(N+1,2,"0");case"MMM":return Y(I.monthsShort,N,$,3);case"MMMM":return Y($,N);case"D":return F.$D;case"DD":return M.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Y(I.weekdaysMin,F.$W,V,2);case"ddd":return Y(I.weekdaysShort,F.$W,V,3);case"dddd":return V[F.$W];case"H":return String(D);case"HH":return M.s(D,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return J(D,W,!0);case"A":return J(D,W,!1);case"m":return String(W);case"mm":return M.s(W,2,"0");case"s":return String(F.$s);case"ss":return M.s(F.$s,2,"0");case"SSS":return M.s(F.$ms,3,"0");case"Z":return O}return null}(ot)||O.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(H,F,I){var L,O=this,D=M.p(F),W=T(H),N=(W.utcOffset()-this.utcOffset())*n,V=this-W,$=function(){return M.m(O,W)};switch(D){case g:L=$()/12;break;case u:L=$();break;case c:L=$()/3;break;case d:L=(V-N)/6048e5;break;case h:L=(V-N)/864e5;break;case a:L=V/o;break;case l:L=V/n;break;case s:L=V/e;break;default:L=V}return I?L:M.a(L)},P.daysInMonth=function(){return this.endOf(u).$D},P.$locale=function(){return y[this.$L]},P.locale=function(H,F){if(!H)return this.$L;var I=this.clone(),L=x(H,F,!0);return L&&(I.$L=L),I},P.clone=function(){return M.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},k}(),E=B.prototype;return T.prototype=E,[["$ms",r],["$s",s],["$m",l],["$H",a],["$W",h],["$M",u],["$y",g],["$D",f]].forEach(function(k){E[k[1]]=function(P){return this.$g(P,k[0],k[1])}}),T.extend=function(k,P){return k.$i||(k(P,B,T),k.$i=!0),T},T.locale=x,T.isDayjs=A,T.unix=function(k){return T(1e3*k)},T.en=y[C],T.Ls=y,T.p={},T})})(rB);function gb(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(i);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(i,n[o])&&(e[n[o]]=i[n[o]])}return e}const sB=()=>{},lB=Object.assign,aB=Array.isArray,hf=i=>typeof i=="function",hB=i=>typeof i=="symbol";let fb;const df=()=>fb||(fb=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function uf(i){const t=i&&i.__v_raw;return t?uf(t):i}function pb(i){return!(!i||i.__v_isRef!==!0)}function Di(i){return pb(i)?i.value:i}new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(hB));const Ir=[];function cf(i,...t){if(process.env.NODE_ENV==="production")return;const e=Ir.length?Ir[Ir.length-1].component:null,n=e&&e.appContext.config.warnHandler,o=function(){let r=Ir[Ir.length-1];if(!r)return[];const s=[];for(;r;){const l=s[0];l&&l.vnode===r?l.recurseCount++:s.push({vnode:r,recurseCount:0});const a=r.component&&r.component.parent;r=a&&a.vnode}return s}();if(n)gf(n,e,11,[i+t.join(""),e&&e.proxy,o.map(({vnode:r})=>`at <${xb(e,r.type)}>`).join(`
1
+ /*! @ecan-bi/pivot-table@1.0.21 */
2
+ (function(Jt,w){typeof exports=="object"&&typeof module!="undefined"?w(exports,require("vue"),require("lodash-es"),require("ant-design-vue/lib/input-number/style"),require("ant-design-vue/lib/form/style"),require("ant-design-vue"),require("echarts"),require("vuedraggable"),require("axios")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue/lib/input-number/style","ant-design-vue/lib/form/style","ant-design-vue","echarts","vuedraggable","axios"],w):(Jt=typeof globalThis!="undefined"?globalThis:Jt||self,w(Jt["@ecan-bi/pivot-table"]={},Jt.vue,Jt.lodashEs,null,null,Jt.antDesignVue,Jt.echarts,Jt.draggable,Jt.axios))})(this,function(Jt,w,ne,_n,lf,nn,af,As,Mo){"use strict";var vK=Object.defineProperty,bK=Object.defineProperties;var CK=Object.getOwnPropertyDescriptors;var rf=Object.getOwnPropertySymbols;var ZM=Object.prototype.hasOwnProperty,JM=Object.prototype.propertyIsEnumerable;var zl=Math.pow,qM=(Jt,w,ne)=>w in Jt?vK(Jt,w,{enumerable:!0,configurable:!0,writable:!0,value:ne}):Jt[w]=ne,Qe=(Jt,w)=>{for(var ne in w||(w={}))ZM.call(w,ne)&&qM(Jt,ne,w[ne]);if(rf)for(var ne of rf(w))JM.call(w,ne)&&qM(Jt,ne,w[ne]);return Jt},Oi=(Jt,w)=>bK(Jt,CK(w));var QM=(Jt,w)=>{var ne={};for(var _n in Jt)ZM.call(Jt,_n)&&w.indexOf(_n)<0&&(ne[_n]=Jt[_n]);if(Jt!=null&&rf)for(var _n of rf(Jt))w.indexOf(_n)<0&&JM.call(Jt,_n)&&(ne[_n]=Jt[_n]);return ne};var Ao=(Jt,w,ne)=>new Promise((_n,lf)=>{var nn=Mo=>{try{As(ne.next(Mo))}catch(Nl){lf(Nl)}},af=Mo=>{try{As(ne.throw(Mo))}catch(Nl){lf(Nl)}},As=Mo=>Mo.done?_n(Mo.value):Promise.resolve(Mo.value).then(nn,af);As((ne=ne.apply(Jt,w)).next())});function Nl(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const iB=Nl(af),nB=i=>(i.install=t=>{t.component(i.name,i)},i);var oB=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},cb={},rB={get exports(){return cb},set exports(i){cb=i}};(function(i,t){(function(e,n){i.exports=n()})(oB,function(){var e=1e3,n=6e4,o=36e5,r="millisecond",s="second",l="minute",a="hour",h="day",d="week",u="month",c="quarter",g="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var P=["th","st","nd","rd"],H=k%100;return"["+k+(P[(H-20)%10]||P[H]||P[0])+"]"}},S=function(k,P,H){var F=String(k);return!F||F.length>=P?k:""+Array(P+1-F.length).join(H)+k},_={s:S,z:function(k){var P=-k.utcOffset(),H=Math.abs(P),F=Math.floor(H/60),I=H%60;return(P<=0?"+":"-")+S(F,2,"0")+":"+S(I,2,"0")},m:function k(P,H){if(P.date()<H.date())return-k(H,P);var F=12*(H.year()-P.year())+(H.month()-P.month()),I=P.clone().add(F,u),L=H-I<0,O=P.clone().add(F+(L?-1:1),u);return+(-(F+(H-I)/(L?I-O:O-I))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:u,y:g,w:d,d:h,D:f,h:a,m:l,s,ms:r,Q:c}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},C="en",y={};y[C]=b;var R="$isDayjsObject",A=function(k){return k instanceof B||!(!k||!k[R])},x=function k(P,H,F){var I;if(!P)return C;if(typeof P=="string"){var L=P.toLowerCase();y[L]&&(I=L),H&&(y[L]=H,I=L);var O=P.split("-");if(!I&&O.length>1)return k(O[0])}else{var D=P.name;y[D]=P,I=D}return!F&&I&&(C=I),I||!F&&C},T=function(k,P){if(A(k))return k.clone();var H=typeof P=="object"?P:{};return H.date=k,H.args=arguments,new B(H)},M=_;M.l=x,M.i=A,M.w=function(k,P){return T(k,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var B=function(){function k(H){this.$L=x(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[R]=!0}var P=k.prototype;return P.parse=function(H){this.$d=function(F){var I=F.date,L=F.utc;if(I===null)return new Date(NaN);if(M.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var O=I.match(m);if(O){var D=O[2]-1||0,W=(O[7]||"0").substring(0,3);return L?new Date(Date.UTC(O[1],D,O[3]||1,O[4]||0,O[5]||0,O[6]||0,W)):new Date(O[1],D,O[3]||1,O[4]||0,O[5]||0,O[6]||0,W)}}return new Date(I)}(H),this.init()},P.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},P.$utils=function(){return M},P.isValid=function(){return this.$d.toString()!==p},P.isSame=function(H,F){var I=T(H);return this.startOf(F)<=I&&I<=this.endOf(F)},P.isAfter=function(H,F){return T(H)<this.startOf(F)},P.isBefore=function(H,F){return this.endOf(F)<T(H)},P.$g=function(H,F,I){return M.u(H)?this[F]:this.set(I,H)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(H,F){var I=this,L=!!M.u(F)||F,O=M.p(H),D=function(J,ot){var ut=M.w(I.$u?Date.UTC(I.$y,ot,J):new Date(I.$y,ot,J),I);return L?ut:ut.endOf(h)},W=function(J,ot){return M.w(I.toDate()[J].apply(I.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(ot)),I)},N=this.$W,V=this.$M,$=this.$D,K="set"+(this.$u?"UTC":"");switch(O){case g:return L?D(1,0):D(31,11);case u:return L?D(1,V):D(0,V+1);case d:var Y=this.$locale().weekStart||0,j=(N<Y?N+7:N)-Y;return D(L?$-j:$+(6-j),V);case h:case f:return W(K+"Hours",0);case a:return W(K+"Minutes",1);case l:return W(K+"Seconds",2);case s:return W(K+"Milliseconds",3);default:return this.clone()}},P.endOf=function(H){return this.startOf(H,!1)},P.$set=function(H,F){var I,L=M.p(H),O="set"+(this.$u?"UTC":""),D=(I={},I[h]=O+"Date",I[f]=O+"Date",I[u]=O+"Month",I[g]=O+"FullYear",I[a]=O+"Hours",I[l]=O+"Minutes",I[s]=O+"Seconds",I[r]=O+"Milliseconds",I)[L],W=L===h?this.$D+(F-this.$W):F;if(L===u||L===g){var N=this.clone().set(f,1);N.$d[D](W),N.init(),this.$d=N.set(f,Math.min(this.$D,N.daysInMonth())).$d}else D&&this.$d[D](W);return this.init(),this},P.set=function(H,F){return this.clone().$set(H,F)},P.get=function(H){return this[M.p(H)]()},P.add=function(H,F){var I,L=this;H=Number(H);var O=M.p(F),D=function(V){var $=T(L);return M.w($.date($.date()+Math.round(V*H)),L)};if(O===u)return this.set(u,this.$M+H);if(O===g)return this.set(g,this.$y+H);if(O===h)return D(1);if(O===d)return D(7);var W=(I={},I[l]=n,I[a]=o,I[s]=e,I)[O]||1,N=this.$d.getTime()+H*W;return M.w(N,this)},P.subtract=function(H,F){return this.add(-1*H,F)},P.format=function(H){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||p;var L=H||"YYYY-MM-DDTHH:mm:ssZ",O=M.z(this),D=this.$H,W=this.$m,N=this.$M,V=I.weekdays,$=I.months,K=I.meridiem,Y=function(ot,ut,bt,Z){return ot&&(ot[ut]||ot(F,L))||bt[ut].slice(0,Z)},j=function(ot){return M.s(D%12||12,ot,"0")},J=K||function(ot,ut,bt){var Z=ot<12?"AM":"PM";return bt?Z.toLowerCase():Z};return L.replace(v,function(ot,ut){return ut||function(bt){switch(bt){case"YY":return String(F.$y).slice(-2);case"YYYY":return M.s(F.$y,4,"0");case"M":return N+1;case"MM":return M.s(N+1,2,"0");case"MMM":return Y(I.monthsShort,N,$,3);case"MMMM":return Y($,N);case"D":return F.$D;case"DD":return M.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Y(I.weekdaysMin,F.$W,V,2);case"ddd":return Y(I.weekdaysShort,F.$W,V,3);case"dddd":return V[F.$W];case"H":return String(D);case"HH":return M.s(D,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return J(D,W,!0);case"A":return J(D,W,!1);case"m":return String(W);case"mm":return M.s(W,2,"0");case"s":return String(F.$s);case"ss":return M.s(F.$s,2,"0");case"SSS":return M.s(F.$ms,3,"0");case"Z":return O}return null}(ot)||O.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(H,F,I){var L,O=this,D=M.p(F),W=T(H),N=(W.utcOffset()-this.utcOffset())*n,V=this-W,$=function(){return M.m(O,W)};switch(D){case g:L=$()/12;break;case u:L=$();break;case c:L=$()/3;break;case d:L=(V-N)/6048e5;break;case h:L=(V-N)/864e5;break;case a:L=V/o;break;case l:L=V/n;break;case s:L=V/e;break;default:L=V}return I?L:M.a(L)},P.daysInMonth=function(){return this.endOf(u).$D},P.$locale=function(){return y[this.$L]},P.locale=function(H,F){if(!H)return this.$L;var I=this.clone(),L=x(H,F,!0);return L&&(I.$L=L),I},P.clone=function(){return M.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},k}(),E=B.prototype;return T.prototype=E,[["$ms",r],["$s",s],["$m",l],["$H",a],["$W",h],["$M",u],["$y",g],["$D",f]].forEach(function(k){E[k[1]]=function(P){return this.$g(P,k[0],k[1])}}),T.extend=function(k,P){return k.$i||(k(P,B,T),k.$i=!0),T},T.locale=x,T.isDayjs=A,T.unix=function(k){return T(1e3*k)},T.en=y[C],T.Ls=y,T.p={},T})})(rB);function gb(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(i);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(i,n[o])&&(e[n[o]]=i[n[o]])}return e}const sB=()=>{},lB=Object.assign,aB=Array.isArray,hf=i=>typeof i=="function",hB=i=>typeof i=="symbol";let fb;const df=()=>fb||(fb=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function uf(i){const t=i&&i.__v_raw;return t?uf(t):i}function pb(i){return!(!i||i.__v_isRef!==!0)}function Di(i){return pb(i)?i.value:i}new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(hB));const Ir=[];function cf(i,...t){if(process.env.NODE_ENV==="production")return;const e=Ir.length?Ir[Ir.length-1].component:null,n=e&&e.appContext.config.warnHandler,o=function(){let r=Ir[Ir.length-1];if(!r)return[];const s=[];for(;r;){const l=s[0];l&&l.vnode===r?l.recurseCount++:s.push({vnode:r,recurseCount:0});const a=r.component&&r.component.parent;r=a&&a.vnode}return s}();if(n)gf(n,e,11,[i+t.join(""),e&&e.proxy,o.map(({vnode:r})=>`at <${xb(e,r.type)}>`).join(`
3
3
  `),o]);else{const r=[`[Vue warn]: ${i}`,...t];o.length&&r.push(`
4
4
  `,...function(s){const l=[];return s.forEach((a,h)=>{l.push(...h===0?[]:[`
5
5
  `],...function({vnode:d,recurseCount:u}){const c=u>0?`... (${u} recursive calls)`:"",g=!!d.component&&d.component.parent==null,f=` at <${xb(d.component,d.type,g)}`,p=">"+c;return d.props?[f,...dB(d.props),p]:[f+p]}(a))}),l}(o)),console.warn(...r)}}function dB(i){const t=[],e=Object.keys(i);return e.slice(0,3).forEach(n=>{t.push(...mb(n,i[n]))}),e.length>3&&t.push(" ..."),t}function mb(i,t,e){return typeof t=="string"?(t=JSON.stringify(t),e?t:[`${i}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?e?t:[`${i}=${t}`]:pb(t)?(t=mb(i,uf(t.value),!0),e?t:[`${i}=Ref<`,t,">"]):hf(t)?[`${i}=fn${t.name?`<${t.name}>`:""}`]:(t=uf(t),e?t:[`${i}=`,t])}const vb={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function gf(i,t,e,n){let o;try{o=n?i(...n):i()}catch(r){(function(s,l,a,h=!0){const d=l?l.vnode:null;if(l){let u=l.parent;const c=l.proxy,g=process.env.NODE_ENV!=="production"?vb[a]:a;for(;u;){const p=u.ec;if(p){for(let m=0;m<p.length;m++)if(p[m](s,c,g)===!1)return}u=u.parent}const f=l.appContext.config.errorHandler;if(f)return void gf(f,null,10,[s,c,g])}(function(u,c,g,f=!0){if(process.env.NODE_ENV!=="production"){const m=vb[c];if(g&&(p=g,Ir.push(p)),cf("Unhandled error"+(m?` during execution of ${m}`:"")),g&&Ir.pop(),f)throw u;console.error(u)}else console.error(u);var p})(s,a,d,h)})(r,t,e)}return o}let jh=!1,ff=!1;const Vn=[];let lr=0;const Ts=[];let so=null,ar=0;const uB=Promise.resolve();function cB(i){Vn.length&&Vn.includes(i,jh&&i.allowRecurse?lr+1:lr)||(i.id==null?Vn.push(i):Vn.splice(function(t){let e=lr+1,n=Vn.length;for(;e<n;){const o=e+n>>>1,r=Vn[o],s=Vl(r);s<t||s===t&&r.pre?e=o+1:n=o}return e}(i.id),0,i),bb())}function bb(){jh||ff||(ff=!0,uB.then(Cb))}const Vl=i=>i.id==null?1/0:i.id,gB=(i,t)=>{const e=Vl(i)-Vl(t);if(e===0){if(i.pre&&!t.pre)return-1;if(t.pre&&!i.pre)return 1}return e};function Cb(i){ff=!1,jh=!0,process.env.NODE_ENV!=="production"&&(i=i||new Map),Vn.sort(gB);const t=process.env.NODE_ENV!=="production"?e=>yb(i,e):sB;try{for(lr=0;lr<Vn.length;lr++){const e=Vn[lr];if(e&&e.active!==!1){if(process.env.NODE_ENV!=="production"&&t(e))continue;gf(e,null,14)}}}finally{lr=0,Vn.length=0,function(e){if(Ts.length){const n=[...new Set(Ts)];if(Ts.length=0,so)return void so.push(...n);for(so=n,process.env.NODE_ENV!=="production"&&(e=e||new Map),so.sort((o,r)=>Vl(o)-Vl(r)),ar=0;ar<so.length;ar++)process.env.NODE_ENV!=="production"&&yb(e,so[ar])||so[ar]();so=null,ar=0}}(i),jh=!1,(Vn.length||Ts.length)&&Cb(i)}}function yb(i,t){if(i.has(t)){const e=i.get(t);if(e>100){const n=t.ownerInstance,o=n&&Sb(n.type);return cf(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}i.set(t,e+1)}else i.set(t,1)}const jl=new Set;process.env.NODE_ENV!=="production"&&(df().__VUE_HMR_RUNTIME__={createRecord:pf(function(i,t){return $h.has(i)?!1:($h.set(i,{initialDef:$l(t),instances:new Set}),!0)}),rerender:pf(function(i,t){const e=$h.get(i);e&&(e.initialDef.render=t,[...e.instances].forEach(n=>{t&&(n.render=t,$l(n.type).render=t),n.renderCache=[],n.update()}))}),reload:pf(function(i,t){const e=$h.get(i);if(!e)return;t=$l(t),_b(e.initialDef,t);const n=[...e.instances];for(const r of n){const s=$l(r.type);jl.has(s)||(s!==e.initialDef&&_b(s,t),jl.add(s)),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(jl.add(s),r.ceReload(t.styles),jl.delete(s)):r.parent?cB(r.parent.update):r.appContext.reload?r.appContext.reload():typeof window!="undefined"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}o=()=>{for(const r of n)jl.delete($l(r.type))},aB(o)?Ts.push(...o):so&&so.includes(o,o.allowRecurse?ar+1:ar)||Ts.push(o),bb();var o})});const $h=new Map;function $l(i){return hf(t=i)&&"__vccOpts"in t?i.__vccOpts:i;var t}function _b(i,t){lB(i,t);for(const e in i)e==="__file"||e in t||delete i[e]}function pf(i){return(t,e)=>{try{return i(t,e)}catch(n){console.error(n),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let mf;process.env.NODE_ENV;let wb="__VUE_INSTANCE_SETTERS__";(mf=df()[wb])||(mf=df()[wb]=[]),mf.push(i=>i);const fB=/(?:^|[-_])(\w)/g,pB=i=>i.replace(fB,t=>t.toUpperCase()).replace(/[-_]/g,"");function Sb(i,t=!0){return hf(i)?i.displayName||i.name:i.name||t&&i.__name}function xb(i,t,e=!1){let n=Sb(t);if(!n&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(n=o[1])}if(!n&&i&&i.parent){const o=r=>{for(const s in r)if(r[s]===t)return s};n=o(i.components||i.parent.type.components)||o(i.appContext.components)}return n?pB(n):e?"App":"Anonymous"}function mB(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Rb,Ab={exports:{}};function vB(){return Rb||(Rb=1,Ab.exports=function(){var i=1e3,t=6e4,e=36e5,n="millisecond",o="second",r="minute",s="hour",l="day",a="week",h="month",d="quarter",u="year",c="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var E=["th","st","nd","rd"],k=B%100;return"["+B+(E[(k-20)%10]||E[k]||E[0])+"]"}},v=function(B,E,k){var P=String(B);return!P||P.length>=E?B:""+Array(E+1-P.length).join(k)+B},b={s:v,z:function(B){var E=-B.utcOffset(),k=Math.abs(E),P=Math.floor(k/60),H=k%60;return(E<=0?"+":"-")+v(P,2,"0")+":"+v(H,2,"0")},m:function B(E,k){if(E.date()<k.date())return-B(k,E);var P=12*(k.year()-E.year())+(k.month()-E.month()),H=E.clone().add(P,h),F=k-H<0,I=E.clone().add(P+(F?-1:1),h);return+(-(P+(k-H)/(F?H-I:I-H))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:h,y:u,w:a,d:l,D:c,h:s,m:r,s:o,ms:n,Q:d}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},S="en",_={};_[S]=m;var C="$isDayjsObject",y=function(B){return B instanceof T||!(!B||!B[C])},R=function B(E,k,P){var H;if(!E)return S;if(typeof E=="string"){var F=E.toLowerCase();_[F]&&(H=F),k&&(_[F]=k,H=F);var I=E.split("-");if(!H&&I.length>1)return B(I[0])}else{var L=E.name;_[L]=E,H=L}return!P&&H&&(S=H),H||!P&&S},A=function(B,E){if(y(B))return B.clone();var k=typeof E=="object"?E:{};return k.date=B,k.args=arguments,new T(k)},x=b;x.l=R,x.i=y,x.w=function(B,E){return A(B,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var T=function(){function B(k){this.$L=R(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[C]=!0}var E=B.prototype;return E.parse=function(k){this.$d=function(P){var H=P.date,F=P.utc;if(H===null)return new Date(NaN);if(x.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var I=H.match(f);if(I){var L=I[2]-1||0,O=(I[7]||"0").substring(0,3);return F?new Date(Date.UTC(I[1],L,I[3]||1,I[4]||0,I[5]||0,I[6]||0,O)):new Date(I[1],L,I[3]||1,I[4]||0,I[5]||0,I[6]||0,O)}}return new Date(H)}(k),this.init()},E.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},E.$utils=function(){return x},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(k,P){var H=A(k);return this.startOf(P)<=H&&H<=this.endOf(P)},E.isAfter=function(k,P){return A(k)<this.startOf(P)},E.isBefore=function(k,P){return this.endOf(P)<A(k)},E.$g=function(k,P,H){return x.u(k)?this[P]:this.set(H,k)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(k,P){var H=this,F=!!x.u(P)||P,I=x.p(k),L=function(Y,j){var J=x.w(H.$u?Date.UTC(H.$y,j,Y):new Date(H.$y,j,Y),H);return F?J:J.endOf(l)},O=function(Y,j){return x.w(H.toDate()[Y].apply(H.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(j)),H)},D=this.$W,W=this.$M,N=this.$D,V="set"+(this.$u?"UTC":"");switch(I){case u:return F?L(1,0):L(31,11);case h:return F?L(1,W):L(0,W+1);case a:var $=this.$locale().weekStart||0,K=(D<$?D+7:D)-$;return L(F?N-K:N+(6-K),W);case l:case c:return O(V+"Hours",0);case s:return O(V+"Minutes",1);case r:return O(V+"Seconds",2);case o:return O(V+"Milliseconds",3);default:return this.clone()}},E.endOf=function(k){return this.startOf(k,!1)},E.$set=function(k,P){var H,F=x.p(k),I="set"+(this.$u?"UTC":""),L=(H={},H[l]=I+"Date",H[c]=I+"Date",H[h]=I+"Month",H[u]=I+"FullYear",H[s]=I+"Hours",H[r]=I+"Minutes",H[o]=I+"Seconds",H[n]=I+"Milliseconds",H)[F],O=F===l?this.$D+(P-this.$W):P;if(F===h||F===u){var D=this.clone().set(c,1);D.$d[L](O),D.init(),this.$d=D.set(c,Math.min(this.$D,D.daysInMonth())).$d}else L&&this.$d[L](O);return this.init(),this},E.set=function(k,P){return this.clone().$set(k,P)},E.get=function(k){return this[x.p(k)]()},E.add=function(k,P){var H,F=this;k=Number(k);var I=x.p(P),L=function(W){var N=A(F);return x.w(N.date(N.date()+Math.round(W*k)),F)};if(I===h)return this.set(h,this.$M+k);if(I===u)return this.set(u,this.$y+k);if(I===l)return L(1);if(I===a)return L(7);var O=(H={},H[r]=t,H[s]=e,H[o]=i,H)[I]||1,D=this.$d.getTime()+k*O;return x.w(D,this)},E.subtract=function(k,P){return this.add(-1*k,P)},E.format=function(k){var P=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var F=k||"YYYY-MM-DDTHH:mm:ssZ",I=x.z(this),L=this.$H,O=this.$m,D=this.$M,W=H.weekdays,N=H.months,V=H.meridiem,$=function(j,J,ot,ut){return j&&(j[J]||j(P,F))||ot[J].slice(0,ut)},K=function(j){return x.s(L%12||12,j,"0")},Y=V||function(j,J,ot){var ut=j<12?"AM":"PM";return ot?ut.toLowerCase():ut};return F.replace(p,function(j,J){return J||function(ot){switch(ot){case"YY":return String(P.$y).slice(-2);case"YYYY":return x.s(P.$y,4,"0");case"M":return D+1;case"MM":return x.s(D+1,2,"0");case"MMM":return $(H.monthsShort,D,N,3);case"MMMM":return $(N,D);case"D":return P.$D;case"DD":return x.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return $(H.weekdaysMin,P.$W,W,2);case"ddd":return $(H.weekdaysShort,P.$W,W,3);case"dddd":return W[P.$W];case"H":return String(L);case"HH":return x.s(L,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return Y(L,O,!0);case"A":return Y(L,O,!1);case"m":return String(O);case"mm":return x.s(O,2,"0");case"s":return String(P.$s);case"ss":return x.s(P.$s,2,"0");case"SSS":return x.s(P.$ms,3,"0");case"Z":return I}return null}(j)||I.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(k,P,H){var F,I=this,L=x.p(P),O=A(k),D=(O.utcOffset()-this.utcOffset())*t,W=this-O,N=function(){return x.m(I,O)};switch(L){case u:F=N()/12;break;case h:F=N();break;case d:F=N()/3;break;case a:F=(W-D)/6048e5;break;case l:F=(W-D)/864e5;break;case s:F=W/e;break;case r:F=W/t;break;case o:F=W/i;break;default:F=W}return H?F:x.a(F)},E.daysInMonth=function(){return this.endOf(h).$D},E.$locale=function(){return _[this.$L]},E.locale=function(k,P){if(!k)return this.$L;var H=this.clone(),F=R(k,P,!0);return F&&(H.$L=F),H},E.clone=function(){return x.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},B}(),M=T.prototype;return A.prototype=M,[["$ms",n],["$s",o],["$m",r],["$H",s],["$W",l],["$M",h],["$y",u],["$D",c]].forEach(function(B){M[B[1]]=function(E){return this.$g(E,B[0],B[1])}}),A.extend=function(B,E){return B.$i||(B(E,T,A),B.$i=!0),A},A.locale=R,A.isDayjs=y,A.unix=function(B){return A(1e3*B)},A.en=_[S],A.Ls=_,A.p={},A}()),Ab.exports}var lo=mB(vB()),Tb=typeof global=="object"&&global&&global.Object===Object&&global,bB=typeof self=="object"&&self&&self.Object===Object&&self,Bo=Tb||bB||Function("return this")(),Ms=Bo.Symbol,Mb=Object.prototype,CB=Mb.hasOwnProperty,yB=Mb.toString,Gl=Ms?Ms.toStringTag:void 0,_B=Object.prototype.toString,Bb=Ms?Ms.toStringTag:void 0;function Ul(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Bb&&Bb in Object(i)?function(t){var e=CB.call(t,Gl),n=t[Gl];try{t[Gl]=void 0;var o=!0}catch(s){}var r=yB.call(t);return o&&(e?t[Gl]=n:delete t[Gl]),r}(i):function(t){return _B.call(t)}(i)}function Kl(i){return i!=null&&typeof i=="object"}var vf=Array.isArray;function Gh(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}function Pb(i){if(!Gh(i))return!1;var t=Ul(i);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"}var Hb,bf=Bo["__core-js_shared__"],Eb=(Hb=/[^.]+$/.exec(bf&&bf.keys&&bf.keys.IE_PROTO||""))?"Symbol(src)_1."+Hb:"",wB=Function.prototype.toString;function Or(i){if(i!=null){try{return wB.call(i)}catch(t){}try{return i+""}catch(t){}}return""}var SB=/^\[object .+?Constructor\]$/,xB=Function.prototype,RB=Object.prototype,AB=xB.toString,TB=RB.hasOwnProperty,MB=RegExp("^"+AB.call(TB).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function BB(i){return!(!Gh(i)||(t=i,Eb&&Eb in t))&&(Pb(i)?MB:SB).test(Or(i));var t}function Dr(i,t){var e=function(n,o){return n==null?void 0:n[o]}(i,t);return BB(e)?e:void 0}var Cf=Dr(Bo,"WeakMap"),Lb=Object.create,PB=function(){function i(){}return function(t){if(!Gh(t))return{};if(Lb)return Lb(t);i.prototype=t;var e=new i;return i.prototype=void 0,e}}(),kb=function(){try{var i=Dr(Object,"defineProperty");return i({},"",{}),i}catch(t){}}(),HB=/^(?:0|[1-9]\d*)$/;function EB(i,t){var e=typeof i;return!!(t=t==null?9007199254740991:t)&&(e=="number"||e!="symbol"&&HB.test(i))&&i>-1&&i%1==0&&i<t}function Fb(i,t){return i===t||i!=i&&t!=t}var LB=Object.prototype.hasOwnProperty;function kB(i,t,e){var n=i[t];LB.call(i,t)&&Fb(n,e)&&(e!==void 0||t in i)||function(o,r,s){r=="__proto__"&&kb?kb(o,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):o[r]=s}(i,t,e)}function Ib(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=9007199254740991}var FB=Object.prototype;function Ob(i){var t=i&&i.constructor;return i===(typeof t=="function"&&t.prototype||FB)}function Db(i){return Kl(i)&&Ul(i)=="[object Arguments]"}var zb=Object.prototype,IB=zb.hasOwnProperty,OB=zb.propertyIsEnumerable,DB=Db(function(){return arguments}())?Db:function(i){return Kl(i)&&IB.call(i,"callee")&&!OB.call(i,"callee")},Wb=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,Nb=Wb&&typeof module=="object"&&module&&!module.nodeType&&module,Vb=Nb&&Nb.exports===Wb?Bo.Buffer:void 0,jb=(Vb?Vb.isBuffer:void 0)||function(){return!1},De={};function yf(i){return function(t){return i(t)}}De["[object Float32Array]"]=De["[object Float64Array]"]=De["[object Int8Array]"]=De["[object Int16Array]"]=De["[object Int32Array]"]=De["[object Uint8Array]"]=De["[object Uint8ClampedArray]"]=De["[object Uint16Array]"]=De["[object Uint32Array]"]=!0,De["[object Arguments]"]=De["[object Array]"]=De["[object ArrayBuffer]"]=De["[object Boolean]"]=De["[object DataView]"]=De["[object Date]"]=De["[object Error]"]=De["[object Function]"]=De["[object Map]"]=De["[object Number]"]=De["[object Object]"]=De["[object RegExp]"]=De["[object Set]"]=De["[object String]"]=De["[object WeakMap]"]=!1;var $b=typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,Yl=$b&&typeof module=="object"&&module&&!module.nodeType&&module,_f=Yl&&Yl.exports===$b&&Tb.process,Bs=function(){try{var i=Yl&&Yl.require&&Yl.require("util").types;return i||_f&&_f.binding&&_f.binding("util")}catch(t){}}(),Gb=Bs&&Bs.isTypedArray,zB=Gb?yf(Gb):function(i){return Kl(i)&&Ib(i.length)&&!!De[Ul(i)]},WB=Object.prototype.hasOwnProperty;function NB(i,t){var e=vf(i),n=!e&&DB(i),o=!e&&!n&&jb(i),r=!e&&!n&&!o&&zB(i),s=e||n||o||r,l=s?function(d,u){for(var c=-1,g=Array(d);++c<d;)g[c]=u(c);return g}(i.length,String):[],a=l.length;for(var h in i)!WB.call(i,h)||s&&(h=="length"||o&&(h=="offset"||h=="parent")||r&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||EB(h,a))||l.push(h);return l}function Ub(i,t){return function(e){return i(t(e))}}var VB=Ub(Object.keys,Object),jB=Object.prototype.hasOwnProperty;function $B(i){return(t=i)!=null&&Ib(t.length)&&!Pb(t)?NB(i):function(e){if(!Ob(e))return VB(e);var n=[];for(var o in Object(e))jB.call(e,o)&&o!="constructor"&&n.push(o);return n}(i);var t}var Xl=Dr(Object,"create"),GB=Object.prototype.hasOwnProperty,UB=Object.prototype.hasOwnProperty;function zr(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function Uh(i,t){for(var e=i.length;e--;)if(Fb(i[e][0],t))return e;return-1}zr.prototype.clear=function(){this.__data__=Xl?Xl(null):{},this.size=0},zr.prototype.delete=function(i){var t=this.has(i)&&delete this.__data__[i];return this.size-=t?1:0,t},zr.prototype.get=function(i){var t=this.__data__;if(Xl){var e=t[i];return e==="__lodash_hash_undefined__"?void 0:e}return GB.call(t,i)?t[i]:void 0},zr.prototype.has=function(i){var t=this.__data__;return Xl?t[i]!==void 0:UB.call(t,i)},zr.prototype.set=function(i,t){var e=this.__data__;return this.size+=this.has(i)?0:1,e[i]=Xl&&t===void 0?"__lodash_hash_undefined__":t,this};var KB=Array.prototype.splice;function Po(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}Po.prototype.clear=function(){this.__data__=[],this.size=0},Po.prototype.delete=function(i){var t=this.__data__,e=Uh(t,i);return!(e<0)&&(e==t.length-1?t.pop():KB.call(t,e,1),--this.size,!0)},Po.prototype.get=function(i){var t=this.__data__,e=Uh(t,i);return e<0?void 0:t[e][1]},Po.prototype.has=function(i){return Uh(this.__data__,i)>-1},Po.prototype.set=function(i,t){var e=this.__data__,n=Uh(e,i);return n<0?(++this.size,e.push([i,t])):e[n][1]=t,this};var ql=Dr(Bo,"Map");function Kh(i,t){var e,n,o=i.__data__;return((n=typeof(e=t))=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null)?o[typeof t=="string"?"string":"hash"]:o.map}function Ps(i){var t=-1,e=i==null?0:i.length;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}Ps.prototype.clear=function(){this.size=0,this.__data__={hash:new zr,map:new(ql||Po),string:new zr}},Ps.prototype.delete=function(i){var t=Kh(this,i).delete(i);return this.size-=t?1:0,t},Ps.prototype.get=function(i){return Kh(this,i).get(i)},Ps.prototype.has=function(i){return Kh(this,i).has(i)},Ps.prototype.set=function(i,t){var e=Kh(this,i),n=e.size;return e.set(i,t),this.size+=e.size==n?0:1,this};var YB=Ub(Object.getPrototypeOf,Object);function Hs(i){var t=this.__data__=new Po(i);this.size=t.size}Hs.prototype.clear=function(){this.__data__=new Po,this.size=0},Hs.prototype.delete=function(i){var t=this.__data__,e=t.delete(i);return this.size=t.size,e},Hs.prototype.get=function(i){return this.__data__.get(i)},Hs.prototype.has=function(i){return this.__data__.has(i)},Hs.prototype.set=function(i,t){var e=this.__data__;if(e instanceof Po){var n=e.__data__;if(!ql||n.length<199)return n.push([i,t]),this.size=++e.size,this;e=this.__data__=new Ps(n)}return e.set(i,t),this.size=e.size,this};var XB=Object.prototype.propertyIsEnumerable,Kb=Object.getOwnPropertySymbols,qB=Kb?function(i){return i==null?[]:(i=Object(i),function(t,e){for(var n=-1,o=t==null?0:t.length,r=0,s=[];++n<o;){var l=t[n];e(l,n,t)&&(s[r++]=l)}return s}(Kb(i),function(t){return XB.call(i,t)}))}:function(){return[]};function ZB(i){return function(t,e,n){var o=e(t);return vf(t)?o:function(r,s){for(var l=-1,a=s.length,h=r.length;++l<a;)r[h+l]=s[l];return r}(o,n(t))}(i,$B,qB)}var wf=Dr(Bo,"DataView"),Sf=Dr(Bo,"Promise"),xf=Dr(Bo,"Set"),Yb="[object Map]",Xb="[object Promise]",qb="[object Set]",Zb="[object WeakMap]",Jb="[object DataView]",JB=Or(wf),QB=Or(ql),tP=Or(Sf),eP=Or(xf),iP=Or(Cf),Ho=Ul;(wf&&Ho(new wf(new ArrayBuffer(1)))!=Jb||ql&&Ho(new ql)!=Yb||Sf&&Ho(Sf.resolve())!=Xb||xf&&Ho(new xf)!=qb||Cf&&Ho(new Cf)!=Zb)&&(Ho=function(i){var t=Ul(i),e=t=="[object Object]"?i.constructor:void 0,n=e?Or(e):"";if(n)switch(n){case JB:return Jb;case QB:return Yb;case tP:return Xb;case eP:return qb;case iP:return Zb}return t});var nP=Object.prototype.hasOwnProperty,Qb=Bo.Uint8Array;function Rf(i){var t=new i.constructor(i.byteLength);return new Qb(t).set(new Qb(i)),t}var oP=/\w*$/,tC=Ms?Ms.prototype:void 0,eC=tC?tC.valueOf:void 0;function rP(i,t,e){var n,o,r,s,l,a=i.constructor;switch(t){case"[object ArrayBuffer]":return Rf(i);case"[object Boolean]":case"[object Date]":return new a(+i);case"[object DataView]":return l=Rf((s=i).buffer),new s.constructor(l,s.byteOffset,s.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(h){var d=Rf(h.buffer);return new h.constructor(d,h.byteOffset,h.length)}(i);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(i);case"[object RegExp]":return(r=new(o=i).constructor(o.source,oP.exec(o))).lastIndex=o.lastIndex,r;case"[object Symbol]":return n=i,eC?Object(eC.call(n)):{}}}var iC=Bs&&Bs.isMap,sP=iC?yf(iC):function(i){return Kl(i)&&Ho(i)=="[object Map]"},nC=Bs&&Bs.isSet,lP=nC?yf(nC):function(i){return Kl(i)&&Ho(i)=="[object Set]"},oC="[object Arguments]",rC="[object Function]",sC="[object Object]",Ie={};function Yh(i,t,e,n,o,r){var s;if(s!==void 0)return s;if(!Gh(i))return i;var l=vf(i);if(l)s=function(c){var g=c.length,f=new c.constructor(g);return g&&typeof c[0]=="string"&&nP.call(c,"index")&&(f.index=c.index,f.input=c.input),f}(i);else{var a=Ho(i),h=a==rC||a=="[object GeneratorFunction]";if(jb(i))return i.slice();if(a==sC||a==oC||h&&!o)s=h?{}:function(c){return typeof c.constructor!="function"||Ob(c)?{}:PB(YB(c))}(i);else{if(!Ie[a])return o?i:{};s=rP(i,a)}}r||(r=new Hs);var d=r.get(i);if(d)return d;r.set(i,s),lP(i)?i.forEach(function(c){s.add(Yh(c,t,e,c,i,r))}):sP(i)&&i.forEach(function(c,g){s.set(g,Yh(c,t,e,g,i,r))});var u=l?void 0:ZB(i);return function(c,g){for(var f=-1,p=c==null?0:c.length;++f<p&&g(c[f],f,c)!==!1;);}(u||i,function(c,g){u&&(c=i[g=c]),kB(s,g,Yh(c,t,e,g,i,r))}),s}Ie[oC]=Ie["[object Array]"]=Ie["[object ArrayBuffer]"]=Ie["[object DataView]"]=Ie["[object Boolean]"]=Ie["[object Date]"]=Ie["[object Float32Array]"]=Ie["[object Float64Array]"]=Ie["[object Int8Array]"]=Ie["[object Int16Array]"]=Ie["[object Int32Array]"]=Ie["[object Map]"]=Ie["[object Number]"]=Ie[sC]=Ie["[object RegExp]"]=Ie["[object Set]"]=Ie["[object String]"]=Ie["[object Symbol]"]=Ie["[object Uint8Array]"]=Ie["[object Uint8ClampedArray]"]=Ie["[object Uint16Array]"]=Ie["[object Uint32Array]"]=!0,Ie["[object Error]"]=Ie[rC]=Ie["[object WeakMap]"]=!1;function Xh(i){return Yh(i,5)}const on=(i,t)=>{if(typeof i=="string"&&typeof t=="string")return i.toLocaleLowerCase().includes(t.toLocaleLowerCase());if(typeof i=="string"&&Array.isArray(t)){const e=t.length;for(let n=0;n<e;n++){const o=t[n];if(typeof o=="string"&&i.toLocaleLowerCase().includes(o.toLocaleLowerCase()))return!0}}return!1},rn=(i,t)=>Object.prototype.hasOwnProperty.call(i,t),qh=i=>{const t=[];for(const e of i)e.conditions?t.push(...qh(e.conditions)):(e==null?void 0:e.dataType)==="component"&&t.push(e);return t},aP=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];let lC=new Map;const hP=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"],Zh=i=>lC.get(i),aC=(i,t)=>{if(t)rn(i,"indexCode")&&(i.hrpIndexCode=i.indexCode,delete i.indexCode),rn(i,"indexCodeNum")&&(i.hrpIndexCodeNum=i.indexCodeNum,delete i.indexCodeNum),rn(i,"dataType")&&delete i.dataType;else{const{calcWays:e=[],dateCalcTypes:n=[],activeKey:o,componentId:r=""}=i;if(o===5&&(e!=null&&e.length)&&(n!=null&&n.length)&&r){const s=e[0].split("-");(s==null?void 0:s.length)>1&&s[0]==="rangeValue"&&(i.calcWays=((l,a={})=>{const{around:h,unit:d,id:u}=l;let c="";const{pageMode:g="",componentList:f=[]}=(a==null?void 0:a.graphicConfig)||{};let p=null,m=null;if(g==="design"){const v=f==null?void 0:f.find(A=>A.id===u);if(!v)return[];const{interval:b,intervalUnit:S,startTime:_,endTime:C,operate:y,useCurrentTime:R}=v||{};if(R&&(p=lo().subtract(b,S),m=lo()),_&&(p=lo(_)),C&&(m=lo(C)),y){const{type:A,value:x,mode:T}=y;switch(A){case"add":p=p&&p.add(x,T),m=m&&m.add(x,T);break;case"minus":p=p&&p.subtract(x,T),m=m&&m.subtract(x,T)}}}else{const v=Zh(u)||{};Di(v.startTime)&&(p=lo(Di(v.startTime))),Di(v.endTime)&&(m=lo(Di(v.endTime)))}return p&&m&&(c=`${h==="before"?"-":""}${m.diff(p,d.toLowerCase())+1}`),c?[c]:[]})({around:s[1],unit:n[0],id:r})),delete i.radioValue}if(rn(i,"dataType")){if(i.fieldType==="DATE"&&(i.label=i.fieldName),i.dataType==="component")if(i.fieldValue==="PARENT"){let s=i.modelKey;s&&i.prop&&(s+=`-${i.prop}`),i.fieldValue="${"+s+"}"}else i.fieldValue="${"+i.fieldValue+"}";delete i.dataType}rn(i,"activeKey")&&delete i.activeKey,rn(i,"radioValue")&&delete i.radioValue,rn(i,"indexCode")&&(i.hrpIndexCode=i.indexCode,delete i.indexCode),rn(i,"indexCodeNum")&&(i.hrpIndexCodeNum=i.indexCodeNum,delete i.indexCodeNum),i.dataType!=="component"&&i.useCurrentTime&&(i.fieldValue=lo().format(i.dateFormat)),rn(i,"modelKey")&&delete i.modelKey,rn(i,"prop")&&delete i.prop,delete i.useCurrentTime}},Wr=(i,t)=>{const e=[];return i!=null&&i.length&&Xh(i).forEach(n=>{if(n.join&&n.conditions){const o=!n.conditions.some(r=>r.join&&r.conditions);n.conditions.forEach((r,s)=>{aC(r,t);const l={};if(s<n.conditions.length-1&&(l.join=n.join),o)e.push(Object.assign(Object.assign({},l),r));else if(r.join&&r.conditions){const a=t?"sqlConditions":"conditions";e.push(Object.assign({[a]:Wr([r],t)},l))}else e.push(Object.assign(Object.assign({},l),r))})}else aC(n,t),e.push(n)}),e},Af=(i={},t)=>{if(i!=null&&i.sortCpnts&&t){const _=uC(i);_&&(t.sort=_)}const{label:e,name:n,location:o,show:r,indexCode:s,indexCodeNum:l,calcType:a="COLUMN",builtInFormula:h,builtInValueSource:d,builtInCalcWay:u,formula:c,conditions:g,aggregate:f,distinct:p,dimByCount:m,dataTo:v}=i;let b;if(g&&(b=Wr(g)),a==="COMPONENT"){const _={};return Jh(_,d),{label:e.trim(),columnName:n,show:r,calcType:a,componentAlias:u,componentValue:_.fieldValue||null}}const S={label:e.trim(),columnName:n,location:o,show:r,calcType:v==="1"?"VIEW":a,hrpIndexCode:s,hrpIndexCodeNum:l,aggregate:f,builtInFormula:h,builtInValueSource:d,formula:c,conditions:b};if(h!=="DATE_OFFSET")return n==="the_count"&&(S.calcType="AGGREGATE",S.distinct=!!p,S.typeGuid=m),Object.assign(Object.assign({},S),{builtInCalcWay:u});{const _=u.split("-");if((_==null?void 0:_.length)===3){let C=_[0];return _[2]==="before"&&_[0]!=="0"&&(C=`-${_[0]}`),Object.assign(Object.assign({},S),{calcWays:[C],dateCalcTypes:[_[1]]})}}},dP=i=>{if(!i)return[];const t=Xh((i==null?void 0:i.controlList)||[]).filter(f=>f.conditionKey!=="parentCode"),{classificationList:e=[],rowHeaderList:n=[],dimensionList:o=[],seriesList:r=[],leftAxisList:s=[],rightAxisList:l=[],queryColumnList:a=[],indicators:h=[]}=i;dC(t);const d=[...e,...n,...o,...r,...s,...l,...a,...h],u=[];for(const f of d){const p=qh((f==null?void 0:f.conditions)||[]);if(p!=null&&p.length){const m=p.filter(v=>(v==null?void 0:v.dataType)==="component").map(v=>{const b={};return v!=null&&v.dateFormat&&(b.format=v.dateFormat),v.fieldValue==="PARENT"&&(b.id="PARENT",b.keyName=v.modelKey,b.modelKey=v.modelKey,b.prop=v.prop),Object.assign({conditionKey:v.fieldName,conditionLabel:v.fieldName,conditionName:v.fieldName,conditionValueType:v.fieldType,id:v.componentId,keyName:v.fieldValue,rule:v.rule,notGlobal:!0,indexCode:v.indexCode,typeGuid:v.typeGuid,indexCodeNum:v.indexCodeNum},b)});if(m!=null&&m.length)for(const v of m)u.find(b=>b.keyName===v.keyName)||u.push(v)}}const c=u.length,g=t;for(let f=0;f<c;f++){const p=u[f];if((p==null?void 0:p.conditionKey)==="parentCode")continue;const{id:m,keyName:v,prop:b,format:S,modelKey:_,dataType:C="component",customValue:y}=p,R=hC(p);Jh(R,m,{prop:b,dateFormat:S,modelKey:_,keyName:v}),C===""&&(R.fieldValue=y||""),g.push(R)}for(let f=g.length-1;f>=0;f--){const p=g[f];p.globalCondition||qh(g).find(m=>m.alias===p.alias&&m.globalCondition)&&g.splice(f,1)}return g};function hC(i){const{id:t,keyName:e,conditionLabel:n,conditionKey:o,conditionValueType:r,prop:s,rule:l="NONE",notGlobal:a=!1,indexCode:h,typeGuid:d,indexCodeNum:u,dataType:c="component"}=i;let g=e||t;g&&s&&(g+=`-${s}`);let f=l;return f==="NONE"&&(f=["startTime","endTime"].includes(s)?s==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":e!=null&&e.includes("startTime")?s==="GREATER_EQUAL":e!=null&&e.includes("endTime")?s==="LESS_EQUAL":"EQUAL"),t==="PARENT"&&(g=i.modelKey,g&&s&&(g+=`-${s}`),f=l),{rule:f,label:n,fieldName:o,fieldValue:"",valueType:r,alias:g,globalCondition:!a,indexCode:h,typeGuid:d,indexCodeNum:u,dataType:c}}function dC(i){if(i!=null&&i.length)for(const t of i)if(t!=null&&t.conditions)dC(t.conditions);else{const{id:e,keyName:n,prop:o,modelKey:r,format:s,dataType:l="component",customValue:a}=t,h=hC(t);Jh(h,e,{prop:o,dateFormat:s,modelKey:r,keyName:n}),l===""&&(h.fieldValue=a||"");for(const d in h)t[d]=h[d];for(const d of hP)delete t[d]}}function Jh(i,t,e){const{prop:n="",dateFormat:o="",modelKey:r="",keyName:s="",operateValue:l,operateMode:a,operateType:h}=e||{},d=r||s;if(t==="PARENT"&&d&&n){const b=window.config.record;let S=n,_=o;const C=n.match(/\{(.+?)\}/g);if(C!=null&&C.length){const y=C[0].slice(1,-1).trim();S=n.replace(C[0],""),_=y,i.dateFormat=_}if(b&&b[d]){const y=Di(b[d][S]);lo.isDayjs(y)?i.fieldValue=y.format(_||"YYYY-MM-DD"):i.fieldValue=y}return}const u=Zh(t)||{},{value:c,format:g="YYYY-MM-DD",type:f="",useCurrentTime:p,RECORD:m}=u||{},v=o||g;if(on(u.type,"date")){let b;if(b=p?c?Di(c):lo():Di(c),l&&a&&h)switch(h){case"add":b=b.add(l,a);break;case"minus":b=b.subtract(l,a)}i.fieldValue=b==null?void 0:b.format(v),i.dateFormat=v}else if(f==="ecanRangePicker"){let b=n;if(!n){const _=s&&s.split("-");_!=null&&_.length&&(b=_[_.length-1])}if(!b)return;let S=null;if(Di(u[b])&&(S=lo(Di(u[b]))),l&&a&&h){if(l==="rangeValue"){if(u.startTime&&u.endTime){const _=Di(u.endTime).diff(Di(u.startTime),a)+1;switch(h){case"add":S=S&&S.add(_,a);break;case"minus":S=S&&S.subtract(_,a)}}}else if(!isNaN(+l))switch(h){case"add":S=S&&S.add(l,a);break;case"minus":S=S&&S.subtract(l,a)}}if(S&&(i.fieldValue=S==null?void 0:S.format(v)),b==="rangeValue"&&u.startTime&&u.endTime){const _=function(C){const y=C.split("-");let R="";if(y!=null&&y.length)switch(y[y.length-1]){case"YYYY":R="year";break;case"MM":R="month";break;case"DD":R="day"}return R}(v);_&&(i.fieldValue=Di(u.endTime).diff(Di(u.startTime),_)+1)}i.dateFormat=v}else on(f,aP)?i.fieldValue=r&&m?m[r]:!r&&m?m.value:Di(c):i.fieldValue=Di(c)}const Qh=i=>{var t;if(i){const e=Array.isArray(i)?Xh(i):[Xh(i)];let n="",o=[];const r=[],s=[],l=[];for(const a of e){if(a.defaultCode&&(a.label=a.columnName,delete a.defaultCode),a.type==="CUSTOM"&&(o=a.customOrderColumns),n=a.type,r.push(a.label),(t=a.columnName)===null||t===void 0?void 0:t.includes("_ecanrepeat_")){const h=a.columnName.split("_ecanrepeat_");s.push(h[0])}else s.push(a.columnName);l.push(a.order)}return n!=="CUSTOM"&&(r==null?void 0:r.length)>1&&(n="COMBINATION"),n==="CUSTOM"?{label:r.join(","),columnName:s.join(","),type:n,customOrderColumns:o}:{label:r.join(","),columnName:s.join(","),order:l.join(","),type:n}}return i},uC=i=>{const{sortCpnts:t=[]}=i;let e,n="";for(const o of t){const r=Zh(o)||{},{type:s,RECORD:l}=r;if(on(s,"image")&&on(l==null?void 0:l.value,["asc","desc"])){n=l.value.toUpperCase();break}}return n&&(e={label:i.label,columnName:i.name,order:n,type:"NORMAL"}),e},uP=(i,t={})=>{var e,n,o,r,s,l,a,h,d,u;const{graphicConfig:c,type:g,globalModel:f,isGroupTable:p=!1}=i;f&&(lC=f);const m=on(g,"pivottable");let v,{source:b,dataViewId:S,plugin:_="1",layer:C,chartType:y,classificationList:R=[],rowHeaderList:A=[],dimensionList:x=[],seriesList:T=[],leftAxisList:M=[],rightAxisList:B=[],queryColumnList:E=[],indicators:k=[],controlList:P=[],formFields:H={},variableList:F=[],variableConditions:I=[],idxLibMode:L,preview:O=!1,edvDataSetId:D}=c||{},W=[];if((c==null?void 0:c.pageMode)==="design"?(W=((e=c.sqlConditions)!==null&&e!==void 0?e:[]).map(X=>{const lt={};if(rn(X,"globalCondition")||X.join||(lt.globalCondition=!0),!X.join){const G=X.rule||"EQUAL";lt.rule=G==="NONE"?"EQUAL":G}return Object.assign(Object.assign({},X),lt)}),I!=null&&I.length&&(W=W.concat(I))):(W=dP(c),F!=null&&F.length&&(W=W.concat(function(X){const lt=[];if(X!=null&&X.length){for(const G of X)if(G.variableName){const gt={variateName:G.variableName,globalCondition:!1,valueType:G.variableType,alias:G.keyName||""};Jh(gt,G.id,{dateFormat:G.format,prop:G.dateTypeValue,keyName:G.keyName,operateType:G.operateType,operateMode:G.operateMode,operateValue:G.operateValue}),G.dataType===""&&(gt.fieldValue=G.variableValue),G.format&&(gt.dateFormat=G.format),G.label&&(gt.label=G.label),lt.push(gt)}}return lt}(F)))),W==null?void 0:W.length){const X=W.filter(G=>G.globalCondition),lt=W.filter(G=>!G.globalCondition);(X==null?void 0:X.length)>1&&(W=[{join:"&&",conditions:X},...lt])}W!=null&&W.length&&(W=Wr(W,"1")),C==null&&(C=on(g,["table","card"])||on(g,["list","circulate"])&&(R==null?void 0:R.length)>1?"1":on(g,["select","checkbox","radio"])?"3":"2");const N=[];let V,$="";if(Array.isArray(R)&&R.length>0&&(!["ecanList","ecanCirculate"].includes(g)||(R==null?void 0:R.length)===1)){const X=R.length;for(let lt=0;lt<X;lt++){const G=R[lt]||{},{label:gt="",name:pt="",show:ft=!1,sort:ht,customGroup:_t,conditions:it,dateFormat:xt,typeGuid:kt="",truncations:Ct=[]}=G;if(ft||X===1){$=kt,v={label:gt.trim(),columnName:pt,show:ft,sort:uC(G)||Qh(ht)||ht,customGroup:_t,conditions:Wr(it),typeGuid:kt},xt&&(v.dateFormat=xt),pt!=="the_date"||v.dateFormat||(v.dateFormat="YYYY-MM");const Mt={};if(Array.isArray(Ct)&&Ct.length>0){const Se=Ct.length;for(let Ae=0;Ae<Se;Ae++){const Fe=Ct[Ae]||{},{rule:Ne="",num:pe=0,name:Oe=""}=Fe;Ne&&pe&&(Mt.num=pe,Mt.rule=Ne,Oe&&(Mt.otherGroupName=Oe))}}if(!((n=Object.keys(Mt))===null||n===void 0)&&n.length&&(v.truncation=Mt),!on(g,["scatter","valueline"]))break;N.push(v)}}}if(Array.isArray(T)&&T.length>0){const X=T.length;for(let lt=0;lt<X;lt++){const G=T[lt]||{},{label:gt="",name:pt="",show:ft=!1,sort:ht,customGroup:_t,conditions:it,typeGuid:xt}=G;if(ft||X===1){V={label:gt.trim(),columnName:pt,show:ft,sort:Qh(ht),customGroup:_t,conditions:Wr(it),typeGuid:xt};break}}}const K=[];M==null||M.forEach(X=>{X.location="LEFT",K.push(Af(X,v))}),B==null||B.forEach(X=>{X.location="RIGHT",K.push(Af(X,v))});let Y=k;!((r=(o=t==null?void 0:t.pivotTableCal)===null||o===void 0?void 0:o.indicators)===null||r===void 0)&&r.length&&(Y=t.pivotTableCal.indicators),Y==null||Y.forEach(X=>{X.location="LEFT",K.push(Af(X,v))});const j=[];["ecanList","ecanCirculate"].includes(g)&&(R==null?void 0:R.length)>1&&(E=R),!((l=(s=t==null?void 0:t.pivotTableCal)===null||s===void 0?void 0:s.dimensions)===null||l===void 0)&&l.length&&(E=t.pivotTableCal.dimensions),E==null||E.forEach(X=>{const{label:lt,name:G,location:gt,show:pt,indexCode:ft,sort:ht,typeGuid:_t,indexCodeNum:it,dateFormat:xt,conditions:kt}=X;let Ct=Qh(ht);if(t.sort){const{field:Se,order:Ae}=t.sort;let Fe=K.find(Ne=>Ne.label===Se);Fe||lt!==Se||(Fe=X),Fe&&(Ct={columnName:Fe.columnName,label:t.sort.field,order:Ae.toUpperCase(),type:"NORMAL"})}const Mt={label:lt,columnName:G,location:gt,show:pt,sort:Ct,calcType:"COLUMN",hrpIndexCode:ft,hrpIndexCodeNum:it,conditions:Wr(kt),typeGuid:_t};xt&&(Mt.dateFormat=xt),G!=="the_date"||Mt.dateFormat||(Mt.dateFormat="YYYY-MM"),j.push(Mt)});let J=[],ot=[];if(Array.isArray(A)&&A.length>0?ot=A:Array.isArray(x)&&x.length>0&&(ot=x),ot==null?void 0:ot.length){const X=ot.length;for(let lt=0;lt<X;lt++){const G=ot[lt]||{},{label:gt="",name:pt="",show:ft=!1,sort:ht,customGroup:_t,conditions:it,truncations:xt,typeGuid:kt="",dateFormat:Ct}=G;let Mt=Qh(ht);if(t.sort){const{field:Fe,order:Ne}=t.sort;let pe=K.find(Oe=>Oe.label===Fe);pe||G.label!==Fe||(pe=G),pe&&(Mt={columnName:pe.columnName,label:t.sort.field,order:Ne.toUpperCase(),type:"NORMAL"})}const Se={label:gt.trim(),columnName:pt,show:ft,sort:Mt,customGroup:_t,conditions:Wr(it),typeGuid:kt};Ct&&(Se.dateFormat=Ct),pt!=="the_date"||Se.dateFormat||(Se.dateFormat="YYYY-MM");const Ae={};if(Array.isArray(xt)&&xt.length>0){const Fe=xt.length;for(let Ne=0;Ne<Fe;Ne++){const pe=xt[Ne]||{},{rule:Oe="",num:Ze=0,name:ge=""}=pe;Oe&&Ze&&(Ae.num=Ze,Ae.rule=Oe,ge&&(Ae.otherGroupName=ge))}}!((a=Object.keys(Ae))===null||a===void 0)&&a.length&&(Se.truncation=Ae),J.push(Se)}}let ut,bt,Z=[];if(t!=null&&t.pivotTableCal){let X=[];const{calc:lt=[],filter:G=[],truncations:gt=[],sorts:pt=[],aggregateMethod:ft=[],rowDimensionKeys:ht=[],colDimensionKeys:_t=[]}=t.pivotTableCal;if(K.push(...lt),G==null?void 0:G.length)for(const it of G){const{type:xt}=it,kt=gb(it,["type"]);xt==="indicators"?X=K:xt==="dimension"&&(X=j);const Ct=X.find(Mt=>Mt.columnName===it.fieldName);Ct&&(Ct.conditions||(Ct.conditions=[]),Ct.conditions.push(kt))}if(gt!=null&&gt.length)for(const it of gt){const xt=j.find(kt=>kt.columnName===it.key);xt&&(xt.truncation={num:it.num,rule:it.rule})}if(pt!=null&&pt.length)for(const it of pt){const{fieldType:xt,columnData:kt}=it,Ct=gb(it,["fieldType","columnData"]);xt==="indicators"?(X=K,ut=kt):xt==="dimension"&&(X=j);const Mt=X.find(Se=>Se.label===Ct.label);Mt&&(Mt.sort=Object.assign(Object.assign({},Ct),{columnName:Mt.columnName}))}if(!((h=Object.keys(ft))===null||h===void 0)&&h.length)for(const it in ft){const xt=j.find(kt=>kt.label===it);xt&&(!((d=ft[it])===null||d===void 0)&&d.length)&&(xt.aggregateMethod=ft[it])}J=[],Z=[];for(const it of j)ht.includes(it.columnName)?J.push(it):_t.includes(it.columnName)&&Z.push(it)}if(on(g,["text","proportion","counter"])?y="zb":on(g,["valueline"])&&(y="valueline"),p||g==="card"){if(J.length===0||K.length===0)return;y="grouptable"}else if(C==="1"&&j.length===0||C==="2"&&K.length===0||!(C!=="3"||($||b==="EDV_DATA_SET")&&H.labelField&&H.valueField)||C==="3"&&g==="ecanDataSelect"&&K.length===0)return;if(x!=null&&x.length&&(C="1",y="grouptable"),!on(g,["scatter","valueline"])&&((u=Object.keys(H))===null||u===void 0?void 0:u.length)){const X=qh(P).find(G=>G.conditionKey==="parentCode"),lt={};if(X){const G=Zh(X.id)||{};if(!(G!=null&&G.itemCodes))return;lt.parentItemCodes=G.itemCodes}g==="ecanDataSelect"&&(lt.indicatorList=K.filter(G=>G.show)),b==="EDV_DATA_SET"&&(lt.edvDataSetId=D),bt=Object.assign({url:"/diagram/formData",source:b,dataViewId:S,plugin:"4",layer:C,chartType:"normalSelect",rangeIndexTypeGuid:$,type:g==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:H.labelField,valueField:H.valueField,sqlConditions:W,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:i.keyName},lt)}else{let X={};X=on(g,["scatter","valueline"])?{classifications:N}:{classification:v},bt=Object.assign({url:"/diagram",source:b,dataViewId:S,plugin:m?"5":_,layer:C,chartType:m?"pivot-table":y,series:V,indicatorList:K,queryColumns:p?[]:j,pageFlag:!0,edvDataSetId:D||"",sqlConditions:W.map(lt=>{const{fieldValue:G}=lt,gt={};return G&&Array.isArray(G)&&(gt.fieldValue=JSON.stringify(G)),Object.assign(Object.assign({},lt),gt)}),idxLibMode:L,preview:O,rowHeaders:J,keyName:i.keyName,columnData:ut,columnHeaders:Z},X)}return bt};function cP(i,t){if(i==="increase")return t=t||"#f00f00",`<svg t="1718270975854" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1021" width="64" height="64"><path d="M128 438.848h256C384 743.68 322.112 871.68 128 1024c277.312-60.864 512-158.464 512-585.152h256L512 0 128 438.848z" fill="${t}" p-id="1022"></path></svg>`;if(i==="decline")return t=t||"#00FF88",`<svg t="1718271009759" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1172" width="64" height="64"><path d="M849.5 576.29375l-225 0C624.5 308.375 678.89375 195.875 849.5 62.00000001c-243.73125 53.49375-449.99999999 139.275-450 514.29374999l-225 0L512 961.99999999 849.5 576.29375z" fill="${t}" p-id="1173"></path></svg>`}const gP=i=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标",FIELD:"数据集"})[i],fP=i=>({0:"文本",1:"数值",2:"日期"})[i],pP=i=>i==="0"?"手工录入":i==="1"?"系统取数":i==="2"?"运算加工":"",mP=i=>{let t="";switch(i){case"1":t="人力系统";break;case"2":t="绩效系统";break;case"3":t="预算系统";break;case"4":t="财务系统";break;case"5":t="成本系统";break;case"6":t="物流系统";break;case"7":t="固定资产系统";break;case"8":t="OA办公系统";break;case"9":t="电子档案系统";break;case"10":t="个人收入系统";break;case"11":t="奖金二次分配系统";break;case"12":t="财务管理系统";break;case"13":t="报销系统";break;case"14":t="科研管理系统";break;case"15":t="审计系统";break;case"16":t="分组器系统";break}return t},vP=i=>i==="0"?"指标库":i==="1"?"视图":i==="2"?"数据集":"其他";class ti{static GenAutoIncrementId(){return ti.auto_increment_id++}}ti.auto_increment_id=0;class Vt{constructor(t){this.id=ti.GenAutoIncrementId(),this.registry=t}}const td="named",cC="inject",gC="multi_inject",fC="inversify:tagged",pC="inversify:paramtypes";class Tf{constructor(t,e){this.key=t,this.value=e}toString(){return this.key===td?`named: ${String(this.value).toString()} `:`tagged: { key:${this.key.toString()}, value: ${String(this.value)} }`}}const Es=function(i){var t;return function(e){const n=typeof Symbol=="function",o=n&&Symbol.toPrimitive!==void 0?Symbol.toPrimitive:"@@toPrimitive",r=Object.getPrototypeOf(Function),s=(typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL,Map),l=new WeakMap;function a(P,H,F,I){if(!y(F))throw new TypeError;return v(P,H,F,I)}function h(P,H,F){if(!y(H))throw new TypeError;return S(F)||(F=M(F)),g(P,H,F)}function d(P,H,F){if(!y(H))throw new TypeError;return S(F)||(F=M(F)),f(P,H,F)}function u(P,H,F){if(!y(H))throw new TypeError;return S(F)||(F=M(F)),p(P,H,F)}function c(P,H,F){let I=l.get(P);if(S(I)){if(!F)return;I=new s,l.set(P,I)}let L=I.get(H);if(S(L)){if(!F)return;L=new s,I.set(H,L)}return L}function g(P,H,F){if(f(P,H,F))return!0;const I=k(H);return!_(I)&&g(P,I,F)}function f(P,H,F){const I=c(H,F,!1);return!S(I)&&x(I.has(P))}function p(P,H,F){if(f(P,H,F))return m(P,H,F);const I=k(H);return _(I)?void 0:p(P,I,F)}function m(P,H,F){const I=c(H,F,!1);if(!S(I))return I.get(P)}function v(P,H,F,I){c(F,I,!0).set(P,H)}function b(P){if(P===null)return 1;switch(typeof P){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return P===null?1:6;default:return 6}}function S(P){return P===void 0}function _(P){return P===null}function C(P){return typeof P=="symbol"}function y(P){return typeof P=="object"?P!==null:typeof P=="function"}function R(P,H){switch(b(P)){case 0:case 1:case 2:case 3:case 4:case 5:return P}const F=H===3?"string":H===5?"number":"default",I=E(P,o);if(I!==void 0){const L=I.call(P,F);if(y(L))throw new TypeError;return L}return A(P,F==="default"?"number":F)}function A(P,H){if(H==="string"){const F=P.toString;if(B(F)){const L=F.call(P);if(!y(L))return L}const I=P.valueOf;if(B(I)){const L=I.call(P);if(!y(L))return L}}else{const F=P.valueOf;if(B(F)){const L=F.call(P);if(!y(L))return L}const I=P.toString;if(B(I)){const L=I.call(P);if(!y(L))return L}}throw new TypeError}function x(P){return!!P}function T(P){return""+P}function M(P){const H=R(P,3);return C(H)?H:T(H)}function B(P){return typeof P=="function"}function E(P,H){const F=P[H];if(F!=null){if(!B(F))throw new TypeError;return F}}function k(P){const H=Object.getPrototypeOf(P);if(typeof P!="function"||P===r||H!==r)return H;const F=P.prototype,I=F&&Object.getPrototypeOf(F);if(I==null||I===Object.prototype)return H;const L=I.constructor;return typeof L!="function"||L===P?H:L}e("defineMetadata",a),e("hasMetadata",h),e("hasOwnMetadata",d),e("getMetadata",u)}((t=i,function(e,n){typeof t[e]!="function"&&Object.defineProperty(t,e,{configurable:!0,writable:!0,value:n})})),i}({});function bP(i,t,e,n){const o=[n];let r={};Es.hasOwnMetadata(i,t)&&(r=Es.getMetadata(i,t));let s=r[e];s===void 0&&(s=[]),s.push(...o),r[e]=s,Es.defineMetadata(i,r,t)}function CP(i,t,e,n){bP(fC,i,e.toString(),n)}function mC(i){return(t,e,n)=>{CP(t,e,n,i)}}function vC(i){return t=>(e,n,o)=>mC(new Tf(i,t))(e,n,o)}const Qt=vC(cC),bC=vC(gC);function vt(){return function(i){return Es.defineMetadata(pC,null,i),i}}function di(i){return mC(new Tf(td,i))}const Nr={Singleton:"Singleton",Transient:"Transient"},hr={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};class Mf{constructor(t,e){this.id=ti.GenAutoIncrementId(),this.activated=!1,this.serviceIdentifier=t,this.scope=e,this.type=hr.Invalid,this.constraint=n=>!0,this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.dynamicValue=null}clone(){const t=new Mf(this.serviceIdentifier,this.scope);return t.activated=t.scope===Nr.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.provider=this.provider,t.constraint=this.constraint,t.cache=this.cache,t}}class yP{getConstructorMetadata(t){return{compilerGeneratedMetadata:Es.getMetadata(pC,t),userGeneratedMetadata:Es.getMetadata(fC,t)||{}}}getPropertiesMetadata(t){throw new Error("暂未实现")}}const _P=(i=>t=>{const e=n=>{if(n==null)return!1;if(n.key===i&&n.value===t)return!0;if(n.constructorArgsMetadata==null)return!1;const o=n.constructorArgsMetadata;for(let r=0;r<o.length;r++)if(o[r].key===i&&o[r].value===t)return!0;return!1};return e.metaData=new Tf(i,t),e})(td);class ed{constructor(t){this._binding=t}inRequestScope(){throw new Error("暂未实现")}inSingletonScope(){return this._binding.scope=Nr.Singleton,this}inTransientScope(){return this._binding.scope=Nr.Transient,this}whenTargetNamed(t){return this._binding.constraint=_P(t),this}}class wP{constructor(t){this._binding=t}to(t){return this._binding.type=hr.Instance,this._binding.implementationType=t,new ed(this._binding)}toSelf(){const t=this._binding.serviceIdentifier;return this.to(t)}toDynamicValue(t){return this._binding.type=hr.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=t,this._binding.implementationType=null,new ed(this._binding)}toConstantValue(t){return this._binding.type=hr.ConstantValue,this._binding.cache=t,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Nr.Singleton,new ed(this._binding)}toFactory(t){return this._binding.type=hr.Factory,this._binding.factory=t,this._binding.scope=Nr.Singleton,new ed(this._binding)}toService(t){this.toDynamicValue(e=>e.container.get(t))}}let SP=class{constructor(t){const e=t||{};e.defaultScope=e.defaultScope||Nr.Transient,this.options=e,this.id=ti.GenAutoIncrementId(),this._bindingDictionary=new Map,this._metadataReader=new yP}load(t){const e=this._getContainerModuleHelpersFactory()(t.id);t.registry(e.bindFunction,e.unbindFunction,e.isboundFunction,e.rebindFunction)}get(t){const e=this._getNotAllArgs(t,!1);return this._get(e)}getAll(t){const e=this._getAllArgs(t);return this._get(e)}getTagged(t,e,n){const o=this._getNotAllArgs(t,!1,e,n);return this._get(o)}getNamed(t,e){return this.getTagged(t,td,e)}isBound(t){return this._bindingDictionary.has(t)}bind(t){const e=this.options.defaultScope,n=new Mf(t,e),o=this._bindingDictionary.get(t)||[];return o.push(n),this._bindingDictionary.set(t,o),new wP(n)}unbind(t){this._bindingDictionary.delete(t)}rebind(t){return this.unbind(t),this.bind(t)}_getContainerModuleHelpersFactory(){const t=(s,l)=>{s._binding.moduleId=l},e=s=>l=>{const a=this.bind(l);return t(a,s),a},n=()=>s=>this.unbind(s),o=()=>s=>this.isBound(s),r=s=>l=>{const a=this.rebind(l);return t(a,s),a};return s=>({bindFunction:e(s),isboundFunction:o(),rebindFunction:r(s),unbindFunction:n(),unbindAsyncFunction:l=>null})}_getNotAllArgs(t,e,n,o){return{avoidConstraints:!1,isMultiInject:e,serviceIdentifier:t,key:n,value:o}}_getAllArgs(t){return{avoidConstraints:!0,isMultiInject:!0,serviceIdentifier:t}}_get(t){const e=[];return this._bindingDictionary.get(t.serviceIdentifier).filter(n=>n.constraint(t)).forEach(n=>{e.push(this._resolveFromBinding(n))}),t.isMultiInject||e.length!==1?e:e[0]}_getChildRequest(t){const e=t.implementationType,{userGeneratedMetadata:n}=this._metadataReader.getConstructorMetadata(e),o=Object.keys(n),r=[];for(let s=0;s<o.length;s++){const l=n[s],a={};l.forEach(g=>{a[g.key]=g.value});const h={inject:a[cC],multiInject:a[gC]},d=h.inject||h.multiInject,u={serviceIdentifier:d,constructorArgsMetadata:l},c={injectIdentifier:d,metadata:l,bindings:this._bindingDictionary.get(d).filter(g=>g.constraint(u))};r.push(c)}return r}_resolveFromBinding(t){const e=this._getResolvedFromBinding(t);return this._saveToScope(t,e),e}_getResolvedFromBinding(t){let e;switch(t.type){case hr.ConstantValue:case hr.Function:e=t.cache;break;case hr.Instance:e=this._resolveInstance(t,t.implementationType);break;default:e=t.dynamicValue({container:this})}return e}_resolveInstance(t,e){if(t.activated)return t.cache;const n=this._getChildRequest(t);return this._createInstance(e,n)}_createInstance(t,e){return e.length?new t(...this._resolveRequests(e)):new t}_resolveRequests(t){return t.map(e=>e.bindings.length>1?e.bindings.map(n=>this._resolveFromBinding(n)):this._resolveFromBinding(e.bindings[0]))}_saveToScope(t,e){t.scope===Nr.Singleton&&(t.cache=e,t.activated=!0)}};const ei=Symbol("ContributionProvider");class CC{constructor(t,e){this.serviceIdentifier=t,this.container=e}getContributions(){return this.caches||(this.caches=[],this.container&&this.container.isBound(this.serviceIdentifier)&&this.caches.push(...this.container.getAll(this.serviceIdentifier))),this.caches}}function Mi(i,t){i(ei).toDynamicValue(({container:e})=>new CC(t,e)).inSingletonScope().whenTargetNamed(t)}function xP(i,t){i(ei).toDynamicValue(({container:e})=>new CC(t,e)).whenTargetNamed(t)}class RP{constructor(t,e){this._args=t,this.name=e,this.taps=[]}tap(t,e){this._tap("sync",t,e)}unTap(t,e){const n=typeof t=="string"?t.trim():t.name;n&&(this.taps=this.taps.filter(o=>!(o.name===n&&(!e||o.fn===e))))}_parseOptions(t,e,n){let o;if(typeof e=="string")o={name:e.trim()};else if(typeof e!="object"||e===null)throw new Error("Invalid tap options");if(typeof o.name!="string"||o.name==="")throw new Error("Missing name for tap");return o=Object.assign({type:t,fn:n},o),o}_tap(t,e,n){this._insert(this._parseOptions(t,e,n))}_insert(t){let e;typeof t.before=="string"?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));let n=0;typeof t.stage=="number"&&(n=t.stage);let o=this.taps.length;for(;o>0;){o--;const r=this.taps[o];this.taps[o+1]=r;const s=r.stage||0;if(e){if(e.has(r.name)){e.delete(r.name);continue}if(e.size>0)continue}if(!(s>n)){o++;break}}this.taps[o]=t}}class Ui extends RP{call(...t){this.taps.map(e=>e.fn).forEach(e=>e(...t))}}const id=Symbol.for("EnvContribution"),Bf=Symbol.for("VGlobal");var AP=globalThis&&globalThis.__decorate||function(i,t,e,n){var o,r=arguments.length,s=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,t,e,n);else for(var l=i.length-1;l>=0;l--)(o=i[l])&&(s=(r<3?o(s):r>3?o(t,e,s):o(t,e))||s);return r>3&&s&&Object.defineProperty(t,e,s),s},TP=globalThis&&globalThis.__metadata||function(i,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,t)},yC=globalThis&&globalThis.__param||function(i,t){return function(e,n){t(e,n,i)}};let Pf=class{get env(){return this._env}get devicePixelRatio(){return this._env||this.setEnv("browser"),this.envContribution.getDevicePixelRatio()}get supportEvent(){return this._env||this.setEnv("browser"),this.envContribution.supportEvent}set supportEvent(i){this._env||this.setEnv("browser"),this.envContribution.supportEvent=i}get supportsTouchEvents(){return this._env||this.setEnv("browser"),this.envContribution.supportsTouchEvents}set supportsTouchEvents(i){this._env||this.setEnv("browser"),this.envContribution.supportsTouchEvents=i}get supportsPointerEvents(){return this._env||this.setEnv("browser"),this.envContribution.supportsPointerEvents}set supportsPointerEvents(i){this._env||this.setEnv("browser"),this.envContribution.supportsPointerEvents=i}get supportsMouseEvents(){return this._env||this.setEnv("browser"),this.envContribution.supportsMouseEvents}set supportsMouseEvents(i){this._env||this.setEnv("browser"),this.envContribution.supportsMouseEvents=i}get applyStyles(){return this._env||this.setEnv("browser"),this.envContribution.applyStyles}set applyStyles(i){this._env||this.setEnv("browser"),this.envContribution.applyStyles=i}constructor(i){this.contributions=i,this.id=ti.GenAutoIncrementId(),this.hooks={onSetEnv:new Ui(["lastEnv","env","global"])},this.measureTextMethod="native",this.optimizeVisible=!1}bindContribution(i){const t=[];if(this.contributions.getContributions().forEach(e=>{const n=e.configure(this,i);n&&n.then&&t.push(n)}),t.length)return Promise.all(t)}getDynamicCanvasCount(){return this._env||this.setEnv("browser"),this.envContribution.getDynamicCanvasCount()}getStaticCanvasCount(){return this._env||this.setEnv("browser"),this.envContribution.getStaticCanvasCount()}setEnv(i,t){if(t&&t.force===!0||this._env!==i)return this.deactiveCurrentEnv(),this.activeEnv(i,t)}deactiveCurrentEnv(){this.envContribution&&this.envContribution.release()}activeEnv(i,t){const e=this._env;this._env=i;const n=this.bindContribution(t);if(n&&n.then)return n.then(()=>{this.envParams=t,this.hooks.onSetEnv.call(e,i,this)});this.envParams=t,this.hooks.onSetEnv.call(e,i,this)}setActiveEnvContribution(i){this.envContribution=i}createCanvas(i){return this._env||this.setEnv("browser"),this.envContribution.createCanvas(i)}createOffscreenCanvas(i){return this._env||this.setEnv("browser"),this.envContribution.createOffscreenCanvas(i)}releaseCanvas(i){return this._env||this.setEnv("browser"),this.envContribution.releaseCanvas(i)}addEventListener(i,t,e){return this._env||this.setEnv("browser"),this.envContribution.addEventListener(i,t,e)}removeEventListener(i,t,e){return this._env||this.setEnv("browser"),this.envContribution.removeEventListener(i,t,e)}dispatchEvent(i){return this._env||this.setEnv("browser"),this.envContribution.dispatchEvent(i)}getRequestAnimationFrame(){return this._env||this.setEnv("browser"),this.envContribution.getRequestAnimationFrame()}getCancelAnimationFrame(){return this._env||this.setEnv("browser"),this.envContribution.getCancelAnimationFrame()}getElementById(i){return this._env||this.setEnv("browser"),this.envContribution.getElementById?this.envContribution.getElementById(i):null}getRootElement(){return this._env||this.setEnv("browser"),this.envContribution.getRootElement?this.envContribution.getRootElement():null}getDocument(){return this._env||this.setEnv("browser"),this.envContribution.getDocument?this.envContribution.getDocument():null}mapToCanvasPoint(i,t){return this._env||this.setEnv("browser"),this.envContribution.mapToCanvasPoint?this.envContribution.mapToCanvasPoint(i,t):null}loadImage(i){return this._env||this.setEnv("browser"),this.envContribution.loadImage(i)}loadSvg(i){return this._env||this.setEnv("browser"),this.envContribution.loadSvg(i)}loadJson(i){return this._env||this.setEnv("browser"),this.envContribution.loadJson(i)}loadArrayBuffer(i){return this._env||this.setEnv("browser"),this.envContribution.loadArrayBuffer(i)}loadBlob(i){return this._env||this.setEnv("browser"),this.envContribution.loadBlob(i)}isChrome(){return this._isChrome!=null||(this._env||this.setEnv("browser"),this._isChrome=this._env==="browser"&&navigator.userAgent.indexOf("Chrome")>-1),this._isChrome}isSafari(){return this._isSafari!=null||(this._env||this.setEnv("browser"),this._isSafari=this._env==="browser"&&/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)),this._isSafari}getNativeAABBBounds(i){return this._env||this.setEnv("browser"),this.envContribution.getNativeAABBBounds(i)}removeDom(i){return this._env||this.setEnv("browser"),this.envContribution.removeDom(i)}createDom(i){return this._env||this.setEnv("browser"),this.envContribution.createDom(i)}updateDom(i,t){return this._env||this.setEnv("browser"),this.envContribution.updateDom(i,t)}getElementTop(i,t=!1){return this._env||this.setEnv("browser"),this.envContribution.getElementTop(i,t)}getElementLeft(i,t=!1){return this._env||this.setEnv("browser"),this.envContribution.getElementLeft(i,t)}getElementTopLeft(i,t=!1){return this._env||this.setEnv("browser"),this.envContribution.getElementTopLeft(i,t)}};Pf=AP([vt(),yC(0,Qt(ei)),yC(0,di(id)),TP("design:paramtypes",[Object])],Pf);var Vr={},MP={get exports(){return Vr},set exports(i){Vr=i}};(function(i){var t=Object.prototype.hasOwnProperty,e="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(e=!1));function o(a,h,d){this.fn=a,this.context=h,this.once=d||!1}function r(a,h,d,u,c){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new o(d,u||a,c),f=e?e+h:h;return a._events[f]?a._events[f].fn?a._events[f]=[a._events[f],g]:a._events[f].push(g):(a._events[f]=g,a._eventsCount++),a}function s(a,h){--a._eventsCount===0?a._events=new n:delete a._events[h]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var h=[],d,u;if(this._eventsCount===0)return h;for(u in d=this._events)t.call(d,u)&&h.push(e?u.slice(1):u);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},l.prototype.listeners=function(h){var d=e?e+h:h,u=this._events[d];if(!u)return[];if(u.fn)return[u.fn];for(var c=0,g=u.length,f=new Array(g);c<g;c++)f[c]=u[c].fn;return f},l.prototype.listenerCount=function(h){var d=e?e+h:h,u=this._events[d];return u?u.fn?1:u.length:0},l.prototype.emit=function(h,d,u,c,g,f){var p=e?e+h:h;if(!this._events[p])return!1;var m=this._events[p],v=arguments.length,b,S;if(m.fn){switch(m.once&&this.removeListener(h,m.fn,void 0,!0),v){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,u),!0;case 4:return m.fn.call(m.context,d,u,c),!0;case 5:return m.fn.call(m.context,d,u,c,g),!0;case 6:return m.fn.call(m.context,d,u,c,g,f),!0}for(S=1,b=new Array(v-1);S<v;S++)b[S-1]=arguments[S];m.fn.apply(m.context,b)}else{var _=m.length,C;for(S=0;S<_;S++)switch(m[S].once&&this.removeListener(h,m[S].fn,void 0,!0),v){case 1:m[S].fn.call(m[S].context);break;case 2:m[S].fn.call(m[S].context,d);break;case 3:m[S].fn.call(m[S].context,d,u);break;case 4:m[S].fn.call(m[S].context,d,u,c);break;default:if(!b)for(C=1,b=new Array(v-1);C<v;C++)b[C-1]=arguments[C];m[S].fn.apply(m[S].context,b)}}return!0},l.prototype.on=function(h,d,u){return r(this,h,d,u,!1)},l.prototype.once=function(h,d,u){return r(this,h,d,u,!0)},l.prototype.removeListener=function(h,d,u,c){var g=e?e+h:h;if(!this._events[g])return this;if(!d)return s(this,g),this;var f=this._events[g];if(f.fn)f.fn===d&&(!c||f.once)&&(!u||f.context===u)&&s(this,g);else{for(var p=0,m=[],v=f.length;p<v;p++)(f[p].fn!==d||c&&!f[p].once||u&&f[p].context!==u)&&m.push(f[p]);m.length?this._events[g]=m.length===1?m[0]:m:s(this,g)}return this},l.prototype.removeAllListeners=function(h){var d;return h?(d=e?e+h:h,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=e,l.EventEmitter=l,i.exports=l})(MP);const Ls=(i,t)=>Object.prototype.toString.call(i)===`[object ${t}]`,ui=(i,t=!1)=>t?typeof i=="boolean":i===!0||i===!1||Ls(i,"Boolean"),oe=i=>typeof i=="function",Rt=i=>i==null,z=i=>i!=null,se=i=>{const t=typeof i;return i!==null&&t==="object"||t==="function"},BP=i=>typeof i=="object"&&i!==null,ks=function(i){if(!BP(i)||!Ls(i,"Object"))return!1;if(Object.getPrototypeOf(i)===null)return!0;let t=i;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(i)===t},Ve=i=>i===void 0,re=(i,t=!1)=>{const e=typeof i;return t?e==="string":e==="string"||Ls(i,"String")},tt=i=>Array.isArray?Array.isArray(i):Ls(i,"Array"),Hf=function(i){return i!==null&&typeof i!="function"&&Number.isFinite(i.length)},_C=i=>Ls(i,"Date"),at=(i,t=!1)=>{const e=typeof i;return t?e==="number":e==="number"||Ls(i,"Number")},ye=i=>at(i)&&Number.isFinite(i),PP=i=>new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(i),HP=i=>new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(i),EP=i=>({}).toString.call(i).replace(/^\[object /,"").replace(/]$/,""),LP=Object.prototype,kP=function(i){const t=i&&i.constructor;return i===(typeof t=="function"&&t.prototype||LP)},FP=Object.prototype.hasOwnProperty;function Gt(i){if(Rt(i))return!0;if(Hf(i))return!i.length;const t=EP(i);if(t==="Map"||t==="Set")return!i.size;if(kP(i))return!Object.keys(i).length;for(const e in i)if(FP.call(i,e))return!1;return!0}const ci=(i,t,e)=>{const n=re(t)?t.split("."):t;for(let o=0;o<n.length;o++)i=i?i[n[o]]:void 0;return i===void 0?e:i},IP=Object.prototype.hasOwnProperty,wC=(i,t)=>i!=null&&IP.call(i,t);function Me(i,t,e){let n;if(!z(i)||typeof i!="object"||t&&t(i))return i;const o=tt(i),r=i.length;n=o?new Array(r):typeof i=="object"?{}:ui(i)||at(i)||re(i)?i:_C(i)?new Date(+i):void 0;const s=o?void 0:Object.keys(Object(i));let l=-1;if(n)for(;++l<(s||i).length;){const a=s?s[l]:l,h=i[a];e&&e.includes(a.toString())?n[a]=h:n[a]=Me(h,t,e)}return n}function SC(i,t,e=!1,n=!1){if(t){if(i===t)return;if(z(t)&&typeof t=="object"){const o=Object(t),r=[];for(const a in o)r.push(a);let{length:s}=r,l=-1;for(;s--;){const a=r[++l];!z(o[a])||typeof o[a]!="object"||n&&tt(i[a])?xC(i,a,o[a]):OP(i,t,a,e,n)}}}}function OP(i,t,e,n=!1,o=!1){const r=i[e],s=t[e];let l=t[e],a=!0;if(tt(s)){if(n)l=[];else if(tt(r))l=r;else if(Hf(r)){l=new Array(r.length);let h=-1;const d=r.length;for(;++h<d;)l[h]=r[h]}}else ks(s)?(l=r!=null?r:{},typeof r!="function"&&typeof r=="object"||(l={})):a=!1;a&&SC(l,s,n,o),xC(i,e,l)}function xC(i,t,e){(e!==void 0&&!DP(i[t],e)||e===void 0&&!(t in i))&&(i[t]=e)}function DP(i,t){return i===t||Number.isNaN(i)&&Number.isNaN(t)}function yt(i,...t){let e=-1;const n=t.length;for(;++e<n;)SC(i,t[e],!0);return i}function zP(i,t){if(!i||!ks(i))return i;const e={};return Object.keys(i).forEach(n=>{const o=i[n];let r=!1;t.forEach(s=>{(re(s)&&s===n||s instanceof RegExp&&n.match(s))&&(r=!0)}),r||(e[n]=o)}),e}function RC(i){return Object.prototype.toString.call(i)}function AC(i){return Object.keys(i)}function Zl(i,t,e){if(i===t)return!0;if(typeof i!=typeof t||i==null||t==null)return!1;if(Number.isNaN(i)&&Number.isNaN(t))return!0;if(RC(i)!==RC(t))return!1;if(oe(i))return!!(e!=null&&e.skipFunction);if(typeof i!="object")return!1;if(tt(i)){if(i.length!==t.length)return!1;for(let r=i.length-1;r>=0;r--)if(!Zl(i[r],t[r],e))return!1;return!0}if(!ks(i))return!1;const n=AC(i),o=AC(t);if(n.length!==o.length)return!1;n.sort(),o.sort();for(let r=n.length-1;r>=0;r--)if(n[r]!=o[r])return!1;for(let r=n.length-1;r>=0;r--){const s=n[r];if(!Zl(i[s],t[s],e))return!1}return!0}function WP(i){if(!i)return[];if(Object.keys)return Object.keys(i);const t=[];for(const e in i)i.hasOwnProperty(e)&&t.push(e);return t}function NP(i,t,e){const n=WP(t);for(let o=0;o<n.length;o++){const r=n[o];(e?t[r]!=null:i[r]==null)&&(i[r]=t[r])}return i}function Ef(i,t,e=!0){if(i="prototype"in i?i.prototype:i,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames){const n=Object.getOwnPropertyNames(t);for(let o=0;o<n.length;o++){const r=n[o];r!=="constructor"&&(e?t[r]!=null:i[r]==null)&&(i[r]=t[r])}}else NP(i,t,e)}function Lf(i){return z(i)?tt(i)?i:[i]:[]}function jr(i){if(Hf(i))return i[i.length-1]}const kf=(i,t)=>{var e;if(i.length===0)return;let n=i[0];for(let o=1;o<i.length;o++){const r=i[o];((e=t==null?void 0:t(r,n))!==null&&e!==void 0?e:r-n>0)&&(n=r)}return n},nd=(i,t)=>{var e;if(i.length===0)return;let n=i[0];for(let o=1;o<i.length;o++){const r=i[o];((e=t==null?void 0:t(r,n))!==null&&e!==void 0?e:r-n<0)&&(n=r)}return n};function Jl(i,t){if(!tt(i)||!tt(t)||i.length!==t.length)return!1;for(let e=0;e<i.length;e++)if(i[e]!==t[e])return!1;return!0}function Ff(i){if(!tt(i))return[i];const t=[];for(const e of i)t.push(...Ff(e));return t}function VP(i,t,e){z(t)||(t=i,i=0),z(e)||(e=1);let n=-1;const o=0|Math.max(0,Math.ceil((t-i)/e)),r=new Array(o);for(;++n<o;)r[n]=i+n*e;return r}function jP(i,t){return i<t?-1:i>t?1:i>=t?0:NaN}function Ql(i){return Number(i)}const $P=typeof console!="undefined";function od(i,t,e){const n=[t].concat([].slice.call(e));$P&&console[i].apply(console,n)}var jn;(function(i){i[i.None=0]="None",i[i.Error=1]="Error",i[i.Warn=2]="Warn",i[i.Info=3]="Info",i[i.Debug=4]="Debug"})(jn||(jn={}));class _e{static getInstance(t,e){return _e._instance&&at(t)?_e._instance.level(t):_e._instance||(_e._instance=new _e(t,e)),_e._instance}static setInstance(t){return _e._instance=t}static setInstanceLevel(t){_e._instance?_e._instance.level(t):_e._instance=new _e(t)}static clearInstance(){_e._instance=null}constructor(t=jn.None,e){this._onErrorHandler=[],this._level=t,this._method=e}addErrorHandler(t){this._onErrorHandler.find(e=>e===t)||this._onErrorHandler.push(t)}removeErrorHandler(t){const e=this._onErrorHandler.findIndex(n=>n===t);e<0||this._onErrorHandler.splice(e,1)}callErrorHandler(...t){this._onErrorHandler.forEach(e=>e(...t))}canLogInfo(){return this._level>=jn.Info}canLogDebug(){return this._level>=jn.Debug}canLogError(){return this._level>=jn.Error}canLogWarn(){return this._level>=jn.Warn}level(t){return arguments.length?(this._level=+t,this):this._level}error(...t){var e;return this._level>=jn.Error&&(this._onErrorHandler.length?this.callErrorHandler(...t):od((e=this._method)!==null&&e!==void 0?e:"error","ERROR",t)),this}warn(...t){return this._level>=jn.Warn&&od(this._method||"warn","WARN",t),this}info(...t){return this._level>=jn.Info&&od(this._method||"log","INFO",t),this}debug(...t){return this._level>=jn.Debug&&od(this._method||"log","DEBUG",t),this}}_e._instance=null;function GP(i,t,e=0,n){for(Rt(n)&&(n=i.length);e<n;){const o=e+n>>>1;jP(i[o],t)>0?n=o:e=o+1}return e}const UP=(i,t,e)=>{let n=i,o=t;for(;n<o;){const r=Math.floor((n+o)/2);e(r)>=0?o=r:n=r+1}return n},KP=1e-10,YP=1e-10;function $n(i,t,e=YP,n=KP){const o=n,r=e*Math.max(i,t);return Math.abs(i-t)<=Math.max(o,r)}function TC(i,t,e,n){return i>t&&!$n(i,t,e,n)}function MC(i,t,e,n){return i<t&&!$n(i,t,e,n)}const ta=i=>{let t=null,e=null;return(...n)=>(t&&n.every((o,r)=>o===t[r])||(t=n,e=i(...n)),e)},sn=function(i,t,e){return i<t?t:i>e?e:i},$r=(i,t,e)=>{let[n,o]=i;o<n&&(n=i[1],o=i[0]);const r=o-n;return r>=e-t?[t,e]:(n=Math.min(Math.max(n,t),e-r),[n,n+r])};function If(i,t){let e;return i>t&&(e=i,i=t,t=e),n=>Math.max(i,Math.min(t,n))}let rd=!1;try{rd=typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"}catch(i){rd=!1}function BC(i,t,e){let n,o,r,s,l,a,h=0,d=!1,u=!1,c=!0;const g=!t&&t!==0&&rd;if(typeof i!="function")throw new TypeError("Expected a function");function f(_){const C=n,y=o;return n=o=void 0,h=_,s=i.apply(y,C),s}function p(_,C){return g?(cancelAnimationFrame(l),requestAnimationFrame(_)):setTimeout(_,C)}function m(_){const C=_-a;return a===void 0||C>=t||C<0||u&&_-h>=r}function v(){const _=Date.now();if(m(_))return b(_);l=p(v,function(C){const y=C-h,R=t-(C-a);return u?Math.min(R,r-y):R}(_))}function b(_){return l=void 0,c&&n?f(_):(n=o=void 0,s)}function S(..._){const C=Date.now(),y=m(C);if(n=_,o=this,a=C,y){if(l===void 0)return function(R){return h=R,l=p(v,t),d?f(R):s}(a);if(u)return l=p(v,t),f(a)}return l===void 0&&(l=p(v,t)),s}return t=+t||0,se(e)&&(d=!!e.leading,u="maxWait"in e,u&&(r=Math.max(ye(e.maxWait)?e.maxWait:0,t)),c="trailing"in e?!!e.trailing:c),S.cancel=function(){l!==void 0&&function(_){if(g)return cancelAnimationFrame(_);clearTimeout(_)}(l),h=0,n=a=o=l=void 0},S.flush=function(){return l===void 0?s:b(Date.now())},S.pending=function(){return l!==void 0},S}rd=!1;function PC(i,t,e){let n=!0,o=!0;if(typeof i!="function")throw new TypeError("Expected a function");return se(e)&&(n="leading"in e?!!e.leading:n,o="trailing"in e?!!e.trailing:o),BC(i,t,{leading:n,trailing:o,maxWait:t})}function sd(i,t){return e=>i*(1-e)+t*e}function XP(i,t){return function(e){return Math.round(i*(1-e)+t*e)}}function qP(i,t){const e=i.valueOf(),n=t.valueOf(),o=new Date;return r=>(o.setTime(e*(1-r)+n*r),o)}const Be=1e-12,we=Math.PI,wn=we/2,_i=2*we,le=2*Math.PI,fe=Math.abs,ue=Math.atan2,ii=Math.cos,dr=Math.max,Bi=Math.min,ze=Math.sin,Gn=Math.sqrt,Fs=Math.pow;function ZP(i){return i>1?0:i<-1?we:Math.acos(i)}function HC(i){return i>=1?wn:i<=-1?-wn:Math.asin(i)}function EC(i,t,e,n,o){let r=e,s=n;return typeof i=="number"&&typeof e=="number"&&(r=(1-o)*i+o*e),typeof t=="number"&&typeof n=="number"&&(s=(1-o)*t+o*n),{x:r,y:s}}function JP(i,t){return i[0]*t[1]-i[1]*t[0]}class Ue{constructor(t=0,e=0,n,o){this.x=0,this.y=0,this.x=t,this.y=e,this.x1=n,this.y1=o}clone(){return new Ue(this.x,this.y)}copyFrom(t){return this.x=t.x,this.y=t.y,this.x1=t.x1,this.y1=t.y1,this.defined=t.defined,this.context=t.context,this}set(t,e){return this.x=t,this.y=e,this}add(t){return at(t)?(this.x+=t,void(this.y+=t)):(this.x+=t.x,this.y+=t.y,this)}sub(t){return at(t)?(this.x-=t,void(this.y-=t)):(this.x-=t.x,this.y-=t.y,this)}multi(t){throw new Error("暂不支持")}div(t){throw new Error("暂不支持")}}class Eo{static distancePP(t,e){return Gn(Fs(t.x-e.x,2)+Fs(t.y-e.y,2))}static distanceNN(t,e,n,o){return Gn(Fs(t-n,2)+Fs(e-o,2))}static distancePN(t,e,n){return Gn(Fs(e-t.x,2)+Fs(n-t.y,2))}static pointAtPP(t,e,n){return new Ue((e.x-t.x)*n+t.x,(e.y-t.y)*n+t.y)}}function Sn(i){return i*(Math.PI/180)}function QP(i){return 180*i/Math.PI}const t2=(i=0)=>{if(i<0)for(;i<-_i;)i+=_i;else if(i>0)for(;i>_i;)i-=_i;return i};function e2(i,t,e){return t?{x:i.x+t*Math.cos(e),y:i.y+t*Math.sin(e)}:{x:i.x,y:i.y}}function LC(i){for(;i<0;)i+=2*Math.PI;for(;i>=2*Math.PI;)i-=2*Math.PI;return i}function kC(i,t,e){if(i===null)return t;if(t===null)return i;const{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}=Of(i,t,e);return n>=a||o<=l||r>=d||s<=h?{x1:0,y1:0,x2:0,y2:0}:{x1:Math.max(n,l),y1:Math.max(r,h),x2:Math.min(o,a),y2:Math.min(s,d)}}var Is;(function(i){i[i.NONE=0]="NONE",i[i.BBOX1=1]="BBOX1",i[i.BBOX2=2]="BBOX2"})(Is||(Is={}));const Of=(i,t,e)=>{let n=i.x1,o=i.x2,r=i.y1,s=i.y2,l=t.x1,a=t.x2,h=t.y1,d=t.y2;return e&&(n>o&&([n,o]=[o,n]),r>s&&([r,s]=[s,r]),l>a&&([l,a]=[a,l]),h>d&&([h,d]=[d,h])),{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}};function i2(i,t,e){if(!i||!t)return Is.NONE;const{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}=Of(i,t,e);return n>l&&o<a&&r>h&&s<d?Is.BBOX1:l>n&&a<o&&h>r&&d<s?Is.BBOX2:Is.NONE}function Df(i,t,e){if(i&&t){if(!e)return!(i.x1>t.x2||i.x2<t.x1||i.y1>t.y2||i.y2<t.y1);const{x11:n,x12:o,y11:r,y12:s,x21:l,x22:a,y21:h,y22:d}=Of(i,t,!0);return!(n>a||o<l||r>d||s<h)}return!0}function zf(i,t){return Math.abs(t[0]*i[0]+t[1]*i[1])}function Os({x:i,y:t},e,n={x:0,y:0}){return{x:(i-n.x)*Math.cos(e)-(t-n.y)*Math.sin(e)+n.x,y:(i-n.x)*Math.sin(e)+(t-n.y)*Math.cos(e)+n.y}}function Wf(i){return{x:(i.x1+i.x2)/2,y:(i.y1+i.y2)/2}}function FC(i,t){const e=t?Sn(i.angle):i.angle,n=Wf(i);return[Os({x:i.x1,y:i.y1},e,n),Os({x:i.x2,y:i.y1},e,n),Os({x:i.x2,y:i.y2},e,n),Os({x:i.x1,y:i.y2},e,n)]}function IC(i,t,e=!1,n){const o=FC(i,e),r=FC(t,e),s=(S,_)=>[_.x-S.x,_.y-S.y];n&&(n.save(),n.fillStyle="red",n.globalAlpha=.6,o.forEach((S,_)=>{_===0?n.moveTo(S.x,S.y):n.lineTo(S.x,S.y)}),n.fill(),n.restore(),n.save(),n.fillStyle="green",n.globalAlpha=.6,r.forEach((S,_)=>{_===0?n.moveTo(S.x,S.y):n.lineTo(S.x,S.y)}),n.fill(),n.restore());const l=Wf(i),a=Wf(t);n&&n.fillRect(l.x,l.y,2,2),n&&n.fillRect(a.x,a.y,2,2);const h=s(l,a),d=s(o[0],o[1]),u=s(o[1],o[2]),c=s(r[0],r[1]),g=s(r[1],r[2]),f=e?Sn(i.angle):i.angle;let p=e?Sn(90-i.angle):i.angle+wn;const m=e?Sn(t.angle):t.angle;let v=e?Sn(90-t.angle):t.angle+wn;p>le&&(p-=le),v>le&&(v-=le);const b=(S,_,C,y)=>{const R=[Math.cos(_),Math.sin(_)];return S+(zf(R,C)+zf(R,y))/2>zf(R,h)};return b((i.x2-i.x1)/2,f,c,g)&&b((i.y2-i.y1)/2,p,c,g)&&b((t.x2-t.x1)/2,m,d,u)&&b((t.y2-t.y1)/2,v,d,u)}const OC=i=>{let t=i.charCodeAt(0),e=i.length===2?i.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=e&&e<=57343&&(t&=1023,e&=1023,n=t<<10|e,n+=65536),n===12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n===8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n===172||n===175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n===161||n===164||167<=n&&n<=168||n===170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n===198||n===208||215<=n&&n<=216||222<=n&&n<=225||n===230||232<=n&&n<=234||236<=n&&n<=237||n===240||242<=n&&n<=243||247<=n&&n<=250||n===252||n===254||n===257||n===273||n===275||n===283||294<=n&&n<=295||n===299||305<=n&&n<=307||n===312||319<=n&&n<=322||n===324||328<=n&&n<=331||n===333||338<=n&&n<=339||358<=n&&n<=359||n===363||n===462||n===464||n===466||n===468||n===470||n===472||n===474||n===476||n===593||n===609||n===708||n===711||713<=n&&n<=715||n===717||n===720||728<=n&&n<=731||n===733||n===735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n===1025||1040<=n&&n<=1103||n===1105||n===8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n===8240||8242<=n&&n<=8243||n===8245||n===8251||n===8254||n===8308||n===8319||8321<=n&&n<=8324||n===8364||n===8451||n===8453||n===8457||n===8467||n===8470||8481<=n&&n<=8482||n===8486||n===8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n===8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n===8658||n===8660||n===8679||n===8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n===8715||n===8719||n===8721||n===8725||n===8730||8733<=n&&n<=8736||n===8739||n===8741||8743<=n&&n<=8748||n===8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n===8776||n===8780||n===8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n===8853||n===8857||n===8869||n===8895||n===8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n===9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n===9711||9733<=n&&n<=9734||n===9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n===9756||n===9758||n===9792||n===9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n===9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n===9955||9960<=n&&n<=9983||n===10045||n===10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n===65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"};function ld(i,t={},e){e||(e=1);const{fontStyle:n=t.fontStyle,fontVariant:o=t.fontVariant,fontWeight:r=t.fontWeight,fontSize:s=t.fontSize,fontFamily:l=t.fontFamily}=i;return(n?n+" ":"")+(o?o+" ":"")+(r?r+" ":"")+s*e+"px "+(l||"sans-serif")}class gi{constructor(t,e){this._numberCharSize=null,this._fullCharSize=null,this._letterCharSize=null,this._specialCharSizeMap={},this._canvas=null,this._context=null,this._contextSaved=!1,this._notSupportCanvas=!1,this._notSupportVRender=!1,this._userSpec={},this.specialCharSet=`-/: .,@%'"~`,this._option=t,this._userSpec=e!=null?e:{},this.textSpec=this._initSpec(),z(t.specialCharSet)&&(this.specialCharSet=t.specialCharSet),this._standardMethod=z(t.getTextBounds)?this.fullMeasure.bind(this):this.measureWithNaiveCanvas.bind(this)}initContext(){if(this._notSupportCanvas)return!1;if(Rt(this._canvas)&&(z(this._option.getCanvasForMeasure)&&(this._canvas=this._option.getCanvasForMeasure()),Rt(this._canvas)&&typeof window!="undefined"&&window.document!==void 0&&globalThis&&z(globalThis.document)&&(this._canvas=globalThis.document.createElement("canvas"))),Rt(this._context)&&z(this._canvas)){const t=this._canvas.getContext("2d");z(t)&&(t.save(),t.font=ld(this.textSpec),this._contextSaved=!0,this._context=t)}return!Rt(this._context)||(this._notSupportCanvas=!0,!1)}_initSpec(){var t,e,n;const{defaultFontParams:o={}}=this._option,{fontStyle:r=o.fontStyle,fontVariant:s=o.fontVariant,fontWeight:l=(t=o.fontWeight)!==null&&t!==void 0?t:"normal",fontSize:a=(e=o.fontSize)!==null&&e!==void 0?e:12,fontFamily:h=(n=o.fontFamily)!==null&&n!==void 0?n:"sans-serif",align:d,textAlign:u=d!=null?d:"center",baseline:c,textBaseline:g=c!=null?c:"middle",ellipsis:f,limit:p}=this._userSpec;let{lineHeight:m=a}=this._userSpec;if(re(m)&&m[m.length-1]==="%"){const v=Number.parseFloat(m.substring(0,m.length-1))/100;m=a*v}return{fontStyle:r,fontVariant:s,fontFamily:h,fontSize:a,fontWeight:l,textAlign:u,textBaseline:g,ellipsis:f,limit:p,lineHeight:m}}measure(t,e){switch(e){case"vrender":case"canopus":return this.fullMeasure(t);case"canvas":return this.measureWithNaiveCanvas(t);case"simple":return this.quickMeasureWithoutCanvas(t);default:return this.quickMeasure(t)}}fullMeasure(t){if(Rt(t))return{width:0,height:0};if(Rt(this._option.getTextBounds)||!this._notSupportVRender)return this.measureWithNaiveCanvas(t);const{fontFamily:e,fontSize:n,fontWeight:o,textAlign:r,textBaseline:s,ellipsis:l,limit:a,lineHeight:h}=this.textSpec;let d;try{const u=this._option.getTextBounds({text:t,fontFamily:e,fontSize:n,fontWeight:o,textAlign:r,textBaseline:s,ellipsis:!!l,maxLineWidth:a||1/0,lineHeight:h});d={width:u.width(),height:u.height()}}catch(u){this._notSupportVRender=!0,d=this.measureWithNaiveCanvas(t)}return d}measureWithNaiveCanvas(t){return this._measureReduce(t,this._measureWithNaiveCanvas.bind(this))}_measureWithNaiveCanvas(t){var e;if(!this.initContext())return this._quickMeasureWithoutCanvas(t);const n=this._context.measureText(t),{fontSize:o,lineHeight:r}=this.textSpec;return{width:n.width,height:(e=r)!==null&&e!==void 0?e:o}}quickMeasure(t){return this._measureReduce(t,this._quickMeasure.bind(this))}_quickMeasure(t){const e={width:0,height:0};for(let n=0;n<t.length;n++){const o=t[n];let r=this._measureSpecialChar(o);Rt(r)&&gi.NUMBERS_CHAR_SET.includes(o)&&(r=this._measureNumberChar()),Rt(r)&&["F","W"].includes(OC(o))&&(r=this._measureFullSizeChar()),Rt(r)&&(r=this._measureLetterChar()),e.width+=r.width,e.height=Math.max(e.height,r.height)}return e}quickMeasureWithoutCanvas(t){return this._measureReduce(t,this._quickMeasureWithoutCanvas.bind(this))}_quickMeasureWithoutCanvas(t){var e;const n={width:0,height:0},{fontSize:o,lineHeight:r}=this.textSpec;for(let s=0;s<t.length;s++){const l=t[s],a=["F","W"].includes(OC(l))?1:.53;n.width+=a*o}return n.height=(e=r)!==null&&e!==void 0?e:o,n}_measureReduce(t,e){var n;const{fontSize:o,lineHeight:r}=this.textSpec,s={width:0,height:0};if(Rt(t))return s;if(tt(t)){const l=t.filter(z).map(a=>a.toString());return l.length===0?s:l.length===1?e(l[0]):{width:l.reduce((a,h)=>Math.max(a,e(h).width),0),height:l.length*(((n=r)!==null&&n!==void 0?n:o)+1)+1}}return e(t.toString())}_measureNumberChar(){if(Rt(this._numberCharSize)){const t=this._standardMethod(gi.NUMBERS_CHAR_SET);this._numberCharSize={width:t.width/gi.NUMBERS_CHAR_SET.length,height:t.height}}return this._numberCharSize}_measureFullSizeChar(){return Rt(this._fullCharSize)&&(this._fullCharSize=this._standardMethod(gi.FULL_SIZE_CHAR)),this._fullCharSize}_measureLetterChar(){if(Rt(this._letterCharSize)){const t=this._standardMethod(gi.ALPHABET_CHAR_SET);this._letterCharSize={width:t.width/gi.ALPHABET_CHAR_SET.length,height:t.height}}return this._letterCharSize}_measureSpecialChar(t){return z(this._specialCharSizeMap[t])?this._specialCharSizeMap[t]:this.specialCharSet.includes(t)?(this._specialCharSizeMap[t]=this._standardMethod(t),this._specialCharSizeMap[t]):null}release(){z(this._canvas)&&(this._canvas=null),z(this._context)&&(this._contextSaved&&(this._context.restore(),this._contextSaved=!1),this._context=null)}}gi.ALPHABET_CHAR_SET="abcdefghijklmnopqrstuvwxyz",gi.NUMBERS_CHAR_SET="0123456789",gi.FULL_SIZE_CHAR="字";function Nf(i,t,e){const{x1:n,y1:o,x2:r,y2:s}=t;return e.onlyTranslate()?(i!==t&&i.setValue(t.x1,t.y1,t.x2,t.y2),i.translate(e.e,e.f),t):(i.clear(),i.add(e.a*n+e.c*o+e.e,e.b*n+e.d*o+e.f),i.add(e.a*r+e.c*o+e.e,e.b*r+e.d*o+e.f),i.add(e.a*r+e.c*s+e.e,e.b*r+e.d*s+e.f),i.add(e.a*n+e.c*s+e.e,e.b*n+e.d*s+e.f),t)}class ln{constructor(t){t?this.setValue(t.x1,t.y1,t.x2,t.y2):this.clear()}clone(){return new ln(this)}clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this}empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE}equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2}setValue(t=0,e=0,n=0,o=0){return this.x1=t,this.y1=e,this.x2=n,this.y2=o,this}set(t=0,e=0,n=0,o=0){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),o<e?(this.y2=e,this.y1=o):(this.y1=e,this.y2=o),this}add(t=0,e=0){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this}expand(t=0){return tt(t)?(this.y1-=t[0],this.x2+=t[1],this.y2+=t[2],this.x1-=t[3]):(this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t),this}round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this}translate(t=0,e=0){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this}rotate(t=0,e=0,n=0){const o=this.rotatedPoints(t,e,n);return this.clear().add(o[0],o[1]).add(o[2],o[3]).add(o[4],o[5]).add(o[6],o[7])}scale(t=0,e=0,n=0,o=0){const r=this.scalePoints(t,e,n,o);return this.clear().add(r[0],r[1]).add(r[2],r[3])}union(t){return t.x1<this.x1&&(this.x1=t.x1),t.y1<this.y1&&(this.y1=t.y1),t.x2>this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this}intersect(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2<this.x2&&(this.x2=t.x2),t.y2<this.y2&&(this.y2=t.y2),this}encloses(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2}alignsWith(t){return t&&(this.x1===t.x1||this.x2===t.x2||this.y1===t.y1||this.y2===t.y2)}intersects(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)}contains(t=0,e=0){return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)}containsPoint(t){return!(t.x<this.x1||t.x>this.x2||t.y<this.y1||t.y>this.y2)}width(){return this.empty()?0:this.x2-this.x1}height(){return this.empty()?0:this.y2-this.y1}scaleX(t=0){return this.x1*=t,this.x2*=t,this}scaleY(t=0){return this.y1*=t,this.y2*=t,this}transformWithMatrix(t){return Nf(this,this,t),this}copy(t){return this.x1=t.x1,this.y1=t.y1,this.x2=t.x2,this.y2=t.y2,this}rotatedPoints(t,e,n){const{x1:o,y1:r,x2:s,y2:l}=this,a=Math.cos(t),h=Math.sin(t),d=e-e*a+n*h,u=n-e*h-n*a;return[a*o-h*r+d,h*o+a*r+u,a*o-h*l+d,h*o+a*l+u,a*s-h*r+d,h*s+a*r+u,a*s-h*l+d,h*s+a*l+u]}scalePoints(t,e,n,o){const{x1:r,y1:s,x2:l,y2:a}=this;return[t*r+(1-t)*n,e*s+(1-e)*o,t*l+(1-t)*n,e*a+(1-e)*o]}}class Pe extends ln{}class n2 extends ln{constructor(t,e=0){super(t),t&&(this.angle=e)}intersects(t){return IC(this,t)}setValue(t=0,e=0,n=0,o=0,r=0){return super.setValue(t,e,n,o),this.angle=r,this}}class ni{constructor(t=1,e=0,n=0,o=1,r=0,s=0){this.a=t,this.b=e,this.c=n,this.d=o,this.e=r,this.f=s}equalToMatrix(t){return!(this.e!==t.e||this.f!==t.f||this.a!==t.a||this.d!==t.d||this.b!==t.b||this.c!==t.c)}equalTo(t,e,n,o,r,s){return!(this.e!==r||this.f!==s||this.a!==t||this.d!==o||this.b!==e||this.c!==n)}setValue(t,e,n,o,r,s){return this.a=t,this.b=e,this.c=n,this.d=o,this.e=r,this.f=s,this}reset(){return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this}getInverse(){const t=this.a,e=this.b,n=this.c,o=this.d,r=this.e,s=this.f,l=new ni,a=t*o-e*n;return l.a=o/a,l.b=-e/a,l.c=-n/a,l.d=t/a,l.e=(n*s-o*r)/a,l.f=-(t*s-e*r)/a,l}rotate(t){const e=Math.cos(t),n=Math.sin(t),o=this.a*e+this.c*n,r=this.b*e+this.d*n,s=this.a*-n+this.c*e,l=this.b*-n+this.d*e;return this.a=o,this.b=r,this.c=s,this.d=l,this}rotateByCenter(t,e,n){const o=Math.cos(t),r=Math.sin(t),s=(1-o)*e+r*n,l=(1-o)*n-r*e,a=o*this.a-r*this.b,h=r*this.a+o*this.b,d=o*this.c-r*this.d,u=r*this.c+o*this.d,c=o*this.e-r*this.f+s,g=r*this.e+o*this.f+l;return this.a=a,this.b=h,this.c=d,this.d=u,this.e=c,this.f=g,this}scale(t,e){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this}setScale(t,e){return this.b=this.b/this.a*t,this.c=this.c/this.d*e,this.a=t,this.d=e,this}transform(t,e,n,o,r,s){return this.multiply(t,e,n,o,r,s),this}translate(t,e){return this.e+=this.a*t+this.c*e,this.f+=this.b*t+this.d*e,this}transpose(){const{a:t,b:e,c:n,d:o,e:r,f:s}=this;return this.a=e,this.b=t,this.c=o,this.d=n,this.e=s,this.f=r,this}multiply(t,e,n,o,r,s){const l=this.a,a=this.b,h=this.c,d=this.d,u=l*t+h*e,c=a*t+d*e,g=l*n+h*o,f=a*n+d*o,p=l*r+h*s+this.e,m=a*r+d*s+this.f;return this.a=u,this.b=c,this.c=g,this.d=f,this.e=p,this.f=m,this}interpolate(t,e){const n=new ni;return n.a=this.a+(t.a-this.a)*e,n.b=this.b+(t.b-this.b)*e,n.c=this.c+(t.c-this.c)*e,n.d=this.d+(t.d-this.d)*e,n.e=this.e+(t.e-this.e)*e,n.f=this.f+(t.f-this.f)*e,n}transformPoint(t,e){const{a:n,b:o,c:r,d:s,e:l,f:a}=this,h=n*s-o*r,d=s/h,u=-o/h,c=-r/h,g=n/h,f=(r*a-s*l)/h,p=-(n*a-o*l)/h,{x:m,y:v}=t;e.x=m*d+v*c+f,e.y=m*u+v*g+p}onlyTranslate(t=1){return this.a===t&&this.b===0&&this.c===0&&this.d===t}clone(){return new ni(this.a,this.b,this.c,this.d,this.e,this.f)}toTransformAttrs(){const t=this.a,e=this.b,n=this.c,o=this.d,r=t*o-e*n,s={x:this.e,y:this.f,rotateDeg:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!==0||e!==0){const l=Math.sqrt(t*t+e*e);s.rotateDeg=e>0?Math.acos(t/l):-Math.acos(t/l),s.scaleX=l,s.scaleY=r/l,s.skewX=(t*n+e*o)/r,s.skewY=0}else if(n!==0||o!==0){const l=Math.sqrt(n*n+o*o);s.rotateDeg=Math.PI/2-(o>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=r/l,s.scaleY=l,s.skewX=0,s.skewY=(t*n+e*o)/r}return s.rotateDeg=QP(s.rotateDeg),s}}function o2(i,t,e,n,o,r,s,l){const a=t.a,h=t.b,d=t.c,u=t.d,c=t.e,g=t.f,f=ii(s),p=ze(s);let m,v;l?(m=l[0],v=l[1]):(m=e,v=n);const b=m-e,S=v-n,_=a*f+d*p,C=h*f+u*p,y=d*f-a*p,R=u*f-h*p;i.a=o*_,i.b=o*C,i.c=r*y,i.d=r*R,i.e=c+a*m+d*v-_*b-y*S,i.f=g+h*m+u*v-C*b-R*S}class r2{constructor(){this.CLEAN_THRESHOLD=1e3,this.L_TIME=1e3,this.R_COUNT=1,this.R_TIMESTAMP_MAX_SIZE=20}clearCache(t,e){const{CLEAN_THRESHOLD:n=this.CLEAN_THRESHOLD,L_TIME:o=this.L_TIME,R_COUNT:r=this.R_COUNT}=e;if(t.size<n)return 0;let s=0;const l=h=>{s++,t.delete(h)},a=Date.now();return t.forEach((h,d)=>{if(h.timestamp.length<r)return l(d);let u=0;for(;a-h.timestamp[h.timestamp.length-1-u]<o&&(u++,!(u>=r)););if(u<r)return l(d);for(;a-h.timestamp[0]>o;)h.timestamp.shift()}),s}addLimitedTimestamp(t,e,n){const{R_TIMESTAMP_MAX_SIZE:o=this.R_TIMESTAMP_MAX_SIZE}=n;t.timestamp.length>o&&t.timestamp.shift(),t.timestamp.push(e)}clearTimeStamp(t,e){const{L_TIME:n=this.L_TIME}=e,o=Date.now();t.forEach(r=>{for(;o-r.timestamp[0]>n;)r.timestamp.shift()})}clearItemTimestamp(t,e){const{L_TIME:n=this.L_TIME}=e,o=Date.now();for(;o-t.timestamp[0]>n;)t.timestamp.shift()}}function Vf(i,t,e){t/=100,e/=100;const n=(1-Math.abs(2*e-1))*t,o=n*(1-Math.abs(i/60%2-1)),r=e-n/2;let s=0,l=0,a=0;return 0<=i&&i<60?(s=n,l=o,a=0):60<=i&&i<120?(s=o,l=n,a=0):120<=i&&i<180?(s=0,l=n,a=o):180<=i&&i<240?(s=0,l=o,a=n):240<=i&&i<300?(s=o,l=0,a=n):300<=i&&i<360&&(s=n,l=0,a=o),s=Math.round(255*(s+r)),l=Math.round(255*(l+r)),a=Math.round(255*(a+r)),{r:s,g:l,b:a}}function jf(i,t,e){i/=255,t/=255,e/=255;const n=Math.min(i,t,e),o=Math.max(i,t,e),r=o-n;let s=0,l=0,a=0;return s=r===0?0:o===i?(t-e)/r%6:o===t?(e-i)/r+2:(i-t)/r+4,s=Math.round(60*s),s<0&&(s+=360),a=(o+n)/2,l=r===0?0:r/(1-Math.abs(2*a-1)),l=+(100*l).toFixed(1),a=+(100*a).toFixed(1),{h:s,s:l,l:a}}const s2=/^#([0-9a-f]{3,8})$/,DC={transparent:4294967040},ad={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};function hd(i){return((i=Math.max(0,Math.min(255,Math.round(i)||0)))<16?"0":"")+i.toString(16)}function zC(i){return at(i)?new zi(i>>16,i>>8&255,255&i,1):tt(i)?new zi(i[0],i[1],i[2]):new zi(255,255,255)}function l2(i){return at(i)?new zi(i>>>24,i>>>16&255,i>>>8&255,255&i):tt(i)?new zi(i[0],i[1],i[2],i[3]):new zi(255,255,255,1)}function $f(i){return i<.04045?.0773993808*i:Math.pow(.9478672986*i+.0521327014,2.4)}function Gf(i){return i<.0031308?12.92*i:1.055*Math.pow(i,.41666)-.055}const WC=(i,t)=>{const e=s2.exec(i);if(t||e){const n=parseInt(e[1],16),o=e[1].length;return o===3?new zi((n>>8&15)+((n>>8&15)<<4),(n>>4&15)+((n>>4&15)<<4),(15&n)+((15&n)<<4),1):o===6?zC(n):o===8?new zi(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):null}};class an{static Brighter(t,e=1){return e===1?t:new an(t).brighter(e).toRGBA()}static SetOpacity(t,e=1){return e===1?t:new an(t).setOpacity(e).toRGBA()}static getColorBrightness(t,e="hsl"){const n=t instanceof an?t:new an(t);switch(e){case"hsv":default:return n.getHSVBrightness();case"hsl":return n.getHSLBrightness();case"lum":return n.getLuminance();case"lum2":return n.getLuminance2();case"lum3":return n.getLuminance3()}}static parseColorString(t){if(z(DC[t]))return l2(DC[t]);if(z(ad[t]))return zC(ad[t]);const e=`${t}`.trim().toLowerCase(),n=WC(e);if(n!==void 0)return n;if(/^(rgb|RGB|rgba|RGBA)/.test(e)){const o=e.replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(",");return new zi(parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10),parseFloat(o[3]))}if(/^(hsl|HSL|hsla|HSLA)/.test(e)){const o=e.replace(/(?:\(|\)|hsla|HSLA|hsl|HSL)*/g,"").split(","),r=Vf(parseInt(o[0],10),parseInt(o[1],10),parseInt(o[2],10));return new zi(r.r,r.g,r.b,parseFloat(o[3]))}}constructor(t){const e=an.parseColorString(t);e?this.color=e:(console.warn(`Warn: 传入${t}无法解析为Color`),this.color=new zi(255,255,255))}toRGBA(){return this.color.formatRgb()}toString(){return this.color.formatRgb()}toHex(){return this.color.formatHex()}toHsl(){return this.color.formatHsl()}brighter(t){const{r:e,g:n,b:o}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(e*t))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t))),this.color.b=Math.max(0,Math.min(255,Math.floor(o*t))),this}add(t){const{r:e,g:n,b:o}=this.color;return this.color.r+=Math.min(255,e+t.color.r),this.color.g+=Math.min(255,n+t.color.g),this.color.b+=Math.min(255,o+t.color.b),this}sub(t){return this.color.r=Math.max(0,this.color.r-t.color.r),this.color.g=Math.max(0,this.color.g-t.color.g),this.color.b=Math.max(0,this.color.b-t.color.b),this}multiply(t){const{r:e,g:n,b:o}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(e*t.color.r))),this.color.g=Math.max(0,Math.min(255,Math.floor(n*t.color.g))),this.color.b=Math.max(0,Math.min(255,Math.floor(o*t.color.b))),this}getHSVBrightness(){return Math.max(this.color.r,this.color.g,this.color.b)/255}getHSLBrightness(){return .5*(Math.max(this.color.r,this.color.g,this.color.b)/255+Math.min(this.color.r,this.color.g,this.color.b)/255)}setHsl(t,e,n){const o=this.color.opacity,r=jf(this.color.r,this.color.g,this.color.b),s=Vf(Rt(t)?r.h:sn(t,0,360),Rt(e)?r.s:e>=0&&e<=1?100*e:e,Rt(n)?r.l:n<=1&&n>=0?100*n:n);return this.color=new zi(s.r,s.g,s.b,o),this}setRGB(t,e,n){return!Rt(t)&&(this.color.r=t),!Rt(e)&&(this.color.g=e),!Rt(n)&&(this.color.b=n),this}setHex(t){const e=`${t}`.trim().toLowerCase(),n=WC(e,!0);return n!=null?n:this}setColorName(t){const e=ad[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}setScalar(t){return this.color.r=t,this.color.g=t,this.color.b=t,this}setOpacity(t=1){return this.color.opacity=t,this}getLuminance(){return(.2126*this.color.r+.7152*this.color.g+.0722*this.color.b)/255}getLuminance2(){return(.2627*this.color.r+.678*this.color.g+.0593*this.color.b)/255}getLuminance3(){return(.299*this.color.r+.587*this.color.g+.114*this.color.b)/255}clone(){return new an(this.color.toString())}copyGammaToLinear(t,e=2){return this.color.r=Math.pow(t.color.r,e),this.color.g=Math.pow(t.color.g,e),this.color.b=Math.pow(t.color.b,e),this}copyLinearToGamma(t,e=2){const n=e>0?1/e:1;return this.color.r=Math.pow(t.color.r,n),this.color.g=Math.pow(t.color.g,n),this.color.b=Math.pow(t.color.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.color.r=$f(t.color.r),this.color.g=$f(t.color.g),this.color.b=$f(t.color.b),this}copyLinearToSRGB(t){return this.color.r=Gf(t.color.r),this.color.g=Gf(t.color.g),this.color.b=Gf(t.color.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}}class zi{constructor(t,e,n,o){this.r=isNaN(+t)?255:Math.max(0,Math.min(255,+t)),this.g=isNaN(+e)?255:Math.max(0,Math.min(255,+e)),this.b=isNaN(+n)?255:Math.max(0,Math.min(255,+n)),z(o)?this.opacity=isNaN(+o)?1:Math.max(0,Math.min(1,+o)):this.opacity=1}formatHex(){return`#${hd(this.r)+hd(this.g)+hd(this.b)+(this.opacity===1?"":hd(255*this.opacity))}`}formatRgb(){const t=this.opacity;return`${t===1?"rgb(":"rgba("}${this.r},${this.g},${this.b}${t===1?")":`,${t})`}`}formatHsl(){const t=this.opacity,{h:e,s:n,l:o}=jf(this.r,this.g,this.b);return`${t===1?"hsl(":"hsla("}${e},${n}%,${o}%${t===1?")":`,${t})`}`}toString(){return this.formatHex()}}function a2(i){let t="",e="",n="";const o=i[0]==="#"?1:0;for(let r=o;r<i.length;r++)i[r]!=="#"&&(r<o+2?t+=i[r]:r<o+4?e+=i[r]:r<o+6&&(n+=i[r]));return[parseInt(t,16),parseInt(e,16),parseInt(n,16)]}function h2(i,t,e){return Number((1<<24)+(i<<16)+(t<<8)+e).toString(16).slice(1)}function d2(i,t){const e=i.r,n=t.r,o=i.g,r=t.g,s=i.b,l=t.b,a=i.opacity,h=t.opacity;return d=>{const u=Math.round(e*(1-d)+n*d),c=Math.round(o*(1-d)+r*d),g=Math.round(s*(1-d)+l*d);return new zi(u,c,g,a*(1-d)+h*d)}}const u2=Object.freeze(Object.defineProperty({__proto__:null,Color:an,DEFAULT_COLORS:ad,RGB:zi,hexToRgb:a2,hslToRgb:Vf,interpolateRgb:d2,rgbToHex:h2,rgbToHsl:jf},Symbol.toStringTag,{value:"Module"}));function ao(i){if(ye(i))return[i,i,i,i];if(tt(i)){const t=i.length;if(t===1){const e=i[0];return[e,e,e,e]}if(t===2){const[e,n]=i;return[e,n,e,n]}if(t===3){const[e,n,o]=i;return[e,n,o,n]}if(t===4)return i}if(se(i)){const{top:t=0,right:e=0,bottom:n=0,left:o=0}=i;return[t,e,n,o]}return[0,0,0,0]}function c2(i){try{return i instanceof Element}catch(t){const e=["children","innerHTML","classList","setAttribute","tagName","getBoundingClientRect"],n=Object.keys(i);return e.every(o=>n.includes(o))}}const g2=_i-1e-8;class Uf{constructor(t){this.init(t)}init(t){this.bounds=t}arc(t,e,n,o,r,s){if(Math.abs(r-o)>g2)return this.bounds.add(t-n,e-n),void this.bounds.add(t+n,e+n);let l,a,h,d,u=1/0,c=-1/0,g=1/0,f=-1/0;function p(m){h=n*Math.cos(m),d=n*Math.sin(m),h<u&&(u=h),h>c&&(c=h),d<g&&(g=d),d>f&&(f=d)}if(p(o),p(r),r!==o)if((o%=_i)<0&&(o+=_i),(r%=_i)<0&&(r+=_i),r<o&&(s=!s,l=o,o=r,r=l),s)for(r-=_i,l=o-o%wn,a=0;a<4&&l>r;++a,l-=wn)p(l);else for(l=o-o%wn+wn,a=0;a<4&&l<r;++a,l+=wn)p(l);this.bounds.add(t+u,e+g),this.bounds.add(t+c,e+f)}arcTo(t,e,n,o,r){this.bounds.add(t,e)}bezierCurveTo(t,e,n,o,r,s){this.bounds.add(t,e),this.bounds.add(n,o),this.bounds.add(r,s)}closePath(){}ellipse(){throw new Error("不支持ellipse")}lineTo(t,e){this.bounds.add(t,e)}moveTo(t,e){this.bounds.add(t,e)}quadraticCurveTo(t,e,n,o){this.bounds.add(t,e),this.bounds.add(n,o)}rect(t,e,n,o){this.bounds.add(t,e),this.bounds.add(t+n,e+o)}clear(){this.bounds.clear()}release(...t){}}class f2{constructor(){this.curves=[],this.bounds=new Pe}getCurveLengths(){return this.curves.map(t=>t.getLength())}getPointAt(t){return{x:0,y:0}}getLength(){return 0}getBounds(){return this.bounds}}const p2=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,m2={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7},ce={A:0,AT:1,C:2,Z:3,E:4,L:5,M:6,Q:7,R:8};let Kf,NC,dd,VC,Yf,ud;function v2(i){if(!i)return[];const t=i.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);if(t===null)return[];let e,n;const o=[];for(let r=0,s=t.length;r<s;r++)if(Kf=t[r],NC=Kf.slice(1),dd=Kf[0],e=[dd],n=NC.match(p2),n!==null){for(let l=0,a=n.length;l<a;l++)VC=n[l],Yf=parseFloat(VC),Number.isNaN(Yf)||e.push(Yf);if(ud=m2[dd],e.length-1>ud){let l,a=dd;for(let h=1,d=e.length;h<d;h+=ud){l=[a];for(let u=h,c=h+ud;u<c;u++)l.push(e[u]);o.push(l),a==="m"?a="l":a==="M"&&(a="L")}}else o.push(e)}else o.push(e);return o}var me;(function(i){i[i.NONE=0]="NONE",i[i.UPDATE_BOUNDS=1]="UPDATE_BOUNDS",i[i.UPDATE_SHAPE=2]="UPDATE_SHAPE",i[i.CLEAR_SHAPE=253]="CLEAR_SHAPE",i[i.UPDATE_SHAPE_AND_BOUNDS=3]="UPDATE_SHAPE_AND_BOUNDS",i[i.INIT=179]="INIT",i[i.CLEAR_BOUNDS=254]="CLEAR_BOUNDS",i[i.UPDATE_GLOBAL_MATRIX=32]="UPDATE_GLOBAL_MATRIX",i[i.CLEAR_GLOBAL_MATRIX=223]="CLEAR_GLOBAL_MATRIX",i[i.UPDATE_LOCAL_MATRIX=16]="UPDATE_LOCAL_MATRIX",i[i.CLEAR_LOCAL_MATRIX=239]="CLEAR_LOCAL_MATRIX",i[i.UPDATE_GLOBAL_LOCAL_MATRIX=48]="UPDATE_GLOBAL_LOCAL_MATRIX",i[i.UPDATE_LAYOUT=128]="UPDATE_LAYOUT",i[i.CLEAR_LAYOUT=127]="CLEAR_LAYOUT"})(me||(me={}));var ea;(function(i){i[i.GLOBAL=1]="GLOBAL",i[i.LOCAL=16]="LOCAL",i[i.GLOBAL_ACCURATE=3]="GLOBAL_ACCURATE",i[i.LOCAL_ACCURATE=48]="LOCAL_ACCURATE"})(ea||(ea={}));var Ki;(function(i){i[i.INIT=0]="INIT",i[i.DEFAULT=1]="DEFAULT",i[i.STATE=2]="STATE",i[i.ANIMATE_BIND=10]="ANIMATE_BIND",i[i.ANIMATE_PLAY=11]="ANIMATE_PLAY",i[i.ANIMATE_START=12]="ANIMATE_START",i[i.ANIMATE_UPDATE=13]="ANIMATE_UPDATE",i[i.ANIMATE_END=14]="ANIMATE_END",i[i.TRANSLATE=20]="TRANSLATE",i[i.TRANSLATE_TO=21]="TRANSLATE_TO",i[i.SCALE=22]="SCALE",i[i.SCALE_TO=23]="SCALE_TO",i[i.ROTATE=24]="ROTATE",i[i.ROTATE_TO=25]="ROTATE_TO"})(Ki||(Ki={}));var Pi;(function(i){i[i.INITIAL=0]="INITIAL",i[i.RUNNING=1]="RUNNING",i[i.PAUSED=2]="PAUSED",i[i.END=3]="END"})(Pi||(Pi={}));var cd;(function(i){i[i.NORMAL=0]="NORMAL",i[i.SET_ATTR_IMMEDIATELY=1]="SET_ATTR_IMMEDIATELY"})(cd||(cd={}));var Ds;(function(i){i.wait="wait",i.from="from",i.to="to",i.customAnimate="customAnimate"})(Ds||(Ds={}));var xe;(function(i){i[i.ROW=1]="ROW",i[i.COLUMN=2]="COLUMN"})(xe||(xe={}));var gd;(function(i){i[i.CubicBezierCurve=0]="CubicBezierCurve",i[i.QuadraticBezierCurve=1]="QuadraticBezierCurve",i[i.ArcCurve=2]="ArcCurve",i[i.LineCurve=3]="LineCurve",i[i.EllipseCurve=4]="EllipseCurve",i[i.MoveCurve=5]="MoveCurve"})(gd||(gd={}));var ae;(function(i){i[i.beforeFillStroke=0]="beforeFillStroke",i[i.afterFillStroke=1]="afterFillStroke"})(ae||(ae={}));function b2(i,t,e,n,o,r,s,l,a){const h=Sn(s),d=Math.sin(h),u=Math.cos(h),c=u*(l-i)*.5+d*(a-t)*.5,g=u*(a-t)*.5-d*(l-i)*.5;let f=c*c/((e=Math.abs(e))*e)+g*g/((n=Math.abs(n))*n);f>1&&(f=Math.sqrt(f),e*=f,n*=f);const p=u/e,m=d/e,v=-d/n,b=u/n,S=p*l+m*a,_=v*l+b*a,C=p*i+m*t,y=v*i+b*t;let R=1/((C-S)*(C-S)+(y-_)*(y-_))-.25;R<0&&(R=0);let A=Math.sqrt(R);r===o&&(A=-A);const x=.5*(S+C)-A*(y-_),T=.5*(_+y)+A*(C-S),M=Math.atan2(_-T,S-x);let B=Math.atan2(y-T,C-x)-M;B<0&&r===1?B+=_i:B>0&&r===0&&(B-=_i);const E=Math.ceil(Math.abs(B/(wn+.001))),k=[];for(let P=0;P<E;++P){const H=M+P*B/E,F=M+(P+1)*B/E;k[P]=[x,T,H,F,e,n,d,u]}return k}function C2(i){const t=i[0],e=i[1],n=i[2],o=i[3],r=i[4],s=i[5],l=i[6],a=i[7],h=a*r,d=-l*s,u=l*r,c=a*s,g=Math.cos(n),f=Math.sin(n),p=Math.cos(o),m=Math.sin(o),v=.5*(o-n),b=Math.sin(.5*v),S=8/3*b*b/Math.sin(v),_=t+g-S*f,C=e+f+S*g,y=t+p,R=e+m,A=y+S*m,x=R-S*p;return[h*_+d*C,u*_+c*C,h*A+d*x,u*A+c*x,h*y+d*R,u*y+c*R]}function jC(i,t,e,n){const o=b2(n[5],n[6],n[0],n[1],n[3],n[4],n[2],t,e);for(let r=0;r<o.length;++r){const s=C2(o[r]);i.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}}const y2=(i,t,e,n,o,r,s)=>{const l=Math.abs(e-t),a=l>.5*Math.PI?Math.ceil(2*l/Math.PI):1,h=(e-t)/a;for(let d=0;d<a;d++){const u=t+h*d,c=t+h*(d+1),g=4*Math.tan(Math.abs(h)/4)/3,f=c<u?-1:1,p=Math.cos(u),m=Math.sin(u),v=Math.cos(c),b=Math.sin(c),S=p*r+n,_=m*s+o,C=v*r+n,y=b*s+o,R=r*g*f,A=s*g*f;i.push(S-R*m,_+A*p,C+R*b,y-A*v,C,y)}},_2=[(i,t,e,n,o,r,s)=>t.arc(i[1]*o+e,i[2]*r+n,i[3]*(o+r)/2,i[4],i[5],i[6],s),(i,t,e,n,o,r,s)=>t.arcTo(i[1]*o+e,i[2]*r+n,i[3]*o+e,i[4]*r+n,i[5]*(o+r)/2,s),(i,t,e,n,o,r,s)=>t.bezierCurveTo(i[1]*o+e,i[2]*r+n,i[3]*o+e,i[4]*r+n,i[5]*o+e,i[6]*r+n,s),(i,t,e,n)=>t.closePath(),(i,t,e,n,o,r)=>t.ellipse(i[1]*o+e,i[2]*r+n,i[3]*o,i[4]*r,i[5],i[6],i[7],i[8]),(i,t,e,n,o,r,s)=>t.lineTo(i[1]*o+e,i[2]*r+n,s),(i,t,e,n,o,r,s)=>t.moveTo(i[1]*o+e,i[2]*r+n,s),(i,t,e,n,o,r,s)=>t.quadraticCurveTo(i[1]*o+e,i[2]*r+n,i[3]*o+e,i[4]*r+n,s),(i,t,e,n,o,r,s)=>t.rect(i[1]*o+e,i[2]*r+n,i[3]*o,i[4]*r,s)];function ur(i,t,e=0,n=0,o=1,r=1,s){for(let l=0;l<i.length;l++){const a=i[l];_2[a[0]](a,t,e,n,o,r,s)}}class $C{getLength(t){return t!=null?this.calcProjLength(t):(Number.isFinite(this.length)||(this.length=this.calcLength()),this.length)}}function w2(i,t){let e=0;const n=i.length;for(let o=0;o<n;o++){const r=i[o],s=t[o],l=i[(o+1)%n],a=t[(o+1)%n];e+=Eo.distanceNN(r,s,l,a)}return e/2}function S2(i,t,e,n,o){return w2([i.x,t.x,e.x,n.x],[i.y,t.y,e.y,n.y])}function GC(i,t,e,n,o){const r=1-o;return r*r*r*i+3*t*o*r*r+3*e*o*o*r+n*o*o*o}function UC(i,t,e,n,o){const r=GC(i.x,t.x,e.x,n.x,o),s=GC(i.y,t.y,e.y,n.y,o);return new Ue(r,s)}function Xf(i,t){const{p0:e,p1:n,p2:o,p3:r}=i,s=UC(e,n,o,r,t),l=Eo.pointAtPP(e,n,t),a=Eo.pointAtPP(n,o,t),h=Eo.pointAtPP(o,r,t),d=Eo.pointAtPP(l,a,t),u=Eo.pointAtPP(a,h,t);return[new qf(e,l,d,s),new qf(s,u,h,r)]}class qf extends $C{constructor(t,e,n,o){super(),this.type=gd.CubicBezierCurve,this.p0=t,this.p1=e,this.p2=n,this.p3=o}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y+this.p2.x+this.p2.y+this.p3.x+this.p3.y)}getPointAt(t){if(this.defined!==!1)return UC(this.p0,this.p1,this.p2,this.p3,t);throw new Error("defined为false的点不能getPointAt")}calcLength(){return this._validPoint()?S2(this.p0,this.p1,this.p2,this.p3):60}calcProjLength(t){return t===xe.ROW?fe(this.p0.x-this.p3.x):t===xe.COLUMN?fe(this.p0.y-this.p3.y):0}getAngleAt(t){const e=dr(t-.01,0),n=Bi(t+.01,1),o=this.getPointAt(e),r=this.getPointAt(n);return ue(r.y-o.y,r.x-o.x)}}function KC(i,t){const{p0:e,p1:n}=i,o=Eo.pointAtPP(e,n,t);return[new Zf(e,o),new Zf(o,n)]}class Zf extends $C{constructor(t,e){super(),this.type=gd.LineCurve,this.p0=t,this.p1=e}getPointAt(t){if(this.defined!==!1)return Eo.pointAtPP(this.p0,this.p1,t);throw new Error("defined为false的点不能getPointAt")}getAngleAt(t){return this.angle==null&&(this.angle=ue(this.p1.y-this.p0.y,this.p1.x-this.p0.x)),this.angle}_validPoint(){return Number.isFinite(this.p0.x+this.p0.y+this.p1.x+this.p1.y)}calcLength(){return this._validPoint()?Eo.distancePP(this.p0,this.p1):60}calcProjLength(t){return t===xe.ROW?fe(this.p0.x-this.p1.x):t===xe.COLUMN?fe(this.p0.y-this.p1.y):0}}class Jf{get endX(){return this._lastX}get endY(){return this._lastY}constructor(t,e){this.init(t,e)}init(t,e){this._lastX=this._lastY=this._startX=this._startY=0,this.curveType=t,this.direction=e,this.curves=[]}bezierCurveTo(t,e,n,o,r,s,l,a){const h=new qf(new Ue(this._lastX,this._lastY),new Ue(t,e),new Ue(n,o),new Ue(r,s));h.originP1=this._lastOriginP,h.originP2=a,h.defined=l,this.curves.push(h),this._lastX=r,this._lastY=s,this._lastOriginP=a}closePath(){if(this.curves.length<2)return;const t=this.curves[this.curves.length-1];this.lineTo(this._startX,this._startY,t.defined,this._startOriginP)}ellipse(){throw new Error("SegContext不支持调用ellipse")}lineTo(t,e,n,o){const r=this.addLinearCurve(t,e,n,this._lastOriginP,o);this.curves.push(r),this._lastX=t,this._lastY=e,this._lastOriginP=o}moveTo(t,e,n){return this._lastX=this._startX=t,this._lastY=this._startY=e,this._lastOriginP=n,this._startOriginP=n,this}quadraticCurveTo(t,e,n,o){throw new Error("SegContext不支持调用quadraticCurveTo")}clear(){this.curves=[],this.length=NaN}tryUpdateLength(t){return this.getLength(t)}addLinearCurve(t,e,n,o,r){const s=new Zf(new Ue(this._lastX,this._lastY),new Ue(t,e));return s.originP1=o,s.originP2=r,s.defined=n,s}getPointAt(t){throw new Error("暂未实现")}getCurveLengths(){return[]}getLength(t){var e,n;if(t===xe.COLUMN){if(!this.curves.length)return 0;const o=this.curves[0],r=this.curves[this.curves.length-1],s=(e=r.p3)!==null&&e!==void 0?e:r.p1;return fe(o.p0.y-s.y)}if(t===xe.ROW){if(!this.curves.length)return 0;const o=this.curves[0],r=this.curves[this.curves.length-1],s=(n=r.p3)!==null&&n!==void 0?n:r.p1;return fe(o.p0.x-s.x)}return Number.isFinite(this.length)||(this.length=this.curves.reduce((o,r)=>o+r.getLength(),0)),this.length}}class x2 extends Jf{bezierCurveTo(t,e,n,o,r,s,l,a){return super.bezierCurveTo(e,t,o,n,s,r,l,a)}lineTo(t,e,n,o){return super.lineTo(e,t,n,o)}moveTo(t,e,n){return super.moveTo(e,t,n)}clear(){return super.clear()}}function Gr(i,t,e=1){let n=!1;for(let o=0,r=t.length;o<=r;o++)o>=r===n&&((n=!n)?i.lineStart():i.lineEnd()),n&&i.point(t[o])}function zs(i,t,e){const n=t!=null?t:fe(e[e.length-1].x-e[0].x)>fe(e[e.length-1].y-e[0].y)?xe.ROW:xe.COLUMN;return i==="monotoneY"?new x2(i,n):new Jf(i,n)}class YC{constructor(t,e){this.context=t,e&&(this.startPoint=e)}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;default:this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t)}this._lastDefined=t.defined}tryUpdateLength(){return this.context.tryUpdateLength()}}function ia(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;const o=zs("linear",e,i);return R2(new YC(o,n),i),o}function R2(i,t){return Gr(i,t,1)}function XC(i,t,e,n,o){i.context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+t)/6,(i._y0+4*i._y1+e)/6,n,i.lastPoint1)}class A2{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){this._point===2&&XC(this,6*this._x1-(this._x0+4*this._x1),6*this._y1-(this._y0+4*this._y1),this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1),(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;break;default:XC(this,e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}function T2(i,t){return Gr(i,t,2)}function M2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;if(i.length<3-+!!n)return ia(i,t);const o=zs("basis",e,i);return T2(new A2(o,n),i),o}function qC(i){return i<0?-1:1}function ZC(i,t,e){const n=i._x1-i._x0,o=t-i._x1,r=(i._y1-i._y0)/(n||Number(o<0&&-0)),s=(e-i._y1)/(o||Number(n<0&&-0)),l=(r*o+s*n)/(n+o);return(qC(r)+qC(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(l))||0}function JC(i,t){const e=i._x1-i._x0;return e?(3*(i._y1-i._y0)/e-t)/2:t}function Qf(i,t,e,n,o){const r=i._x0,s=i._y0,l=i._x1,a=i._y1,h=(l-r)/3;i.context.bezierCurveTo(r+h,s+h*t,l-h,a-h*e,l,a,n,i.lastPoint1)}class QC{constructor(t,e){this.context=t,this.startPoint=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x1,this._y1,this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1);break;case 3:Qf(this,this._t0,JC(this,this._t0),this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1)}(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){let e=NaN;const n=t.x,o=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(n,o,this._lastDefined1!==!1&&this._lastDefined2!==!1,t):this.context.moveTo(n,o,t);break;case 1:this._point=2;break;case 2:this._point=3,Qf(this,JC(this,e=ZC(this,n,o)),e,this._lastDefined1!==!1&&this._lastDefined2!==!1);break;default:Qf(this,this._t0,e=ZC(this,n,o),this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._x0=this._x1,this._x1=n,this._y0=this._y1,this._y1=o,this._t0=e,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined!==!1,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}class B2 extends QC{constructor(t,e){super(t,e)}point(t){return super.point({y:t.x,x:t.y,defined:t.defined})}}function P2(i,t){return Gr(i,t,2)}function H2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;if(i.length<3-+!!n)return ia(i,t);const o=zs("monotoneX",e,i);return P2(new QC(o,n),i),o}function E2(i,t){return Gr(i,t,2)}function L2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;if(i.length<3-+!!n)return ia(i,t);const o=zs("monotoneY",e,i);return E2(new B2(o,n),i),o}let k2=class{constructor(t,e=.5,n){this.context=t,this._t=e,this.startPoint=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x=this._y=NaN,this._point=0,this.startPoint&&this.point(this.startPoint)}lineEnd(){0<this._t&&this._t<1&&this._point===2&&this.context.lineTo(this._x,this._y,this._lastDefined!==!1,this.lastPoint),(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)}point(t){const e=t.x,n=t.y;switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t):this.context.moveTo(e,n,t);break;case 1:this._point=2;default:if(this._t<=0)this.context.lineTo(this._x,n,this._lastDefined!==!1&&t.defined!==!1,this.lastPoint),this.context.lineTo(e,n,this._lastDefined!==!1&&t.defined!==!1,t);else{const o=this._x*(1-this._t)+e*this._t;this.context.lineTo(o,this._y,this._lastDefined!==!1&&t.defined!==!1,this.lastPoint),this.context.lineTo(o,n,this._lastDefined!==!1&&t.defined!==!1,t)}}this._lastDefined=t.defined,this._x=e,this._y=n,this.lastPoint=t}tryUpdateLength(){return this.context.tryUpdateLength()}};function tp(i,t,e={}){const{direction:n,startPoint:o}=e;if(i.length<2-+!!o)return null;const r=new Jf("step",n!=null?n:fe(i[i.length-1].x-i[0].x)>fe(i[i.length-1].y-i[0].y)?xe.ROW:xe.COLUMN);return F2(new k2(r,t,o),i),r}function F2(i,t){return Gr(i,t,1)}class I2 extends YC{lineEnd(){this.context.closePath()}}function O2(i,t={}){const{direction:e,startPoint:n}=t;if(i.length<2-+!!n)return null;const o=zs("linear",e,i);return D2(new I2(o,n),i),o}function D2(i,t){return Gr(i,t,1)}function ty(i,t,e,n,o){let r=i._x1,s=i._y1,l=i._x2,a=i._y2;if(i._l01_a>Be){const h=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,d=3*i._l01_a*(i._l01_a+i._l12_a);r=(r*h-i._x0*i._l12_2a+i._x2*i._l01_2a)/d,s=(s*h-i._y0*i._l12_2a+i._y2*i._l01_2a)/d}if(i._l23_a>Be){const h=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,d=3*i._l23_a*(i._l23_a+i._l12_a);l=(l*h+i._x1*i._l23_2a-t*i._l12_2a)/d,a=(a*h+i._y1*i._l23_2a-e*i._l12_2a)/d}i.context.bezierCurveTo(r,s,l,a,i._x2,i._y2,n,i.lastPoint1)}class z2{constructor(t,e=.5,n){this.context=t,this.startPoint=n,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 2:this.context.lineTo(this._x2,this._y2,this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1);break;case 3:this.point({x:this._x2,y:this._y2})}(this._line||this._line!==0&&this._point===1)&&this.context.closePath(),this._line=1-this._line}point(t){const{x:e,y:n}=t;if(this._point){const o=this._x2-e,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(o*o+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this.context.lineTo(e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1):this.context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3;default:ty(this,e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}function ey(i,t){return function(e,n,o={}){const{direction:r,startPoint:s}=o;if(e.length<2-+!!s)return null;if(e.length<3-+!!s)return ia(e,o);const l=zs(i,r,e),a=new t(l,n,s);return Gr(a,e,2),l}}const W2=ey("catmullRom",z2);class N2{constructor(t,e=.5,n){this.context=t,this.startPoint=n,this._alpha=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0}lineEnd(){switch(this._point){case 1:this.context.moveTo(this._x3,this._y3,this.lastPoint1),this.context.closePath();break;case 2:this.context.lineTo(this._x3,this._y3,this._lastDefined1!==!1&&this._lastDefined2!==!1,this.lastPoint1),this.context.closePath();break;case 3:this.point({x:this._x3,y:this._y3}),this.point({x:this._x4,y:this._y4}),this.point({x:this._x5,y:this._y5})}}point(t){const{x:e,y:n}=t;if(this._point){const o=this._x2-e,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(o*o+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=n;break;case 1:this._point=2,this.context.moveTo(this._x4=e,this._y4=n,t);break;case 2:this._point=3,this._x5=e,this._y5=n;break;default:ty(this,e,n,this._lastDefined1!==!1&&this._lastDefined2!==!1)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=n,this._lastDefined1=this._lastDefined2,this._lastDefined2=t.defined,this.lastPoint0=this.lastPoint1,this.lastPoint1=t}tryUpdateLength(){return this.context.tryUpdateLength()}}const V2=ey("catmullRomClosed",N2);function Ur(i,t,e){var n,o;switch(t){case"linear":default:return ia(i,e);case"basis":return M2(i,e);case"monotoneX":return H2(i,e);case"monotoneY":return L2(i,e);case"step":return tp(i,.5,e);case"stepBefore":return tp(i,0,e);case"stepAfter":return tp(i,1,e);case"catmullRom":return W2(i,(n=e==null?void 0:e.curveTension)!==null&&n!==void 0?n:.5,e);case"catmullRomClosed":return V2(i,(o=e==null?void 0:e.curveTension)!==null&&o!==void 0?o:.5,e);case"linearClosed":return O2(i,e)}}class vi extends f2{constructor(t){super(),this.commandList=[],t&&(this._ctx=t),this._boundsContext=new Uf(this.bounds)}setCtx(t){this._ctx=t}moveTo(t,e){return this.commandList.push([ce.M,t,e]),this._ctx&&this._ctx.moveTo(t,e),this}lineTo(t,e){return this.commandList.push([ce.L,t,e]),this._ctx&&this._ctx.lineTo(t,e),this}quadraticCurveTo(t,e,n,o){return this.commandList.push([ce.Q,t,e,n,o]),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,o),this}bezierCurveTo(t,e,n,o,r,s){return this.commandList.push([ce.C,t,e,n,o,r,s]),this._ctx&&this._ctx.bezierCurveTo(t,e,n,o,r,s),this}arcTo(t,e,n,o,r){return this.commandList.push([ce.AT,t,e,n,o,r]),this._ctx&&this._ctx.arcTo(t,e,n,o,r),this}ellipse(t,e,n,o,r,s,l,a){return this.commandList.push([ce.E,t,e,n,o,r,s,l,a]),this._ctx&&this._ctx.ellipse(t,e,n,o,r,s,l,a),this}rect(t,e,n,o){return this.commandList.push([ce.R,t,e,n,o]),this._ctx&&this._ctx.rect(t,e,n,o),this}arc(t,e,n,o,r,s){return this.commandList.push([ce.A,t,e,n,o,r,s]),this._ctx&&this._ctx.arc(t,e,n,o,r,s),this}closePath(){return this.commandList.push([ce.Z]),this._ctx&&this._ctx.closePath(),this}addCurve(t){this.curves.push(t)}clear(){this.transformCbList=null,this.commandList.length=0,this.curves.length=0}beginPath(){this.clear()}toString(){if(!this.toStringCbList){const n=[];n[ce.M]=o=>`M${o[1]} ${o[2]}`,n[ce.L]=o=>`L${o[1]} ${o[2]}`,n[ce.Q]=o=>`Q${o[1]} ${o[2]} ${o[3]} ${o[4]}`,n[ce.C]=o=>`C${o[1]} ${o[2]} ${o[3]} ${o[4]} ${o[5]} ${o[6]}`,n[ce.A]=o=>{const r=[];y2(r,o[4],o[5],o[1],o[2],o[3],o[3]);let s="";for(let l=0;l<r.length;l+=6)s+=`C${r[l]} ${r[l+1]} ${r[l+2]} ${r[l+3]} ${r[l+4]} ${r[l+5]}`;return s},n[ce.R]=o=>`M${o[1]} ${o[2]} h${o[3]} v${o[4]} H${o[1]}Z`,n[ce.Z]=o=>"Z",this.toStringCbList=n}const t=this.toStringCbList;let e="";return this.commandList.forEach(n=>{e+=t[n[0]](n)}),e}fromString(t,e,n,o,r){this.clear();const s=v2(t);return this._runCommandStrList(s,e,n,o,r),this._updateBounds(),this}fromLine(t){const{points:e,curveType:n,clipRangeByDimension:o}=t.attribute;if(!e)return;const r=Ur(e,n);o==="x"?this.direction=xe.ROW:o==="y"?this.direction=xe.COLUMN:o==="auto"&&(this.direction=r.direction),this.curves=r.curves}fromCustomPath2D(t,e,n,o,r){return this.clear(),this._runCommandList(t.commandList,e,n,o,r),this._updateBounds(),this}transform(t,e,n,o){const r=this.commandList;if(!this.transformCbList){const s=[];s[ce.M]=this.moveToTransform,s[ce.L]=this.lineToTransform,s[ce.Q]=this.quadraticCurveToTransform,s[ce.C]=this.bezierCurveToTransform,s[ce.AT]=this.arcToTransform,s[ce.E]=this.ellipseTransform,s[ce.R]=this.rectTransform,s[ce.A]=this.arcTransform,s[ce.Z]=this.closePathTransform,this.transformCbList=s}r.forEach(s=>{this.transformCbList[s[0]](s,t,e,n,o)}),this._updateBounds()}moveToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n}lineToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n}quadraticCurveToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o+e,t[4]=t[4]*r+n}bezierCurveToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o+e,t[4]=t[4]*r+n,t[5]=t[5]*o+e,t[6]=t[6]*r+n}arcToTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o+e,t[4]=t[4]*r+n,t[5]=t[5]*(o+r)/2}ellipseTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o,t[4]=t[4]*r}rectTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*o,t[4]=t[4]*r}arcTransform(t,e,n,o,r){t[1]=t[1]*o+e,t[2]=t[2]*r+n,t[3]=t[3]*(o+r)/2}closePathTransform(){}_runCommandStrList(t,e=0,n=0,o=1,r=1){let s,l,a,h,d,u=null,c=0,g=0,f=0,p=0;for(let m=0,v=t.length;m<v;++m){switch(s=t[m],o===1&&r===1||(s=j2(s,o,r)),s[0]){case"l":c+=s[1],g+=s[2],this.lineTo(c+e,g+n);break;case"L":c=s[1],g=s[2],this.lineTo(c+e,g+n);break;case"h":c+=s[1],this.lineTo(c+e,g+n);break;case"H":c=s[1],this.lineTo(c+e,g+n);break;case"v":g+=s[1],this.lineTo(c+e,g+n);break;case"V":g=s[1],this.lineTo(c+e,g+n);break;case"m":c+=s[1],g+=s[2],this.moveTo(c+e,g+n);break;case"M":c=s[1],g=s[2],this.moveTo(c+e,g+n);break;case"c":l=c+s[5],a=g+s[6],f=c+s[3],p=g+s[4],this.bezierCurveTo(c+s[1]+e,g+s[2]+n,f+e,p+n,l+e,a+n),c=l,g=a;break;case"C":c=s[5],g=s[6],f=s[3],p=s[4],this.bezierCurveTo(s[1]+e,s[2]+n,f+e,p+n,c+e,g+n);break;case"s":l=c+s[3],a=g+s[4],f=2*c-f,p=2*g-p,this.bezierCurveTo(f+e,p+n,c+s[1]+e,g+s[2]+n,l+e,a+n),f=c+s[1],p=g+s[2],c=l,g=a;break;case"S":l=s[3],a=s[4],f=2*c-f,p=2*g-p,this.bezierCurveTo(f+e,p+n,s[1]+e,s[2]+n,l+e,a+n),c=l,g=a,f=s[1],p=s[2];break;case"q":l=c+s[3],a=g+s[4],f=c+s[1],p=g+s[2],this.quadraticCurveTo(f+e,p+n,l+e,a+n),c=l,g=a;break;case"Q":l=s[3],a=s[4],this.quadraticCurveTo(s[1]+e,s[2]+n,l+e,a+n),c=l,g=a,f=s[1],p=s[2];break;case"t":l=c+s[1],a=g+s[2],u[0].match(/[QqTt]/)===null?(f=c,p=g):u[0]==="t"?(f=2*c-h,p=2*g-d):u[0]==="q"&&(f=2*c-f,p=2*g-p),h=f,d=p,this.quadraticCurveTo(f+e,p+n,l+e,a+n),c=l,g=a,f=c+s[1],p=g+s[2];break;case"T":l=s[1],a=s[2],f=2*c-f,p=2*g-p,this.quadraticCurveTo(f+e,p+n,l+e,a+n),c=l,g=a;break;case"a":jC(this,c+e,g+n,[s[1],s[2],s[3],s[4],s[5],s[6]+c+e,s[7]+g+n]),c+=s[6],g+=s[7];break;case"A":jC(this,c+e,g+n,[s[1],s[2],s[3],s[4],s[5],s[6]+e,s[7]+n]),c=s[6],g=s[7];break;case"z":case"Z":this.closePath()}u=s}}_runCommandList(t,e=0,n=0,o=1,r=1){if(e!==0||n!==0||o!==1||r!==1)for(let s=0,l=t.length;s<l;++s){const a=t[s].slice();switch(a[0]){case ce.L:this.lineToTransform(a,e,n,o,r);break;case ce.M:this.moveToTransform(a,e,n,o,r);break;case ce.C:this.bezierCurveToTransform(a,e,n,o,r);break;case ce.Q:this.quadraticCurveToTransform(a,e,n,o,r);break;case ce.A:this.arcToTransform(a,e,n,o,r);break;case ce.E:this.ellipseTransform(a,e,n,o,r);break;case ce.R:this.rectTransform(a,e,n,o,r);break;case ce.AT:this.arcToTransform(a,e,n,o,r);break;case ce.Z:this.closePath()}}else this.commandList=t.map(s=>s.slice())}_updateBounds(){this.bounds.clear(),ur(this.commandList,this._boundsContext)}release(){this.commandList=[],this._boundsContext=null,this._ctx=null}getLength(){if(this.direction===xe.COLUMN){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return fe(t.p0.y-e.p1.y)}if(this.direction===xe.ROW){if(!this.curves.length)return 0;const t=this.curves[0],e=this.curves[this.curves.length-1];return fe(t.p0.x-e.p1.x)}return this.curves.reduce((t,e)=>t+e.getLength(),0)}getAttrAt(t){if(!this.curves)return{pos:{x:0,y:0},angle:0};let e,n=0;for(let r=0;r<this.curves.length;r++){e=this.curves[r];const s=e.getLength(this.direction);if(n+s>=t)break;n+=s}const o=(t-n)/e.getLength(this.direction);return{pos:e.getPointAt(o),angle:e.getAngleAt(o)}}}const xn=["l",0,0,0,0,0,0,0];function j2(i,t,e){const n=xn[0]=i[0];if(n==="a"||n==="A")xn[1]=t*i[1],xn[2]=e*i[2],xn[3]=i[3],xn[4]=i[4],xn[5]=i[5],xn[6]=t*i[6],xn[7]=e*i[7];else if(n==="h"||n==="H")xn[1]=t*i[1];else if(n==="v"||n==="V")xn[1]=e*i[1];else for(let o=1,r=i.length;o<r;++o)xn[o]=(o%2==1?t:e)*i[o];return xn}const $2={alignSelf:"auto"},fi={x:0,y:0,z:0,dx:0,dy:0,dz:0,scrollX:0,scrollY:0,scaleX:1,scaleY:1,scaleZ:1,angle:0,alpha:0,beta:0,scaleCenter:[0,0],anchor:[0,0],anchor3d:[0,0],postMatrix:new ni},iy={fillOpacity:1,fill:!1,shadowBlur:0,shadowColor:"black",shadowOffsetX:0,shadowOffsetY:0},ep={strokeOpacity:1,lineDash:[],lineDashOffset:0,lineWidth:1,lineCap:"butt",lineJoin:"miter",miterLimit:10,strokeBoundsBuffer:2,stroke:!1},ny=Object.assign({outerBorder:Object.assign(Object.assign({},ep),{distance:0}),innerBorder:Object.assign(Object.assign({},ep),{distance:0})},ep),Rn={text:"",maxLineWidth:1/0,textAlign:"left",textBaseline:"alphabetic",fontSize:16,fontFamily:`PingFang SC,Microsoft Yahei,system-ui,-apple-system,segoe ui,